-- cgit From 96cfddfbe6be9843da65736c6397d06061810aa9 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 17 Jan 2002 01:20:11 +0000 Subject: add winbindd startup scripts to package --- packaging/SGI/idb.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl index 8d3b6931078..038a8be7342 100755 --- a/packaging/SGI/idb.pl +++ b/packaging/SGI/idb.pl @@ -137,9 +137,13 @@ chdir $curdir; open(IDB,"> $curdir/$PKG.idb") || die "Unable to open $PKG.idb for output\n"; print IDB "f 0644 root sys etc/config/samba $SRCPFX/packaging/SGI/samba.config $PKG.sw.base config(update)\n"; +print IDB "f 0644 root sys etc/config/winbindd $SRCPFX/packaging/SGI/winbindd.config $PKG.sw.base config(update)\n"; print IDB "f 0755 root sys etc/init.d/samba $SRCPFX/packaging/SGI/samba.rc $PKG.sw.base\n"; -print IDB "l 0000 root sys etc/rc0.d/K39samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; +print IDB "f 0755 root sys etc/init.d/winbindd $SRCPFX/packaging/SGI/winbindd.rc $PKG.sw.base\n"; +print IDB "l 0000 root sys etc/rc0.d/K36winbindd $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbindd)\n"; +print IDB "l 0000 root sys etc/rc0.d/K37samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; +print IDB "l 0000 root sys etc/rc2.d/S82winbindd $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbindd)\n"; if ($PKG eq "samba_irix") { print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n"; -- cgit From 04235aac8f1b2827c4a05298a6e8d5184ed8bc1f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 Jan 2002 07:24:20 +0000 Subject: Ok, it's a fair cop. So alphabetisation isn't all it's cracked up to be :-). Jeremy. --- source/client/client.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index 81cac27f9e5..bd8a52226ad 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -1871,7 +1871,11 @@ static BOOL list_servers(char *wk_grp) #define COMPL_REMOTE 1 /* Complete remote filename */ #define COMPL_LOCAL 2 /* Complete local filename */ -/* This defines the commands supported by this client */ +/* This defines the commands supported by this client. + * NOTE: The "!" must be the last one in the list because it's fn pointer + * field is NULL, and NULL in that field is used in process_tok() + * (below) to indicate the end of the list. crh + */ struct { char *name; @@ -1881,7 +1885,6 @@ struct } commands[] = { {"?",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}}, - {"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}}, {"altname",cmd_altname," show alt name",{COMPL_NONE,COMPL_NONE}}, {"archive",cmd_archive,"\n0=ignore archive bit\n1=only get archive files\n2=only get archive files and reset archive bit\n3=get all files and reset archive bit",{COMPL_NONE,COMPL_NONE}}, {"blocksize",cmd_block,"blocksize (default 20)",{COMPL_NONE,COMPL_NONE}}, @@ -1926,6 +1929,9 @@ struct {"tar",cmd_tar,"tar [IXFqbgNan] current directory to/from ",{COMPL_NONE,COMPL_NONE}}, {"tarmode",cmd_tarmode," tar's behaviour towards archive bits",{COMPL_NONE,COMPL_NONE}}, {"translate",cmd_translate,"toggle text translation for printing",{COMPL_NONE,COMPL_NONE}}, + + /* Yes, this must be here, see crh's comment above. */ + {"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}}, {"",NULL,NULL,{COMPL_NONE,COMPL_NONE}} }; -- cgit From bb4cf9105a13a6c18603d92608f3745dbefd39ed Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 Jan 2002 19:13:44 +0000 Subject: Added libsmbclient versioning patch from Steve Langasek (vorlon@netexpress.net). Jeremy. --- source/Makefile.in | 3 +- source/configure | 1502 ++++++++++++++++++++++++++------------------------- source/configure.in | 5 +- source/nmbd/nmbd.c | 42 +- 4 files changed, 782 insertions(+), 770 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 1d1a452e65a..8d984da57fc 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -617,7 +617,8 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) libsmbclient: $(LIBSMBCLIENT_PICOBJS) @echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@ @$(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ \ - $(LIBSMBCLIENT_PICOBJS) $(LIBS) + $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ + @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR).$(LIBSMBCLIENT_MINOR) @echo Linking libsmbclient non-shared library bin/$@.a @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) diff --git a/source/configure b/source/configure index 8ba8a79c95b..d87259f1ef5 100755 --- a/source/configure +++ b/source/configure @@ -744,6 +744,7 @@ fi + @@ -774,7 +775,7 @@ fi # 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:778: checking for $ac_word" >&5 +echo "configure:779: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -804,7 +805,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:808: checking for $ac_word" >&5 +echo "configure:809: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -855,7 +856,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:859: checking for $ac_word" >&5 +echo "configure:860: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -887,7 +888,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -898,12 +899,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 902 "configure" +#line 903 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:908: \"$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 @@ -929,12 +930,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:933: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:934: checking whether the C compiler ($CC $CFLAGS $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:938: checking whether we are using GNU C" >&5 +echo "configure:939: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -943,7 +944,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:947: \"$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:948: \"$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 @@ -962,7 +963,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:966: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:967: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1024,7 +1025,7 @@ ac_configure=$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:1028: checking for a BSD compatible install" >&5 +echo "configure:1029: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1081,7 +1082,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:1085: checking for $ac_word" >&5 +echo "configure:1086: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1113,10 +1114,10 @@ done 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:1117: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1118: 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:1120: checking whether cc understands -c and -o together" >&5 +echo "configure:1121: 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]/_/'`" @@ -1128,16 +1129,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:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1134: \"$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:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1139: \"$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:1140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1171,20 +1172,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1175: checking that the C compiler understands volatile" >&5 +echo "configure:1176: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1234,7 +1235,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1238: checking host system type" >&5 +echo "configure:1239: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1255,7 +1256,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1259: checking target system type" >&5 +echo "configure:1260: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1273,7 +1274,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1277: checking build system type" >&5 +echo "configure:1278: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1307,7 +1308,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1311: checking config.cache system type" >&5 +echo "configure:1312: 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" && @@ -1332,7 +1333,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:1336: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1337: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1433,14 +1434,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1437: checking for LFS support" >&5 +echo "configure:1438: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1452,7 +1453,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1479,14 +1480,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1483: checking for LFS support" >&5 +echo "configure:1484: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1524,7 +1525,7 @@ main() { } EOF -if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1545,14 +1546,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1549: checking for LFS support" >&5 +echo "configure:1550: 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 < @@ -1564,7 +1565,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1569: \"$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 @@ -1586,21 +1587,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1590: checking for inline" >&5 +echo "configure:1591: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1626,7 +1627,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1630: checking how to run the C preprocessor" >&5 +echo "configure:1631: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1641,13 +1642,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1652: \"$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 : @@ -1658,13 +1659,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1669: \"$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 : @@ -1675,13 +1676,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1686: \"$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 : @@ -1706,12 +1707,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1710: checking for ANSI C header files" >&5 +echo "configure:1711: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1719,7 +1720,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1724: \"$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* @@ -1736,7 +1737,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 @@ -1754,7 +1755,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 @@ -1775,7 +1776,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1786,7 +1787,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1814,12 +1815,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:1818: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1819: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1827,7 +1828,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1852,7 +1853,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:1856: checking for opendir in -ldir" >&5 +echo "configure:1857: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1860,7 +1861,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1876: \"$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 @@ -1893,7 +1894,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1897: checking for opendir in -lx" >&5 +echo "configure:1898: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1901,7 +1902,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1917: \"$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 @@ -1935,12 +1936,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1939: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1940: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1949,7 +1950,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1970,12 +1971,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1974: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1975: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1991,7 +1992,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2015,17 +2016,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:2019: checking for $ac_hdr" >&5 +echo "configure:2020: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2030: \"$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* @@ -2055,17 +2056,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2059: checking for $ac_hdr" >&5 +echo "configure:2060: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2070: \"$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* @@ -2095,17 +2096,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2099: checking for $ac_hdr" >&5 +echo "configure:2100: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2110: \"$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* @@ -2135,17 +2136,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2139: checking for $ac_hdr" >&5 +echo "configure:2140: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2150: \"$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* @@ -2175,17 +2176,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2179: checking for $ac_hdr" >&5 +echo "configure:2180: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2190: \"$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* @@ -2215,17 +2216,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2219: checking for $ac_hdr" >&5 +echo "configure:2220: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2230: \"$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* @@ -2255,17 +2256,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2259: checking for $ac_hdr" >&5 +echo "configure:2260: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2270: \"$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* @@ -2295,17 +2296,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2299: checking for $ac_hdr" >&5 +echo "configure:2300: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2310: \"$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* @@ -2339,14 +2340,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2368,17 +2369,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2372: checking for $ac_hdr" >&5 +echo "configure:2373: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2383: \"$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* @@ -2408,17 +2409,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2412: checking for $ac_hdr" >&5 +echo "configure:2413: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2423: \"$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* @@ -2448,17 +2449,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2452: checking for $ac_hdr" >&5 +echo "configure:2453: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2463: \"$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* @@ -2488,17 +2489,17 @@ for ac_hdr in 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:2492: checking for $ac_hdr" >&5 +echo "configure:2493: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2503: \"$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* @@ -2528,17 +2529,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:2532: checking for $ac_hdr" >&5 +echo "configure:2533: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2543: \"$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* @@ -2570,17 +2571,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2574: checking for $ac_hdr" >&5 +echo "configure:2575: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2585: \"$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* @@ -2612,17 +2613,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2616: checking for $ac_hdr" >&5 +echo "configure:2617: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2627: \"$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* @@ -2654,17 +2655,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2658: checking for $ac_hdr" >&5 +echo "configure:2659: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2669: \"$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* @@ -2692,7 +2693,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2696: checking size of int" >&5 +echo "configure:2697: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2700,7 +2701,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < int main() @@ -2711,7 +2712,7 @@ int main() return(0); } EOF -if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2716: \"$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 @@ -2731,7 +2732,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2735: checking size of long" >&5 +echo "configure:2736: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2739,7 +2740,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < int main() @@ -2750,7 +2751,7 @@ int main() return(0); } EOF -if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2755: \"$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 @@ -2770,7 +2771,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2774: checking size of short" >&5 +echo "configure:2775: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2778,7 +2779,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < int main() @@ -2789,7 +2790,7 @@ int main() return(0); } EOF -if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2794: \"$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 @@ -2810,12 +2811,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2814: checking for working const" >&5 +echo "configure:2815: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2885,21 +2886,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2889: checking for inline" >&5 +echo "configure:2890: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2925,14 +2926,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2929: checking whether byte ordering is bigendian" >&5 +echo "configure:2930: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2943,11 +2944,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2948: \"$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 < #include @@ -2958,7 +2959,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2978,7 +2979,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2996: \"$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 @@ -3015,14 +3016,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3019: checking whether char is unsigned" >&5 +echo "configure:3020: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3059: \"$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 @@ -3079,12 +3080,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3083: checking return type of signal handlers" >&5 +echo "configure:3084: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3101,7 +3102,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3120,12 +3121,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3124: checking for uid_t in sys/types.h" >&5 +echo "configure:3125: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3154,12 +3155,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3158: checking for mode_t" >&5 +echo "configure:3159: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3187,12 +3188,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3191: checking for off_t" >&5 +echo "configure:3192: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3220,12 +3221,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3224: checking for size_t" >&5 +echo "configure:3225: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3253,12 +3254,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3257: checking for pid_t" >&5 +echo "configure:3258: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3286,12 +3287,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3290: checking for st_rdev in struct stat" >&5 +echo "configure:3291: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3299,7 +3300,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3320,12 +3321,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3324: checking for d_off in dirent" >&5 +echo "configure:3325: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3335,7 +3336,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3356,12 +3357,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3360: checking for ino_t" >&5 +echo "configure:3361: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3389,12 +3390,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3393: checking for loff_t" >&5 +echo "configure:3394: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3422,12 +3423,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3426: checking for offset_t" >&5 +echo "configure:3427: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3455,12 +3456,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3459: checking for ssize_t" >&5 +echo "configure:3460: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3488,12 +3489,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3492: checking for wchar_t" >&5 +echo "configure:3493: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3525,7 +3526,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3529: checking for httpConnect in -lcups" >&5 +echo "configure:3530: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3533,7 +3534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3549: \"$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 @@ -3579,17 +3580,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3583: checking for $ac_hdr" >&5 +echo "configure:3584: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3594: \"$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* @@ -3628,7 +3629,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3632: checking for dlopen in -ldl" >&5 +echo "configure:3633: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3636,7 +3637,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3652: \"$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 @@ -3675,13 +3676,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3679: checking for immediate structures" >&5 +echo "configure:3680: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3693,7 +3694,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3716,13 +3717,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3720: checking for unix domain sockets" >&5 +echo "configure:3721: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3737,7 +3738,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3758,13 +3759,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3762: checking for socklen_t type" >&5 +echo "configure:3763: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3777,7 +3778,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3798,13 +3799,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3802: checking for sig_atomic_t type" >&5 +echo "configure:3803: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3817,7 +3818,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3840,20 +3841,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3844: checking for errno declaration" >&5 +echo "configure:3845: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3875,20 +3876,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3879: checking for setresuid declaration" >&5 +echo "configure:3880: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3910,20 +3911,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3914: checking for setresgid declaration" >&5 +echo "configure:3915: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3945,20 +3946,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3949: checking for asprintf declaration" >&5 +echo "configure:3950: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3980,20 +3981,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:3984: checking for vasprintf declaration" >&5 +echo "configure:3985: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4015,20 +4016,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4019: checking for vsnprintf declaration" >&5 +echo "configure:4020: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4050,20 +4051,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4054: checking for snprintf declaration" >&5 +echo "configure:4055: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4087,7 +4088,7 @@ EOF # 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:4091: checking for real setresuid" >&5 +echo "configure:4092: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4096,12 +4097,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4106: \"$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 @@ -4126,7 +4127,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4130: checking for real setresgid" >&5 +echo "configure:4131: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4135,13 +4136,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4146: \"$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 @@ -4164,7 +4165,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4168: checking for 8-bit clean memcmp" >&5 +echo "configure:4169: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4172,7 +4173,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4187: \"$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 @@ -4206,7 +4207,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4210: checking whether to use readline" >&5 +echo "configure:4211: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4218,17 +4219,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4222: checking for $ac_hdr" >&5 +echo "configure:4223: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4233: \"$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* @@ -4258,17 +4259,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4262: checking for $ac_hdr" >&5 +echo "configure:4263: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4273: \"$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* @@ -4299,17 +4300,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4303: checking for $ac_hdr" >&5 +echo "configure:4304: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4314: \"$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* @@ -4332,7 +4333,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4336: checking for tgetent in -l${termlib}" >&5 +echo "configure:4337: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4340,7 +4341,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4356: \"$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 @@ -4373,7 +4374,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4377: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4378: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4381,7 +4382,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4397: \"$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 @@ -4443,17 +4444,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4447: checking for $ac_hdr" >&5 +echo "configure:4448: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4458: \"$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* @@ -4483,17 +4484,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4487: checking for $ac_hdr" >&5 +echo "configure:4488: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4498: \"$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* @@ -4524,17 +4525,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4528: checking for $ac_hdr" >&5 +echo "configure:4529: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4539: \"$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* @@ -4557,7 +4558,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4561: checking for tgetent in -l${termlib}" >&5 +echo "configure:4562: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4565,7 +4566,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4581: \"$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 @@ -4598,7 +4599,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4602: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4603: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4606,7 +4607,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4622: \"$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 @@ -4672,12 +4673,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4676: checking for $ac_func" >&5 +echo "configure:4677: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4705: \"$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 @@ -4728,7 +4729,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:4732: checking for printf in -lnsl_s" >&5 +echo "configure:4733: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4736,7 +4737,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4752: \"$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 @@ -4778,7 +4779,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4782: checking for printf in -lnsl" >&5 +echo "configure:4783: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4786,7 +4787,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4802: \"$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 @@ -4828,7 +4829,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4832: checking for connect in -lsocket" >&5 +echo "configure:4833: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4836,7 +4837,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4852: \"$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 @@ -4878,7 +4879,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4882: checking for connect in -linet" >&5 +echo "configure:4883: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4886,7 +4887,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4902: \"$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 @@ -4941,12 +4942,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4945: checking for $ac_func" >&5 +echo "configure:4946: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4974: \"$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 @@ -4995,7 +4996,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:4999: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5000: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5003,7 +5004,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5019: \"$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 @@ -5044,12 +5045,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5048: checking for $ac_func" >&5 +echo "configure:5049: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5077: \"$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 @@ -5105,12 +5106,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5109: checking for $ac_func" >&5 +echo "configure:5110: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5138: \"$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 @@ -5160,12 +5161,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5164: checking for $ac_func" >&5 +echo "configure:5165: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5193: \"$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 @@ -5215,12 +5216,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5219: checking for $ac_func" >&5 +echo "configure:5220: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5248: \"$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 @@ -5270,12 +5271,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5274: checking for $ac_func" >&5 +echo "configure:5275: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5303: \"$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 @@ -5325,12 +5326,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5329: checking for $ac_func" >&5 +echo "configure:5330: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5358: \"$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 @@ -5380,12 +5381,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5384: checking for $ac_func" >&5 +echo "configure:5385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5413: \"$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 @@ -5435,12 +5436,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5439: checking for $ac_func" >&5 +echo "configure:5440: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5468: \"$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 @@ -5490,12 +5491,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5494: checking for $ac_func" >&5 +echo "configure:5495: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5523: \"$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 @@ -5545,12 +5546,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5549: checking for $ac_func" >&5 +echo "configure:5550: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5578: \"$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 @@ -5600,12 +5601,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5604: checking for $ac_func" >&5 +echo "configure:5605: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5633: \"$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 @@ -5657,12 +5658,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5661: checking for $ac_func" >&5 +echo "configure:5662: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5690: \"$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 @@ -5713,12 +5714,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:5717: checking for $ac_func" >&5 +echo "configure:5718: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5746: \"$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 @@ -5768,12 +5769,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:5772: checking for $ac_func" >&5 +echo "configure:5773: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$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 @@ -5823,12 +5824,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5827: checking for $ac_func" >&5 +echo "configure:5828: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5856: \"$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 @@ -5878,12 +5879,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5882: checking for $ac_func" >&5 +echo "configure:5883: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5911: \"$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 @@ -5933,12 +5934,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:5937: checking for $ac_func" >&5 +echo "configure:5938: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5966: \"$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 @@ -5988,12 +5989,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:5992: checking for $ac_func" >&5 +echo "configure:5993: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6021: \"$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 @@ -6043,12 +6044,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:6047: checking for $ac_func" >&5 +echo "configure:6048: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6076: \"$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,12 +6099,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:6102: checking for $ac_func" >&5 +echo "configure:6103: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6131: \"$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 @@ -6153,12 +6154,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6157: checking for $ac_func" >&5 +echo "configure:6158: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6186: \"$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 @@ -6208,12 +6209,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:6212: checking for $ac_func" >&5 +echo "configure:6213: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6241: \"$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 @@ -6263,12 +6264,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:6267: checking for $ac_func" >&5 +echo "configure:6268: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6296: \"$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 @@ -6318,12 +6319,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:6322: checking for $ac_func" >&5 +echo "configure:6323: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6351: \"$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 @@ -6373,12 +6374,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:6377: checking for $ac_func" >&5 +echo "configure:6378: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6406: \"$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 @@ -6428,12 +6429,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6432: checking for $ac_func" >&5 +echo "configure:6433: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6461: \"$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 @@ -6487,9 +6488,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6491: checking for stat64 in " >&5 +echo "configure:6492: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6520,9 +6521,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6524: checking for lstat64 in " >&5 +echo "configure:6525: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6553,9 +6554,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6557: checking for fstat64 in " >&5 +echo "configure:6558: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6592,7 +6593,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6596: checking for strcasecmp in -lresolv" >&5 +echo "configure:6597: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6600,7 +6601,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6616: \"$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 @@ -6647,12 +6648,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6651: checking for $ac_func" >&5 +echo "configure:6652: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6680: \"$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 @@ -6700,7 +6701,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6704: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6705: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6708,7 +6709,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6724: \"$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 @@ -6749,12 +6750,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6753: checking for $ac_func" >&5 +echo "configure:6754: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6782: \"$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 @@ -6808,12 +6809,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6812: checking for $ac_func" >&5 +echo "configure:6813: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6841: \"$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 @@ -6861,7 +6862,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6865: checking for putprpwnam in -lsec" >&5 +echo "configure:6866: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6869,7 +6870,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6885: \"$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 @@ -6910,12 +6911,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6914: checking for $ac_func" >&5 +echo "configure:6915: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6943: \"$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 @@ -6970,12 +6971,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:6974: checking for $ac_func" >&5 +echo "configure:6975: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7003: \"$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 @@ -7023,7 +7024,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7027: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7028: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7031,7 +7032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7047: \"$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 @@ -7072,12 +7073,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7076: checking for $ac_func" >&5 +echo "configure:7077: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7105: \"$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 @@ -7131,12 +7132,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:7135: checking for $ac_func" >&5 +echo "configure:7136: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7164: \"$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 @@ -7184,7 +7185,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7188: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7189: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7192,7 +7193,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7208: \"$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 @@ -7233,12 +7234,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7237: checking for $ac_func" >&5 +echo "configure:7238: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7266: \"$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 @@ -7294,12 +7295,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7298: checking for $ac_func" >&5 +echo "configure:7299: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7327: \"$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 @@ -7347,7 +7348,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7351: checking for getspnam in -lgen" >&5 +echo "configure:7352: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7355,7 +7356,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7371: \"$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 @@ -7396,12 +7397,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7400: checking for $ac_func" >&5 +echo "configure:7401: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7429: \"$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 @@ -7456,12 +7457,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7460: checking for $ac_func" >&5 +echo "configure:7461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7489: \"$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 @@ -7509,7 +7510,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7513: checking for getspnam in -lsecurity" >&5 +echo "configure:7514: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7517,7 +7518,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7533: \"$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 @@ -7558,12 +7559,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7562: checking for $ac_func" >&5 +echo "configure:7563: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7591: \"$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 @@ -7617,12 +7618,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7621: checking for $ac_func" >&5 +echo "configure:7622: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7650: \"$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 @@ -7670,7 +7671,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7674: checking for getspnam in -lsec" >&5 +echo "configure:7675: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7678,7 +7679,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7694: \"$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 @@ -7719,12 +7720,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7723: checking for $ac_func" >&5 +echo "configure:7724: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7752: \"$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 @@ -7779,12 +7780,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7783: checking for $ac_func" >&5 +echo "configure:7784: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7812: \"$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 @@ -7832,7 +7833,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7836: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7837: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7840,7 +7841,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7856: \"$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 @@ -7881,12 +7882,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7885: checking for $ac_func" >&5 +echo "configure:7886: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7914: \"$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 @@ -7940,12 +7941,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7944: checking for $ac_func" >&5 +echo "configure:7945: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7973: \"$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 @@ -7993,7 +7994,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:7997: checking for bigcrypt in -lsec" >&5 +echo "configure:7998: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8001,7 +8002,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8017: \"$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 @@ -8042,12 +8043,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8046: checking for $ac_func" >&5 +echo "configure:8047: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8075: \"$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 @@ -8102,12 +8103,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8106: checking for $ac_func" >&5 +echo "configure:8107: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8135: \"$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 @@ -8155,7 +8156,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8159: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8160: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8163,7 +8164,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8179: \"$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 @@ -8204,12 +8205,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8208: checking for $ac_func" >&5 +echo "configure:8209: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8237: \"$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 @@ -8263,12 +8264,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8267: checking for $ac_func" >&5 +echo "configure:8268: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8296: \"$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 @@ -8316,7 +8317,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8320: checking for getprpwnam in -lsec" >&5 +echo "configure:8321: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8324,7 +8325,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8340: \"$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 @@ -8365,12 +8366,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8369: checking for $ac_func" >&5 +echo "configure:8370: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8398: \"$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 @@ -8428,6 +8429,7 @@ done # these are the defaults, good for lots of systems HOST_OS="$host_os" LDSHFLAGS="-shared" +SONAMEFLAG="#" SHLD="\${CC}" PICFLAG="" PICSUFFIX="po.o" @@ -8435,7 +8437,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8439: checking ability to build shared libraries" >&5 +echo "configure:8441: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8446,6 +8448,7 @@ EOF BLDSHARED="true" LDSHFLAGS="-shared" PICFLAG="-fPIC" + SONAMEFLAG="-Wl,-soname=" cat >> confdefs.h <<\EOF #define STAT_ST_BLOCKSIZE 512 EOF @@ -8569,7 +8572,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:8573: checking for $ac_word" >&5 +echo "configure:8576: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8623,15 +8626,15 @@ EOF esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8627: checking linker flags for shared libraries" >&5 +echo "configure:8630: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8630: checking compiler flags for position-independent code" >&5 +echo "configure:8633: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8635: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8638: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8651,7 +8654,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:8655: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8658: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8672,7 +8675,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:8676: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8679: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8695,7 +8698,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8699: checking for long long" >&5 +echo "configure:8702: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8704,12 +8707,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8716: \"$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 @@ -8736,20 +8739,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8740: checking for LL suffix on long long integers" >&5 +echo "configure:8743: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8771,7 +8774,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8775: checking for 64 bit off_t" >&5 +echo "configure:8778: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8780,13 +8783,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8793: \"$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 @@ -8809,7 +8812,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8813: checking for off64_t" >&5 +echo "configure:8816: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8818,7 +8821,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8835: \"$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 @@ -8851,7 +8854,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8855: checking for 64 bit ino_t" >&5 +echo "configure:8858: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8860,13 +8863,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8873: \"$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 @@ -8889,7 +8892,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8893: checking for ino64_t" >&5 +echo "configure:8896: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8898,7 +8901,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8915: \"$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 @@ -8931,7 +8934,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8935: checking for dev64_t" >&5 +echo "configure:8938: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8940,7 +8943,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8973,13 +8976,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8977: checking for struct dirent64" >&5 +echo "configure:8980: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9012,7 +9015,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9016: checking for major macro" >&5 +echo "configure:9019: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9021,7 +9024,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9053,7 +9056,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9057: checking for minor macro" >&5 +echo "configure:9060: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9062,7 +9065,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9094,7 +9097,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9098: checking for makedev macro" >&5 +echo "configure:9101: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9103,7 +9106,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9135,7 +9138,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9139: checking for unsigned char" >&5 +echo "configure:9142: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9144,12 +9147,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9156: \"$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 @@ -9172,13 +9175,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9176: checking for sin_len in sock" >&5 +echo "configure:9179: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9187,7 +9190,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9208,13 +9211,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9212: checking whether seekdir returns void" >&5 +echo "configure:9215: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9223,7 +9226,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9244,20 +9247,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9248: checking for __FILE__ macro" >&5 +echo "configure:9251: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9278,20 +9281,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9282: checking for __FUNCTION__ macro" >&5 +echo "configure:9285: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9312,7 +9315,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9316: checking if gettimeofday takes tz argument" >&5 +echo "configure:9319: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9321,14 +9324,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9335: \"$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 @@ -9351,7 +9354,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9355: checking for C99 vsnprintf" >&5 +echo "configure:9358: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9360,7 +9363,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9382,7 +9385,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9405,7 +9408,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9409: checking for broken readdir" >&5 +echo "configure:9412: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9414,7 +9417,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9422,7 +9425,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:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9429: \"$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 @@ -9445,13 +9448,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9449: checking for utimbuf" >&5 +echo "configure:9452: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9459,7 +9462,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9483,12 +9486,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9487: checking for $ac_func" >&5 +echo "configure:9490: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9518: \"$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 @@ -9537,13 +9540,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9541: checking for ut_name in utmp" >&5 +echo "configure:9544: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9551,7 +9554,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9572,13 +9575,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9576: checking for ut_user in utmp" >&5 +echo "configure:9579: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9586,7 +9589,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9607,13 +9610,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9611: checking for ut_id in utmp" >&5 +echo "configure:9614: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9621,7 +9624,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9642,13 +9645,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9646: checking for ut_host in utmp" >&5 +echo "configure:9649: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9656,7 +9659,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9677,13 +9680,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9681: checking for ut_time in utmp" >&5 +echo "configure:9684: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9691,7 +9694,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9712,13 +9715,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9716: checking for ut_tv in utmp" >&5 +echo "configure:9719: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9726,7 +9729,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9747,13 +9750,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9751: checking for ut_type in utmp" >&5 +echo "configure:9754: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9761,7 +9764,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9782,13 +9785,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9786: checking for ut_pid in utmp" >&5 +echo "configure:9789: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9796,7 +9799,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9817,13 +9820,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9821: checking for ut_exit in utmp" >&5 +echo "configure:9824: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9831,7 +9834,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9852,13 +9855,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9856: checking for ut_addr in utmp" >&5 +echo "configure:9859: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9866,7 +9869,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9888,13 +9891,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9892: checking whether pututline returns pointer" >&5 +echo "configure:9895: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9902,7 +9905,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9924,13 +9927,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9928: checking for ut_syslen in utmpx" >&5 +echo "configure:9931: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9938,7 +9941,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9959,7 +9962,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9963: checking for Linux kernel oplocks" >&5 +echo "configure:9966: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9968,7 +9971,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -9982,7 +9985,7 @@ main() { } EOF -if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10005,7 +10008,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10009: checking for kernel change notify support" >&5 +echo "configure:10012: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10014,7 +10017,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10028,7 +10031,7 @@ main() { } EOF -if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +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_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10051,7 +10054,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10055: checking for kernel share modes" >&5 +echo "configure:10058: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10060,7 +10063,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10076,7 +10079,7 @@ main() { } EOF -if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10102,13 +10105,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10106: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10109: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10116,7 +10119,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:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10137,7 +10140,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10141: checking for irix specific capabilities" >&5 +echo "configure:10144: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10146,7 +10149,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10161,7 +10164,7 @@ main() { } EOF -if { (eval echo configure:10165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +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_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10189,13 +10192,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10193: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10196: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10205,7 +10208,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10226,13 +10229,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10230: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10233: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10242,7 +10245,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10263,13 +10266,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10267: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10270: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10279,7 +10282,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10300,13 +10303,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10304: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10307: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10316,7 +10319,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10338,13 +10341,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10342: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10345: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10358,7 +10361,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10379,16 +10382,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10383: checking for test routines" >&5 +echo "configure:10386: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10395: \"$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 @@ -10402,7 +10405,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10406: checking for ftruncate extend" >&5 +echo "configure:10409: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10411,11 +10414,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&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_FTRUNCATE_EXTEND=yes else @@ -10438,7 +10441,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10442: checking for broken getgroups" >&5 +echo "configure:10445: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10447,11 +10450,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10458: \"$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 @@ -10474,7 +10477,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10478: checking whether getpass should be replaced" >&5 +echo "configure:10481: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10482,7 +10485,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10518,7 +10521,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10522: checking for broken inet_ntoa" >&5 +echo "configure:10525: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10527,7 +10530,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10541,7 +10544,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:10545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10548: \"$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 @@ -10564,7 +10567,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10568: checking for secure mkstemp" >&5 +echo "configure:10571: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10573,7 +10576,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10590,7 +10593,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10613,7 +10616,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10617: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10620: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10622,12 +10625,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10650,7 +10653,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10654: checking for root" >&5 +echo "configure:10657: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10659,11 +10662,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10670: \"$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 @@ -10691,7 +10694,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10695: checking for iface AIX" >&5 +echo "configure:10698: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10700,7 +10703,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10732,7 +10735,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10736: checking for iface ifconf" >&5 +echo "configure:10739: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10741,7 +10744,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10774,7 +10777,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10778: checking for iface ifreq" >&5 +echo "configure:10781: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10783,7 +10786,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10820,7 +10823,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10824: checking for setresuid" >&5 +echo "configure:10827: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10829,7 +10832,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10844: \"$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 @@ -10863,7 +10866,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10867: checking for setreuid" >&5 +echo "configure:10870: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10872,7 +10875,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10887: \"$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 @@ -10905,7 +10908,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10909: checking for seteuid" >&5 +echo "configure:10912: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10914,7 +10917,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10929: \"$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 @@ -10947,7 +10950,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10951: checking for setuidx" >&5 +echo "configure:10954: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10956,7 +10959,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10971: \"$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 @@ -10989,7 +10992,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:10993: checking for working mmap" >&5 +echo "configure:10996: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10998,11 +11001,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11025,7 +11028,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11029: checking for ftruncate needs root" >&5 +echo "configure:11032: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11034,11 +11037,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11061,7 +11064,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11065: checking for fcntl locking" >&5 +echo "configure:11068: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11070,11 +11073,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11081: \"$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 @@ -11097,7 +11100,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11101: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11104: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11106,11 +11109,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11135,7 +11138,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11139: checking for 64 bit fcntl locking" >&5 +echo "configure:11142: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11144,7 +11147,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11175: \"$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 @@ -11193,13 +11196,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11197: checking for st_blocks in struct stat" >&5 +echo "configure:11200: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11208,7 +11211,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11231,13 +11234,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11235: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11238: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11274,13 +11277,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11278: checking for broken nisplus include files" >&5 +echo "configure:11281: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11290,7 +11293,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11314,7 +11317,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11318: checking whether to use smbwrapper" >&5 +echo "configure:11321: 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" @@ -11358,7 +11361,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11362: checking whether to use AFS" >&5 +echo "configure:11365: 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" @@ -11384,7 +11387,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11388: checking whether to use DCE/DFS auth" >&5 +echo "configure:11391: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11409,7 +11412,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11413: checking whether to use Kerberos IV" >&5 +echo "configure:11416: 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" @@ -11421,7 +11424,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11425: checking for dn_expand in -lresolv" >&5 +echo "configure:11428: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11429,7 +11432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11447: \"$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 @@ -11484,7 +11487,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11488: checking whether to use Kerberos 5" >&5 +echo "configure:11491: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11512,7 +11515,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11516: checking whether to use AUTOMOUNT" >&5 +echo "configure:11519: 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" @@ -11537,7 +11540,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11541: checking whether to use SMBMOUNT" >&5 +echo "configure:11544: 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" @@ -11574,7 +11577,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11578: checking whether to use PAM password database" >&5 +echo "configure:11581: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11600,7 +11603,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11604: checking for pam_get_data in -lpam" >&5 +echo "configure:11607: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11608,7 +11611,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11626: \"$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 @@ -11646,7 +11649,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11650: checking whether to use pam_smbpass" >&5 +echo "configure:11653: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11688,12 +11691,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11692: checking for $ac_func" >&5 +echo "configure:11695: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11723: \"$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 @@ -11742,7 +11745,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:11746: checking for crypt in -lcrypt" >&5 +echo "configure:11749: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11750,7 +11753,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11768: \"$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 @@ -11796,7 +11799,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11800: checking for a crypt that needs truncated salt" >&5 +echo "configure:11803: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11805,11 +11808,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11847,7 +11850,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11851: checking whether to use TDB SAM database" >&5 +echo "configure:11854: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11873,7 +11876,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11877: checking whether to use LDAP SAM database" >&5 +echo "configure:11880: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11900,7 +11903,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11904: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11907: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11928,7 +11931,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11932: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11935: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11950,7 +11953,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11954: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11957: 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" @@ -11975,7 +11978,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:11979: checking whether to use SSL" >&5 +echo "configure:11982: 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" @@ -12049,7 +12052,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12053: checking whether to use syslog logging" >&5 +echo "configure:12056: 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" @@ -12074,7 +12077,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12078: checking whether to use profiling" >&5 +echo "configure:12081: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12102,7 +12105,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12106: checking whether to support disk-quotas" >&5 +echo "configure:12109: 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" @@ -12114,13 +12117,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12118: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12121: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12132,7 +12135,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12176,7 +12179,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12180: checking whether to support utmp accounting" >&5 +echo "configure:12183: 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" @@ -12202,7 +12205,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12206: checking whether to support Microsoft Dfs" >&5 +echo "configure:12209: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12228,7 +12231,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12232: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12235: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12257,7 +12260,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12261: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12264: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12284,14 +12287,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12288: checking how to get filesystem space usage" >&5 +echo "configure:12291: 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:12295: checking statvfs64 function (SVR4)" >&5 +echo "configure:12298: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12299,7 +12302,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12320: \"$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 @@ -12346,12 +12349,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12350: checking statvfs function (SVR4)" >&5 +echo "configure:12353: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12359,7 +12362,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12366: \"$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 @@ -12384,7 +12387,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:12388: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12391: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12392,7 +12395,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12405,7 +12408,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12412: \"$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 @@ -12432,7 +12435,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:12436: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12439: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12440,7 +12443,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12466: \"$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 @@ -12486,7 +12489,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:12490: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12493: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12494,7 +12497,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12504,7 +12507,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12511: \"$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 @@ -12531,7 +12534,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:12535: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12538: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12539,7 +12542,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12555,7 +12558,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12562: \"$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 @@ -12582,7 +12585,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:12586: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12589: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12590,7 +12593,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12610,7 +12613,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12617: \"$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 @@ -12642,10 +12645,10 @@ fi # If we don't have all of these then disable large # file support. # -echo $ac_n "checking checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12647: checking checking if large file support can be enabled" >&5 +echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 +echo "configure:12650: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12725,7 +12728,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12729: checking whether to support ACLs" >&5 +echo "configure:12732: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12778,7 +12781,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12782: checking for acl_get_file in -lacl" >&5 +echo "configure:12785: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12786,7 +12789,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12804: \"$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 @@ -12825,13 +12828,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12829: checking for ACL support" >&5 +echo "configure:12832: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12839,7 +12842,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12859,13 +12862,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12863: checking for acl_get_perm_np" >&5 +echo "configure:12866: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12873,7 +12876,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12928,7 +12931,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12932: checking whether to build winbind" >&5 +echo "configure:12935: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13007,11 +13010,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -13169,6 +13172,7 @@ s%@swatdir@%$swatdir%g s%@RUNPROG@%$RUNPROG%g s%@MPROGS@%$MPROGS%g s%@LDSHFLAGS@%$LDSHFLAGS%g +s%@SONAMEFLAG@%$SONAMEFLAG%g s%@SHLD@%$SHLD%g s%@HOST_OS@%$HOST_OS%g s%@PAM_MOD@%$PAM_MOD%g diff --git a/source/configure.in b/source/configure.in index acd8dce98f5..e7d7a4eb1a5 100644 --- a/source/configure.in +++ b/source/configure.in @@ -133,6 +133,7 @@ AC_SUBST(SHELL) AC_SUBST(RUNPROG) AC_SUBST(MPROGS) AC_SUBST(LDSHFLAGS) +AC_SUBST(SONAMEFLAG) AC_SUBST(SHLD) AC_SUBST(HOST_OS) AC_SUBST(PAM_MOD) @@ -774,6 +775,7 @@ AC_LIBTESTFUNC(sec, getprpwnam) # these are the defaults, good for lots of systems HOST_OS="$host_os" LDSHFLAGS="-shared" +SONAMEFLAG="#" SHLD="\${CC}" PICFLAG="" PICSUFFIX="po.o" @@ -788,6 +790,7 @@ case "$host_os" in BLDSHARED="true" LDSHFLAGS="-shared" PICFLAG="-fPIC" + SONAMEFLAG="-Wl,-soname=" AC_DEFINE(STAT_ST_BLOCKSIZE,512) ;; *solaris*) AC_DEFINE(SUNOS5) @@ -2442,7 +2445,7 @@ fi # If we don't have all of these then disable large # file support. # -AC_MSG_CHECKING(checking if large file support can be enabled) +AC_MSG_CHECKING(if large file support can be enabled) AC_TRY_COMPILE([ #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))) #include diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 4712ad408c7..b8120183d3e 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -53,8 +53,9 @@ time_t StartupTime = 0; extern struct in_addr ipzero; /**************************************************************************** ** - catch a sigterm + Catch a sigterm. **************************************************************************** */ + static void sig_term(int sig) { BlockSignals(True,SIGTERM); @@ -78,8 +79,9 @@ static void sig_term(int sig) } /* sig_term */ /**************************************************************************** ** - catch a sighup + Catch a sighup. **************************************************************************** */ + static VOLATILE sig_atomic_t reload_after_sighup = False; static void sig_hup(int sig) @@ -98,11 +100,11 @@ static void sig_hup(int sig) } /* sig_hup */ - #if DUMP_CORE /**************************************************************************** ** - prepare to dump a core file - carefully! + Prepare to dump a core file - carefully! **************************************************************************** */ + static BOOL dump_core(void) { char *p; @@ -138,10 +140,10 @@ static BOOL dump_core(void) } /* dump_core */ #endif - /**************************************************************************** ** - possibly continue after a fault + Possibly continue after a fault. **************************************************************************** */ + static void fault_continue(void) { #if DUMP_CORE @@ -150,8 +152,9 @@ static void fault_continue(void) } /* fault_continue */ /**************************************************************************** ** - expire old names from the namelist and server list + Expire old names from the namelist and server list. **************************************************************************** */ + static void expire_names_and_servers(time_t t) { static time_t lastrun = 0; @@ -179,10 +182,10 @@ static void expire_names_and_servers(time_t t) expire_workgroups_and_servers(t); } /* expire_names_and_servers */ - /************************************************************************** ** -reload the list of network interfaces + Reload the list of network interfaces. ************************************************************************** */ + static BOOL reload_interfaces(time_t t) { static time_t lastt; @@ -259,11 +262,10 @@ static BOOL reload_interfaces(time_t t) return False; } - - /**************************************************************************** ** - reload the services file + Reload the services file. **************************************************************************** */ + static BOOL reload_nmbd_services(BOOL test) { BOOL ret; @@ -308,6 +310,7 @@ cannot be set in the smb.conf file. nmbd aborting.\n")); /**************************************************************************** ** The main select loop. **************************************************************************** */ + static void process(void) { BOOL run_election; @@ -506,10 +509,10 @@ static void process(void) } } /* process */ - /**************************************************************************** ** - open the socket communication + Open the socket communication. **************************************************************************** */ + static BOOL open_sockets(BOOL isdaemon, int port) { /* The sockets opened here will be used to receive broadcast @@ -539,10 +542,10 @@ static BOOL open_sockets(BOOL isdaemon, int port) return( True ); } /* open_sockets */ - /**************************************************************************** ** - initialise connect, service and file structs + Initialise connect, service and file structs. **************************************************************************** */ + static BOOL init_structs(void) { extern fstring local_machine; @@ -625,8 +628,9 @@ static BOOL init_structs(void) } /* init_structs */ /**************************************************************************** ** - usage on the program + Usage on the program. **************************************************************************** */ + static void usage(char *pname) { @@ -649,8 +653,9 @@ static void usage(char *pname) /**************************************************************************** ** - main program + Main program. **************************************************************************** */ + int main(int argc,char *argv[]) { int opt; @@ -894,4 +899,3 @@ static void usage(char *pname) fclose(dbf); return(0); } /* main */ - -- cgit From 31a01faaac36df6a9ce306eca956ebabe78ed587 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 00:19:48 +0000 Subject: Always clear malloced memory for parse structs. Jeremy. --- source/rpc_parse/parse_prs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c index f902210b7b8..d14d89b39ae 100644 --- a/source/rpc_parse/parse_prs.c +++ b/source/rpc_parse/parse_prs.c @@ -87,6 +87,7 @@ BOOL prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, BOOL io) DEBUG(0,("prs_init: malloc fail for %u bytes.\n", (unsigned int)size)); return False; } + memset(ps->data_p, '\0', (size_t)size); ps->is_dynamic = True; /* We own this memory. */ } -- cgit From 29da0c1ad6d9e066df807f750819cfa1dccdaf3f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 00:35:51 +0000 Subject: Added prs_mem_clear(). Clear memory on buffer reallocation. That way we're not returning what the client gave us. Jeremy. --- source/include/proto.h | 1 + source/rpc_parse/parse_prs.c | 15 ++++++++++++--- source/rpc_parse/parse_spoolss.c | 15 +++++++-------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index e2534ca7f21..39ebc90a5a6 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2750,6 +2750,7 @@ void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name); BOOL prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, BOOL io); BOOL prs_read(prs_struct *ps, int fd, size_t len, int timeout); void prs_mem_free(prs_struct *ps); +void prs_mem_clear(prs_struct *ps); char *prs_alloc_mem(prs_struct *ps, size_t size); TALLOC_CTX *prs_get_mem_context(prs_struct *ps); void prs_give_memory(prs_struct *ps, char *buf, uint32 size, BOOL is_dynamic); diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c index d14d89b39ae..b11dc7394da 100644 --- a/source/rpc_parse/parse_prs.c +++ b/source/rpc_parse/parse_prs.c @@ -126,6 +126,15 @@ void prs_mem_free(prs_struct *ps) ps->data_offset = 0; } +/******************************************************************* + Clear the memory in a parse structure. + ********************************************************************/ + +void prs_mem_clear(prs_struct *ps) +{ + memset(ps->data_p, '\0', (size_t)ps->buffer_size); +} + /******************************************************************* Allocate memory when unmarshalling... Always zero clears. ********************************************************************/ @@ -242,7 +251,7 @@ BOOL prs_grow(prs_struct *ps, uint32 extra_space) DEBUG(0,("prs_grow: Malloc failure for size %u.\n", (unsigned int)new_size)); return False; } - memset(new_data, '\0', new_size ); + memset(new_data, '\0', (size_t)new_size ); } else { /* * If the current buffer size is bigger than the space needed, just @@ -256,7 +265,7 @@ BOOL prs_grow(prs_struct *ps, uint32 extra_space) return False; } - memset(&new_data[ps->buffer_size], '\0', new_size - ps->buffer_size); + memset(&new_data[ps->buffer_size], '\0', (size_t)(new_size - ps->buffer_size)); } ps->buffer_size = new_size; ps->data_p = new_data; @@ -287,7 +296,7 @@ BOOL prs_force_grow(prs_struct *ps, uint32 extra_space) return False; } - memset(&new_data[ps->buffer_size], '\0', new_size - ps->buffer_size); + memset(&new_data[ps->buffer_size], '\0', (size_t)(new_size - ps->buffer_size)); ps->buffer_size = new_size; ps->data_p = new_data; diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index d139215bd4c..7bee9263716 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -764,6 +764,7 @@ BOOL make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u, /******************************************************************* * init a structure. ********************************************************************/ + BOOL make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u, @@ -784,12 +785,10 @@ BOOL make_spoolss_q_addprinterex( q_u->info.level = level; q_u->info.info_ptr = (ctr->printers_2!=NULL)?1:0; - switch (level) - { + switch (level) { case 2: /* init q_u->info.info2 from *info */ - if (!make_spoolss_printer_info_2(mem_ctx, &q_u->info.info_2, ctr->printers_2)) - { + if (!make_spoolss_printer_info_2(mem_ctx, &q_u->info.info_2, ctr->printers_2)) { DEBUG(0,("make_spoolss_q_addprinterex: Unable to fill SPOOL_Q_ADDPRINTEREX struct!\n")); return False; } @@ -832,8 +831,7 @@ BOOL make_spoolss_printer_info_2( SPOOL_PRINTER_INFO_LEVEL_2 *inf; /* allocate the necessary memory */ - if (!(inf=(SPOOL_PRINTER_INFO_LEVEL_2*)talloc(mem_ctx, sizeof(SPOOL_PRINTER_INFO_LEVEL_2)))) - { + if (!(inf=(SPOOL_PRINTER_INFO_LEVEL_2*)talloc(mem_ctx, sizeof(SPOOL_PRINTER_INFO_LEVEL_2)))) { DEBUG(0,("make_spoolss_printer_info_2: Unable to allocate SPOOL_PRINTER_INFO_LEVEL_2 sruct!\n")); return False; } @@ -2721,6 +2719,7 @@ static BOOL spoolss_io_buffer(char *desc, prs_struct *ps, int depth, NEW_BUFFER move a BUFFER from the query to the reply. As the data pointers in NEW_BUFFER are malloc'ed, not talloc'ed, this is ok. This is an OPTIMIZATION and is not strictly neccessary. + Clears the memory to zero also. ********************************************************************/ void spoolss_move_buffer(NEW_BUFFER *src, NEW_BUFFER **dest) @@ -2728,8 +2727,8 @@ void spoolss_move_buffer(NEW_BUFFER *src, NEW_BUFFER **dest) prs_switch_type(&src->prs, MARSHALL); if(!prs_set_offset(&src->prs, 0)) return; - prs_force_dynamic(&(src->prs)); - + prs_force_dynamic(&src->prs); + prs_mem_clear(&src->prs); *dest=src; } -- cgit From b213dba3fa156e01e5ed4d0272dc874f365490ff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 00:38:15 +0000 Subject: Fixup for type from Steve Langasek Jeremy. --- source/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 8d984da57fc..7e8820f6ac8 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -618,7 +618,7 @@ libsmbclient: $(LIBSMBCLIENT_PICOBJS) @echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@ @$(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ \ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ - @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR).$(LIBSMBCLIENT_MINOR) + @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR) @echo Linking libsmbclient non-shared library bin/$@.a @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) -- cgit From 3b72facbb6c534e6880d220502b31edc4003acc6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 02:09:26 +0000 Subject: Added unix extensions entry. Updated smbclient man page with unix extension commands. Fix for BROWSING.txt. Jeremy. --- docs/docbook/manpages/smb.conf.5.sgml | 17 +++++++ docs/docbook/manpages/smbclient.1.sgml | 83 ++++++++++++++++++++++++++++++---- docs/textdocs/BROWSING.txt | 17 ++++--- 3 files changed, 101 insertions(+), 16 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 1a61d7e5a45..0e60d372ebc 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -747,6 +747,7 @@ time server timestamp logs total print jobs + unix extensions unix password sync update encrypted use mmap @@ -7504,6 +7505,22 @@ + + unix extensions(G) + This boolean parameter controls whether Samba + implments the CIFS UNIX extensions, as defined by HP. These + extensions enable CIFS to server UNIX clients to UNIX servers + better, and allow such things as symbolic links, hard links etc. + These extensions require a similarly enabled client, and are of + no current use to Windows clients. + + Default: unix extensions = no + + + + + + unix password sync (G) This boolean parameter controls whether Samba diff --git a/docs/docbook/manpages/smbclient.1.sgml b/docs/docbook/manpages/smbclient.1.sgml index 4f36de15767..0d38063c63f 100644 --- a/docs/docbook/manpages/smbclient.1.sgml +++ b/docs/docbook/manpages/smbclient.1.sgml @@ -634,6 +634,44 @@ domain = <value> + + altname file + The client will request that the server return + the "alternate" name (the 8.3 name) for a file or directory. + + + + + + cancel jobid0 [jobid1] ... [jobidN] + The client will request that the server cancel + the printjobs identified by the given numeric print job ids. + + + + + + + chmod file mode in octal + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + change the UNIX permissions to the given octal mode, in standard UNIX format. + + + + + + + chown file uid gid + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + change the UNIX user and group ownership to the given decimal values. Note there is + currently no way to remotely look up the UNIX uid and gid values for a given name. + This may be addressed in future versions of the CIFS UNIX extensions. + + + + cd [directory name] @@ -700,6 +738,17 @@ domain = <value> + + link source destination + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + create a hard link between the source and destination files. The source file + must not exist. + + + + + lowercase Toggle lowercasing of filenames for the get and @@ -877,6 +926,30 @@ domain = <value> + + setmode <filename> <perm=[+|\-]rsha> + A version of the DOS attrib command to set + file permissions. For example: + + setmode myfile +r + + would make myfile read only. + + + + + + symlink source destination + This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + create a symbolic hard link between the source and destination files. The source file + must not exist. Note that the server will not create a link to any path that lies + outside the currently connected share. This is enforced by the Samba server. + + + + + tar <c|x>[IXbgNa] Performs a tar operation - see the -T @@ -907,16 +980,6 @@ domain = <value> - - setmode <filename> <perm=[+|\-]rsha> - A version of the DOS attrib command to set - file permissions. For example: - - setmode myfile +r - - would make myfile read only. - - diff --git a/docs/textdocs/BROWSING.txt b/docs/textdocs/BROWSING.txt index f041a0c3986..af57e4d5c39 100644 --- a/docs/textdocs/BROWSING.txt +++ b/docs/textdocs/BROWSING.txt @@ -10,10 +10,14 @@ Summary: This describes how to configure Samba for improved browsing. OVERVIEW: ========= + SMB networking provides a mechanism by which clients can access a list -of machines that are available within the network. This list is called -the browse list and is heavily used by all SMB clients. Configuration -of SMB browsing has been problematic for some Samba users, hence this +of machines in a network, a so-called "browse list". This list +contains machines that are ready to offer file and/or print services +to other machines within the network. Thus it does not include +machines which aren't currently able to do server tasks. The browse +list is heavily used by all SMB clients. Configuration of SMB +browsing has been problematic for some Samba users, hence this document. Browsing will NOT work if name resolution from NetBIOS names to IP @@ -62,9 +66,10 @@ browsing on another subnet. It is recommended that this option is only used for 'unusual' purposes: announcements over the internet, for example. See "remote announce" in the smb.conf man page. -If something doesn't work then hopefully the log.nmb file will -help you track down the problem. Try a debug level of 2 or 3 for -finding problems. +If something doesn't work then hopefully the log.nmb file will help +you track down the problem. Try a debug level of 2 or 3 for finding +problems. Also note that the current browse list usually gets stored +in text form in a file called browse.dat. Note that if it doesn't work for you, then you should still be able to type the server name as \\SERVER in filemanager then hit enter and -- cgit From 4e0912c614e319a3e5d7980226e8f2dc5003c8a9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 02:11:27 +0000 Subject: Allow for winbind separator in connects. Patch from Alexander Bokovoy . Jeremy. --- source/libsmb/cliconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index e0a1dfa598f..16da673e73c 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -330,7 +330,7 @@ BOOL cli_session_setup(struct cli_state *cli, /* allow for workgroups as part of the username */ fstrcpy(user2, user); - if ((p=strchr(user2,'\\')) || (p=strchr(user2,'/'))) { + if ((p=strchr(user2,'\\')) || (p=strchr(user2,'/')) || (p=strchr(user2,*lp_winbind_separator())) ) { *p = 0; user = p+1; workgroup = user2; -- cgit From 246d7c231f98b2f157583a85c96301bbe0f63cb6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 02:15:07 +0000 Subject: Ensure we log tdb open fails. Patch from Alexander Bokovoy Jeremy. --- source/tdb/tdbutil.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index ac3c5336f12..87dabf165d4 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -489,13 +489,11 @@ TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags, if (!lp_use_mmap()) tdb_flags |= TDB_NOMMAP; - tdb = tdb_open(name, hash_size, tdb_flags, - open_flags, mode); + tdb = tdb_open_ex(name, hash_size, tdb_flags, + open_flags, mode, tdb_log); if (!tdb) return NULL; - tdb_logging_function(tdb, tdb_log); - return tdb; } -- cgit From 8a2d9e11f497596fe2529cbfdf6a5dbf523b47f2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 02:30:33 +0000 Subject: Tidyup & code refactoring from Martin.Sheppard@csiro.au. Jeremy. --- source/nmbd/nmbd_serverlistdb.c | 57 ++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/source/nmbd/nmbd_serverlistdb.c b/source/nmbd/nmbd_serverlistdb.c index badb4383201..e4bce464a31 100644 --- a/source/nmbd/nmbd_serverlistdb.c +++ b/source/nmbd/nmbd_serverlistdb.c @@ -296,6 +296,19 @@ static uint32 write_this_workgroup_name( struct subnet_record *subrec, Write out the browse.dat file. ******************************************************************/ +void write_browse_list_entry(FILE *fp, fstring name, uint32 rec_type, + fstring local_master_browser_name, fstring description) +{ + fstring tmp; + + slprintf(tmp,sizeof(tmp)-1, "\"%s\"", name); + fprintf(fp, "%-25s ", tmp); + fprintf(fp, "%08x ", rec_type); + slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", local_master_browser_name); + fprintf(fp, "%-30s", tmp); + fprintf(fp, "\"%s\"\n", description); +} + void write_browse_list(time_t t, BOOL force_write) { struct subnet_record *subrec; @@ -303,7 +316,6 @@ void write_browse_list(time_t t, BOOL force_write) struct server_record *servrec; pstring fname,fnamenew; uint32 stype; - fstring tmp; int i; FILE *fp; BOOL list_changed = force_write; @@ -365,12 +377,8 @@ void write_browse_list(time_t t, BOOL force_write) return; } - slprintf(tmp,sizeof(tmp)-1, "\"%s\"", work->work_group); - fprintf(fp, "%-25s ", tmp); - fprintf(fp, "%08x ", SV_TYPE_DOMAIN_ENUM|SV_TYPE_NT|SV_TYPE_LOCAL_LIST_ONLY); - slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", work->local_master_browser_name); - fprintf(fp, "%-30s", tmp); - fprintf(fp, "\"%s\"\n", work->work_group); + write_browse_list_entry(fp, work->work_group, SV_TYPE_DOMAIN_ENUM|SV_TYPE_NT|SV_TYPE_LOCAL_LIST_ONLY, + work->local_master_browser_name, work->work_group); /* * We need to do something special for our own names. @@ -394,13 +402,10 @@ void write_browse_list(time_t t, BOOL force_write) } /* Output server details, plus what workgroup they're in. */ - slprintf(tmp, sizeof(tmp)-1, "\"%s\"", my_netbios_names[i]); - fprintf(fp, "%-25s ", tmp); - fprintf(fp, "%08x ", stype); - slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", - string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH)); - fprintf(fp, "%-30s", tmp); - fprintf(fp, "\"%s\"\n", global_myworkgroup); + write_browse_list_entry(fp, my_netbios_names[i], stype, + string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH), + global_myworkgroup); + } for (subrec = FIRST_SUBNET; subrec ; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) @@ -413,15 +418,9 @@ void write_browse_list(time_t t, BOOL force_write) uint32 wg_type = write_this_workgroup_name( subrec, work); if(wg_type) - { - slprintf(tmp, sizeof(tmp)-1, "\"%s\"", work->work_group); - fprintf(fp, "%-25s ", tmp); - - fprintf(fp, "%08x ", wg_type); - slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", work->local_master_browser_name); - fprintf(fp, "%-30s", tmp); - fprintf(fp, "\"%s\"\n", work->work_group); - } + write_browse_list_entry(fp, work->work_group, wg_type, + work->local_master_browser_name, + work->work_group); /* Now write out any server records a workgroup may have. */ @@ -435,16 +434,10 @@ void write_browse_list(time_t t, BOOL force_write) serv_type = write_this_server_name(subrec, work, servrec); + /* Output server details, plus what workgroup they're in. */ if(serv_type) - { - /* Output server details, plus what workgroup they're in. */ - slprintf(tmp, sizeof(tmp)-1, "\"%s\"", servrec->serv.name); - fprintf(fp, "%-25s ", tmp); - fprintf(fp, "%08x ", serv_type); - slprintf(tmp, sizeof(tmp)-1, "\"%s\" ", servrec->serv.comment); - fprintf(fp, "%-30s", tmp); - fprintf(fp, "\"%s\"\n", work->work_group); - } + write_browse_list_entry(fp, servrec->serv.name, serv_type, + servrec->serv.comment, work->work_group); } } } -- cgit From 9bb9aa81b6176657b9afb5c40d3725c4aee73a01 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 03:08:50 +0000 Subject: If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net Jeremy. --- source/lib/access.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/lib/access.c b/source/lib/access.c index 73d3344e8c8..d61915f0b24 100644 --- a/source/lib/access.c +++ b/source/lib/access.c @@ -201,8 +201,14 @@ BOOL allow_access(char *deny_list,char *allow_list, /* if it is loopback then always allow unless specifically denied */ if (strcmp(caddr, "127.0.0.1") == 0) { + /* + * If 127.0.0.1 matches both allow and deny then allow. + * Patch from Steve Langasek vorlon@netexpress.net. + */ if (deny_list && - list_match(deny_list,(char *)client,client_match)) { + list_match(deny_list,(char *)client,client_match) && + (!allow_list || + !list_match(allow_list,(char *)client, client_match))) { return False; } return True; -- cgit From 09fb24024b70e240afcc7d5eb93315a499729ae8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 03:09:07 +0000 Subject: status is a uint32, not WERROR in this case. Jeremy. --- source/include/nt_printing.h | 2 +- source/include/rpc_spoolss.h | 2 +- source/printing/nt_printing.c | 2 +- source/rpc_parse/parse_spoolss.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/include/nt_printing.h b/source/include/nt_printing.h index 61abc1a31bc..4c9265f09fa 100644 --- a/source/include/nt_printing.h +++ b/source/include/nt_printing.h @@ -231,7 +231,7 @@ typedef struct nt_printer_info_level_2 uint32 default_priority; uint32 starttime; uint32 untiltime; - WERROR status; + uint32 status; uint32 cjobs; uint32 averageppm; fstring servername; diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index a37a3e1a4da..102dcea671d 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1333,7 +1333,7 @@ typedef struct spool_printer_info_level_2 uint32 default_priority; uint32 starttime; uint32 untiltime; - WERROR status; + uint32 status; uint32 cjobs; uint32 averageppm; UNISTR2 servername; diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index b56bb0cc9e0..a1d696b63e6 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2633,7 +2633,7 @@ static uint32 dump_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) DEBUGADD(106,("default_priority:[%d]\n", info2->default_priority)); DEBUGADD(106,("starttime:[%d]\n", info2->starttime)); DEBUGADD(106,("untiltime:[%d]\n", info2->untiltime)); - DEBUGADD(106,("status:[%s]\n", werror_str(info2->status))); + DEBUGADD(106,("status:[%d]\n", info2->status)); DEBUGADD(106,("cjobs:[%d]\n", info2->cjobs)); DEBUGADD(106,("averageppm:[%d]\n", info2->averageppm)); DEBUGADD(106,("changeid:[%d]\n", info2->changeid)); diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 7bee9263716..d00b75bd958 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -4406,7 +4406,7 @@ BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, p return False; if(!prs_uint32("untiltime", ps, depth, &il->untiltime)) return False; - if(!prs_werror("status", ps, depth, &il->status)) + if(!prs_uint32("status", ps, depth, &il->status)) return False; if(!prs_uint32("cjobs", ps, depth, &il->cjobs)) return False; -- cgit From fcf0a2b07b7dbe2e73710fff0830e6726ea19aff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Jan 2002 03:26:55 +0000 Subject: Ensure (C) message is output on startup. Jeremy. --- source/nmbd/nmbd.c | 4 ++-- source/smbd/server.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index b8120183d3e..fa4e1c4cfd9 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -780,8 +780,8 @@ static void usage(char *pname) setup_logging( argv[0], opt_interactive ); reopen_logs(); - DEBUG( 1, ( "Netbios nameserver version %s started.\n", VERSION ) ); - DEBUGADD( 1, ( "Copyright Andrew Tridgell 1994-2002\n" ) ); + DEBUG( 0, ( "Netbios nameserver version %s started.\n", VERSION ) ); + DEBUGADD( 0, ( "Copyright Andrew Tridgell and the Samba Team 1994-2002\n" ) ); if ( !reload_nmbd_services(False) ) return(-1); diff --git a/source/smbd/server.c b/source/smbd/server.c index 0bd27cd5be1..9679af3b4b5 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -695,8 +695,8 @@ static void usage(char *pname) reopen_logs(); - DEBUG(1,( "smbd version %s started.\n", VERSION)); - DEBUGADD(1,( "Copyright Andrew Tridgell 1992-2002\n")); + DEBUG(0,( "smbd version %s started.\n", VERSION)); + DEBUGADD(0,( "Copyright Andrew Tridgell and the Samba Team 1992-2002\n")); DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n", (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid())); -- cgit From 6431e54df0161707b6b46c8c6f701e21df95f1de Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 19 Jan 2002 17:22:28 +0000 Subject: fixes to check asprintf return thanks to Andreas Moroder for spotting them --- source/client/client.c | 8 ++++---- source/lib/snprintf.c | 1 + source/libsmb/domain_client_validate.c | 23 +++++++++++++---------- source/nsswitch/winbindd_cm.c | 10 ++++++---- source/rpcclient/cmd_spoolss.c | 10 +++++++--- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index bd8a52226ad..adaf7ddf629 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -1306,7 +1306,7 @@ static void cmd_mput(void) /* if (!recurse) continue; */ SAFE_FREE(quest); - asprintf(&quest, "Put directory %s? ", lname); + if (asprintf(&quest, "Put directory %s? ", lname) < 0) break; if (prompt && !yesno(quest)) { /* No */ /* Skip the directory */ lname[strlen(lname)-1] = '/'; @@ -1314,7 +1314,7 @@ static void cmd_mput(void) break; } else { /* Yes */ SAFE_FREE(rname); - asprintf(&rname, "%s%s", cur_dir, lname); + if (asprintf(&rname, "%s%s", cur_dir, lname) < 0) break; dos_format(rname); if (!cli_chkpath(cli, rname) && !do_mkdir(rname)) { @@ -1328,13 +1328,13 @@ static void cmd_mput(void) continue; } else { SAFE_FREE(quest); - asprintf(&quest,"Put file %s? ", lname); + if (asprintf(&quest,"Put file %s? ", lname) < 0) break; if (prompt && !yesno(quest)) /* No */ continue; /* Yes */ SAFE_FREE(rname); - asprintf(&rname, "%s%s", cur_dir, lname); + if (asprintf(&rname, "%s%s", cur_dir, lname) < 0) break; } dos_format(rname); diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c index 6f6d0f09830..0b0bdb0b335 100644 --- a/source/lib/snprintf.c +++ b/source/lib/snprintf.c @@ -808,6 +808,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) va_list ap; int ret; + *ptr = NULL; va_start(ap, format); ret = vasprintf(ptr, format, ap); va_end(ap); diff --git a/source/libsmb/domain_client_validate.c b/source/libsmb/domain_client_validate.c index 995d3d1c2a1..04ce90895ae 100644 --- a/source/libsmb/domain_client_validate.c +++ b/source/libsmb/domain_client_validate.c @@ -345,22 +345,25 @@ NTSTATUS domain_client_validate(const auth_usersupplied_info *user_info, /* Check DOMAIN\username first to catch winbind users, then just the username for local users. */ - asprintf(&dom_user, "%s%s%s", user_info->domain.str, + if (asprintf(&dom_user, "%s%s%s", user_info->domain.str, lp_winbind_separator(), - user_info->internal_username.str); + user_info->internal_username.str) > 0) { - if (!(pass = Get_Pwnam(dom_user))) - pass = Get_Pwnam(user_info->internal_username.str); + if (!(pass = Get_Pwnam(dom_user))) + pass = Get_Pwnam(user_info->internal_username.str); - SAFE_FREE(dom_user); + SAFE_FREE(dom_user); - if (pass) { - make_server_info_pw(server_info, pass); - if (!server_info) { - status = NT_STATUS_NO_MEMORY; + if (pass) { + make_server_info_pw(server_info, pass); + if (!server_info) { + status = NT_STATUS_NO_MEMORY; + } + } else { + status = NT_STATUS_NO_SUCH_USER; } } else { - status = NT_STATUS_NO_SUCH_USER; + status = NT_STATUS_NO_MEMORY; } } diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 4c1554faf87..af03826ad07 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -713,10 +713,12 @@ static void dump_conn_list(void) /* Display pipe info */ - asprintf(&msg, "\t%-15s %-15s %-16s", con->domain, con->controller, con->pipe_name); - - DEBUG(0, ("%s\n", msg)); - SAFE_FREE(msg); + if (asprintf(&msg, "\t%-15s %-15s %-16s", con->domain, con->controller, con->pipe_name) < 0) { + DEBUG(0, ("Error: not enough memory!\n")); + } else { + DEBUG(0, ("%s\n", msg)); + SAFE_FREE(msg); + } } } diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index e401a6911a9..b3bffde2ba0 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/rpcclient/cmd_spoolss.c @@ -1229,11 +1229,15 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, return NT_STATUS_OK; } - asprintf(&servername, "\\\\%s", cli->desthost); + if (asprintf(&servername, "\\\\%s", cli->desthost) < 0) + return NT_STATUS_NO_MEMORY; strupper(servername); - asprintf(&environment, "%s", (argc == 3) ? argv[2] : - PRINTER_DRIVER_ARCHITECTURE); + if (asprintf(&environment, "%s", (argc == 3) ? argv[2] : + PRINTER_DRIVER_ARCHITECTURE) < 0) { + SAFE_FREE(servername); + return NT_STATUS_NO_MEMORY; + } result = cli_spoolss_getprintprocessordirectory( cli, mem_ctx, servername, environment, procdir); -- cgit From e59755b36c48d41b85212adc4b19ae29e1596d55 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 20:16:40 +0000 Subject: Added close call to winbindd idmap. Pointed out by Alexander Bokovoy. Jeremy. --- source/nsswitch/winbindd.c | 3 +++ source/nsswitch/winbindd_idmap.c | 7 +++++++ source/nsswitch/winbindd_proto.h | 1 + 3 files changed, 11 insertions(+) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index d0343e744ee..0212c87f905 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -157,6 +157,9 @@ static void terminate(void) { pstring path; + /* Close idmap. */ + winbindd_idmap_close(); + /* Remove socket file */ snprintf(path, sizeof(path), "%s/%s", WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME); diff --git a/source/nsswitch/winbindd_idmap.c b/source/nsswitch/winbindd_idmap.c index a96111a6084..06d442c5655 100644 --- a/source/nsswitch/winbindd_idmap.c +++ b/source/nsswitch/winbindd_idmap.c @@ -240,6 +240,13 @@ BOOL winbindd_idmap_init(void) return True; } +BOOL winbindd_idmap_close(void) +{ + if (idmap_tdb) + return (tdb_close(idmap_tdb) == 0); + return True; +} + /* Dump status information to log file. Display different stuff based on the debug level: diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h index 88d7d868918..37448bd1987 100644 --- a/source/nsswitch/winbindd_proto.h +++ b/source/nsswitch/winbindd_proto.h @@ -91,6 +91,7 @@ BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, struct winbindd_domain **domain); BOOL winbindd_idmap_init(void); +BOOL winbindd_idmap_close(void); void winbindd_idmap_status(void); /*The following definitions come from nsswitch/winbindd_misc.c */ -- cgit From 290a4616d0c418000a8c7d3290778b47c76c844b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 20:20:36 +0000 Subject: Fix for CP1251 encoding on unix side. Supports Bulgarian, Belarussian, and variants of Russian and Ukrainian locales. Patch from Alexander Bokovoy. Jeremy. --- source/codepages/CP1251.TXT | 274 ++++++ source/include/proto.h | 1980 ++++++++++++++++++++++--------------------- source/lib/charcnv.c | 25 + 3 files changed, 1290 insertions(+), 989 deletions(-) create mode 100644 source/codepages/CP1251.TXT diff --git a/source/codepages/CP1251.TXT b/source/codepages/CP1251.TXT new file mode 100644 index 00000000000..f6876e6d639 --- /dev/null +++ b/source/codepages/CP1251.TXT @@ -0,0 +1,274 @@ +# +# Name: cp1251 to Unicode table +# Unicode version: 2.0 +# Table version: 2.01 +# Table format: Format A +# Date: 04/15/98 +# +# Contact: cpxlate@microsoft.com +# +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp1251 code (in hex) +# Column #2 is the Unicode (in hex as 0xXXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp1251 order +# +0x00 0x0000 #NULL +0x01 0x0001 #START OF HEADING +0x02 0x0002 #START OF TEXT +0x03 0x0003 #END OF TEXT +0x04 0x0004 #END OF TRANSMISSION +0x05 0x0005 #ENQUIRY +0x06 0x0006 #ACKNOWLEDGE +0x07 0x0007 #BELL +0x08 0x0008 #BACKSPACE +0x09 0x0009 #HORIZONTAL TABULATION +0x0A 0x000A #LINE FEED +0x0B 0x000B #VERTICAL TABULATION +0x0C 0x000C #FORM FEED +0x0D 0x000D #CARRIAGE RETURN +0x0E 0x000E #SHIFT OUT +0x0F 0x000F #SHIFT IN +0x10 0x0010 #DATA LINK ESCAPE +0x11 0x0011 #DEVICE CONTROL ONE +0x12 0x0012 #DEVICE CONTROL TWO +0x13 0x0013 #DEVICE CONTROL THREE +0x14 0x0014 #DEVICE CONTROL FOUR +0x15 0x0015 #NEGATIVE ACKNOWLEDGE +0x16 0x0016 #SYNCHRONOUS IDLE +0x17 0x0017 #END OF TRANSMISSION BLOCK +0x18 0x0018 #CANCEL +0x19 0x0019 #END OF MEDIUM +0x1A 0x001A #SUBSTITUTE +0x1B 0x001B #ESCAPE +0x1C 0x001C #FILE SEPARATOR +0x1D 0x001D #GROUP SEPARATOR +0x1E 0x001E #RECORD SEPARATOR +0x1F 0x001F #UNIT SEPARATOR +0x20 0x0020 #SPACE +0x21 0x0021 #EXCLAMATION MARK +0x22 0x0022 #QUOTATION MARK +0x23 0x0023 #NUMBER SIGN +0x24 0x0024 #DOLLAR SIGN +0x25 0x0025 #PERCENT SIGN +0x26 0x0026 #AMPERSAND +0x27 0x0027 #APOSTROPHE +0x28 0x0028 #LEFT PARENTHESIS +0x29 0x0029 #RIGHT PARENTHESIS +0x2A 0x002A #ASTERISK +0x2B 0x002B #PLUS SIGN +0x2C 0x002C #COMMA +0x2D 0x002D #HYPHEN-MINUS +0x2E 0x002E #FULL STOP +0x2F 0x002F #SOLIDUS +0x30 0x0030 #DIGIT ZERO +0x31 0x0031 #DIGIT ONE +0x32 0x0032 #DIGIT TWO +0x33 0x0033 #DIGIT THREE +0x34 0x0034 #DIGIT FOUR +0x35 0x0035 #DIGIT FIVE +0x36 0x0036 #DIGIT SIX +0x37 0x0037 #DIGIT SEVEN +0x38 0x0038 #DIGIT EIGHT +0x39 0x0039 #DIGIT NINE +0x3A 0x003A #COLON +0x3B 0x003B #SEMICOLON +0x3C 0x003C #LESS-THAN SIGN +0x3D 0x003D #EQUALS SIGN +0x3E 0x003E #GREATER-THAN SIGN +0x3F 0x003F #QUESTION MARK +0x40 0x0040 #COMMERCIAL AT +0x41 0x0041 #LATIN CAPITAL LETTER A +0x42 0x0042 #LATIN CAPITAL LETTER B +0x43 0x0043 #LATIN CAPITAL LETTER C +0x44 0x0044 #LATIN CAPITAL LETTER D +0x45 0x0045 #LATIN CAPITAL LETTER E +0x46 0x0046 #LATIN CAPITAL LETTER F +0x47 0x0047 #LATIN CAPITAL LETTER G +0x48 0x0048 #LATIN CAPITAL LETTER H +0x49 0x0049 #LATIN CAPITAL LETTER I +0x4A 0x004A #LATIN CAPITAL LETTER J +0x4B 0x004B #LATIN CAPITAL LETTER K +0x4C 0x004C #LATIN CAPITAL LETTER L +0x4D 0x004D #LATIN CAPITAL LETTER M +0x4E 0x004E #LATIN CAPITAL LETTER N +0x4F 0x004F #LATIN CAPITAL LETTER O +0x50 0x0050 #LATIN CAPITAL LETTER P +0x51 0x0051 #LATIN CAPITAL LETTER Q +0x52 0x0052 #LATIN CAPITAL LETTER R +0x53 0x0053 #LATIN CAPITAL LETTER S +0x54 0x0054 #LATIN CAPITAL LETTER T +0x55 0x0055 #LATIN CAPITAL LETTER U +0x56 0x0056 #LATIN CAPITAL LETTER V +0x57 0x0057 #LATIN CAPITAL LETTER W +0x58 0x0058 #LATIN CAPITAL LETTER X +0x59 0x0059 #LATIN CAPITAL LETTER Y +0x5A 0x005A #LATIN CAPITAL LETTER Z +0x5B 0x005B #LEFT SQUARE BRACKET +0x5C 0x005C #REVERSE SOLIDUS +0x5D 0x005D #RIGHT SQUARE BRACKET +0x5E 0x005E #CIRCUMFLEX ACCENT +0x5F 0x005F #LOW LINE +0x60 0x0060 #GRAVE ACCENT +0x61 0x0061 #LATIN SMALL LETTER A +0x62 0x0062 #LATIN SMALL LETTER B +0x63 0x0063 #LATIN SMALL LETTER C +0x64 0x0064 #LATIN SMALL LETTER D +0x65 0x0065 #LATIN SMALL LETTER E +0x66 0x0066 #LATIN SMALL LETTER F +0x67 0x0067 #LATIN SMALL LETTER G +0x68 0x0068 #LATIN SMALL LETTER H +0x69 0x0069 #LATIN SMALL LETTER I +0x6A 0x006A #LATIN SMALL LETTER J +0x6B 0x006B #LATIN SMALL LETTER K +0x6C 0x006C #LATIN SMALL LETTER L +0x6D 0x006D #LATIN SMALL LETTER M +0x6E 0x006E #LATIN SMALL LETTER N +0x6F 0x006F #LATIN SMALL LETTER O +0x70 0x0070 #LATIN SMALL LETTER P +0x71 0x0071 #LATIN SMALL LETTER Q +0x72 0x0072 #LATIN SMALL LETTER R +0x73 0x0073 #LATIN SMALL LETTER S +0x74 0x0074 #LATIN SMALL LETTER T +0x75 0x0075 #LATIN SMALL LETTER U +0x76 0x0076 #LATIN SMALL LETTER V +0x77 0x0077 #LATIN SMALL LETTER W +0x78 0x0078 #LATIN SMALL LETTER X +0x79 0x0079 #LATIN SMALL LETTER Y +0x7A 0x007A #LATIN SMALL LETTER Z +0x7B 0x007B #LEFT CURLY BRACKET +0x7C 0x007C #VERTICAL LINE +0x7D 0x007D #RIGHT CURLY BRACKET +0x7E 0x007E #TILDE +0x7F 0x007F #DELETE +0x80 0x0402 #CYRILLIC CAPITAL LETTER DJE +0x81 0x0403 #CYRILLIC CAPITAL LETTER GJE +0x82 0x201A #SINGLE LOW-9 QUOTATION MARK +0x83 0x0453 #CYRILLIC SMALL LETTER GJE +0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK +0x85 0x2026 #HORIZONTAL ELLIPSIS +0x86 0x2020 #DAGGER +0x87 0x2021 #DOUBLE DAGGER +0x88 0x20AC #EURO SIGN +0x89 0x2030 #PER MILLE SIGN +0x8A 0x0409 #CYRILLIC CAPITAL LETTER LJE +0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK +0x8C 0x040A #CYRILLIC CAPITAL LETTER NJE +0x8D 0x040C #CYRILLIC CAPITAL LETTER KJE +0x8E 0x040B #CYRILLIC CAPITAL LETTER TSHE +0x8F 0x040F #CYRILLIC CAPITAL LETTER DZHE +0x90 0x0452 #CYRILLIC SMALL LETTER DJE +0x91 0x2018 #LEFT SINGLE QUOTATION MARK +0x92 0x2019 #RIGHT SINGLE QUOTATION MARK +0x93 0x201C #LEFT DOUBLE QUOTATION MARK +0x94 0x201D #RIGHT DOUBLE QUOTATION MARK +0x95 0x2022 #BULLET +0x96 0x2013 #EN DASH +0x97 0x2014 #EM DASH +0x98 #UNDEFINED +0x99 0x2122 #TRADE MARK SIGN +0x9A 0x0459 #CYRILLIC SMALL LETTER LJE +0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +0x9C 0x045A #CYRILLIC SMALL LETTER NJE +0x9D 0x045C #CYRILLIC SMALL LETTER KJE +0x9E 0x045B #CYRILLIC SMALL LETTER TSHE +0x9F 0x045F #CYRILLIC SMALL LETTER DZHE +0xA0 0x00A0 #NO-BREAK SPACE +0xA1 0x040E #CYRILLIC CAPITAL LETTER SHORT U +0xA2 0x045E #CYRILLIC SMALL LETTER SHORT U +0xA3 0x0408 #CYRILLIC CAPITAL LETTER JE +0xA4 0x00A4 #CURRENCY SIGN +0xA5 0x0490 #CYRILLIC CAPITAL LETTER GHE WITH UPTURN +0xA6 0x00A6 #BROKEN BAR +0xA7 0x00A7 #SECTION SIGN +0xA8 0x0401 #CYRILLIC CAPITAL LETTER IO +0xA9 0x00A9 #COPYRIGHT SIGN +0xAA 0x0404 #CYRILLIC CAPITAL LETTER UKRAINIAN IE +0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0xAC 0x00AC #NOT SIGN +0xAD 0x00AD #SOFT HYPHEN +0xAE 0x00AE #REGISTERED SIGN +0xAF 0x0407 #CYRILLIC CAPITAL LETTER YI +0xB0 0x00B0 #DEGREE SIGN +0xB1 0x00B1 #PLUS-MINUS SIGN +0xB2 0x0406 #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I +0xB3 0x0456 #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I +0xB4 0x0491 #CYRILLIC SMALL LETTER GHE WITH UPTURN +0xB5 0x00B5 #MICRO SIGN +0xB6 0x00B6 #PILCROW SIGN +0xB7 0x00B7 #MIDDLE DOT +0xB8 0x0451 #CYRILLIC SMALL LETTER IO +0xB9 0x2116 #NUMERO SIGN +0xBA 0x0454 #CYRILLIC SMALL LETTER UKRAINIAN IE +0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xBC 0x0458 #CYRILLIC SMALL LETTER JE +0xBD 0x0405 #CYRILLIC CAPITAL LETTER DZE +0xBE 0x0455 #CYRILLIC SMALL LETTER DZE +0xBF 0x0457 #CYRILLIC SMALL LETTER YI +0xC0 0x0410 #CYRILLIC CAPITAL LETTER A +0xC1 0x0411 #CYRILLIC CAPITAL LETTER BE +0xC2 0x0412 #CYRILLIC CAPITAL LETTER VE +0xC3 0x0413 #CYRILLIC CAPITAL LETTER GHE +0xC4 0x0414 #CYRILLIC CAPITAL LETTER DE +0xC5 0x0415 #CYRILLIC CAPITAL LETTER IE +0xC6 0x0416 #CYRILLIC CAPITAL LETTER ZHE +0xC7 0x0417 #CYRILLIC CAPITAL LETTER ZE +0xC8 0x0418 #CYRILLIC CAPITAL LETTER I +0xC9 0x0419 #CYRILLIC CAPITAL LETTER SHORT I +0xCA 0x041A #CYRILLIC CAPITAL LETTER KA +0xCB 0x041B #CYRILLIC CAPITAL LETTER EL +0xCC 0x041C #CYRILLIC CAPITAL LETTER EM +0xCD 0x041D #CYRILLIC CAPITAL LETTER EN +0xCE 0x041E #CYRILLIC CAPITAL LETTER O +0xCF 0x041F #CYRILLIC CAPITAL LETTER PE +0xD0 0x0420 #CYRILLIC CAPITAL LETTER ER +0xD1 0x0421 #CYRILLIC CAPITAL LETTER ES +0xD2 0x0422 #CYRILLIC CAPITAL LETTER TE +0xD3 0x0423 #CYRILLIC CAPITAL LETTER U +0xD4 0x0424 #CYRILLIC CAPITAL LETTER EF +0xD5 0x0425 #CYRILLIC CAPITAL LETTER HA +0xD6 0x0426 #CYRILLIC CAPITAL LETTER TSE +0xD7 0x0427 #CYRILLIC CAPITAL LETTER CHE +0xD8 0x0428 #CYRILLIC CAPITAL LETTER SHA +0xD9 0x0429 #CYRILLIC CAPITAL LETTER SHCHA +0xDA 0x042A #CYRILLIC CAPITAL LETTER HARD SIGN +0xDB 0x042B #CYRILLIC CAPITAL LETTER YERU +0xDC 0x042C #CYRILLIC CAPITAL LETTER SOFT SIGN +0xDD 0x042D #CYRILLIC CAPITAL LETTER E +0xDE 0x042E #CYRILLIC CAPITAL LETTER YU +0xDF 0x042F #CYRILLIC CAPITAL LETTER YA +0xE0 0x0430 #CYRILLIC SMALL LETTER A +0xE1 0x0431 #CYRILLIC SMALL LETTER BE +0xE2 0x0432 #CYRILLIC SMALL LETTER VE +0xE3 0x0433 #CYRILLIC SMALL LETTER GHE +0xE4 0x0434 #CYRILLIC SMALL LETTER DE +0xE5 0x0435 #CYRILLIC SMALL LETTER IE +0xE6 0x0436 #CYRILLIC SMALL LETTER ZHE +0xE7 0x0437 #CYRILLIC SMALL LETTER ZE +0xE8 0x0438 #CYRILLIC SMALL LETTER I +0xE9 0x0439 #CYRILLIC SMALL LETTER SHORT I +0xEA 0x043A #CYRILLIC SMALL LETTER KA +0xEB 0x043B #CYRILLIC SMALL LETTER EL +0xEC 0x043C #CYRILLIC SMALL LETTER EM +0xED 0x043D #CYRILLIC SMALL LETTER EN +0xEE 0x043E #CYRILLIC SMALL LETTER O +0xEF 0x043F #CYRILLIC SMALL LETTER PE +0xF0 0x0440 #CYRILLIC SMALL LETTER ER +0xF1 0x0441 #CYRILLIC SMALL LETTER ES +0xF2 0x0442 #CYRILLIC SMALL LETTER TE +0xF3 0x0443 #CYRILLIC SMALL LETTER U +0xF4 0x0444 #CYRILLIC SMALL LETTER EF +0xF5 0x0445 #CYRILLIC SMALL LETTER HA +0xF6 0x0446 #CYRILLIC SMALL LETTER TSE +0xF7 0x0447 #CYRILLIC SMALL LETTER CHE +0xF8 0x0448 #CYRILLIC SMALL LETTER SHA +0xF9 0x0449 #CYRILLIC SMALL LETTER SHCHA +0xFA 0x044A #CYRILLIC SMALL LETTER HARD SIGN +0xFB 0x044B #CYRILLIC SMALL LETTER YERU +0xFC 0x044C #CYRILLIC SMALL LETTER SOFT SIGN +0xFD 0x044D #CYRILLIC SMALL LETTER E +0xFE 0x044E #CYRILLIC SMALL LETTER YU +0xFF 0x044F #CYRILLIC SMALL LETTER YA diff --git a/source/include/proto.h b/source/include/proto.h index 39ebc90a5a6..28ead2085e0 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -166,29 +166,595 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from lib/smbrun.c */ + +int smbrun(char *cmd, int *outfd); + +/*The following definitions come from lib/snprintf.c */ + + +/*The following definitions come from lib/substitute.c */ + +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); + +/*The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/*The following definitions come from lib/system.c */ + +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); + +/*The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); + +/*The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/*The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/*The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/*The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL zero_ip(struct in_addr ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/*The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/*The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/*The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/*The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/*The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); + +/*The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +/*The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); + +/*The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/*The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from libsmb/cli_dfs.c */ @@ -207,86 +773,6 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 info_level, DFS_INFO_CTR *ctr); -/*The following definitions come from libsmb/clidgram.c */ - -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); - -/*The following definitions come from libsmb/clientgen.c */ - -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); - -/*The following definitions come from libsmb/clierror.c */ - -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); - -/*The following definitions come from libsmb/clifile.c */ - -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); - -/*The following definitions come from libsmb/clilist.c */ - -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); - /*The following definitions come from libsmb/cli_lsarpc.c */ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, @@ -319,14 +805,7 @@ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, uint32 *num_sids, DOM_SID **sids); -BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); - -/*The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); /*The following definitions come from libsmb/cli_netlogon.c */ @@ -354,12 +833,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); -/*The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -367,56 +840,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/*The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/*The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -495,12 +918,6 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); -/*The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -558,801 +975,384 @@ NTSTATUS cli_spoolss_getprinterdriverdir ( uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_DRIVER_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterex ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_INFO_CTR *ctr -); -NTSTATUS cli_spoolss_deleteprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *arch, - char *driver -); -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *name, - char *environment, - fstring procdir); -NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char* valname, char* value); - -/*The following definitions come from libsmb/cli_srvsvc.c */ - -struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr); - -/*The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/*The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/*The following definitions come from libsmb/credentials.c */ - -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/*The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/*The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/*The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/*The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/*The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/*The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/*The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +); +NTSTATUS cli_spoolss_addprinterdriver ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 level, + PRINTER_DRIVER_CTR *ctr +); +NTSTATUS cli_spoolss_addprinterex ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 level, + PRINTER_INFO_CTR *ctr +); +NTSTATUS cli_spoolss_deleteprinterdriver ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + char *arch, + char *driver +); +NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + char *name, + char *environment, + fstring procdir); +NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char* valname, char* value); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from libsmb/cli_srvsvc.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from libsmb/cliconnect.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from lib/snprintf.c */ +/*The following definitions come from libsmb/clidgram.c */ +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/substitute.c */ +/*The following definitions come from libsmb/clientgen.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/sysacls.c */ +/*The following definitions come from libsmb/clierror.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/system.c */ +/*The following definitions come from libsmb/clifile.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from lib/talloc.c */ +/*The following definitions come from libsmb/clilist.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from lib/time.c */ +/*The following definitions come from libsmb/climessage.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from lib/ufc.c */ +/*The following definitions come from libsmb/clioplock.c */ -char *ufc_crypt(const char *key,const char *salt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from lib/username.c */ +/*The following definitions come from libsmb/cliprint.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from lib/util.c */ +/*The following definitions come from libsmb/clirap.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL zero_ip(struct in_addr ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from lib/util_file.c */ +/*The following definitions come from libsmb/clireadwrite.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from lib/util_getent.c */ +/*The following definitions come from libsmb/clisecdesc.c */ -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/*The following definitions come from lib/util_seaccess.c */ +/*The following definitions come from libsmb/clistr.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/clitrans.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/credentials.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/errormap.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/namequery.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/*The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from lib/util_unistr.c */ +/*The following definitions come from libsmb/smbdes.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/*The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/*The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /*The following definitions come from locking/brlock.c */ @@ -1440,6 +1440,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1470,9 +1473,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -1715,6 +1715,8 @@ struct server_record *create_server_on_workgroup(struct work_record *work, int ttl,char *comment); void update_server_ttl(struct server_record *servrec, int ttl); void expire_servers(struct work_record *work, time_t t); +void write_browse_list_entry(FILE *fp, fstring name, uint32 rec_type, + fstring local_master_browser_name, fstring description); void write_browse_list(time_t t, BOOL force_write); /*The following definitions come from nmbd/nmbd_subnetdb.c */ @@ -2341,14 +2343,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ +/*The following definitions come from printing/print_generic.c */ + + +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/*The following definitions come from printing/print_generic.c */ - - /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2373,11 +2380,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2431,39 +2433,6 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4081,6 +4050,39 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4543,24 +4545,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/*The following definitions come from smbd/vfs.c */ - -BOOL vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); @@ -4604,6 +4588,24 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); +/*The following definitions come from smbd/vfs.c */ + +BOOL vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index e60962c5de8..0462668ff84 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -269,6 +269,29 @@ update_map("\360\217\361\237\362\220\363\221\364\222\365\223\366\206\367\202"); update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232"); } +/* Init for Bulgarian, Belarussian, and variants of Russian and Ukrainian locales */ +/* Patch from Alexander Bokovoy. */ + +static void init_1251(void) +{ + setupmaps(); + +/* MSDOS Code Page 866 -> 1251 */ + +update_map ("\240\377\241\366\242\367\244\375"); +update_map ("\250\360\252\362\257\364"); +update_map ("\260\370\267\372"); +update_map ("\270\361\271\374\272\363\277\365"); +update_map ("\300\200\301\201\302\202\303\203\304\204\305\205\306\206\307\207"); +update_map ("\310\210\311\211\312\212\313\213\314\214\315\215\316\216\317\217"); +update_map ("\320\220\321\221\322\222\323\223\324\224\325\225\326\226\327\227"); +update_map ("\330\230\331\231\332\232\333\233\334\234\335\235\336\236\337\237"); +update_map ("\340\240\341\241\342\242\343\243\344\244\345\245\346\246\347\247"); +update_map ("\350\250\351\251\352\252\353\253\354\254\355\255\356\256\357\257"); +update_map ("\360\340\361\341\362\342\363\343\364\344\365\345\366\346\367\347"); +update_map ("\370\350\371\351\372\352\373\353\374\354\375\355\376\356\377\357"); +} + /* Init for ROMAN-8 (HP-UX) */ @@ -359,6 +382,8 @@ void interpret_character_set(char *str, int codepage) init_iso8859_15(codepage); } else if (strequal (str, "koi8-r")) { init_koi8_r(); + } else if (strequal (str, "1251")) { + init_1251(); } else if (strequal (str, "roman8")) { init_roman8(); } else { -- cgit From f4c23973ac5d06dc4fc1fb1add0a5ccd806b4333 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 21:30:53 +0000 Subject: Report error on smb_dump write. Jeremy. --- source/smbd/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/smbd/process.c b/source/smbd/process.c index 7f600fe6799..b85c0e3686e 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -613,7 +613,9 @@ static void smb_dump(char *name, int type, char *data, ssize_t len) if (fd != -1 || errno != EEXIST) break; } if (fd != -1) { - write(fd, data, len); + ssize_t ret = write(fd, data, len); + if (ret != len) + DEBUG(0,("smb_dump: problem: write returned %d\n", (int)ret )); close(fd); DEBUG(0,("created %s len %d\n", fname, len)); } -- cgit From 54fa23773d45e6bd2dfde01cad62e3cfee2bfada Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 21:36:18 +0000 Subject: Added #ifdef for FreeBSD TCP bug. Jeremy. --- source/lib/util_sock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index c51243faa47..20f87f63602 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -666,7 +666,11 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) } if(len > 0) { +#ifdef FREEBSD_TCP_BUG + ret = read_socket_with_timeout(fd,buffer+4,len,len,10000); +#else ret = read_socket_data(fd,buffer+4,len); +#endif if (ret != len) { smb_read_error = READ_ERROR; return False; -- cgit From 3f57b0768c91d6441cdcb20bf7f4c0e3c312a76d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 22:35:18 +0000 Subject: Tidyup of macro code from andreas moroder Jeremy. --- source/include/charset.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/include/charset.h b/source/include/charset.h index 7c6fbe5509b..5a683e09683 100644 --- a/source/include/charset.h +++ b/source/include/charset.h @@ -54,11 +54,11 @@ extern void charset_initialise(void); #undef isspace #endif -#define toupper(c) (upper_char_map[(c&0xff)] & 0xff) -#define tolower(c) (lower_char_map[(c&0xff)] & 0xff) -#define isupper(c) ((c&0xff) != tolower(c&0xff)) -#define islower(c) ((c&0xff) != toupper(c&0xff)) -#define isdoschar(c) (dos_char_map[(c&0xff)] != 0) +#define toupper(c) (upper_char_map[((c)&0xff)] & 0xff) +#define tolower(c) (lower_char_map[((c)&0xff)] & 0xff) +#define isupper(c) (((c)&0xff) != tolower((c)&0xff)) +#define islower(c) (((c)&0xff) != toupper((c)&0xff)) +#define isdoschar(c) (dos_char_map[((c)&0xff)] != 0) #define isspace(c) ((c)==' ' || (c) == '\t') /* this is used to determine if a character is safe to use in -- cgit From 1918165601bfb7ad69880922e0885a93a2afaa5a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 19 Jan 2002 22:54:07 +0000 Subject: Readline has problems on non tty fd's. Use readline replacement to in cases where stdin is !isatty to allow stripts to work. Jeremy. --- source/lib/readline.c | 65 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/source/lib/readline.c b/source/lib/readline.c index c030ea276f0..dd2793df661 100644 --- a/source/lib/readline.c +++ b/source/lib/readline.c @@ -23,45 +23,58 @@ #include "includes.h" /**************************************************************************** -display the prompt and wait for input. Call callback() regularly + Display the prompt and wait for input. Call callback() regularly ****************************************************************************/ + char *smb_readline(char *prompt, void (*callback)(void), char **(completion_fn)(const char *text, int start, int end)) { char *ret; + int fd = fileno(stdin); + #if HAVE_LIBREADLINE - if (completion_fn) { - rl_attempted_completion_function = completion_fn; - } - if (callback) rl_event_hook = (Function *)callback; - ret = readline(prompt); - if (ret && *ret) add_history(ret); - return ret; -#else - fd_set fds; - extern FILE *dbf; - static pstring line; - struct timeval timeout; - int fd = fileno(stdin); + /* + * Current versions of readline on Linux seem to have + * problems with EOF on a pipe. + */ + + if (isatty(fd)) { + if (completion_fn) + rl_attempted_completion_function = completion_fn; - fprintf(dbf, "%s", prompt); - fflush(dbf); + if (callback) + rl_event_hook = (Function *)callback; + ret = readline(prompt); + if (ret && *ret) + add_history(ret); + return ret; + } else +#endif + { + fd_set fds; + extern FILE *dbf; + static pstring line; + struct timeval timeout; - while (1) { - timeout.tv_sec = 5; - timeout.tv_usec = 0; + fprintf(dbf, "%s", prompt); + fflush(dbf); - FD_ZERO(&fds); - FD_SET(fd,&fds); + while (1) { + timeout.tv_sec = 5; + timeout.tv_usec = 0; + + FD_ZERO(&fds); + FD_SET(fd,&fds); - if (sys_select_intr(fd+1,&fds,&timeout) == 1) { - ret = fgets(line, sizeof(line), stdin); - return ret; + if (sys_select_intr(fd+1,&fds,&timeout) == 1) { + ret = fgets(line, sizeof(line), stdin); + return ret; + } + if (callback) + callback(); } - if (callback) callback(); } -#endif } /**************************************************************************** -- cgit From 2c6fa24637bef157861d439ac7c58c00cfdc4ff1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 20 Jan 2002 00:03:41 +0000 Subject: Attempt to fix bugs in write cache.... Jeremy. --- source/smbd/fileio.c | 22 +++++++++++++++++++--- source/smbd/vfs.c | 2 ++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index af119020d82..71a29b19a1c 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -418,7 +418,7 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne if ( n <= wcp->alloc_size && n > wcp->data_size) { cache_flush_needed = True; } else { - DO_PROFILE_INC(writecache_direct_writes); + DO_PROFILE_INC(writecache_direct_writes); return real_write_file(fsp, data, pos, n); } @@ -551,7 +551,13 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size) void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size) { if(fsp->wcp) { - flush_write_cache(fsp, SIZECHANGE_FLUSH); + /* The cache *must* have been flushed before we do this. */ + if (fsp->wcp->data_size != 0) { + pstring msg; + slprintf(msg, sizeof(msg)-1, "set_filelen_write_cache: size change \ +on file %s with write cache size = %u\n", fsp->fsp_name, fsp->wcp->data_size ); + smb_panic(msg); + } fsp->wcp->file_size = file_size; } } @@ -564,6 +570,7 @@ ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason) { write_cache *wcp = fsp->wcp; size_t data_size; + ssize_t ret; if(!wcp || !wcp->data_size) return 0; @@ -581,7 +588,16 @@ ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason) DO_PROFILE_INC(writecache_num_perfect_writes); #endif - return real_write_file(fsp, wcp->data, wcp->offset, data_size); + ret = real_write_file(fsp, wcp->data, wcp->offset, data_size); + + /* + * Ensure file size if kept up to date if write extends file. + */ + + if ((ret != -1) && (wcp->offset + ret >= wcp->file_size)) + wcp->file_size = wcp->offset + ret; + + return ret; } /******************************************************************* diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 68eb8d77bb2..229880c9f15 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -476,6 +476,7 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len) DEBUG(10,("vfs_allocate_file_space: file %s, shrink. Current size %.0f\n", fsp->fsp_name, (double)st.st_size )); + flush_write_cache(fsp, SIZECHANGE_FLUSH); if ((ret = vfs_ops->ftruncate(fsp, fsp->fd, len)) != -1) { set_filelen_write_cache(fsp, len); } @@ -514,6 +515,7 @@ int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len) release_level_2_oplocks_on_change(fsp); DEBUG(10,("vfs_set_filelen: ftruncate %s to len %.0f\n", fsp->fsp_name, (double)len)); + flush_write_cache(fsp, SIZECHANGE_FLUSH); if ((ret = fsp->conn->vfs_ops.ftruncate(fsp, fsp->fd, len)) != -1) set_filelen_write_cache(fsp, len); -- cgit From 723d114f771775eb89f37acd4f65aca6f947fce2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 20 Jan 2002 00:43:32 +0000 Subject: Fix file size calculations for write cache code. Jeremy. --- source/smbd/fileio.c | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index 71a29b19a1c..eab44415440 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -269,6 +269,13 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", if(pos + data_used > wcp->offset + wcp->data_size) wcp->data_size = pos + data_used - wcp->offset; + /* + * Update the file size if changed. + */ + + if (wcp->offset + wcp->data_size > wcp->file_size) + wcp->file_size = wcp->offset + wcp->data_size; + /* * If we used all the data then * return here. @@ -311,6 +318,13 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", if(pos + n > wcp->offset + wcp->data_size) wcp->data_size = pos + n - wcp->offset; + /* + * Update the file size if changed. + */ + + if (wcp->offset + wcp->data_size > wcp->file_size) + wcp->file_size = wcp->offset + wcp->data_size; + /* * We don't need to move the start of data, but we * cut down the amount left by the amount used. @@ -362,10 +376,11 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", wcp->data_size = pos + data_used - wcp->offset; /* - * Update the known file length. + * Update the file size if changed. */ - wcp->file_size = wcp->offset + wcp->data_size; + if (wcp->offset + wcp->data_size > wcp->file_size) + wcp->file_size = wcp->offset + wcp->data_size; /* * If we used all the data then @@ -418,8 +433,16 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne if ( n <= wcp->alloc_size && n > wcp->data_size) { cache_flush_needed = True; } else { + ssize_t ret = real_write_file(fsp, data, pos, n); + DO_PROFILE_INC(writecache_direct_writes); - return real_write_file(fsp, data, pos, n); + if (ret == -1) + return ret; + + if (pos + ret > wcp->file_size) + wcp->file_size = pos + ret; + + return ret; } write_path = 4; @@ -445,8 +468,13 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", */ if (n > wcp->alloc_size ) { - if(real_write_file(fsp, data, pos, n) == -1) + ssize_t ret = real_write_file(fsp, data, pos, n); + if (ret == -1) return -1; + + if (pos + ret > wcp->file_size) + wcp->file_size = pos + n; + DO_PROFILE_INC(writecache_direct_writes); return total_written + n; } @@ -469,7 +497,15 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", DO_PROFILE_INC(writecache_num_write_caches); } wcp->data_size += n; + + /* + * Update the file size if changed. + */ + + if (wcp->offset + wcp->data_size > wcp->file_size) + wcp->file_size = wcp->offset + wcp->data_size; DEBUG(9,("cache return %u\n", (unsigned int)n)); + total_written += n; return total_written; /* .... that's a write :) */ } @@ -594,7 +630,7 @@ ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason) * Ensure file size if kept up to date if write extends file. */ - if ((ret != -1) && (wcp->offset + ret >= wcp->file_size)) + if ((ret != -1) && (wcp->offset + ret > wcp->file_size)) wcp->file_size = wcp->offset + ret; return ret; -- cgit From 989478c054491761473d4cf86c4ba5dd8ee99c18 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 20 Jan 2002 00:50:59 +0000 Subject: Ensure we delete the wcp pointer from the fsp. Jeremy. --- source/smbd/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index eab44415440..9f7cb5f3408 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -533,7 +533,7 @@ void delete_write_cache(files_struct *fsp) SMB_ASSERT(wcp->data_size == 0); SAFE_FREE(wcp->data); - SAFE_FREE(wcp); + SAFE_FREE(fsp->wcp); DEBUG(10,("delete_write_cache: File %s deleted write cache\n", fsp->fsp_name )); -- cgit From 2aa8f4395f40489407729cd03aaf43d2a7df38d2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 20 Jan 2002 14:42:13 +0000 Subject: change to use the SAM_ACCOUNT flags and make user existence cheks in init_sam_from_buffer as pdb_ldap do. --- source/passdb/pdb_tdb.c | 234 +++++++++++++++++++++++++----------------------- 1 file changed, 122 insertions(+), 112 deletions(-) diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index e1b982a009a..219b0ee7bd6 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -82,6 +82,10 @@ static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, uint8 *buf, uint32 bufle uint32 len = 0; uint32 lmpwlen, ntpwlen, hourslen; BOOL ret = True; + BOOL setflag; + struct passwd *pw; + uid_t uid; + gid_t gid; if(sampass == NULL || buf == NULL) { DEBUG(0, ("init_sam_from_buffer: NULL parameters found!\n")); @@ -125,6 +129,22 @@ static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, uint8 *buf, uint32 bufle goto done; } + /* validate the account and fill in UNIX uid and gid. Standard + * getpwnam() is used instead of Get_Pwnam() as we do not need + * to try case permutations + */ + if (!username || !(pw=getpwnam(username))) { + DEBUG(0,("tdb_sam: getpwnam(%s) return NULL. User does not exist!\n", + username?username:"NULL")); + ret = False; + goto done; + } + + uid = pw->pw_uid; + gid = pw->pw_gid; + pdb_set_uid(sampass, uid); + pdb_set_gid(sampass, gid); + pdb_set_logon_time(sampass, logon_time); pdb_set_logoff_time(sampass, logoff_time); pdb_set_kickoff_time(sampass, kickoff_time); @@ -136,18 +156,55 @@ static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, uint8 *buf, uint32 bufle pdb_set_domain (sampass, domain_len?domain:NULL); pdb_set_nt_username (sampass, nt_username_len?nt_username:NULL); pdb_set_fullname (sampass, fullname_len?fullname:NULL); - pdb_set_homedir (sampass, homedir_len?homedir:NULL, True); - pdb_set_dir_drive (sampass, dir_drive_len?dir_drive:NULL, True); - pdb_set_logon_script (sampass, logon_script_len?logon_script:NULL, True); - pdb_set_profile_path (sampass, profile_path_len?profile_path:NULL, True); - pdb_set_acct_desc (sampass, acct_desc_len?acct_desc:NULL); - pdb_set_workstations (sampass, workstations_len?workstations:NULL); - pdb_set_munged_dial (sampass, munged_dial_len?munged_dial:NULL); - if (!pdb_set_lanman_passwd(sampass, lmpwlen?lm_pw_ptr:NULL)) { + + if (homedir) setflag = True; + else { + setflag = False; + homedir = strdup(lp_logon_home()); + if(!homedir) { ret = False; goto done; } + standard_sub_advanced(-1, username, "", gid, homedir); + DEBUG(5,("Home directory set back to %s\n", homedir)); + } + pdb_set_homedir(sampass, homedir, setflag); + + if (dir_drive) setflag = True; + else { + setflag = False; + dir_drive = strdup(lp_logon_drive()); + if(!dir_drive) { ret = False; goto done; } + standard_sub_advanced(-1, username, "", gid, dir_drive); + DEBUG(5,("Home directory set back to %s\n", dir_drive)); + } + pdb_set_dir_drive(sampass, dir_drive, setflag); + + if (logon_script) setflag = True; + else { + setflag = False; + logon_script = strdup(lp_logon_script()); + if(!logon_script) { ret = False; goto done; } + standard_sub_advanced(-1, username, "", gid, logon_script); + DEBUG(5,("Home directory set back to %s\n", logon_script)); + } + pdb_set_logon_script(sampass, logon_script, setflag); + + if (profile_path) setflag = True; + else { + setflag = False; + profile_path = strdup(lp_logon_path()); + if(!profile_path) { ret = False; goto done; } + standard_sub_advanced(-1, username, "", gid, profile_path); + DEBUG(5,("Home directory set back to %s\n", profile_path)); + } + pdb_set_profile_path(sampass, profile_path, setflag); + + pdb_set_acct_desc (sampass, acct_desc); + pdb_set_workstations (sampass, workstations); + pdb_set_munged_dial (sampass, munged_dial); + if (!pdb_set_lanman_passwd(sampass, lm_pw_ptr)) { ret = False; goto done; } - if (!pdb_set_nt_passwd(sampass, ntpwlen?nt_pw_ptr:NULL)) { + if (!pdb_set_nt_passwd(sampass, nt_pw_ptr)) { ret = False; goto done; } @@ -220,8 +277,10 @@ static uint32 init_buffer_from_sam (uint8 **buf, SAM_ACCOUNT *sampass) uint32 nt_pw_len = 16; /* do we have a valid SAM_ACCOUNT pointer? */ - if (sampass == NULL) + if (sampass == NULL) { + DEBUG(0, ("init_buffer_from_sam: SAM_ACCOUNT is NULL!\n")); return -1; + } *buf = NULL; buflen = 0; @@ -235,71 +294,65 @@ static uint32 init_buffer_from_sam (uint8 **buf, SAM_ACCOUNT *sampass) username = pdb_get_username(sampass); - if (username) - username_len = strlen(username) +1; - else - username_len = 0; + if (username) username_len = strlen(username) +1; + else username_len = 0; + domain = pdb_get_domain(sampass); - if (domain) - domain_len = strlen(domain) +1; - else - domain_len = 0; + if (domain) domain_len = strlen(domain) +1; + else domain_len = 0; + nt_username = pdb_get_nt_username(sampass); - if (nt_username) - nt_username_len = strlen(nt_username) +1; - else - nt_username_len = 0; - dir_drive = pdb_get_dirdrive(sampass); - if (dir_drive) - dir_drive_len = strlen(dir_drive) +1; - else - dir_drive_len = 0; - unknown_str = NULL; - unknown_str_len = 0; - munged_dial = pdb_get_munged_dial(sampass); - if (munged_dial) - munged_dial_len = strlen(munged_dial) +1; - else - munged_dial_len = 0; - + if (nt_username) nt_username_len = strlen(nt_username) +1; + else nt_username_len = 0; + fullname = pdb_get_fullname(sampass); - if (fullname) - fullname_len = strlen(fullname) +1; - else - fullname_len = 0; - homedir = pdb_get_homedir(sampass); - if (homedir) - homedir_len = strlen(homedir) +1; - else - homedir_len = 0; - logon_script = pdb_get_logon_script(sampass); - if (logon_script) - logon_script_len = strlen(logon_script) +1; - else - logon_script_len = 0; - profile_path = pdb_get_profile_path(sampass); - if (profile_path) - profile_path_len = strlen(profile_path) +1; - else - profile_path_len = 0; - acct_desc = pdb_get_acct_desc(sampass); - if (acct_desc) - acct_desc_len = strlen(acct_desc) +1; - else - acct_desc_len = 0; - workstations = pdb_get_workstations(sampass); - if (workstations) - workstations_len = strlen(workstations) +1; - else - workstations_len = 0; + if (fullname) fullname_len = strlen(fullname) +1; + else fullname_len = 0; + + /* + * Only updates fields which have been set (not defaults from smb.conf) + */ + + if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) dir_drive = pdb_get_dirdrive(sampass); + else dir_drive = NULL; + if (dir_drive) dir_drive_len = strlen(dir_drive) +1; + else dir_drive_len = 0; + + if (IS_SAM_SET(sampass, FLAG_SAM_SMBHOME)) homedir = pdb_get_homedir(sampass); + else homedir = NULL; + if (homedir) homedir_len = strlen(homedir) +1; + else homedir_len = 0; + + if (IS_SAM_SET(sampass, FLAG_SAM_LOGONSCRIPT)) logon_script = pdb_get_logon_script(sampass); + else logon_script = NULL; + if (logon_script) logon_script_len = strlen(logon_script) +1; + else logon_script_len = 0; + + if (IS_SAM_SET(sampass, FLAG_SAM_PROFILE)) profile_path = pdb_get_profile_path(sampass); + else profile_path = NULL; + if (profile_path) profile_path_len = strlen(profile_path) +1; + else profile_path_len = 0; lm_pw = pdb_get_lanman_passwd(sampass); - if (!lm_pw) - lm_pw_len = 0; + if (!lm_pw) lm_pw_len = 0; nt_pw = pdb_get_nt_passwd(sampass); - if (!nt_pw) - nt_pw_len = 0; + if (!nt_pw) nt_pw_len = 0; + + acct_desc = pdb_get_acct_desc(sampass); + if (acct_desc) acct_desc_len = strlen(acct_desc) +1; + else acct_desc_len = 0; + + workstations = pdb_get_workstations(sampass); + if (workstations) workstations_len = strlen(workstations) +1; + else workstations_len = 0; + + unknown_str = NULL; + unknown_str_len = 0; + + munged_dial = pdb_get_munged_dial(sampass); + if (munged_dial) munged_dial_len = strlen(munged_dial) +1; + else munged_dial_len = 0; /* one time to get the size needed */ len = tdb_pack(NULL, 0, TDB_FORMAT_STRING, @@ -438,7 +491,7 @@ BOOL pdb_getsampwent(SAM_ACCOUNT *user) return False; } - /* skip all non-USER entries (eg. RIDS) */ + /* skip all non-USER entries (eg. RIDS) */ while ((global_tdb_ent.key.dsize != 0) && (strncmp(global_tdb_ent.key.dptr, prefix, prefixlen))) /* increment to next in line */ global_tdb_ent.key = tdb_nextkey(global_tdb_ent.passwd_tdb, global_tdb_ent.key); @@ -463,27 +516,6 @@ BOOL pdb_getsampwent(SAM_ACCOUNT *user) } SAFE_FREE(data.dptr); - /* validate the account and fill in UNIX uid and gid. sys_getpwnam() - is used instaed of Get_Pwnam() as we do not need to try case - permutations */ - if ((pw=sys_getpwnam(pdb_get_username(user))) == NULL) { - DEBUG(0,("pdb_getsampwent: getpwnam(%s) return NULL. User does not exist!\n", - pdb_get_username(user))); - return False; - } - - uid = pw->pw_uid; - gid = pw->pw_gid; - pdb_set_uid(user, uid); - pdb_set_gid(user, gid); - - /* 21 days from present */ - pdb_set_pass_must_change_time(user, time(NULL)+1814400); - - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_logon_script(user)); - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_profile_path(user)); - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_homedir(user)); - /* increment to next in line */ global_tdb_ent.key = tdb_nextkey(global_tdb_ent.passwd_tdb, global_tdb_ent.key); @@ -550,28 +582,6 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname) /* no further use for database, close it now */ tdb_close(pwd_tdb); - /* validate the account and fill in UNIX uid and gid. sys_getpwnam() - is used instead of Get_Pwnam() as we do not need to try case - permutations */ - if ((pw=sys_getpwnam(pdb_get_username(user)))) { - uid = pw->pw_uid; - gid = pw->pw_gid; - pdb_set_uid (user, uid); - pdb_set_gid (user, gid); - - /* 21 days from present */ - pdb_set_pass_must_change_time(user, time(NULL)+1814400); - - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_logon_script(user)); - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_profile_path(user)); - standard_sub_advanced(-1, pdb_get_username(user), "", gid, pdb_get_homedir(user)); - } - else { - DEBUG(0,("pdb_getsampwent: getpwnam(%s) return NULL. User does not exist!\n", - pdb_get_username(user))); - return False; - } - return True; } -- cgit From 9fbc34638928df3317e118b0ee16664672f7487e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Jan 2002 17:02:28 +0000 Subject: updated debug to make it clearer. --- source/passdb/pdb_ldap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 86af437bcd5..ec0d26b12e5 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -760,8 +760,11 @@ BOOL pdb_getsampwnam(SAM_ACCOUNT * user, char *sname) } if (ldap_count_entries(ldap_struct, result) < 1) { - DEBUG(0, - ("We don't find this user [%s] count=%d\n", sname, + pstring filter; + + pstrcpy(filter, lp_ldap_filter()); + standard_sub_advanced(-1, sname, "", -1, filter); + DEBUG(0,("LDAP search \"%s\" returned %d entries.\n", filter, ldap_count_entries(ldap_struct, result))); ldap_unbind(ldap_struct); return False; -- cgit From fb1312f1f8dbabdf9a28db777768f18f2ba8e16d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Jan 2002 17:08:38 +0000 Subject: make sure the setuptime is getting set on an AddPrinterEx(). This was deleted from 2.2. for some reason. I'm guessing a mistaken checkin.... --- source/rpc_parse/parse_spoolss.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index d00b75bd958..bc4b543022c 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -821,11 +821,8 @@ BOOL make_spoolss_q_addprinterex( create a SPOOL_PRINTER_INFO_2 stuct from a PRINTER_INFO_2 struct *******************************************************************/ -BOOL make_spoolss_printer_info_2( - TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, - PRINTER_INFO_2 *info -) +BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, + PRINTER_INFO_2 *info) { SPOOL_PRINTER_INFO_LEVEL_2 *inf; @@ -3650,14 +3647,9 @@ BOOL make_spoolss_q_getprinter( /******************************************************************* * init a structure. ********************************************************************/ -BOOL make_spoolss_q_setprinter( - TALLOC_CTX *mem_ctx, - SPOOL_Q_SETPRINTER *q_u, - const POLICY_HND *hnd, - uint32 level, - PRINTER_INFO_CTR *info, - uint32 command -) +BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, + const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, + uint32 command) { SEC_DESC *secdesc; DEVICEMODE *devmode; @@ -5191,7 +5183,7 @@ BOOL uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni, /* we allocate memory iff called from * addprinter(ex) so we can do one time stuff here. */ - + (*asc)->setuptime=time_unix; } DEBUGADD(8,("start converting\n")); -- cgit From 74150c72bab82f8375ec0af929782b4159f372b9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 21 Jan 2002 23:34:02 +0000 Subject: Found and fixed the logic bug in write cache code. Amazingly helpful work from Juergen.Hasch@de.bosch.com in tracking this down. Jermy. --- source/smbd/fileio.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index 9f7cb5f3408..a13d05ddc49 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -240,8 +240,8 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", return real_write_file(fsp, data, pos, n); } - DEBUG(9,("write_file(fd=%d pos=%d size=%d) wofs=%d wsize=%d\n", - fsp->fd, (int)pos, (int)n, (int)wcp->offset, (int)wcp->data_size)); + DEBUG(9,("write_file(fd=%d pos=%.0f size=%u) wcp->offset=%.0f wcp->data_size=%u\n", + fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigned int)wcp->data_size)); /* * If we have active cache and it isn't contiguous then we flush. @@ -344,12 +344,15 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", write_path = 2; } else if ( (pos >= wcp->file_size) && + (wcp->offset + wcp->data_size == wcp->file_size) && (pos > wcp->offset + wcp->data_size) && (pos < wcp->offset + wcp->alloc_size) ) { /* * Non-contiguous write part of which fits within - * the cache buffer and is extending the file. + * the cache buffer and is extending the file + * and the cache contents reflect the current + * data up to the current end of the file. */ size_t data_used; @@ -504,7 +507,8 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", if (wcp->offset + wcp->data_size > wcp->file_size) wcp->file_size = wcp->offset + wcp->data_size; - DEBUG(9,("cache return %u\n", (unsigned int)n)); + DEBUG(9,("wcp->offset = %.0f wcp->data_size = %u cache return %u\n", + (double)wcp->offset, (unsigned int)wcp->data_size, (unsigned int)n)); total_written += n; return total_written; /* .... that's a write :) */ @@ -570,6 +574,8 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size) return False; } + memset(wcp->data, '\0', wcp->alloc_size ); + fsp->wcp = wcp; DO_PROFILE_INC(writecache_allocated_write_caches); allocated_write_caches++; -- cgit From 778f0a6310f641285e58016d4cabee03dbf52c00 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 21 Jan 2002 23:36:40 +0000 Subject: Removed freebsd hack. Not correct. Jeremy. --- source/lib/util_sock.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 20f87f63602..c51243faa47 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -666,11 +666,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) } if(len > 0) { -#ifdef FREEBSD_TCP_BUG - ret = read_socket_with_timeout(fd,buffer+4,len,len,10000); -#else ret = read_socket_data(fd,buffer+4,len); -#endif if (ret != len) { smb_read_error = READ_ERROR; return False; -- cgit From dcb005482845dfc03ac1b4c14796c5068ac5551e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 21 Jan 2002 23:38:01 +0000 Subject: Ensure non-root users cannot update the ldap backend. Jerry, please look at this - we need to ensure that password changing by the local user still works. Jeremy. --- source/passdb/pdb_ldap.c | 51 ++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index ec0d26b12e5..7f755fd724d 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -834,10 +834,10 @@ BOOL pdb_getsampwrid(SAM_ACCOUNT * user, uint32 rid) } } - /********************************************************************** Delete entry from LDAP for username *********************************************************************/ + BOOL pdb_delete_sam_account(char *sname) { int rc; @@ -846,6 +846,12 @@ BOOL pdb_delete_sam_account(char *sname) LDAPMessage *entry; LDAPMessage *result; + /* Ensure we have euid as root - else deny this. */ + if (geteuid() != 0) { + DEBUG(0, ("pdb_delete_sam_account: non-root user cannot delete user %s from LDAP.\n", sname)); + return False; + } + if (!ldap_open_connection (&ldap_struct)) return False; @@ -889,6 +895,7 @@ BOOL pdb_delete_sam_account(char *sname) /********************************************************************** Update SAM_ACCOUNT *********************************************************************/ + BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) { int rc; @@ -898,11 +905,16 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) LDAPMessage *entry; LDAPMod **mods; + /* Ensure we have euid as root - else deny this. */ + if (geteuid() != 0) { + DEBUG(0, ("pdb_update_sam_account: non-root user cannot update LDAP account.\n")); + return False; + } + if (!ldap_open_connection(&ldap_struct)) /* open a connection to the server */ return False; - if (!ldap_connect_system(ldap_struct)) /* connect as system account */ - { + if (!ldap_connect_system(ldap_struct)) /* connect as system account */ { ldap_unbind(ldap_struct); return False; } @@ -910,8 +922,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) rc = ldap_search_one_user_by_name(ldap_struct, pdb_get_username(newpwd), &result); - if (ldap_count_entries(ldap_struct, result) == 0) - { + if (ldap_count_entries(ldap_struct, result) == 0) { DEBUG(0, ("No user to modify!\n")); ldap_msgfree(result); ldap_unbind(ldap_struct); @@ -925,8 +936,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) rc = ldap_modify_s(ldap_struct, dn, mods); - if (rc != LDAP_SUCCESS) - { + if (rc != LDAP_SUCCESS) { char *ld_error; ldap_get_option(ldap_struct, LDAP_OPT_ERROR_STRING, &ld_error); @@ -939,8 +949,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) return False; } - DEBUG(2, - ("successfully modified uid = %s in the LDAP database\n", + DEBUG(2, ("successfully modified uid = %s in the LDAP database\n", pdb_get_username(newpwd))); ldap_mods_free(mods, 1); ldap_unbind(ldap_struct); @@ -950,6 +959,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) /********************************************************************** Add SAM_ACCOUNT to LDAP *********************************************************************/ + BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) { int rc; @@ -961,21 +971,23 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) int ldap_op; uint32 num_result; - if (!ldap_open_connection(&ldap_struct)) /* open a connection to the server */ - { + /* Ensure we have euid as root - else deny this. */ + if (geteuid() != 0) { + DEBUG(0, ("pdb_add_sam_account: non-root user cannot add LDAP account.\n")); return False; } - if (!ldap_connect_system(ldap_struct)) /* connect as system account */ - { + if (!ldap_open_connection(&ldap_struct)) /* open a connection to the server */ + return False; + + if (!ldap_connect_system(ldap_struct)) /* connect as system account */ { ldap_unbind(ldap_struct); return False; } rc = ldap_search_one_user_by_name (ldap_struct, pdb_get_username(newpwd), &result); - if (ldap_count_entries(ldap_struct, result) != 0) - { + if (ldap_count_entries(ldap_struct, result) != 0) { DEBUG(0,("User already in the base, with samba properties\n")); ldap_msgfree(result); ldap_unbind(ldap_struct); @@ -1003,8 +1015,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) tmp = ldap_get_dn (ldap_struct, entry); slprintf (dn, sizeof (dn) - 1, "%s", tmp); ldap_memfree (tmp); - } - else { + } else { /* Check if we need to add an entry */ DEBUG(3,("Adding new user\n")); ldap_op = LDAP_MOD_ADD; @@ -1018,13 +1029,11 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) if (ldap_op == LDAP_MOD_REPLACE) { rc = ldap_modify_s(ldap_struct, dn, mods); - } - else { + } else { rc = ldap_add_s(ldap_struct, dn, mods); } - if (rc != LDAP_SUCCESS) - { + if (rc != LDAP_SUCCESS) { char *ld_error; ldap_get_option (ldap_struct, LDAP_OPT_ERROR_STRING, &ld_error); -- cgit From 2773633d42ee75aef7c071b5c58d592e3fb79492 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 01:48:50 +0000 Subject: Brillient discovery by JohnR. When we're sending a change notify to ourselves on printer change we *must* use the same handle that the change was caused on, or we really confuse the client spooler.... Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 45 ++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index e3a88063f9c..24b09e6a5d9 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -610,23 +610,39 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) { - fstring printer; WERROR status; struct pipes_struct *p; struct policy *pol; struct handle_list *hl; + fstring printer; + char *msg = (char *)buf; *printer = '\0'; - fstrcpy(printer,buf); - if (len == 0) { + if (len < 5 + sizeof(POLICY_HND)) { DEBUG(0,("srv_spoolss_receive_message: got null message !\n")); return; } + /* + * If this is a message to ourselves, just send a change notify with + * the given handle, we know it's still open. + */ + + fstrcpy(printer,&msg[4 + sizeof(POLICY_HND)]); DEBUG(10,("srv_spoolss_receive_message: Got message about printer %s\n", printer )); + if (IVAL(buf,0) == (uint32)sys_getpid()) { + POLICY_HND sent_pol; + + memcpy(&sent_pol, &msg[4], sizeof(POLICY_HND)); + DEBUG(10,("srv_spoolss_receive_message: using our own handle.\n")); + cli_spoolss_reply_rrpcn(&cli, &sent_pol, PRINTER_CHANGE_ALL, 0x0, &status); + return; + } + /* + * Not a locally opened handle. * We need to enumerate all printers. The handle list is shared * across pipes of the same name, so just find the first open * spoolss pipe. @@ -671,7 +687,8 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size ****************************************************************************/ static BOOL srv_spoolss_sendnotify(pipes_struct *p, POLICY_HND *handle) { - fstring printer; + pstring msg; + size_t msg_len; Printer_entry *Printer=find_printer_index_by_hnd(p, handle); @@ -680,16 +697,22 @@ static BOOL srv_spoolss_sendnotify(pipes_struct *p, POLICY_HND *handle) return False; } - if (Printer->printer_type==PRINTER_HANDLE_IS_PRINTER) - fstrcpy(printer, Printer->dev.handlename); - else - fstrcpy(printer, ""); + memset(msg, '\0', sizeof(msg)); - /*srv_spoolss_receive_message(printer);*/ - DEBUG(10,("srv_spoolss_sendnotify: Sending message about printer %s\n", printer )); + if (Printer->printer_type==PRINTER_HANDLE_IS_PRINTER) { + uint32 mypid = (uint32)sys_getpid(); + SIVAL(msg,0,mypid); + memcpy(&msg[4], handle, sizeof(POLICY_HND)); + fstrcpy(&msg[4+sizeof(POLICY_HND)], Printer->dev.handlename); + msg_len = 4 + sizeof(POLICY_HND) + strlen(Printer->dev.handlename) + 1; + } else { + fstrcpy(&msg[4+sizeof(POLICY_HND)], ""); + msg_len = 4 + sizeof(POLICY_HND) + 1; + } - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer, strlen(printer) + 1, False); /* Null terminate... */ + DEBUG(10,("srv_spoolss_sendnotify: Sending message about printer %s\n", &msg[4+sizeof(POLICY_HND)] )); + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, msg_len, False); return True; } -- cgit From 3ff4d33e6d3b14bec3993d9e2c1eb950e84d0d0f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 05:35:13 +0000 Subject: Fixed the search for the passed handle. JohnR - please look at this as I believe this is the correct fix. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 24b09e6a5d9..d4c1e7f974c 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -616,6 +616,8 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size struct handle_list *hl; fstring printer; char *msg = (char *)buf; + POLICY_HND sent_hnd; + BOOL valid_sent_hnd = False; *printer = '\0'; @@ -625,24 +627,21 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size } /* - * If this is a message to ourselves, just send a change notify with - * the given handle, we know it's still open. + * If this is a message to ourselves, take note of the fact. + * we'll be looking for the handle attached to the pipe to find + * the open printer instance. */ fstrcpy(printer,&msg[4 + sizeof(POLICY_HND)]); DEBUG(10,("srv_spoolss_receive_message: Got message about printer %s\n", printer )); if (IVAL(buf,0) == (uint32)sys_getpid()) { - POLICY_HND sent_pol; - - memcpy(&sent_pol, &msg[4], sizeof(POLICY_HND)); + memcpy(&sent_hnd, &msg[4], sizeof(POLICY_HND)); DEBUG(10,("srv_spoolss_receive_message: using our own handle.\n")); - cli_spoolss_reply_rrpcn(&cli, &sent_pol, PRINTER_CHANGE_ALL, 0x0, &status); - return; + valid_sent_hnd = True; } /* - * Not a locally opened handle. * We need to enumerate all printers. The handle list is shared * across pipes of the same name, so just find the first open * spoolss pipe. @@ -661,6 +660,26 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size return; } + /* + * If a handle was sent from this process, look for it only, don't + * do the full search. + */ + + if (valid_sent_hnd) { + Printer_entry *find_printer = find_printer_index_by_hnd(p, &sent_hnd); + + if (!find_printer) { + DEBUG(0,("srv_spoolss_receive_message: Cannot find printer by sent handle.\n")); + return; + } + + if (find_printer->notify.client_connected==True) + cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, PRINTER_CHANGE_ALL, 0x0, &status); + + return; + } + + /* Handle was sent from a different process. */ /* Iterate the printer list on this pipe. */ for (pol = hl->Policy; pol; pol = pol->next ) { Printer_entry *find_printer = (Printer_entry *)pol->data_ptr; @@ -683,8 +702,9 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size } /*************************************************************************** - send a notify event + Send a notify event. ****************************************************************************/ + static BOOL srv_spoolss_sendnotify(pipes_struct *p, POLICY_HND *handle) { pstring msg; -- cgit From 6798d9b2d53f9a5ddf689ee6acbddb047712074c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 06:39:20 +0000 Subject: Merged in the new c_setprinter code from JohnR - fixed up the tdb_store_int to use endian independent modes. Jeremy. --- source/include/proto.h | 21 +++---- source/printing/nt_printing.c | 110 ++++++++++++++++++++++++++++++++----- source/rpc_server/srv_spoolss_nt.c | 61 ++++++++++++++------ 3 files changed, 146 insertions(+), 46 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 28ead2085e0..8a8d6340982 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2290,6 +2290,8 @@ BOOL parse_lpq_entry(int snum,char *line, /*The following definitions come from printing/nt_printing.c */ BOOL nt_printing_init(void); +uint32 update_c_setprinter(BOOL initialize); +uint32 get_c_setprinter(void); int get_builtin_ntforms(nt_forms_struct **list); BOOL get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form); int get_ntforms(nt_forms_struct **list); @@ -2315,6 +2317,7 @@ void get_printer_subst_params(int snum, fstring *printername, fstring *sharename WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level); WERROR add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level); uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level); +uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level); WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param); WERROR get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring sharename); uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level); @@ -3424,11 +3427,8 @@ BOOL make_spoolss_q_addprinterex( const char* user_name, uint32 level, PRINTER_INFO_CTR *ctr); -BOOL make_spoolss_printer_info_2( - TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, - PRINTER_INFO_2 *info -); +BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, + PRINTER_INFO_2 *info); BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth); BOOL make_spoolss_q_deleteprinterdriver( TALLOC_CTX *mem_ctx, @@ -3545,14 +3545,9 @@ BOOL make_spoolss_q_getprinter( NEW_BUFFER *buffer, uint32 offered ); -BOOL make_spoolss_q_setprinter( - TALLOC_CTX *mem_ctx, - SPOOL_Q_SETPRINTER *q_u, - const POLICY_HND *hnd, - uint32 level, - PRINTER_INFO_CTR *info, - uint32 command -); +BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, + const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, + uint32 command); BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth); diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index a1d696b63e6..890f20efecb 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -33,6 +33,7 @@ static TDB_CONTEXT *tdb_printers; /* used for printers files */ #define DRIVER_INIT_PREFIX "DRIVER_INIT/" #define PRINTERS_PREFIX "PRINTERS/" #define SECDESC_PREFIX "SECDESC/" +#define GLOBAL_C_SETPRINTER "GLOBALS/c_setprinter" #define NTDRIVERS_DATABASE_VERSION_1 1 #define NTDRIVERS_DATABASE_VERSION_2 2 @@ -289,12 +290,81 @@ BOOL nt_printing_init(void) } tdb_unlock_bystring(tdb_drivers, vstring); + update_c_setprinter(True); + return True; } +/******************************************************************* + tdb traversal function for counting printers. +********************************************************************/ + +static int traverse_counting_printers(TDB_CONTEXT *t, TDB_DATA key, + TDB_DATA data, void *context) +{ + int *printer_count = (int*)context; + + if (memcmp(PRINTERS_PREFIX, key.dptr, sizeof(PRINTERS_PREFIX)-1) == 0) { + (*printer_count)++; + DEBUG(10,("traverse_counting_printers: printer = [%s] printer_count = %d\n", key.dptr, *printer_count)); + } + + return 0; +} + +/******************************************************************* + Update the spooler global c_setprinter. This variable is initialized + when the parent smbd starts whith the number of existing printers. It + is monotonically increased by the current number of printers *after* + each add or delete printer RPC. Only Microsoft knows why... JRR020119 +********************************************************************/ + +uint32 update_c_setprinter(BOOL initialize) +{ + int32 c_setprinter; + int32 printer_count = 0; + + tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER); + + /* Traverse the tdb, counting the printers */ + tdb_traverse(tdb_printers, traverse_counting_printers, (void *)&printer_count); + + /* If initializing, set c_setprinter to current printers count + * otherwise, bump it by the current printer count + */ + if (!initialize) + c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER) + printer_count; + else + c_setprinter = printer_count; + + DEBUG(10,("update_c_setprinter: c_setprinter = %u\n", (unsigned int)c_setprinter)); + tdb_store_int32(tdb_printers, GLOBAL_C_SETPRINTER, c_setprinter); + + tdb_unlock_bystring(tdb_printers, GLOBAL_C_SETPRINTER); + + return (uint32)c_setprinter; +} + +/******************************************************************* + Get the spooler global c_setprinter, accounting for initialization. +********************************************************************/ + +uint32 get_c_setprinter(void) +{ + int32 c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER); + + if (c_setprinter == (int32)-1) + c_setprinter = update_c_setprinter(True); + + DEBUG(10,("get_c_setprinter: c_setprinter = %d\n", c_setprinter)); + + return (uint32)c_setprinter; +} + /**************************************************************************** - get builtin form struct list + Get builtin form struct list. ****************************************************************************/ + int get_builtin_ntforms(nt_forms_struct **list) { *list = (nt_forms_struct *)memdup(&default_forms[0], sizeof(default_forms)); @@ -2697,8 +2767,9 @@ static uint32 rev_changeid(void) struct timeval tv; get_process_uptime(&tv); - /* This value is in ms * 100 */ - return (((tv.tv_sec * 1000000) + tv.tv_usec)/100); + + /* Return changeid as msec since spooler restart */ + return tv.tv_sec * 1000 + tv.tv_usec / 1000; } /* @@ -2800,6 +2871,7 @@ WERROR add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) /**************************************************************************** Initialize printer devmode & data with previously saved driver init values. ****************************************************************************/ + static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) { int len = 0; @@ -2808,6 +2880,17 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) NT_PRINTER_PARAM *current; NT_PRINTER_INFO_LEVEL_2 info; + /* + * Delete any printer data 'specifics' already set. When called for driver + * replace, there will generally be some, but during an add printer, there + * should not be any (if there are delete them). + */ + while ( (current=info_ptr->specific) != NULL ) { + info_ptr->specific=current->next; + SAFE_FREE(current->data); + SAFE_FREE(current); + } + ZERO_STRUCT(info); slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, info_ptr->drivername); @@ -2817,8 +2900,14 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) kbuf.dsize = strlen(key)+1; dbuf = tdb_fetch(tdb_drivers, kbuf); - if (!dbuf.dptr) + if (!dbuf.dptr) { + /* + * When changing to a driver that has no init info in the tdb, remove + * the previous drivers init info and leave the new on blank. + */ + free_nt_devicemode(&info_ptr->devmode); return False; + } /* * Get the saved DEVMODE.. @@ -2841,16 +2930,6 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) DEBUG(10,("set_driver_init_2: Set printer [%s] init DEVMODE for driver [%s]\n", info_ptr->printername, info_ptr->drivername)); - /* - * There should not be any printer data 'specifics' already set during the - * add printer operation, if there are delete them. - */ - while ( (current=info_ptr->specific) != NULL ) { - info_ptr->specific=current->next; - SAFE_FREE(current->data); - SAFE_FREE(current); - } - /* * Add the printer data 'specifics' to the new printer */ @@ -2894,6 +2973,7 @@ uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level) of whether it was installed from NT or 2K. Technically, they should be different, but they work out to the same struct. ****************************************************************************/ + static uint32 update_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info) { pstring key; @@ -2950,7 +3030,7 @@ done: Update (i.e. save) the driver init info (DEVMODE and specifics) for a printer ****************************************************************************/ -static uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level) +uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level) { uint32 result; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d4c1e7f974c..cc83d8b957a 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -32,6 +32,7 @@ #define MAX_OPEN_PRINTER_EXS 50 #endif +#define MAGIC_DISPLAY_FREQUENCY 0xfade2bad #define PHANTOM_DEVMODE_KEY "_p_f_a_n_t_0_m_" #define PRINTER_HANDLE_IS_PRINTER 0 #define PRINTER_HANDLE_IS_PRINTSERVER 1 @@ -242,7 +243,7 @@ static Printer_entry *find_printer_index_by_hnd(pipes_struct *p, POLICY_HND *hnd } /**************************************************************************** - close printer index by handle + Close printer index by handle. ****************************************************************************/ static BOOL close_printer_handle(pipes_struct *p, POLICY_HND *hnd) @@ -260,8 +261,9 @@ static BOOL close_printer_handle(pipes_struct *p, POLICY_HND *hnd) } /**************************************************************************** - delete a printer given a handle + Delete a printer given a handle. ****************************************************************************/ + static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) { Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); @@ -1115,6 +1117,8 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL result = delete_printer_handle(p, handle); + update_c_setprinter(FALSE); + if (W_ERROR_IS_OK(result)) { srv_spoolss_sendnotify(p, handle); } @@ -2664,7 +2668,7 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) printer->unknown18 = 0x0; printer->status = nt_printq_status(status.status); printer->unknown20 = 0x0; - printer->c_setprinter = ntprinter->info_2->c_setprinter; /* how many times setprinter has been called */ + printer->c_setprinter = get_c_setprinter(); /* monotonically increasing sum of delta printer counts */ printer->unknown22 = 0x0; printer->unknown23 = 0x6; /* 6 ???*/ printer->unknown24 = 0; /* unknown 24 to 26 are always 0 */ @@ -4676,8 +4680,8 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1, } /******************************************************************** - * called by spoolss_api_setprinter - * when updating a printer description + * Called by spoolss_api_setprinter + * when updating a printer description. ********************************************************************/ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, @@ -4694,7 +4698,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, result = WERR_OK; if (level!=2) { - DEBUG(0,("Send a mail to samba@samba.org\n")); + DEBUG(0,("update_printer: Send a mail to samba@samba.org\n")); DEBUGADD(0,("with the following message: update_printer: level!=2\n")); result = WERR_UNKNOWN_LEVEL; goto done; @@ -4733,7 +4737,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, /* we have a valid devmode convert it and link it*/ - DEBUGADD(8,("Converting the devicemode struct\n")); + DEBUGADD(8,("update_printer: Converting the devicemode struct\n")); if (!convert_devicemode(printer->info_2->printername, devmode, &printer->info_2->devmode)) { result = WERR_NOMEM; @@ -4753,7 +4757,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, annoying permission denied dialog box. */ if (nt_printer_info_level_equal(printer, old_printer)) { - DEBUG(3, ("printer info has not changed\n")); + DEBUG(3, ("update_printer: printer info has not changed\n")); result = WERR_OK; goto done; } @@ -4761,20 +4765,11 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, /* Check calling user has permission to update printer description */ if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("printer property change denied by security " - "descriptor\n")); + DEBUG(3, ("update_printer: printer property change denied by security descriptor\n")); result = WERR_ACCESS_DENIED; goto done; } - /* - * When a *new* driver is bound to a printer, the drivername is used to - * lookup previously saved driver initialization info, which is then - * bound to the printer, simulating what happens in the Windows arch. - */ - if (strequal(printer->info_2->drivername, old_printer->info_2->drivername)) - set_driver_init(printer, 2); - /* Call addprinter hook */ if (*lp_addprinter_cmd()) { @@ -4784,6 +4779,32 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, } } + /* + * Set the DRIVER_INIT info in the tdb; trigger on magic value for the + * DEVMODE.displayfrequency, which is not used for printer drivers. This + * requires Win32 client code (see other notes elsewhere in the code). + */ + if (printer->info_2->devmode && + printer->info_2->devmode->displayfrequency == MAGIC_DISPLAY_FREQUENCY) { + + DEBUG(10,("update_printer: Save printer driver init data\n")); + printer->info_2->devmode->displayfrequency = 0; + + if (update_driver_init(*printer, 2)!=0) { + DEBUG(10,("update_printer: error updating printer driver init DEVMODE\n")); + result = WERR_ACCESS_DENIED; + goto done; + } + } else { + /* + * When a *new* driver is bound to a printer, the drivername is used to + * lookup previously saved driver initialization info, which is then + * bound to the printer, simulating what happens in the Windows arch. + */ + if (strequal(printer->info_2->drivername, old_printer->info_2->drivername)) + set_driver_init(printer, 2); + } + /* Update printer info */ result = add_a_printer(*printer, 2); @@ -5976,6 +5997,8 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ free_a_printer(&printer,2); + update_c_setprinter(False); + srv_spoolss_sendnotify(p, handle); return WERR_OK; @@ -6399,6 +6422,8 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP free_nt_printer_param(¶m); SAFE_FREE(old_param.data); + srv_spoolss_sendnotify(p, handle); + return status; } -- cgit From 3065fecbd878daf969079552fd4b859e24d87a53 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 07:22:58 +0000 Subject: Ensure fsp->size is up to date so readraw's work. Jeremy. --- source/smbd/fileio.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index a13d05ddc49..ba60690383b 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -177,6 +177,7 @@ ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n) if (fsp->conn->vfs_ops.fstat(fsp,fsp->fd,&st) == 0) { int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st); + fsp->size = st.st_size; if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode)) { file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st); } @@ -237,7 +238,10 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", if(!wcp) { DO_PROFILE_INC(writecache_direct_writes); - return real_write_file(fsp, data, pos, n); + total_written = real_write_file(fsp, data, pos, n); + if ((total_written != -1) && (pos + total_written > fsp->size)) + fsp->size = pos + total_written; + return total_written; } DEBUG(9,("write_file(fd=%d pos=%.0f size=%u) wcp->offset=%.0f wcp->data_size=%u\n", @@ -274,7 +278,7 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", */ if (wcp->offset + wcp->data_size > wcp->file_size) - wcp->file_size = wcp->offset + wcp->data_size; + fsp->size = wcp->file_size = wcp->offset + wcp->data_size; /* * If we used all the data then @@ -323,7 +327,7 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", */ if (wcp->offset + wcp->data_size > wcp->file_size) - wcp->file_size = wcp->offset + wcp->data_size; + fsp->size = wcp->file_size = wcp->offset + wcp->data_size; /* * We don't need to move the start of data, but we @@ -383,7 +387,7 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n", */ if (wcp->offset + wcp->data_size > wcp->file_size) - wcp->file_size = wcp->offset + wcp->data_size; + fsp->size = wcp->file_size = wcp->offset + wcp->data_size; /* * If we used all the data then @@ -424,7 +428,7 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne */ if(pos + n > wcp->file_size) - wcp->file_size = pos + n; + fsp->size = wcp->file_size = pos + n; /* * If write would fit in the cache, and is larger than @@ -443,7 +447,7 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne return ret; if (pos + ret > wcp->file_size) - wcp->file_size = pos + ret; + fsp->size = wcp->file_size = pos + ret; return ret; } @@ -453,7 +457,7 @@ len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigne } if(wcp->data_size > wcp->file_size) - wcp->file_size = wcp->data_size; + fsp->size = wcp->file_size = wcp->data_size; if (cache_flush_needed) { DEBUG(3,("WRITE_FLUSH:%d: due to noncontinuous write: fd = %d, size = %.0f, pos = %.0f, \ @@ -476,7 +480,7 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", return -1; if (pos + ret > wcp->file_size) - wcp->file_size = pos + n; + fsp->size = wcp->file_size = pos + n; DO_PROFILE_INC(writecache_direct_writes); return total_written + n; @@ -506,7 +510,7 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", */ if (wcp->offset + wcp->data_size > wcp->file_size) - wcp->file_size = wcp->offset + wcp->data_size; + fsp->size = wcp->file_size = wcp->offset + wcp->data_size; DEBUG(9,("wcp->offset = %.0f wcp->data_size = %u cache return %u\n", (double)wcp->offset, (unsigned int)wcp->data_size, (unsigned int)n)); @@ -592,6 +596,7 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size) void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size) { + fsp->size = file_size; if(fsp->wcp) { /* The cache *must* have been flushed before we do this. */ if (fsp->wcp->data_size != 0) { -- cgit From c99d2a436ff3c83c102c8c01b39861d0e6955f66 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 07:27:02 +0000 Subject: Ensure fsp->size is up to date. Jeremy. --- source/smbd/reply.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 01127b6977a..0e4e466b33e 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2192,9 +2192,7 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s if (size < sizeneeded) { SMB_STRUCT_STAT st; if (vfs_fstat(fsp,fsp->fd,&st) == 0) - size = st.st_size; - if (!fsp->can_write) - fsp->size = size; + fsp->size = size = st.st_size; } if (startpos >= size) -- cgit From 2d72e4931b1ccdac322cdbda793bb04bd65cbc34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 07:38:46 +0000 Subject: Merged Martin's RAP names. Jeremy. --- source/libsmb/clierror.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/source/libsmb/clierror.c b/source/libsmb/clierror.c index cc304293195..6957c2cec29 100644 --- a/source/libsmb/clierror.c +++ b/source/libsmb/clierror.c @@ -29,26 +29,30 @@ static const struct { - int err; - char *message; -} rap_errmap[] = -{ - {5, "User has insufficient privilege" }, - {86, "The specified password is invalid" }, - {2226, "Operation only permitted on a Primary Domain Controller" }, - {2242, "The password of this user has expired." }, - {2243, "The password of this user cannot change." }, - {2244, "This password cannot be used now (password history conflict)." }, - {2245, "The password is shorter than required." }, - {2246, "The password of this user is too recent to change."}, - - /* these really shouldn't be here ... */ - {0x80, "Not listening on called name"}, - {0x81, "Not listening for calling name"}, - {0x82, "Called name not present"}, - {0x83, "Called name present, but insufficient resources"}, - - {0, NULL} + int err; + char *message; +} rap_errmap[] = { + {5, "RAP5: User has insufficient privilege" }, + {50, "RAP50: Not supported by server" }, + {65, "RAP65: Access denied" }, + {86, "RAP86: The specified password is invalid" }, + {2220, "RAP2220: Group does not exist" }, + {2221, "RAP2221: User does not exist" }, + {2226, "RAP2226: Operation only permitted on a Primary Domain Controller" }, + {2237, "RAP2237: User is not in group" }, + {2242, "RAP2242: The password of this user has expired." }, + {2243, "RAP2243: The password of this user cannot change." }, + {2244, "RAP2244: This password cannot be used now (password history conflict)." }, + {2245, "RAP2245: The password is shorter than required." }, + {2246, "RAP2246: The password of this user is too recent to change."}, + + /* these really shouldn't be here ... */ + {0x80, "Not listening on called name"}, + {0x81, "Not listening for calling name"}, + {0x82, "Called name not present"}, + {0x83, "Called name present, but insufficient resources"}, + + {0, NULL} }; /**************************************************************************** -- cgit From 780647fdfd4ac88ae5d83fb36965349c52cc103e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 16:41:44 +0000 Subject: start syncing up9 printing fixes from last week. 3 changes.... * removed a bug I introduced during testing where the setup time for a printer was set to to current_time - 1day * set the printer attributes to PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK. This matches NT and is needed to match the output files generated during testing.... * Respond to the GetPrinterData("W3SvcInstalled") client query. I think this is right (what I saw from NT). My only guess is that the client spooler is looking for IIS. --- source/printing/nt_printing.c | 9 +++------ source/rpc_server/srv_spoolss_nt.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 890f20efecb..4bcbb120988 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2538,16 +2538,13 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin fstrcpy(info.printprocessor, "winprint"); fstrcpy(info.datatype, "RAW"); - info.attributes = PRINTER_ATTRIBUTE_SHARED \ - | PRINTER_ATTRIBUTE_LOCAL \ - | PRINTER_ATTRIBUTE_RAW_ONLY \ - | PRINTER_ATTRIBUTE_QUEUED ; /* attributes */ + info.attributes = PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK; /* attributes */ info.starttime = 0; /* Minutes since 12:00am GMT */ info.untiltime = 0; /* Minutes since 12:00am GMT */ info.priority = 1; info.default_priority = 1; - info.setuptime = (uint32)time(NULL) - 86400; /* minus 1 day */ + info.setuptime = (uint32)time(NULL); /* * I changed this as I think it is better to have a generic @@ -2635,7 +2632,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen info.parameters); /* Samba has to have shared raw drivers. */ - info.attributes |= (PRINTER_ATTRIBUTE_SHARED|PRINTER_ATTRIBUTE_RAW_ONLY); + info.attributes |= (PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK); /* Restore the stripped strings. */ slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index cc83d8b957a..70e5d93529a 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1208,6 +1208,14 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 DEBUG(8,("getprinterdata_printer_server:%s\n", value)); + if (!strcmp(value, "W3SvcInstalled")) { + *type = 0x4; + if((*data = (uint8 *)talloc_zero(ctx, 4*sizeof(uint8) )) == NULL) + return False; + *needed = 0x4; + return True; + } + if (!strcmp(value, "BeepEnabled")) { *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) @@ -3533,10 +3541,12 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET return getprinter_level_2(snum, buffer, offered, needed); case 3: return getprinter_level_3(snum, buffer, offered, needed); +#if 0 /* JERRY */ case 4: return getprinter_level_4(snum, buffer, offered, needed); case 5: return getprinter_level_5(snum, buffer, offered, needed); +#endif } return WERR_UNKNOWN_LEVEL; } @@ -4375,10 +4385,7 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum) slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s", get_called_name(), lp_servicename(snum)); fstrcpy(info->sharename, lp_servicename(snum)); - info->attributes = PRINTER_ATTRIBUTE_SHARED \ - | PRINTER_ATTRIBUTE_LOCAL \ - | PRINTER_ATTRIBUTE_RAW_ONLY \ - | PRINTER_ATTRIBUTE_QUEUED ; + info->attributes = PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK; return True; } -- cgit From 7dbf8890287dded3748e990fbc81022488544796 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 17:25:22 +0000 Subject: Added in some comments and minor fixes from last week's work. --- source/rpc_server/srv_spoolss_nt.c | 45 +++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 70e5d93529a..e0f4cb9fb32 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1091,7 +1091,12 @@ WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R if (Printer && Printer->document_started) _spoolss_enddocprinter_internal(p, handle); /* print job was not closed */ - memcpy(&r_u->handle, &q_u->handle, sizeof(r_u->handle)); + /* clear the returned printer handle. Observed behavior + from Win2k server. Don't think this really matters. + Previous code just copied the value of the closed + handle. --jerry */ + + memset(&r_u->handle, 0x0, sizeof(r_u->handle)); if (!close_printer_handle(p, handle)) return WERR_BADFID; @@ -3542,6 +3547,12 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET case 3: return getprinter_level_3(snum, buffer, offered, needed); #if 0 /* JERRY */ + + /* commented these out until I've had time to gain + my confidence back. Commented out after a series of BSOD on + win2k clients althought I cannot say for sure that tehse were + the cause --jerry 22/01/2002 */ + case 4: return getprinter_level_4(snum, buffer, offered, needed); case 5: @@ -3746,10 +3757,38 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fst status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status))); + +if 0 /* JERRY */ + + /* + * I put this code in during testing. Helpful when commenting out the + * support for DRIVER_INFO_6 in regards to win2k. Not needed in general + * as win2k always queries the driver using an infor level of 6. + * I've left it in (but ifdef'd out) because I'll probably + * use it in experimentation again in the future. --jerry 22/01/2002 + */ + if (!W_ERROR_IS_OK(status)) { - free_a_printer(&printer,2); - return WERR_UNKNOWN_PRINTER_DRIVER; + /* + * Is this a W2k client ? + */ + if (version == 3) { + /* Yes - try again with a WinNT driver. */ + version = 2; + status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); + DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status))); + } +#endif + + if (!W_ERROR_IS_OK(status)) { + free_a_printer(&printer,2); + return WERR_UNKNOWN_PRINTER_DRIVER; + } + +#if 0 /* JERRY */ } +#endif + fill_printer_driver_info_3(info, driver, servername); -- cgit From a09fd5a2cee5cf66a7ab6197e0f4a1ddf60e1cd9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 17:45:30 +0000 Subject: Oops. Couple of tests that shouldn't have been checked in. Commented out uintil I get them finished. --- source/printing/nt_printing.c | 8 ++++++-- source/rpc_server/srv_spoolss_nt.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 4bcbb120988..d95c086ab5b 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2552,7 +2552,7 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin * See the HP Deskjet 990c Win2k drivers for an example. */ -#if 0 /* JRA - NO NOT CHANGE ! */ +#if 1 /* JRA - NO NOT CHANGE ! */ info.devmode = NULL; #else /* @@ -2641,7 +2641,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen fstrcpy(info.printername, printername); len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len); -#if 1 +#if 0 /* * Some client drivers freak out if there is a NULL devmode * (probably the driver is not checking before accessing @@ -3149,6 +3149,10 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA DEBUG(10,("save_driver_init_2: error setting DEVMODE on printer [%s]\n", printer->info_2->printername)); } + +#if 0 /* JERRY */ + srv_spoolss_sendnotify(p, handle); +#endif done: talloc_destroy(ctx); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index e0f4cb9fb32..9b02de470a9 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -3758,7 +3758,7 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fst status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version); DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status))); -if 0 /* JERRY */ +#if 0 /* JERRY */ /* * I put this code in during testing. Helpful when commenting out the -- cgit From 75d40a4785143a3d7ce9c87fb00849915845d8fe Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 18:13:25 +0000 Subject: add "default devmode" parameter to control the generation of default device mode for a printer when info_2.devmode == NULL. Defaults to "no" and is a service level parameter. --- source/include/proto.h | 1887 +++++++++++++++++++++-------------------- source/param/loadparm.c | 4 + source/printing/nt_printing.c | 32 +- 3 files changed, 965 insertions(+), 958 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 8a8d6340982..ca04ad04742 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -166,595 +166,29 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from lib/snprintf.c */ - - -/*The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/*The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/*The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); - -/*The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); - -/*The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/*The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/*The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/*The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL zero_ip(struct in_addr ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/*The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/*The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/*The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/*The following definitions come from lib/util_sec.c */ - -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; - -/*The following definitions come from lib/util_sid.c */ - -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); - -/*The following definitions come from lib/util_sock.c */ - -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); - -/*The following definitions come from lib/util_str.c */ - -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); - -/*The following definitions come from lib/util_unistr.c */ - -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); - -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/cliconnect.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); /*The following definitions come from libsmb/cli_dfs.c */ @@ -773,6 +207,86 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 info_level, DFS_INFO_CTR *ctr); +/*The following definitions come from libsmb/clidgram.c */ + +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); + +/*The following definitions come from libsmb/clientgen.c */ + +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); + +/*The following definitions come from libsmb/clierror.c */ + +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); + +/*The following definitions come from libsmb/clifile.c */ + +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); + +/*The following definitions come from libsmb/clilist.c */ + +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); + /*The following definitions come from libsmb/cli_lsarpc.c */ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, @@ -807,6 +321,13 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/*The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /*The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -833,6 +354,12 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); +/*The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -840,6 +367,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/*The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/*The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/*The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -918,6 +495,12 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); +/*The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -1011,348 +594,765 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from libsmb/clistr.c */ + +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); + +/*The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/*The following definitions come from libsmb/credentials.c */ + +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/*The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/*The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from libsmb/pwd_cache.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from lib/smbrun.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from libsmb/smbdes.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from libsmb/clifile.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/*The following definitions come from libsmb/clilist.c */ +/*The following definitions come from libsmb/smberr.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -/*The following definitions come from libsmb/climessage.c */ +/*The following definitions come from libsmb/unexpected.c */ -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -/*The following definitions come from libsmb/clioplock.c */ +/*The following definitions come from lib/snprintf.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from libsmb/cliprint.c */ +/*The following definitions come from lib/substitute.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/*The following definitions come from libsmb/clirap.c */ +/*The following definitions come from lib/sysacls.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/*The following definitions come from libsmb/clireadwrite.c */ +/*The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); -/*The following definitions come from libsmb/clisecdesc.c */ +/*The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); -/*The following definitions come from libsmb/clistr.c */ +/*The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/*The following definitions come from libsmb/clitrans.c */ +/*The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/*The following definitions come from libsmb/credentials.c */ +/*The following definitions come from lib/username.c */ -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/*The following definitions come from libsmb/errormap.c */ +/*The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL zero_ip(struct in_addr ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/*The following definitions come from libsmb/namequery.c */ +/*The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/*The following definitions come from libsmb/nmblib.c */ +/*The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/*The following definitions come from libsmb/nterr.c */ +/*The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/*The following definitions come from libsmb/passchange.c */ +/*The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/*The following definitions come from libsmb/pwd_cache.c */ +/*The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); -/*The following definitions come from libsmb/smbdes.c */ +/*The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from lib/util_str.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from locking/brlock.c */ @@ -1440,9 +1440,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1473,6 +1470,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2032,6 +2032,7 @@ BOOL lp_fake_dir_create_times(int ); BOOL lp_blocking_locks(int ); BOOL lp_inherit_perms(int ); BOOL lp_use_client_driver(int ); +BOOL lp_default_devmode(int ); BOOL lp_nt_acl_support(int ); int lp_create_mask(int ); int lp_force_create_mode(int ); @@ -2346,19 +2347,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ -/*The following definitions come from printing/print_generic.c */ - - -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/*The following definitions come from printing/print_generic.c */ + + /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2383,6 +2379,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2436,6 +2437,39 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4045,39 +4079,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4540,6 +4541,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/*The following definitions come from smbd/vfs.c */ + +BOOL vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); @@ -4583,24 +4602,6 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); -/*The following definitions come from smbd/vfs.c */ - -BOOL vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/param/loadparm.c b/source/param/loadparm.c index a0a484c15b8..db7c5140799 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -398,6 +398,7 @@ typedef struct BOOL bInheritPerms; BOOL bMSDfsRoot; BOOL bUseClientDriver; + BOOL bDefaultDevmode; BOOL bNTAclSupport; char dummy[3]; /* for alignment */ @@ -514,6 +515,7 @@ static service sDefault = { False, /* bInheritPerms */ False, /* bMSDfsRoot */ False, /* bUseClientDriver */ + False, /* bDefaultDevmode */ True, /* bNTAclSupport */ "" /* dummy */ @@ -886,6 +888,7 @@ static struct parm_struct parm_table[] = { {"printer name", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT|FLAG_DOS_STRING}, {"printer", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_DOS_STRING}, {"use client driver", P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT}, + {"default devmode", P_BOOL, P_LOCAL, &sDefault.bDefaultDevmode, NULL, NULL, FLAG_PRINT}, {"printer driver", P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, {"printer driver file", P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT}, {"printer driver location", P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, @@ -1712,6 +1715,7 @@ FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes) FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks) FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms) FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver) +FN_LOCAL_BOOL(lp_default_devmode, bDefaultDevmode) FN_LOCAL_BOOL(lp_nt_acl_support, bNTAclSupport) FN_LOCAL_INTEGER(lp_create_mask, iCreate_mask) FN_LOCAL_INTEGER(lp_force_create_mode, iCreate_force_mode) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index d95c086ab5b..3d4d3a50b39 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2550,20 +2550,19 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin * I changed this as I think it is better to have a generic * DEVMODE than to crash Win2k explorer.exe --jerry * See the HP Deskjet 990c Win2k drivers for an example. + * + * However the default devmode appears to cause problems + * with the HP CLJ 8500 PCL driver. Hence the addition of + * the "default devmode" parameter --jerry 22/01/2002 */ -#if 1 /* JRA - NO NOT CHANGE ! */ - info.devmode = NULL; -#else - /* - * We should not return a default devicemode, as this causes - * Win2K to not send the correct one on PCL drivers. It needs to - * see a null devicemode so it can then overwrite the devicemode - * on OpenPrinterEx. Yes this *is* insane :-). JRA. - */ - if ((info.devmode = construct_nt_devicemode(info.printername)) == NULL) - goto fail; -#endif + if (lp_default_devmode(snum)) { + info.devmode = NULL; + } + else { + if ((info.devmode = construct_nt_devicemode(info.printername)) == NULL) + goto fail; + } /* This will get the current RPC talloc context, but we should be passing this as a parameter... fixme... JRA ! */ @@ -2641,19 +2640,22 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen fstrcpy(info.printername, printername); len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len); -#if 0 + /* * Some client drivers freak out if there is a NULL devmode * (probably the driver is not checking before accessing * the devmode pointer) --jerry + * + * See comments in get_a_printer_2_default() */ - if (!info.devmode) + + if (lp_default_devmode(lp_servicenumber(sharename)) && !info.devmode) { DEBUG(8,("get_a_printer_2: Constructing a default device mode for [%s]\n", printername)); info.devmode = construct_nt_devicemode(printername); } -#endif + len += unpack_specifics(&info.specific,dbuf.dptr+len, dbuf.dsize-len); /* This will get the current RPC talloc context, but we should be -- cgit From c44f7480bb08aca32c86d71934bcf65251492980 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 18:16:56 +0000 Subject: merge from appliance_head --- source/rpc_server/srv_pipe_hnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 5c7ae6ba43d..16b47b383c3 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -476,7 +476,7 @@ authentication failed. Denying the request.\n", p->name)); * Check the data length doesn't go over the 10Mb limit. */ - if(prs_data_size(&p->in_data.data) + data_len > 10*1024*1024) { + if(prs_data_size(&p->in_data.data) + data_len > 15*1024*1024) { DEBUG(0,("process_request_pdu: rpc data buffer too large (%u) + (%u)\n", (unsigned int)prs_data_size(&p->in_data.data), (unsigned int)data_len )); set_incoming_fault(p); -- cgit From 9ba1be5d4596bc64d74bde4d509dc9657c7a6270 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Jan 2002 18:19:44 +0000 Subject: added comment about NT4 spoolsv.exe 12Mb PDU bug --- source/rpc_server/srv_pipe_hnd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 16b47b383c3..0b0936356a6 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -474,6 +474,9 @@ authentication failed. Denying the request.\n", p->name)); /* * Check the data length doesn't go over the 10Mb limit. + * increased after observing a bug in the Windows NT 4.0 SP6a + * spoolsv.exe when the response to a GETPRINTERDRIVER2 RPC + * will not fit in the initial buffer of size 0x1068 --jerry 22/01/2002 */ if(prs_data_size(&p->in_data.data) + data_len > 15*1024*1024) { -- cgit From 0fe569a72a1795ddc6f21ddeb39bebc4dd95667f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 19:20:53 +0000 Subject: Formatting tidyups in printing/nt_printing.c rpc_server/srv_lsa_hnd.c rpc_server/srv_spoolss_nt.c. Fixed bug in handle check in rpc_server/srv_reg_nt.c. Jeremy. --- source/printing/nt_printing.c | 87 ++++++++++++++++++++------------------ source/rpc_server/srv_lsa_hnd.c | 19 +++++---- source/rpc_server/srv_reg_nt.c | 8 ++-- source/rpc_server/srv_spoolss_nt.c | 2 +- 4 files changed, 60 insertions(+), 56 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 3d4d3a50b39..b5b31cab8e6 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -1572,36 +1572,36 @@ static uint32 add_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver) slprintf(directory, sizeof(directory)-1, "\\print$\\%s\\%d\\", architecture, driver->cversion); - /* .inf files do not always list a file for each of the four standard files. - * Don't prepend a path to a null filename, or client claims: - * "The server on which the printer resides does not have a suitable - * printer driver installed. Click OK if you - * wish to install the driver on your local machine." - */ + /* .inf files do not always list a file for each of the four standard files. + * Don't prepend a path to a null filename, or client claims: + * "The server on which the printer resides does not have a suitable + * printer driver installed. Click OK if you + * wish to install the driver on your local machine." + */ if (strlen(driver->driverpath)) { - fstrcpy(temp_name, driver->driverpath); - slprintf(driver->driverpath, sizeof(driver->driverpath)-1, "%s%s", directory, temp_name); - } + fstrcpy(temp_name, driver->driverpath); + slprintf(driver->driverpath, sizeof(driver->driverpath)-1, "%s%s", directory, temp_name); + } if (strlen(driver->datafile)) { - fstrcpy(temp_name, driver->datafile); - slprintf(driver->datafile, sizeof(driver->datafile)-1, "%s%s", directory, temp_name); - } + fstrcpy(temp_name, driver->datafile); + slprintf(driver->datafile, sizeof(driver->datafile)-1, "%s%s", directory, temp_name); + } if (strlen(driver->configfile)) { - fstrcpy(temp_name, driver->configfile); - slprintf(driver->configfile, sizeof(driver->configfile)-1, "%s%s", directory, temp_name); - } + fstrcpy(temp_name, driver->configfile); + slprintf(driver->configfile, sizeof(driver->configfile)-1, "%s%s", directory, temp_name); + } if (strlen(driver->helpfile)) { - fstrcpy(temp_name, driver->helpfile); - slprintf(driver->helpfile, sizeof(driver->helpfile)-1, "%s%s", directory, temp_name); - } + fstrcpy(temp_name, driver->helpfile); + slprintf(driver->helpfile, sizeof(driver->helpfile)-1, "%s%s", directory, temp_name); + } if (driver->dependentfiles) { for (i=0; *driver->dependentfiles[i]; i++) { - fstrcpy(temp_name, driver->dependentfiles[i]); - slprintf(driver->dependentfiles[i], sizeof(driver->dependentfiles[i])-1, "%s%s", directory, temp_name); + fstrcpy(temp_name, driver->dependentfiles[i]); + slprintf(driver->dependentfiles[i], sizeof(driver->dependentfiles[i])-1, "%s%s", directory, temp_name); } } @@ -1798,42 +1798,43 @@ uint32 get_a_printer_driver_9x_compatible(pstring line, fstring model) kbuf.dptr = key; kbuf.dsize = strlen(key)+1; - if (!tdb_exists(tdb_drivers, kbuf)) return False; + if (!tdb_exists(tdb_drivers, kbuf)) + return False; ZERO_STRUCT(info3); get_a_printer_driver_3(&info3, model, "Windows 4.0", 0); - DEBUGADD(10,("info3->name [%s]\n", info3->name)); - DEBUGADD(10,("info3->datafile [%s]\n", info3->datafile)); - DEBUGADD(10,("info3->helpfile [%s]\n", info3->helpfile)); - DEBUGADD(10,("info3->monitorname [%s]\n", info3->monitorname)); - DEBUGADD(10,("info3->defaultdatatype [%s]\n", info3->defaultdatatype)); + DEBUGADD(10,("info3->name [%s]\n", info3->name)); + DEBUGADD(10,("info3->datafile [%s]\n", info3->datafile)); + DEBUGADD(10,("info3->helpfile [%s]\n", info3->helpfile)); + DEBUGADD(10,("info3->monitorname [%s]\n", info3->monitorname)); + DEBUGADD(10,("info3->defaultdatatype [%s]\n", info3->defaultdatatype)); for (i=0; info3->dependentfiles && *info3->dependentfiles[i]; i++) { - DEBUGADD(10,("info3->dependentfiles [%s]\n", info3->dependentfiles[i])); - } - DEBUGADD(10,("info3->environment [%s]\n", info3->environment)); - DEBUGADD(10,("info3->driverpath [%s]\n", info3->driverpath)); - DEBUGADD(10,("info3->configfile [%s]\n", info3->configfile)); + DEBUGADD(10,("info3->dependentfiles [%s]\n", info3->dependentfiles[i])); + } + DEBUGADD(10,("info3->environment [%s]\n", info3->environment)); + DEBUGADD(10,("info3->driverpath [%s]\n", info3->driverpath)); + DEBUGADD(10,("info3->configfile [%s]\n", info3->configfile)); /*pstrcat(line, info3->name); pstrcat(line, ":");*/ trim_string(info3->configfile, "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->configfile); - pstrcat(line, ":"); + pstrcat(line, ":"); trim_string(info3->datafile, "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->datafile); - pstrcat(line, ":"); + pstrcat(line, ":"); trim_string(info3->helpfile, "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->helpfile); - pstrcat(line, ":"); + pstrcat(line, ":"); trim_string(info3->monitorname, "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->monitorname); - pstrcat(line, ":"); + pstrcat(line, ":"); pstrcat(line, "RAW"); /*info3->defaultdatatype);*/ - pstrcat(line, ":"); + pstrcat(line, ":"); - for (i=0; info3->dependentfiles && - *info3->dependentfiles[i]; i++) { - if (i) pstrcat(line, ","); /* don't end in a "," */ + for (i=0; info3->dependentfiles && *info3->dependentfiles[i]; i++) { + if (i) + pstrcat(line, ","); /* don't end in a "," */ trim_string(info3->dependentfiles[i], "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->dependentfiles[i]); } @@ -1844,8 +1845,9 @@ uint32 get_a_printer_driver_9x_compatible(pstring line, fstring model) } /**************************************************************************** -debugging function, dump at level 6 the struct in the logs + Debugging function, dump at level 6 the struct in the logs. ****************************************************************************/ + static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level) { uint32 result; @@ -1975,9 +1977,10 @@ static int pack_specifics(NT_PRINTER_PARAM *param, char *buf, int buflen) /**************************************************************************** -delete a printer - this just deletes the printer info file, any open -handles are not affected + Delete a printer - this just deletes the printer info file, any open + handles are not affected. ****************************************************************************/ + uint32 del_a_printer(char *sharename) { pstring key; diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c index 62a04e875ac..860b7ab1b47 100644 --- a/source/rpc_server/srv_lsa_hnd.c +++ b/source/rpc_server/srv_lsa_hnd.c @@ -110,15 +110,16 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *) pol->data_ptr = data_ptr; pol->free_fn = free_fn; - pol_hnd_low++; - if (pol_hnd_low == 0) (pol_hnd_high)++; - - SIVAL(&pol->pol_hnd.data1, 0 , 0); /* first bit must be null */ - SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ - SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ - SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ - SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ - SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */ + pol_hnd_low++; + if (pol_hnd_low == 0) + (pol_hnd_high)++; + + SIVAL(&pol->pol_hnd.data1, 0 , 0); /* first bit must be null */ + SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ + SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ + SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ + SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ + SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */ DLIST_ADD(p->pipe_handles->Policy, pol); p->pipe_handles->count++; diff --git a/source/rpc_server/srv_reg_nt.c b/source/rpc_server/srv_reg_nt.c index 3977017fb4b..5ba1b9b0087 100644 --- a/source/rpc_server/srv_reg_nt.c +++ b/source/rpc_server/srv_reg_nt.c @@ -29,15 +29,15 @@ struct reg_info { - /* for use by \PIPE\winreg */ - fstring name; /* name of registry key */ + /* for use by \PIPE\winreg */ + fstring name; /* name of registry key */ }; static void free_reg_info(void *ptr) { struct reg_info *info = (struct reg_info *)ptr; - safe_free(info); + SAFE_FREE(info); } /******************************************************************* @@ -124,7 +124,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) DEBUG(5,("_reg_info: %d\n", __LINE__)); - if (find_policy_by_hnd(p, &q_u->pol, NULL) == -1) + if (!find_policy_by_hnd(p, &q_u->pol, NULL)) return NT_STATUS_INVALID_HANDLE; fstrcpy(name, dos_unistrn2(q_u->uni_type.buffer, q_u->uni_type.uni_str_len)); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 9b02de470a9..60c0c3ae6c2 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -318,7 +318,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) } return WERR_OK; -} +} /**************************************************************************** return the snum of a printer corresponding to an handle -- cgit From f8c0054b0a5f6a1ee6453be1789dbc7f0aa39e90 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 22 Jan 2002 20:53:14 +0000 Subject: Updating build file for 2.2.3 release. Update provided by . --- packaging/Caldera/OpenServer/Configure | 13 +- packaging/Caldera/OpenServer/Install | 13 +- packaging/Caldera/OpenServer/initconfig | 254 +++ packaging/Caldera/OpenServer/pkg/cdmt.config | 10 +- packaging/Caldera/OpenServer/pkg/cntl/ccs | 26 +- packaging/Caldera/OpenServer/pkg/cntl/cqs | 136 ++ packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt | 10 +- packaging/Caldera/OpenServer/pkg/input/Samba.pkg | 1669 ++------------------ packaging/Caldera/OpenServer/pkg/input/Samba.prd | 9 +- .../Caldera/OpenServer/pkg/input/SambaDOC.pkg | 1380 ++++++++++++++++ .../Caldera/OpenServer/pkg/input/SambaSWAT.pkg | 417 +++++ packaging/Caldera/OpenServer/smb.conf | 25 +- packaging/Caldera/OpenServer/smb.mkdev | 47 + packaging/Caldera/OpenServer/swat.readme | 40 + 14 files changed, 2491 insertions(+), 1558 deletions(-) create mode 100755 packaging/Caldera/OpenServer/initconfig create mode 100755 packaging/Caldera/OpenServer/pkg/cntl/cqs create mode 100644 packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg create mode 100644 packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg create mode 100755 packaging/Caldera/OpenServer/smb.mkdev create mode 100644 packaging/Caldera/OpenServer/swat.readme diff --git a/packaging/Caldera/OpenServer/Configure b/packaging/Caldera/OpenServer/Configure index 928aa971fb0..11826339d73 100755 --- a/packaging/Caldera/OpenServer/Configure +++ b/packaging/Caldera/OpenServer/Configure @@ -12,8 +12,11 @@ CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib" CXX="g++" CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib" RANLIB=true -MAKE=/usr/local/bin/make -PREFIX=/usr/local/samba +MAKE=/usr/gnu/bin/make +PREFIX=/usr/lib/samba +LIBDIR=/etc/samba.d +PRIVATEDIR=/etc/samba.d +LOCKDIR=/var/locks/samba.d if [ "$V" = "echo" ] then echo "exporting the following shell variables:" @@ -41,6 +44,9 @@ if [ "$V" = "echo" ] then echo "./configure \ --prefix=${PREFIX} \ + --libdir=${LIBDIR} \ + --with-privatedir=${PRIVATEDIR} \ + --with-lockdir={$LOCKDIR} \ --with-profile \ --with-syslog \ --with-utmp \ @@ -51,6 +57,9 @@ then else ./configure \ --prefix=${PREFIX} \ + --libdir=${LIBDIR} \ + --with-privatedir=${PRIVATEDIR} \ + --with-lockdir={$LOCKDIR} \ --with-profile \ --with-syslog \ --with-utmp \ diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install index ab27b6f67fa..0df78034c7b 100755 --- a/packaging/Caldera/OpenServer/Install +++ b/packaging/Caldera/OpenServer/Install @@ -12,7 +12,7 @@ V= PATH=/usr/local/bin:$PATH export PATH -PREFIX=/usr/local/samba +PREFIX=/usr/lib/samba HERE=`pwd` PKGDIR=packaging/Caldera/OpenServer @@ -20,6 +20,8 @@ BUILD_ROOT=${HERE}/dist BLDFIX=${BUILD_ROOT}/${PREFIX} $V rm -rf $BUILD_ROOT $V mkdir -p $BUILD_ROOT/etc/init.d +$V mkdir -p $BUILD_ROOT/usr/lib/mkdev +$V mkdir -p $BUILD_ROOT/doc $V mkdir -p ${BLDFIX}/bin $V mkdir -p ${BLDFIX}/sbin $V mkdir -p ${BLDFIX}/swat/using_samba/gifs @@ -111,7 +113,6 @@ $V install -m644 $i ${BLDFIX}/swat/using_samba/gifs done # Install the miscellany -$V install -m644 swat/README ${BLDFIX}/swat $V install -m644 docs/manpages/smb.conf.5 ${BLDFIX}/man/man.5 $V install -m644 docs/manpages/lmhosts.5 ${BLDFIX}/man/man.5 $V install -m644 docs/manpages/smbpasswd.5 ${BLDFIX}/man/man.5 @@ -123,12 +124,16 @@ $V install -m644 docs/manpages/swat.8 ${BLDFIX}/man/man.8 $V install -m644 docs/manpages/smbmount.8 ${BLDFIX}/man/man.8 $V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man.8 $V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man.8 -$V install -m644 ${PKGDIR}/smb.conf ${BLDFIX}/lib/smb.conf -$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/smbusers +$V install -m644 ${PKGDIR}/smb.conf $BUILD_ROOT/etc/samba.d/smb.conf.default +$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/samba.d/smbusers $V install -m755 ${PKGDIR}/smbprint ${BLDFIX}/bin $V install -m755 ${PKGDIR}/findsmb ${BLDFIX}/bin $V install -m755 ${PKGDIR}/smbadduser ${BLDFIX}/bin +$V install -m755 ${PKGDIR}/initconfig ${BLDFIX}/bin $V install -m755 ${PKGDIR}/smb.init $BUILD_ROOT/etc/init.d/samba +$V install -m755 ${PKGDIR}/smb.mkdev $BUILD_ROOT/usr/lib/mkdev/samba +$V install -m644 ${PKGDIR}/docview.html $BUILD_ROOT/doc/index.html +$V install -m644 ${PKGDIR}/swat.readme ${BLDFIX}/swat/README # The following is now done in the postinstall script # diff --git a/packaging/Caldera/OpenServer/initconfig b/packaging/Caldera/OpenServer/initconfig new file mode 100755 index 00000000000..b391cf9444d --- /dev/null +++ b/packaging/Caldera/OpenServer/initconfig @@ -0,0 +1,254 @@ +#!/bin/sh +# Initial configuration script for Samba. +# This script should be run once, immediately after Samba is installed, +# to get a basic smb.conf script into place. Subsequent modification +# of this initial configuration should be done by swat. +# +# It is expected that in future versions of Samba, swat will be able to +# do the initial configuration as well, and this script will become +# unnecessary. + +CONF_SRC=/usr/lib/samba/lib/smb.conf.default +CONF=/usr/lib/samba/lib/smb.conf + +# getyn: ask a question, return value indicates response + +getyn () { + while true; do + echo "$1 [$2] \c" + read answer + [ -z "$answer" ] && answer=$2 + + case $answer in + [Yy]*) echo; return 0; + ;; + [Nn]*) echo; return 1; + ;; + *) echo "Please answer yes or no." + continue + ;; + esac + done +} + +# conf_replace: call sed to replace strings in smb.conf file with new +# values, and if necessary uncomment the lines in which those strings +# appear. For this to work, the source file needs to contain unique +# placeholder strings to be replaced, e.g., %%WORKGROUP%% + +conf_replace () { + sed -e 's/^;*\(.*\)'$1'\(.*\)$/\1'$2'\2/' < $CONF > /tmp/smb.conf.$$ + cp -f /tmp/smb.conf.$$ $CONF + rm -f /tmp/smb.conf.$$ +} + +# Begin main + +# Check whether conf file has already been edited +if [ -f $CONF ]; then + cmp -s $CONF_SRC $CONF || { + echo "The file $CONF appears to have been previously edited. +If you continue, this file will be restored to its original +state and any changes you have made may be lost.\n" + if getyn "Continue?" No; then + echo "Backing up $CONF to ${CONF}-\n" + cp -f $CONF ${CONF}- + cp -f $CONF_SRC $CONF + else + exit 0 + fi + } +else + cp -f $CONF_SRC $CONF +fi + +# Question 1: Workgroup/Domain Name +# Default is MYGROUP. Responses must begin with an alphabetical +# character and contain no punctuation. +while true; do + default=MYGROUP + echo "Enter Workgroup/NT-Domain name: [$default] \c" + read workgroup + + if [ -z "$workgroup" ]; then + workgroup=$default + fi + + set -- $workgroup + if [ $# -gt 1 ]; then + echo "ERROR: Workgroup names cannot contain spaces or punctuation.\n" + continue + fi + + workgroup=`echo $workgroup | tr a-z A-Z | tr -d [:punct:]` + if expr "$workgroup" : '[^A-Z]' >&-; then + echo "ERROR: Workgroup name must begin with an alphabetic character.\n" + continue + fi + + echo "Workgroup name set to \"$workgroup\".\n" + + break +done + + +# Question 2: Machine Name +# Default is the uname, forced to capital letters and with punctuation +# excised. Responses must begin with an alphabetical +# character and contain no punctuation. +while true; do + default=`uname -n | tr a-z A-Z | tr -d [:punct:]` + echo "Enter Machine name: [$default] \c" + read name + + if [ -z "$name" ]; then + name=$default + fi + + set -- $name + if [ $# -gt 1 ]; then + echo "ERROR: Machine names cannot contain spaces or punctuation.\n" + continue + fi + + name=`echo $name | tr a-z A-Z | tr -d [:punct:]` + if expr "$name" : '[^A-Z]' >&-; then + echo "ERROR: Machine name must begin with an alphabetic character.\n" + continue + fi + + echo "Machine name set to \"$name\".\n" + + break +done + +# Question 3: use WINS? +wins=false +if getyn "Will this system use WINS (recommended)?" Yes; then + wins=true +fi + +# Optional questions, asked only if WINS will be used +if [ "$wins" = "true" ]; then + # Question 3.1: Are we the WINS server? + echo "NOTE: A workgroup can have only one WINS server." + wins_svr=false + if getyn "Will this system be the WINS server for your workgroup?" No; then + wins_svr=true + fi + + # Question 3.2: Who is the WINS server? + if [ "$wins_svr" = "false" ]; then + while true; do + echo "Enter the address of the primary WINS server for your workgroup: \c" + read wins_addr + + if expr "$wins_addr" : '[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*$' >&- ; then + echo + break + fi + + echo "ERROR: Invalid IP address format.\n" + done + fi +fi + +# Question 4: Which interfaces will be active? +iflist=`ifconfig -a | grep -v LOOPBACK | grep '^[^ ]*:' | cut -f1 -d:` + +set -- $iflist +if [ "$#" -eq 0 ]; then + echo "FATAL ERROR: No network interfaces" + exit 1 +elif [ "$#" -eq 1 ]; then + interfaces=$1 +else + while true; do + interfaces="" + echo "Which of the following interfaces should Samba run on?\n" + for i in $iflist; do + addr=`ifconfig $i | grep "inet " | sed 's/inet \([^ ]*\) .*$/\1/'` + echo "\t$i:\t$addr" + done + echo "\nList all interfaces to activate (e.g., net0, net1, etc): \c" + read response + for i in $response; do + found=false + for j in $iflist; do + if [ "$i" = "$j" ]; then + found=true + break + fi + done + if [ "$found" = "true" ]; then + interfaces="$interfaces $j" + else + echo "ERROR: Invalid interface name $i\n" + continue 2 + fi + done + + interfaces="$interfaces lo0 atl0" + break + done +fi + +# Question 5: Are we part of an existing security domain or active # directory? +domain_exists=false +if getyn "Will this system be part of a currently existing Microsoft Security\n\ +Domain or Active Directory?" No; then + domain_exists=true +fi + +# Optional questions, depending on response to question 5 +if [ "$domain_exists" = "true" ]; then + # Question 5.1: (if yes to 5) Who's the PDC? + default='*' + echo "Enter the name of the Primary Domain Controller: [*] \c" + read pdc + if [ -z "$pdc" ]; then + pdc=$default + else + pdc=`echo $pdc | tr a-z A-Z | tr -d [:punct:]` + fi + echo "Primary Domain Controller set to \"$pdc\".\n" +else + # Question 5.2: (if no to 5) Are we going to be the PDC? + domain_master=false + if getyn "Will this system be the domain controller for a new Microsoft\n\ +Security Domain?" No; then + domain_master=true + fi +fi + +# Done asking questions. +# Edit conf file with new values +conf_replace %%WORKGROUP%% "$workgroup" +conf_replace %%NBNAME%% "$name" + +if [ "$wins" = true ]; then + if [ "$wins_svr" = true ]; then + conf_replace %%WINSSUPPORT%% yes + else + conf_replace %%WINSSERVER%% $wins_addr + fi +fi + +conf_replace %%INTERFACES%% "$interfaces" +conf_replace %%BINDONLY%% yes + +if [ "$domain_exists" = true ]; then + conf_replace %%SECURITY%% domain + conf_replace %%PWSERVER%% "$pdc" +else + conf_replace %%SECURITY%% user +fi + +if [ "$domain_master" = true ]; then + conf_replace %%DOMAINMASTER%% yes + conf_replace %%DOMAINLOGONS%% yes + conf_replace %%OSLEVEL%% 33 +else + conf_replace %%OSLEVEL%% 20 +fi + diff --git a/packaging/Caldera/OpenServer/pkg/cdmt.config b/packaging/Caldera/OpenServer/pkg/cdmt.config index e11c1961f22..8ea7e8c1ab6 100644 --- a/packaging/Caldera/OpenServer/pkg/cdmt.config +++ b/packaging/Caldera/OpenServer/pkg/cdmt.config @@ -1,5 +1,8 @@ MACROS: +Samba_NAME = Samba File and Print Server +Samba_VER = 2.2.2a + DEFAULT_EXEC_MODE = 0755 DEFAULT_FILE_MODE = 0644 @@ -27,8 +30,7 @@ CONFIG: FLOPPY_MEDIA: device = /dev/rfd0 volumeSize = 8000 - distVendor = SCO - distVersion = 2.2 - distCode = SKUNK2000 - paperLabel = "SCO Skunkware Samba 2.2" + distVersion = $Samba_VER + distCode = SCO + paperLabel = "Samba" diff --git a/packaging/Caldera/OpenServer/pkg/cntl/ccs b/packaging/Caldera/OpenServer/pkg/cntl/ccs index 0cb22490e47..a01690712ac 100755 --- a/packaging/Caldera/OpenServer/pkg/cntl/ccs +++ b/packaging/Caldera/OpenServer/pkg/cntl/ccs @@ -11,13 +11,13 @@ pkglist="$3" # Source in the standard functions library, ccsSetup.sh . ccsSetup.sh -ccs_return_value=0 - SPOOL=/var/spool/samba SVCS=/etc/services INET=/etc/inetd.conf LMHOST=/etc/lmhosts -PREFIX=/usr/local/samba +PREFIX=/usr/lib/samba + +PKG_DIR=${SSO_SHARED_ROOT}/cntl/packages # # Create /var/spool/samba, create an initial /etc/lmhosts, build the @@ -58,7 +58,7 @@ PostExport() } grep swat $INET > /dev/null || { - echo "swat stream tcp nowait root /usr/local/samba/bin/swat swat " >> $INET + echo "swat stream tcp nowait root /usr/lib/samba/bin/swat swat " >> $INET } kill -1 `ps -e | grep inetd | awk ' { print $1 } '` @@ -97,6 +97,22 @@ PostUnexport() kill -1 `ps -e | grep inetd | awk ' { print $1 } '` } + +# call ccs in subsidiary packages with same arguments we were called with +pkgCodes=`getPackageCode $pkglist` +returnCode=$OK +for pkg in $pkgCodes; do + pkgscript=${PKG_DIR}/${pkg}/ccs + if [ -f "$pkgscript" ]; then + ${pkgscript} "${step}" "${keywords}" "${pkglist}" + + # exit with the most severe exit code of subsidiary package scripts + case "$?" in + $FAIL) returnCode=$FAIL ;; + $WARN) [ "$returnCode" -eq "$OK" ] && returnCode=$WARN ;; + esac + fi +done case "$step" in POST_EXPORT) PostExport ;; @@ -104,5 +120,5 @@ case "$step" in POST_UNEXPORT) PostUnexport ;; esac -exit $ccs_return_value +exit $returnCode diff --git a/packaging/Caldera/OpenServer/pkg/cntl/cqs b/packaging/Caldera/OpenServer/pkg/cntl/cqs new file mode 100755 index 00000000000..2edcae6f2c7 --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/cntl/cqs @@ -0,0 +1,136 @@ +#!/ibin/sh +# +# The component query script for the Samba component +# +# %Z% %M% %I% %E% %Q% +# +# input: +# $1 - keyword list (e.g. "UPGRADE OLD_CUSTOM_UPGRADE") +# $2 - package list (e.g. "Samba:: ) +# + +# Save input arguments +# +keywords=$1 +pkgList=$2 + +# Source in the standard functions library +# +. ccsSetup.sh + +# Local Variables +# +installType=FRESH + +# set custom install mode +customMode=LAYERED +[ "$IQM_FILE" ] && { + # Invoking custom from the IQM. IQM output will be stored + # in $IQM_FILE. + customMode="IQM" +} + +# Local Functions + +############################################################################## +# +# If called with an argument indicating failure, remove any possible saved +# configuration info. Exit with arg passed to this function. +# +cleanup() +{ + trap '' 1 2 3 15 + exit $1 +} + +################################################################################ +# +# We are doing a SSO -> SSO upgrade. +# +Save_SSO_Upgrade_Config() +{ + if [ -f /etc/smbusers ]; then + ex_cmd cp -f /etc/smbusers $CCS_PERSISTENT_STORAGE/smbusers + fi + if [ -f /usr/lib/samba/lib/smb.conf ]; then + ex_cmd cp -f /usr/lib/samba/lib/smb.conf $CCS_PERSISTENT_STORAGE/smb.conf + fi + + return 0 +} + +#****************************************************************************** +# check_libsocket +# +# Check to see if libsocket.so.2 is installed on this system. If not, print +# a warning message and ask if the user wants to continue installation anyway. +#****************************************************************************** + +MSG_missLibrary="WARNING: Samba requires the library /usr/lib/libsocket.so.2 + to install and run correctly. That library does not exist + on this system. It is provided in OpenServer releases + 5.0.6a and higher." + +check_libsocket() { + if [ -f "/usr/lib/libsocket.so.2" ]; then + return $OK + else + echo "${MSG_missLibrary}" + + while echo "\n\tContinue installation? \c" + do read yn rest + case $yn in + +x|-x) set $yn ;; + [yY]*) return $OK ;; + [nN]*) cleanup $FAIL ;; + *) echo "\tPlease answer y or n" ;; + esac + done + fi +} + + +################################################################################ +# main Main MAIN +# +trap "cleanup $FAIL" 1 2 3 15 + +[ "$customMode" = "LAYERED" ] && { + check_libsocket +} + +# Parse keyword list to determine how custom was invoked, the installation type, +# whether we running on the target CPU, and finally if we have access to +# the target's root filesystem. +# +for k in $keywords +do + case $k in + "UPGRADE") + # SSO -> SSO upgrade + # + installType="SSO_UPGRADE" + ;; + + "OLD_CUSTOM_UPGRADE") + # OLD_CUSTOM -> SSO upgrade + # + installType="OLD_UPGRADE" + ;; + esac +done + +case "$installType" in +"FRESH") + # No previous version of component on the system. Perform a + # fresh install. + ;; + +"SSO_UPGRADE") + # Existing SSO component upgraded to newer SSO version. + # + Save_SSO_Upgrade_Config + ;; +esac + +cleanup $OK diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt b/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt index 245f6d12ce8..f1db1fde038 100644 --- a/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt +++ b/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt @@ -1,13 +1,17 @@ -COMP:SKUNK2000:Samba: -description = "Samba - A Windows SMB/CIFS fileserver for UNIX" -version = 2.2 +COMP:SCO:Samba: +description = $Samba_NAME +version = $Samba_VER subpackages = Samba +subpackages = SambaSWAT +subpackages = SambaDOC required = Samba dependencies = distTreeRootSHARED = $Samba_DIR distTreeRootCLIENT = $Samba_DIR pkgFiles = $Samba_DIR/input/Samba.pkg +pkgFiles = $Samba_DIR/input/SambaSWAT.pkg +pkgFiles = $Samba_DIR/input/SambaDOC.pkg FILE_DEFAULT: mode = $DEFAULT_FILE_MODE diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg index ea76e74a610..f4a72dac36c 100644 --- a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg @@ -17,1889 +17,510 @@ owner = root group = sys flags = -PKG:Samba: -description = "Samba - A Windows SMB/CIFS fileserver for UNIX" -dependencies = -distTreeRootSHARED = $Samba_DIR -distTreeRootCLIENT = $Samba_DIR - -DIR:Samba:SHARED:etc: +FILE:Control:SHARED:cntl/cqs: mode = 0755 owner = root group = sys flags = -DIR:Samba:SHARED:etc/init.d: +DIR:Control:SHARED:cntl/packages: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:etc/init.d/samba: +DIR:Control:SHARED:cntl/packages/SambaDOC: mode = 0755 owner = root group = sys flags = -exportPath = /etc/init.d/samba - -FILE:Samba:SHARED:etc/smbusers: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /etc/smbusers -DIR:Samba:SHARED:usr: +FILE:Control:SHARED:cntl/packages/SambaDOC/ccs: mode = 0755 owner = root group = sys flags = -DIR:Samba:SHARED:usr/local: -mode = 0755 -owner = root -group = sys -flags = +PKG:Samba: +description = "Samba" +dependencies = +distTreeRootSHARED = $Samba_DIR +distTreeRootCLIENT = $Samba_DIR -DIR:Samba:SHARED:usr/local/samba: +DIR:Samba:SHARED:etc: mode = 0755 owner = root group = sys flags = -exportPath = /usr/local/samba -DIR:Samba:SHARED:usr/local/samba/bin: +DIR:Samba:SHARED:etc/init.d: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/nmblookup: +FILE:Samba:SHARED:etc/init.d/samba: mode = 0755 owner = root group = sys flags = +exportPath = /etc/init.d/samba -FILE:Samba:SHARED:usr/local/samba/bin/smbclient: +DIR:Samba:SHARED:usr: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/smbpasswd: +DIR:Samba:SHARED:usr/lib: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/smbstatus: +DIR:Samba:SHARED:usr/lib/mkdev: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/testparm: +FILE:Samba:SHARED:usr/lib/mkdev/samba: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/mkdev/samba -FILE:Samba:SHARED:usr/local/samba/bin/testprns: +DIR:Samba:SHARED:usr/lib/samba: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/make_smbcodepage: +DIR:Samba:SHARED:usr/lib/samba/bin: mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/bin/make_unicodemap: +FILE:Samba:SHARED:usr/lib/samba/bin/initconfig: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/initconfig -FILE:Samba:SHARED:usr/local/samba/bin/make_printerdef: +FILE:Samba:SHARED:usr/lib/samba/bin/nmblookup: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/nmblookup -FILE:Samba:SHARED:usr/local/samba/bin/rpcclient: +FILE:Samba:SHARED:usr/lib/samba/bin/smbclient: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbclient -FILE:Samba:SHARED:usr/local/samba/bin/smbspool: +FILE:Samba:SHARED:usr/lib/samba/bin/smbpasswd: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbpasswd -FILE:Samba:SHARED:usr/local/samba/bin/smbsh: +FILE:Samba:SHARED:usr/lib/samba/bin/smbstatus: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbstatus -FILE:Samba:SHARED:usr/local/samba/bin/mksmbpasswd.sh: +FILE:Samba:SHARED:usr/lib/samba/bin/testparm: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/testparm -FILE:Samba:SHARED:usr/local/samba/bin/smbtar: +FILE:Samba:SHARED:usr/lib/samba/bin/testprns: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/testprns -FILE:Samba:SHARED:usr/local/samba/bin/smbprint: +FILE:Samba:SHARED:usr/lib/samba/bin/make_smbcodepage: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/make_smbcodepage -FILE:Samba:SHARED:usr/local/samba/bin/findsmb: +FILE:Samba:SHARED:usr/lib/samba/bin/make_unicodemap: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/make_unicodemap -FILE:Samba:SHARED:usr/local/samba/bin/smbadduser: +FILE:Samba:SHARED:usr/lib/samba/bin/make_printerdef: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/make_printerdef -DIR:Samba:SHARED:usr/local/samba/sbin: +FILE:Samba:SHARED:usr/lib/samba/bin/rpcclient: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/rpcclient -FILE:Samba:SHARED:usr/local/samba/sbin/smbd: +FILE:Samba:SHARED:usr/lib/samba/bin/smbspool: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbspool -FILE:Samba:SHARED:usr/local/samba/sbin/nmbd: +FILE:Samba:SHARED:usr/lib/samba/bin/smbsh: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbsh -FILE:Samba:SHARED:usr/local/samba/sbin/swat: +FILE:Samba:SHARED:usr/lib/samba/bin/mksmbpasswd.sh: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/mksmbpasswd.sh -FILE:Samba:SHARED:usr/local/samba/sbin/debug2html: +FILE:Samba:SHARED:usr/lib/samba/bin/smbtar: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbtar -FILE:Samba:SHARED:usr/local/samba/sbin/smbtorture: +FILE:Samba:SHARED:usr/lib/samba/bin/smbprint: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbprint -FILE:Samba:SHARED:usr/local/samba/sbin/smbfilter: +FILE:Samba:SHARED:usr/lib/samba/bin/findsmb: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/findsmb -FILE:Samba:SHARED:usr/local/samba/sbin/locktest2: +FILE:Samba:SHARED:usr/lib/samba/bin/smbadduser: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/bin/smbadduser -FILE:Samba:SHARED:usr/local/samba/sbin/masktest: +DIR:Samba:SHARED:usr/lib/samba/sbin: mode = 0755 owner = root group = sys flags = -DIR:Samba:SHARED:usr/local/samba/swat: +FILE:Samba:SHARED:usr/lib/samba/sbin/smbd: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/smbd -DIR:Samba:SHARED:usr/local/samba/swat/using_samba: +FILE:Samba:SHARED:usr/lib/samba/sbin/nmbd: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/nmbd -DIR:Samba:SHARED:usr/local/samba/swat/using_samba/gifs: +FILE:Samba:SHARED:usr/lib/samba/sbin/debug2html: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/debug2html -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/index.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/samba.s.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txthome.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txtnexta.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txtpreva.gif: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/swat/using_samba/figs: +FILE:Samba:SHARED:usr/lib/samba/sbin/smbtorture: mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/smbtorture -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0101.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0102.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0103.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0104.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0105.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0106.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0107.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0108.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0109.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0110.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0111.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0112.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0113.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0114.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0201.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0202.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0203.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0204.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0301.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0302.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0303.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0304.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0305.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0306.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0307.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0308.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0309.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0310.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0311.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0312.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0313.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0314.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0315.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0316.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0317.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0318.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0319.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0320.gif: -mode = 0644 +FILE:Samba:SHARED:usr/lib/samba/sbin/smbfilter: +mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/smbfilter -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0321.gif: -mode = 0644 +FILE:Samba:SHARED:usr/lib/samba/sbin/locktest2: +mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/locktest2 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0322.gif: -mode = 0644 +FILE:Samba:SHARED:usr/lib/samba/sbin/masktest: +mode = 0755 owner = root group = sys flags = +exportPath = /usr/lib/samba/sbin/masktest -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0323.gif: -mode = 0644 +DIR:Samba:SHARED:usr/lib/samba/lib: +mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0324.gif: +FILE:Samba:SHARED:etc/samba.d/smb.conf.default: mode = 0644 owner = root group = sys flags = +exportPath = /etc/samba.d/smb.conf.default -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0325.gif: -mode = 0644 +DIR:Samba:SHARED:usr/lib/samba/lib/codepages: +mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0326.gif: -mode = 0644 +DIR:Samba:SHARED:usr/lib/samba/lib/codepages/src: +mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0327.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.437: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.437 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0328.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.737: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.737 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0401.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.775: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.775 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0402.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.850: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.850 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0403.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.852: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.852 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0404.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.861: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.861 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0405.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.866: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.866 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0406.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.932: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.932 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0407.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.936: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.936 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0501.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.949: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.949 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0502.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.950: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.950 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0503.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/codepage_def.1251: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/codepage_def.1251 -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0504.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP437.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP437.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0505.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP737.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP737.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0506.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP850.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP850.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0507.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP852.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP852.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0508.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP861.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP861.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0601.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP866.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP866.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0602.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP932.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP932.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0603.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP936.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP936.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0604.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP949.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP949.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0605.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CP950.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CP950.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0606.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CPISO8859-1.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CPISO8859-1.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0701.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CPISO8859-2.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CPISO8859-2.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0702.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CPISO8859-5.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CPISO8859-5.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0703.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CPISO8859-7.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CPISO8859-7.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0704.gif: +FILE:Samba:SHARED:usr/lib/samba/lib/codepages/src/CPKOI8-R.TXT: mode = 0644 owner = root group = sys flags = +exportPath = /usr/lib/samba/lib/codepages/src/CPKOI8-R.TXT -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0705.gif: +FILE:Samba:CLIENT:etc/samba.d/smbusers: mode = 0644 owner = root group = sys flags = +exportPath = /etc/samba.d/smbusers -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0706.gif: -mode = 0644 +DIR:Samba:CLIENT:usr/lib/samba/var: +mode = 0755 owner = root group = sys flags = -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0707.gif: -mode = 0644 +DIR:Samba:CLIENT:usr/lib/samba/var/log: +mode = 0755 owner = root group = sys flags = +exportPath = /var/log/samba.d -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0708.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0709.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0801.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0802.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0803.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0804.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0805.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0901.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0902.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0903.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0904.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0905.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.aa01.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.ab01.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.ab02.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appc_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appd_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appe_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appf_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_06.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_07.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_08.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_06.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_06.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_07.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_08.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_06.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_04.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_05.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_06.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_07.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_01.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_02.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_03.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/index.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/inx.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/licenseinfo.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/using_samba/this_edition.html: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/swat/images: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/globals.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/home.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/passwd.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/printers.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/samba.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/shares.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/status.gif: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/images/viewconfig.gif: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/swat/help: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/welcome.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/DOMAIN_MEMBER.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/NT_Security.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/OS2-Client-HOWTO.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/Samba-HOWTO-Collection.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/UNIX_INSTALL.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/findsmb.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/lmhosts.5.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/make_smbcodepage.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/msdfs_setup.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/nmbd.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/nmblookup.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/printer_driver2.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/rpcclient.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/samba-pdc-faq.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/samba-pdc-howto.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/samba.7.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smb.conf.5.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbcacls.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbclient.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbcontrol.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbd.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbmnt.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbmount.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbpasswd.5.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbpasswd.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbrun.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbsh.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbspool.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbstatus.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbtar.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/smbumount.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/swat.8.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/testparm.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/testprns.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/wbinfo.1.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/winbind.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/help/winbindd.8.html: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/swat/include: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/include/footer.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/include/header.html: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/swat/README: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/man: -mode = 0755 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/man/man.1: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/findsmb.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/make_smbcodepage.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/make_unicodemap.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/nmblookup.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/rpcclient.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbcacls.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbclient.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbcontrol.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbrun.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbsh.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbstatus.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/smbtar.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/testparm.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/testprns.1: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.1/wbinfo.1: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/man/man.5: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.5/smb.conf.5: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.5/lmhosts.5: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.5/smbpasswd.5: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/man/man.7: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.7/samba.7: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/man/man.8: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/smbd.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/nmbd.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/smbpasswd.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/swat.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/smbmount.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/smbmnt.8: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/man/man.8/smbumount.8: -mode = 0644 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/var: +DIR:Samba:CLIENT:usr/lib/samba/var/locks: mode = 0755 owner = root group = sys flags = - -DIR:Samba:SHARED:usr/local/samba/var/locks: -mode = 0755 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/lib: -mode = 0755 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/lib/codepages: -mode = 0755 -owner = root -group = sys -flags = - -DIR:Samba:SHARED:usr/local/samba/lib/codepages/src: -mode = 0755 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.437: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.737: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.775: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.850: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.852: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.861: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.866: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.932: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.936: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.949: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.950: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.1251: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP437.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP737.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP850.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP852.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP861.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP866.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP932.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP936.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP949.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP950.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-1.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-2.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-5.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-7.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPKOI8-R.TXT: -mode = 0644 -owner = root -group = sys -flags = - -FILE:Samba:SHARED:usr/local/samba/lib/smb.conf: -mode = 0644 -owner = root -group = sys -flags = +exportPath = /var/locks/samba diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.prd b/packaging/Caldera/OpenServer/pkg/input/Samba.prd index e31c8bfe8e8..296a21624bd 100644 --- a/packaging/Caldera/OpenServer/pkg/input/Samba.prd +++ b/packaging/Caldera/OpenServer/pkg/input/Samba.prd @@ -1,6 +1,5 @@ -PROD:SKUNK2000:Samba: -description = "Samba - A Windows SMB/CIFS fileserver for UNIX" -version = 2.2 -packages = SKUNK2000:Samba -required = SKUNK2000:Samba +PROD:SCO:Samba: +description = $Samba_NAME +version = $Samba_VER +packages = SCO:Samba::$Samba_VER cmpntFiles = Samba.cmpnt diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg new file mode 100644 index 00000000000..df96635bccd --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg @@ -0,0 +1,1380 @@ + +PKG:SambaDOC: +description = "Samba Documentation" +dependencies = SCO:Samba:SambaSWAT::.* +distTreeRootSHARED = $Samba_DIR +distTreeRootCLIENT = $Samba_DIR + +DIR:SambaDOC:SHARED:doc: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:doc/index.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/help/index.html + +DIR:SambaDOC:SHARED:usr/lib: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaDOC:SHARED:usr/lib/samba: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaDOC:SHARED:usr/lib/samba/man: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaDOC:SHARED:usr/lib/samba/man/man.1: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/findsmb.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/findsmb.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/make_smbcodepage.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/make_smbcodepage.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/make_unicodemap.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/make_unicodemap.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/nmblookup.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/nmblookup.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/rpcclient.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/rpcclient.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbcacls.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbcacls.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbclient.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbclient.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbcontrol.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbcontrol.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbrun.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbrun.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbsh.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbsh.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbstatus.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbstatus.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbtar.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/smbtar.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/testparm.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/testparm.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/testprns.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/testprns.1 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/wbinfo.1: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.1/wbinfo.1 + +DIR:SambaDOC:SHARED:usr/lib/samba/man/man.5: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.5/smb.conf.5: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.5/smb.conf.5 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.5/lmhosts.5: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.5/lmhosts.5 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.5/smbpasswd.5: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.5/smbpasswd.5 + +DIR:SambaDOC:SHARED:usr/lib/samba/man/man.7: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.7/samba.7: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.7/samba.7 + +DIR:SambaDOC:SHARED:usr/lib/samba/man/man.8: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/smbd.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/smbd.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/nmbd.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/nmbd.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/smbpasswd.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/smbpasswd.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/swat.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/swat.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/smbmount.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/smbmount.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/smbmnt.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/smbmnt.8 + +FILE:SambaDOC:SHARED:usr/lib/samba/man/man.8/smbumount.8: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/man/man.8/smbumount.8 + +DIR:SambaDOC:SHARED:usr/lib/samba/swat: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaDOC:SHARED:usr/lib/samba/swat/using_samba: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs/index.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/gifs/index.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs/samba.s.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/gifs/samba.s.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs/txthome.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/gifs/txthome.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs/txtnexta.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/gifs/txtnexta.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/gifs/txtpreva.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/gifs/txtpreva.gif + +DIR:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0101.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0101.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0102.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0102.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0103.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0103.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0104.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0104.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0105.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0105.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0106.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0106.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0107.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0107.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0108.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0108.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0109.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0109.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0110.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0110.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0111.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0111.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0112.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0112.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0113.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0113.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0114.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0114.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0201.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0201.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0202.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0202.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0203.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0203.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0204.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0204.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0301.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0301.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0302.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0302.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0303.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0303.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0304.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0304.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0305.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0305.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0306.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0306.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0307.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0307.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0308.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0308.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0309.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0309.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0310.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0310.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0311.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0311.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0312.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0312.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0313.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0313.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0314.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0314.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0315.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0315.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0316.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0316.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0317.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0317.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0318.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0318.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0319.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0319.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0320.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0320.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0321.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0321.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0322.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0322.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0323.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0323.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0324.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0324.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0325.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0325.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0326.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0326.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0327.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0327.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0328.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0328.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0401.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0401.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0402.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0402.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0403.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0403.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0404.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0404.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0405.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0405.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0406.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0406.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0407.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0407.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0501.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0501.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0502.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0502.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0503.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0503.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0504.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0504.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0505.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0505.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0506.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0506.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0507.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0507.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0508.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0508.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0601.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0601.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0602.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0602.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0603.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0603.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0604.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0604.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0605.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0605.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0606.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0606.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0701.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0701.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0702.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0702.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0703.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0703.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0704.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0704.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0705.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0705.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0706.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0706.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0707.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0707.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0708.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0708.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0709.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0709.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0801.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0801.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0802.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0802.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0803.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0803.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0804.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0804.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0805.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0805.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0901.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0901.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0902.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0902.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0903.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0903.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0904.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0904.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.0905.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.0905.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.aa01.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.aa01.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.ab01.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.ab01.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/figs/sam.ab02.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/figs/sam.ab02.gif + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appa_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appa_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appa_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appa_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appa_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appa_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appa_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appa_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appa_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appa_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appb_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appb_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appb_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appb_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appb_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appb_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appc_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appc_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appd_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appd_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appe_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appe_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/appf_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/appf_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_06.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_06.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_07.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_07.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch01_08.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch01_08.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch02_06.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch02_06.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch03_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch03_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch03_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch03_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch03_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch03_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_06.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_06.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_07.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_07.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch04_08.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch04_08.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch05_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch05_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch05_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch05_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch05_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch05_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch05_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch05_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch05_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch05_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch06_06.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch06_06.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch07_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch07_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch07_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch07_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch07_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch07_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_04.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_04.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_05.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_05.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_06.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_06.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch08_07.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch08_07.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch09_01.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch09_01.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch09_02.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch09_02.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/ch09_03.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/ch09_03.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/index.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/index.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/inx.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/inx.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/licenseinfo.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/licenseinfo.html + +FILE:SambaDOC:SHARED:usr/lib/samba/swat/using_samba/this_edition.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/using_samba/this_edition.html diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg new file mode 100644 index 00000000000..e50c6f20a2d --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg @@ -0,0 +1,417 @@ + +PKG:SambaSWAT: +description = "Samba Web Administration Tool" +dependencies = +distTreeRootSHARED = $Samba_DIR +distTreeRootCLIENT = $Samba_DIR + +FILE:SambaSWAT:SHARED:usr/lib/samba/sbin/swat: +mode = 0755 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/sbin/swat + +DIR:SambaSWAT:SHARED:usr/lib/samba/swat: +mode = 0755 +owner = root +group = sys +flags = + +DIR:SambaSWAT:SHARED:usr/lib/samba/swat/images: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/globals.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/globals.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/home.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/home.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/passwd.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/passwd.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/printers.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/printers.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/samba.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/samba.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/shares.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/shares.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/status.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/status.gif + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/images/viewconfig.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/images/viewconfig.gif + +DIR:SambaSWAT:SHARED:usr/lib/samba/swat/help: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/welcome.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/welcome.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/DOMAIN_MEMBER.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/DOMAIN_MEMBER.html +exportPath = /usr/share/doc/samba/help/DOMAIN_MEMBER.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/NT_Security.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/NT_Security.html +exportPath = /usr/share/doc/samba/help/NT_Security.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/OS2-Client-HOWTO.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/OS2-Client-HOWTO.html +exportPath = /usr/share/doc/samba/help/OS2-Client-HOWTO.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/Samba-HOWTO-Collection.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/Samba-HOWTO-Collection.html +exportPath = /usr/share/doc/samba/help/Samba-HOWTO-Collection.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/UNIX_INSTALL.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/UNIX_INSTALL.html +exportPath = /usr/share/doc/samba/help/UNIX_INSTALL.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/findsmb.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/findsmb.1.html +exportPath = /usr/share/doc/samba/help/findsmb.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/lmhosts.5.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/lmhosts.5.html +exportPath = /usr/share/doc/samba/help/lmhosts.5.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/make_smbcodepage.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/make_smbcodepage.1.html +exportPath = /usr/share/doc/samba/help/make_smbcodepage.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/msdfs_setup.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/msdfs_setup.html +exportPath = /usr/share/doc/samba/help/msdfs_setup.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/nmbd.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/nmbd.8.html +exportPath = /usr/share/doc/samba/help/nmbd.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/nmblookup.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/nmblookup.1.html +exportPath = /usr/share/doc/samba/help/nmblookup.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/printer_driver2.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/printer_driver2.html +exportPath = /usr/share/doc/samba/help/printer_driver2.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/rpcclient.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/rpcclient.1.html +exportPath = /usr/share/doc/samba/help/rpcclient.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-faq.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/samba-pdc-faq.html +exportPath = /usr/share/doc/samba/help/samba-pdc-faq.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-howto.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/samba-pdc-howto.html +exportPath = /usr/share/doc/samba/help/samba-pdc-howto.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba.7.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/samba.7.html +exportPath = /usr/share/doc/samba/help/samba.7.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smb.conf.5.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smb.conf.5.html +exportPath = /usr/share/doc/samba/help/smb.conf.5.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbcacls.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbcacls.1.html +exportPath = /usr/share/doc/samba/help/smbcacls.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbclient.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbclient.1.html +exportPath = /usr/share/doc/samba/help/smbclient.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbcontrol.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbcontrol.1.html +exportPath = /usr/share/doc/samba/help/smbcontrol.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbd.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbd.8.html +exportPath = /usr/share/doc/samba/help/smbd.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbmnt.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbmnt.8.html +exportPath = /usr/share/doc/samba/help/smbmnt.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbmount.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbmount.8.html +exportPath = /usr/share/doc/samba/help/smbmount.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbpasswd.5.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbpasswd.5.html +exportPath = /usr/share/doc/samba/help/smbpasswd.5.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbpasswd.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbpasswd.8.html +exportPath = /usr/share/doc/samba/help/smbpasswd.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbrun.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbrun.1.html +exportPath = /usr/share/doc/samba/help/smbrun.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbsh.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbsh.1.html +exportPath = /usr/share/doc/samba/help/smbsh.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbspool.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbspool.8.html +exportPath = /usr/share/doc/samba/help/smbspool.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbstatus.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbstatus.1.html +exportPath = /usr/share/doc/samba/help/smbstatus.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbtar.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbtar.1.html +exportPath = /usr/share/doc/samba/help/smbtar.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbumount.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/smbumount.8.html +exportPath = /usr/share/doc/samba/help/smbumount.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/swat.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/swat.8.html +exportPath = /usr/share/doc/samba/help/swat.8.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/testparm.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/testparm.1.html +exportPath = /usr/share/doc/samba/help/testparm.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/testprns.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/testprns.1.html +exportPath = /usr/share/doc/samba/help/testprns.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/wbinfo.1.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/wbinfo.1.html +exportPath = /usr/share/doc/samba/help/wbinfo.1.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/winbind.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/winbind.html +exportPath = /usr/share/doc/samba/help/winbind.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/winbindd.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/winbindd.8.html +exportPath = /usr/share/doc/samba/help/winbindd.8.html + +DIR:SambaSWAT:SHARED:usr/lib/samba/swat/include: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/include/footer.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/include/footer.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/include/header.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/include/header.html + +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/README: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/README diff --git a/packaging/Caldera/OpenServer/smb.conf b/packaging/Caldera/OpenServer/smb.conf index 717c4efb174..1dab1e54dfb 100644 --- a/packaging/Caldera/OpenServer/smb.conf +++ b/packaging/Caldera/OpenServer/smb.conf @@ -15,7 +15,10 @@ [global] # workgroup = NT-Domain-Name or Workgroup-Name - workgroup = MYGROUP + workgroup = %%WORKGROUP%% + +# netbios name + netbios name = %%NBNAME%% # server string is the equivalent of the NT Description field server string = Samba Server @@ -43,16 +46,16 @@ # this tells Samba to use a separate log file for each machine # that connects - log file = /usr/local/samba/var/log.%m + log file = /usr/lib/samba/var/log.%m # Put a capping on the size of the log files (in Kb). max log size = 50 # Security mode. Most people will want user level security. See # security_level.txt for details. - security = user + security = %%SECURITY%% # Use password server option only with security = server -; password server = +; password server = %%PWSERVER%% # Password Level allows matching of _n_ characters of the password for # all combinations of upper and lower case. @@ -90,7 +93,7 @@ # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them # here. See the man page for details. -; interfaces = 192.168.12.2/24 192.168.13.2/24 +; interfaces = %%INTERFACES%% # Configure remote browse list synchronisation here # request announcement to, or browse list sync from: @@ -106,12 +109,12 @@ # OS Level determines the precedence of this server in master browser # elections. The default value should be reasonable -; os level = 33 + os level = %%OSLEVEL%% # Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job -; domain master = yes + domain master = %%DOMAINMASTER%% # Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election @@ -119,11 +122,11 @@ # Use only if you have an NT server on your network that has been # configured at install time to be a primary domain controller. -; domain controller = +; domain controller = %%PDC%% # Enable this if you want Samba to be a domain logon server for # Windows95 workstations. -; domain logons = yes + domain logons = %%DOMAINLOGONS%% # if you enable domain logons then you may want a per-machine or # per user logon script @@ -152,11 +155,11 @@ # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server -; wins support = yes +; wins support = %%WINSSUPPORT%% # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both -; wins server = w.x.y.z +; wins server = %%WINSSERVER%% # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be diff --git a/packaging/Caldera/OpenServer/smb.mkdev b/packaging/Caldera/OpenServer/smb.mkdev new file mode 100755 index 00000000000..f474e9f8b76 --- /dev/null +++ b/packaging/Caldera/OpenServer/smb.mkdev @@ -0,0 +1,47 @@ +#!/bin/sh +# Samba mkdev script for SCO OpenServer +# +# Run "initconfig" to set up initial Samba configuration; +# move init script into place so that Samba will be started +# at boot time. + +# Prompt with mesg, return non-zero on q +prompt() { + FAIL=1 OK=0 + while echo "\n${mesg}or enter q to quit: \c" >&2 + do read cmd + case $cmd in + +x|-x) set $cmd ;; + Q|q) return $FAIL ;; + !*) eval `expr "$cmd" : "!\(.*\)"` ;; + "") # If there is an argument use it as the default + # else loop until 'cmd' is set + [ "$1" ] && { + cmd=$1 + return $OK + } + : continue + ;; + *) return $OK ;; + esac + done +} + +mesg="\tSamba Configuration\n +\t1. Configure and activate Samba +\t2. Deactivate Samba\n +Select an option " + +while true ; do + prompt || exit 1 + case $cmd in + 1) /usr/lib/samba/bin/initconfig + cp -f /etc/init.d/samba /etc/rc2.d/S92samba + exit 0 + ;; + 2) rm -f /etc/rc2.d/S92samba + exit 0 + ;; + esac +done + diff --git a/packaging/Caldera/OpenServer/swat.readme b/packaging/Caldera/OpenServer/swat.readme new file mode 100644 index 00000000000..b7467baa1ca --- /dev/null +++ b/packaging/Caldera/OpenServer/swat.readme @@ -0,0 +1,40 @@ +This is a brief description of how to use the Samba Web +Administration Tool on your machine. + +Launching +--------- + +To launch SWAT just run your favourite web browser and point it at +http://localhost:598/ + +Note that you can attach to SWAT from any IP connected machine but +connecting from a remote machine leaves your connection open to +password sniffing as passwords will be sent in the clear over the +wire. + +You should be prompted for a username/password when you connect. You +will need to provide the username "root" and the correct root +password. + +Running +------- + +Just follow your nose! If you can't work out how to use it then maybe +you should use "vi smb.conf" instead. + + +WARNINGS +-------- + +SWAT will rewrite your smb.conf file. It will rearrange the entries +and delete all comments, include= and copy= options. If you have a +carefully crafted smb.conf then back it up or don't use SWAT! + + +Development +----------- + +Please join the samba-technical mailing list if you want to discuss +the development of SWAT. Note that this list is for technical developer +discussions and is not a general help list. + -- cgit From 73f9934bdd8904ca1ed4403149315cb6e647191d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 22:31:48 +0000 Subject: Fixed change notify as per app-head. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 155 +++++++++++-------------------------- 1 file changed, 47 insertions(+), 108 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 60c0c3ae6c2..010f51a163c 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -49,9 +49,10 @@ struct table_node { /* and the notify info asked about */ /* that's the central struct */ typedef struct _Printer{ + struct _Printer *prev, *next; BOOL document_started; BOOL page_started; - int jobid; /* jobid in printing backend */ + int jobid; /* jobid in printing backend */ BOOL printer_type; union { fstring handlename; @@ -74,6 +75,8 @@ typedef struct _Printer{ } client; } Printer_entry; +static Printer_entry *printers_list; + typedef struct _counter_printer_0 { ubi_dlNode Next; ubi_dlNode Prev; @@ -194,6 +197,9 @@ static void free_printer_entry(void *ptr) Printer->notify.option=NULL; Printer->notify.client_connected=False; + /* Remove from the internal list. */ + DLIST_REMOVE(printers_list, Printer); + SAFE_FREE(Printer); } @@ -552,11 +558,14 @@ static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name) DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count )); + /* Add to the internal list. */ + DLIST_ADD(printers_list, new_printer); + return True; } /******************************************************************** - Return True is the handle is a print server. + Return True if the handle is a print server. ********************************************************************/ static BOOL handle_is_printserver(pipes_struct *p, POLICY_HND *handle) @@ -607,99 +616,45 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) } /*************************************************************************** - receive the notify message + Receive the notify message. ****************************************************************************/ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) { + Printer_entry *find_printer; WERROR status; - struct pipes_struct *p; - struct policy *pol; - struct handle_list *hl; - fstring printer; - char *msg = (char *)buf; - POLICY_HND sent_hnd; - BOOL valid_sent_hnd = False; - - *printer = '\0'; - - if (len < 5 + sizeof(POLICY_HND)) { - DEBUG(0,("srv_spoolss_receive_message: got null message !\n")); - return; - } - - /* - * If this is a message to ourselves, take note of the fact. - * we'll be looking for the handle attached to the pipe to find - * the open printer instance. - */ - - fstrcpy(printer,&msg[4 + sizeof(POLICY_HND)]); - DEBUG(10,("srv_spoolss_receive_message: Got message about printer %s\n", printer )); - - if (IVAL(buf,0) == (uint32)sys_getpid()) { - memcpy(&sent_hnd, &msg[4], sizeof(POLICY_HND)); - DEBUG(10,("srv_spoolss_receive_message: using our own handle.\n")); - valid_sent_hnd = True; - } + char msg[8]; + uint32 low, high; - /* - * We need to enumerate all printers. The handle list is shared - * across pipes of the same name, so just find the first open - * spoolss pipe. - */ - - hl = NULL; - for ( p = get_first_pipe(); p; p = get_next_pipe(p)) { - if (strequal(p->name, "spoolss")) { - hl = p->pipe_handles; - break; - } - } - - if (!hl) { - DEBUG(0,("srv_spoolss_receive_message: no handle list on spoolss pipe !\n")); + if (len != sizeof(msg)) { + DEBUG(0,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); return; } - /* - * If a handle was sent from this process, look for it only, don't - * do the full search. - */ + low = IVAL(msg,0); + high = IVAL(msg,4); - if (valid_sent_hnd) { - Printer_entry *find_printer = find_printer_index_by_hnd(p, &sent_hnd); + DEBUG(10,("srv_spoolss_receive_message: Got message printer change low=0x%x high=0x%x\n", (unsigned int)low, + (unsigned int)high )); - if (!find_printer) { - DEBUG(0,("srv_spoolss_receive_message: Cannot find printer by sent handle.\n")); - return; - } + find_printer = printers_list; - if (find_printer->notify.client_connected==True) - cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, PRINTER_CHANGE_ALL, 0x0, &status); - - return; - } - - /* Handle was sent from a different process. */ - /* Iterate the printer list on this pipe. */ - for (pol = hl->Policy; pol; pol = pol->next ) { - Printer_entry *find_printer = (Printer_entry *)pol->data_ptr; - - if (!find_printer) - continue; + /* Iterate the printer list */ + for(; find_printer; find_printer = find_printer->next) { /* - * if the entry is the given printer or if it's a printerserver - * we send the message + * If the entry has a connected client we send the message. */ - if (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) - if (strcmp(find_printer->dev.handlename, printer)) - continue; - if (find_printer->notify.client_connected==True) - cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, PRINTER_CHANGE_ALL, 0x0, &status); + if (find_printer->notify.client_connected==True) { + DEBUG(10,("srv_spoolss_receive_message: printerserver [%s]\n", find_printer->dev.printerservername )); + if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, low, high, &status)) + DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n", + (unsigned int)W_ERROR_V(status))); + else + DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn failed\n")); + } } } @@ -707,34 +662,15 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size Send a notify event. ****************************************************************************/ -static BOOL srv_spoolss_sendnotify(pipes_struct *p, POLICY_HND *handle) +static BOOL srv_spoolss_sendnotify(uint32 high, uint32 low) { - pstring msg; - size_t msg_len; + char msg[8]; - Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + SIVAL(msg,0,low); + SIVAL(msg,4,high); + DEBUG(10,("srv_spoolss_sendnotify: printer change low=%x high=%x\n", msg[0], msg[1])); - if (!Printer) { - DEBUG(0,("srv_spoolss_sendnotify: Invalid handle (%s).\n", OUR_HANDLE(handle))); - return False; - } - - memset(msg, '\0', sizeof(msg)); - - if (Printer->printer_type==PRINTER_HANDLE_IS_PRINTER) { - uint32 mypid = (uint32)sys_getpid(); - SIVAL(msg,0,mypid); - memcpy(&msg[4], handle, sizeof(POLICY_HND)); - fstrcpy(&msg[4+sizeof(POLICY_HND)], Printer->dev.handlename); - msg_len = 4 + sizeof(POLICY_HND) + strlen(Printer->dev.handlename) + 1; - } else { - fstrcpy(&msg[4+sizeof(POLICY_HND)], ""); - msg_len = 4 + sizeof(POLICY_HND) + 1; - } - - DEBUG(10,("srv_spoolss_sendnotify: Sending message about printer %s\n", &msg[4+sizeof(POLICY_HND)] )); - - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, msg_len, False); + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(msg), False); return True; } @@ -1125,7 +1061,7 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL update_c_setprinter(FALSE); if (W_ERROR_IS_OK(result)) { - srv_spoolss_sendnotify(p, handle); + srv_spoolss_sendnotify(0, PRINTER_CHANGE_DELETE_PRINTER); } return result; @@ -4858,7 +4794,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); - srv_spoolss_sendnotify(p, handle); + srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); return result; } @@ -6020,7 +5956,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_INVALID_PARAM; } - /* + /* * When a printer is created, the drivername bound to the printer is used * to lookup previously saved driver initialization info, which is then * bound to the new printer, simulating what happens in the Windows arch. @@ -6045,7 +5981,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ update_c_setprinter(False); - srv_spoolss_sendnotify(p, handle); + srv_spoolss_sendnotify(0, PRINTER_CHANGE_ADD_PRINTER); return WERR_OK; } @@ -6468,7 +6404,10 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP free_nt_printer_param(¶m); SAFE_FREE(old_param.data); - srv_spoolss_sendnotify(p, handle); +#if 0 + /* Is this correct. JRA ? */ + srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); +#endif return status; } -- cgit From eca62dfde46b8974b60aebdafc1cdf49e4453b06 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Jan 2002 22:33:18 +0000 Subject: Reformatting fix. Jeremy. --- source/rpc_server/srv_samr_nt.c | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index 9c067eada65..2f1f6bce8c2 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -422,8 +422,8 @@ NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN static uint32 get_lsa_policy_samr_rid(struct samr_info *info) { if (!info) { - DEBUG(3,("Error getting policy\n")); - return 0xffffffff; + DEBUG(3,("Error getting policy\n")); + return 0xffffffff; } return info->sid.sub_auths[info->sid.num_auths-1]; @@ -1981,21 +1981,21 @@ NTSTATUS _samr_connect_anon(pipes_struct *p, SAMR_Q_CONNECT_ANON *q_u, SAMR_R_CO { struct samr_info *info = NULL; - /* set up the SAMR connect_anon response */ + /* set up the SAMR connect_anon response */ - r_u->status = NT_STATUS_OK; + r_u->status = NT_STATUS_OK; - /* associate the user's SID with the new handle. */ - if ((info = get_samr_info_by_sid(NULL)) == NULL) - return NT_STATUS_NO_MEMORY; + /* associate the user's SID with the new handle. */ + if ((info = get_samr_info_by_sid(NULL)) == NULL) + return NT_STATUS_NO_MEMORY; - info->status = q_u->unknown_0; + info->status = q_u->unknown_0; - /* get a (unique) handle. open a policy on it. */ - if (!create_policy_hnd(p, &r_u->connect_pol, free_samr_info, (void *)info)) - return NT_STATUS_OBJECT_NAME_NOT_FOUND; + /* get a (unique) handle. open a policy on it. */ + if (!create_policy_hnd(p, &r_u->connect_pol, free_samr_info, (void *)info)) + return NT_STATUS_OBJECT_NAME_NOT_FOUND; - return r_u->status; + return r_u->status; } /******************************************************************* @@ -2006,23 +2006,23 @@ NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u { struct samr_info *info = NULL; - DEBUG(5,("_samr_connect: %d\n", __LINE__)); + DEBUG(5,("_samr_connect: %d\n", __LINE__)); - r_u->status = NT_STATUS_OK; + r_u->status = NT_STATUS_OK; - /* associate the user's SID with the new handle. */ - if ((info = get_samr_info_by_sid(NULL)) == NULL) - return NT_STATUS_NO_MEMORY; + /* associate the user's SID with the new handle. */ + if ((info = get_samr_info_by_sid(NULL)) == NULL) + return NT_STATUS_NO_MEMORY; - info->status = q_u->access_mask; + info->status = q_u->access_mask; - /* get a (unique) handle. open a policy on it. */ - if (!create_policy_hnd(p, &r_u->connect_pol, free_samr_info, (void *)info)) - return NT_STATUS_OBJECT_NAME_NOT_FOUND; + /* get a (unique) handle. open a policy on it. */ + if (!create_policy_hnd(p, &r_u->connect_pol, free_samr_info, (void *)info)) + return NT_STATUS_OBJECT_NAME_NOT_FOUND; - DEBUG(5,("_samr_connect: %d\n", __LINE__)); + DEBUG(5,("_samr_connect: %d\n", __LINE__)); - return r_u->status; + return r_u->status; } /********************************************************************** @@ -2134,9 +2134,9 @@ NTSTATUS _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OP * JFM. */ - /* associate the user's SID with the new handle. */ - if ((info = get_samr_info_by_sid(&sid)) == NULL) - return NT_STATUS_NO_MEMORY; + /* associate the user's SID with the new handle. */ + if ((info = get_samr_info_by_sid(&sid)) == NULL) + return NT_STATUS_NO_MEMORY; /* get a (unique) handle. open a policy on it. */ if (!create_policy_hnd(p, alias_pol, free_samr_info, (void *)info)) -- cgit From dded84b580eda97452a715efd340712633fb99f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 Jan 2002 00:53:11 +0000 Subject: Fixed link list add in wrong place that caused coredump. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 010f51a163c..d8151c507bf 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -541,6 +541,9 @@ static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name) new_printer->notify.option=NULL; + /* Add to the internal list. */ + DLIST_ADD(printers_list, new_printer); + if (!create_policy_hnd(p, hnd, free_printer_entry, new_printer)) { SAFE_FREE(new_printer); return False; @@ -558,9 +561,6 @@ static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name) DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count )); - /* Add to the internal list. */ - DLIST_ADD(printers_list, new_printer); - return True; } @@ -2356,6 +2356,9 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, DEBUG(4,("printserver_notify_info\n")); + if (!Printer) + return WERR_BADFID; + option=Printer->notify.option; id=1; info->version=2; @@ -2413,6 +2416,9 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY DEBUG(4,("printer_notify_info\n")); + if (!Printer) + return WERR_BADFID; + option=Printer->notify.option; id=0xffffffff; info->version=2; -- cgit From bbdd986a476bb497303abed7727b4b0212c4fdbb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 Jan 2002 02:02:24 +0000 Subject: Insure fixes. Jeremy. --- source/printing/nt_printing.c | 12 ++++-------- source/tdb/tdb.c | 8 ++++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index b5b31cab8e6..76687aa4062 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3655,6 +3655,7 @@ WERROR nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx) { + extern DOM_SID global_sam_sid; SEC_ACE ace[3]; SEC_ACCESS sa; SEC_ACL *psa = NULL; @@ -3676,19 +3677,14 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx) if (winbind_lookup_name(lp_workgroup(), &owner_sid, &name_type)) { sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN); } else { - uint32 owner_rid; /* Backup plan - make printer owned by admins or root. This should emulate a lanman printer as security settings can't be changed. */ - sid_peek_rid(&owner_sid, &owner_rid); - - if (owner_rid != BUILTIN_ALIAS_RID_PRINT_OPS && - owner_rid != BUILTIN_ALIAS_RID_ADMINS && - owner_rid != DOMAIN_USER_RID_ADMIN && - !lookup_name("root", &owner_sid, &name_type)) { - sid_copy(&owner_sid, &global_sid_World); + if (!lookup_name("root", &owner_sid, &name_type)) { + sid_copy(&owner_sid, &global_sam_sid); + sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN); } } diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 6398a2a166c..15a0749ec2f 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -1379,7 +1379,7 @@ int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag) static int tdb_already_open(dev_t device, ino_t ino) { - TDB_CONTEXT *i; + TDB_CONTEXT *i = NULL; for (i = tdbs; i; i = i->next) { if (i->device == device && i->inode == ino) { @@ -1411,7 +1411,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode, tdb_log_func log_fn) { - TDB_CONTEXT *tdb; + TDB_CONTEXT *tdb = NULL; struct stat st; int rev = 0, locked; @@ -1571,7 +1571,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, /* close a database */ int tdb_close(TDB_CONTEXT *tdb) { - TDB_CONTEXT **i; + TDB_CONTEXT **i = NULL; int ret = 0; if (tdb->map_ptr) { @@ -1728,7 +1728,7 @@ fail: /* reopen all tdb's */ int tdb_reopen_all(void) { - TDB_CONTEXT *tdb; + TDB_CONTEXT *tdb = NULL; for (tdb=tdbs; tdb; tdb = tdb->next) { if (tdb_reopen(tdb) != 0) return -1; -- cgit From 6aecfb149e6c1dcfb6b952a88079f90120e3ba43 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 Jan 2002 02:24:58 +0000 Subject: Insure caught memleak. Jeremy. --- source/tdb/tdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 15a0749ec2f..5a871e7fcc6 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -1563,6 +1563,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, if (tdb->fd != -1) close(tdb->fd); SAFE_FREE(tdb->locked); + SAFE_FREE(tdb); errno = save_errno; return NULL; } -- cgit From 6b0ee142a694f29ecef91b22d0406a8362a7eb46 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 Jan 2002 03:15:04 +0000 Subject: Don't clear a printer handle before passing it to the close fn (D'oh !). Jeremy. --- source/libsmb/unexpected.c | 2 +- source/rpc_server/srv_spoolss_nt.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libsmb/unexpected.c b/source/libsmb/unexpected.c index b77e7490a0d..6a54250506d 100644 --- a/source/libsmb/unexpected.c +++ b/source/libsmb/unexpected.c @@ -147,7 +147,7 @@ check for a particular packet in the unexpected packet queue struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, char *mailslot_name) { - TDB_CONTEXT *tdb2; + TDB_CONTEXT *tdb2 = NULL; tdb2 = tdb_open_log(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0); if (!tdb2) return NULL; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d8151c507bf..981c2c52a3f 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1027,16 +1027,16 @@ WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R if (Printer && Printer->document_started) _spoolss_enddocprinter_internal(p, handle); /* print job was not closed */ + if (!close_printer_handle(p, handle)) + return WERR_BADFID; + /* clear the returned printer handle. Observed behavior from Win2k server. Don't think this really matters. Previous code just copied the value of the closed handle. --jerry */ - memset(&r_u->handle, 0x0, sizeof(r_u->handle)); + memset(&r_u->handle, '\0', sizeof(r_u->handle)); - if (!close_printer_handle(p, handle)) - return WERR_BADFID; - return WERR_OK; } -- cgit From b59608c720e3f8348696de664edfdaeeac0d7a61 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 05:07:30 +0000 Subject: I know believe the GetPrinter info level 4 and 5 to be correct. Although the Win2k spooler seems a little funny at times with these (against both Win2k and Samba print servers). --- source/rpc_server/srv_spoolss_nt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 981c2c52a3f..d2aee1937d3 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -3488,18 +3488,10 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET return getprinter_level_2(snum, buffer, offered, needed); case 3: return getprinter_level_3(snum, buffer, offered, needed); -#if 0 /* JERRY */ - - /* commented these out until I've had time to gain - my confidence back. Commented out after a series of BSOD on - win2k clients althought I cannot say for sure that tehse were - the cause --jerry 22/01/2002 */ - case 4: return getprinter_level_4(snum, buffer, offered, needed); case 5: return getprinter_level_5(snum, buffer, offered, needed); -#endif } return WERR_UNKNOWN_LEVEL; } -- cgit From 0056b08a4d5fa555088ab8689b9f02f73bd120b2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 05:09:32 +0000 Subject: fixed inverted logic with the lp_default_devmode() check. Jeremy, you can beat me later for this one.... :-( --- source/printing/nt_printing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 76687aa4062..340e659efb7 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2560,12 +2560,12 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin */ if (lp_default_devmode(snum)) { - info.devmode = NULL; - } - else { if ((info.devmode = construct_nt_devicemode(info.printername)) == NULL) goto fail; } + else { + info.devmode = NULL; + } /* This will get the current RPC talloc context, but we should be passing this as a parameter... fixme... JRA ! */ -- cgit From dcca7957c135478a6ff4276c79166bcc4fff4bb9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 06:19:00 +0000 Subject: bug in processing message for spoolss_notify. We we never using the low,high values (didn't read the mesage buffer). --- source/rpc_server/srv_spoolss_nt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d2aee1937d3..1247e614cb2 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -631,6 +631,7 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size return; } + memcpy(msg, buf, len); low = IVAL(msg,0); high = IVAL(msg,4); @@ -668,7 +669,7 @@ static BOOL srv_spoolss_sendnotify(uint32 high, uint32 low) SIVAL(msg,0,low); SIVAL(msg,4,high); - DEBUG(10,("srv_spoolss_sendnotify: printer change low=%x high=%x\n", msg[0], msg[1])); + DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x\n", low, high)); message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(msg), False); return True; -- cgit From 8975f4beb7b975a720e72a63b746ecad24193367 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 23 Jan 2002 11:36:51 +0000 Subject: Sync up with changes to startpageprinter in HEAD. --- source/rpc_server/srv_spoolss_nt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 1247e614cb2..03b4c170efa 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4055,13 +4055,13 @@ WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, Printer_entry *Printer = find_printer_index_by_hnd(p, handle); - if (Printer) { - Printer->page_started=True; - return WERR_OK; + if (!Printer) { + DEBUG(3,("Error in startpageprinter printer handle\n")); + return WERR_BADFID; } - DEBUG(3,("Error in startpageprinter printer handle\n")); - return WERR_BADFID; + Printer->page_started=True; + return WERR_OK; } /**************************************************************************** -- cgit From 6e26489d755891485ba3be28d6708716aae63931 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 14:24:58 +0000 Subject: fixed typo in debug statement --- source/rpc_parse/parse_spoolss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index bc4b543022c..8d649e5fc56 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -6216,7 +6216,7 @@ BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct * BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth) { - prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter"); + prs_debug(ps, depth, desc, "spoolss_io_r_reply_rrpcn"); depth++; if (!prs_align(ps)) -- cgit From bd91cf6535b5306fd67932da9e029c66557346f2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 16:42:44 +0000 Subject: make sure we return the correct error code when the client attempts to add a form that already exists. --- source/include/doserr.h | 1 + source/rpc_server/srv_spoolss_nt.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source/include/doserr.h b/source/include/doserr.h index 3262370dfd8..a2c53791cc8 100644 --- a/source/include/doserr.h +++ b/source/include/doserr.h @@ -155,6 +155,7 @@ #define WERR_BADFUNC W_ERROR(1) #define WERR_INSUFFICIENT_BUFFER W_ERROR(122) #define WERR_NO_SUCH_SHARE W_ERROR(67) +#define WERR_ALREADY_EXISTS W_ERROR(80) #define WERR_INVALID_PARAM W_ERROR(87) #define WERR_NOT_SUPPORTED W_ERROR(50) #define WERR_BAD_PASSWORD W_ERROR(86) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 03b4c170efa..06a143a7229 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6073,6 +6073,7 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen pstring long_archi; pstring short_archi; DRIVER_DIRECTORY_1 *info=NULL; + fstring asc_name, servername; unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi)-1); @@ -6082,6 +6083,20 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen if((info=(DRIVER_DIRECTORY_1 *)malloc(sizeof(DRIVER_DIRECTORY_1))) == NULL) return WERR_NOMEM; +#if 0 /* JERRY */ + /* use the name the client sent us */ + + unistr2_to_ascii(asc_name, name, sizeof(asc_name)-1); + if (asc_name[0] == '\\' && asc_name[1] == '\\') + fstrcpy(servername, asc_name); + else { + fstrcpy(servername, "\\\\"); + fstrcat(servername, asc_name); + } + + slprintf(path, sizeof(path)-1, "%s\\print$\\%s", servername, short_archi); +#endif + slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi); DEBUG(4,("printer driver directory: [%s]\n", path)); @@ -6485,7 +6500,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM /* can't add if builtin */ if (get_a_builtin_ntform(&form->name,&tmpForm)) { - return WERR_INVALID_PARAM; + return WERR_ALREADY_EXISTS; } count=get_ntforms(&list); -- cgit From ffca0084f821af309ef91b5ff4050fb5a9243a37 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 20:10:11 +0000 Subject: ChangeID must be set on AddForm(), DeleteForm(), & SetForm() --- source/rpc_server/srv_spoolss_nt.c | 68 +++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 06a143a7229..74c713e9f88 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4793,7 +4793,9 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); +#if 0 /* JERRY */ srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); +#endif return result; } @@ -6481,6 +6483,9 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM /* uint32 level = q_u->level; - notused. */ FORM *form = &q_u->form; nt_forms_struct tmpForm; + int snum; + WERROR status = WERR_OK; + NT_PRINTER_INFO_LEVEL *printer = NULL; int count=0; nt_forms_struct *list=NULL; @@ -6498,6 +6503,10 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM * had time to verify. --jerry */ + + if (!get_printer_snum(p,handle, &snum)) + return WERR_BADFID; + /* can't add if builtin */ if (get_a_builtin_ntform(&form->name,&tmpForm)) { return WERR_ALREADY_EXISTS; @@ -6507,10 +6516,27 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM if(!add_a_form(&list, form, &count)) return WERR_NOMEM; write_ntforms(&list, count); + + /* + * ChangeID must always be set + */ + + if (!get_printer_snum(p,handle, &snum)) + return WERR_BADFID; + status = get_a_printer(&printer, 2, lp_servicename(snum)); + if (!W_ERROR_IS_OK(status)) + goto done; + + status = mod_a_printer(*printer, 2); + if (!W_ERROR_IS_OK(status)) + goto done; + +done: + free_a_printer(&printer, 2); SAFE_FREE(list); - return WERR_OK; + return status; } /**************************************************************************** @@ -6525,6 +6551,9 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE WERROR ret = WERR_OK; nt_forms_struct *list=NULL; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + int snum; + WERROR status = WERR_OK; + NT_PRINTER_INFO_LEVEL *printer = NULL; DEBUG(5,("spoolss_deleteform\n")); @@ -6542,6 +6571,23 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE if(!delete_a_form(&list, form_name, &count, &ret)) return WERR_INVALID_PARAM; + /* + * ChangeID must always be set + */ + + if (!get_printer_snum(p,handle, &snum)) + return WERR_BADFID; + + status = get_a_printer(&printer, 2, lp_servicename(snum)); + if (!W_ERROR_IS_OK(status)) + goto done; + + status = mod_a_printer(*printer, 2); + if (!W_ERROR_IS_OK(status)) + goto done; + +done: + free_a_printer(&printer, 2); SAFE_FREE(list); return ret; @@ -6557,6 +6603,9 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * /* uint32 level = q_u->level; - notused. */ FORM *form = &q_u->form; nt_forms_struct tmpForm; + int snum; + WERROR status = WERR_OK; + NT_PRINTER_INFO_LEVEL *printer = NULL; int count=0; nt_forms_struct *list=NULL; @@ -6577,6 +6626,23 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * update_a_form(&list, form, count); write_ntforms(&list, count); + /* + * ChangeID must always be set + */ + + if (!get_printer_snum(p,handle, &snum)) + return WERR_BADFID; + + status = get_a_printer(&printer, 2, lp_servicename(snum)); + if (!W_ERROR_IS_OK(status)) + goto done; + + status = mod_a_printer(*printer, 2); + if (!W_ERROR_IS_OK(status)) + goto done; + +done: + free_a_printer(&printer, 2); SAFE_FREE(list); return WERR_OK; -- cgit From 294139bf5459206cb7385346cdcc990ebef5530b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jan 2002 20:12:05 +0000 Subject: updated an old comment so we don't get confused. --- source/printing/nt_printing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 340e659efb7..8d808dcedef 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2796,8 +2796,8 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) { /* * Update the changestamp. Emperical tests show that the - * ChangeID is always updated,but c_setprinter is only - * incremented on a SetPrinter() call. + * ChangeID is always updated,but c_setprinter is + * global spooler variable (not per printer). */ /* ChangeID **must** be increasing over the lifetime -- cgit From 2f10ca1f2859c4d276849ee5c78fee059a7114a9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Jan 2002 17:02:51 +0000 Subject: fixed broken links, fixed, typo, and bad SGML syntax --- docs/docbook/manpages/nmbd.8.sgml | 100 +++++++------ docs/docbook/manpages/smbd.8.sgml | 300 +++++++------------------------------ docs/docbook/manpages/smbsh.1.sgml | 2 +- 3 files changed, 104 insertions(+), 298 deletions(-) diff --git a/docs/docbook/manpages/nmbd.8.sgml b/docs/docbook/manpages/nmbd.8.sgml index a1de5860c47..92149d503a2 100644 --- a/docs/docbook/manpages/nmbd.8.sgml +++ b/docs/docbook/manpages/nmbd.8.sgml @@ -198,25 +198,25 @@ smb.conf. - + -p <UDP port number> UDP port number is a positive integer value. - This option changes the default UDP port number (normally 137) - that nmbd responds to name queries on. Don't - use this option unless you are an expert, in which case you + This option changes the default UDP port number (normally 137) + that nmbd responds to name queries on. Don't + use this option unless you are an expert, in which case you won't need help! - + -s <configuration file> - The default configuration file name + The default configuration file name is set at build time, typically as /usr/local/samba/lib/smb.conf, but this may be changed when Samba is autoconfigured. - The file specified contains the configuration details - required by the server. See + The file specified contains the configuration details + required by the server. See smb.conf(5) for more information. @@ -229,54 +229,58 @@ /etc/inetd.conf - If the server is to be run by the - inetd meta-daemon, this file - must contain suitable startup information for the - meta-daemon. See the section INSTALLATION below. + If the server is to be run by the + inetd meta-daemon, this file + must contain suitable startup information for the + meta-daemon. See the UNIX_INSTALL.html document + for details. - + /etc/rc - or whatever initialization script your + or whatever initialization script your system uses). - If running the server as a daemon at startup, - this file will need to contain an appropriate startup - sequence for the server. See the section INSTALLATION - below. + If running the server as a daemon at startup, + this file will need to contain an appropriate startup + sequence for the server. See the UNIX_INSTALL.html document + for details. - + /etc/services - If running the server via the - meta-daemon inetd, this file - must contain a mapping of service name (e.g., netbios-ssn) - to service port (e.g., 139) and protocol type (e.g., tcp). - See the section INSTALLATION below. + If running the server via the + meta-daemon inetd, this file + must contain a mapping of service name (e.g., netbios-ssn) + to service port (e.g., 139) and protocol type (e.g., tcp). + See the UNIX_INSTALL.html + document for details. - + /usr/local/samba/lib/smb.conf - This is the default location of the + This is the default location of the smb.conf - server configuration file. Other common places that systems - install this file are /usr/samba/lib/smb.conf + server configuration file. Other common places that systems + install this file are /usr/samba/lib/smb.conf and /etc/smb.conf. - - When run as a WINS server (see the - wins support - parameter in the - smb.conf(5) man page), nmbd - will store the WINS database in the file wins.dat - in the var/locks directory configured under + + When run as a WINS server (see the + wins support + parameter in the smb.conf(5) man page), + nmbd + will store the WINS database in the file wins.dat + in the var/locks directory configured under wherever Samba was configured to install itself. If nmbd is acting as a - browse master (see the local master - parameter in the - smb.conf(5) man page), nmbd + browse master (see the local master + parameter in the smb.conf(5) man page, + nmbd will store the browsing database in the file browse.dat in the var/locks directory configured under wherever Samba was configured to install itself. @@ -288,20 +292,20 @@ SIGNALS - To shut down an nmbd process it is recommended - that SIGKILL (-9) NOT be used, except as a last - resort, as this may leave the name database in an inconsistent state. - The correct way to terminate nmbd is to send it + To shut down an nmbd process it is recommended + that SIGKILL (-9) NOT be used, except as a last + resort, as this may leave the name database in an inconsistent state. + The correct way to terminate nmbd is to send it a SIGTERM (-15) signal and wait for it to die on its own. - nmbd will accept SIGHUP, which will cause + nmbd will accept SIGHUP, which will cause it to dump out its namelists into the file namelist.debug - in the /usr/local/samba/var/locks - directory (or the var/locks directory configured - under wherever Samba was configured to install itself). This will also + in the /usr/local/samba/var/locks + directory (or the var/locks directory configured + under wherever Samba was configured to install itself). This will also cause nmbd to dump out its server database in the log.nmb file. - + The debug log level of nmbd may be raised or lowered using smbcontrol(1) (SIGUSR[1|2] signals are no longer used in Samba 2.2). This is diff --git a/docs/docbook/manpages/smbd.8.sgml b/docs/docbook/manpages/smbd.8.sgml index 2037e963d5e..f82e3c65950 100644 --- a/docs/docbook/manpages/smbd.8.sgml +++ b/docs/docbook/manpages/smbd.8.sgml @@ -54,7 +54,7 @@ Please note that there are significant security implications to running this server, and the smb.conf(5) - manpage should be regarded as mandatory reading before + manpage should be regarded as mandatory reading before proceeding with installation. A session is created whenever a client requests one. @@ -142,7 +142,7 @@ logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for - day to day running - it generates a small amount of + day to day running - it generates a small amount of information about operations carried out. Levels above 1 will generate considerable @@ -186,14 +186,14 @@ -p <port number> - port number is a positive integer + port number is a positive integer value. The default value if this parameter is not specified is 139. This number is the port number that will be used when making connections to the server from client software. The standard (well-known) port number for the - SMB over TCP is 139, hence the default. If you wish to + SMB over TCP is 139, hence the default. If you wish to run the server as an ordinary user rather than as root, most systems will require you to use a port number greater than 1024 - ask your system administrator @@ -218,7 +218,7 @@ as descriptions of all the services that the server is to provide. See smb.conf(5) for more information. - The default configuration file name is determined at + The default configuration file name is determined at compile time. @@ -230,42 +230,44 @@ /etc/inetd.conf - If the server is to be run by the + If the server is to be run by the inetd meta-daemon, this file must contain suitable startup information for the - meta-daemon. See the section INSTALLATION below. + meta-daemon. See the UNIX_INSTALL.html + document for details. - + /etc/rc - or whatever initialization script your + or whatever initialization script your system uses). - If running the server as a daemon at startup, - this file will need to contain an appropriate startup - sequence for the server. See the section INSTALLATION - below. + If running the server as a daemon at startup, + this file will need to contain an appropriate startup + sequence for the server. See the UNIX_INSTALL.html + document for details. - + /etc/services - If running the server via the - meta-daemon inetd, this file - must contain a mapping of service name (e.g., netbios-ssn) - to service port (e.g., 139) and protocol type (e.g., tcp). - See the section INSTALLATION below. + If running the server via the + meta-daemon inetd, this file + must contain a mapping of service name (e.g., netbios-ssn) + to service port (e.g., 139) and protocol type (e.g., tcp). + See the UNIX_INSTALL.html + document for details. - + /usr/local/samba/lib/smb.conf - This is the default location of the + This is the default location of the smb.conf - server configuration file. Other common places that systems - install this file are /usr/samba/lib/smb.conf + server configuration file. Other common places that systems + install this file are /usr/samba/lib/smb.conf and /etc/smb.conf. - - This file describes all the services the server + + This file describes all the services the server is to make available to clients. See smb.conf(5) for more information. @@ -275,10 +277,10 @@ LIMITATIONS - On some systems smbd cannot change uid back - to root after a setuid() call. Such systems are called - trapdoor uid systems. If you have such a system, - you will be unable to connect from a client (such as a PC) as + On some systems smbd cannot change uid back + to root after a setuid() call. Such systems are called + trapdoor uid systems. If you have such a system, + you will be unable to connect from a client (such as a PC) as two different users at once. Attempts to connect the second user will result in access denied or similar. @@ -299,191 +301,13 @@ - - INSTALLATION - - The location of the server and its support files - is a matter for individual system administrators. The following - are thus suggestions only. - - It is recommended that the server software be installed - under the /usr/local/samba/ hierarchy, - in a directory readable by all, writeable only by root. The server - program itself should be executable by all, as users may wish to - run the server themselves (in which case it will of course run - with their privileges). The server should NOT be setuid. On some - systems it may be worthwhile to make smbd setgid to an empty group. - This is because some systems may have a security hole where daemon - processes that become a user can be attached to with a debugger. - Making the smbd file setgid to an empty group may prevent - this hole from being exploited. This security hole and the suggested - fix has only been confirmed on old versions (pre-kernel 2.0) of Linux - at the time this was written. It is possible that this hole only - exists in Linux, as testing on other systems has thus far shown them - to be immune. - - The server log files should be put in a directory readable and - writeable only by root, as the log files may contain sensitive - information. - - The configuration file should be placed in a directory - readable and writeable only by root, as the configuration file - controls security for the services offered by the server. The - configuration file can be made readable by all if desired, but - this is not necessary for correct operation of the server and is - not recommended. A sample configuration file smb.conf.sample - is supplied with the source to the server - this may - be renamed to smb.conf and modified to suit - your needs. - - The remaining notes will assume the following: - - - smbd (the server program) - installed in /usr/local/samba/bin - - - smb.conf (the configuration - file) installed in /usr/local/samba/lib - - - log files stored in /var/adm/smblogs - - - - The server may be run either as a daemon by users - or at startup, or it may be run from a meta-daemon such as - inetd upon request. If run as a daemon, - the server will always be ready, so starting sessions will be - faster. If run from a meta-daemon some memory will be saved and - utilities such as the tcpd TCP-wrapper may be used for extra - security. For serious use as file server it is recommended - that smbd be run as a daemon. - - When you've decided, continue with either - - - RUNNING THE SERVER AS A DAEMON or - RUNNING THE SERVER ON REQUEST. - - - - - RUNNING THE SERVER AS A DAEMON - - To run the server as a daemon from the command - line, simply put the -D option on the - command line. There is no need to place an ampersand at - the end of the command line - the -D - option causes the server to detach itself from the tty - anyway. - - Any user can run the server as a daemon (execute - permissions permitting, of course). This is useful for - testing purposes, and may even be useful as a temporary - substitute for something like ftp. When run this way, however, - the server will only have the privileges of the user who ran - it. - - To ensure that the server is run as a daemon whenever - the machine is started, and to ensure that it runs as root - so that it can serve multiple clients, you will need to modify - the system startup files. Wherever appropriate (for example, in - /etc/rc), insert the following line, - substituting port number, log file location, configuration file - location and debug level as desired: - - /usr/local/samba/bin/smbd -D -l /var/adm/smblogs/log - -s /usr/local/samba/lib/smb.conf - - (The above should appear in your initialization script - as a single line. Depending on your terminal characteristics, - it may not appear that way in this man page. If the above appears - as more than one line, please treat any newlines or indentation - as a single space or TAB character.) - - If the options used at compile time are appropriate for - your system, all parameters except -D may - be omitted. See the section OPTIONS above. - - - - RUNNING THE SERVER ON REQUEST - - If your system uses a meta-daemon such as inetd - , you can arrange to have the smbd server started - whenever a process attempts to connect to it. This requires several - changes to the startup files on the host machine. If you are - experimenting as an ordinary user rather than as root, you will - need the assistance of your system administrator to modify the - system files. - - You will probably want to set up the NetBIOS name server - nmbd at - the same time as smbd. To do this refer to the - man page for nmbd(8) - . - - First, ensure that a port is configured in the file - /etc/services. The well-known port 139 - should be used if possible, though any port may be used. - - Ensure that a line similar to the following is in - /etc/services: - - netbios-ssn 139/tcp - - Note for NIS/YP users - you may need to rebuild the - NIS service maps rather than alter your local /etc/services - file. - - Next, put a suitable line in the file /etc/inetd.conf - (in the unlikely event that you are using a meta-daemon - other than inetd, you are on your own). Note that the first item - in this line matches the service name in /etc/services - . Substitute appropriate values for your system - in this line (see inetd(8)): - - netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd - -d1 -l/var/adm/smblogs/log -s/usr/local/samba/lib/smb.conf - - (The above should appear in /etc/inetd.conf - as a single line. Depending on your terminal characteristics, it may - not appear that way in this man page. If the above appears as more - than one line, please treat any newlines or indentation as a single - space or TAB character.) - - Note that there is no need to specify a port number here, - even if you are using a non-standard port number. - - Lastly, edit the configuration file to provide suitable - services. To start with, the following two services should be - all you need: - - - - [homes] - writeable = yes - - [printers] - writeable = no - printable = yes - path = /tmp - public = yes - - - - This will allow you to connect to your home directory - and print to any printer supported by the host (user privileges - permitting). - PAM INTERACTION - Samba uses PAM for authentication (when presented with a plaintext + Samba uses PAM for authentication (when presented with a plaintext password), for account checking (is this account disabled?) and for session management. The degree too which samba supports PAM is restricted - by the limitations of the SMB protocol and the + by the limitations of the SMB protocol and the obey pam restricions smb.conf paramater. When this is set, the following restrictions apply: @@ -496,7 +320,7 @@ Session Management: When not using share - level secuirty, users must pass PAM's session checks before access + level secuirty, users must pass PAM's session checks before access is granted. Note however, that this is bypassed in share level secuirty. Note also that some older pam configuration files may need a line added for session support. @@ -504,72 +328,50 @@ - - TESTING THE INSTALLATION - - If running the server as a daemon, execute it before - proceeding. If using a meta-daemon, either restart the system - or kill and restart the meta-daemon. Some versions of - inetd will reread their configuration - tables if they receive a HUP signal. - - If your machine's name is fred and your - name is mary, you should now be able to connect - to the service \\fred\mary. - - - To properly test and experiment with the server, we - recommend using the smbclient program (see - smbclient(1)) - and also going through the steps outlined in the file - DIAGNOSIS.txt in the docs/ - directory of your Samba installation. - - VERSION - This man page is correct for version 2.2 of + This man page is correct for version 2.2 of the Samba suite. DIAGNOSTICS - Most diagnostics issued by the server are logged - in a specified log file. The log file name is specified + Most diagnostics issued by the server are logged + in a specified log file. The log file name is specified at compile time, but may be overridden on the command line. - The number and nature of diagnostics available depends - on the debug level used by the server. If you have problems, set + The number and nature of diagnostics available depends + on the debug level used by the server. If you have problems, set the debug level to 3 and peruse the log files. - Most messages are reasonably self-explanatory. Unfortunately, - at the time this man page was created, there are too many diagnostics - available in the source code to warrant describing each and every - diagnostic. At this stage your best bet is still to grep the - source code and inspect the conditions that gave rise to the + Most messages are reasonably self-explanatory. Unfortunately, + at the time this man page was created, there are too many diagnostics + available in the source code to warrant describing each and every + diagnostic. At this stage your best bet is still to grep the + source code and inspect the conditions that gave rise to the diagnostics you are seeing. SIGNALS - Sending the smbd a SIGHUP will cause it to - reload its smb.conf configuration + Sending the smbd a SIGHUP will cause it to + reload its smb.conf configuration file within a short period of time. - To shut down a user's smbd process it is recommended - that SIGKILL (-9) NOT + To shut down a user's smbd process it is recommended + that SIGKILL (-9) NOT be used, except as a last resort, as this may leave the shared - memory area in an inconsistent state. The safe way to terminate - an smbd is to send it a SIGTERM (-15) signal and wait for + memory area in an inconsistent state. The safe way to terminate + an smbd is to send it a SIGTERM (-15) signal and wait for it to die on its own. The debug log level of smbd may be raised or lowered using smbcontrol(1) program (SIGUSR[1|2] signals are no longer used in - Samba 2.2). This is to allow transient problems to be diagnosed, + Samba 2.2). This is to allow transient problems to be diagnosed, whilst still running at a normally low log level. Note that as the signal handlers send a debug write, diff --git a/docs/docbook/manpages/smbsh.1.sgml b/docs/docbook/manpages/smbsh.1.sgml index 2641c0f6f5d..82efb334ba7 100644 --- a/docs/docbook/manpages/smbsh.1.sgml +++ b/docs/docbook/manpages/smbsh.1.sgml @@ -150,7 +150,7 @@ -L libdir This parameter specifies the location of the - shared libraries used by smbsh. The default + shared libraries used by smbsh. The default value is specified at compile time. -- cgit From de5da854786ea17b3827f902fb0ab9676db899d1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Jan 2002 17:03:40 +0000 Subject: generated docs --- docs/htmldocs/nmbd.8.html | 121 +++++----- docs/htmldocs/smb.conf.5.html | 43 +++- docs/htmldocs/smbclient.1.html | 97 ++++++-- docs/htmldocs/smbd.8.html | 491 ++++++----------------------------------- docs/htmldocs/smbsh.1.html | 229 ++++++++++++++++++- docs/htmldocs/wbinfo.1.html | 60 ++++- docs/htmldocs/winbindd.8.html | 47 +++- docs/manpages/nmbd.8 | 79 +++---- docs/manpages/smb.conf.5 | 15 +- docs/manpages/smbclient.1 | 51 ++++- docs/manpages/smbd.8 | 284 ++++-------------------- docs/manpages/smbsh.1 | 102 ++++++++- docs/manpages/wbinfo.1 | 16 +- docs/manpages/winbindd.8 | 14 +- 14 files changed, 830 insertions(+), 819 deletions(-) diff --git a/docs/htmldocs/nmbd.8.html b/docs/htmldocs/nmbd.8.html index f926e46a75b..b18ae23aa21 100644 --- a/docs/htmldocs/nmbd.8.html +++ b/docs/htmldocs/nmbd.8.html @@ -340,31 +340,30 @@ CLASS="FILENAME" >

UDP port number is a positive integer value. - This option changes the default UDP port number (normally 137) + This option changes the default UDP port number (normally 137) that nmbd responds to name queries on. Don't - use this option unless you are an expert, in which case you +> responds to name queries on. Don't + use this option unless you are an expert, in which case you won't need help!

-s <configuration file>

The default configuration file name +>The default configuration file name is set at build time, typically as /usr/local/samba/lib/smb.conf, but this may be changed when Samba is autoconfigured.

The file specified contains the configuration details +>The file specified contains the configuration details required by the server. See - smb.conf(5)

If the server is to be run by the +>If the server is to be run by the inetd meta-daemon, this file - must contain suitable startup information for the - meta-daemon. See the section INSTALLATION below. +> meta-daemon, this file + must contain suitable startup information for the + meta-daemon. See the UNIX_INSTALL.html document + for details.

or whatever initialization script your +>or whatever initialization script your system uses).

If running the server as a daemon at startup, - this file will need to contain an appropriate startup - sequence for the server. See the section INSTALLATION - below.

If running the server as a daemon at startup, + this file will need to contain an appropriate startup + sequence for the server. See the UNIX_INSTALL.html document + for details.

If running the server via the +>If running the server via the meta-daemon inetd, this file - must contain a mapping of service name (e.g., netbios-ssn) - to service port (e.g., 139) and protocol type (e.g., tcp). - See the section INSTALLATION below.

, this file + must contain a mapping of service name (e.g., netbios-ssn) + to service port (e.g., 139) and protocol type (e.g., tcp). + See the UNIX_INSTALL.html + document for details.

This is the default location of the +>This is the default location of the smb.conf - server configuration file. Other common places that systems + server configuration file. Other common places that systems install this file are /usr/samba/lib/smb.conf +> and /etc/smb.conf.

When run as a WINS server (see the +>When run as a WINS server (see the wins support - parameter in the smb.conf(5) man page), smb.conf(5) man page), + nmbd +> will store the WINS database in the file wins.dat +> in the var/locks directory configured under +> directory configured under wherever Samba was configured to install itself.

If is acting as a browse master (see the local master - parameter in the smb.conf(5) man page), smb.conf(5) man page, + nmbd +> will store the browsing database in the file browse.dat @@ -524,7 +531,7 @@ CLASS="FILENAME" >

SIGNALS

To shut down an nmbd process it is recommended +> process it is recommended that SIGKILL (-9) NOT be used, except as a last - resort, as this may leave the name database in an inconsistent state. +> be used, except as a last + resort, as this may leave the name database in an inconsistent state. The correct way to terminate nmbd is to send it +> is to send it a SIGTERM (-15) signal and wait for it to die on its own.

nmbd will accept SIGHUP, which will cause +> will accept SIGHUP, which will cause it to dump out its namelists into the file namelist.debug @@ -554,12 +561,12 @@ CLASS="FILENAME" > in the /usr/local/samba/var/locks +> directory (or the var/locks directory configured - under wherever Samba was configured to install itself). This will also +> directory configured + under wherever Samba was configured to install itself). This will also cause nmbd

VERSION

SEE ALSO

AUTHOR

  • unix extensions

  • COMPLETE LIST OF SERVICE PARAMETERS

    EXPLANATION OF EACH PARAMETER

  • unix extensions(G)

    This boolean parameter controls whether Samba + implments the CIFS UNIX extensions, as defined by HP. These + extensions enable CIFS to server UNIX clients to UNIX servers + better, and allow such things as symbolic links, hard links etc. + These extensions require a similarly enabled client, and are of + no current use to Windows clients.

    Default: unix extensions = no

    unix password sync (G)

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    altname file

    The client will request that the server return + the "alternate" name (the 8.3 name) for a file or directory. +

    cancel jobid0 [jobid1] ... [jobidN]

    The client will request that the server cancel + the printjobs identified by the given numeric print job ids. +

    chmod file mode in octal

    This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + change the UNIX permissions to the given octal mode, in standard UNIX format. +

    chown file uid gid

    This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + change the UNIX user and group ownership to the given decimal values. Note there is + currently no way to remotely look up the UNIX uid and gid values for a given name. + This may be addressed in future versions of the CIFS UNIX extensions. +

    cd [directory name]

    link source destination

    This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + create a hard link between the source and destination files. The source file + must not exist. +

    lowercase

    setmode <filename> <perm=[+|\-]rsha>

    A version of the DOS attrib command to set + file permissions. For example:

    setmode myfile +r

    would make myfile read only.

    symlink source destination

    This command depends on the server supporting the CIFS + UNIX extensions and will fail if the server does not. The client requests that the server + create a symbolic hard link between the source and destination files. The source file + must not exist. Note that the server will not create a link to any path that lies + outside the currently connected share. This is enforced by the Samba server. +

    tar <c|x>[IXbgNa]

    setmode <filename> <perm=[+|\-]rsha>

    A version of the DOS attrib command to set - file permissions. For example:

    setmode myfile +r

    would make myfile read only.

    NOTES

    ENVIRONMENT VARIABLES

    INSTALLATION

    DIAGNOSTICS

    VERSION

    AUTHOR

    smb.conf(5)
    - manpage should be regarded as mandatory reading before + manpage should be regarded as mandatory reading before proceeding with installation.

    A session is created whenever a client requests one. @@ -214,7 +214,7 @@ CLASS="REPLACEABLE" logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for - day to day running - it generates a small amount of + day to day running - it generates a small amount of information about operations carried out.

    Levels above 1 will generate considerable @@ -299,14 +299,14 @@ CLASS="REPLACEABLE" >port number is a positive integer +> is a positive integer value. The default value if this parameter is not specified is 139.

    This number is the port number that will be used when making connections to the server from client software. The standard (well-known) port number for the - SMB over TCP is 139, hence the default. If you wish to + SMB over TCP is 139, hence the default. If you wish to run the server as an ordinary user rather than as root, most systems will require you to use a port number greater than 1024 - ask your system administrator @@ -338,7 +338,7 @@ CLASS="FILENAME" > smb.conf(5) for more information. - The default configuration file name is determined at + The default configuration file name is determined at compile time.

    If the server is to be run by the +>If the server is to be run by the inetd meta-daemon, this file must contain suitable startup information for the - meta-daemon. See the section INSTALLATION below. + meta-daemon. See the UNIX_INSTALL.html + document for details.

    or whatever initialization script your +>or whatever initialization script your system uses).

    If running the server as a daemon at startup, - this file will need to contain an appropriate startup - sequence for the server. See the section INSTALLATION - below.

    If running the server as a daemon at startup, + this file will need to contain an appropriate startup + sequence for the server. See the UNIX_INSTALL.html + document for details.

    If running the server via the +>If running the server via the meta-daemon inetd, this file - must contain a mapping of service name (e.g., netbios-ssn) - to service port (e.g., 139) and protocol type (e.g., tcp). - See the section INSTALLATION below.

    , this file + must contain a mapping of service name (e.g., netbios-ssn) + to service port (e.g., 139) and protocol type (e.g., tcp). + See the UNIX_INSTALL.html + document for details.

    This is the default location of the +>This is the default location of the smb.conf - server configuration file. Other common places that systems + server configuration file. Other common places that systems install this file are /usr/samba/lib/smb.conf +> and /etc/smb.conf.

    This file describes all the services the server +>This file describes all the services the server is to make available to clients. See

    LIMITATIONS

    On some systems smbd cannot change uid back - to root after a setuid() call. Such systems are called - trapdoor uid systems. If you have such a system, - you will be unable to connect from a client (such as a PC) as +> cannot change uid back + to root after a setuid() call. Such systems are called + trapdoor uid systems. If you have such a system, + you will be unable to connect from a client (such as a PC) as two different users at once. Attempts to connect the second user will result in access denied or similar.

    ENVIRONMENT VARIABLES

    INSTALLATION

    The location of the server and its support files - is a matter for individual system administrators. The following - are thus suggestions only.

    It is recommended that the server software be installed - under the /usr/local/samba/ hierarchy, - in a directory readable by all, writeable only by root. The server - program itself should be executable by all, as users may wish to - run the server themselves (in which case it will of course run - with their privileges). The server should NOT be setuid. On some - systems it may be worthwhile to make smbd setgid to an empty group. - This is because some systems may have a security hole where daemon - processes that become a user can be attached to with a debugger. - Making the smbd file setgid to an empty group may prevent - this hole from being exploited. This security hole and the suggested - fix has only been confirmed on old versions (pre-kernel 2.0) of Linux - at the time this was written. It is possible that this hole only - exists in Linux, as testing on other systems has thus far shown them - to be immune.

    The server log files should be put in a directory readable and - writeable only by root, as the log files may contain sensitive - information.

    The configuration file should be placed in a directory - readable and writeable only by root, as the configuration file - controls security for the services offered by the server. The - configuration file can be made readable by all if desired, but - this is not necessary for correct operation of the server and is - not recommended. A sample configuration file smb.conf.sample - is supplied with the source to the server - this may - be renamed to smb.conf and modified to suit - your needs.

    The remaining notes will assume the following:

    • smbd (the server program) - installed in /usr/local/samba/bin

    • smb.conf (the configuration - file) installed in /usr/local/samba/lib

    • log files stored in /var/adm/smblogs -

    The server may be run either as a daemon by users - or at startup, or it may be run from a meta-daemon such as - inetd upon request. If run as a daemon, - the server will always be ready, so starting sessions will be - faster. If run from a meta-daemon some memory will be saved and - utilities such as the tcpd TCP-wrapper may be used for extra - security. For serious use as file server it is recommended - that smbd be run as a daemon.

    When you've decided, continue with either

    • RUNNING THE SERVER AS A DAEMON or

    • RUNNING THE SERVER ON REQUEST.

    RUNNING THE SERVER AS A DAEMON

    To run the server as a daemon from the command - line, simply put the -D option on the - command line. There is no need to place an ampersand at - the end of the command line - the -D - option causes the server to detach itself from the tty - anyway.

    Any user can run the server as a daemon (execute - permissions permitting, of course). This is useful for - testing purposes, and may even be useful as a temporary - substitute for something like ftp. When run this way, however, - the server will only have the privileges of the user who ran - it.

    To ensure that the server is run as a daemon whenever - the machine is started, and to ensure that it runs as root - so that it can serve multiple clients, you will need to modify - the system startup files. Wherever appropriate (for example, in - /etc/rc), insert the following line, - substituting port number, log file location, configuration file - location and debug level as desired:

    /usr/local/samba/bin/smbd -D -l /var/adm/smblogs/log - -s /usr/local/samba/lib/smb.conf

    (The above should appear in your initialization script - as a single line. Depending on your terminal characteristics, - it may not appear that way in this man page. If the above appears - as more than one line, please treat any newlines or indentation - as a single space or TAB character.)

    If the options used at compile time are appropriate for - your system, all parameters except -D may - be omitted. See the section OPTIONS above.

    RUNNING THE SERVER ON REQUEST

    If your system uses a meta-daemon such as inetd - , you can arrange to have the smbd server started - whenever a process attempts to connect to it. This requires several - changes to the startup files on the host machine. If you are - experimenting as an ordinary user rather than as root, you will - need the assistance of your system administrator to modify the - system files.

    You will probably want to set up the NetBIOS name server - nmbd at - the same time as smbd. To do this refer to the - man page for nmbd(8) - .

    First, ensure that a port is configured in the file - /etc/services. The well-known port 139 - should be used if possible, though any port may be used.

    Ensure that a line similar to the following is in - /etc/services:

    netbios-ssn 139/tcp

    Note for NIS/YP users - you may need to rebuild the - NIS service maps rather than alter your local /etc/services - file.

    Next, put a suitable line in the file /etc/inetd.conf - (in the unlikely event that you are using a meta-daemon - other than inetd, you are on your own). Note that the first item - in this line matches the service name in /etc/services - . Substitute appropriate values for your system - in this line (see inetd(8)):

    netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd - -d1 -l/var/adm/smblogs/log -s/usr/local/samba/lib/smb.conf

    (The above should appear in /etc/inetd.conf - as a single line. Depending on your terminal characteristics, it may - not appear that way in this man page. If the above appears as more - than one line, please treat any newlines or indentation as a single - space or TAB character.)

    Note that there is no need to specify a port number here, - even if you are using a non-standard port number.

    Lastly, edit the configuration file to provide suitable - services. To start with, the following two services should be - all you need:

    		[homes]
    -		writeable = yes
    -
    -	[printers]
    -		writeable = no
    -		printable = yes
    -		path = /tmp
    -		public = yes
    -	
    -	

    This will allow you to connect to your home directory - and print to any printer supported by the host (user privileges - permitting).

    PAM INTERACTION

    Samba uses PAM for authentication (when presented with a plaintext +>Samba uses PAM for authentication (when presented with a plaintext password), for account checking (is this account disabled?) and for session management. The degree too which samba supports PAM is restricted - by the limitations of the SMB protocol and the + by the limitations of the SMB protocol and the Session Management: When not using share - level secuirty, users must pass PAM's session checks before access + level secuirty, users must pass PAM's session checks before access is granted. Note however, that this is bypassed in share level secuirty. Note also that some older pam configuration files may need a line added for session support. @@ -853,99 +554,41 @@ TARGET="_top" >

    TESTING THE INSTALLATION

    If running the server as a daemon, execute it before - proceeding. If using a meta-daemon, either restart the system - or kill and restart the meta-daemon. Some versions of - inetd will reread their configuration - tables if they receive a HUP signal.

    If your machine's name is fred and your - name is mary, you should now be able to connect - to the service \\fred\mary. -

    To properly test and experiment with the server, we - recommend using the smbclient program (see - smbclient(1)) - and also going through the steps outlined in the file - DIAGNOSIS.txt in the docs/ - directory of your Samba installation.

    VERSION

    This man page is correct for version 2.2 of +>This man page is correct for version 2.2 of the Samba suite.

    DIAGNOSTICS

    Most diagnostics issued by the server are logged - in a specified log file. The log file name is specified +>Most diagnostics issued by the server are logged + in a specified log file. The log file name is specified at compile time, but may be overridden on the command line.

    The number and nature of diagnostics available depends - on the debug level used by the server. If you have problems, set +>The number and nature of diagnostics available depends + on the debug level used by the server. If you have problems, set the debug level to 3 and peruse the log files.

    Most messages are reasonably self-explanatory. Unfortunately, - at the time this man page was created, there are too many diagnostics - available in the source code to warrant describing each and every - diagnostic. At this stage your best bet is still to grep the - source code and inspect the conditions that gave rise to the +>Most messages are reasonably self-explanatory. Unfortunately, + at the time this man page was created, there are too many diagnostics + available in the source code to warrant describing each and every + diagnostic. At this stage your best bet is still to grep the + source code and inspect the conditions that gave rise to the diagnostics you are seeing.

    SIGNALS

    Sending the smbd a SIGHUP will cause it to +> a SIGHUP will cause it to reload its smb.conf configuration +> configuration file within a short period of time.

    To shut down a user's smbd process it is recommended +> process it is recommended that SIGKILL (-9) NOT +> be used, except as a last resort, as this may leave the shared - memory area in an inconsistent state. The safe way to terminate + memory area in an inconsistent state. The safe way to terminate an smbd is to send it a SIGTERM (-15) signal and wait for +> is to send it a SIGTERM (-15) signal and wait for it to die on its own.

    The debug log level of program (SIGUSR[1|2] signals are no longer used in - Samba 2.2). This is to allow transient problems to be diagnosed, + Samba 2.2). This is to allow transient problems to be diagnosed, whilst still running at a normally low log level.

    Note that as the signal handlers send a debug write, @@ -1010,7 +653,7 @@ CLASS="COMMAND" >

    SEE ALSO

    AUTHOR

    smbsh

    [-W workgroup] [-U username] [-P prefix] [-R <name resolve order>] [-d <debug level>] [-l logfile] [-L libdir]

    DESCRIPTION

    smbsh
    to work correctly.

    OPTIONS

    -W WORKGROUP

    Override the default workgroup specified in the + workgroup parameter of the smb.conf file + for this session. This may be needed to connect to some + servers.

    -U username[%pass]

    Sets the SMB username or username and password. + If this option is not specified, the user will be prompted for + both the username and the password. If %pass is not specified, + the user will be prompted for the password. +

    -P prefix

    This option allows + the user to set the directory prefix for SMB access. The + default value if this option is not specified is + smb. +

    -R <name resolve order>

    This option is used to determine what naming + services and in what order to resolve + host names to IP addresses. The option takes a space-separated + string of different name resolution options.

    The options are :"lmhosts", "host", "wins" and "bcast". + They cause names to be resolved as follows :

    • lmhosts : + Lookup an IP address in the Samba lmhosts file. If the + line in lmhosts has no name type attached to the + NetBIOS name + (see the lmhosts(5) + for details) then any name type matches for lookup. +

    • host : + Do a standard host name to IP address resolution, using + the system /etc/hosts, NIS, or DNS + lookups. This method of name resolution is operating + system dependent, for instance on IRIX or Solaris this + may be controlled by the /etc/nsswitch.conf + file). Note that this method is only used + if the NetBIOS name type being queried is the 0x20 + (server) name type, otherwise it is ignored. +

    • wins : + Query a name with the IP address listed in the + wins server parameter. If no + WINS server has been specified this method will be + ignored. +

    • bcast : + Do a broadcast on each of the known local interfaces + listed in the interfaces + parameter. This is the least reliable of the name + resolution methods as it depends on the target host + being on a locally connected subnet. +

    If this parameter is not set then the name resolve order + defined in the smb.conf file parameter + (name resolve order) will be used.

    The default order is lmhosts, host, wins, bcast. Without + this parameter or any entry in the name resolve order + parameter of the smb.conf + file, the name resolution methods will be attempted in this + order.

    -d <debug level>

    debug level is an integer from 0 to 10.

    The default value if this parameter is not specified + is zero.

    The higher this value, the more detail will be logged + about the activities of nmblookup. At level + 0, only critical errors and serious warnings will be logged. +

    -l logfilename

    If specified causes all debug messages to be + written to the file specified by logfilename + . If not specified then all messages will be + written tostderr. +

    -L libdir

    This parameter specifies the location of the + shared libraries used by smbsh. The default + value is specified at compile time. +

    EXAMPLES

    To use the

    VERSION

    BUGS

    SEE ALSO

    AUTHOR

    wbinfo [-u] [-g] [-n name] [-s sid] [-U uid] [-G gid] [-S sid] [-Y sid] [-t] [-m] [-r user] [-a user%password] [-A user%password]

    [-u] [-g] [-h name] [-i ip] [-n name] [-s sid] [-U uid] [-G gid] [-S sid] [-Y sid] [-t] [-m] [-r user] [-a user%password] [-A user%password]

    DESCRIPTION

    OPTIONS

    .

    -h name

    The -h option + queries winbindd(8) to query the WINS + server for the IP address associated with the NetBIOS name + specified by the name parameter. +

    -i ip

    The -i option + queries winbindd(8) to send a node status + request to get the NetBIOS name associated with the IP address + specified by the ip parameter. +

    -n name

    EXIT STATUS

    VERSION

    SEE ALSO

    AUTHOR

    hosts

    User information traditionally stored in + the hosts(5) file and used by + gethostbyname(3) functions. Names are + resolved through the WINS server or by broadcast. +

    passwd

    The following simple configuration in the + /etc/nsswitch.conf file can be used to initially + resolve hostnames from /etc/hosts and then from the + WINS server.

    OPTIONS

    NAME AND ID RESOLUTION

    CONFIGURATION

    EXAMPLE SETUP

    NOTES

    SIGNALS

    FILES

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "NMBD" "8" "02 January 2002" "" "" +.TH "NMBD" "8" "24 January 2002" "" "" .SH NAME nmbd \- NetBIOS name server to provide NetBIOS over IP naming services to clients .SH SYNOPSIS @@ -142,75 +142,78 @@ line setting will take precedence over settings in .TP \fB-p \fR UDP port number is a positive integer value. -This option changes the default UDP port number (normally 137) -that \fBnmbd\fR responds to name queries on. Don't -use this option unless you are an expert, in which case you +This option changes the default UDP port number (normally 137) +that \fBnmbd\fR responds to name queries on. Don't +use this option unless you are an expert, in which case you won't need help! .TP \fB-s \fR -The default configuration file name +The default configuration file name is set at build time, typically as \fI /usr/local/samba/lib/smb.conf\fR, but this may be changed when Samba is autoconfigured. -The file specified contains the configuration details -required by the server. See -\fIsmb.conf(5)\fRfor more information. +The file specified contains the configuration details +required by the server. See \fIsmb.conf(5)\fRfor more information. .SH "FILES" .TP \fB\fI/etc/inetd.conf\fB\fR -If the server is to be run by the -\fBinetd\fR meta-daemon, this file -must contain suitable startup information for the -meta-daemon. See the section INSTALLATION below. +If the server is to be run by the +\fBinetd\fR meta-daemon, this file +must contain suitable startup information for the +meta-daemon. See the UNIX_INSTALL.htmldocument +for details. .TP \fB\fI/etc/rc\fB\fR -or whatever initialization script your +or whatever initialization script your system uses). -If running the server as a daemon at startup, -this file will need to contain an appropriate startup -sequence for the server. See the section INSTALLATION -below. +If running the server as a daemon at startup, +this file will need to contain an appropriate startup +sequence for the server. See the UNIX_INSTALL.htmldocument +for details. .TP \fB\fI/etc/services\fB\fR -If running the server via the -meta-daemon \fBinetd\fR, this file -must contain a mapping of service name (e.g., netbios-ssn) -to service port (e.g., 139) and protocol type (e.g., tcp). -See the section INSTALLATION below. +If running the server via the +meta-daemon \fBinetd\fR, this file +must contain a mapping of service name (e.g., netbios-ssn) +to service port (e.g., 139) and protocol type (e.g., tcp). +See the UNIX_INSTALL.html +document for details. .TP \fB\fI/usr/local/samba/lib/smb.conf\fB\fR -This is the default location of the +This is the default location of the \fIsmb.conf\fR -server configuration file. Other common places that systems -install this file are \fI/usr/samba/lib/smb.conf\fR +server configuration file. Other common places that systems +install this file are \fI/usr/samba/lib/smb.conf\fR and \fI/etc/smb.conf\fR. -When run as a WINS server (see the +When run as a WINS server (see the wins support -parameter in the \fI smb.conf(5)\fRman page), \fBnmbd\fR -will store the WINS database in the file \fIwins.dat\fR -in the \fIvar/locks\fR directory configured under +parameter in the \fIsmb.conf(5)\fR man page), +\fBnmbd\fR +will store the WINS database in the file \fIwins.dat\fR +in the \fIvar/locks\fR directory configured under wherever Samba was configured to install itself. If \fBnmbd\fR is acting as a \fB browse master\fR (see the local master -parameter in the \fI smb.conf(5)\fRman page), \fBnmbd\fR +parameter in the \fIsmb.conf(5)\fR man page, +\fBnmbd\fR will store the browsing database in the file \fIbrowse.dat \fRin the \fIvar/locks\fR directory configured under wherever Samba was configured to install itself. .SH "SIGNALS" .PP -To shut down an \fBnmbd\fR process it is recommended -that SIGKILL (-9) \fBNOT\fR be used, except as a last -resort, as this may leave the name database in an inconsistent state. -The correct way to terminate \fBnmbd\fR is to send it +To shut down an \fBnmbd\fR process it is recommended +that SIGKILL (-9) \fBNOT\fR be used, except as a last +resort, as this may leave the name database in an inconsistent state. +The correct way to terminate \fBnmbd\fR is to send it a SIGTERM (-15) signal and wait for it to die on its own. .PP -\fBnmbd\fR will accept SIGHUP, which will cause +\fBnmbd\fR will accept SIGHUP, which will cause it to dump out its namelists into the file \fInamelist.debug -\fRin the \fI/usr/local/samba/var/locks\fR -directory (or the \fIvar/locks\fR directory configured -under wherever Samba was configured to install itself). This will also +\fRin the \fI/usr/local/samba/var/locks\fR +directory (or the \fIvar/locks\fR directory configured +under wherever Samba was configured to install itself). This will also cause \fBnmbd\fR to dump out its server database in the \fIlog.nmb\fR file. .PP diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5 index 050b61ccd2b..9eb8f81c895 100644 --- a/docs/manpages/smb.conf.5 +++ b/docs/manpages/smb.conf.5 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "02 January 2002" "" "" +.TH "SMB.CONF" "5" "24 January 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -974,6 +974,9 @@ each parameter for details. Note that some are synonyms. \fItotal print jobs\fR .TP 0.2i \(bu +\fIunix extensions\fR +.TP 0.2i +\(bu \fIunix password sync\fR .TP 0.2i \(bu @@ -6619,6 +6622,16 @@ Default: \fBtotal print jobs = 0\fR Example: \fBtotal print jobs = 5000\fR .TP +\fBunix extensions(G)\fR +This boolean parameter controls whether Samba +implments the CIFS UNIX extensions, as defined by HP. These +extensions enable CIFS to server UNIX clients to UNIX servers +better, and allow such things as symbolic links, hard links etc. +These extensions require a similarly enabled client, and are of +no current use to Windows clients. + +Default: \fBunix extensions = no\fR +.TP \fBunix password sync (G)\fR This boolean parameter controls whether Samba attempts to synchronize the UNIX password with the SMB password diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1 index c65d8b01e6f..92f2a75e1e9 100644 --- a/docs/manpages/smbclient.1 +++ b/docs/manpages/smbclient.1 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBCLIENT" "1" "02 January 2002" "" "" +.TH "SMBCLIENT" "1" "24 January 2002" "" "" .SH NAME smbclient \- ftp-like client to access SMB/CIFS resources on servers .SH SYNOPSIS @@ -513,6 +513,26 @@ If \fIshell command\fR is specified, the ! command will execute a shell locally and run the specified shell command. If no command is specified, a local shell will be run. .TP +\fBaltname file\fR +The client will request that the server return +the "alternate" name (the 8.3 name) for a file or directory. +.TP +\fBcancel jobid0 [jobid1] ... [jobidN]\fR +The client will request that the server cancel +the printjobs identified by the given numeric print job ids. +.TP +\fBchmod file mode in octal\fR +This command depends on the server supporting the CIFS +UNIX extensions and will fail if the server does not. The client requests that the server +change the UNIX permissions to the given octal mode, in standard UNIX format. +.TP +\fBchown file uid gid\fR +This command depends on the server supporting the CIFS +UNIX extensions and will fail if the server does not. The client requests that the server +change the UNIX user and group ownership to the given decimal values. Note there is +currently no way to remotely look up the UNIX uid and gid values for a given name. +This may be addressed in future versions of the CIFS UNIX extensions. +.TP \fBcd [directory name]\fR If "directory name" is specified, the current working directory on the server will be changed to the directory @@ -555,6 +575,12 @@ reason the specified directory is inaccessible. If no directory name is specified, the name of the current working directory on the local machine will be reported. .TP +\fBlink source destination\fR +This command depends on the server supporting the CIFS +UNIX extensions and will fail if the server does not. The client requests that the server +create a hard link between the source and destination files. The source file +must not exist. +.TP \fBlowercase\fR Toggle lowercasing of filenames for the get and mget commands. @@ -674,6 +700,21 @@ working directory on the server. Remove the specified directory (user access privileges permitting) from the server. .TP +\fBsetmode \fR +A version of the DOS attrib command to set +file permissions. For example: + +\fBsetmode myfile +r \fR + +would make myfile read only. +.TP +\fBsymlink source destination\fR +This command depends on the server supporting the CIFS +UNIX extensions and will fail if the server does not. The client requests that the server +create a symbolic hard link between the source and destination files. The source file +must not exist. Note that the server will not create a link to any path that lies +outside the currently connected share. This is enforced by the Samba server. +.TP \fBtar [IXbgNa]\fR Performs a tar operation - see the \fI-T \fRcommand line option above. Behavior may be affected @@ -693,14 +734,6 @@ archive bit setting (this is the default mode). In incremental mode, tar will only back up files with the archive bit set. In reset mode, tar will reset the archive bit on all files it backs up (implies read/write share). -.TP -\fBsetmode \fR -A version of the DOS attrib command to set -file permissions. For example: - -\fBsetmode myfile +r \fR - -would make myfile read only. .SH "NOTES" .PP Some servers are fussy about the case of supplied usernames, diff --git a/docs/manpages/smbd.8 b/docs/manpages/smbd.8 index a40513c0609..6f4a0ac1edf 100644 --- a/docs/manpages/smbd.8 +++ b/docs/manpages/smbd.8 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBD" "8" "04 January 2002" "" "" +.TH "SMBD" "8" "24 January 2002" "" "" .SH NAME smbd \- server to provide SMB/CIFS services to clients .SH SYNOPSIS @@ -32,7 +32,7 @@ of running the server. .PP Please note that there are significant security implications to running this server, and the \fIsmb.conf(5)\fR -manpage should be regarded as mandatory reading before +manpage should be regarded as mandatory reading before proceeding with installation. .PP A session is created whenever a client requests one. @@ -99,7 +99,7 @@ The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for -day to day running - it generates a small amount of +day to day running - it generates a small amount of information about operations carried out. Levels above 1 will generate considerable @@ -131,14 +131,14 @@ parameter in the \fIsmb.conf(5) \fRfile for details. .TP \fB-p \fR -\fIport number\fR is a positive integer +\fIport number\fR is a positive integer value. The default value if this parameter is not specified is 139. This number is the port number that will be used when making connections to the server from client software. The standard (well-known) port number for the -SMB over TCP is 139, hence the default. If you wish to +SMB over TCP is 139, hence the default. If you wish to run the server as an ordinary user rather than as root, most systems will require you to use a port number greater than 1024 - ask your system administrator @@ -160,47 +160,49 @@ information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See \fI smb.conf(5)\fRfor more information. -The default configuration file name is determined at +The default configuration file name is determined at compile time. .SH "FILES" .TP \fB\fI/etc/inetd.conf\fB\fR -If the server is to be run by the +If the server is to be run by the \fBinetd\fR meta-daemon, this file must contain suitable startup information for the -meta-daemon. See the section INSTALLATION below. +meta-daemon. See the UNIX_INSTALL.html +document for details. .TP \fB\fI/etc/rc\fB\fR -or whatever initialization script your +or whatever initialization script your system uses). -If running the server as a daemon at startup, -this file will need to contain an appropriate startup -sequence for the server. See the section INSTALLATION -below. +If running the server as a daemon at startup, +this file will need to contain an appropriate startup +sequence for the server. See the UNIX_INSTALL.html +document for details. .TP \fB\fI/etc/services\fB\fR -If running the server via the -meta-daemon \fBinetd\fR, this file -must contain a mapping of service name (e.g., netbios-ssn) -to service port (e.g., 139) and protocol type (e.g., tcp). -See the section INSTALLATION below. +If running the server via the +meta-daemon \fBinetd\fR, this file +must contain a mapping of service name (e.g., netbios-ssn) +to service port (e.g., 139) and protocol type (e.g., tcp). +See the UNIX_INSTALL.html +document for details. .TP \fB\fI/usr/local/samba/lib/smb.conf\fB\fR -This is the default location of the +This is the default location of the \fIsmb.conf\fR -server configuration file. Other common places that systems -install this file are \fI/usr/samba/lib/smb.conf\fR +server configuration file. Other common places that systems +install this file are \fI/usr/samba/lib/smb.conf\fR and \fI/etc/smb.conf\fR. -This file describes all the services the server +This file describes all the services the server is to make available to clients. See \fIsmb.conf(5)\fRfor more information. .SH "LIMITATIONS" .PP -On some systems \fBsmbd\fR cannot change uid back -to root after a setuid() call. Such systems are called -trapdoor uid systems. If you have such a system, -you will be unable to connect from a client (such as a PC) as +On some systems \fBsmbd\fR cannot change uid back +to root after a setuid() call. Such systems are called +trapdoor uid systems. If you have such a system, +you will be unable to connect from a client (such as a PC) as two different users at once. Attempts to connect the second user will result in access denied or similar. @@ -212,184 +214,12 @@ printable services, most systems will use the value of this variable (or lp if this variable is not defined) as the name of the printer to use. This is not specific to the server, however. -.SH "INSTALLATION" -.PP -The location of the server and its support files -is a matter for individual system administrators. The following -are thus suggestions only. -.PP -It is recommended that the server software be installed -under the \fI/usr/local/samba/\fR hierarchy, -in a directory readable by all, writeable only by root. The server -program itself should be executable by all, as users may wish to -run the server themselves (in which case it will of course run -with their privileges). The server should NOT be setuid. On some -systems it may be worthwhile to make \fBsmbd\fR setgid to an empty group. -This is because some systems may have a security hole where daemon -processes that become a user can be attached to with a debugger. -Making the \fBsmbd\fR file setgid to an empty group may prevent -this hole from being exploited. This security hole and the suggested -fix has only been confirmed on old versions (pre-kernel 2.0) of Linux -at the time this was written. It is possible that this hole only -exists in Linux, as testing on other systems has thus far shown them -to be immune. -.PP -The server log files should be put in a directory readable and -writeable only by root, as the log files may contain sensitive -information. -.PP -The configuration file should be placed in a directory -readable and writeable only by root, as the configuration file -controls security for the services offered by the server. The -configuration file can be made readable by all if desired, but -this is not necessary for correct operation of the server and is -not recommended. A sample configuration file \fIsmb.conf.sample -\fRis supplied with the source to the server - this may -be renamed to \fIsmb.conf\fR and modified to suit -your needs. -.PP -The remaining notes will assume the following: -.TP 0.2i -\(bu -\fBsmbd\fR (the server program) -installed in \fI/usr/local/samba/bin\fR -.TP 0.2i -\(bu -\fIsmb.conf\fR (the configuration -file) installed in \fI/usr/local/samba/lib\fR -.TP 0.2i -\(bu -log files stored in \fI/var/adm/smblogs -\fR.PP -The server may be run either as a daemon by users -or at startup, or it may be run from a meta-daemon such as -\fBinetd\fR upon request. If run as a daemon, -the server will always be ready, so starting sessions will be -faster. If run from a meta-daemon some memory will be saved and -utilities such as the tcpd TCP-wrapper may be used for extra -security. For serious use as file server it is recommended -that \fBsmbd\fR be run as a daemon. -.PP -.PP -When you've decided, continue with either -.PP -.TP 0.2i -\(bu -RUNNING THE SERVER AS A DAEMON or -.TP 0.2i -\(bu -RUNNING THE SERVER ON REQUEST. -.SH "RUNNING THE SERVER AS A DAEMON" -.PP -To run the server as a daemon from the command -line, simply put the \fB-D\fR option on the -command line. There is no need to place an ampersand at -the end of the command line - the \fB-D\fR -option causes the server to detach itself from the tty -anyway. -.PP -Any user can run the server as a daemon (execute -permissions permitting, of course). This is useful for -testing purposes, and may even be useful as a temporary -substitute for something like ftp. When run this way, however, -the server will only have the privileges of the user who ran -it. -.PP -To ensure that the server is run as a daemon whenever -the machine is started, and to ensure that it runs as root -so that it can serve multiple clients, you will need to modify -the system startup files. Wherever appropriate (for example, in -\fI/etc/rc\fR), insert the following line, -substituting port number, log file location, configuration file -location and debug level as desired: -.PP -\fB/usr/local/samba/bin/smbd -D -l /var/adm/smblogs/log --s /usr/local/samba/lib/smb.conf\fR -.PP -(The above should appear in your initialization script -as a single line. Depending on your terminal characteristics, -it may not appear that way in this man page. If the above appears -as more than one line, please treat any newlines or indentation -as a single space or TAB character.) -.PP -If the options used at compile time are appropriate for -your system, all parameters except \fB-D\fR may -be omitted. See the section OPTIONS above. -.SH "RUNNING THE SERVER ON REQUEST" -.PP -If your system uses a meta-daemon such as \fBinetd -\fR, you can arrange to have the \fBsmbd\fR server started -whenever a process attempts to connect to it. This requires several -changes to the startup files on the host machine. If you are -experimenting as an ordinary user rather than as root, you will -need the assistance of your system administrator to modify the -system files. -.PP -You will probably want to set up the NetBIOS name server -\fBnmbd\fRat -the same time as \fBsmbd\fR. To do this refer to the -man page for \fBnmbd(8)\fR -. -.PP -First, ensure that a port is configured in the file -\fI/etc/services\fR. The well-known port 139 -should be used if possible, though any port may be used. -.PP -Ensure that a line similar to the following is in -\fI/etc/services\fR: -.PP -\fBnetbios-ssn 139/tcp\fR -.PP -Note for NIS/YP users - you may need to rebuild the -NIS service maps rather than alter your local \fI/etc/services -\fRfile. -.PP -Next, put a suitable line in the file \fI/etc/inetd.conf -\fR(in the unlikely event that you are using a meta-daemon -other than inetd, you are on your own). Note that the first item -in this line matches the service name in \fI/etc/services -\fR\&. Substitute appropriate values for your system -in this line (see \fBinetd(8)\fR): -.PP -\fBnetbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd --d1 -l/var/adm/smblogs/log -s/usr/local/samba/lib/smb.conf\fR -.PP -(The above should appear in \fI/etc/inetd.conf\fR -as a single line. Depending on your terminal characteristics, it may -not appear that way in this man page. If the above appears as more -than one line, please treat any newlines or indentation as a single -space or TAB character.) -.PP -Note that there is no need to specify a port number here, -even if you are using a non-standard port number. -.PP -Lastly, edit the configuration file to provide suitable -services. To start with, the following two services should be -all you need: -.sp -.nf - [homes] - writeable = yes - - [printers] - writeable = no - printable = yes - path = /tmp - public = yes - - -.sp -.fi -.PP -This will allow you to connect to your home directory -and print to any printer supported by the host (user privileges -permitting). .SH "PAM INTERACTION" .PP -Samba uses PAM for authentication (when presented with a plaintext +Samba uses PAM for authentication (when presented with a plaintext password), for account checking (is this account disabled?) and for session management. The degree too which samba supports PAM is restricted -by the limitations of the SMB protocol and the +by the limitations of the SMB protocol and the obey pam restricions smb.conf paramater. When this is set, the following restrictions apply: .TP 0.2i @@ -401,65 +231,47 @@ login at this time. This also applies to encrypted logins. .TP 0.2i \(bu \fBSession Management\fR: When not using share -level secuirty, users must pass PAM's session checks before access +level secuirty, users must pass PAM's session checks before access is granted. Note however, that this is bypassed in share level secuirty. Note also that some older pam configuration files may need a line added for session support. -.SH "TESTING THE INSTALLATION" -.PP -If running the server as a daemon, execute it before -proceeding. If using a meta-daemon, either restart the system -or kill and restart the meta-daemon. Some versions of -\fBinetd\fR will reread their configuration -tables if they receive a HUP signal. -.PP -If your machine's name is \fIfred\fR and your -name is \fImary\fR, you should now be able to connect -to the service \fI\\\\fred\\mary\fR. -.PP -To properly test and experiment with the server, we -recommend using the \fBsmbclient\fR program (see -\fBsmbclient(1)\fR) -and also going through the steps outlined in the file -\fIDIAGNOSIS.txt\fR in the \fIdocs/\fR -directory of your Samba installation. .SH "VERSION" .PP -This man page is correct for version 2.2 of +This man page is correct for version 2.2 of the Samba suite. .SH "DIAGNOSTICS" .PP -Most diagnostics issued by the server are logged -in a specified log file. The log file name is specified +Most diagnostics issued by the server are logged +in a specified log file. The log file name is specified at compile time, but may be overridden on the command line. .PP -The number and nature of diagnostics available depends -on the debug level used by the server. If you have problems, set +The number and nature of diagnostics available depends +on the debug level used by the server. If you have problems, set the debug level to 3 and peruse the log files. .PP -Most messages are reasonably self-explanatory. Unfortunately, -at the time this man page was created, there are too many diagnostics -available in the source code to warrant describing each and every -diagnostic. At this stage your best bet is still to grep the -source code and inspect the conditions that gave rise to the +Most messages are reasonably self-explanatory. Unfortunately, +at the time this man page was created, there are too many diagnostics +available in the source code to warrant describing each and every +diagnostic. At this stage your best bet is still to grep the +source code and inspect the conditions that gave rise to the diagnostics you are seeing. .SH "SIGNALS" .PP -Sending the \fBsmbd\fR a SIGHUP will cause it to -reload its \fIsmb.conf\fR configuration +Sending the \fBsmbd\fR a SIGHUP will cause it to +reload its \fIsmb.conf\fR configuration file within a short period of time. .PP -To shut down a user's \fBsmbd\fR process it is recommended -that \fBSIGKILL (-9)\fR \fBNOT\fR +To shut down a user's \fBsmbd\fR process it is recommended +that \fBSIGKILL (-9)\fR \fBNOT\fR be used, except as a last resort, as this may leave the shared -memory area in an inconsistent state. The safe way to terminate -an \fBsmbd\fR is to send it a SIGTERM (-15) signal and wait for +memory area in an inconsistent state. The safe way to terminate +an \fBsmbd\fR is to send it a SIGTERM (-15) signal and wait for it to die on its own. .PP The debug log level of \fBsmbd\fR may be raised or lowered using \fBsmbcontrol(1) \fRprogram (SIGUSR[1|2] signals are no longer used in -Samba 2.2). This is to allow transient problems to be diagnosed, +Samba 2.2). This is to allow transient problems to be diagnosed, whilst still running at a normally low log level. .PP Note that as the signal handlers send a debug write, diff --git a/docs/manpages/smbsh.1 b/docs/manpages/smbsh.1 index 349853bbc7c..d3642185971 100644 --- a/docs/manpages/smbsh.1 +++ b/docs/manpages/smbsh.1 @@ -3,12 +3,12 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBSH" "1" "06 December 2001" "" "" +.TH "SMBSH" "1" "24 January 2002" "" "" .SH NAME smbsh \- Allows access to Windows NT filesystem using UNIX commands .SH SYNOPSIS .sp -\fBsmbsh\fR +\fBsmbsh\fR [ \fB-W workgroup\fR ] [ \fB-U username\fR ] [ \fB-P prefix\fR ] [ \fB-R \fR ] [ \fB-d \fR ] [ \fB-l logfile\fR ] [ \fB-L libdir\fR ] .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. @@ -17,6 +17,104 @@ This tool is part of the Sambasuite. using UNIX commands such as \fBls\fR, \fB egrep\fR, and \fBrcp\fR. You must use a shell that is dynamically linked in order for \fBsmbsh\fR to work correctly. +.SH "OPTIONS" +.TP +\fB-W WORKGROUP\fR +Override the default workgroup specified in the +workgroup parameter of the \fIsmb.conf\fR file +for this session. This may be needed to connect to some +servers. +.TP +\fB-U username[%pass]\fR +Sets the SMB username or username and password. +If this option is not specified, the user will be prompted for +both the username and the password. If %pass is not specified, +the user will be prompted for the password. +.TP +\fB-P prefix\fR +This option allows +the user to set the directory prefix for SMB access. The +default value if this option is not specified is +\fBsmb\fR. +.TP +\fB-R \fR +This option is used to determine what naming +services and in what order to resolve +host names to IP addresses. The option takes a space-separated +string of different name resolution options. + +The options are :"lmhosts", "host", "wins" and "bcast". +They cause names to be resolved as follows : +.RS +.TP 0.2i +\(bu +lmhosts : +Lookup an IP address in the Samba lmhosts file. If the +line in lmhosts has no name type attached to the +NetBIOS name +(see the lmhosts(5) +for details) then any name type matches for lookup. +.TP 0.2i +\(bu +host : +Do a standard host name to IP address resolution, using +the system \fI/etc/hosts\fR, NIS, or DNS +lookups. This method of name resolution is operating +system dependent, for instance on IRIX or Solaris this +may be controlled by the \fI/etc/nsswitch.conf +\fRfile). Note that this method is only used +if the NetBIOS name type being queried is the 0x20 +(server) name type, otherwise it is ignored. +.TP 0.2i +\(bu +wins : +Query a name with the IP address listed in the +\fIwins server\fR parameter. If no +WINS server has been specified this method will be +ignored. +.TP 0.2i +\(bu +bcast : +Do a broadcast on each of the known local interfaces +listed in the \fIinterfaces\fR +parameter. This is the least reliable of the name +resolution methods as it depends on the target host +being on a locally connected subnet. +.RE +.PP +If this parameter is not set then the name resolve order +defined in the \fIsmb.conf\fR file parameter +(name resolve order) will be used. +.PP +.PP +The default order is lmhosts, host, wins, bcast. Without +this parameter or any entry in the \fIname resolve order +\fRparameter of the \fIsmb.conf\fR +file, the name resolution methods will be attempted in this +order. +.PP +.TP +\fB-d \fR +debug level is an integer from 0 to 10. + +The default value if this parameter is not specified +is zero. + +The higher this value, the more detail will be logged +about the activities of \fBnmblookup\fR. At level +0, only critical errors and serious warnings will be logged. +.TP +\fB-l logfilename\fR +If specified causes all debug messages to be +written to the file specified by \fIlogfilename +\fR\&. If not specified then all messages will be +written to\fIstderr\fR. +.TP +\fB-L libdir\fR +This parameter specifies the location of the +shared libraries used by \fBsmbsh\fR. The default +value is specified at compile time. +.SH "EXAMPLES" .PP To use the \fBsmbsh\fR command, execute \fB smbsh\fR from the prompt and enter the username and password that authenticates you to the machine running the Windows NT diff --git a/docs/manpages/wbinfo.1 b/docs/manpages/wbinfo.1 index ff5c0c69230..49893eebc33 100644 --- a/docs/manpages/wbinfo.1 +++ b/docs/manpages/wbinfo.1 @@ -3,12 +3,12 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "WBINFO" "1" "10 January 2002" "" "" +.TH "WBINFO" "1" "24 January 2002" "" "" .SH NAME wbinfo \- Query information from winbind daemon .SH SYNOPSIS .sp -\fBwbinfo\fR [ \fB-u\fR ] [ \fB-g\fR ] [ \fB-n name\fR ] [ \fB-s sid\fR ] [ \fB-U uid\fR ] [ \fB-G gid\fR ] [ \fB-S sid\fR ] [ \fB-Y sid\fR ] [ \fB-t\fR ] [ \fB-m\fR ] [ \fB-r user\fR ] [ \fB-a user%password\fR ] [ \fB-A user%password\fR ] +\fBwbinfo\fR [ \fB-u\fR ] [ \fB-g\fR ] [ \fB-h name\fR ] [ \fB-i ip\fR ] [ \fB-n name\fR ] [ \fB-s sid\fR ] [ \fB-U uid\fR ] [ \fB-G gid\fR ] [ \fB-S sid\fR ] [ \fB-Y sid\fR ] [ \fB-t\fR ] [ \fB-m\fR ] [ \fB-r user\fR ] [ \fB-a user%password\fR ] [ \fB-A user%password\fR ] .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. @@ -37,6 +37,18 @@ will also be listed. Note that this operation does not assign group ids to any groups that have not already been seen by \fBwinbindd(8)\fR. .TP +\fB-h name\fR +The \fI-h\fR option +queries \fBwinbindd(8)\fR to query the WINS +server for the IP address associated with the NetBIOS name +specified by the \fIname\fR parameter. +.TP +\fB-i ip\fR +The \fI-i\fR option +queries \fBwinbindd(8)\fR to send a node status +request to get the NetBIOS name associated with the IP address +specified by the \fIip\fR parameter. +.TP \fB-n name\fR The \fI-n\fR option queries \fBwinbindd(8)\fR for the SID diff --git a/docs/manpages/winbindd.8 b/docs/manpages/winbindd.8 index cfd4fa2fb27..fbd0b599d98 100644 --- a/docs/manpages/winbindd.8 +++ b/docs/manpages/winbindd.8 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "WINBINDD" "8" "06 December 2001" "" "" +.TH "WINBINDD" "8" "24 January 2002" "" "" .SH NAME winbindd \- Name Service Switch daemon for resolving names from NT servers .SH SYNOPSIS @@ -38,6 +38,12 @@ installed, this should always suceed. The following nsswitch databases are implemented by the winbindd service: .TP +\fBhosts\fR +User information traditionally stored in +the \fIhosts(5)\fR file and used by +\fBgethostbyname(3)\fR functions. Names are +resolved through the WINS server or by broadcast. +.TP \fBpasswd\fR User information traditionally stored in the \fIpasswd(5)\fR file and used by @@ -63,6 +69,12 @@ group: files winbind .sp .fi .PP +.PP +The following simple configuration in the +\fI/etc/nsswitch.conf\fR file can be used to initially +resolve hostnames from \fI/etc/hosts\fR and then from the +WINS server. +.PP .SH "OPTIONS" .TP \fB-d debuglevel\fR -- cgit From b9e8552745030a947a83e4018e3c21aa41826b11 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Jan 2002 17:45:29 +0000 Subject: Improved debugging tracking down handle problems. Jeremy. --- source/rpc_server/srv_pipe.c | 2 +- source/rpc_server/srv_spoolss_nt.c | 54 ++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c index bece0ebee07..fd4590ac6be 100644 --- a/source/rpc_server/srv_pipe.c +++ b/source/rpc_server/srv_pipe.c @@ -1177,7 +1177,7 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, for (fn_num = 0; api_rpc_cmds[fn_num].name; fn_num++) { if (api_rpc_cmds[fn_num].opnum == p->hdr_req.opnum && api_rpc_cmds[fn_num].fn != NULL) { - DEBUG(3,("api_rpcTNP: rpc command: %s\n", api_rpc_cmds[fn_num].name)); + DEBUG(3,("api_rpcTNP: pipe %u rpc command: %s\n", (unsigned int)p->pnum, api_rpc_cmds[fn_num].name)); break; } } diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 74c713e9f88..c72efaee8df 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -90,7 +90,8 @@ static ubi_dlList counter_list; static struct cli_state cli; static uint32 smb_connections=0; -#define OUR_HANDLE(hnd) ((hnd==NULL)?"NULL":(IVAL(hnd->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")) +#define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ +((unsigned int)IVAL((hnd)->data5,4)) /* translate between internal status numbers and NT status numbers */ static int nt_printj_status(int v) @@ -257,7 +258,7 @@ static BOOL close_printer_handle(pipes_struct *p, POLICY_HND *hnd) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("close_printer_handle: Invalid handle (%s)\n", OUR_HANDLE(hnd))); + DEBUG(0,("close_printer_handle: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); return False; } @@ -275,7 +276,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("delete_printer_handle: Invalid handle (%s)\n", OUR_HANDLE(hnd))); + DEBUG(0,("delete_printer_handle: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); return WERR_BADFID; } @@ -334,7 +335,7 @@ static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("get_printer_snum: Invalid handle (%s)\n", OUR_HANDLE(hnd))); + DEBUG(0,("get_printer_snum: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); return False; } @@ -358,7 +359,7 @@ static BOOL set_printer_hnd_accesstype(pipes_struct *p, POLICY_HND *hnd, uint32 Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("set_printer_hnd_accesstype: Invalid handle (%s)", OUR_HANDLE(hnd))); + DEBUG(0,("set_printer_hnd_accesstype: Invalid handle (%s:%u)", OUR_HANDLE(hnd))); return False; } @@ -1004,7 +1005,7 @@ static WERROR _spoolss_enddocprinter_internal(pipes_struct *p, POLICY_HND *handl Printer_entry *Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_enddocprinter_internal: Invalid handle (%s)\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_enddocprinter_internal: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -1243,7 +1244,7 @@ static BOOL getprinterdata_printer(pipes_struct *p, TALLOC_CTX *ctx, POLICY_HND DEBUG(5,("getprinterdata_printer\n")); if (!Printer) { - DEBUG(0,("getprinterdata_printer: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("getprinterdata_printer: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return False; } @@ -1319,7 +1320,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO if (!Printer) { if((*data=(uint8 *)talloc_zero(p->mem_ctx, 4*sizeof(uint8))) == NULL) return WERR_NOMEM; - DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -1406,7 +1407,7 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE Printer_entry *Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_rffpcnex: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_rffpcnex: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -2500,7 +2501,7 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN r_u->info_ptr=0x1; if (!Printer) { - DEBUG(0,("_spoolss_rfnpcnex: Invalid handle (%s).\n", + DEBUG(0,("_spoolss_rfnpcnex: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); goto done; } @@ -4074,7 +4075,7 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_endpageprinter: Invalid handle (%s).\n",OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_endpageprinter: Invalid handle (%s:%u).\n",OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4104,7 +4105,7 @@ WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, S struct current_user user; if (!Printer) { - DEBUG(0,("_spoolss_startdocprinter: Invalid handle (%s)\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_startdocprinter: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4178,7 +4179,7 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_writeprinter: Invalid handle (%s)\n",OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_writeprinter: Invalid handle (%s:%u)\n",OUR_HANDLE(handle))); r_u->buffer_written = q_u->buffer_size2; return WERR_BADFID; } @@ -4207,7 +4208,7 @@ static WERROR control_printer(POLICY_HND *handle, uint32 command, get_current_user(&user, p); if (!Printer) { - DEBUG(0,("control_printer: Invalid handle (%s)\n", OUR_HANDLE(handle))); + DEBUG(0,("control_printer: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4265,7 +4266,7 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer || !get_printer_snum(p, handle, &snum)) { - DEBUG(0,("update_printer_sec: Invalid handle (%s)\n", + DEBUG(0,("update_printer_sec: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); result = WERR_BADFID; @@ -4815,7 +4816,7 @@ WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SET Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_setprinter: Invalid handle (%s)\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_setprinter: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4843,7 +4844,7 @@ WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u) Printer_entry *Printer= find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_fcpn: Invalid handle (%s)\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_fcpn: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6075,8 +6076,9 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen pstring long_archi; pstring short_archi; DRIVER_DIRECTORY_1 *info=NULL; +#if 0 fstring asc_name, servername; - +#endif unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi)-1); if (get_short_archi(short_archi, long_archi)==False) @@ -6192,7 +6194,7 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S DEBUG(5,("spoolss_enumprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6343,7 +6345,7 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP DEBUG(5,("spoolss_setprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_setprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_setprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6445,7 +6447,7 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ DEBUG(5,("spoolss_deleteprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_deleteprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_deleteprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6494,7 +6496,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM DEBUG(5,("spoolss_addform\n")); if (!Printer) { - DEBUG(0,("_spoolss_addform: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_addform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6558,7 +6560,7 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE DEBUG(5,("spoolss_deleteform\n")); if (!Printer) { - DEBUG(0,("_spoolss_deleteform: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_deleteform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6614,7 +6616,7 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * DEBUG(5,("spoolss_setform\n")); if (!Printer) { - DEBUG(0,("_spoolss_setform: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_setform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } /* can't set if builtin */ @@ -7064,7 +7066,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, if (!Printer) { if((*data=(uint8 *)talloc_zero(p->mem_ctx, 4*sizeof(uint8))) == NULL) return WERR_NOMEM; - DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -7243,7 +7245,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ DEBUG(4,("_spoolss_enumprinterdataex\n")); if (!Printer) { - DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s).\n", OUR_HANDLE(handle))); + DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } -- cgit From 1767160e6c37f66504bb012d78937d95fd82ef62 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Jan 2002 17:57:35 +0000 Subject: printing/nt_printing.c: Tidyup debugs. rpc_server/srv_spoolss_nt.c: Don't mix up pointers allocated with malloc and talloc. Jeremy. --- source/printing/nt_printing.c | 4 ++-- source/rpc_server/srv_spoolss_nt.c | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 8d808dcedef..0b57e874ee2 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -1885,7 +1885,7 @@ static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 break; } default: - DEBUGADD(1,("Level not implemented\n")); + DEBUGADD(106,("dump_a_printer_driver: Level %u not implemented\n", (unsigned int)level)); result=1; break; } @@ -2728,7 +2728,7 @@ static uint32 dump_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) break; } default: - DEBUGADD(1,("Level not implemented\n")); + DEBUGADD(106,("dump_a_printer: Level %u not implemented\n", (unsigned int)level )); result=1; break; } diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index c72efaee8df..b9591ab487d 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6270,20 +6270,17 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S problems unmarshalling the response */ *out_max_value_len=(in_value_len/sizeof(uint16)); - if((*out_value=(uint16 *)malloc(in_value_len*sizeof(uint8))) == NULL) + if((*out_value=(uint16 *)talloc_zero(p->mem_ctx, in_value_len*sizeof(uint8))) == NULL) return WERR_NOMEM; - ZERO_STRUCTP(*out_value); *out_value_len = (uint32)dos_PutUniCode((char *)*out_value, "", in_value_len, True); /* the data is counted in bytes */ *out_max_data_len = in_data_len; *out_data_len = in_data_len; - if((*data_out=(uint8 *)malloc(in_data_len*sizeof(uint8))) == NULL) + if((*data_out=(uint8 *)talloc_zero(p->mem_ctx, in_data_len*sizeof(uint8))) == NULL) return WERR_NOMEM; - memset(*data_out,'\0',in_data_len); - return WERR_NO_MORE_ITEMS; } -- cgit From b7cc8d71aee293359378b3a1e3ddcdde5d40f472 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Jan 2002 21:30:13 +0000 Subject: removed ifdef that accidently got checked in --- source/rpc_server/srv_spoolss_nt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index b9591ab487d..994969163fd 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4794,9 +4794,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); -#if 0 /* JERRY */ srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); -#endif return result; } -- cgit From 639c72e61c95de52c4059673ceaeedaa2bc0563d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Jan 2002 23:04:29 +0000 Subject: A *disgusting* hack to make some driver initialisation work. Not as bad as the older srvsvc hack - but close.... Jeremy. --- source/rpc_server/srv_pipe_hnd.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 0b0936356a6..65725bc2baa 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -35,6 +35,18 @@ static int pipes_open; #define MAX_OPEN_PIPES 2048 #endif +/* + * Sometimes I can't decide if I hate Windows printer driver + * writers more than I hate the Windows spooler service driver + * writers. This gets around a combination of bugs in the spooler + * and the HP 8500 PCL driver that causes a spooler spin. JRA. + */ + +#ifndef MAX_OPEN_SPOOLSS_PIPES +#define MAX_OPEN_SPOOLSS_PIPES 20 +#endif +static int current_spoolss_pipes_open; + static pipes_struct *Pipes; static struct bitmap *bmap; @@ -126,11 +138,20 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, int i; pipes_struct *p; static int next_pipe; + BOOL is_spoolss_pipe = False; DEBUG(4,("Open pipe requested %s (pipes_open=%d)\n", pipe_name, pipes_open)); - + if (strstr(pipe_name, "spoolss")) + is_spoolss_pipe = True; + + if (is_spoolss_pipe && current_spoolss_pipes_open >= MAX_OPEN_SPOOLSS_PIPES) { + DEBUG(10,("open_rpc_pipe_p: spooler bug workaround. Denying open on pipe %s\n", + pipe_name )); + return NULL; + } + /* not repeating pipe numbers makes it easier to track things in log files and prevents client bugs where pipe numbers are reused over connection restarts */ @@ -243,6 +264,9 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, for (p = Pipes; p; p = p->next) DEBUG(5,("open pipes: name %s pnum=%x\n", p->name, p->pnum)); + if (is_spoolss_pipe) + current_spoolss_pipes_open++; + return chain_p; } @@ -906,6 +930,9 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn) return False; } + if (strstr(p->name, "spoolss")) + current_spoolss_pipes_open--; + prs_mem_free(&p->out_data.rdata); prs_mem_free(&p->in_data.data); -- cgit From f7ee585da4b81b427007fdd9a5cd1f6ca74d6d93 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 25 Jan 2002 00:12:41 +0000 Subject: A double free of mem_ctx spotted by Charlene Zang of Panasas --- source/nsswitch/winbindd_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c index 4f9be2e7c38..3185e261cd4 100644 --- a/source/nsswitch/winbindd_user.c +++ b/source/nsswitch/winbindd_user.c @@ -184,7 +184,7 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat user_rid, group_rid, gecos_name, &state->response.data.pw)) { winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry); - talloc_destroy(mem_ctx); + /* talloc_destroy(mem_ctx); Surely this is wrong */ return WINBINDD_ERROR; } -- cgit From e65cf2a37c4860dbb392065c82bbc298c276f715 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Jan 2002 05:12:46 +0000 Subject: Return correct RPC fault PDU's for bad handles. Jeremy. --- source/include/ntdomain.h | 6 ++++ source/rpc_server/srv_lsa_hnd.c | 1 + source/rpc_server/srv_pipe.c | 7 ++++ source/rpc_server/srv_spoolss_nt.c | 68 +++++++++++++++++++------------------- 4 files changed, 48 insertions(+), 34 deletions(-) diff --git a/source/include/ntdomain.h b/source/include/ntdomain.h index 8718b9dc5fb..42679945011 100644 --- a/source/include/ntdomain.h +++ b/source/include/ntdomain.h @@ -208,6 +208,12 @@ typedef struct pipes_struct BOOL fault_state; + /* + * Set to true when we should return fault PDU's for a bad handle. + */ + + BOOL bad_handle_fault_state; + /* * Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's */ diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c index 860b7ab1b47..5504e4cf9c1 100644 --- a/source/rpc_server/srv_lsa_hnd.c +++ b/source/rpc_server/srv_lsa_hnd.c @@ -157,6 +157,7 @@ static struct policy *find_policy_by_hnd_internal(pipes_struct *p, POLICY_HND *h DEBUG(4,("Policy not found: ")); dump_data(4, (char *)hnd, sizeof(*hnd)); + p->bad_handle_fault_state = True; return NULL; } diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c index fd4590ac6be..73f8fe45d6c 100644 --- a/source/rpc_server/srv_pipe.c +++ b/source/rpc_server/srv_pipe.c @@ -1202,6 +1202,13 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, return False; } + if (p->bad_handle_fault_state) { + DEBUG(4,("api_rpcTNP: bad handle fault return.\n")); + p->bad_handle_fault_state = False; + setup_fault_pdu(p, NT_STATUS(0x1C00001A)); + return True; + } + slprintf(name, sizeof(name)-1, "out_%s", rpc_name); offset2 = prs_offset(&p->out_data.rdata); prs_set_offset(&p->out_data.rdata, offset1); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 994969163fd..d323b570bb5 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -91,7 +91,7 @@ static struct cli_state cli; static uint32 smb_connections=0; #define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ -((unsigned int)IVAL((hnd)->data5,4)) +((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) /* translate between internal status numbers and NT status numbers */ static int nt_printj_status(int v) @@ -242,7 +242,7 @@ static Printer_entry *find_printer_index_by_hnd(pipes_struct *p, POLICY_HND *hnd Printer_entry *find_printer = NULL; if(!find_policy_by_hnd(p,hnd,(void **)&find_printer)) { - DEBUG(3,("find_printer_index_by_hnd: Printer handle not found: ")); + DEBUG(2,("find_printer_index_by_hnd: Printer handle not found: ")); return NULL; } @@ -258,7 +258,7 @@ static BOOL close_printer_handle(pipes_struct *p, POLICY_HND *hnd) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("close_printer_handle: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); + DEBUG(2,("close_printer_handle: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(hnd))); return False; } @@ -276,7 +276,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("delete_printer_handle: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); + DEBUG(2,("delete_printer_handle: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(hnd))); return WERR_BADFID; } @@ -335,7 +335,7 @@ static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number) Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("get_printer_snum: Invalid handle (%s:%u)\n", OUR_HANDLE(hnd))); + DEBUG(2,("get_printer_snum: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(hnd))); return False; } @@ -359,7 +359,7 @@ static BOOL set_printer_hnd_accesstype(pipes_struct *p, POLICY_HND *hnd, uint32 Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); if (!Printer) { - DEBUG(0,("set_printer_hnd_accesstype: Invalid handle (%s:%u)", OUR_HANDLE(hnd))); + DEBUG(2,("set_printer_hnd_accesstype: Invalid handle (%s:%u:%u)", OUR_HANDLE(hnd))); return False; } @@ -628,7 +628,7 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size uint32 low, high; if (len != sizeof(msg)) { - DEBUG(0,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); + DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); return; } @@ -1005,7 +1005,7 @@ static WERROR _spoolss_enddocprinter_internal(pipes_struct *p, POLICY_HND *handl Printer_entry *Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_enddocprinter_internal: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_enddocprinter_internal: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -1244,7 +1244,7 @@ static BOOL getprinterdata_printer(pipes_struct *p, TALLOC_CTX *ctx, POLICY_HND DEBUG(5,("getprinterdata_printer\n")); if (!Printer) { - DEBUG(0,("getprinterdata_printer: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("getprinterdata_printer: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return False; } @@ -1320,7 +1320,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO if (!Printer) { if((*data=(uint8 *)talloc_zero(p->mem_ctx, 4*sizeof(uint8))) == NULL) return WERR_NOMEM; - DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_getprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -1407,7 +1407,7 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE Printer_entry *Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_rffpcnex: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_rffpcnex: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -2243,7 +2243,7 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int continue; if((tid=(SPOOL_NOTIFY_INFO_DATA *)Realloc(info->data, (info->count+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("construct_notify_printer_info: failed to enlarge buffer info->data!\n")); + DEBUG(2,("construct_notify_printer_info: failed to enlarge buffer info->data!\n")); return False; } else info->data = tid; @@ -2298,7 +2298,7 @@ static BOOL construct_notify_jobs_info(print_queue_struct *queue, continue; if((tid=Realloc(info->data, (info->count+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("construct_notify_jobs_info: failed to enlarg buffer info->data!\n")); + DEBUG(2,("construct_notify_jobs_info: failed to enlarg buffer info->data!\n")); return False; } else info->data = tid; @@ -2501,7 +2501,7 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN r_u->info_ptr=0x1; if (!Printer) { - DEBUG(0,("_spoolss_rfnpcnex: Invalid handle (%s:%u).\n", + DEBUG(2,("_spoolss_rfnpcnex: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); goto done; } @@ -2705,7 +2705,7 @@ static DEVICEMODE *construct_dev_mode(int snum) DEBUGADD(8,("getting printer characteristics\n")); if ((devmode = (DEVICEMODE *)malloc(sizeof(DEVICEMODE))) == NULL) { - DEBUG(0,("construct_dev_mode: malloc fail.\n")); + DEBUG(2,("construct_dev_mode: malloc fail.\n")); return NULL; } @@ -2850,7 +2850,7 @@ static BOOL construct_printer_info_3(PRINTER_INFO_3 **pp_printer, int snum) *pp_printer = NULL; if ((printer = (PRINTER_INFO_3 *)malloc(sizeof(PRINTER_INFO_3))) == NULL) { - DEBUG(0,("construct_printer_info_3: malloc fail.\n")); + DEBUG(2,("construct_printer_info_3: malloc fail.\n")); return False; } @@ -2952,7 +2952,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 if (construct_printer_info_1(flags, ¤t_prt, snum)) { if((tp=Realloc(printers, (*returned +1)*sizeof(PRINTER_INFO_1))) == NULL) { - DEBUG(0,("enum_all_printers_info_1: failed to enlarge printers buffer!\n")); + DEBUG(2,("enum_all_printers_info_1: failed to enlarge printers buffer!\n")); SAFE_FREE(printers); *returned=0; return WERR_NOMEM; @@ -3101,7 +3101,7 @@ static WERROR enum_all_printers_info_2(NEW_BUFFER *buffer, uint32 offered, uint3 if (construct_printer_info_2(¤t_prt, snum)) { if((tp=Realloc(printers, (*returned +1)*sizeof(PRINTER_INFO_2))) == NULL) { - DEBUG(0,("enum_all_printers_info_2: failed to enlarge printers buffer!\n")); + DEBUG(2,("enum_all_printers_info_2: failed to enlarge printers buffer!\n")); SAFE_FREE(printers); *returned = 0; return WERR_NOMEM; @@ -3614,7 +3614,7 @@ static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *ser slprintf(line, sizeof(line)-1, "\\\\%s%s", servername, v); DEBUGADD(6,("%d:%s:%d\n", i, line, strlen(line))); if((tuary=Realloc(*uni_array, (j+strlen(line)+2)*sizeof(uint16))) == NULL) { - DEBUG(0,("init_unistr_array: Realloc error\n" )); + DEBUG(2,("init_unistr_array: Realloc error\n" )); return; } else *uni_array = tuary; @@ -4075,7 +4075,7 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_endpageprinter: Invalid handle (%s:%u).\n",OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_endpageprinter: Invalid handle (%s:%u:%u).\n",OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4105,7 +4105,7 @@ WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, S struct current_user user; if (!Printer) { - DEBUG(0,("_spoolss_startdocprinter: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_startdocprinter: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4179,7 +4179,7 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_writeprinter: Invalid handle (%s:%u)\n",OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_writeprinter: Invalid handle (%s:%u:%u)\n",OUR_HANDLE(handle))); r_u->buffer_written = q_u->buffer_size2; return WERR_BADFID; } @@ -4208,7 +4208,7 @@ static WERROR control_printer(POLICY_HND *handle, uint32 command, get_current_user(&user, p); if (!Printer) { - DEBUG(0,("control_printer: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); + DEBUG(2,("control_printer: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4266,7 +4266,7 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer || !get_printer_snum(p, handle, &snum)) { - DEBUG(0,("update_printer_sec: Invalid handle (%s:%u)\n", + DEBUG(2,("update_printer_sec: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); result = WERR_BADFID; @@ -4814,7 +4814,7 @@ WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SET Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_setprinter: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_setprinter: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -4842,7 +4842,7 @@ WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u) Printer_entry *Printer= find_printer_index_by_hnd(p, handle); if (!Printer) { - DEBUG(0,("_spoolss_fcpn: Invalid handle (%s:%u)\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_fcpn: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6192,7 +6192,7 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S DEBUG(5,("spoolss_enumprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_enumprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6340,7 +6340,7 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP DEBUG(5,("spoolss_setprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_setprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_setprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6442,7 +6442,7 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ DEBUG(5,("spoolss_deleteprinterdata\n")); if (!Printer) { - DEBUG(0,("_spoolss_deleteprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_deleteprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6491,7 +6491,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM DEBUG(5,("spoolss_addform\n")); if (!Printer) { - DEBUG(0,("_spoolss_addform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_addform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6555,7 +6555,7 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE DEBUG(5,("spoolss_deleteform\n")); if (!Printer) { - DEBUG(0,("_spoolss_deleteform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_deleteform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -6611,7 +6611,7 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * DEBUG(5,("spoolss_setform\n")); if (!Printer) { - DEBUG(0,("_spoolss_setform: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_setform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } /* can't set if builtin */ @@ -7061,7 +7061,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, if (!Printer) { if((*data=(uint8 *)talloc_zero(p->mem_ctx, 4*sizeof(uint8))) == NULL) return WERR_NOMEM; - DEBUG(0,("_spoolss_getprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_getprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } @@ -7240,7 +7240,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ DEBUG(4,("_spoolss_enumprinterdataex\n")); if (!Printer) { - DEBUG(0,("_spoolss_enumprinterdata: Invalid handle (%s:%u).\n", OUR_HANDLE(handle))); + DEBUG(2,("_spoolss_enumprinterdata: Invalid handle (%s:%u:%u1<).\n", OUR_HANDLE(handle))); return WERR_BADFID; } -- cgit From 9479cf2dc4487336d66e32e9fbeaaae50d34603d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 25 Jan 2002 15:36:46 +0000 Subject: merge from APPLIANCE_HEAD (remove add_a_printer) --- source/include/proto.h | 1 - source/printing/nt_printing.c | 36 +----------------------------------- source/rpc_server/srv_spoolss_nt.c | 6 +++--- 3 files changed, 4 insertions(+), 39 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index ca04ad04742..090be82da01 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2316,7 +2316,6 @@ NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode); void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); void get_printer_subst_params(int snum, fstring *printername, fstring *sharename, fstring *portname); WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level); -WERROR add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level); uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level); uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level); WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param); diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 0b57e874ee2..621adba0d88 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2836,40 +2836,6 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) return result; } -/**************************************************************************** - Add a printer. This is called from ADDPRINTER(EX) and also SETPRINTER. - We split this out from mod_a_printer as it updates the id's and timestamps. -****************************************************************************/ - -WERROR add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) -{ - WERROR result; - - dump_a_printer(printer, level); - - switch (level) - { - case 2: - { - /* - * Update the changestamp. See comments in mod_a_printer() - * --jerry - */ - - printer.info_2->changeid = rev_changeid(); - printer.info_2->c_setprinter++; - - result=update_a_printer_2(printer.info_2); - break; - } - default: - result=WERR_UNKNOWN_LEVEL; - break; - } - - return result; -} - /**************************************************************************** Initialize printer devmode & data with previously saved driver init values. ****************************************************************************/ @@ -4061,7 +4027,7 @@ WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul * Finally write back to the tdb. */ - result = add_a_printer(*printer, 2); + result = mod_a_printer(*printer, 2); done: diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d323b570bb5..0353706189f 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4625,7 +4625,7 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1, PI_CHECK_INT(averageppm); /* Yuck - don't check the printername or servername as the - add_a_printer() code plays games with them. You can't + mod_a_printer() code plays games with them. You can't change the printername or the sharename through this interface in Samba. */ @@ -4788,7 +4788,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, } /* Update printer info */ - result = add_a_printer(*printer, 2); + result = mod_a_printer(*printer, 2); done: free_a_printer(&printer, 2); @@ -5964,7 +5964,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ set_driver_init(printer, 2); /* write the ASCII on disk */ - err = add_a_printer(*printer, 2); + err = mod_a_printer(*printer, 2); if (!W_ERROR_IS_OK(err)) { free_a_printer(&printer,2); return err; -- cgit From f0a885fcead1e5179dc402354b9464de8605d3f8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 25 Jan 2002 15:46:35 +0000 Subject: fix segfault reported by Alexander Bokovoy --- source/smbd/posix_acls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 5caf8a76aee..99c5760314b 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -758,9 +758,9 @@ static BOOL create_canon_ace_lists(files_struct *fsp, free_canon_ace_list(file_ace); free_canon_ace_list(dir_ace); - SAFE_FREE(current_ace); DEBUG(0,("create_canon_ace_lists: unable to map SID %s to uid or gid.\n", sid_to_string(str, ¤t_ace->trustee) )); + SAFE_FREE(current_ace); return False; } -- cgit From 3b3b121056764ca563033e50b8ad7384d84739d7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Jan 2002 18:12:52 +0000 Subject: picky about realloc (from jf). Jeremy. --- source/lib/talloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/lib/talloc.c b/source/lib/talloc.c index 1d8bc265802..fb5c3495fe4 100644 --- a/source/lib/talloc.c +++ b/source/lib/talloc.c @@ -79,6 +79,7 @@ void *talloc(TALLOC_CTX *t, size_t size) void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size) { struct talloc_chunk *tc; + void *new_ptr; /* size zero is equivalent to free() */ if (size == 0) @@ -90,13 +91,13 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size) for (tc=t->list; tc; tc=tc->next) { if (tc->ptr == ptr) { - ptr = Realloc(ptr, size); - if (ptr) { + new_ptr = Realloc(ptr, size); + if (new_ptr) { t->total_alloc_size += (size - tc->size); tc->size = size; - tc->ptr = ptr; + tc->ptr = new_ptr; } - return ptr; + return new_ptr; } } return NULL; -- cgit From a658a18eca90adc0bb55764dc7bd1df257a0d055 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Jan 2002 18:27:45 +0000 Subject: Make systemtime work for spooling on bigendian systems. Fix from Benjamin (Bj) Kuit bj@it.uts.edu.au. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 0353706189f..9d1db75659e 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2020,8 +2020,9 @@ static void spoolss_notify_job_size(int snum, } /******************************************************************* - * fill a notify_info_data with job position + Fill a notify_info_data with job position. ********************************************************************/ + static void spoolss_notify_job_position(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2033,8 +2034,9 @@ static void spoolss_notify_job_position(int snum, } /******************************************************************* - * fill a notify_info_data with submitted time + Fill a notify_info_data with submitted time. ********************************************************************/ + static void spoolss_notify_submitted_time(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2044,12 +2046,13 @@ static void spoolss_notify_submitted_time(int snum, struct tm *t; uint32 len; SYSTEMTIME st; + char *p; t=gmtime(&queue->time); len = sizeof(SYSTEMTIME); - data->notify_data.data.length = len/2 - 1; + data->notify_data.data.length = len; data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len); if (!data->notify_data.data.string) { @@ -2058,7 +2061,21 @@ static void spoolss_notify_submitted_time(int snum, } make_systemtime(&st, t); - memcpy(data->notify_data.data.string,&st,len); + + /* + * Systemtime must be linearized as a set of UINT16's. + * Fix from Benjamin (Bj) Kuit bj@it.uts.edu.au + */ + + p = (char *)data->notify_data.data.string; + SSVAL(p, 0, st.year); + SSVAL(p, 2, st.month); + SSVAL(p, 4, st.dayofweek); + SSVAL(p, 6, st.day); + SSVAL(p, 8, st.hour); + SSVAL(p, 10, st.minute); + SSVAL(p, 12, st.second); + SSVAL(p, 14, st.milliseconds); } #define END 65535 -- cgit From 2b768d655da5b6aa982f9696d1900c5896fac38e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Jan 2002 20:12:21 +0000 Subject: Fixed display of "remote downlevel document" in old print job submission case. Jeremy. --- source/include/proto.h | 2 +- source/printing/printfsp.c | 14 ++++++++++++-- source/smbd/open.c | 2 +- source/smbd/reply.c | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 090be82da01..99609fe1554 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2348,7 +2348,7 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/printfsp.c */ -files_struct *print_fsp_open(connection_struct *conn); +files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); /*The following definitions come from printing/print_generic.c */ diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c index 322deadf0fa..ea50f43d2e2 100644 --- a/source/printing/printfsp.c +++ b/source/printing/printfsp.c @@ -27,17 +27,27 @@ open a print file and setup a fsp for it. This is a wrapper around print_job_start(). ***************************************************************************/ -files_struct *print_fsp_open(connection_struct *conn) +files_struct *print_fsp_open(connection_struct *conn, char *fname) { int jobid; SMB_STRUCT_STAT sbuf; extern struct current_user current_user; files_struct *fsp = file_new(conn); + fstring name; if(!fsp) return NULL; - jobid = print_job_start(¤t_user, SNUM(conn), "smb.prn"); + fstrcpy( name, "Remote Downlevel Document"); + if (fname) { + char *p = strrchr(fname, '/'); + fstrcat(name, " "); + if (!p) + p = fname; + fstrcat(name, p); + } + + jobid = print_job_start(¤t_user, SNUM(conn), name); if (jobid == -1) { file_free(fsp); return NULL; diff --git a/source/smbd/open.c b/source/smbd/open.c index 13e40e5e7e9..9cefcc9b45e 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -639,7 +639,7 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S of the passed parameters are ignored */ *Access = DOS_OPEN_WRONLY; *action = FILE_WAS_CREATED; - return print_fsp_open(conn); + return print_fsp_open(conn, fname); } fsp = file_new(conn); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 0e4e466b33e..e00671b659e 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3204,7 +3204,7 @@ int reply_printopen(connection_struct *conn, } /* Open for exclusive use, write only. */ - fsp = print_fsp_open(conn); + fsp = print_fsp_open(conn, NULL); if (!fsp) { END_PROFILE(SMBsplopen); -- cgit From aab0447a5a99f63bcd854bc1b2d90fbda08bcd14 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 26 Jan 2002 01:20:49 +0000 Subject: Fixed ADDPRINTEREX to take a devmode and a security descriptor... Jeremy. --- source/include/rpc_spoolss.h | 13 +++------- source/rpc_parse/parse_spoolss.c | 50 ++++++++++++++++++++++---------------- source/rpc_server/srv_spoolss_nt.c | 10 +++----- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 102dcea671d..9ed83b18d8a 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1347,7 +1347,6 @@ typedef struct spool_printer_info_level_2 UNISTR2 printprocessor; UNISTR2 datatype; UNISTR2 parameters; - SEC_DESC_BUF *secdesc; } SPOOL_PRINTER_INFO_LEVEL_2; @@ -1489,10 +1488,8 @@ typedef struct spool_q_addprinter UNISTR2 server_name; uint32 level; SPOOL_PRINTER_INFO_LEVEL info; - uint32 unk0; - uint32 unk1; - uint32 unk2; - uint32 unk3; + DEVMODE_CTR devmode_ctr; + SEC_DESC_BUF *secdesc_ctr; uint32 user_level; SPOOL_USER_LEVEL user; } @@ -1536,10 +1533,8 @@ typedef struct spool_q_addprinterex UNISTR2 server_name; uint32 level; SPOOL_PRINTER_INFO_LEVEL info; - uint32 unk0; - uint32 unk1; - uint32 unk2; - uint32 unk3; + DEVMODE_CTR devmode_ctr; + SEC_DESC_BUF *secdesc_ctr; uint32 user_switch; SPOOL_USER_CTR user_ctr; } diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 8d649e5fc56..94bf6f906b7 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -778,6 +778,8 @@ BOOL make_spoolss_q_addprinterex( if (!ctr) return False; + ZERO_STRUCTP(q_u); + q_u->server_name_ptr = (srv_name!=NULL)?1:0; init_unistr2(&q_u->server_name, srv_name, strlen(srv_name)); @@ -797,8 +799,6 @@ BOOL make_spoolss_q_addprinterex( break; } - q_u->unk0 = q_u->unk1 = q_u->unk2 = q_u->unk3 = 0; - q_u->user_switch=1; q_u->user_ctr.level=1; @@ -865,7 +865,6 @@ BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 init_unistr2_from_unistr(&inf->datatype, &info->datatype); init_unistr2_from_unistr(&inf->parameters, &info->parameters); init_unistr2_from_unistr(&inf->datatype, &info->datatype); - inf->secdesc = inf->secdesc; *spool_info2 = inf; @@ -4506,6 +4505,8 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth) { + uint32 ptr_sec_desc = 0; + prs_debug(ps, depth, desc, "spoolss_io_q_addprinterex"); depth++; @@ -4525,26 +4526,33 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct if(!spool_io_printer_info_level("", &q_u->info, ps, depth)) return False; - /* the 4 unknown are all 0 */ - - /* - * en fait ils sont pas inconnu - * par recoupement avec rpcSetPrinter - * c'est le devicemode - * et le security descriptor. - */ - - if(!prs_align(ps)) - return False; - if(!prs_uint32("unk0", ps, depth, &q_u->unk0)) - return False; - if(!prs_uint32("unk1", ps, depth, &q_u->unk1)) - return False; - if(!prs_uint32("unk2", ps, depth, &q_u->unk2)) - return False; - if(!prs_uint32("unk3", ps, depth, &q_u->unk3)) + if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) return False; + switch (q_u->level) { + case 2: + ptr_sec_desc = q_u->info.info_2->secdesc_ptr; + break; + case 3: + ptr_sec_desc = q_u->info.info_3->secdesc_ptr; + break; + } + if (ptr_sec_desc) { + if (!sec_io_desc_buf(desc, &q_u->secdesc_ctr, ps, depth)) + return False; + } else { + uint32 dummy; + + /* Parse a NULL security descriptor. This should really + happen inside the sec_io_desc_buf() function. */ + + prs_debug(ps, depth, "", "sec_io_desc_buf"); + if (!prs_uint32("size", ps, depth + 1, &dummy)) + return False; + if (!prs_uint32("ptr", ps, depth + 1, &dummy)) + return False; + } + if(!prs_uint32("user_switch", ps, depth, &q_u->user_switch)) return False; if(!spool_io_user_level("", &q_u->user_ctr, ps, depth)) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 9d1db75659e..197d808d15e 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -5913,7 +5913,7 @@ WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUM ****************************************************************************/ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_srv_name, const SPOOL_PRINTER_INFO_LEVEL *info, - uint32 unk0, uint32 unk1, uint32 unk2, uint32 unk3, + DEVICEMODE *devmode, SEC_DESC_BUF *sec_desc_buf, uint32 user_switch, const SPOOL_USER_CTR *user, POLICY_HND *handle) { @@ -6011,10 +6011,8 @@ WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_ UNISTR2 *uni_srv_name = &q_u->server_name; uint32 level = q_u->level; SPOOL_PRINTER_INFO_LEVEL *info = &q_u->info; - uint32 unk0 = q_u->unk0; - uint32 unk1 = q_u->unk1; - uint32 unk2 = q_u->unk2; - uint32 unk3 = q_u->unk3; + DEVICEMODE *devmode = q_u->devmode_ctr.devmode; + SEC_DESC_BUF *sdb = q_u->secdesc_ctr; uint32 user_switch = q_u->user_switch; SPOOL_USER_CTR *user = &q_u->user_ctr; POLICY_HND *handle = &r_u->handle; @@ -6026,7 +6024,7 @@ WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_ return WERR_UNKNOWN_LEVEL; case 2: return spoolss_addprinterex_level_2(p, uni_srv_name, info, - unk0, unk1, unk2, unk3, + devmode, sdb, user_switch, user, handle); default: return WERR_UNKNOWN_LEVEL; -- cgit From 6179c0306e1d2c9903e51d62371a9299b411a5b0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 27 Jan 2002 05:25:17 +0000 Subject: fix a few typos --- docs/docbook/projdoc/UNIX_INSTALL.sgml | 20 ++++++++++---------- docs/docbook/projdoc/winbind.sgml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/docbook/projdoc/UNIX_INSTALL.sgml b/docs/docbook/projdoc/UNIX_INSTALL.sgml index ee91f6e07aa..90d48435770 100644 --- a/docs/docbook/projdoc/UNIX_INSTALL.sgml +++ b/docs/docbook/projdoc/UNIX_INSTALL.sgml @@ -126,22 +126,22 @@ Step 5: Starting the smbd and nmbd - - You must choose to start smbd and nmbd either - as daemons or from inetd. Don't try + + You must choose to start smbd and nmbd either + as daemons or from inetd. Don't try to do both! Either you can put them in - inetd.conf and have them started on demand + inetd.conf and have them started on demand by inetd, or you can start them as daemons either from the command line or in - /etc/rc.local. See the man pages for details - on the command line options. Take particular care to read - the bit about what user you need to be in order to start + /etc/rc.local. See the man pages for details + on the command line options. Take particular care to read + the bit about what user you need to be in order to start Samba. In many cases you must be root. The main advantage of starting smbd - and nmbd as a daemon is that they will - respond slightly more quickly to an initial connection - request. This is, however, unlikely to be a problem. + and nmbd using the recommended daemon method + is that they will respond slightly more quickly to an initial connection + request. Step 5a: Starting from inetd.conf diff --git a/docs/docbook/projdoc/winbind.sgml b/docs/docbook/projdoc/winbind.sgml index 8ea419d758f..eaa14bf0c25 100644 --- a/docs/docbook/projdoc/winbind.sgml +++ b/docs/docbook/projdoc/winbind.sgml @@ -624,7 +624,7 @@ CEO+TsInternetUser -Obviously, I have named my domain 'CEO' and my winbindd +Obviously, I have named my domain 'CEO' and my winbind separator is '+'. -- cgit From d6c1f035998798926f9b3b2ee6c1d33a19928b37 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 27 Jan 2002 05:26:23 +0000 Subject: document new "deault devmode" parameter and rebuild docs --- docs/docbook/manpages/smb.conf.5.sgml | 53 ++++++++++++++++++--- docs/htmldocs/smb.conf.5.html | 87 ++++++++++++++++++++++++++++++----- docs/manpages/smb.conf.5 | 47 +++++++++++++++---- 3 files changed, 160 insertions(+), 27 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 0e60d372ebc..44ff2205c90 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -139,7 +139,7 @@ parameters in this section apply to the server as a whole, or are defaults for sections which do not - specifically define certain items. See the notes + specifically define certain items. See the notes under PARAMETERS for more information. @@ -183,7 +183,7 @@ A similar process occurs if the requested section name is "homes", except that the share name is not - changed to that of the requesting user. This method of using + changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC. @@ -227,7 +227,7 @@ When a connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, but a [homes] section exists, it is used as described - above. Otherwise, the requested section name is treated as a + above. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name. If a match is found, a new printer share is created by cloning @@ -315,7 +315,7 @@ the default behavior for all services. parameters are arranged here in alphabetical order - this may - not create best bedfellows, but at least you can find them! Where + not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym. @@ -793,6 +793,7 @@ create mask create mode default case + default devmode delete readonly delete veto files deny hosts @@ -1849,11 +1850,49 @@ + + default devmode (S) + This parameter is only applicable to printable services. When smbd is serving + Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba + server has a Device Mode which defines things such as paper size and + orientation and duplex settings. The device mode can only correctly be + generated by the printer driver itself (which can only be executed on a + Win32 platform). Because smbd is unable to execute the driver code + to generate the device mode, the default behavior is to set this field + to NULL. + + + Most problems with serving printer drivers to Windows NT/2k/XP clients + can be traced to a problem with the generated device mode. Certain drivers + will do things such as crashing the client's Explorer.exe with a NULL devmode. + However, other printer drivers can cause the client's spooler service + (spoolsv.exe) to die if the devmode was not created by the driver itself + (i.e. smbd generates a default devmode). + + + This parameter should be used with care and tested with the printer + driver in question. It is better to leave the device mode to NULL + and let the Windows client set the correct values. Because drivers do not + do this all the time, setting default devmode = yes + will instruct smbd to generate a default one. + + + For more information on Windows NT/2k printing and Device Modes, + see the MSDN documentation. + + + Default: default devmode = no + + + + + default service (G) - This parameter specifies the name of a service - which will be connected to if the service actually requested cannot - be found. Note that the square brackets are NOT + This parameter specifies the name of a service + which will be connected to if the service actually requested cannot + be found. Note that the square brackets are NOT given in the parameter value (see example below). There is no default value for this parameter. If this diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html index 8c1f97af8e9..aaf38a0cb2b 100644 --- a/docs/htmldocs/smb.conf.5.html +++ b/docs/htmldocs/smb.conf.5.html @@ -232,7 +232,7 @@ NAME="AEN50" >

    parameters in this section apply to the server as a whole, or are defaults for sections which do not - specifically define certain items. See the notes + specifically define certain items. See the notes under PARAMETERS for more information.

    A similar process occurs if the requested section name is "homes", except that the share name is not - changed to that of the requesting user. This method of using + changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC.

    When a connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, but a [homes] section exists, it is used as described - above. Otherwise, the requested section name is treated as a + above. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name. If a match is found, a new printer share is created by cloning @@ -493,7 +493,7 @@ NAME="AEN102" the default behavior for all services.

    parameters are arranged here in alphabetical order - this may - not create best bedfellows, but at least you can find them! Where + not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym.

  • default devmode

  • EXPLANATION OF EACH PARAMETER

  • default devmode (S)

    This parameter is only applicable to printable services. When smbd is serving + Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba + server has a Device Mode which defines things such as paper size and + orientation and duplex settings. The device mode can only correctly be + generated by the printer driver itself (which can only be executed on a + Win32 platform). Because smbd is unable to execute the driver code + to generate the device mode, the default behavior is to set this field + to NULL. +

    Most problems with serving printer drivers to Windows NT/2k/XP clients + can be traced to a problem with the generated device mode. Certain drivers + will do things such as crashing the client's Explorer.exe with a NULL devmode. + However, other printer drivers can cause the client's spooler service + (spoolsv.exe) to die if the devmode was not created by the driver itself + (i.e. smbd generates a default devmode). +

    This parameter should be used with care and tested with the printer + driver in question. It is better to leave the device mode to NULL + and let the Windows client set the correct values. Because drivers do not + do this all the time, setting default devmode = yes + will instruct smbd to generate a default one. +

    For more information on Windows NT/2k printing and Device Modes, + see the MSDN documentation. +

    Default: default devmode = no

    default service (G)

    This parameter specifies the name of a service - which will be connected to if the service actually requested cannot +>This parameter specifies the name of a service + which will be connected to if the service actually requested cannot be found. Note that the square brackets are NOT +> given in the parameter value (see example below).

    There is no default value for this parameter. If this @@ -19224,7 +19287,7 @@ CLASS="COMMAND" >

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "24 January 2002" "" "" +.TH "SMB.CONF" "5" "26 January 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -122,7 +122,7 @@ elsewhere): .PP parameters in this section apply to the server as a whole, or are defaults for sections which do not -specifically define certain items. See the notes +specifically define certain items. See the notes under PARAMETERS for more information. .SS "THE HOMES SECTION" .PP @@ -167,7 +167,7 @@ of fuss. .PP A similar process occurs if the requested section name is "homes", except that the share name is not -changed to that of the requesting user. This method of using +changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC. .PP @@ -213,7 +213,7 @@ specified in the local host's printcap file. When a connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, but a [homes] section exists, it is used as described -above. Otherwise, the requested section name is treated as a +above. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name. If a match is found, a new printer share is created by cloning @@ -307,7 +307,7 @@ the [global] section - in which case they will define the default behavior for all services. .PP parameters are arranged here in alphabetical order - this may -not create best bedfellows, but at least you can find them! Where +not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym. .SH "VARIABLE SUBSTITUTIONS" @@ -1083,6 +1083,9 @@ each parameter for details. Note that some are synonyms. \fIdefault case\fR .TP 0.2i \(bu +\fIdefault devmode\fR +.TP 0.2i +\(bu \fIdelete readonly\fR .TP 0.2i \(bu @@ -2174,10 +2177,38 @@ See the section on NAME MANGLING. Also note the \fIshort preserve case\fR para Default: \fBdefault case = lower\fR .TP +\fBdefault devmode (S)\fR +This parameter is only applicable to printable services. When smbd is serving +Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba +server has a Device Mode which defines things such as paper size and +orientation and duplex settings. The device mode can only correctly be +generated by the printer driver itself (which can only be executed on a +Win32 platform). Because smbd is unable to execute the driver code +to generate the device mode, the default behavior is to set this field +to NULL. + +Most problems with serving printer drivers to Windows NT/2k/XP clients +can be traced to a problem with the generated device mode. Certain drivers +will do things such as crashing the client's Explorer.exe with a NULL devmode. +However, other printer drivers can cause the client's spooler service +(spoolsv.exe) to die if the devmode was not created by the driver itself +(i.e. smbd generates a default devmode). + +This parameter should be used with care and tested with the printer +driver in question. It is better to leave the device mode to NULL +and let the Windows client set the correct values. Because drivers do not +do this all the time, setting \fBdefault devmode = yes\fR +will instruct smbd to generate a default one. + +For more information on Windows NT/2k printing and Device Modes, +see the MSDN documentation . + +Default: \fBdefault devmode = no\fR +.TP \fBdefault service (G)\fR -This parameter specifies the name of a service -which will be connected to if the service actually requested cannot -be found. Note that the square brackets are \fBNOT\fR +This parameter specifies the name of a service +which will be connected to if the service actually requested cannot +be found. Note that the square brackets are \fBNOT\fR given in the parameter value (see example below). There is no default value for this parameter. If this -- cgit From 28f905a68934eb96e3f96e4ff46125f91cb678fc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 27 Jan 2002 05:31:34 +0000 Subject: WARNING!!! schema changes. rid, pwLastSet, et. al. are now stored as integers (not strings). This better enforces the schema intent. convert from strtol() to atol() since everything is in base 10. Will merge to HEAD on Monday. --- examples/LDAP/samba.schema | 82 ++++++++++++++++++++++++++++++++-------------- source/passdb/pdb_ldap.c | 17 +++++----- 2 files changed, 66 insertions(+), 33 deletions(-) diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema index 25184495eb8..28828f4f940 100644 --- a/examples/LDAP/samba.schema +++ b/examples/LDAP/samba.schema @@ -10,6 +10,9 @@ ## 1.3.1.5.1.4.1.7165.2.2.x - objectclasses ## +## +## Password hashes +## attributetype ( 1.3.6.1.4.1.7165.2.1.1 NAME 'lmPassword' DESC 'LanManager Passwd' EQUALITY caseIgnoreIA5Match @@ -20,41 +23,50 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.2 NAME 'ntPassword' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) -attributetype ( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet' - DESC 'NT pwdLastSet' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) - +## +## Account flags in string format ([UWDX ]) +## attributetype ( 1.3.6.1.4.1.7165.2.1.4 NAME 'acctFlags' DESC 'Account Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE ) +## +## Password timestamps & policies +## +attributetype ( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet' + DESC 'NT pwdLastSet' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) + attributetype ( 1.3.6.1.4.1.7165.2.1.5 NAME 'logonTime' DESC 'NT logonTime' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributetype ( 1.3.6.1.4.1.7165.2.1.6 NAME 'logoffTime' DESC 'NT logoffTime' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributetype ( 1.3.6.1.4.1.7165.2.1.7 NAME 'kickoffTime' DESC 'NT kickoffTime' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributetype ( 1.3.6.1.4.1.7165.2.1.8 NAME 'pwdCanChange' DESC 'NT pwdCanChange' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributetype ( 1.3.6.1.4.1.7165.2.1.9 NAME 'pwdMustChange' DESC 'NT pwdMustChange' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) +## +## string settings +## attributetype ( 1.3.6.1.4.1.7165.2.1.10 NAME 'homeDrive' DESC 'NT homeDrive' EQUALITY caseIgnoreIA5Match @@ -75,20 +87,28 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.13 NAME 'userWorkstations' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) +attributetype ( 1.3.6.1.4.1.7165.2.1.17 NAME 'smbHome' + DESC 'smbHome' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} ) + +attributetype ( 1.3.6.1.4.1.7165.2.1.18 NAME 'domain' + DESC 'Windows NT domain to which the user belongs' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} ) + +## +## user and group RID +## attributetype ( 1.3.6.1.4.1.7165.2.1.14 NAME 'rid' DESC 'NT rid' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID' DESC 'NT Group RID' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) - -attributetype ( 1.3.6.1.4.1.7165.2.1.17 NAME 'smbHome' - DESC 'smbHome' - EQUALITY caseIgnoreIA5Match - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} ) + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) ## ## The smbPasswordEntry objectclass has been depreciated in favor of the @@ -105,4 +125,16 @@ objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ - description $ userWorkstations $ primaryGroupID )) + description $ userWorkstations $ primaryGroupID $ domain )) + +## +## Used for Winbind experimentation +## +objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY + DESC 'Pool for allocating UNIX uids' + MUST ( uidNumber $ cn ) ) + +objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY + DESC 'Pool for allocating UNIX gids' + MUST ( gidNumber $ cn ) ) + diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 7f755fd724d..2ee3529d5eb 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -422,22 +422,22 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass, pstrcpy(domain, lp_workgroup()); get_single_attribute(ldap_struct, entry, "pwdLastSet", temp); - pass_last_set_time = (time_t) strtol(temp, NULL, 16); + pass_last_set_time = (time_t) atol(temp); get_single_attribute(ldap_struct, entry, "logonTime", temp); - logon_time = (time_t) strtol(temp, NULL, 16); + logon_time = (time_t) atol(temp); get_single_attribute(ldap_struct, entry, "logoffTime", temp); - logoff_time = (time_t) strtol(temp, NULL, 16); + logoff_time = (time_t) atol(temp); get_single_attribute(ldap_struct, entry, "kickoffTime", temp); - kickoff_time = (time_t) strtol(temp, NULL, 16); + kickoff_time = (time_t) atol(temp); get_single_attribute(ldap_struct, entry, "pwdCanChange", temp); - pass_can_change_time = (time_t) strtol(temp, NULL, 16); + pass_can_change_time = (time_t) atol(temp); get_single_attribute(ldap_struct, entry, "pwdMustChange", temp); - pass_must_change_time = (time_t) strtol(temp, NULL, 16); + pass_must_change_time = (time_t) atol(temp); /* recommend that 'gecos' and 'displayName' should refer to the same * attribute OID. userFullName depreciated, only used by Samba @@ -493,9 +493,9 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass, get_single_attribute(ldap_struct, entry, "description", acct_desc); get_single_attribute(ldap_struct, entry, "userWorkstations", workstations); get_single_attribute(ldap_struct, entry, "rid", temp); - user_rid = (uint32)strtol(temp, NULL, 10); + user_rid = (uint32)atol(temp); get_single_attribute(ldap_struct, entry, "primaryGroupID", temp); - group_rid = (uint32)strtol(temp, NULL, 10); + group_rid = (uint32)atol(temp); /* These values MAY be in LDAP, but they can also be retrieved through @@ -575,6 +575,7 @@ Initialize SAM_ACCOUNT from an LDAP query static BOOL init_ldap_from_sam (LDAPMod *** mods, int ldap_state, SAM_ACCOUNT * sampass) { pstring temp; + uint32 i; *mods = NULL; -- cgit From a8d3b75e13f202182886dcc3ba1884f2900344bf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Jan 2002 18:55:42 +0000 Subject: Changed the name of UNIX query to match the revised spec. Jeremy. --- source/include/trans2.h | 2 +- source/smbd/trans2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/include/trans2.h b/source/include/trans2.h index 7d35e9a5b61..2e086510e6e 100644 --- a/source/include/trans2.h +++ b/source/include/trans2.h @@ -417,7 +417,7 @@ Offset Size Name 64-bits worth of capability fun :-). */ -#define SMB_CIFS_UNIX_QUERY_INFO 0x200 +#define SMB_QUERY_CIFS_UNIX_INFO 0x200 /* Returns the following. diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 5da3c62a66b..3819e528b58 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1461,7 +1461,7 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf * in use. */ - case SMB_CIFS_UNIX_QUERY_INFO: + case SMB_QUERY_CIFS_UNIX_INFO: if (!lp_unix_extensions()) return ERROR_DOS(ERRDOS,ERRunknownlevel); -- cgit From 4c348fe77a31b8ebfa1f9d1b6112c2f8e10f66f8 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 28 Jan 2002 22:25:59 +0000 Subject: update packaging files --- packaging/SGI/idb.pl | 8 ++++---- packaging/SGI/mkrelease.sh | 8 ++++---- packaging/SGI/smb.conf | 8 ++++++++ packaging/SGI/winbindd.rc | 4 ++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl index 038a8be7342..c73350292b0 100755 --- a/packaging/SGI/idb.pl +++ b/packaging/SGI/idb.pl @@ -137,13 +137,13 @@ chdir $curdir; open(IDB,"> $curdir/$PKG.idb") || die "Unable to open $PKG.idb for output\n"; print IDB "f 0644 root sys etc/config/samba $SRCPFX/packaging/SGI/samba.config $PKG.sw.base config(update)\n"; -print IDB "f 0644 root sys etc/config/winbindd $SRCPFX/packaging/SGI/winbindd.config $PKG.sw.base config(update)\n"; +print IDB "f 0644 root sys etc/config/winbind $SRCPFX/packaging/SGI/winbindd.config $PKG.sw.base config(update)\n"; print IDB "f 0755 root sys etc/init.d/samba $SRCPFX/packaging/SGI/samba.rc $PKG.sw.base\n"; -print IDB "f 0755 root sys etc/init.d/winbindd $SRCPFX/packaging/SGI/winbindd.rc $PKG.sw.base\n"; -print IDB "l 0000 root sys etc/rc0.d/K36winbindd $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbindd)\n"; +print IDB "f 0755 root sys etc/init.d/winbind $SRCPFX/packaging/SGI/winbindd.rc $PKG.sw.base\n"; +print IDB "l 0000 root sys etc/rc0.d/K36winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n"; print IDB "l 0000 root sys etc/rc0.d/K37samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; -print IDB "l 0000 root sys etc/rc2.d/S82winbindd $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbindd)\n"; +print IDB "l 0000 root sys etc/rc2.d/S82winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n"; if ($PKG eq "samba_irix") { print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n"; diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh index 76aa3d6ee66..ed5d93dcc93 100755 --- a/packaging/SGI/mkrelease.sh +++ b/packaging/SGI/mkrelease.sh @@ -66,7 +66,7 @@ echo Making binaries echo "===================== Making Profile versions =======================" make clean -make -P "CFLAGS=-O -g3 -woff 1188 -D DMF_FIX -D WITH_PROFILE" CHECK bin/smbd bin/nmbd +make -P "CFLAGS=-O -g3 -woff 1188 -D WITH_PROFILE" CHECK bin/smbd bin/nmbd errstat=$? if [ $errstat -ne 0 ]; then echo "Error $errstat building profile sources\n"; @@ -77,7 +77,7 @@ mv bin/nmbd bin/nmbd.profile echo "===================== Making No Quota versions =======================" make clean -make -P "CFLAGS=-O -g3 -woff 1188 -D DMF_FIX -D QUOTAOBJS=smbd/noquotas.o" CHECK bin/smbd +make -P "CFLAGS=-O -g3 -woff 1188 -D QUOTAOBJS=smbd/noquotas.o" CHECK bin/smbd errstat=$? if [ $errstat -ne 0 ]; then echo "Error $errstat building noquota sources\n"; @@ -90,7 +90,7 @@ echo "===================== Making smbwrapper.32.so =======================" # just for this object ISA= export ISA -make -P "CFLAGS=-O -g3 -woff 1188 -D DMF_FIX" bin/smbwrapper.32.so +make -P "CFLAGS=-O -g3 -woff 1188" bin/smbwrapper.32.so errstat=$? if [ $errstat -ne 0 ]; then echo "Error $errstat building sources\n"; @@ -99,7 +99,7 @@ fi ISA=-mips3 export ISA echo "===================== Making Regular versions =======================" -make -P "CFLAGS=-O -g3 -woff 1188 -D DMF_FIX" all +make -P "CFLAGS=-O -g3 -woff 1188" all errstat=$? if [ $errstat -ne 0 ]; then echo "Error $errstat building sources\n"; diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf index 3448226faa3..932b5a58af4 100644 --- a/packaging/SGI/smb.conf +++ b/packaging/SGI/smb.conf @@ -93,6 +93,14 @@ ; Printer admin account to allow uploading printer drivers printer admin = lp +; Sample winbindd configuration parameters - uncomment and +; change if necessary for your desired configuration +; winbind uid = 50000-60000 +; winbind gid = 50000-60000 +; winbind separator = + +; winbind cache time = 10 +; password server = * + [homes] comment = Home Directories browseable = no diff --git a/packaging/SGI/winbindd.rc b/packaging/SGI/winbindd.rc index c63944a04d9..cf7f961601c 100644 --- a/packaging/SGI/winbindd.rc +++ b/packaging/SGI/winbindd.rc @@ -1,7 +1,7 @@ #! /bin/sh # -# winbindd server control +# winbindd control # IS_ON=/etc/chkconfig @@ -33,6 +33,6 @@ case $1 in exit 0 ;; *) - echo "usage: /etc/init.d/winbindd {start|stop}" + echo "usage: /etc/init.d/winbind {start|stop}" ;; esac -- cgit From e6aab91655fa8bf0535bcd51530b94f1a31f3006 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Jan 2002 23:36:40 +0000 Subject: Only allow ldap connect as root - fix from Andrew Bartlett. Jeremy. --- source/passdb/pdb_ldap.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 2ee3529d5eb..3b7b8123eb6 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -74,6 +74,11 @@ static BOOL ldap_open_connection (LDAP ** ldap_struct) int version, rc; int tls = LDAP_OPT_X_TLS_HARD; + if (geteuid() != 0) { + DEBUG(0, ("ldap_open_connection: cannot access LDAP when not root..\n")); + return False; + } + if (lp_ldap_ssl() == LDAP_SSL_ON && lp_ldap_port() == 389) { port = 636; } @@ -848,11 +853,6 @@ BOOL pdb_delete_sam_account(char *sname) LDAPMessage *result; /* Ensure we have euid as root - else deny this. */ - if (geteuid() != 0) { - DEBUG(0, ("pdb_delete_sam_account: non-root user cannot delete user %s from LDAP.\n", sname)); - return False; - } - if (!ldap_open_connection (&ldap_struct)) return False; @@ -906,12 +906,6 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override) LDAPMessage *entry; LDAPMod **mods; - /* Ensure we have euid as root - else deny this. */ - if (geteuid() != 0) { - DEBUG(0, ("pdb_update_sam_account: non-root user cannot update LDAP account.\n")); - return False; - } - if (!ldap_open_connection(&ldap_struct)) /* open a connection to the server */ return False; @@ -972,12 +966,6 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd) int ldap_op; uint32 num_result; - /* Ensure we have euid as root - else deny this. */ - if (geteuid() != 0) { - DEBUG(0, ("pdb_add_sam_account: non-root user cannot add LDAP account.\n")); - return False; - } - if (!ldap_open_connection(&ldap_struct)) /* open a connection to the server */ return False; -- cgit From fe9f6a70335a6fc1abf16a768cbeed226ac9a527 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 29 Jan 2002 01:17:48 +0000 Subject: Fix "strict allocate" to write the data out on ftruncate with extend. Jeremy. --- source/smbd/vfs-wrap.c | 78 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 8 deletions(-) diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 372dddf589f..7d84e8756eb 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -559,6 +559,62 @@ int vfswrap_utime(connection_struct *conn, char *path, struct utimbuf *times) return result; } +/********************************************************************* + A version of ftruncate that will write the space on disk if strict + allocate is set. +**********************************************************************/ + +static int strict_allocate_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) +{ + struct vfs_ops *vfs_ops = &fsp->conn->vfs_ops; + SMB_STRUCT_STAT st; + SMB_OFF_T currpos = vfs_ops->lseek(fsp, fd, 0, SEEK_CUR); + unsigned char zero_space[4096]; + SMB_OFF_T space_to_write = len - st.st_size; + + if (currpos == -1) + return -1; + + if (vfs_ops->fstat(fsp, fd, &st) == -1) + return -1; + +#ifdef S_ISFIFO + if (S_ISFIFO(st.st_mode)) + return 0; +#endif + + if (st.st_size == len) + return 0; + + /* Shrink - just ftruncate. */ + if (st.st_size > len) + return sys_ftruncate(fd, len); + + /* Write out the real space on disk. */ + if (vfs_ops->lseek(fsp, fd, st.st_size, SEEK_SET) != st.st_size) + return -1; + + space_to_write = len - st.st_size; + + memset(zero_space, '\0', sizeof(zero_space)); + while ( space_to_write > 0) { + SMB_OFF_T retlen; + SMB_OFF_T current_len_to_write = MIN(sizeof(zero_space),space_to_write); + + retlen = vfs_ops->write(fsp,fsp->fd,(char *)zero_space,current_len_to_write); + if (retlen <= 0) + return -1; + + space_to_write -= retlen; + } + + /* Seek to where we were */ + if (vfs_ops->lseek(fsp, fd, currpos, SEEK_SET) != currpos) + return -1; + + return 0; +} + int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) { int result = -1; @@ -569,13 +625,21 @@ int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) START_PROFILE(syscall_ftruncate); + if (lp_strict_allocate(SNUM(fsp->conn))) { + result = strict_allocate_ftruncate(fsp, fd, len); + END_PROFILE(syscall_ftruncate); + return result; + } + /* we used to just check HAVE_FTRUNCATE_EXTEND and only use sys_ftruncate if the system supports it. Then I discovered that you can have some filesystems that support ftruncate expansion and some that don't! On Linux fat can't do ftruncate extend but ext2 can. */ + result = sys_ftruncate(fd, len); - if (result == 0) goto done; + if (result == 0) + goto done; /* According to W. R. Stevens advanced UNIX prog. Pure 4.3 BSD cannot extend a file with ftruncate. Provide alternate implementation @@ -589,7 +653,7 @@ int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) size in which case the ftruncate above should have succeeded or shorter, in which case seek to len - 1 and write 1 byte of zero */ - if (vfs_ops->fstat(fsp, fd, &st) < 0) { + if (vfs_ops->fstat(fsp, fd, &st) == -1) { goto done; } @@ -610,19 +674,17 @@ int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) goto done; } - if (vfs_ops->lseek(fsp, fd, len-1, SEEK_SET) != len -1) { + if (vfs_ops->lseek(fsp, fd, len-1, SEEK_SET) != len -1) goto done; - } - if (vfs_ops->write(fsp, fd, &c, 1)!=1) { + if (vfs_ops->write(fsp, fd, &c, 1)!=1) goto done; - } /* Seek to where we were */ - if (vfs_ops->lseek(fsp, fd, currpos, SEEK_SET) != currpos) { + if (vfs_ops->lseek(fsp, fd, currpos, SEEK_SET) != currpos) goto done; - } result = 0; + done: END_PROFILE(syscall_ftruncate); -- cgit From bf06dc03d3019e7cecae643d2c8d339a1d7bdc2d Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 29 Jan 2002 18:14:44 +0000 Subject: Add a new version of smbprint, smbprint-new.sh, with Alfred Perlstien's improvements etc ... If, after a couple of releases, this has not generated any problems, we can quietly retire the old one as smbprint.old and make this one the default. --- examples/printing/smbprint-new.sh | 141 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 examples/printing/smbprint-new.sh diff --git a/examples/printing/smbprint-new.sh b/examples/printing/smbprint-new.sh new file mode 100644 index 00000000000..3281b1cf7c1 --- /dev/null +++ b/examples/printing/smbprint-new.sh @@ -0,0 +1,141 @@ +#!/bin/sh + +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /usr/var/spool/lpd/PRINTNAME/.config file. +# +# Script further modified by Richard Sharpe to fix some things. +# Get rid of the -x on the first line, and add parameters +# +# -t now causes translate to be used when sending files +# +# Further modifications by Alfred Perlstein to fix some problems and +# improve the quality of the code (3-Dec-2001). +# +# More hacking by Richard Sharpe to improve portability. 9-Dec-2001. +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# server=PC_SERVER +# service=PR_SHARENAME +# password="password" +# +# E.g. +# server=PAULS_PC +# service=CJET_371 +# password="" + +#smbclient=/usr/pkg/bin/smbclient +# Assume that smbclient will be in the same place as smbprint + +smbclient="`dirname $0`/smbclient" + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +TRANS=0 +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# server +# service +# password +# username (optional) +# IP (optional) +# debug (optional) +# debugsmb (optional) +# debugfile (optional) + $config_file + +if [ "x$password" = "x"] ; then + password="-N" +fi + +if [ "x$username" == "x" ] ; then + username="$server"; +fi + +while test $# -gt 0; do + case "$1" in + -t) + TRANS=1 + ;; + + *) # Bad Parameters, ignore them ... + ;; + esac + shift +done + +command="print - ;" +if [ $TRANS -eq 1 ]; then + command="translate;$command"; +fi + +debugfile="/tmp/smb-print.log" +if [ "x$debug" = "x" -o $debug -eq 0 ] ; then + debugfile=/dev/null debugargs= +else + set -x; exec >>$debugfile 2>&1 + debugargs="$debugfile." + #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" +fi + +if [ "x$smbconf" != "x" ]; then + + smbconf="-s $smbconf" + +fi + +if [ "x$IP" != "x" ]; then + + IP="-I $IP" + +fi + +if [ "x$debugargs" != "x" ]; then + + debugargs="-l $debugargs" + +fi + +$smbclient \ + "\\\\$server\\$service" \ + $password \ + $smbconf \ + $IP \ + $debugargs \ + -U $username \ + -P \ + -c "$command" +# -- cgit From ef0d863e58e381cbd68a638159c3d92015dcee40 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 29 Jan 2002 20:44:57 +0000 Subject: fix typo --- packaging/SGI/winbindd.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/SGI/winbindd.rc b/packaging/SGI/winbindd.rc index cf7f961601c..deb4708c667 100644 --- a/packaging/SGI/winbindd.rc +++ b/packaging/SGI/winbindd.rc @@ -21,7 +21,7 @@ fi case $1 in 'start') - if $IS_ON winbindd && test -x $WINBINDD; then + if $IS_ON winbind && test -x $WINBINDD; then $KILLALL -15 winbindd $ECHO "winbindd:\c" $WINBINDD ; $ECHO " winbindd." -- cgit From 29ce83abc3fb24bf78689834ae2a06eca37c9ce9 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 30 Jan 2002 01:14:47 +0000 Subject: allow smbpasswd -x to delete account even if not in /etc/passwd --- source/passdb/passdb.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 18313bc2c16..fd2a678a268 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -883,6 +883,16 @@ account without a valid local system user.\n", user_name); /* Get the smb passwd entry for this user */ pdb_init_sam(&sam_pass); + if(local_flags & LOCAL_DELETE_USER) { + if (!pdb_delete_sam_account(user_name)) { + slprintf(err_str,err_str_len-1, "Failed to delete entry for user %s.\n", user_name); + pdb_free_sam(sam_pass); + return False; + } + slprintf(msg_str, msg_str_len-1, "Deleted user %s.\n", user_name); + pdb_free_sam(sam_pass); + return True; + } if(!pdb_getsampwnam(sam_pass, user_name)) { pdb_free_sam(sam_pass); @@ -975,26 +985,17 @@ account without a valid local system user.\n", user_name); } } - if(local_flags & LOCAL_DELETE_USER) { - if (!pdb_delete_sam_account(user_name)) { - slprintf(err_str,err_str_len-1, "Failed to delete entry for user %s.\n", user_name); - pdb_free_sam(sam_pass); - return False; - } - slprintf(msg_str, msg_str_len-1, "Deleted user %s.\n", user_name); - } else { - if(!pdb_update_sam_account(sam_pass, True)) { - slprintf(err_str, err_str_len-1, "Failed to modify entry for user %s.\n", user_name); - pdb_free_sam(sam_pass); - return False; - } - if(local_flags & LOCAL_DISABLE_USER) - slprintf(msg_str, msg_str_len-1, "Disabled user %s.\n", user_name); - else if (local_flags & LOCAL_ENABLE_USER) - slprintf(msg_str, msg_str_len-1, "Enabled user %s.\n", user_name); - else if (local_flags & LOCAL_SET_NO_PASSWORD) - slprintf(msg_str, msg_str_len-1, "User %s password set to none.\n", user_name); + if(!pdb_update_sam_account(sam_pass, True)) { + slprintf(err_str, err_str_len-1, "Failed to modify entry for user %s.\n", user_name); + pdb_free_sam(sam_pass); + return False; } + if(local_flags & LOCAL_DISABLE_USER) + slprintf(msg_str, msg_str_len-1, "Disabled user %s.\n", user_name); + else if (local_flags & LOCAL_ENABLE_USER) + slprintf(msg_str, msg_str_len-1, "Enabled user %s.\n", user_name); + else if (local_flags & LOCAL_SET_NO_PASSWORD) + slprintf(msg_str, msg_str_len-1, "User %s password set to none.\n", user_name); pdb_free_sam(sam_pass); return True; -- cgit From 14fb35bf9f3bcf2755119acda2d9ae01d2d8ac66 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 30 Jan 2002 05:42:43 +0000 Subject: fixed error in DEBUG output with -i --- source/smbd/server.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/smbd/server.c b/source/smbd/server.c index 9679af3b4b5..4b7524b6639 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -740,7 +740,14 @@ static void usage(char *pname) DEBUG(3,( "loaded services\n")); if (!is_daemon && !is_a_socket(0)) { - DEBUG(0,("standard input is not a socket, assuming -D option\n")); + if (!interactive) + DEBUG(0,("standard input is not a socket, assuming -D option\n")); + + /* + * Setting is_daemon here prevents us from eventually calling + * the open_sockets_inetd() + */ + is_daemon = True; } -- cgit From f0072dbf366f24beaffd09ffd41f7a1cbb8860d1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 31 Jan 2002 05:04:27 +0000 Subject: Spelling fix. --- source/printing/nt_printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 621adba0d88..6c52e6fabe6 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -314,7 +314,7 @@ static int traverse_counting_printers(TDB_CONTEXT *t, TDB_DATA key, /******************************************************************* Update the spooler global c_setprinter. This variable is initialized - when the parent smbd starts whith the number of existing printers. It + when the parent smbd starts with the number of existing printers. It is monotonically increased by the current number of printers *after* each add or delete printer RPC. Only Microsoft knows why... JRR020119 ********************************************************************/ -- cgit From 04ce5ae49e96d9641c4fbc185d77e94840c9c5e5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Jan 2002 20:19:45 +0000 Subject: Reverted change as Andrew suggested. Jeremy. --- source/lib/util_sid.c | 2 -- source/rpc_server/srv_lsa_nt.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c index d1dcbb59990..d9f7efe39b8 100644 --- a/source/lib/util_sid.c +++ b/source/lib/util_sid.c @@ -44,7 +44,6 @@ DOM_SID global_sid_Builtin_Guests; /* Builtin guest users */ DOM_SID global_sid_Authenticated_Users; /* All authenticated rids */ DOM_SID global_sid_Network; /* Network rids */ DOM_SID global_sid_Anonymous; /* Anonymous login */ -DOM_SID global_sid_nonexistent; /* S-0-0. Used in Lsa level 3. */ const DOM_SID *global_sid_everyone = &global_sid_World; @@ -187,7 +186,6 @@ void generate_wellknown_sids(void) string_to_sid(&global_sid_Authenticated_Users, "S-1-5-11"); string_to_sid(&global_sid_Network, "S-1-5-2"); string_to_sid(&global_sid_Anonymous, "S-1-5-7"); - string_to_sid(&global_sid_nonexistent, "S-0-0"); /* Used in Lsa level 3. */ /* Create the anon token. */ sid_copy( &anonymous_token.user_sids[0], &global_sid_World); diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 4a33cc72a63..916850e1490 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -358,7 +358,6 @@ NTSTATUS _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_E NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u) { - extern DOM_SID global_sid_nonexistent; LSA_INFO_UNION *info = &r_u->dom; DOM_SID domain_sid; fstring dos_domain; @@ -410,7 +409,7 @@ NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INF break; case ROLE_STANDALONE: name = dos_domain; - sid = &global_sid_nonexistent; + sid = NULL; break; default: return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; -- cgit From 14d31c12678aa17c740f3c5531165f311eea411b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Jan 2002 20:39:11 +0000 Subject: Fixed missing read error set on return. Jeremy. --- source/lib/util_sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index c51243faa47..b2e80d03004 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -649,6 +649,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) len = read_smb_length_return_keepalive(fd,buffer,timeout); if (len < 0) { DEBUG(10,("receive_smb: length < 0!\n")); + smb_read_error = READ_ERROR; return(False); } -- cgit From ed0349fb5c5abe7519d30629f029231bd99a26cb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Jan 2002 21:48:07 +0000 Subject: Make revert fix for winbind. Fixups for compiling on HPUX 10.x and AIX. Jeremy. --- source/Makefile.in | 4 ++-- source/configure | 20 ++++++++++---------- source/configure.in | 2 +- source/include/config.h.in | 6 ++++++ source/lib/util.c | 4 ---- source/nsswitch/hp_nss_common.h | 4 ++++ 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 7e8820f6ac8..067b223008f 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -680,8 +680,8 @@ installclientlib: # revert to the previously installed version revert: - @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SPROGS) - @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS) + @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SPROGS) ${WINBIND_SPROGS} + @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS) ${WINBIND_PROGS} installman: @$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir) "@ROFF@" diff --git a/source/configure b/source/configure index d87259f1ef5..b42465297dc 100755 --- a/source/configure +++ b/source/configure @@ -2292,7 +2292,7 @@ else fi done -for ac_hdr in security/pam_modules.h security/_pam_macros.h +for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null diff --git a/source/configure.in b/source/configure.in index e7d7a4eb1a5..fe53556cef3 100644 --- a/source/configure.in +++ b/source/configure.in @@ -381,7 +381,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) -AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h) +AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h synch.h pthread.h) # # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. diff --git a/source/include/config.h.in b/source/include/config.h.in index 006e36f16c8..803c2a6ca0e 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -861,6 +861,9 @@ /* Define if you have the header file. */ #undef HAVE_POLL_H +/* Define if you have the header file. */ +#undef HAVE_PTHREAD_H + /* Define if you have the header file. */ #undef HAVE_READLINE_H @@ -909,6 +912,9 @@ /* Define if you have the header file. */ #undef HAVE_STROPTS_H +/* Define if you have the header file. */ +#undef HAVE_SYNCH_H + /* Define if you have the header file. */ #undef HAVE_SYS_ACL_H diff --git a/source/lib/util.c b/source/lib/util.c index 2593f8b25db..a8c37bc36bf 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -46,10 +46,6 @@ #include -#else /* !WITH_NISPLUS_HOME */ - -#include "rpcsvc/ypclnt.h" - #endif /* WITH_NISPLUS_HOME */ #endif /* HAVE_NETGROUP && WITH_AUTOMOUNT */ diff --git a/source/nsswitch/hp_nss_common.h b/source/nsswitch/hp_nss_common.h index 5cbccc934b9..7ce67ed81fa 100644 --- a/source/nsswitch/hp_nss_common.h +++ b/source/nsswitch/hp_nss_common.h @@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA. */ +#ifdef HAVE_SYNCH_H #include +#endif +#ifdef HAVE_PTHREAD_H #include +#endif typedef enum { NSS_SUCCESS, -- cgit From 9fac71d37db5bd798eb5f45d34dcfd1810d96d87 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Jan 2002 22:33:21 +0000 Subject: Fix from Michael Steffens to make signal processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy. --- source/client/client.c | 2 +- source/include/proto.h | 1982 ++++++++++++++++++++++---------------------- source/lib/readline.c | 2 +- source/lib/select.c | 73 +- source/lib/util.c | 2 +- source/lib/util_sock.c | 4 +- source/libsmb/nmblib.c | 2 +- source/nmbd/nmbd_packets.c | 2 +- source/nsswitch/winbindd.c | 5 +- source/smbd/oplock.c | 2 +- source/smbd/process.c | 2 +- source/smbd/server.c | 2 +- source/utils/smbfilter.c | 4 +- 13 files changed, 1059 insertions(+), 1025 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index adaf7ddf629..fe339094c8e 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -2083,7 +2083,7 @@ static void readline_callback(void) timeout.tv_sec = 0; timeout.tv_usec = 0; - sys_select_intr(cli->fd+1,&fds,&timeout); + sys_select_intr(cli->fd+1,&fds,NULL,NULL,&timeout); /* We deliberately use receive_smb instead of client_receive_smb as we want to receive diff --git a/source/include/proto.h b/source/include/proto.h index 99609fe1554..0b3a45e57a3 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -156,8 +156,8 @@ char *rep_inet_ntoa(struct in_addr ip); /*The following definitions come from lib/select.c */ void sys_select_signal(void); -int sys_select(int maxfd, fd_set *fds,struct timeval *tval); -int sys_select_intr(int maxfd, fd_set *fds,struct timeval *tval); +int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); +int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); /*The following definitions come from lib/signal.c */ @@ -166,29 +166,595 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from lib/smbrun.c */ + +int smbrun(char *cmd, int *outfd); + +/*The following definitions come from lib/snprintf.c */ + + +/*The following definitions come from lib/substitute.c */ + +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); + +/*The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/*The following definitions come from lib/system.c */ + +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); + +/*The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); + +/*The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/*The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/*The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/*The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL zero_ip(struct in_addr ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/*The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/*The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/*The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/*The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/*The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); + +/*The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +/*The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); + +/*The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/*The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from libsmb/cli_dfs.c */ @@ -207,86 +773,6 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 info_level, DFS_INFO_CTR *ctr); -/*The following definitions come from libsmb/clidgram.c */ - -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); - -/*The following definitions come from libsmb/clientgen.c */ - -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); - -/*The following definitions come from libsmb/clierror.c */ - -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); - -/*The following definitions come from libsmb/clifile.c */ - -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); - -/*The following definitions come from libsmb/clilist.c */ - -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); - /*The following definitions come from libsmb/cli_lsarpc.c */ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, @@ -319,14 +805,7 @@ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, uint32 *num_sids, DOM_SID **sids); -BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); - -/*The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); /*The following definitions come from libsmb/cli_netlogon.c */ @@ -354,12 +833,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); -/*The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -367,56 +840,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/*The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/*The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -495,12 +918,6 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); -/*The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -558,801 +975,384 @@ NTSTATUS cli_spoolss_getprinterdriverdir ( uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_DRIVER_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterex ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_INFO_CTR *ctr -); -NTSTATUS cli_spoolss_deleteprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *arch, - char *driver -); -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *name, - char *environment, - fstring procdir); -NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char* valname, char* value); - -/*The following definitions come from libsmb/cli_srvsvc.c */ - -struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr); - -/*The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/*The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/*The following definitions come from libsmb/credentials.c */ - -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/*The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/*The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/*The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/*The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/*The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/*The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/*The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +); +NTSTATUS cli_spoolss_addprinterdriver ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 level, + PRINTER_DRIVER_CTR *ctr +); +NTSTATUS cli_spoolss_addprinterex ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 level, + PRINTER_INFO_CTR *ctr +); +NTSTATUS cli_spoolss_deleteprinterdriver ( + struct cli_state *cli, + TALLOC_CTX *mem_ctx, + char *arch, + char *driver +); +NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + char *name, + char *environment, + fstring procdir); +NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char* valname, char* value); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from libsmb/cli_srvsvc.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from libsmb/cliconnect.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from lib/snprintf.c */ +/*The following definitions come from libsmb/clidgram.c */ +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/substitute.c */ +/*The following definitions come from libsmb/clientgen.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/sysacls.c */ +/*The following definitions come from libsmb/clierror.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/system.c */ +/*The following definitions come from libsmb/clifile.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from lib/talloc.c */ +/*The following definitions come from libsmb/clilist.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from lib/time.c */ +/*The following definitions come from libsmb/climessage.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from lib/ufc.c */ +/*The following definitions come from libsmb/clioplock.c */ -char *ufc_crypt(const char *key,const char *salt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from lib/username.c */ +/*The following definitions come from libsmb/cliprint.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from lib/util.c */ +/*The following definitions come from libsmb/clirap.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL zero_ip(struct in_addr ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from lib/util_file.c */ +/*The following definitions come from libsmb/clireadwrite.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from lib/util_getent.c */ +/*The following definitions come from libsmb/clisecdesc.c */ -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/*The following definitions come from lib/util_seaccess.c */ +/*The following definitions come from libsmb/clistr.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/clitrans.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/credentials.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/errormap.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/namequery.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/*The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from lib/util_unistr.c */ +/*The following definitions come from libsmb/smbdes.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/*The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/*The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /*The following definitions come from locking/brlock.c */ @@ -1440,6 +1440,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1470,9 +1473,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2346,14 +2346,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ +/*The following definitions come from printing/print_generic.c */ + + +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/*The following definitions come from printing/print_generic.c */ - - /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2378,11 +2383,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2436,39 +2436,6 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4078,6 +4045,39 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4540,24 +4540,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/*The following definitions come from smbd/vfs.c */ - -BOOL vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); @@ -4601,6 +4583,24 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); +/*The following definitions come from smbd/vfs.c */ + +BOOL vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/lib/readline.c b/source/lib/readline.c index dd2793df661..91f9a1b31d5 100644 --- a/source/lib/readline.c +++ b/source/lib/readline.c @@ -67,7 +67,7 @@ char *smb_readline(char *prompt, void (*callback)(void), FD_ZERO(&fds); FD_SET(fd,&fds); - if (sys_select_intr(fd+1,&fds,&timeout) == 1) { + if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) { ret = fgets(line, sizeof(line), stdin); return ret; } diff --git a/source/lib/select.c b/source/lib/select.c index 396ecb5dd6b..f70268b7ce4 100644 --- a/source/lib/select.c +++ b/source/lib/select.c @@ -21,22 +21,23 @@ #include "includes.h" -/* this is here because it allows us to avoid a nasty race in signal handling. +/* This is here because it allows us to avoid a nasty race in signal handling. We need to guarantee that when we get a signal we get out of a select immediately but doing that involves a race condition. We can avoid the race by getting the signal handler to write to a pipe that is in the select/poll list - this means all Samba signal handlers should call sys_select_signal() + This means all Samba signal handlers should call sys_select_signal(). */ + static pid_t initialised; static int select_pipe[2]; static VOLATILE unsigned pipe_written, pipe_read; - /******************************************************************* -call this from all Samba signal handlers if you want to avoid a -nasty signal race condition + Call this from all Samba signal handlers if you want to avoid a + nasty signal race condition. ********************************************************************/ + void sys_select_signal(void) { char c = 1; @@ -48,13 +49,15 @@ void sys_select_signal(void) } /******************************************************************* -like select() but avoids the signal race using a pipe -it also guuarantees that fds on return only ever contains bits set -for file descriptors that were readable + Like select() but avoids the signal race using a pipe + it also guuarantees that fds on return only ever contains bits set + for file descriptors that were readable. ********************************************************************/ -int sys_select(int maxfd, fd_set *fds,struct timeval *tval) + +int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval) { int ret, saved_errno; + fd_set *readfds2, readfds_buf; if (initialised != sys_getpid()) { pipe(select_pipe); @@ -77,16 +80,29 @@ int sys_select(int maxfd, fd_set *fds,struct timeval *tval) } maxfd = MAX(select_pipe[0]+1, maxfd); - FD_SET(select_pipe[0], fds); + + /* If readfds is NULL we need to provide our own set. */ + if (readfds) { + readfds2 = readfds; + } else { + readfds2 = &readfds_buf; + FD_ZERO(readfds2); + } + FD_SET(select_pipe[0], readfds2); + errno = 0; - ret = select(maxfd,fds,NULL,NULL,tval); + ret = select(maxfd,readfds2,writefds,errorfds,tval); if (ret <= 0) { - FD_ZERO(fds); + FD_ZERO(readfds2); + if (writefds) + FD_ZERO(writefds); + if (errorfds) + FD_ZERO(errorfds); } - if (FD_ISSET(select_pipe[0], fds)) { - FD_CLR(select_pipe[0], fds); + if (FD_ISSET(select_pipe[0], readfds2)) { + FD_CLR(select_pipe[0], readfds2); ret--; if (ret == 0) { ret = -1; @@ -110,20 +126,35 @@ int sys_select(int maxfd, fd_set *fds,struct timeval *tval) } /******************************************************************* -similar to sys_select() but catch EINTR and continue -this is what sys_select() used to do in Samba + Similar to sys_select() but catch EINTR and continue. + This is what sys_select() used to do in Samba. ********************************************************************/ -int sys_select_intr(int maxfd, fd_set *fds,struct timeval *tval) + +int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval) { int ret; - fd_set fds2; + fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf; + + readfds2 = (readfds ? &readfds_buf : NULL); + writefds2 = (writefds ? &writefds_buf : NULL); + errorfds2 = (errorfds ? &errorfds_buf : NULL); do { - fds2 = *fds; - ret = sys_select(maxfd, &fds2, tval); + if (readfds) + readfds_buf = *readfds; + if (writefds) + writefds_buf = *writefds; + if (errorfds) + errorfds_buf = *errorfds; + ret = sys_select(maxfd, readfds2, writefds2, errorfds2, tval); } while (ret == -1 && errno == EINTR); - *fds = fds2; + if (readfds) + *readfds = readfds_buf; + if (writefds) + *writefds = writefds_buf; + if (errorfds) + *errorfds = errorfds_buf; return ret; } diff --git a/source/lib/util.c b/source/lib/util.c index a8c37bc36bf..9aad4f976aa 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -585,7 +585,7 @@ void msleep(int t) FD_ZERO(&fds); errno = 0; - sys_select_intr(0,&fds,&tval); + sys_select_intr(0,&fds,NULL,NULL,&tval); GetTimeOfDay(&t2); tdiff = TvalDiff(&t1,&t2); diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index b2e80d03004..4d9a405cb5d 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -259,7 +259,7 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma FD_ZERO(&fds); FD_SET(fd,&fds); - selrtn = sys_select_intr(fd+1,&fds,&timeout); + selrtn = sys_select_intr(fd+1,&fds,NULL,NULL,&timeout); /* Check if error */ if(selrtn == -1) { @@ -363,7 +363,7 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned FD_ZERO(&fds); FD_SET(fd,&fds); - selrtn = sys_select_intr(fd+1,&fds,&timeout); + selrtn = sys_select_intr(fd+1,&fds,NULL,NULL,&timeout); if(selrtn <= 0) return selrtn; diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index 8ab50b87d8e..08748ed0aa0 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -955,7 +955,7 @@ struct packet_struct *receive_packet(int fd,enum packet_type type,int t) timeout.tv_sec = t/1000; timeout.tv_usec = 1000*(t%1000); - if ((ret = sys_select_intr(fd+1,&fds,&timeout)) == -1) { + if ((ret = sys_select_intr(fd+1,&fds,NULL,NULL,&timeout)) == -1) { /* errno should be EBADF or EINVAL. */ DEBUG(0,("select returned -1, errno = %s (%d)\n", strerror(errno), errno)); return NULL; diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c index 6c2e6fdc04d..9d4dfbc8078 100644 --- a/source/nmbd/nmbd_packets.c +++ b/source/nmbd/nmbd_packets.c @@ -1818,7 +1818,7 @@ BOOL listen_for_packets(BOOL run_election) BlockSignals(False, SIGTERM); - selrtn = sys_select(FD_SETSIZE,&fds,&timeout); + selrtn = sys_select(FD_SETSIZE,&fds,NULL,NULL,&timeout); /* We can only take signals when we are in the select - block them again here. */ diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 0212c87f905..637260214ae 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -172,6 +172,7 @@ static BOOL do_sigterm; static void termination_handler(int signum) { do_sigterm = True; + sys_select_signal(); } static BOOL do_sigusr1; @@ -179,6 +180,7 @@ static BOOL do_sigusr1; static void sigusr1_handler(int signum) { do_sigusr1 = True; + sys_select_signal(); } static BOOL do_sighup; @@ -186,6 +188,7 @@ static BOOL do_sighup; static void sighup_handler(int signum) { do_sighup = True; + sys_select_signal(); } /* Create winbindd socket */ @@ -639,7 +642,7 @@ static void process_loop(int accept_sock) /* Call select */ - selret = select(maxfd + 1, &r_fds, &w_fds, NULL, &timeout); + selret = sys_select(maxfd + 1, &r_fds, &w_fds, NULL, &timeout); if (selret == 0) continue; diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 340a0a3906e..cae94bc7a8f 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -94,7 +94,7 @@ BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeou to.tv_sec = timeout / 1000; to.tv_usec = (timeout % 1000) * 1000; - selrtn = sys_select(maxfd+1,fds,&to); + selrtn = sys_select(maxfd+1,fds,NULL,NULL,&to); if (selrtn == -1 && errno == EINTR) { /* could be a kernel oplock interrupt */ diff --git a/source/smbd/process.c b/source/smbd/process.c index b85c0e3686e..1299fd20e3a 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -197,7 +197,7 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) to.tv_sec = timeout / 1000; to.tv_usec = (timeout % 1000) * 1000; - selrtn = sys_select(MAX(maxfd,smbd_server_fd())+1,&fds,timeout>0?&to:NULL); + selrtn = sys_select(MAX(maxfd,smbd_server_fd())+1,&fds,NULL,NULL,timeout>0?&to:NULL); /* if we get EINTR then maybe we have received an oplock signal - treat this as select returning 1. This is ugly, but diff --git a/source/smbd/server.c b/source/smbd/server.c index 4b7524b6639..b3b428a9b42 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -209,7 +209,7 @@ max can be %d\n", memcpy((char *)&lfds, (char *)&listen_set, sizeof(listen_set)); - num = sys_select(FD_SETSIZE,&lfds,NULL); + num = sys_select(FD_SETSIZE,&lfds,NULL,NULL,NULL); if (num == -1 && errno == EINTR) { extern VOLATILE sig_atomic_t reload_after_sighup; diff --git a/source/utils/smbfilter.c b/source/utils/smbfilter.c index abc8ba4a51f..6be0860c928 100644 --- a/source/utils/smbfilter.c +++ b/source/utils/smbfilter.c @@ -118,7 +118,7 @@ static void filter_child(int c, struct in_addr dest_ip) if (s != -1) FD_SET(s, &fds); if (c != -1) FD_SET(c, &fds); - num = sys_select_intr(MAX(s+1, c+1),&fds,NULL); + num = sys_select_intr(MAX(s+1, c+1),&fds,NULL,NULL,NULL); if (num <= 0) continue; if (c != -1 && FD_ISSET(c, &fds)) { @@ -182,7 +182,7 @@ static void start_filter(char *desthost) FD_ZERO(&fds); FD_SET(s, &fds); - num = sys_select_intr(s+1,&fds,NULL); + num = sys_select_intr(s+1,&fds,NULL,NULL,NULL); if (num > 0) { c = accept(s, &addr, &in_addrlen); if (c != -1) { -- cgit From e1bc00d12d88b8a408e51fd15e289326f6bccfd0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Jan 2002 22:43:33 +0000 Subject: Added HPUX packaging donated by HP. Jeremy. --- packaging/HPUX/Instructions | 49 +++++ packaging/HPUX/Packaging-instructions | 64 ++++++ packaging/HPUX/configure.bin | 44 +++++ packaging/HPUX/configure.man | 12 ++ packaging/HPUX/configure.swat | 61 ++++++ packaging/HPUX/create_package.sh | 21 ++ packaging/HPUX/gen_psf.sh | 357 ++++++++++++++++++++++++++++++++++ packaging/HPUX/samba.boot | 72 +++++++ packaging/HPUX/samba.config | 2 + packaging/HPUX/unconfigure.bin | 8 + packaging/HPUX/unconfigure.swat | 29 +++ packaging/HPUX/vendor_description | 2 + 12 files changed, 721 insertions(+) create mode 100644 packaging/HPUX/Instructions create mode 100644 packaging/HPUX/Packaging-instructions create mode 100644 packaging/HPUX/configure.bin create mode 100644 packaging/HPUX/configure.man create mode 100644 packaging/HPUX/configure.swat create mode 100755 packaging/HPUX/create_package.sh create mode 100755 packaging/HPUX/gen_psf.sh create mode 100644 packaging/HPUX/samba.boot create mode 100644 packaging/HPUX/samba.config create mode 100644 packaging/HPUX/unconfigure.bin create mode 100644 packaging/HPUX/unconfigure.swat create mode 100644 packaging/HPUX/vendor_description diff --git a/packaging/HPUX/Instructions b/packaging/HPUX/Instructions new file mode 100644 index 00000000000..5e5bd542d3f --- /dev/null +++ b/packaging/HPUX/Instructions @@ -0,0 +1,49 @@ +Installation Instructions for HP-UX Software Distributor package +---------------------------------------------------------------- + +1. Run swinstall + + You may have copied (swcopy) the depot to the depot server. In such cases + select the depot on server. + + In order to install from the depot file, as root enter the following + command: + + swinstall -s `pwd`/samba.depot Samba + +2. Create configuration file + + Create /usr/local/samba/lib/smb.conf. You can use one of the examples from + /usr/local/samba/newconfig/examples as template. + + Make sure that "guest account = pcguest" is included in the global + configuration variables. The swinstall will have created the pcguest + user on HPUX for you. The default value of "guest account" is "nobody" + which causes problems for Samba on HPUX because it has a negative uid. + +3. Start/stop Samba + + The installation provides the boot startup script at /sbin/init.d/samba. + Samba will automatically start at run level 3 and stop during the + transition to run level 2. + + You can use this script to manually manipulate Samba. Enter: + + # /sbin/init.d/samba start to start Samba + # /sbin/init.d/samba stop to stop Samba + +4. Customization + + The autostart is controled by editing file /etc/rc.config.d/samba. This + file has the following variables: + + SAMBA_START=[0|1] 1 start Samba at boot (default) + 0 do not start samba at boot + + SAMBA_DEBUG=[0-9] debug level for smbd and nmbd. Default debug + level is 1. + + The configuration file is not overwritten at next install while the boot + script (/sbin/init.d/samba) is. + +Author: Leon Mlakar diff --git a/packaging/HPUX/Packaging-instructions b/packaging/HPUX/Packaging-instructions new file mode 100644 index 00000000000..aa84d8e5a57 --- /dev/null +++ b/packaging/HPUX/Packaging-instructions @@ -0,0 +1,64 @@ +Create Software Depot for Samba +------------------------------- + +1. Compile the source code + The packaging assumes that the final product will install under /usr/local/samba and will use /usr/local/samba for var directory. In order to support these + assumptions, run configure as follows: + + ./configure --prefix /usr/local/samba --localstatedir /usr/local/samba + + Afterwards compile the source code in a standard way. + +2. In packaging/HPUX directory run the following command: + + $ create_package.sh + +3. Use resulting samba.depot file as the software depot for Samba. + +Brief Description of Depot +-------------------------- + +The software depot contains product Samba, which consists of the following +three filesets: + + Samba.core Core samba server components, everything but SWAT + and man pages + + Samba.man Man pages. Note that HP-UX uses different section + numbering, so the man pages are moved and modified + to correct the section references (i.e. nmbd(8) changed + to nmbd(1m)). + + Samba.swat SWAT tool. + +The configure scripts will take care of the following: + + Samba.core 1. create pcguest account should it not exist. The + login shell is set to /usr/bin/true + 2. create startup/shutdown links at: + /sbin/rc3.d/S911samba + /sbin/rc2.d/K130samba + 3. copy boot configuration file from newconfig to + /etc/rc.config.d, if one does not exist. + + Samba.man 1. add /usr/local/samba/man to default man search path in + /etc/MANPATH + + Samba.swat 1. add swat service to /etc/services if necessary. + Swat will run through port 901. + 2. add swat to /etc/inetd.conf, if necessary. + 3. signal (SIGHUP) inetd to reread configuration if + 1. or 2. were changed. + +The unconfigure scripts will, upon the product removal, do the following: + + Samba.core 1. remove startup/shutdown links + 2. remove user pcguest + + Samba.man N/A + + Samba.swat 1. remove swat from /etc/services + 2. remove swat from /etc/inetd.conf + 3. signal inetd (SIGHUP) to reread configuration + +Author: Leon Mlakar diff --git a/packaging/HPUX/configure.bin b/packaging/HPUX/configure.bin new file mode 100644 index 00000000000..60363336054 --- /dev/null +++ b/packaging/HPUX/configure.bin @@ -0,0 +1,44 @@ +# Samba.core configure script + +RC=0 + +addUser() +{ + if grep -q '^pcguest:' /etc/passwd + then + cat <<__EOF__ +NOTE: Username pcguest already exists in /etc/passwd file. +__EOF__ + return + fi + + /usr/sbin/useradd -g users -d /home/pcguest -c "Samba Guest" \ + -s /usr/bin/true -m pcguest + + + if [ $? -ne 0 ] + then + cat >&2 <<__EOF__ +ERROR: Failed to create username pcguest. +__EOF__ + RC=1 + else + cat <<__EOF__ +NOTE: The configure script has added username pcguest in /etc/passwd file. + You must set the password for user pcguest in order to activate it. +__EOF__ + fi +} + + +addUser + +ln -s /sbin/init.d/samba /sbin/rc3.d/S911samba +ln -s /sbin/init.d/samba /sbin/rc2.d/K130samba + +if [ ! -f /etc/rc.config.d/samba ] +then + cp /usr/local/samba/newconfig/samba.config /etc/rc.config.d/samba +fi + +exit 0 diff --git a/packaging/HPUX/configure.man b/packaging/HPUX/configure.man new file mode 100644 index 00000000000..5aa5545fee5 --- /dev/null +++ b/packaging/HPUX/configure.man @@ -0,0 +1,12 @@ +# Samba.man configure script + + +grep -q '/usr/local/samba/man' /etc/MANPATH +if [ $? -eq 1 ] +then + echo "`cat /etc/MANPATH`:/usr/local/samba/man" >/tmp/$$.PATH + cp /tmp/$$.PATH /etc/MANPATH + rm -f /tmp/$$.PATH +fi + +exit 0 diff --git a/packaging/HPUX/configure.swat b/packaging/HPUX/configure.swat new file mode 100644 index 00000000000..0e69fc03fe4 --- /dev/null +++ b/packaging/HPUX/configure.swat @@ -0,0 +1,61 @@ +# Configure script for Samba.swat + +UPDATE=0 + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +UpdateServices() +{ + if grep -q '^swat' /etc/services + then + return + fi + + echo "swat 901/tcp" >>/etc/services + cat <<__EOF__ +NOTE: The following entry had been added to /etc/services: + swat 901/tcp + Should you want to move SWAT to another port, modify the entry + accordingly and restart inetd daemon with -HUP signal. +__EOF__ + UPDATE=1 +} + +UpdateInetd() +{ + if grep -q '^swat' /etc/inetd.conf + then + return + fi + + echo "swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat" >>/etc/inetd.conf + + + UPDATE=1 +} + +UpdateServices +UpdateInetd + +if [ "$UPDATE" -eq 1 ] +then + KillProcess inetd HUP +fi + +exit 0 + diff --git a/packaging/HPUX/create_package.sh b/packaging/HPUX/create_package.sh new file mode 100755 index 00000000000..f8e321dbff7 --- /dev/null +++ b/packaging/HPUX/create_package.sh @@ -0,0 +1,21 @@ +#!/usr/bin/sh +PRODUCT=Samba +DEPOT=samba.depot +PSF=samba.psf +export PRODUCT +export DEPOT +export PSF + +mkdir codepage >/dev/null 2>&1 +mkdir man >/dev/null 2>&1 + +./gen_psf.sh $PRODUCT + +echo "Creating software depot ($DEPOT) for product $PRODUCT" + +/usr/sbin/swpackage -vv -s samba.psf -x target_type=tape -d `pwd`/$DEPOT $PRODUCT + +#- clean-up temporary directories +rm -r codepage +rm -r man + diff --git a/packaging/HPUX/gen_psf.sh b/packaging/HPUX/gen_psf.sh new file mode 100755 index 00000000000..4a24bab49b4 --- /dev/null +++ b/packaging/HPUX/gen_psf.sh @@ -0,0 +1,357 @@ +#!/usr/bin/sh +#- Below variables are editable. +#- VERSION Script tries to set the version automatically if it's empty +#- string. The version number is assumed to be in +#- ../../source/include/version.h. Should this fail to find correct +#- version, set it manually to override automatic search. +#- BIN List of binaries from ../../source/bin. Note: do not include +#- swat here for it is a part of Samba.swat fileset +#- SCRIPT List of scripts +#- OS_REVISION The regular expression to determine the supported OS version. +#- The default versions are HP-UX 10.10 or later as well as 11.*. +#- You can modify this to reflect the OS you compile on. For +#- instance, to support any 10.? and 11.? releases, use the +#- following string: +#- '?.10.*|?.11.* + VERSION="" + + BIN="smbd nmbd smbclient testparm testprns smbstatus\ + rpcclient smbpasswd make_smbcodepage nmblookup " + +# SCRIPT="smbtar addtosmbpass convert_smbpasswd" + + OS_RELEASE='?.10.[2-9]?|?.11.*' + + +#- Below variables should be exported from create_package.sh + +if [ -z "$PSF" ] +then + PSF=samba.psf +fi + +if [ -z "$DEPOT" ] +then + DEPOT=samba.depot +fi + +if [ -z "$PRODUCT" ] +then + PRODUCT=Samba +fi + +#-------------------------------------------------------------------------- +CODEPAGES="" +if [ -z "$VERSION" ] +then + echo "Deducing Samba version from version.h ... \c" + VERSION=`grep VERSION ../../source/include/version.h | awk '{print $3}' |\ + tr -d '"'` + if [ $? -ne 0 -o -z "$VERSION" ] + then + echo "failed." + echo "Cannot find Samba version. Edit gen_psf.sh and set VERSION" + echo "variable manually." + exit 1 + else + echo "$VERSION" + fi +fi + +echo "Creating list of codepage definitions ..." + +#- create codepages from definition and add them to PSF file +for a in ../../source/codepages/codepage_def.[0-9][0-9][0-9] +do + b=${a##../../source/codepages/codepage_def.} + CODEPAGES="$CODEPAGES $b" +done +echo "\t$CODEPAGES" + +echo "Running make_smbcodepage on codepage definitions ... \c" + +mkdir codepage >/dev/null 2>&1 +for a in $CODEPAGES +do +../../source/bin/make_smbcodepage c $a ../../source/codepages/codepage_def.$a\ + codepage/codepage.$a +done +echo "done." + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands +#- NOTE: +#- Sed expressions used in below loops replaces original section references +#- inside man page with HP-UX section references. Assumption is that +#- only numbers in brackets are section references and nothing else. +#- So far I did not see the man pages corrupted by replacing anything +#- else but section references. + +mkdir man >/dev/null 2>&1 +echo "Coverting man pages to HP-UX numbering ..." +echo "\t Sections 1 \c" +for a in ../../docs/manpages/*.1 +do + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/`basename $a` +done +echo "1m \c" +for a in ../../docs/manpages/*.8 +do + b=`basename $a` + c=${b%.8} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1M/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.1m +done +echo "4 \c" +for a in ../../docs/manpages/*.5 +do + b=`basename $a` + c=${b%.5} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 4/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.4 +done +echo "5" +for a in ../../docs/manpages/*.7 +do + b=`basename $a` + c=${b%.7} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 5/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.5 +done + +echo "Creating product specification file:" +echo "\tVendor and product description" +#- vendor and header of product definition +cat <<_EOF_ >$PSF +vendor + tag Samba + title Samba Team + description >$PSF + fileset + tag core + title Samba server core components + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.bin + unconfigure unconfigure.bin + + file -m 0755 -o root -g sys / /usr/local/samba/ + file -m 0755 -o root -g sys / /usr/local/samba/bin/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/codepages/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/examples/ + file -m 0700 -o root -g sys / /usr/local/samba/private/ + file -m 0755 -o root -g sys / /var/usr/local/samba/ + file -m 0755 -o root -g sys / /var/usr/local/samba/locks/ + + file -m 0444 -o root -g sys ../../COPYING /usr/local/samba/COPYING + file -m 0555 -o root -g sys ./samba.boot /sbin/init.d/samba + file -m 0444 -o root -g sys ./samba.config /usr/local/samba/newconfig/samba.config + + file -m 0444 -o root -g sys ../../examples/smb.conf.default /usr/local/samba/newconfig/examples/smb.conf.default + file -m 0444 -o root -g sys ../../examples/simple/smb.conf /usr/local/samba/newconfig/examples/smb.conf.simple + file -m 0444 -o root -g sys ../../examples/dce-dfs/smb.conf /usr/local/samba/newconfig/examples/smb.conf.dce-dfs + + directory ../../source/bin=/usr/local/samba/bin +_EOF_ + for a in $BIN + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ../../source/script=/usr/local/samba/bin" >>$PSF + + for a in $SCRIPT + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ./codepage=/usr/local/samba/lib/codepages" >> $PSF + + for a in $CODEPAGES + do + echo " file -m 0444 -o root -g sys codepage.$a" >>$PSF + done + echo " end" >>$PSF +#- end of fileset CORE + +echo "\tFileset $PRODUCT.man" +#- Man pages +cat <<_EOF_ >>$PSF + fileset + tag man + title Samba server man pages + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.man + + file -m 0755 -o root -g sys / /usr/local/samba/man/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1m/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man4/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man5/ + +_EOF_ + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands + + for a in man/*.1 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1/$b" >>$PSF + done + + for a in man/*.1m + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1m/$b" >>$PSF + done + + for a in man/*.4 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man4/$b" >>$PSF + done + + for a in man/*.5 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man5/$b" >>$PSF + done + + echo " end" >>$PSF + +echo "\tFileset $PRODUCT.swat" + +cat <<_EOF_ >>$PSF + + fileset + tag swat + title Samba Web-based administration tool + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.swat + unconfigure unconfigure.swat + + file -m 0755 -o root -g sys / /usr/local/samba/swat/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/help/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/images/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/include/ + + directory ../../swat=/usr/local/samba/swat + file -m 0444 -o root -g sys README + + directory ../../source/bin=/usr/local/samba/bin + file -m 0555 -o root -g sys swat + + directory ../../swat/images=/usr/local/samba/swat/images +_EOF_ + + for a in ../../swat/images/*.gif + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/help=/usr/local/samba/swat/help" >>$PSF + + for a in ../../swat/help/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../docs/htmldocs=/usr/local/samba/swat/help" >>$PSF + + for a in ../../docs/htmldocs/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/include=/usr/local/samba/swat/include" >>$PSF + + for a in ../../swat/include/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + +cat <<_EOF_ >>$PSF + end + +end +_EOF_ + diff --git a/packaging/HPUX/samba.boot b/packaging/HPUX/samba.boot new file mode 100644 index 00000000000..a0d55d7d766 --- /dev/null +++ b/packaging/HPUX/samba.boot @@ -0,0 +1,72 @@ + +SUCCESS=0 +FAILURE=1 +exitval=$SUCCESS + + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +if [ ! -f /etc/rc.config.d/samba ] +then + echo "ERROR: Config file /etc/rc.config.d/samba missing." + exit $FAILURE +fi + +. /etc/rc.config.d/samba + +case $1 in + 'start_msg') + echo "Start Samba Services" + ;; + + 'stop_msg') + echo "Stop Samba Services" + ;; + + 'start') + # Starting Samba is easy ... + if [ "$SAMBA_START" -eq 1 ] + then + if [ -x /usr/local/samba/bin/smbd ] + then + /usr/local/samba/bin/smbd -D -d $SAMBA_DEBUG + fi + + if [ -x /usr/local/samba/bin/nmbd ] + then + /usr/local/samba/bin/nmbd -D -d $SAMBA_DEBUG + fi + fi + ;; + + 'stop') + # + # ... stopping it, however, is another story + # + KillProcess nmbd TERM + KillProcess smbd TERM + ;; + + *) + echo "usage: $0 {start|stop|start_msg|stop_msg}" + exitval=$FAILURE + ;; +esac + +exit $exitval + diff --git a/packaging/HPUX/samba.config b/packaging/HPUX/samba.config new file mode 100644 index 00000000000..a5c6fd2cd06 --- /dev/null +++ b/packaging/HPUX/samba.config @@ -0,0 +1,2 @@ +SAMBA_START=1 +SAMBA_DEBUG=1 diff --git a/packaging/HPUX/unconfigure.bin b/packaging/HPUX/unconfigure.bin new file mode 100644 index 00000000000..3d5c7d9dc04 --- /dev/null +++ b/packaging/HPUX/unconfigure.bin @@ -0,0 +1,8 @@ +# Samba.core unconfigure script + +rm -f /sbin/rc3.d/S911samba +rm -f /sbin/rc2.d/K130samba + +/usr/sbin/userdel -r pcguest + +exit 0 diff --git a/packaging/HPUX/unconfigure.swat b/packaging/HPUX/unconfigure.swat new file mode 100644 index 00000000000..b0dd325bc91 --- /dev/null +++ b/packaging/HPUX/unconfigure.swat @@ -0,0 +1,29 @@ +# Unconfigure script for Samba.swat + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +grep -v '^swat' /etc/services >/tmp/services$$ +mv /tmp/services$$ /etc/services + +grep -v '^swat' /etc/inetd.conf >/tmp/inetd.conf$$ +mv /tmp/inetd.conf$$ /etc/inetd.conf + +KillProcess inetd HUP + +exit 0 + diff --git a/packaging/HPUX/vendor_description b/packaging/HPUX/vendor_description new file mode 100644 index 00000000000..2f661188048 --- /dev/null +++ b/packaging/HPUX/vendor_description @@ -0,0 +1,2 @@ +Read more about Samba and Samba Team at http://www.samba.org/ + -- cgit From 12deef4abea5fde6f32a1e5719efd69e4827d859 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Fri, 1 Feb 2002 05:49:40 +0000 Subject: Updated packaging for Caldera OpenServer 5.0.7 --- packaging/Caldera/OpenServer/README | 2 +- packaging/Caldera/OpenServer/docview.html | 84 ++++++++++++++++++++++ packaging/Caldera/OpenServer/samba-2.2-osr5.patch | 29 -------- .../Caldera/OpenServer/samba-2.2.3-osr5.patch | 33 +++++++++ 4 files changed, 118 insertions(+), 30 deletions(-) create mode 100644 packaging/Caldera/OpenServer/docview.html delete mode 100644 packaging/Caldera/OpenServer/samba-2.2-osr5.patch create mode 100644 packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch diff --git a/packaging/Caldera/OpenServer/README b/packaging/Caldera/OpenServer/README index 794bf546049..6e8915161c1 100644 --- a/packaging/Caldera/OpenServer/README +++ b/packaging/Caldera/OpenServer/README @@ -6,7 +6,7 @@ Instructions: Preparing Samba Packages for SCO OpenServer We provide support only for current versions of SCO OpenServer -The file samba-2.2-osr5.patch is a patch file suitable for use +The file samba-2.2.3-osr5.patch is a patch file suitable for use with the patch command as follows: # cd ../../../source diff --git a/packaging/Caldera/OpenServer/docview.html b/packaging/Caldera/OpenServer/docview.html new file mode 100644 index 00000000000..bf25f412308 --- /dev/null +++ b/packaging/Caldera/OpenServer/docview.html @@ -0,0 +1,84 @@ + + + Samba for SCO OpenServer + + +
    + +

    Samba File and Print Server for SCO OpenServer from Caldera

    +
    + +Samba is a suite of networking products that implement the +Windows SMB and CIFS protocols on UNIX and Linux operating +systems. Samba enables your SCO OpenServer from Caldera system +as a file and print server for Windows and OS/2 systems. + +

    +We recommend that you use the O'Reilly & Associates publication +"Using Samba" + +to configure and administer your Samba server. Links to Samba +HOWTO documents and manual pages are also provided below. + +

    Samba Documentation

    + + + +
    +Copyright +© 2002 Caldera International, Inc. All Rights Reserved. + diff --git a/packaging/Caldera/OpenServer/samba-2.2-osr5.patch b/packaging/Caldera/OpenServer/samba-2.2-osr5.patch deleted file mode 100644 index fb71d9298b4..00000000000 --- a/packaging/Caldera/OpenServer/samba-2.2-osr5.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- utils/torture.c.00 Fri Mar 30 13:53:26 2001 -+++ utils/torture.c Fri Apr 13 15:06:04 2001 -@@ -2703,7 +2703,11 @@ - - dbf = stdout; - -+#if defined(_SCO_DS) /* SCO OpenServer */ -+ setvbuf(stdout, NULL, _IONBF, 0); -+#else - setbuffer(stdout, NULL, 0); -+#endif - - charset_initialise(); - ---- utils/locktest.c.00 Fri Sep 29 13:18:14 2000 -+++ utils/locktest.c Fri Apr 13 17:54:11 2001 -@@ -384,8 +384,12 @@ - recorded[n].conn = random() % NCONNECTIONS; - recorded[n].f = random() % NFILES; - recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1)); -+#if defined(_SCO_DS) /* OpenServer */ -+ recorded[n].len = 1; -+#else - recorded[n].len = 1 + - random() % (LOCKRANGE-(recorded[n].start-LOCKBASE)); -+#endif - recorded[n].start *= RANGE_MULTIPLE; - recorded[n].len *= RANGE_MULTIPLE; - recorded[n].r1 = random() % 100; diff --git a/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch b/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch new file mode 100644 index 00000000000..45770f226e7 --- /dev/null +++ b/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch @@ -0,0 +1,33 @@ +--- utils/torture.c.00 Thu Jan 24 17:54:13 2002 ++++ utils/torture.c Thu Jan 24 16:58:52 2002 +@@ -4801,8 +4801,13 @@ + dbf = stdout; + + #ifdef HAVE_SETBUFFER +- setbuffer(stdout, NULL, 0); ++ setbuffer(stdout, NULL, 0); ++#else ++#if defined(_SCO_DS) /* SCO OpenServer */ ++ setvbuf(stdout, NULL, _IONBF, 0); + #endif ++#endif ++ + charset_initialise(); + + codepage_initialise(lp_client_code_page()); + +--- utils/locktest.c.00 Fri Sep 29 13:18:14 2000 ++++ utils/locktest.c Fri Apr 13 17:54:11 2001 +@@ -384,8 +384,12 @@ + recorded[n].conn = random() % NCONNECTIONS; + recorded[n].f = random() % NFILES; + recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1)); ++#if defined(_SCO_DS) /* OpenServer */ ++ recorded[n].len = 1; ++#else + recorded[n].len = 1 + + random() % (LOCKRANGE-(recorded[n].start-LOCKBASE)); ++#endif + recorded[n].start *= RANGE_MULTIPLE; + recorded[n].len *= RANGE_MULTIPLE; + recorded[n].r1 = random() % 100; -- cgit From 2b484a3237f3d50d80f84ab4d5521e7de16e9c3c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Feb 2002 18:46:27 +0000 Subject: Fix the UNIX stat/lstat bug. Factor some code that should have been factored a long time ago. Jeremy. --- source/configure | 18 +- source/include/proto.h | 1887 ++++++++++++++++++++++++------------------------ source/smbd/nttrans.c | 32 +- source/smbd/reply.c | 51 +- source/smbd/trans2.c | 72 +- 5 files changed, 1001 insertions(+), 1059 deletions(-) diff --git a/source/configure b/source/configure index b42465297dc..aea495dfeb4 100755 --- a/source/configure +++ b/source/configure @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null diff --git a/source/include/proto.h b/source/include/proto.h index 0b3a45e57a3..4d52cf9d370 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -166,595 +166,29 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from lib/snprintf.c */ - - -/*The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/*The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/*The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); - -/*The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); - -/*The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/*The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/*The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/*The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL zero_ip(struct in_addr ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/*The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/*The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/*The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/*The following definitions come from lib/util_sec.c */ - -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; - -/*The following definitions come from lib/util_sid.c */ - -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); - -/*The following definitions come from lib/util_sock.c */ - -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); - -/*The following definitions come from lib/util_str.c */ - -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); - -/*The following definitions come from lib/util_unistr.c */ - -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); - -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/cliconnect.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); /*The following definitions come from libsmb/cli_dfs.c */ @@ -773,6 +207,86 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 info_level, DFS_INFO_CTR *ctr); +/*The following definitions come from libsmb/clidgram.c */ + +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); + +/*The following definitions come from libsmb/clientgen.c */ + +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); + +/*The following definitions come from libsmb/clierror.c */ + +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); + +/*The following definitions come from libsmb/clifile.c */ + +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); + +/*The following definitions come from libsmb/clilist.c */ + +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); + /*The following definitions come from libsmb/cli_lsarpc.c */ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, @@ -807,6 +321,13 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/*The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /*The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -833,6 +354,12 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); +/*The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -840,6 +367,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/*The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/*The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/*The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -918,6 +495,12 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); +/*The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -1011,348 +594,765 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from libsmb/clistr.c */ + +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); + +/*The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/*The following definitions come from libsmb/credentials.c */ + +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/*The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/*The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from libsmb/pwd_cache.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from lib/smbrun.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from libsmb/smbdes.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from libsmb/clifile.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/*The following definitions come from libsmb/clilist.c */ +/*The following definitions come from libsmb/smberr.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -/*The following definitions come from libsmb/climessage.c */ +/*The following definitions come from libsmb/unexpected.c */ -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -/*The following definitions come from libsmb/clioplock.c */ +/*The following definitions come from lib/snprintf.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from libsmb/cliprint.c */ +/*The following definitions come from lib/substitute.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/*The following definitions come from libsmb/clirap.c */ +/*The following definitions come from lib/sysacls.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/*The following definitions come from libsmb/clireadwrite.c */ +/*The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); -/*The following definitions come from libsmb/clisecdesc.c */ +/*The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); -/*The following definitions come from libsmb/clistr.c */ +/*The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/*The following definitions come from libsmb/clitrans.c */ +/*The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/*The following definitions come from libsmb/credentials.c */ +/*The following definitions come from lib/username.c */ -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/*The following definitions come from libsmb/errormap.c */ +/*The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL zero_ip(struct in_addr ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/*The following definitions come from libsmb/namequery.c */ +/*The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/*The following definitions come from libsmb/nmblib.c */ +/*The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/*The following definitions come from libsmb/nterr.c */ +/*The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/*The following definitions come from libsmb/passchange.c */ +/*The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/*The following definitions come from libsmb/pwd_cache.c */ +/*The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); -/*The following definitions come from libsmb/smbdes.c */ +/*The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from lib/util_str.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from locking/brlock.c */ @@ -1440,9 +1440,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1473,6 +1470,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2346,19 +2346,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ -/*The following definitions come from printing/print_generic.c */ - - -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/*The following definitions come from printing/print_generic.c */ + + /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2383,6 +2378,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2436,6 +2436,39 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4045,39 +4078,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4507,6 +4507,7 @@ BOOL reset_stat_cache( void ); /*The following definitions come from smbd/trans2.c */ +void set_bad_path_error(int err, BOOL bad_path); NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close); int reply_findclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); int reply_findnclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); @@ -4540,6 +4541,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/*The following definitions come from smbd/vfs.c */ + +BOOL vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); @@ -4583,24 +4602,6 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); -/*The following definitions come from smbd/vfs.c */ - -BOOL vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index e95c99501a3..110d7ed7d26 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -786,10 +786,7 @@ int reply_ntcreate_and_X(connection_struct *conn, restore_case_semantics(file_attributes); if(!fsp) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -853,10 +850,7 @@ int reply_ntcreate_and_X(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -882,12 +876,8 @@ int reply_ntcreate_and_X(connection_struct *conn, } else { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); @@ -1311,10 +1301,7 @@ static int call_nt_transact_create(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1347,10 +1334,7 @@ static int call_nt_transact_create(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } #ifdef EROFS @@ -1374,12 +1358,8 @@ static int call_nt_transact_create(connection_struct *conn, } } else { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } diff --git a/source/smbd/reply.c b/source/smbd/reply.c index e00671b659e..0d89adf25b6 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1186,12 +1186,7 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (!ok) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - + set_bad_path_error(errno, bad_path); END_PROFILE(SMBgetatr); return(UNIXERROR(ERRDOS,ERRbadfile)); } @@ -1245,12 +1240,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (!ok) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - + set_bad_path_error(errno, bad_path); END_PROFILE(SMBsetatr); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1394,12 +1384,8 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size { if(dptr_num == -2) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - END_PROFILE(SMBsearch); + set_bad_path_error(errno, bad_path); + END_PROFILE(SMBsearch); return (UNIXERROR(ERRDOS,ERRnofids)); } END_PROFILE(SMBsearch); @@ -1570,11 +1556,7 @@ int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, if (!fsp) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBopen); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1665,11 +1647,7 @@ int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt if (!fsp) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBopenX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1804,11 +1782,7 @@ int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, if (!fsp) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBcreate); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1878,10 +1852,7 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, close(tmpfd); if (!fsp) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBctemp); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -3568,11 +3539,7 @@ int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, if (!ok) { - if((errno == ENOENT) && bad_path) - { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); END_PROFILE(SMBrmdir); return(UNIXERROR(ERRDOS,ERRbadpath)); } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 3819e528b58..84a628be50f 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -243,10 +243,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i unix_convert(fname,conn,0,&bad_path,&sbuf); if (!check_name(fname,conn)) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -256,10 +253,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i oplock_request, &rmode,&smb_action); if (!fsp) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -886,10 +880,7 @@ close_if_end = %d requires_resume_key = %d level = %d, max_data_bytes = %d\n", unix_convert(directory,conn,0,&bad_path,&sbuf); if(!check_name(directory,conn)) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); #if 0 /* Ugly - NT specific hack - maybe not needed ? (JRA) */ @@ -1514,6 +1505,18 @@ static int call_trans2setfsinfo(connection_struct *conn, char *inbuf, char *outb return outsize; } +/**************************************************************************** + Utility function to set bad path error. +****************************************************************************/ + +void set_bad_path_error(int err, BOOL bad_path) +{ + if((err == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + } +} + /**************************************************************************** Reply to a TRANS2_QFILEPATHINFO or TRANSACT2_QFILEINFO (query file info by file name or file id). @@ -1561,14 +1564,20 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * */ fname = fsp->fsp_name; unix_convert(fname,conn,0,&bad_path,&sbuf); - if (!check_name(fname,conn) || (!VALID_STAT(sbuf) && - (INFO_LEVEL_IS_UNIX(info_level) ? vfs_lstat(conn,fname,&sbuf) : vfs_stat(conn,fname,&sbuf)))) { - DEBUG(3,("fileinfo of %s failed (%s)\n",fname,strerror(errno))); + if (!check_name(fname,conn)) { + DEBUG(3,("call_trans2qfilepathinfo: check_name of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRbadpath)); + } - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + if (INFO_LEVEL_IS_UNIX(info_level) && vfs_lstat(conn,fname,&sbuf)) { + DEBUG(3,("call_trans2qfilepathinfo: vfs_lstat of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRbadpath)); + } + else if (!VALID_STAT(sbuf) && vfs_stat(conn,fname,&sbuf)) { + DEBUG(3,("call_trans2qfilepathinfo: vfs_stat of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } @@ -1609,10 +1618,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * if (!check_name(fname,conn) || (!VALID_STAT(sbuf) && (INFO_LEVEL_IS_UNIX(info_level) ? vfs_lstat(conn,fname,&sbuf) : vfs_stat(conn,fname,&sbuf)))) { DEBUG(3,("fileinfo of %s failed (%s)\n",fname,strerror(errno))); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } } @@ -2241,10 +2247,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char unix_convert(fname,conn,0,&bad_path,&sbuf); if (!check_name(fname,conn) || (!VALID_STAT(sbuf))) { DEBUG(3,("fileinfo of %s failed (%s)\n",fname,strerror(errno))); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } } else if (fsp && fsp->print_file) { @@ -2286,10 +2289,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char pstrcpy(fname,¶ms[6]); unix_convert(fname,conn,0,&bad_path,&sbuf); if(!check_name(fname, conn)) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } @@ -2300,10 +2300,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char if(!VALID_STAT(sbuf) && !INFO_LEVEL_IS_UNIX(info_level)) { DEBUG(3,("stat of %s failed (%s)\n", fname, strerror(errno))); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } } @@ -2844,10 +2841,7 @@ static int call_trans2mkdir(connection_struct *conn, char *inbuf, char *outbuf, if(ret < 0) { DEBUG(5,("call_trans2mkdir error (%s)\n", strerror(errno))); - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } + set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } -- cgit From ff9411665f05c234f63f21084420031148816976 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Feb 2002 19:05:42 +0000 Subject: Fix the UNIX stat/lstat issue. When changing UNIX mode don't let dosmode overwrite it. Jeremy. --- source/smbd/trans2.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 84a628be50f..bfa304605f6 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1570,12 +1570,14 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * return(UNIXERROR(ERRDOS,ERRbadpath)); } - if (INFO_LEVEL_IS_UNIX(info_level) && vfs_lstat(conn,fname,&sbuf)) { - DEBUG(3,("call_trans2qfilepathinfo: vfs_lstat of %s failed (%s)\n",fname,strerror(errno))); - set_bad_path_error(errno, bad_path); - return(UNIXERROR(ERRDOS,ERRbadpath)); - } - else if (!VALID_STAT(sbuf) && vfs_stat(conn,fname,&sbuf)) { + if (INFO_LEVEL_IS_UNIX(info_level)) { + /* Always do lstat for UNIX calls. */ + if (vfs_lstat(conn,fname,&sbuf)) { + DEBUG(3,("call_trans2qfilepathinfo: vfs_lstat of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRbadpath)); + } + } else if (!VALID_STAT(sbuf) && vfs_stat(conn,fname,&sbuf)) { DEBUG(3,("call_trans2qfilepathinfo: vfs_stat of %s failed (%s)\n",fname,strerror(errno))); set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); @@ -1615,9 +1617,20 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); unix_convert(fname,conn,0,&bad_path,&sbuf); - if (!check_name(fname,conn) || (!VALID_STAT(sbuf) && - (INFO_LEVEL_IS_UNIX(info_level) ? vfs_lstat(conn,fname,&sbuf) : vfs_stat(conn,fname,&sbuf)))) { - DEBUG(3,("fileinfo of %s failed (%s)\n",fname,strerror(errno))); + if (!check_name(fname,conn)) { + DEBUG(3,("call_trans2qfilepathinfo: check_name of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRbadpath)); + } + if (INFO_LEVEL_IS_UNIX(info_level)) { + /* Always do lstat for UNIX calls. */ + if (vfs_lstat(conn,fname,&sbuf)) { + DEBUG(3,("call_trans2qfilepathinfo: vfs_lstat of %s failed (%s)\n",fname,strerror(errno))); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRbadpath)); + } + } else if (!VALID_STAT(sbuf) && vfs_stat(conn,fname,&sbuf)) { + DEBUG(3,("call_trans2qfilepathinfo: vfs_stat of %s failed (%s)\n",fname,strerror(errno))); set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRbadpath)); } @@ -2216,7 +2229,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char char *pdata = *ppdata; uint16 tran_call = SVAL(inbuf, smb_setup0); uint16 info_level; - int dosmode=0; + int dosmode = 0; SMB_OFF_T size=0; struct utimbuf tvs; SMB_STRUCT_STAT sbuf; @@ -2553,6 +2566,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char pdata += 8; raw_unixmode = IVAL(pdata,28); unixmode = unix_perms_from_wire(conn, &sbuf, raw_unixmode); + dosmode = 0; /* Ensure dos mode change doesn't override this. */ DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_BASIC: name = %s \ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", -- cgit From b08dd3cfa591f070b7dc405f68e0a391c5b268de Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Feb 2002 20:33:40 +0000 Subject: Added updates from Don McCall. Jeremy. --- packaging/HPUX/Packaging-instructions | 11 + packaging/HPUX/configure.winbind | 9 + packaging/HPUX/create_package_with_winbind.sh | 21 ++ packaging/HPUX/gen_psf_with_winbind.sh | 380 ++++++++++++++++++++++++++ packaging/HPUX/unconfigure.winbind | 8 + 5 files changed, 429 insertions(+) create mode 100644 packaging/HPUX/configure.winbind create mode 100644 packaging/HPUX/create_package_with_winbind.sh create mode 100644 packaging/HPUX/gen_psf_with_winbind.sh create mode 100644 packaging/HPUX/unconfigure.winbind diff --git a/packaging/HPUX/Packaging-instructions b/packaging/HPUX/Packaging-instructions index aa84d8e5a57..8645fba2756 100644 --- a/packaging/HPUX/Packaging-instructions +++ b/packaging/HPUX/Packaging-instructions @@ -7,12 +7,23 @@ Create Software Depot for Samba ./configure --prefix /usr/local/samba --localstatedir /usr/local/samba + NOTE: to compile samba with optional winbind capability (HP-UX 11.x only), + use the following configure command line instead: + + ./configure --with-winbind --with-pam --prefix /usr/local/samba --localstatedir /usr/local/samba + Afterwards compile the source code in a standard way. 2. In packaging/HPUX directory run the following command: + WITHOUT winbind: + $ create_package.sh + WITH winbind: + + $ create_package_with_winbind.sh + 3. Use resulting samba.depot file as the software depot for Samba. Brief Description of Depot diff --git a/packaging/HPUX/configure.winbind b/packaging/HPUX/configure.winbind new file mode 100644 index 00000000000..fc9b8ded684 --- /dev/null +++ b/packaging/HPUX/configure.winbind @@ -0,0 +1,9 @@ +# Samba.winbind configure script + + + echo "heres where wed create links to winbind libs" + ln -s /usr/local/samba/lib/winbind/libnss_winbind.so /usr/lib/libnss_winbind.1 + ln -s /usr/local/samba/lib/winbind/pam_winbind.so /usr/lib/security/libpam_winbind.1 + + +exit 0 diff --git a/packaging/HPUX/create_package_with_winbind.sh b/packaging/HPUX/create_package_with_winbind.sh new file mode 100644 index 00000000000..b58c38f0a91 --- /dev/null +++ b/packaging/HPUX/create_package_with_winbind.sh @@ -0,0 +1,21 @@ +#!/usr/bin/sh +PRODUCT=Samba +DEPOT=samba.depot +PSF=samba.psf +export PRODUCT +export DEPOT +export PSF + +mkdir codepage >/dev/null 2>&1 +mkdir man >/dev/null 2>&1 + +./gen_psf_with_winbind.sh $PRODUCT + +echo "Creating software depot ($DEPOT) for product $PRODUCT" + +/usr/sbin/swpackage -vv -s samba.psf -x target_type=tape -d `pwd`/$DEPOT $PRODUCT + +#- clean-up temporary directories +rm -r codepage +rm -r man + diff --git a/packaging/HPUX/gen_psf_with_winbind.sh b/packaging/HPUX/gen_psf_with_winbind.sh new file mode 100644 index 00000000000..ef32590ea83 --- /dev/null +++ b/packaging/HPUX/gen_psf_with_winbind.sh @@ -0,0 +1,380 @@ +#!/usr/bin/sh +#- Below variables are editable. +#- VERSION Script tries to set the version automatically if it's empty +#- string. The version number is assumed to be in +#- ../../source/include/version.h. Should this fail to find correct +#- version, set it manually to override automatic search. +#- BIN List of binaries from ../../source/bin. Note: do not include +#- swat here for it is a part of Samba.swat fileset +#- SCRIPT List of scripts +#- OS_REVISION The regular expression to determine the supported OS version. +#- The default versions are HP-UX 10.10 or later as well as 11.*. +#- You can modify this to reflect the OS you compile on. For +#- instance, to support any 10.? and 11.? releases, use the +#- following string: +#- '?.10.*|?.11.* + VERSION="" + + BIN="smbd nmbd smbclient testparm testprns smbstatus\ + rpcclient smbpasswd make_smbcodepage nmblookup " + +# SCRIPT="smbtar addtosmbpass convert_smbpasswd" + + OS_RELEASE='?.10.[2-9]?|?.11.*' +# WINBINDD_OS_RELEASE='?.11.*' + WINBINDD_OS_RELEASE='?.11.11' + +#- Below variables should be exported from create_package.sh + +if [ -z "$PSF" ] +then + PSF=samba.psf +fi + +if [ -z "$DEPOT" ] +then + DEPOT=samba.depot +fi + +if [ -z "$PRODUCT" ] +then + PRODUCT=Samba +fi + +#-------------------------------------------------------------------------- +CODEPAGES="" +if [ -z "$VERSION" ] +then + echo "Deducing Samba version from version.h ... \c" + VERSION=`grep VERSION ../../source/include/version.h | awk '{print $3}' |\ + tr -d '"'` + if [ $? -ne 0 -o -z "$VERSION" ] + then + echo "failed." + echo "Cannot find Samba version. Edit gen_psf.sh and set VERSION" + echo "variable manually." + exit 1 + else + echo "$VERSION" + fi +fi + +echo "Creating list of codepage definitions ..." + +#- create codepages from definition and add them to PSF file +for a in ../../source/codepages/codepage_def.[0-9][0-9][0-9] +do + b=${a##../../source/codepages/codepage_def.} + CODEPAGES="$CODEPAGES $b" +done +echo "\t$CODEPAGES" + +echo "Running make_smbcodepage on codepage definitions ... \c" + +mkdir codepage >/dev/null 2>&1 +for a in $CODEPAGES +do +../../source/bin/make_smbcodepage c $a ../../source/codepages/codepage_def.$a\ + codepage/codepage.$a +done +echo "done." + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands +#- NOTE: +#- Sed expressions used in below loops replaces original section references +#- inside man page with HP-UX section references. Assumption is that +#- only numbers in brackets are section references and nothing else. +#- So far I did not see the man pages corrupted by replacing anything +#- else but section references. + +mkdir man >/dev/null 2>&1 +echo "Coverting man pages to HP-UX numbering ..." +echo "\t Sections 1 \c" +for a in ../../docs/manpages/*.1 +do + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/`basename $a` +done +echo "1m \c" +for a in ../../docs/manpages/*.8 +do + b=`basename $a` + c=${b%.8} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1M/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.1m +done +echo "4 \c" +for a in ../../docs/manpages/*.5 +do + b=`basename $a` + c=${b%.5} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 4/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.4 +done +echo "5" +for a in ../../docs/manpages/*.7 +do + b=`basename $a` + c=${b%.7} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 5/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.5 +done + +echo "Creating product specification file:" +echo "\tVendor and product description" +#- vendor and header of product definition +cat <<_EOF_ >$PSF +vendor + tag Samba + title Samba Team + description >$PSF + fileset + tag core + title Samba server core components + revision $VERSION + os_release $WINBIND_OS_RELEASE + is_kernel false + is_reboot false + is_secure false + configure configure.bin + unconfigure unconfigure.bin + + file -m 0755 -o root -g sys / /usr/local/samba/ + file -m 0755 -o root -g sys / /usr/local/samba/bin/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/codepages/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/examples/ + file -m 0700 -o root -g sys / /usr/local/samba/private/ + file -m 0755 -o root -g sys / /var/usr/local/samba/ + file -m 0755 -o root -g sys / /var/usr/local/samba/locks/ + + file -m 0444 -o root -g sys ../../COPYING /usr/local/samba/COPYING + file -m 0555 -o root -g sys ./samba.boot /sbin/init.d/samba + file -m 0444 -o root -g sys ./samba.config /usr/local/samba/newconfig/samba.config + + file -m 0444 -o root -g sys ../../examples/smb.conf.default /usr/local/samba/newconfig/examples/smb.conf.default + file -m 0444 -o root -g sys ../../examples/simple/smb.conf /usr/local/samba/newconfig/examples/smb.conf.simple + file -m 0444 -o root -g sys ../../examples/dce-dfs/smb.conf /usr/local/samba/newconfig/examples/smb.conf.dce-dfs + + directory ../../source/bin=/usr/local/samba/bin +_EOF_ + for a in $BIN + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ../../source/script=/usr/local/samba/bin" >>$PSF + + for a in $SCRIPT + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ./codepage=/usr/local/samba/lib/codepages" >> $PSF + + for a in $CODEPAGES + do + echo " file -m 0444 -o root -g sys codepage.$a" >>$PSF + done + echo " end" >>$PSF +#- end of fileset CORE + +echo "\tFileset $PRODUCT.man" +#- Man pages +cat <<_EOF_ >>$PSF + fileset + tag man + title Samba server man pages + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.man + + file -m 0755 -o root -g sys / /usr/local/samba/man/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1m/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man4/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man5/ + +_EOF_ + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands + + for a in man/*.1 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1/$b" >>$PSF + done + + for a in man/*.1m + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1m/$b" >>$PSF + done + + for a in man/*.4 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man4/$b" >>$PSF + done + + for a in man/*.5 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man5/$b" >>$PSF + done + + echo " end" >>$PSF + +echo "\tFileset $PRODUCT.swat" + +cat <<_EOF_ >>$PSF + + fileset + tag winbind + title Samba winbind + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.winbind + unconfigure unconfigure.winbind + + directory ../../source/nsswitch=/usr/local/samba/lib/winbind + file -m 0755 -o root -g sys libnss_winbind.so + file -m 0755 -o root -g sys pam_winbind.so + directory ../../source/bin=/usr/local/samba/bin + file -m 0755 -o root -g sys winbindd + file -m 0755 -o root -g sys wbinfo + + +cat <<_EOF_ >>$PSF + end + fileset + tag swat + title Samba Web-based administration tool + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.swat + unconfigure unconfigure.swat + + file -m 0755 -o root -g sys / /usr/local/samba/swat/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/help/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/images/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/include/ + + directory ../../swat=/usr/local/samba/swat + file -m 0444 -o root -g sys README + + directory ../../source/bin=/usr/local/samba/bin + file -m 0555 -o root -g sys swat + + directory ../../swat/images=/usr/local/samba/swat/images +_EOF_ + + for a in ../../swat/images/*.gif + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/help=/usr/local/samba/swat/help" >>$PSF + + for a in ../../swat/help/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../docs/htmldocs=/usr/local/samba/swat/help" >>$PSF + + for a in ../../docs/htmldocs/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/include=/usr/local/samba/swat/include" >>$PSF + + for a in ../../swat/include/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + +cat <<_EOF_ >>$PSF + end + +end +_EOF_ + diff --git a/packaging/HPUX/unconfigure.winbind b/packaging/HPUX/unconfigure.winbind new file mode 100644 index 00000000000..80709eb86dd --- /dev/null +++ b/packaging/HPUX/unconfigure.winbind @@ -0,0 +1,8 @@ +# Samba.winbind configure script + + + echo "heres where wed remove links to winbind libs" + rm /usr/lib/libnss_winbind.1 + rm /usr/lib/security/libpam_winbind.1 + +exit 0 -- cgit From 049a8177576216a6e16b548e50698090e458ae7c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Feb 2002 20:54:50 +0000 Subject: Merging in JohnR's changes to DEVICEMODE. Jeremy. --- source/printing/nt_printing.c | 45 +++++++++++++++++++++++--------------- source/rpc_server/srv_spoolss_nt.c | 13 +++++++++++ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 6c52e6fabe6..dc04a2fb6eb 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3075,27 +3075,36 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA NT_DEVICEMODE *tmp_devmode = printer->info_2->devmode; /* - * Set devmode on printer info, so entire printer initialization can be - * saved to tdb. + * When the DEVMODE is already set on the printer, don't try to unpack it. */ - if ((ctx = talloc_init()) == NULL) - return WERR_NOMEM; - if ((nt_devmode = (NT_DEVICEMODE*)malloc(sizeof(NT_DEVICEMODE))) == NULL) { - status = WERR_NOMEM; - goto done; - } + if (!printer->info_2->devmode) { + /* + * Set devmode on printer info, so entire printer initialization can be + * saved to tdb. + */ + + if ((ctx = talloc_init()) == NULL) + return WERR_NOMEM; + + if ((nt_devmode = (NT_DEVICEMODE*)malloc(sizeof(NT_DEVICEMODE))) == NULL) { + status = WERR_NOMEM; + goto done; + } - ZERO_STRUCTP(nt_devmode); + ZERO_STRUCTP(nt_devmode); - /* - * The DEVMODE is held in the 'data' component of the param in raw binary. - * Convert it to to a devmode structure - */ - if (!convert_driver_init(param, ctx, nt_devmode)) { - DEBUG(10,("save_driver_init_2: error converting DEVMODE\n")); - status = WERR_INVALID_PARAM; - goto done; + /* + * The DEVMODE is held in the 'data' component of the param in raw binary. + * Convert it to to a devmode structure + */ + if (!convert_driver_init(param, ctx, nt_devmode)) { + DEBUG(10,("save_driver_init_2: error converting DEVMODE\n")); + status = WERR_INVALID_PARAM; + goto done; + } + + printer->info_2->devmode = nt_devmode; } /* @@ -3103,7 +3112,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA * a 'driver init' element in the tdb * */ - printer->info_2->devmode = nt_devmode; + if (update_driver_init(*printer, 2)!=0) { DEBUG(10,("save_driver_init_2: error updating DEVMODE\n")); status = WERR_NOMEM; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 197d808d15e..521fbbe306e 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -5978,6 +5978,19 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ * to lookup previously saved driver initialization info, which is then * bound to the new printer, simulating what happens in the Windows arch. */ + + if (!devmode) + set_driver_init(printer, 2); + else { + /* A valid devmode was included, convert and link it + */ + DEBUGADD(10, ("spoolss_addprinterex_level_2: devmode included, converting\n")); + + if (!convert_devicemode(printer->info_2->printername, devmode, + &printer->info_2->devmode)) + return WERR_NOMEM; + } + set_driver_init(printer, 2); /* write the ASCII on disk */ -- cgit From 655caee3ee0bd9e300dc2f0c1d77aad505ab7a30 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 1 Feb 2002 23:01:55 +0000 Subject: remove leading slash from tdb file name --- source/passdb/pdb_tdb.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index 219b0ee7bd6..2af118d4061 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -25,7 +25,7 @@ #ifdef WITH_TDB_SAM #define PDB_VERSION "20010830" -#define PASSDB_FILE_NAME "/passdb.tdb" +#define PASSDB_FILE_NAME "passdb.tdb" #define TDB_FORMAT_STRING "ddddddBBBBBBBBBBBBddBBwdwdBdd" #define USERPREFIX "USER_" #define RIDPREFIX "RID_" @@ -445,7 +445,8 @@ BOOL pdb_setsampwent(BOOL update) pstring tdbfile; get_private_directory(tdbfile); - pstrcat (tdbfile, PASSDB_FILE_NAME); + pstrcat(tdbfile, "/"); + pstrcat(tdbfile, PASSDB_FILE_NAME); /* Open tdb passwd */ if (!(global_tdb_ent.passwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, update?(O_RDWR|O_CREAT):O_RDONLY, 0600))) @@ -603,7 +604,8 @@ BOOL pdb_getsampwrid (SAM_ACCOUNT *user, uint32 rid) } get_private_directory(tdbfile); - pstrcat (tdbfile, PASSDB_FILE_NAME); + pstrcat(tdbfile, "/"); + pstrcat(tdbfile, PASSDB_FILE_NAME); /* set search key */ slprintf(keystr, sizeof(keystr)-1, "%s%.8x", RIDPREFIX, rid); @@ -651,7 +653,8 @@ BOOL pdb_delete_sam_account(char *sname) strlower(name); get_private_directory(tdbfile); - pstrcat (tdbfile, PASSDB_FILE_NAME); + pstrcat(tdbfile, "/"); + pstrcat(tdbfile, PASSDB_FILE_NAME); /* open the TDB */ if (!(pwd_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR, 0600))) { @@ -734,7 +737,8 @@ static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag) BOOL ret = True; get_private_directory(tdbfile); - pstrcat (tdbfile, PASSDB_FILE_NAME); + pstrcat(tdbfile, "/"); + pstrcat(tdbfile, PASSDB_FILE_NAME); if ( (!newpwd->uid) || (!newpwd->gid) ) DEBUG (0,("tdb_update_sam: Storing a SAM_ACCOUNT for [%s] with uid %d and gid %d!\n", -- cgit From 8fbe05bb3e7780987ae3b6edeeda9814648b3a44 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 2 Feb 2002 00:14:04 +0000 Subject: Update the manpage to better document the -j FOO -U Administrator%password syntax. Fix a bit of spelling. Needs autogen. Andrew Bartlett --- docs/docbook/manpages/smbpasswd.8.sgml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index 098e874cc85..499d83bf52e 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -281,8 +281,17 @@ user accounts to any Domain Controller in the same way as a Windows NT Server. See the security = domain option in the smb.conf(5) man page. + + This command can work both with and without the -U parameter. + + When invoked with -U, that username (and optional password) are + used to contact the PDC (which must be specified with -r) to both + create a machine account, and to set a password on it. - In order to be used in this way, the Administrator for + Alternately, if -U is omitted, Samba will contact its PDC + and attempt to change the password on a pre-existing account. + + In order to be used in this way, the Administrator for the Windows NT Domain must have used the program "Server Manager for Domains" to add the primary NetBIOS name of the Samba server as a member of the Domain. @@ -292,9 +301,10 @@ look up the Primary Domain Controller for the Domain (found in the smb.conf file in the parameter password server and change the machine account - password used to create the secure Domain communication. This - password is then stored by smbpasswd in a TDB, writeable only by root, - called secrets.tdb + password used to create the secure Domain communication. + + Either way, this password is then stored by smbpasswd in a TDB, + writeable only by root, called secrets.tdb Once this operation has been performed the smb.conf file may be updated to set the @@ -304,7 +314,9 @@ Note that even though the authentication is being done to the PDC all users accessing the Samba server must still - have a valid UNIX account on that machine. + have a valid UNIX account on that machine. + The winbindd(8) daemon can be used + to create UNIX accounts for NT users. This option is only available when running smbpasswd as root. @@ -320,7 +332,13 @@ a password on a remote machine it allows the user to specify the user name on that machine whose password will be changed. It is present to allow users who have different user names on - different systems to change these passwords. + different systems to change these passwords. + + In particular, this parameter specifies the username + used to create the machine account when invoked with -j + + + @@ -347,7 +365,7 @@ -w password This parameter is only available is Samba - has been configured to use the experiemental + has been configured to use the experimental --with-ldapsam option. The -w switch is used to specify the password to be used with the ldap admin -- cgit From b0564753c86399750a2bccb2fd7cb0ddcb8cbe6e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 00:26:25 +0000 Subject: Fix link code from UNIX clients. Jeremy. --- source/smbd/trans2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index bfa304605f6..4c34603bff5 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2186,17 +2186,30 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in #else pstring resolved_name; #endif + fstring last_component; pstring link_dest; + char *p; BOOL bad_path = False; SMB_STRUCT_STAT sbuf; pstrcpy(link_dest, link_dest_in); unix_convert(link_dest,conn,0,&bad_path,&sbuf); + p = strrchr(link_dest, '/'); + if (p) { + fstrcpy(last_component, p+1); + *p = '\0'; + } else { + fstrcpy(last_component, link_dest); + pstrcpy(link_dest, "./"); + } + if (conn->vfs_ops.realpath(conn,dos_to_unix(link_dest,False),resolved_name) == NULL) return -1; pstrcpy(link_dest, unix_to_dos(resolved_name,False)); + pstrcat(link_dest, "/"); + pstrcat(link_dest, last_component); if (*link_dest != '/') { /* Relative path. */ -- cgit From 92bf95edc16816cff5e49a485d787b426456b205 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 2 Feb 2002 00:26:56 +0000 Subject: Fix missing --- docs/docbook/manpages/smbpasswd.8.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index 499d83bf52e..5d41651f7d3 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -282,7 +282,7 @@ NT Server. See the security = domain option in the smb.conf(5) man page. - This command can work both with and without the -U parameter. + This command can work both with and without the -U parameter. When invoked with -U, that username (and optional password) are used to contact the PDC (which must be specified with -r) to both @@ -301,7 +301,7 @@ look up the Primary Domain Controller for the Domain (found in the smb.conf file in the parameter password server and change the machine account - password used to create the secure Domain communication. + password used to create the secure Domain communication. Either way, this password is then stored by smbpasswd in a TDB, writeable only by root, called secrets.tdb -- cgit From 01a51db91b1a91caf9a8605944dc129e0d921330 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 2 Feb 2002 00:31:01 +0000 Subject: Regen doco --- docs/htmldocs/smbpasswd.8.html | 36 +++++++++++++++++++++++++++--------- docs/manpages/smb.conf.5 | 8 ++++---- docs/manpages/smbpasswd.8 | 25 ++++++++++++++++++++----- 3 files changed, 51 insertions(+), 18 deletions(-) diff --git a/docs/htmldocs/smbpasswd.8.html b/docs/htmldocs/smbpasswd.8.html index c8f97c89d13..dfcb71baed2 100644 --- a/docs/htmldocs/smbpasswd.8.html +++ b/docs/htmldocs/smbpasswd.8.html @@ -425,6 +425,15 @@ CLASS="FILENAME" >smb.conf(5)
    man page.

    This command can work both with and without the -U parameter.

    When invoked with -U, that username (and optional password) are + used to contact the PDC (which must be specified with -r) to both + create a machine account, and to set a password on it.

    Alternately, if -U is omitted, Samba will contact its PDC + and attempt to change the password on a pre-existing account.

    In order to be used in this way, the Administrator for the Windows NT Domain must have used the program "Server Manager for Domains" to add the primary NetBIOS name of the Samba server @@ -445,9 +454,10 @@ CLASS="PARAMETER" >password server and change the machine account - password used to create the secure Domain communication. This - password is then stored by smbpasswd in a TDB, writeable only by root, - called

    Either way, this password is then stored by smbpasswd in a TDB, + writeable only by root, called secrets.tdb

    Note that even though the authentication is being done to the PDC all users accessing the Samba server must still - have a valid UNIX account on that machine.

    winbindd(8)
    daemon can be used + to create UNIX accounts for NT users.

    This option is only available when running smbpasswd as root.

    In particular, this parameter specifies the username + used to create the machine account when invoked with -j

    -h

    This parameter is only available is Samba - has been configured to use the experiemental + has been configured to use the experimental --with-ldapsam

    NOTES

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "26 January 2002" "" "" +.TH "SMB.CONF" "5" "01 February 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -2879,7 +2879,7 @@ would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'. .TP -\fBforce directory security mode (S)\fR +\fBforce directory\fR This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box. @@ -7143,7 +7143,7 @@ again. Default: \fBwinbind cache type = 15\fR .TP -\fBwinbind enum users\fR +\fBwinbind enum\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of users through the @@ -7162,7 +7162,7 @@ usernames. Default: \fBwinbind enum users = yes \fR .TP -\fBwinbind enum groups\fR +\fBwinbind enum\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of groups through the diff --git a/docs/manpages/smbpasswd.8 b/docs/manpages/smbpasswd.8 index 8e5be46e318..290574831cd 100644 --- a/docs/manpages/smbpasswd.8 +++ b/docs/manpages/smbpasswd.8 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBPASSWD" "8" "06 December 2001" "" "" +.TH "SMBPASSWD" "8" "01 February 2002" "" "" .SH NAME smbpasswd \- change a user's SMB password .SH SYNOPSIS @@ -217,6 +217,15 @@ user accounts to any Domain Controller in the same way as a Windows NT Server. See the \fBsecurity = domain\fR option in the \fIsmb.conf(5)\fR man page. +This command can work both with and without the -U parameter. + +When invoked with -U, that username (and optional password) are +used to contact the PDC (which must be specified with -r) to both +create a machine account, and to set a password on it. + +Alternately, if -U is omitted, Samba will contact its PDC +and attempt to change the password on a pre-existing account. + In order to be used in this way, the Administrator for the Windows NT Domain must have used the program "Server Manager for Domains" to add the primary NetBIOS name of the Samba server @@ -226,9 +235,10 @@ After this has been done, to join the Domain invoke \fB smbpasswd\fR with this p look up the Primary Domain Controller for the Domain (found in the \fIsmb.conf\fR file in the parameter \fIpassword server\fR and change the machine account -password used to create the secure Domain communication. This -password is then stored by smbpasswd in a TDB, writeable only by root, -called \fIsecrets.tdb\fR +password used to create the secure Domain communication. + +Either way, this password is then stored by smbpasswd in a TDB, +writeable only by root, called \fIsecrets.tdb\fR Once this operation has been performed the \fI smb.conf\fR file may be updated to set the \fB security = domain\fR option and all future logins to the Samba server will be authenticated to the Windows NT @@ -237,6 +247,8 @@ PDC. Note that even though the authentication is being done to the PDC all users accessing the Samba server must still have a valid UNIX account on that machine. +The \fBwinbindd(8)\fR daemon can be used +to create UNIX accounts for NT users. This option is only available when running smbpasswd as root. .TP @@ -247,6 +259,9 @@ a password on a remote machine it allows the user to specify the user name on that machine whose password will be changed. It is present to allow users who have different user names on different systems to change these passwords. + +In particular, this parameter specifies the username +used to create the machine account when invoked with -j .TP \fB-h\fR This option prints the help string for \fB smbpasswd\fR, selecting the correct one for running as root @@ -261,7 +276,7 @@ is to aid people writing scripts to drive smbpasswd .TP \fB-w password\fR This parameter is only available is Samba -has been configured to use the experiemental +has been configured to use the experimental \fB--with-ldapsam\fR option. The \fI-w\fR switch is used to specify the password to be used with the \fIldap admin -- cgit From cbe74cad0146741bbb20236fa42760d79b3ea8a1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 00:54:30 +0000 Subject: Comment out AUTH_CRAP by default as a security measure. Jeremy. --- source/nsswitch/winbindd.c | 2 ++ source/nsswitch/winbindd_pam.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 637260214ae..5dc28a43695 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -313,7 +313,9 @@ static struct dispatch_table dispatch_table[] = { /* PAM auth functions */ { WINBINDD_PAM_AUTH, winbindd_pam_auth, "PAM_AUTH" }, +#if ALLOW_WINBIND_AUTH_CRAP { WINBINDD_PAM_AUTH_CRAP, winbindd_pam_auth_crap, "AUTH_CRAP" }, +#endif { WINBINDD_PAM_CHAUTHTOK, winbindd_pam_chauthtok, "CHAUTHTOK" }, /* Enumeration functions */ diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index 3e968c14737..2b6a79694d2 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -78,6 +78,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) /* Challenge Response Authentication Protocol */ +#if ALLOW_WINBIND_AUTH_CRAP enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) { NTSTATUS result; @@ -133,6 +134,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) done: return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } +#endif /* Change a user password */ -- cgit From e13a0018d3ee6d235648e590f9b201119efcd7b7 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Sat, 2 Feb 2002 02:56:59 +0000 Subject: remove duplicate code --- source/lib/util_sock.c | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 4d9a405cb5d..c3eb78109c2 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -442,46 +442,6 @@ ssize_t read_data(int fd,char *buffer,size_t N) return (ssize_t)total; } -/**************************************************************************** - Read data from a socket, reading exactly N bytes. -****************************************************************************/ - -static ssize_t read_socket_data(int fd,char *buffer,size_t N) -{ - ssize_t ret; - size_t total=0; - - smb_read_error = 0; - - while (total < N) - { -#ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_read(ssl, buffer + total, N - total); - }else{ - ret = read(fd,buffer + total,N - total); - } -#else /* WITH_SSL */ - ret = read(fd,buffer + total,N - total); -#endif /* WITH_SSL */ - - if (ret == 0) - { - DEBUG(10,("read_socket_data: recv of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_EOF; - return 0; - } - if (ret == -1) - { - DEBUG(0,("read_socket_data: recv failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_ERROR; - return -1; - } - total += ret; - } - return (ssize_t)total; -} - /**************************************************************************** Write data to a fd. ****************************************************************************/ @@ -585,7 +545,7 @@ static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int if (timeout > 0) ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4); else - ok = (read_socket_data(fd,inbuf,4) == 4); + ok = (read_data(fd,inbuf,4) == 4); if (!ok) return(-1); @@ -667,7 +627,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) } if(len > 0) { - ret = read_socket_data(fd,buffer+4,len); + ret = read_data(fd,buffer+4,len); if (ret != len) { smb_read_error = READ_ERROR; return False; -- cgit From 5340ebafbe1aa54843e2dbaf676c875bfdf432c5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 2 Feb 2002 04:54:26 +0000 Subject: finish off changes to the Samba-LDAP-HOWTO .... Next to finish the PDC-BDC HOWTO --- docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml | 232 ++++++++++++++++++++++------- 1 file changed, 182 insertions(+), 50 deletions(-) diff --git a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml index 802585d4f20..13a038cf375 100644 --- a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml +++ b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml @@ -2,15 +2,20 @@ - Gerald (Jerry)>Carter> + Gerald (Jerry)>Carter Samba Team
    jerry@samba.org
    + Olivier (lem)>Lemaire + + IDEALX +
    olem@IDEALX.org
    +
    - - - (29 Dec 2001) + + + (13 Jan 2002)
    Storing Samba's User/Machine Account information in an LDAP Directory @@ -20,7 +25,7 @@ This document describes how to use an LDAP directory for storing Samba user -account information normally stored in the smbpasswd(5) file. It is +account information traditionally stored in the smbpasswd(5) file. It is assumed that the reader already has a basic understanding of LDAP concepts and has a working directory server already installed. For more information on LDAP architectures and Directories, please refer to the following sites. @@ -37,11 +42,19 @@ a guide to LDAP for System Administrators which has a planned release date of early summer, 2002. -It may also be helpful to supplement the reading of the HOWTO with -the Samba-PDC-LDAP-HOWTO -maintained by Ignacio Coupeau. + +Two additional Samba resources which may prove to be helpful are + + The Samba-PDC-LDAP-HOWTO + maintained by Ignacio Coupeau. + + The NT migration scripts from IDEALX that are + geared to manage users and group in such a Samba-LDAP Domain Controller configuration. + + + @@ -57,33 +70,35 @@ disadvantages to this approach for sites with very large numbers of users (count in the thousands). - + + The first is that all lookups must be performed sequentially. Given that there are approximately two lookups per domain logon (one for a normal session connection such as when mapping a network drive or printer), this -is non-optimal. What is needed is an indexed approach such as is used in -databases. - +is a performance bottleneck for lareg sites. What is needed is an indexed approach +such as is used in databases. + - + The second problem is that administrators who desired to replicate a smbpasswd file to more than one Samba server were left to use external tools such as rsync(1) and ssh(1) and wrote custom, in-house scripts. - + - + And finally, the amount of information which is stored in an smbpasswd entry leaves no room for additional attributes such as a home directory, password expiration time, or even a Relative Identified (RID). - + + As a result of these defeciencies, a more robust means of storing user attributes used by smbd was developed. The API which defines access to user accounts -is referred to as the samdb interface (previously this was called the passdb -API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support +is commonly referred to as the samdb interface (previously this was called the passdb +API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support for a samdb backend (e.g. --with-ldapsam or --with-tdbsam) requires compile time support. @@ -153,7 +168,7 @@ objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ - description $ userWorkstations $ primaryGroupID )) + description $ userWorkstations $ primaryGroupID $ domain )) @@ -173,6 +188,9 @@ in the directory. However, there are several fields (e.g. uid) which overlap with the posixAccount objectclass outlined in RFC2307. This is by design. + + In order to store all user account information (UNIX and Samba) in the directory, it is necessary to use the sambaAccount and posixAccount objectclasses in @@ -183,6 +201,14 @@ and functioning correctly. This division of information makes it possible to store all Samba account information in LDAP, but still maintain UNIX account information in NIS while the network is transitioning to a full LDAP infrastructure. + + + +Configuring Samba with LDAP + + + +OpenLDAP configuration To include support for the sambaAccount object in an OpenLDAP directory @@ -218,14 +244,34 @@ include /etc/openldap/schema/samba.schema .... + +It is recommended that you maintain some indices on some of the most usefull attributes, +like in the following example, to speed up searches made on sambaAccount objectclasses +(and possibly posixAccount and posixGroup as well). + + +# Indices to maintain +## required by OpenLDAP 2.0 +index objectclass eq + +## support pb_getsampwnam() +index uid pres,eq +## support pdb_getsambapwrid() +index rid eq + +## uncomment these if you are storing posixAccount and +## posixGroup entries in the directory as well +##index uidNumber eq +##index gidNumber eq +##index cn eq +##index memberUid eq + + - - - - - -smb.conf LDAP parameters + +Configuring Samba + The following parameters are available in smb.conf only with --with-ldapsam @@ -263,7 +309,7 @@ use with an LDAP directory could appear as # must be set by using 'smbpasswd -w secretpw' to store the # passphrase in the secrets.tdb file. If the "ldap admin dn" values # changes, this password will need to be reset. - ldap admin dn = "cn=Manager,dc=samba,dc=org" + ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org" # specify the LDAP server's hostname (defaults to locahost) ldap server = ahab.samba.org @@ -284,11 +330,36 @@ use with an LDAP directory could appear as - + + +Accounts and Groups management + +As users accounts are managed thru the sambaAccount objectclass, you should +modify you existing administration tools to deal with sambaAccount attributes. + + + +Machines accounts are managed with the sambaAccount objectclass, just +like users accounts. However, it's up to you to stored thoses accounts +in a different tree of you LDAP namespace: you should use +"ou=Groups,dc=plainjoe,dc=org" to store groups and +"ou=People,dc=plainjoe,dc=org" to store users. Just configure your +NSS and PAM accordingly (usually, in the /etc/ldap.conf configuration +file). + + + +In Samba release 2.2.3, the group management system is based on posix +groups. This meand that Samba make usage of the posixGroup objectclass. +For now, there is no NT-like group system management (global and local +groups). + + + Security and sambaAccount @@ -308,7 +379,9 @@ of sambaAccount entries in the directory. These password hashes are clear text equivalents and can be used to impersonate -the user without deriving the original clear text strings. +the user without deriving the original clear text strings. For more information +on the details of LM/NT password hashes, refer to the ENCRYPTION chapter of the Samba-HOWTO-Collection. @@ -321,6 +394,12 @@ LDAPS. In either case, you are strongly discouraged to disable this security (ldap ssl = off). + +Note that the LDAPS protocol is deprecated in favor of the LDAPv3 StartTLS +extended operation. However, the OpenLDAP library still provides support for +the older method of securing communication between clients and servers. + + The second security precaution is to prevent non-administrative users from harvesting password hashes from the directory. This can be done using the @@ -328,48 +407,102 @@ following ACL in slapd.conf: -## allow users to update their own password, but not to browse others -access to attrs=userPassword,lmPassword,ntPassword - by self write - by * auth +## allow the "ldap admin dn" access, but deny everyone else +access to attrs=lmPassword,ntPassword + by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write + by * none - -You may of course, add in write access to administrative DN's as necessary. - - +LDAP specials attributes for sambaAccounts + + +The sambaAccount objectclass is composed of the following attributes: + + + + + lmPassword: the LANMAN password 16-byte hash stored as a character + representation of a hexidecimal string. + + ntPassword: the NT password hash 16-byte stored as a character + representation of a hexidecimal string. + + pwdLastSet: The integer time in seconds since 1970 when the + lmPassword and ntPassword attributes were last set. + + acctFlags: string of 11 characters surrounded by square brackets [] + representing account flags such as U (user), W(workstation), X(no password expiration), and + D(disabled). + + logonTime: Integer value currently unused + + logoffTime: Integer value currently unused + + kickoffTime: Integer value currently unused + + pwdCanChange: Integer value currently unused + + pwdMustChange: Integer value currently unused + + homeDrive: specifies the drive letter to which to map the + UNC path specified by homeDirectory. The drive letter must be specified in the form "X:" + where X is the letter of the drive to map. Refer to the "logon drive" parameter in the + smb.conf(5) man page for more information. + + scriptPath: The scriptPath property specifies the path of + the user's logon script, .CMD, .EXE, or .BAT file. The string can be null. The path + is relative to the netlogon share. Refer to the "logon script" parameter in the + smb.conf(5) man page for more information. + + profilePath: specifies a path to the user's profile. + This value can be a null string, a local absolute path, or a UNC path. Refer to the + "logon path" parameter in the smb.conf(5) man page for more information. + + smbHome: The homeDirectory property specifies the path of + the home directory for the user. The string can be null. If homeDrive is set and specifies + a drive letter, homeDirectory should be a UNC path. The path must be a network + UNC path of the form \\server\share\directory. This value can be a null string. + Refer to the "logon home" parameter in the smb.conf(5) man page for more information. + + + userWorkstation: character string value currently unused. + + + rid: the integer representation of the user's relative identifier + (RID). + + primaryGroupID: the relative identifier (RID) of the primary group + of the user. + + -There are currently four sambaAccount attributes which map directly onto -smb.conf parameters. +The majority of these parameters are only used when Samba is acting as a PDC of +a domain (refer to the Samba-PDC-HOWTO for details on +how to configure Samba as a Primary Domain Controller). The following four attributes +are only stored with the sambaAccount entry if the values are non-default values: - smbHome -> "logon home" - profilePath -> "logon path" - homeDrive -> "logon drive" - scriptPath -> "logon script" + smbHome + scriptPath + logonPath + homeDrive -First of all, these parameters are only used when Samba is acting as a -PDC or a domain (refer to the Samba-PDC-HOWTO -for details on how to configure Samba as a Primary Domain Controller). -Furthermore, these attributes are only stored with the sambaAccount entry if +These attributes are only stored with the sambaAccount entry if the values are non-default values. For example, assume TASHTEGO has now been configured as a PDC and that logon home = \\%L\%u was defined in its smb.conf file. When a user named "becky" logons to the domain, the logon home string is expanded to \\TASHTEGO\becky. - - - If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org", this value is used. However, if this attribute does not exist, then the value of the logon home parameter is used in its place. Samba @@ -382,7 +515,6 @@ something other than the default (e.g. \\MOBY\becky). - Example LDIF Entries for a sambaAccount -- cgit From 655f6fb0ccc77a813130ee2bd088eef1fe791055 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 2 Feb 2002 06:02:40 +0000 Subject: Added in the BDC mini-HOWTO from Volker (written back in August). regenerated docs... --- docs/Samba-HOWTO-Collection.pdf | 3643 +++++++++++++++-------------- docs/docbook/Makefile.in | 3 +- docs/docbook/projdoc/Samba-BDC-HOWTO.sgml | 233 ++ docs/docbook/projdoc/samba-doc.sgml | 2 + docs/htmldocs/Samba-BDC-HOWTO.html | 245 ++ docs/htmldocs/Samba-HOWTO-Collection.html | 1014 ++++++-- docs/htmldocs/Samba-LDAP-HOWTO.html | 337 ++- docs/htmldocs/UNIX_INSTALL.html | 18 +- docs/htmldocs/winbind.html | 2 +- 9 files changed, 3484 insertions(+), 2013 deletions(-) create mode 100644 docs/docbook/projdoc/Samba-BDC-HOWTO.sgml create mode 100644 docs/htmldocs/Samba-BDC-HOWTO.html diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf index d84f966b2e0..06fd459fc26 100644 --- a/docs/Samba-HOWTO-Collection.pdf +++ b/docs/Samba-HOWTO-Collection.pdf @@ -1,6 +1,6 @@ %PDF-1.2 %âãÏÓ -1 0 obj<>endobj +1 0 obj<>endobj 2 0 obj<>endobj 3 0 obj<>endobj 4 0 obj<>endobj @@ -94,7 +94,7 @@ 67 0 R 69 0 R ]endobj -71 0 obj<>endobj +71 0 obj<>endobj 72 0 obj<>endobj 73 0 obj<>endobj 74 0 obj<>endobj @@ -325,184 +325,187 @@ 229 0 obj[226 0 R 228 0 R ]endobj -230 0 obj<>endobj -231 0 obj<>endobj -232 0 obj<>endobj -233 0 obj<>endobj -234 0 obj<>endobj -235 0 obj<>endobj -236 0 obj<>endobj -237 0 obj<>endobj -238 0 obj<>endobj -239 0 obj<>endobj -240 0 obj[231 0 R -233 0 R -235 0 R -237 0 R -239 0 R +230 0 obj<>endobj +231 0 obj<>endobj +232 0 obj[231 0 R ]endobj -241 0 obj<>endobj -242 0 obj<>endobj -243 0 obj<>endobj -244 0 obj<>endobj -245 0 obj<>endobj -246 0 obj<>endobj -247 0 obj<>endobj -248 0 obj<>endobj -249 0 obj[242 0 R +233 0 obj<>endobj +234 0 obj<>endobj +235 0 obj<>endobj +236 0 obj<>endobj +237 0 obj<>endobj +238 0 obj<>endobj +239 0 obj<>endobj +240 0 obj<>endobj +241 0 obj<>endobj +242 0 obj<>endobj +243 0 obj<>endobj +244 0 obj<>endobj +245 0 obj[234 0 R +236 0 R +238 0 R +240 0 R +242 0 R 244 0 R -246 0 R -248 0 R ]endobj -250 0 obj<>endobj -251 0 obj<>endobj -252 0 obj<>endobj -253 0 obj<>endobj -254 0 obj<>endobj -255 0 obj<>endobj -256 0 obj<>endobj -257 0 obj<>endobj -258 0 obj<>endobj -259 0 obj<>endobj -260 0 obj<>endobj -261 0 obj<>endobj -262 0 obj<>endobj -263 0 obj<>endobj -264 0 obj[251 0 R +246 0 obj<>endobj +247 0 obj<>endobj +248 0 obj<>endobj +249 0 obj<>endobj +250 0 obj<>endobj +251 0 obj<>endobj +252 0 obj<>endobj +253 0 obj<>endobj +254 0 obj[247 0 R +249 0 R +251 0 R 253 0 R -255 0 R -257 0 R -259 0 R -261 0 R -263 0 R ]endobj -265 0 obj<>endobj -266 0 obj<>endobj -267 0 obj[266 0 R +255 0 obj<>endobj +256 0 obj<>endobj +257 0 obj<>endobj +258 0 obj<>endobj +259 0 obj<>endobj +260 0 obj<>endobj +261 0 obj<>endobj +262 0 obj<>endobj +263 0 obj<>endobj +264 0 obj<>endobj +265 0 obj<>endobj +266 0 obj<>endobj +267 0 obj<>endobj +268 0 obj<>endobj +269 0 obj[256 0 R +258 0 R +260 0 R +262 0 R +264 0 R +266 0 R +268 0 R ]endobj -268 0 obj<>endobj -269 0 obj<>endobj -270 0 obj[269 0 R +270 0 obj<>endobj +271 0 obj<>endobj +272 0 obj[271 0 R ]endobj -271 0 obj<>endobj -272 0 obj<>endobj -273 0 obj[272 0 R +273 0 obj<>endobj +274 0 obj<>endobj +275 0 obj[274 0 R ]endobj -274 0 obj<>endobj -275 0 obj<>endobj -276 0 obj[275 0 R +276 0 obj<>endobj +277 0 obj<>endobj +278 0 obj[277 0 R ]endobj -277 0 obj<>endobj -278 0 obj<>endobj -279 0 obj<>endobj -280 0 obj<>endobj -281 0 obj<>endobj -282 0 obj<>endobj -283 0 obj<>endobj -284 0 obj<>endobj -285 0 obj<>endobj -286 0 obj<>endobj -287 0 obj<>endobj -288 0 obj<>endobj -289 0 obj[278 0 R -280 0 R -282 0 R -284 0 R -286 0 R -288 0 R +279 0 obj<>endobj +280 0 obj<>endobj +281 0 obj[280 0 R ]endobj -290 0 obj<>endobj -291 0 obj<>endobj -292 0 obj<>endobj -293 0 obj<>endobj -294 0 obj[291 0 R -293 0 R +282 0 obj<>endobj +283 0 obj<>endobj +284 0 obj[283 0 R ]endobj -295 0 obj<>endobj -296 0 obj<>endobj -297 0 obj<>endobj -298 0 obj<>endobj -299 0 obj<>endobj -300 0 obj<>endobj -301 0 obj<>endobj -302 0 obj<>endobj -303 0 obj[296 0 R -298 0 R -300 0 R -302 0 R +285 0 obj<>endobj +286 0 obj<>endobj +287 0 obj<>endobj +288 0 obj<>endobj +289 0 obj<>endobj +290 0 obj<>endobj +291 0 obj<>endobj +292 0 obj<>endobj +293 0 obj<>endobj +294 0 obj<>endobj +295 0 obj<>endobj +296 0 obj<>endobj +297 0 obj[286 0 R +288 0 R +290 0 R +292 0 R +294 0 R +296 0 R ]endobj -304 0 obj<>endobj -305 0 obj<>endobj -306 0 obj[305 0 R +298 0 obj<>endobj +299 0 obj<>endobj +300 0 obj<>endobj +301 0 obj<>endobj +302 0 obj[299 0 R +301 0 R ]endobj -307 0 obj<>endobj -308 0 obj<>endobj -309 0 obj<>endobj -310 0 obj<>endobj -311 0 obj<>endobj -312 0 obj<>endobj -313 0 obj[308 0 R +303 0 obj<>endobj +304 0 obj<>endobj +305 0 obj<>endobj +306 0 obj<>endobj +307 0 obj<>endobj +308 0 obj<>endobj +309 0 obj<>endobj +310 0 obj<>endobj +311 0 obj[304 0 R +306 0 R +308 0 R 310 0 R -312 0 R ]endobj -314 0 obj<>endobj -315 0 obj<>endobj -316 0 obj[315 0 R +312 0 obj<>endobj +313 0 obj<>endobj +314 0 obj[313 0 R ]endobj -317 0 obj<>endobj -318 0 obj<>endobj -319 0 obj<>endobj -320 0 obj<>endobj -321 0 obj<>endobj -322 0 obj<>endobj -323 0 obj<>endobj -324 0 obj<>endobj -325 0 obj<>endobj -326 0 obj<>endobj -327 0 obj<>endobj -328 0 obj<>endobj -329 0 obj<>endobj -330 0 obj<>endobj -331 0 obj<>endobj -332 0 obj<>endobj -333 0 obj<>endobj -334 0 obj<>endobj -335 0 obj<>endobj -336 0 obj<>endobj -337 0 obj<>endobj -338 0 obj<>endobj -339 0 obj<>endobj -340 0 obj<>endobj -341 0 obj<>endobj -342 0 obj<>endobj -343 0 obj<>endobj -344 0 obj<>endobj -345 0 obj<>endobj -346 0 obj<>endobj -347 0 obj<>endobj -348 0 obj<>endobj -349 0 obj<>endobj -350 0 obj<>endobj -351 0 obj<>endobj -352 0 obj<>endobj -353 0 obj<>endobj -354 0 obj<>endobj -355 0 obj<>endobj -356 0 obj<>endobj -357 0 obj<>endobj -358 0 obj<>endobj -359 0 obj<>endobj -360 0 obj<>endobj -361 0 obj<>endobj -362 0 obj[317 0 R +315 0 obj<>endobj +316 0 obj<>endobj +317 0 obj<>endobj +318 0 obj<>endobj +319 0 obj<>endobj +320 0 obj<>endobj +321 0 obj[316 0 R 318 0 R -319 0 R 320 0 R -321 0 R -322 0 R -323 0 R -324 0 R -325 0 R +]endobj +322 0 obj<>endobj +323 0 obj<>endobj +324 0 obj[323 0 R +]endobj +325 0 obj<>endobj +326 0 obj<>endobj +327 0 obj<>endobj +328 0 obj<>endobj +329 0 obj<>endobj +330 0 obj<>endobj +331 0 obj<>endobj +332 0 obj<>endobj +333 0 obj<>endobj +334 0 obj<>endobj +335 0 obj<>endobj +336 0 obj<>endobj +337 0 obj<>endobj +338 0 obj<>endobj +339 0 obj<>endobj +340 0 obj<>endobj +341 0 obj<>endobj +342 0 obj<>endobj +343 0 obj<>endobj +344 0 obj<>endobj +345 0 obj<>endobj +346 0 obj<>endobj +347 0 obj<>endobj +348 0 obj<>endobj +349 0 obj<>endobj +350 0 obj<>endobj +351 0 obj<>endobj +352 0 obj<>endobj +353 0 obj<>endobj +354 0 obj<>endobj +355 0 obj<>endobj +356 0 obj<>endobj +357 0 obj<>endobj +358 0 obj<>endobj +359 0 obj<>endobj +360 0 obj<>endobj +361 0 obj<>endobj +362 0 obj<>endobj +363 0 obj<>endobj +364 0 obj<>endobj +365 0 obj<>endobj +366 0 obj<>endobj +367 0 obj<>endobj +368 0 obj<>endobj +369 0 obj<>endobj +370 0 obj[325 0 R 326 0 R 327 0 R 328 0 R @@ -539,60 +542,60 @@ 359 0 R 360 0 R 361 0 R -]endobj -363 0 obj<>endobj -364 0 obj<>endobj -365 0 obj<>endobj -366 0 obj<>endobj -367 0 obj<>endobj -368 0 obj<>endobj -369 0 obj<>endobj -370 0 obj<>endobj -371 0 obj<>endobj -372 0 obj<>endobj -373 0 obj<>endobj -374 0 obj<>endobj -375 0 obj<>endobj -376 0 obj<>endobj -377 0 obj<>endobj -378 0 obj<>endobj -379 0 obj<>endobj -380 0 obj<>endobj -381 0 obj<>endobj -382 0 obj<>endobj -383 0 obj<>endobj -384 0 obj<>endobj -385 0 obj<>endobj -386 0 obj<>endobj -387 0 obj<>endobj -388 0 obj<>endobj -389 0 obj<>endobj -390 0 obj<>endobj -391 0 obj<>endobj -392 0 obj<>endobj -393 0 obj<>endobj -394 0 obj<>endobj -395 0 obj<>endobj -396 0 obj<>endobj -397 0 obj<>endobj -398 0 obj<>endobj -399 0 obj<>endobj -400 0 obj<>endobj -401 0 obj<>endobj -402 0 obj<>endobj -403 0 obj<>endobj -404 0 obj<>endobj -405 0 obj<>endobj -406 0 obj<>endobj -407 0 obj[363 0 R +362 0 R +363 0 R 364 0 R 365 0 R 366 0 R 367 0 R 368 0 R 369 0 R -370 0 R -371 0 R +]endobj +371 0 obj<>endobj +372 0 obj<>endobj +373 0 obj<>endobj +374 0 obj<>endobj +375 0 obj<>endobj +376 0 obj<>endobj +377 0 obj<>endobj +378 0 obj<>endobj +379 0 obj<>endobj +380 0 obj<>endobj +381 0 obj<>endobj +382 0 obj<>endobj +383 0 obj<>endobj +384 0 obj<>endobj +385 0 obj<>endobj +386 0 obj<>endobj +387 0 obj<>endobj +388 0 obj<>endobj +389 0 obj<>endobj +390 0 obj<>endobj +391 0 obj<>endobj +392 0 obj<>endobj +393 0 obj<>endobj +394 0 obj<>endobj +395 0 obj<>endobj +396 0 obj<>endobj +397 0 obj<>endobj +398 0 obj<>endobj +399 0 obj<>endobj +400 0 obj<>endobj +401 0 obj<>endobj +402 0 obj<>endobj +403 0 obj<>endobj +404 0 obj<>endobj +405 0 obj<>endobj +406 0 obj<>endobj +407 0 obj<>endobj +408 0 obj<>endobj +409 0 obj<>endobj +410 0 obj<>endobj +411 0 obj<>endobj +412 0 obj<>endobj +413 0 obj<>endobj +414 0 obj<>endobj +415 0 obj[371 0 R 372 0 R 373 0 R 374 0 R @@ -628,55 +631,61 @@ 404 0 R 405 0 R 406 0 R -]endobj -408 0 obj<>endobj -409 0 obj<>endobj -410 0 obj<>endobj -411 0 obj<>endobj -412 0 obj<>endobj -413 0 obj<>endobj -414 0 obj<>endobj -415 0 obj<>endobj -416 0 obj<>endobj -417 0 obj<>endobj -418 0 obj<>endobj -419 0 obj<>endobj -420 0 obj<>endobj -421 0 obj<>endobj -422 0 obj<>endobj -423 0 obj<>endobj -424 0 obj<>endobj -425 0 obj<>endobj -426 0 obj<>endobj -427 0 obj<>endobj -428 0 obj<>endobj -429 0 obj<>endobj -430 0 obj<>endobj -431 0 obj<>endobj -432 0 obj<>endobj -433 0 obj<>endobj -434 0 obj<>endobj -435 0 obj<>endobj -436 0 obj<>endobj -437 0 obj<>endobj -438 0 obj<>endobj -439 0 obj<>endobj -440 0 obj<>endobj -441 0 obj<>endobj -442 0 obj<>endobj -443 0 obj<>endobj -444 0 obj<>endobj -445 0 obj<>endobj -446 0 obj<>endobj -447 0 obj[408 0 R +407 0 R +408 0 R 409 0 R 410 0 R 411 0 R 412 0 R 413 0 R 414 0 R -415 0 R -416 0 R +]endobj +416 0 obj<>endobj +417 0 obj<>endobj +418 0 obj<>endobj +419 0 obj<>endobj +420 0 obj<>endobj +421 0 obj<>endobj +422 0 obj<>endobj +423 0 obj<>endobj +424 0 obj<>endobj +425 0 obj<>endobj +426 0 obj<>endobj +427 0 obj<>endobj +428 0 obj<>endobj +429 0 obj<>endobj +430 0 obj<>endobj +431 0 obj<>endobj +432 0 obj<>endobj +433 0 obj<>endobj +434 0 obj<>endobj +435 0 obj<>endobj +436 0 obj<>endobj +437 0 obj<>endobj +438 0 obj<>endobj +439 0 obj<>endobj +440 0 obj<>endobj +441 0 obj<>endobj +442 0 obj<>endobj +443 0 obj<>endobj +444 0 obj<>endobj +445 0 obj<>endobj +446 0 obj<>endobj +447 0 obj<>endobj +448 0 obj<>endobj +449 0 obj<>endobj +450 0 obj<>endobj +451 0 obj<>endobj +452 0 obj<>endobj +453 0 obj<>endobj +454 0 obj<>endobj +455 0 obj<>endobj +456 0 obj<>endobj +457 0 obj<>endobj +458 0 obj<>endobj +459 0 obj<>endobj +460 0 obj<>endobj +461 0 obj[416 0 R 417 0 R 418 0 R 419 0 R @@ -707,174 +716,203 @@ 444 0 R 445 0 R 446 0 R +447 0 R +448 0 R +449 0 R +450 0 R +451 0 R +452 0 R +453 0 R +454 0 R +455 0 R +456 0 R +457 0 R +458 0 R +459 0 R +460 0 R ]endobj -448 0 obj<>endobj -449 0 obj<>endobj -450 0 obj<>endobj -451 0 obj<>endobj -452 0 obj<>endobj -453 0 obj<>endobj -454 0 obj<>endobj -455 0 obj<>endobj -456 0 obj<>endobj -457 0 obj<>endobj -458 0 obj<>endobj -459 0 obj<>endobj -460 0 obj<>endobj -461 0 obj<>endobj -462 0 obj<>endobj -463 0 obj<>endobj -464 0 obj<>endobj -465 0 obj<>endobj -466 0 obj<>endobj -467 0 obj<>endobj -468 0 obj<>endobj -469 0 obj<>endobj -470 0 obj<>endobj -471 0 obj<>endobj -472 0 obj<>endobj -473 0 obj<>endobj -474 0 obj<>endobj -475 0 obj<>endobj -476 0 obj<>endobj -477 0 obj<>endobj -478 0 obj<>endobj -479 0 obj<>endobj -480 0 obj<>endobj -481 0 obj<>endobj -482 0 obj<>endobj -483 0 obj<>endobj -484 0 obj<>endobj -485 0 obj<>endobj -486 0 obj<>endobj -487 0 obj<>endobj -488 0 obj<>endobj -489 0 obj<>endobj -490 0 obj<>endobj -491 0 obj<>endobj -492 0 obj<>endobj -493 0 obj<>endobj -494 0 obj<>endobj -495 0 obj<>endobj -496 0 obj<>endobj -497 0 obj<>endobj -498 0 obj<>endobj -499 0 obj<>endobj -500 0 obj<>endobj -501 0 obj<>endobj -502 0 obj<>endobj -503 0 obj<>endobj -504 0 obj<>endobj -505 0 obj<>endobj -506 0 obj<>endobj -507 0 obj<>endobj -508 0 obj<>endobj -509 0 obj<>endobj -510 0 obj<>endobj -511 0 obj<>endobj -512 0 obj<>endobj -513 0 obj<>endobj -514 0 obj<>endobj -515 0 obj<>endobj -516 0 obj<>endobj -517 0 obj<>endobj -518 0 obj<>endobj -519 0 obj<>endobj -520 0 obj<>endobj -521 0 obj<>endobj -522 0 obj<>endobj -523 0 obj<>endobj -524 0 obj<>endobj -525 0 obj<>endobj -526 0 obj<>endobj -527 0 obj<>endobj -528 0 obj<>endobj -529 0 obj<>endobj -530 0 obj<>endobj -531 0 obj<>endobj -532 0 obj<>endobj -533 0 obj<>endobj -534 0 obj<>endobj -535 0 obj<>endobj -536 0 obj<>endobj -537 0 obj<>endobj -538 0 obj<>endobj -539 0 obj<>endobj -540 0 obj<>endobj -541 0 obj<>endobj -542 0 obj<>endobj -543 0 obj<>endobj -544 0 obj<>endobj -545 0 obj<>endobj -546 0 obj<>endobj -547 0 obj<>endobj -548 0 obj<>endobj -549 0 obj<>endobj -550 0 obj<>endobj -551 0 obj<>endobj -552 0 obj<>endobj -553 0 obj<>endobj -554 0 obj<>endobj -555 0 obj<>endobj -556 0 obj<>endobj -557 0 obj<>endobj -558 0 obj<>endobj -559 0 obj<>endobj -560 0 obj<>endobj -561 0 obj<>endobj -562 0 obj<>endobj -563 0 obj<>endobj -564 0 obj<>endobj -565 0 obj<>endobj -566 0 obj<>endobj -567 0 obj<>endobj -568 0 obj<>endobj -569 0 obj<>endobj -570 0 obj<>endobj -571 0 obj<>endobj -572 0 obj<>endobj -573 0 obj<>endobj -574 0 obj<>endobj -575 0 obj<>endobj -576 0 obj<>endobj -577 0 obj<>endobj -578 0 obj<>endobj -579 0 obj<>endobj -580 0 obj<>endobj -581 0 obj<>endobj -582 0 obj<>endobj -583 0 obj<>endobj -584 0 obj<>endobj -585 0 obj<>endobj -586 0 obj<>endobj -587 0 obj<>endobj -588 0 obj<>endobj -589 0 obj<>endobj -590 0 obj<>endobj -591 0 obj<>endobj -592 0 obj<>endobj -593 0 obj<>endobj -594 0 obj<>endobj -595 0 obj<>endobj -596 0 obj<>endobj -597 0 obj<>endobj -598 0 obj<>endobj -599 0 obj<>endobj -600 0 obj<>endobj +463 0 obj<>endobj +464 0 obj<>endobj +465 0 obj<>endobj +466 0 obj<>endobj +467 0 obj<>endobj +468 0 obj[462 0 R +463 0 R +464 0 R +465 0 R +466 0 R +467 0 R +]endobj +469 0 obj<>endobj +470 0 obj<>endobj +471 0 obj<>endobj +472 0 obj<>endobj +473 0 obj<>endobj +474 0 obj<>endobj +475 0 obj<>endobj +476 0 obj<>endobj +477 0 obj<>endobj +478 0 obj<>endobj +479 0 obj<>endobj +480 0 obj<>endobj +481 0 obj<>endobj +482 0 obj<>endobj +483 0 obj<>endobj +484 0 obj<>endobj +485 0 obj<>endobj +486 0 obj<>endobj +487 0 obj<>endobj +488 0 obj<>endobj +489 0 obj<>endobj +490 0 obj<>endobj +491 0 obj<>endobj +492 0 obj<>endobj +493 0 obj<>endobj +494 0 obj<>endobj +495 0 obj<>endobj +496 0 obj<>endobj +497 0 obj<>endobj +498 0 obj<>endobj +499 0 obj<>endobj +500 0 obj<>endobj +501 0 obj<>endobj +502 0 obj<>endobj +503 0 obj<>endobj +504 0 obj<>endobj +505 0 obj<>endobj +506 0 obj<>endobj +507 0 obj<>endobj +508 0 obj<>endobj +509 0 obj<>endobj +510 0 obj<>endobj +511 0 obj<>endobj +512 0 obj<>endobj +513 0 obj<>endobj +514 0 obj<>endobj +515 0 obj<>endobj +516 0 obj<>endobj +517 0 obj<>endobj +518 0 obj<>endobj +519 0 obj<>endobj +520 0 obj<>endobj +521 0 obj<>endobj +522 0 obj<>endobj +523 0 obj<>endobj +524 0 obj<>endobj +525 0 obj<>endobj +526 0 obj<>endobj +527 0 obj<>endobj +528 0 obj<>endobj +529 0 obj<>endobj +530 0 obj<>endobj +531 0 obj<>endobj +532 0 obj<>endobj +533 0 obj<>endobj +534 0 obj<>endobj +535 0 obj<>endobj +536 0 obj<>endobj +537 0 obj<>endobj +538 0 obj<>endobj +539 0 obj<>endobj +540 0 obj<>endobj +541 0 obj<>endobj +542 0 obj<>endobj +543 0 obj<>endobj +544 0 obj<>endobj +545 0 obj<>endobj +546 0 obj<>endobj +547 0 obj<>endobj +548 0 obj<>endobj +549 0 obj<>endobj +550 0 obj<>endobj +551 0 obj<>endobj +552 0 obj<>endobj +553 0 obj<>endobj +554 0 obj<>endobj +555 0 obj<>endobj +556 0 obj<>endobj +557 0 obj<>endobj +558 0 obj<>endobj +559 0 obj<>endobj +560 0 obj<>endobj +561 0 obj<>endobj +562 0 obj<>endobj +563 0 obj<>endobj +564 0 obj<>endobj +565 0 obj<>endobj +566 0 obj<>endobj +567 0 obj<>endobj +568 0 obj<>endobj +569 0 obj<>endobj +570 0 obj<>endobj +571 0 obj<>endobj +572 0 obj<>endobj +573 0 obj<>endobj +574 0 obj<>endobj +575 0 obj<>endobj +576 0 obj<>endobj +577 0 obj<>endobj +578 0 obj<>endobj +579 0 obj<>endobj +580 0 obj<>endobj +581 0 obj<>endobj +582 0 obj<>endobj +583 0 obj<>endobj +584 0 obj<>endobj +585 0 obj<>endobj +586 0 obj<>endobj +587 0 obj<>endobj +588 0 obj<>endobj +589 0 obj<>endobj +590 0 obj<>endobj +591 0 obj<>endobj +592 0 obj<>endobj +593 0 obj<>endobj +594 0 obj<>endobj +595 0 obj<>endobj +596 0 obj<>endobj +597 0 obj<>endobj +598 0 obj<>endobj +599 0 obj<>endobj +600 0 obj<>endobj +601 0 obj<>endobj +602 0 obj<>endobj +603 0 obj<>endobj +604 0 obj<>endobj +605 0 obj<>endobj +606 0 obj<>endobj +607 0 obj<>endobj +608 0 obj<>endobj +609 0 obj<>endobj +610 0 obj<>endobj +611 0 obj<>endobj +612 0 obj<>endobj +613 0 obj<>endobj +614 0 obj<>endobj +615 0 obj<>endobj +616 0 obj<>endobj +617 0 obj<>endobj +618 0 obj<>endobj +619 0 obj<>endobj +620 0 obj<>endobj +621 0 obj<>endobj +622 0 obj<>endobj +623 0 obj<>endobj +624 0 obj<>endobj +625 0 obj<>endobj +626 0 obj<>endobj +627 0 obj<>endobj +628 0 obj<>endobj +629 0 obj<>endobj +630 0 obj<>endobj +631 0 obj<>endobj +632 0 obj<>endobj +633 0 obj<>endobj -601 0 obj<>>>/Annots 17 0 R>>endobj -602 0 obj<>stream +634 0 obj<>>>/Annots 17 0 R>>endobj +635 0 obj<>stream xuSÉnÛ0½ë+rrT&%Yv|ª“tE‹¤µŠž)i¼U]’ªá¿ïVêÄE!hÎöޛѯHBð%1Mæ¨Ú趈Æïn+öäi†¢†ˆ…à“j´\|¹]àÑèU÷ºê[êœr[ݽ*v!Ur†O}=ñŒ“‡œ‚TëCÞWÃd"ٛͦüðm«“#ÍãüÒq*»ÉCé3®EiQ•;È!å"™Å‰ñYY‡ïûZ9:ÅdCÌs=áSß •“ùd6)îî VAHÍd’<öJŒŠÍÖ¢Ôú'ø­Pé¦a%˜>ô ~|\×TÃi,U[*ÔÏU‚þMnC8’26ÆG8sôÁÔÙžUpå šfè+Ó~Å®ª7†Õ¾FÙ;XÝ’Û¶dC±¦QfÍÅwºôUQGØ“± ®b³U[Õ¶‹‚û·š1TqE0&;ppLÐ÷>͉·ƒGéßÞGRz2™±ü-9õ3 Vƒ¥ßÁæäb6Oüˆ’ç¬û®³ }ås³ÆhãÜ~>‡ØzcmÖã—±!ÁÇ2ÇÀÿêÅ*^a¯ÖÄ<R–`‰öaø,—>ÓC&$o[‹iàŒ'&ÿcn"áèçÿÃŽŒ9¾ù ó?(ãp~^¢» ±à×Ùš¯Ñµùgendstream endobj -603 0 obj +636 0 obj 501 endobj -604 0 obj<>>>/Annots 20 0 R>>endobj -605 0 obj<>stream +637 0 obj<>>>/Annots 20 0 R>>endobj +638 0 obj<>stream xV]sÛ6|ׯ¸¦‰:cS¢>,Éov§NóÐfë¥ ЍH€À(šéïÞ‘´å4êÔeK{»{ þ5JiŠŸ”V3šßPVî·£ÉÆfSÚøæfµ¦mNÓd:Å'Ùø§R5Q{JúÅ):zoCTUEÊæ´Õ!Òãݯ÷w?nÿ”:颫s=O“*Ó[£nhzKµÊ)–šje©Q{º} JÓ~ßlÅ»¶çk(7!z³k£ÎéhbÙI™³QKT¹ÈÔ]´[8œ¢"h©«†ïu¤“k ð=*%Dï þ€!Lé:w€sgßF:Xt[v{Fý„˜ñ[ŠþD\­ciìž*sз]/`÷©—›täã¨û*í¿[®¹f¨wy²¦¿©v^˺Ÿ·#¦_4ïøïã»Ñl³J6´\ඦùf“Lûw=v">“¸\αì\Æí·õ™ª˜#_«hœ%…ƒg,Ó žhwU½StÔ; &ê+¡é%.¿§1•16·“ÉñxLïHœßóÚmHCXŽ¿´\ÌñºX¯ð:Ã/N/öYN7¢Æ³a§ÞGé-Ý·¦Ê™wöÒ½±Ê›ËVr”³L¸¢ÂxÖ·Ðïö^Õ½8ËAœdcfßözLfǰ–ì숄/½Î¢ó§„¶¨O¡tm•“j£cj3Œ \òTM|6ZÇ/d`zröØ„¦Â)D]'½=©TŸ4µ¶ ­ªˆ¬Öy`VÌ\«\J}u>ûнsñû/mxÞéõµÌIW`hc1ë=ÜQ‡S‚Ötäá Î ¹†]NGk«v•Æxm¤þ¬³–Ûz´ZôE,2ÖÆ2j‘c×; ¡6Ódâ[hÑf°z@tÔ©ào‰¨èÙø¿d1"è/áwøé—¼&a‰ig%öú£>á5`^Ú:Gžó§ ßÄæPdõEe„úëu*3Ä‹ÌüæD,øÆHêJê´ P™Ç@a"õ'ãÚ@Ÿ´MœêÝœ°pµÙ—Q²–í.-1ÏÃì0xý.¹TÎ5^ª!þÙi$Uõp§(z“ È86j˧w"‰]öŽv*;ð±]r|“o¥o íj/“ÖSUܵœ`C‡  w¢BLøïøØ.k)­‘šÿ¬›…ÜIçÁ:ïƒuvË#K|¹›ºq>*‹)ÇÕýoQå’¾‹(ŒÄ^wiÔ"^ ³’ßú «P‘€EÔ€Äìyʽ±Ù …hê¶’ìK莂L³çÇ ¶Þ0†3M‡Qñb žh¹ŒMë Êâq!;œ®ð¡#‚sÞïM'ÉP¤DÒ×"®{èò¶¯sÈ¥†šp¨¤M—»râÁ4ì,N~°$å&ë³û%×ð«¢ëi²Áƒ?:õÒþ>úµ¶è!endstream endobj -606 0 obj +639 0 obj 1091 endobj -607 0 obj<>>>>>endobj -608 0 obj<>stream -xWÛnÛ8}ÏWÌö¥.ÐÈ—ØŽ`Ún[E/Û8Ø šÅ‚’h™Dº$•Ô¿gH*vÕ¤› Žc çræÌæÛјFøÓé„NæT4G/WG¯WG£l± ý‹­ðLj¦Ëy¶ éâïOù­•´†í>î_’í|±Ì¦Évû` -çÃ7KOiµFØùl–ÍiU†Ó#Zƒq6ÍèÂË-œÑ++…—ä7’\“SaôZU­^MkUËìÙê+Ni<Ž'§p7Xm$ ü8ÑlkùÀQGJÏò{0qD®ÍKeeáÝuOKå¼UyË!3:‡MUIçigZT$JvÑp#:ŸdŽ^ ðº­ë9 ¡ÉIIsBš-»sTò¦’pa9m­(¼*$€5—ÝàäVT@ÙXu}x<°“9pŽE“S\.òk§ð@ÝtgÚº¤\¢^Ó ¶ÒÕê†ã)wÑ’ñÃù,:§ôõ¥ªM.꺒AŽÝ=Æï;co*kÚ-ýNï¯Þ~þxù)OơهÆ_6ÈÁýÂV-dnàO›ÇãÂ24Ähß™î¹qŒbN9î6ªØ$)zbi´=ô$ß‘Ð;£%Ý)¿Á{"Q¦ÕH!ÆI{+ís@ÌÐIX¡}xQ–jS¡Z4’ŒíRM¬xJ}BÂ…&²´:gt=ø`Ó…ÉD â8éƒá ~ƒÇ¢É)^Xä´Ždyùùã_çÞfþ»ïfê”Ò U»ëg]+göQùÁðÍ,MÒ `„ÒΡø¨²€µñÝs DÑBq€qÍx\ûGÃÐÒ†GK‰á1TÄWžxT¬“5*âcÌ~ÏɸãÌc·m#0]Œ ݼbÞ%mkdƒ±ÛÊB­bÅqïåÉž9§~ž×ž¾R®E[£N´ÌºknRfݨ3¶H¾{އ­³ÃÚ¢"¥\ k•{Q®ŸõGø Ü5u* ÏM:‘TìdÑZå¡)Ò{ÏIà,) ¹ +æ_8‰YX3-¡0\ˆ)ÚFê>3.?œÿýïÅëW—ŸÏWWÌœOPÿL–÷Zÿ˜~O–}õž%õžžÑ*é¤M*û¦Š<ž¿A9÷3Ê-#zîŸBŸ›­±^`ðï¹õ|,t+jU2fhÓ‡Ÿ÷Å£L“ËÀty@zMeE“¯÷ŸÚV»^Ç?¾ã4w=ÌARª(A³4×ËbMqJ’e¥n±“4Ik¹ÍÒ9{Ÿ{ª#‡'š÷ fŸSî:ÍsF‹K.— `MáGâ ¥~NÆ ÈoÜÝõs¼˜=?ÜÇóÔÑÙö2$‡E/äÑäeÈLãÍ̾ï#zÓ bc H :BQ [hÏþp§¡,¥ ¯F ´¶¦I}½—%¥¥ïdô‡ÑO¶6G( åÆo~#zµÌé5‘r’‘æáÅGó ¸F‚&ƒ¦c3”»º$Âþˆ`ü2çç\ 3:\ $Á!è 襜öL…á/LÖÈ•ý,A4”¾Ú" 2ôc‡ZÿŠ%- -ê–Ýa˜^Fé“ÑŠå™·‘*ÚZ`ÜY†Ðˆ°ŽWr9ÊØÓ—“X}·pAþÆ–Q²"Gâ¦ã‰Ô|ÚõÂP90 ƒ kLT°ƒÕ±T€sQÞBJø*ɘȕûV1-{@Š÷Ì~fü€¹+Rë¾H㺋*,ÜÖ€®VÕÆã†dþ[«Š›º_ ?•V^‰p…K—öo|丫!Ìs¾RÊxÑ|‰ƒcœ‚e¢ÐJúlúˆ,ÒÞÏO3þWWñƒ;ùÅ‹÷/_Ð'k¾â’„a‹»$,'æ8ž:ŽÇþÏ ~ºeKü;€‹ä„=B±þ<úæýË™endstream +640 0 obj<>>>>>endobj +641 0 obj<>stream +xV]oÓH}ï¯¸Ë A¢ÎG“4©´ÀªÛ¦ÚEtµÛc{¨=fÆ-ù÷{îŒÝÓò° BZ_ßÏsνߎ¦4Áß)ÎèdIYsôrsôzs4IV+ÚØ?Lh¾^&+š¯Nñý”¿ZIl'ðqÿÑÙ.WëdÞÙÎ`Lá|üfMÓ9m +„].É’6yx{B›l4Mæ ]z¹¥“3ze¥ð’|%É5)eFªl­ðÊh*T-“g›¯p8§é4:<žÂÝhSI„øçD³­å¯:R:x–߃‰#rmš++3o쮚+ç­J[™Ð9lÊR:O;Ó¢"‘³‹†³˜Ðñô$™qô ‹¶®wäL0Ì„&'%Uæ.„4[vç¨4äM)áÂr<ÚZ‘y•ItÖ\vƒ7·¢D—%Qׇ¯‡âv¶DŸcÑä—‹üZÇ)G‹¹uV>”¥Ú”˜£$cûT;T< ¥>!áÂÙ FŒº}0éÂd¢pœôÁð ¡¾ÂãKѤ‚”.,r*"X^^|üëòüÃÛÄ÷ƒÀ \z¡jwý¬E‡™}T~0~³è˜4j¡´óèP|Ô“l„ÆˆÚøþ9:DÑBˆ8]¦ëðÕ@Zú òh)ACYä¸òÄT±NÖ¨ˆ_;@ö{NƵ 3ÓnÛÆÆô1‚ô|ß%mkÎc·•™*bEºòdÏœÓ0Ïë³/—…hkÔ‰‘ÂtÍM—YOuî-R‡ïãqëì¸6™¨ÇH)ãZ¥ãA”ëgC +¿»Æ N¥á¹‰B'RƒŠÌZ«<4Ez๠œ%u$"W±âÿÂIp¡`XBa¸“µÔCd\}8ÿûßËׯ®.Î7Ÿ9!Ÿ þ:™­ïµþ1ýž­‡ê½èÔ{~F›N'm§BqNUäñ ø ʹç(7[c½ñîyôüZ(èVÔ*çn˜"ÀfØ~Þ°c.7¦ÏÒkJ+š„è¼ØÿÖ¶Ú &þñ' yê5DH©6"Ì:^;,‹‚"K:ËRÝb'i’Öò˜¥sö!öPGO(4ïpŸSî8ÍsF‹K.• `Mr#‘HÝÛ, 2ôã„дብ[Ô/»Ã0ƒŒº+&¡ Ë3o#•µµÝY†0ˆ°ŽVR€9ÊØÃÇI¬¾_¸F¿±y”¬ˆ‘¸é˜‘šï Ý |•s¡‡apa‰ +v°:6hU#à\ä·>¥ !9vå~T ËA£Äf?#~t )¸ 1©Y "œAv_€ƒIÇã]AMVº­Š\­ÊÊ㎠Ëà[«²ü€–·J+¯D8íº£…EàI‡ò½˜?ÂöU·£§ËÓ„Ï~œÝ÷÷å‹÷/_Ð'k¾â ±âÞ‹ˆs=ŽoÇ×þϵ>_M’5N3öuúóè?Ŭendstream endobj -609 0 obj -1450 +642 0 obj +1435 endobj -610 0 obj<>>>>>endobj -611 0 obj<>stream +643 0 obj<>>>>>endobj +644 0 obj<>stream x•WaOã8ýί¸×ÕÒ´iK[¸O¬v¹Cºe9èiµÒJ'7qZC÷l‡¶ÿþÞØM[²ôX@ E±Çã÷Þ¼™þ{S¿1zÔRR}˜}šu£ñ˜v3Ã?]÷¢1 Æ#| ¢I–â¿áîM¿ ÄÂKÄß>§suNñ€&ŽŽñ!õï»4IZq4Œâˆî\Й¸Àaœ*g”]*¥K£D—Ù»ÉÃQçj@qâ´{#ÄiÝ|™|ú&sd¥ó\/yçRå9M%¥*ˤ‘¥#•­uE••ts}OÚðŸ÷ä4YgÔ´r2%+Í“J¤¥B,lÄ'v©ÝâÖ8éO­I8Žc(d}6­ŽtI§Þý<ÓVDôuŽ}ÊR*3\(å( mÅýóŽK]gTj7çä÷–‘›Ë’DŠ ”c#r“UÜzœ6Ù‹pb¼‡Í&g 7UÚ¶­-©>íyz{´ªP¹0ùP¬uªtáa³s]å)ÍÅ“$Q5kŸÌë'—¶Žtðܹr$Sõ?Ð’A é ä–ÚcdÉêB(.`¸¨K笜žN©ñ³d!EAàÜ,Ò3Z;êTÖtrˆ¼cE1©*;¶˜B=ü¨éA1=øTXÒ™Ax†ø•à%Çõç¶q‘¾/–¿\‰Ä‘]—N¬Hg/*ô0ŒOÂ(è~*ÝRBsU©VÒFTkB$èSÏ=¯Tå^m’WŒ¨ï¾‘æ¬R©lV×+Šm!‘çtÔÅÒâ𞺠Xÿ,úÞB0›¼/•Æ&ÚÈïï8€ÊÏÖâ7]5ò,* ý©p=–Დ4–“7ƒÃPÃs á…) ‚³Y®ý2P_J,.×à‹ @@ -979,11 +1033,11 @@ E sWÓ–»0\íR±ŸÍšÃT¯¦¦]æM)œz’ä¡ò2…ºÀ!¥Bº|ž9Ï¡§À0jÖü` övíóÀÀá͈¸áó… m£k Ð=1Ð̘€p|íÞ{ùÓá_ÏókmŒáõ^þËqhÍóù-ùpCoôÂâœÞ²×SºÙ»›XwÝÚK÷x”\ɤrbšKŒ­nÞTr2/`1ô~Èø¦k3ë}ƒ|Ö‡gß ÀmezOš® ²G5 ˆC6Þ<÷J²&'Œ¹&‰üøÂ7] Ž¢Ãý(Ì=÷—Ÿ?\Ò­ÑðTú¨ïbÐ[;,ozø¾é;À`ÜÎñ=Ûúœê寣ÿR0ƨendstream endobj -612 0 obj +645 0 obj 1365 endobj -613 0 obj<>>>>>endobj -614 0 obj<>stream +646 0 obj<>>>>>endobj +647 0 obj<>stream x­V]OëF}çWL¥V q’‡J÷SºÒ½Ð6iQÕôaco’%ö®ïîÈ¿¿gvíKH€>´ ÀÁöÌ™3çÌìדõñ= qJç#ÊÊ“·ó“ÞÇ! 4_áÎh2¦yNý¤ßïÓ<ëÌ mUQòä¤ÎIÄN­µ(ÈòI•5™tN::ß"ÜE®Cº\æñmŠ „9xÎ?–ð#}ꦣdD«ëù‡)}ZÑÎÔT;Ïþü}HÎï IJ3Äó²ä[šÂƒ¥ØQ¡¶xÚPaÌ–„ç»1=xhªîΓ”³ÈQV…t=wg‡]ç…õuuX€Ë¬ªÇP)z&Ê¥ Ò+AŽ$Ôða~6it>JF4œŒqâÇJZEò/i€ ùý4™<¡ŒšyYÑhJsËÅ8¯ô:Tï6‚sq'T!–àÀh.ÚZeï¤=ª2åÞv~lØ´]ûY¡¤öÔýÜÜ;oï…€ã¼eC[ÛɽæüÅYÝÆÔENkéi)2PÀ’YáÎ1Ј4MÚ¾æFÿ¤É™Rú —ªˆÍŒµ2óÅ®‘EÛ0'Ñ „èÊx–Dh/^àwMN™Ð$ @@ -991,11 +1045,11 @@ gh)Y39 ±ôYè/B‹5.#;î õ¢ãêlCÂÑÍêf½8=Tl£Õlc äŠô– y' Èj«ü.ê”õÌ2])ø"–eå×Z:S%œ»76G+¸ÐÚ=»’ÕÀQÅÊÀÊ µâö3v‹%E…´ í‡F®5¤i,åÒCX.¡E‡12ñÿ,¤g?5É["ï8¯ý¸‡íyÞª×T^A°Ý?~jÇHfJÈXË„æô1T© Ê5vKøè7¤îF†¢zÜâ”ëh|6¼¸ÄÀxÝgÃô^ÜsƒdÒøl}–­¡7’2‹µV"q{ä_­ßxôU¯ÇVmÕ\‹Ê^¶Ø|W©LEPMÓдué~¨ÃžÞWÂ\»˜ÉלNÐ÷WiŒ»¢€Ib„Ç!þÜtF{ZY}Gñ| ˜#b\´¦zFê ©7âNBnp²+½'Ù–á0$èÉê°º•*X+˜ŒÌAtY(RÅMq[£È_ÐßÌ÷û/H©b¸6ËÄòzü#|Òì ŠeÈ…€—X*¬¼€¯0kÔÛ€»+‹‚™üØ$¿«äôR»_™Û½^ÈÓ ñ8@c†t’b¯½n†t8 öqç’ËÆ “#3¬¬)áð÷׳³0öð[éˇðçj~Fü1Ýž1fsöYçzÖKÏHú,I’'jGï’°œ¸“¥©up^®ÜóG®_&åÝt±¸ùtõþúf¶XüÒH÷ûfÓØE|Vȧ´ÀWœ,xÍú‹tïãhŒ¤²Xé˜ÿ†¢òƒ)㨌)ž˜Omë_¯2 Äþ(dPþ‹½“…\ZáåA¶á8‡i hY¯q©Œõ?ìig„™ø¬t&ÍÔŒÆ $qNÜ;0ÎÞ|yû†~µæ.£÷&«Kœ,ŽƒCüV7¾ÖùÏç›á¤Ÿ\âÜŠsͰÿÛÉ7ã7endstream endobj -615 0 obj +648 0 obj 1189 endobj -616 0 obj<>>>>>endobj -617 0 obj<>stream +649 0 obj<>>>>>endobj +650 0 obj<>stream xWÙnã8|ÏW4ò²`+¶ã\ƒ=à\‰'3öÂX /´DÙœP¤G¤âøï·š”r(³‚ŠE²««««é{êãg@§C::¡´Ø»˜ïÞœÓ`DóoNÎðQ?é÷û4O;ƒdÐOh±ž&9Í×ʬ]Yó‹§…-ÿ8˜Çþ qoxŠý¬5ÖójÚb™#a2ÚÙŠœ¥'o‰_>Òþvmi[Z/‰?q´QZ’Íɗ­÷ñ™44!W­VÒùpBfqˆÜÐÄJ(CœÍ0úÔ%CÞ<WZ‡M©Ðevk’zåð$áD;sÀÀ µZ{*¥È8(åŒãj2þ<ý2›ÌÿìC üŠnÆ_fƒ·‰R‡q¾J#`_îÂ!…Pš)Ð @@ -1007,11 +1061,11 @@ i ™¤Öäïsî„©ÂÚ•/"GÁG=\+øÁ‡–<ü¸ÄLë“À?…ønKåw/ßÎdbÈêL–·v0¾à³qˆ°háúÑAr[Õ–f$ €eÌ”2™±V…ŠÊ”Y÷¶¥æ Á ÑÂ:®X˜V°m™A‘!=c·ØëÆâ£ÄŠpcŠ:ÛxaÞ›¦œŠ5z׊[J [à ²'´®XÁ»0ÿš"¯@Í,†1a—.­àÑèw¶÷E¾X¡ÄÒÉò æ˜NXÀ!áz*kÒ0°Q°F»]FòyNA}£AªŸ†¸„jc‚@Á£wC¯¿„a€Èm2¤ÓJõ/ºÄI¤œ+³öÆsö›SÀ/:î·ýÆz4äⵕÂrdòÞ0‡œ[Âü5¢g I[vÜ’Œ(ÃVùu#8˜Ã •«O¯–ÖnÄEíÕÓ9êTþ=?æ{Nps?›ÉxŸh:ꡃU€k*Á¤¡ÊŒ¦`ÆêËR;½).—ŸhþÚ³›RÁÚT²ââ³4TrS„ ÿªÉè¶ÑÖç—÷‡“{By¹ ›1Õ¿U©¨€ «„n€1 ›Š—G-y†O¥_ÊJµÏåkZbO¸WBf?nM+räv¸$ðκéXÙU!–è7µ¾¬VªÃ›³úv089Mønð³ñÝŘ-ü;<7þ7w(Ž×‹‹{§C|MÈþ×ׄÑY?9ÇW ,?æ#p›øº÷7¡‚ñ¡endstream endobj -618 0 obj +651 0 obj 1513 endobj -619 0 obj<>>>>>endobj -620 0 obj<>stream +652 0 obj<>>>>>endobj +653 0 obj<>stream x•WßoÓH~ï_1êË©õ%iš–RZtèhË5©mì5Y°½fwÝÿþ¾™]‡`¸“N)µ½óã›ï›™ýz0¦þé|B§3ÊëƒËåÁõò`”hvñ4›Òôâ¿'øï4•üú÷Oi<¥e‰ƒ³³³lFË‚p`4¢e~4ÎÆ£lšÑkgš`šOT:[Ó›Û—S°¤èyetèõó'ËÏ05¥ñ8š:™œÃÐÑÒRç5>lÙ€vÖ*ñ¤•©ÔªÒôhÞûzu²R^D^»G|)žuùFkëmmGSUÔh|÷¹­[ a­ÙýˆNƧلÝÂZ#kýäTÑ{œÆ‡Íî´i|P°†‡äsgÚ@tˆƒéaF÷ZÁ ^ò‡®Ëƒ± ~s¤ò •ÖQmÝÐw¡Ró¥˜&3àÎP¬50çÔ+ÏÐ-Þ/Þ’[$Ü 6…Õžê._SŒLÕœ CŸ#Z$ÞûÏüÖ?fô2‡.¿©ÏØ}ªýÙì ÿïÚŸŽ»AíÏ2zeó/ðÿ/¾kP^§mÖA{[ë`jä+TÞSp¶ã2#ñ*’ÈP¬ KaÛâ”-û¯“ݾæ+MÔjìk`±Ú27—‰3d*[àïÐéܺ¢·t8 I  Ú ŠB‰0àljN5Ÿ4G²Ú„„Ò+²-T‚t‰/MÁΘ)‡…n¶àD¡ý!€éœ•ounJ£‹ŸüÖkÄØö›û2@šµ‚sYÐÈŽB/[¢Â”%8=Šv~Ì>xgšùfôV;F{B†ƒÀª^)Zi€¬Ñ+&´V(ŽC ,;4gÛ¨`ðœÊ¼ ÕÃÑÓ¨UÐ2èZØÊ_›º­tÍAAЍ¥¯ÊÀ÷J‡.ßs‰ÑÄê îåùæ @@ -1022,27 +1076,27 @@ x ÛüúN·KDŽ/dì#ч#Ï+3¡ÀꞀIMb޽1£”:ˆzuè\ƒŽ‚a¼·N 0f-ˆô ä¯v4“n!ÐâH9Ýý9Tä²Hó?¯¨¾·´à±¿HÏG ‘¨-³˜·L4iKƒlyà•„ ðe3Líjƒ½ °cì6&•³~úžM"9»ç0ø@XÕhÛù$qÌ@ Y9hÞO&–®òÒH>¯®oß¼½»½>&ùy=¿J?ßÝ¿\^c‹pñÍüÕ+É4¡”l@˜Æ¼°#Ó•©LH{ÒÀOÚq£©Ï/E°ñ¯+ŒÍôu¿9ö¼í)+4‹ûWÏÐýG‰¥‘¦œ+ JT•v¸Öêџʪ‚Q‹÷p¥ÄÍ&W̱ÝÆ}ƒY3úèqÌ‚óÅòãâùýõÇ›»«ëÀjûÛ¿¿i¥ÔÜÀ±H#24‰bXw^t¢’’߸ö• =4êQ¢*¨Ö˜Ù[h&¶‡…£WÖØíp6én0âÊ÷««ÁEºËgçß(qÜ».æ7—s\ ígÞº®lÞñŽ'4fã'ñÔI<öÿ®‘Ó‹Qö·QÜ™f)пþ'íÕƒendstream endobj -621 0 obj +654 0 obj 1764 endobj -622 0 obj<>>>>>endobj -623 0 obj<>stream +655 0 obj<>>>>>endobj +656 0 obj<>stream x“_OÛ0Åßû)ŽúT¤ÕKš6i‰4¦fo¼熘&vf»|û]'tƒJC(Še+÷ïïœüš¤HøIQ,åPÝ䢜|¾Ú ]¢¬ùK¾æM…D$I‚RÍR‘&"¸‘}¯Í~zrFväÏÊGN\"MÇÄù¢àÄÙug»G#„J×592ûc¬Ah·—ÒT{£ŸÀrñÌrGh­ÝA†!fz,NöÓØ<Á<ÍÄ"6µ}ÐÖ`K4Dûî^(kj6èå¡¶©[/bö×rÂ3"Ï2^—ë‚׿Ž#O‘¬6›¡Í ”Bà;ßÖᲑNªÀ»-…pé½o©óŒ%"­uKRüÖ¡TŠ‘³QÇÂzÀÖánÖjf~#ÇÓ}ÂV ¬;²U XyÐÌà_-üÝÙúšV¶ëˆ¥ˆ²½!~­®†D?FÆñ"áFeëí ×I÷·ê ¥â8,‡ÚEEÆ‘@O²ë[òì¾K°îùµ>«lõ}Ö/ÎKóBD;³[_Ùv{~sqŽ[g¹&¾XµçƒŒ6‰Yó1í}“/׉ØðŸÁ>+^œócòp›ûendstream endobj -624 0 obj +657 0 obj 452 endobj -625 0 obj<>>>>>endobj -626 0 obj<>stream +658 0 obj<>>>>>endobj +659 0 obj<>stream x¥V]sê6}çWì#™)66ÞhÚLïL“¹í¥s_ò"ljlɵdÿ¾gå0é¶sÃLléh÷œÝ³úkÑŸˆ1Íæ”£7£Ÿ7£i°\Òå_µÇ,[̃%%˾Ç1¾V’v¼/ÓÿÃòðéâ)mv@Ÿ/–´Éü{ Â#>`2‹‚˜ßÆAÐz/uÖ®I(ŠÚ5ñ‚Wl ©Lj§vgrIoòL»Z§N-r*dzZÙÂ’ÙýCD'9CR‹m.=B&ËÜœ `ò–>>DÍš¨„%d¡=¨<9ÄÇ@Bg¡©,–¹Ho(xÙ„ñ¬:D¤Mnöç #bx*¾JГç$O¢PZ®ø54œÄíûQH`[“ל)0Êšý¡Õ)üUéúD›ÇÏá§Ï„„Žª2Ú§Á@ð±²1åßøÙçs Œüj+3/¹Ò±’s Bú[Ô_Ì;m+¨Ï‹;IÀœÎè€W ½aš¬óÜû7xÄb³ýÞÚ#x!†‡Î>z«•i])w&S2]ƒ“)5z§öÌ]ƒ»ƒnVÊ"—ւضˆAò Ëäã-J«»‚!aWí÷ÍÖdqÑsÍ™ël"r£%N¯Žè¡æ¼)*«%ÚùA¯×z ÉˆfÁ)LÐÃ}Ê™)”+d±í1[ý·sžÈÑÀIÑR\«~uÂO 0²v•Éó¼8mà½åL)AË$Á ÀÎ_®›}¶xæ¨Ì‹ŸÄÊÉåïÿRí0•Í—˜Q ÎVí·æ*“•¡E³²yNh2%l‚%Êp€óf´lP´°ôÒXÉfÒ,ìjñ›d 5Œ¶-+sÄ4Už‹ëaÑB²5/[¼¥Ì6¶Žfp¦Ë³s•l „@µè¨¾[/Íl§R¤oÒ!G#¡©x„²©ñ`.g«@M7BÈU ¥©Q.ÎX¾ŠZc“>¨£ƒƒi[»Û +¤Â3†Oy–vÑ:MÙÈ[›êbÿàòÏëÇî7®+ƒBÌÂÎÏD³˜¶ ùÀ#r©÷ý½¥¿ â8Mw.9/l)Q‹Ø *1Aw¦®èuœ¼ÞaÎ¥ª@æ¤köãE¥Àm ;¶g¨–AŠ×1‚,e¥Lözç‹™|q­Q›w%àd.=EáµMÔfX'-Bàö‹KJ.Ç‹ ej¯péBn#¾¡ÝÊ«°S\ftÓvDÉtµ”«©XEñj–¬îç¼3|Z^®m˜€h¡ÿye¼\Ã’å4xhÌvÉØ0¤ßF£<öendstream endobj -627 0 obj +660 0 obj 1213 endobj -628 0 obj<>>>>>endobj -629 0 obj<>stream +661 0 obj<>>>>>endobj +662 0 obj<>stream xWÉrÛ8½û+ºr¥Ê¢Û’œ99[Uª&‰'Qj.¾@$("&-ëïç5ÀML25–7’zy¯_7\,hŽÏ‚ÖKºZQZ]¼Þ^¼Û^̓͆ú_v ,›ß&+ºÞ¬ñÿr™lÈJÊyâ˜î–ÏÞ_ÓbAÛ§¯6kÚfáùœ¶éäÝ“´'ÒÒ}$¥½´¹©¤ªvž ñ$Ihúx÷†D–Yé\BwΙT /3:*_‰ásò…„+•8ÑN’Ñø±/·ß/æ4]\%KŸT >Ü·'Jœ¹ ›”£OŸ ‘”Â+£]¡8Ä¥ÔìE¿WÙ¹ÙKeI®N Ω½®¤öndXÀ®°;åb6–2åR+ÙßPš´ðµ•ÑsTä`'œJ©”O² 6ºd¥¦ªj­Òè+yñ(JN^í”ÞŒrˆ‡ }U+ùnŸˆ˜uäm_š: ü¨%¢CÀ{©¥ w­¬„ÒŽrõ r„‚§‘Áƒ°^¥u)lƒ+<» qõ"“2[…0œÔNåÖTÈsKJh±—œY:Hë2õêI&#»^_0FZŠ[LŠhŽã!uúŒ ϺT0«*†¨?ìrdÔ ¾yu{|ð (x£À¹¶F3/ºûr{‡òÔº¿\%×ÌÎ f „sH¬€q“‚øt`yC=ð2V€ÐGZ>-B°Í›Ô”¤ªC’ˆBÈ,86¦fð•ýzÑ¢E%_°/ @@ -1051,11 +1105,11 @@ f 8‹)~÷ÎrÖriž®ŽÜ‡"2R·,þpgr”Ч³¶€T ,Ô6RΞU!»LǃSpMdõ ½Øltyú“í)”ÖQ7âÖÕ+kãßÖ/åù«óïÐ(bÙÒA¤€)J”fŒF¶ÛuÍ ^ae£?KLÀZ¢¤é³x‹lvP¿/ .®‹ÜÔ: ô&-‚ß´zžý¥týLMEBà=p ‘xÆį«ºŠÂÆuЍF‘s<ñ ¼óÿŽÚƒâcl›üw¹`ÉAÑèX(¤Çž5£ÇÍÿ÷¦[1L̓æà Y‚„r¶¹I ïuu îpˆ³n 9`x èêŒ{ˆ|VÜ—%jq,fè‚Ôhq,®öŒÁØ çxŸ„*ŮѦ0iÍéjsƒaª™«0[ïa¬š½¿¥QW7<ÇôCÔ2áOC„E³lˆì>%¬®‘'ý(6]ò(6é³ãeYÆÂ¸\ª ÷ŠÁp8m»0¬nµÓðdÀ¬ê0k‘àÞ[½w£i£âÓ5Æ0˜M–«uó°u“Ÿuƒ[kìaâ F°Èé΂EöºÂÔeCHj'˜@ÀátKØ´€b¹½z{ Ä^Æü§ƒ±Ö?jQª\aG.²Èùt˜×³hÚIówýœ=;(…YË z3JŸ˜Š_¥ÅÀÜÛ̸Â=F%Ä8JVŸúN§jÞ íbY£.Íc’ø?14]^Ý€–ÿMÐå|FísŠ^ýš¢œÞAÛæ4"A;A,jéú|(ãfB«$‚cÉðÏI~¾çÉk\àfxOyŽaRf }S˸{¦V&Æ”0X ¦™[b›¡‘ö¾Œ«Šm£—¥2CgnûÓéÊ` ¸è¼­S~/€v‡úc±¿e%X E7qj¤æ+Ú ÑåNé¬= ïo\aí²ª.½B?Œ¸·Ùœò«ø’„¤jÚAËÚvÁê««fº/¥À¨neÎC_(âýqé¸Òá®òÚâh¼ûH4ŽÒ…†Ö0k}Ý¿Qž)ߦQŠÅjðë)‹EO­¯w_ßñ˜ò¢\Òš‡‹Ð¶8¼iÜ5Û&VމÀ+¯7óä6*Ñ-_í¿/þ0WÈendstream endobj -630 0 obj +663 0 obj 1684 endobj -631 0 obj<>>>>>endobj -632 0 obj<>stream +664 0 obj<>>>>>endobj +665 0 obj<>stream xWÛnã6}ÏW ܇zÑD¶¼Þ8»oIÛè^ŠèK€‚’h‹‰TIÊŽÿ¾gHÉV”¸ÛHli8sævføÏEJsü¦´ZÐÛkÊë‹»õÅïë‹yrsC§?v‹/sZ¦i² åÍ Ÿé Ÿ­¤ Á[è9þüìã{J—´Þ@ýõ >áýœÖùt‘,’eBoÖß/fÓNl:“>ŸiçöÊçe’½‰KJÓ¨çj±‚žéºTŽ6ª’!oMåÈ—’Dî[Q‘µ.gªÖ+£É »•Þ%´†L<æÊEU¨.Êî¤%“}—¹'×È\m ÀÇ Ç0æt•¾…Ã0¿1UeöîCD7§÷ .¥«Å»„ÝœR÷ó½î«BhŸ‰ö&ÆÏé {s/íNåøBÃ^oÔ¶µ`ð(9w¾{¾H“롽F ÌŇ)4Öðç”Ðmå¥Õ0·“$q%c)¨1¶ Ñ"Úw1#aeˆÎkžÆCGÛÑrp‘F^«B4´W:Sº8È•¢0ûÿ‰~kMÛœdŸ»:ŽKiœwa.²«ÐÇ2x‘£sáam/Êñ?cóÜ~´Ë!0Î/T¢®UAEÖùq ×9tZú½±G§8ÄG½gªC"™öx‚‚õpæL>k¼Éц]äŽ6ÎÈÛ&ÄøÇú],ÿ^ýs<³=?\q^ÇýºA€Zëä%I‘—d6LNR-óR`Í}ÿO«@x#|d®4V ÏL!rU)ϵ.t1C¹÷8¸¾¡ÞZ°EuèìØ¡oNYôM L>ZJÓVe’´ñ²ˆ–["ƒêr€Içg5‹-0·¨#œí/iýë·Ù§o½4C¡jŸ S«žN}V·z@j®…z%ø«sÕ€9$pŸxTzKFƒ÷hjØÉ‡=Œý¹u&Äé˜f™Óçhܪ"Qô‡Òí¹¶iŒõ,ä“—šEpC!Þª»¨Rä}Rzc…ó¶›³c&iäT´ç•‚Ó.å‰ 3ÊMæ…ÒÃ!×>ßÓ_à07}‘þîÓ×ûЛ ÂI·Ebp’'…¡-+ð4#Ë›Vç<Jã@1ZÊ"¨æ3ä¢  ò%‰AEa!æ QT‹Çp F}ÑÃTÉÝH|×M¼)KŒôrV© ŸÿUºÄ–:µÂôáMœwð¨­<'âIìKhŽŽ{ŒB Ëv‚0t§lg¤œ @@ -1064,11 +1118,11 @@ M 99îvL­­/#ÚôÚ—#WÂ\(R,l…0Jñ Ô)âä@E Ì,nYÌî¨ZNzŒ*ÏõÓ&w²"¼À[w+tŒàÈøÐNƒØr‘¡ áìqôÑ8–,Bd% p€ûq ò6Ò<ÜC"Ì‘eø†Ed§˜'ÁA!»qØÍBìx¯‘‘x- l³Ýçˆ3ó="ØÀâ%¢¿ÌÜt¬Ÿ^¯’×¶4^Sîo?ßÝÒ7kÂýè7“‡9bÇȯ¢øÕjÛ]Ñßî^¿ü,WKè r霃¿þ¼ø&wÂendstream endobj -633 0 obj +666 0 obj 1574 endobj -634 0 obj<>>>>>endobj -635 0 obj<>stream +667 0 obj<>>>>>endobj +668 0 obj<>stream x¥X]S7}çWÜÉéÔÆëP ´3@œÔS ›Ix‘we[aWÚHZ ÿ¾çJ«µ³™iši°¥ûqî¹çÞåËAF#üÏètLoN(¯.“ÅÁhxvF»»Æ/#úåô ¯Çg§xÍÆüŽ•´â+øvºœ?ú0¢·´XÁö l-Šðñˆù!µÿîµúÒHº–þbz3§kQI÷ëëÅçƒ 28Ç¥îlº3;¿ücz=¹>ŸMÞF¿Óo4—öIÚðMå’”#Ûh­ôšŒ¦½ã?bø þ(µ´*§™È7J#NÄG‡)\_^ÿ€Õq÷Jè™Ð)j‡àÿOÔŸnîþüxwsû.[rÌïM%ÒΓ k¶ðÐÆ8Ά'û~´¦©ÿê;7£¯  X¹VìN´|!Q–TÉj)­#³¢îæw€êνËò½D.öÖ”%[;b¦”f²Æš»ÿn³`›W&e›°!ÙÆT#S-}dÃt¦û‚•£Ç”eLùAFƒñÉpÌhO=¹iJ€#I”üFø€S¢Ræ¶PâˆT–ÌV1Ï G5*Š÷I,Í“Òbªó—¦'”;añ&ºÍ8¼MÞÐâòöhzK8é<Ê#¼2ÚÑvƒ’ŠßÀ/Á¼{A1+E¥4êj…7–¶ e¥B"y¼.Óáì‘ôùÑÆ8ßÁغǕöÈûë9‹¥p>‘yLˆ¼ çL®ƒ²U~C@BEa¥sÃÄÜ“á1cyÏ«ÆKµQÚ3ÃòRXµRyH«õÏ!L6Ãz«søuÔ»²ÒJ•Js‰$qäVæÆŽ õ£Úš'UÈÖ|8•’“#ÿR3D+c«ì!ñÙœ>)] '´’Úî¬%ÜÒ¨S ~z܆¹`É%}àû=¯•x¡À)) Y é\“|U pÑ·ìˆoD 7¡äé}ÑVp8» Rf)é9íÇQI;$p{…„¢³j‚×Ö‘!—@a@Ñ öz P›ÁbÑ€Á(ßäï÷bÁºÏ@-â–Ä?òsXÈ0ºû—&èši¡rüz†–[ì%©0dP#S6a(W’AQ®Â´£y&[\„HF}VeKλv»¶„Ŧ@ã`™mç=·ÁžJ†0,Bôáa«ßÉ‹q|tï=¸}xK–Ë?cgç=s÷¤:¾f±ó:×¼2\bµ=³[¡ŠãS^RÏQÍ=±èp’ÈàùH3™ñ„d0’–Íj:uìæLömäÌåL>£€´‹æÇô¶WÌvÏÂL"#At‹¥ž’ºðΩm_xMà‡¡$Qð%¬Í£:A˜À°yÊFƒì—žgìlç » ¢GVèúÖqÞoyf™¥ÇÉiï6ŠavÞWÖT!áTÎèr¤€*eCkƒ7°­¬7½XQCˆ¼ª¨5Vˆâ߸×Þn+}8åÅ4€i.â"ÍvcHáÍCµ”¼n }X“1j—¸‡í(^ß~ÜÃù\+DÄ^>œµ ÙÉéÿ*rŸÇç糋sºµæ3V <ÁçØdµs™ï âñÁé<)¿KÉãÓcüé$œÍ26€øëàí¯ˆendstream endobj -636 0 obj +669 0 obj 1999 endobj -637 0 obj<>>>>>endobj -638 0 obj<>stream +670 0 obj<>>>>>endobj +671 0 obj<>stream x•WïOã8ýÎ_1*Ž•hi»,¿´:©”rW ºÍÞj¥J'7q[‰ ÷×ß;i §À-H¥$¶gæÍ{3ã{=êâ·G§}úxBq¶wí¢½nç쌶Åÿt©ßÇÇñÙ)~:ïô©´àx‰c6X~t}L½E œ~rvJQâßw)Š„Nh‘–v%ñ·0¹•¤XÄ+yÈ_5‘Ð$œ“YîÈ’ÏñJè¥$A™´VàÛ“r+¬Ž2ìSšŸ¤)Í%Ùrþ·Œaã‡èï½.µ{ái”8•ɶ)%2kÛ!%/hì~±¤E&IYRz×k`п*¤5ié”k©1eÌÙ2Ž¥LiŽS9ˆÚ™XèWƵq@ËæF'ŠV0†5ì/(­+„SzI SPiea©íÏTŽÝ„ø ;Y(ëTLfá­å…q&6i§²Õ?és <¹Ò7¥ód Ž§Ê­\"Mù™|™Ò0ŠªÓ&Ò]Ž¿L)„ìÓÁÆcì@žZzÅÞKšŠl.^…(”êQ¤R»p$6¿8 ›ìZÞ_O2p£×Ev§˜]5£Ž®Ï©‡h˜?ŸNC`[õ;Èiðäæö÷/ÓhJ •Jvh—xí>xÀ~Ïî”¶DDkä1!ç;XM":†Hõ»à´òy<º†D*2oè4¼˜Í¾'“h6›~ŸF£ÛýÙìê~üçè~:›¢áKo@ê„b£PÈ0]Æw4HÐ9ÆË]Jj0ÊAÉ+¨s¡ ˜3¬ÔþP…Çkã>ü\`Xf©Îµ·Âƒ'¢ò$yÎ\4…B*eòš]cP}+æ£h,¥êA^ÔŽœsÒzÔî l¤êgŸ†&_j¹r4;ˆg¨w~~F·*.Œ5 ‡×E^+Î8u›Í5¯Ÿ-!¯‚¬Èräx—,¦„æÌ}Hbc ʰ4L9>¸RÑhÁ<Ê‚¢áÝÑøNCñƒj¥¯ó³¦MσÏ>#>„Ü{ä-Ëg›i9A fl²¼D à¤ÙƳ7ñÀW¿²C4B$[¬É®L™IÕòGB¡P*0J-“à ·õlç°<q²;üMËL*.9›44:›¢*̾Ý`Ñk~ÖJágn£µ2G eÁƒ h©pÑ qØ®³â˜K­ýÖ¶â6ž Î-¥–…×çÒ”Hzé颾¢|›, \³2¼DKü¨¾Í‰œKÀ6ûИŒFÇ^”;F e~aøž¹ÁÍ`B·B£›Ôïá>Çœ7ù줶˜/Ü~_K¶Ñq/öý»ûÑ;+®¾Ü^|NL†Búë;KÇ“áÍ׫}f·Yïm¸ý6žü5¸‰F÷“Aôž'£ÉÕÿ];›uŸµF¹ÑF·óBißð7sKž›ÂÍ>4EÔôœ®7à ½®d^M2¾ÆT³F¬zаÔb˜[aЉØÛx:§7”Ðe#/ÀK‘x±ã ¿ö]Ä º\C Q¦îÐoSL–¢ùxž‹6G†A @@ -1095,11 +1149,11 @@ h R Í¡»NÙ–õFL‘ HF'mu 屑 ]ŸU——ÞÉI§G'ç½Î ÏÖÓÁíå€î ãïËW&.¹Xø;!ïk÷NN±¼}ÚÇ¥=9xãÊu|zŒiݯêõy+îvìý Ì£Åîendstream endobj -639 0 obj +672 0 obj 1741 endobj -640 0 obj<>>>>>endobj -641 0 obj<>stream +673 0 obj<>>>>>endobj +674 0 obj<>stream x•W]OÛH}çW\%›• $!å£o@Ân$HYânµ’¥jbÉ´öŒ;cù÷{îØqZïBiilïç¹çžü8Ò?C:ÑÉ)EÙÁUp0 ýósÚþ²¸ÐÉè¢Jãó3þ|zÞ“•”ð+x ;Í/œ?¾Ð lŸÂVûÇ ¢Õº´”$–©¤ÂÀ’ˆ©XIJ³•q…£Dá+£H:—”iºîS°R޾Ë5á¿RÇÒþ|;ÐÑ‘ÂÃŽá0ÌD´RZ†¡[»Bfa•ÖJ]DFÖ¤Nx$í“‚ý0L…΄ækiÃ0Vd²O4\;„ Œv+a¥kõ©´ßÊGå @@ -1113,11 +1167,11 @@ l šG ßcùy¥@+ÊUý\y›5=Õð•繉Ñúu{›¯ û†Îƒf¦í98P&ñ}ƒ!H´\Z샨£° ²ôyòMÍ‘ðwŸŽ—ªÇ5uWŠÈ3*Òå,]¹ü&#!¨J†yE›ü>óUõ-¤nN¢?÷*ÏŒ+}¼õœïhÆÅaÍ'<‘·w· ·Pã2úÎXGïÐq–¼;…8¯¥³Ø”à•KàýU9xøV•¾ãÙ¨”´² …—a|Ï,yÁÝël—Ooc=ÜÚìzbAcM™ió:ŠÅeÞ¥ß-ì{^óÞðô¬Ï߬ñ¥wçÛïâòîê’î­ñ]™˜¨dnðXçôª·Žª×z¿dëñÙ3Ìf{Ã~ ᯃ§Ç•Ìendstream endobj -642 0 obj +675 0 obj 1654 endobj -643 0 obj<>>>>>endobj -644 0 obj<>stream +676 0 obj<>>>>>endobj +677 0 obj<>stream xWËnÛ8Ýç+.ºrD¶\ÇN t‘ôhÓ ìA1@6´DGlhR©8þû9—¤YMÁ4¨a‹ä}žs.õë$§ þrZLéÍœŠíÉÕêäÓêd’]\ÐóGs:ÏgÙŒf |ŸN³ j$m°+‹9~Æ•|Ša¶°‡~KùŒVø_àKÖ'´*FÓìMvžÑë›%}µö¡­_¯~žŒ?Ï(Ï㉳é'F—qÏÝè‡2¥Ý9º6^6Fzº[IKÙ<Êæî59|Q…$åÈW’ä¯V= i<ÙMx@ͦÈ'“|Œ)¹Zj£dI7W7Kv=¡³üM6e—w£鯮¿/]d”baW²!çm#ë±8¦¤ë[e‰‡¾ž*ÔÈ{å7®÷$(%3p\hÅ“Š!¯>ÜŽaÎIßÖT Gk) Ý«G|®–Â!=#c…b%ØÿeôŸ%ëÓ9Z‰´V– k6ê¾E@K±] ò69nCJ‹«·±ZÛ2÷T‹©!r2R–œmÔ·«ó¸¶’áƒáµË C qÆnœÑÁx¹äÐ)®7Îu傊[îA粟q£,ûX‚ŽVZa_‘z½°úrœÞat'ÆfÀE¡ ×ê©®‘ºô†]FjçëÌx’r·T—[Ȭ Wüª>«6ÜièªÉ1 xÓdbQî“BÄrýxÍ QâÌnÐ ·À†|_½~þ÷µî‡Ì 8p 1BWLm¾¤° E;ksÂή8§¾*#σâô>z÷ä¾È"¹ÆÙ èÜܾ|m‚ 2¹œX,l‹Í“+‚h}+Ó-©·_£óÜe“L.¾õtòØÝ(y…íZ ¸c œX*ÓÈLƒ Ë01˜U±¾ÒÍ@†Ábøº3’$O§¬ß­ù.ßãè:φn¸ð–Ë yJkž{ÃQÆ‘ÊÎK¥ÆRÐ_ÛÏÃåqW™CY¸ÃÔˆá¬nGE«%†|ÿoÂYñ¾wþ?@WÒÿ9–óØž¦²ÖÉÿ®×èx“`Õ¼DIß{ß±e‘EÜiôª´ö¹=ô»­ÄR|§e&Ë`Âý¿Âÿ$pý•#¡;-ÿ5àµò_g±ù2ak\4 ~5>ð7Œévû8ûýKôŒ}]½_ÇÕ2]®’ÿYY„úéíÃÝ[úÁÙ_ ìto³¶‚ƒþ†4 ǧ«™l£ÿï½ þó›Ø|Å€é‚Z~¼øÚÚèÙendstream endobj -648 0 obj +681 0 obj 2036 endobj -649 0 obj<>>>>>endobj -650 0 obj<>stream +682 0 obj<>>>>>endobj +683 0 obj<>stream x½WMoÛ8½çW |r‹F±ÇNÈ¡Ý6ØštÝ´DÙLDQ%©8þ÷û†”äXMŶ-RÙ"çãÍ›7“G)Mð7¥Å”Nç”é£Ë£OË£Ir~Nûv8vzšÌiv¾Àól–ÌÈJ*pŸ¦i2mß„Cá lá%ô?`èäjJiJË~çç Zæáý„–Ù¸qÒVBK*å“,ß,ŽN®fíé1ÕÂâ—–”#+¬,w„sURæ2Oøü„ާsD¶Ìǘ-ÞÚw¸çÜÖØœLEwןÿ"·s^jG¦ð¸­Å£$xÆGÒêYæ” |Ê6p—Á›Kˆ–¸ÔRTŽüFxRÁ ")Œmݦ§@nÛ²ìKÐ7Uåfëè♲RÉÊ“7”™ª’Yxt+ôJ. R\TÕ'¥°äå³'Ñø n©Lxeªwð-)¢Òa8î’Dñ*€ºqžVî‚w¶¦Å³Ò¦ªÑ+Žº ¦®ñ (¥g´·•mZ¿ó®™iÊ<Ʋ¯À]ĬD:л6^ÜAâÇÐfsËÈů¼¹âœEI?ÝÐqøÄñevWûûñý›£ü D^',œÓV•%Èëš’K9ˆ*¤®*'+‡ždŸ ²r”)¬Ñ}q¹Ü=G‚eQ:³7O¥©Ö€±4kÐÆ+a(T~àz#Ü&RD×MÀ Þ¥Õ`Æĺ¢“ó–)#ªœÈÛ¿Ô ž¤Õ.ü×€<% Ò£„À»4à(~?þ™¸À$3z¥ªÖY!TyÿfØVKTl%A$Ss8\‘ã™­ãYVbU¢¦ ‘±žû_…šÁk·#JB#¸AÛÀu ™'è5~ƒö€ã7V¢-MU¨ucCŒTçÔJ•(P Þ:Ï€êÇ¿±Ñ p:;MYº‚œMñÔiÖÉÕ¥V¨ÙÅ"´õ^£¦ÉY’&t‰ørÛ“àzÉ5 ãA˶Üf§{%cbÝ·ªâ7& ŸLùÔÒ_ä‘ý}Á S–fË¥îEé2¸ô*aX¨P¥ ž\Mè‚Háê,Ê!µZP^Ôâ’þ–®¢Ï¡u§Ì«üŽ._¤‚ÒÁ¹®²]3_ÒèZúŸon¿³ 7Å÷¯qÌáÍ£löU'¿5´»»ÊYþŠgÆ [h”¥Ê@ƒÎ†ièßGP ÍB5žD© úáxB7è Ö—.ÑV®@+kŒU¬h&umÍ|£«`ƒí±óåE/;¶F]¬Éð!j´ ²7¢]ŽPZûSÏe&—¯5¦FuìAô‹ÞÐ8äï€ÿÜsH À ÂSl®hV g0³â” ÚYËùΆ½VŒ­ÌºAøH"ŽdN¡û¶?Í_ªˆŒ•še¾½ÏÚôà>„i‡0;[ßl¤·ª‡øÐIøWbþ°A…Œ@ˉv(ò7¡Ð±p½Š|‹*BÐðX÷ÞÅÀ;ñ‘Lƒa°H1“Ö ´Ö~$r2à öÃQ×yÞgJÈ•Õö¦Ý°ÄwqÛ÷ºÂ¬çä±òG£ KL'ü4<¼¡ó€L`¡¹«Ô3‰ ³«K-“Qf"¦öÕ ã ÈÂЊ£cŠÃnmy‘ò<£˜/<=Ø'¬àì ™‹[ĻUÑéÙ¬_ý~¥¢Óé$ˆÐ¡ŠNú»Wd'†”ìvC§ÐÖ^†r£QNèßêiÐÒ¸:0:%åýîÖÑ} ¯è(öÔǵ5M Áq¿@¼ôó•[}÷´ÝwIo!(-s$*‹¤ÑÛ†íºÑíz:Efg‚︰®2câ"cãÉì-æhƒî¬áâ ¬s d¸8ÒvÈšóÞ²U îå®—ÃîùübùŽ<Ço¼§¯Öýûh²q)Æå8?^Lñ«O>þ¯kÅl1ÃÄ&Ò9ÛE[þyôøfhendstream endobj -651 0 obj +684 0 obj 1525 endobj -652 0 obj<>>>/Annots 32 0 R>>endobj -653 0 obj<>stream +685 0 obj<>>>/Annots 32 0 R>>endobj +686 0 obj<>stream xVïoÛ6ýî¿âÐ|ñ€Z²äŸí–I“t»›C7 ´DÛl%Ñi;þï÷Ž”,ÇHV` àXy¼{÷Þ;~oEÔÅoD£˜zCJòÖõ¼u;ouƒñ˜šr…‡.ûAŸú㾇ø(%-±´KñÉ›¨‡}þbá-8~ Px×§(¢ù’ŽG4OÝ‚.Í“ö´ »–t?£ÏªHõÞÐdN©Î…*(Ñ…-u–É’¶F+rKg²Üá?÷¢+üiJ‚r‘¬U!I$‰Þ––ºäÅ?Í¿¶ºÔ‰zAŒSÛ3‘/ ~Þ%UnЍþGÕû:w~݉‡À&òѾ&ísÿ¨Ší#™ƒ±2'ù(“­•o«Ýƒ*z›L¾Øcö)uJútóîŸÉÕý-u¾ÒÍôþêÃÄ=>“@JÛϤӉǨé˜Ðƒ‘¤—(YÊuêÄV%Â*¤šjiÐ¥ï[….â jZH|ÆŠ"eJ…z<àgôC—)¾X}†*ªR«Q¶*&‰‹~ ²‡H¼oÒ‘)-®™¥Ìµ•ÇÞß¼ ˆæ\DÝÈDØ~vâ"ÓÉ7Aþ›RîP$ez¥ œt Ò\¢cç ­’La[”Š•!³Mք쌴–Ù…õªØ‰ U˜µÌ2.¹âPxÉ8 Ÿ°)”6 }O}ãjª´ '•‡€ÿë¤U+"bYüñ¾Õï ƒ74ŽÐœú£XåŸ2š± »xäþž*å fV–Ú¹s½óÀsên £Qkˆ;f˜Ÿ‚È“>—ù¨xîpiE_¦#l£[—*ÄÛFÈ”ÙÔBƒA€¼{œ¶{hÒ ž$=…TwJî]¦àŽáà”¬Å5ùÕoÓÏó)„Ñ'ÌÚ iÐïïFqmF+¼{Cd¹„¯ ¢®Shc0q0z½ÓÅR­¶ ½Ç}G¿O8Éñè>>>>>endobj -656 0 obj<>stream +688 0 obj<>>>>>endobj +689 0 obj<>stream x•Tßo›0~Ï_qêöÐIÃByLÛU{é-H}©49Æ$nÁN±IÖÿ~w’(ê4 $ØwßÝ÷Ýç·Qc¼#˜Å0IAÔ£«|ô-Y–ÁñѬñc ÓyÆH²¾O&,…FBI¸ˆiÜÞÎ!Š /1{šÍ /ºõ1äâ2fS6a1ƒ»%<)]˜½…ûî¸Ø(-a!„iµ³_ò—Qx›ÒqŠèyq™o¤•À¼‘o­jdFWï°ßH K^¯8( ­Åÿ܇ÂÔ\ia´kLUɆü”¥lÀp郂ǛëàûÃSþ¥i} A„…fm®Ž«Ê2_ÙæÔ_A<õ…A}"ð†•ÒaÉ+,9( ,ä.ÔmUÁEíûý¥y-/žŸ?ˆH;!“m¹µ{Ìõ?1¶^ a‚ú  :•QÓlŽx^Óu$íDºIÀé4=0epm´¨Z«Œþ@)üÒK±mÌN’„(+ù[­* µäÚùf‹<9Ó2ÖÑŠCxÐyKÇuðÊàX £;T,€{v+…âpáŸÔÖR¨7”eÝpMéE#);©{ýX±Ó¬ç½ÊÃâÄÀýCÐ׎ÙÝÞ4¯P™5ÂÑ.%¤ýÚõ¡ôšðôzb_ô…˜ø‚• …ûœg€Ø>ÎZ}R°j(mä¦}í:ð3nJÀ´òÔ:>d¿QbCLTF 3~°ÏÐNüÔuœø }Û h{x+zÇ3ŒÉmŽZ>Çé¬_IËÁ4öӺЧ%¡›'ìw˜à>>>>>endobj -659 0 obj<>stream +691 0 obj<>>>>>endobj +692 0 obj<>stream xW[oÛ6~ϯ8@6ÌùçÒ{h»õi:Ä{ Ñmq•H—¤â¸¿~ß!EKV4,› (5ÅsûÎw¿Íi†sº]ÐÕ åõÙ‡ÕÙ¯«³YvwGÝËnñcF7 ¼–w·xÏ—ó솬¤ öÎh±¼ÊéÓõ"[ÆOP†¯°p|AÓôÓ[ZÌhµá›Û;Zá;VòÉÇRì¼´t•ÑG£7jÛX¥·ôåýgÚK…rÞªuãeAx¿Yýu6£ËÅ:&¹ÔÞŠª:ÕB‹-¶ˆÆ—XU¹ðÊhÞͶçØÎ¶/¯æð’WÙ<£{Q¯ ]°±¸uIóy»uqËß“nê5Ü3úC«grçeíèa"·ïè¾Ñto*a•{xsAÂÑ^Vÿ…DÏx>ÜÿBQ+xɦ~Sºy¾ möÔxU©ï’·¶aÍRXýR5Û­XW’ÞŸÄCôÙM%Ù<|~xÍ9”øyC;kžT! ˆ p¸ °`¬úp žXéLcó¡íÜTS‘“öIåÒeôÅ*$BLŠ?MÎø2*ðS!såx û'4ü@^5 >!FCA<ÂG;áÜÞØbw!¼X H?Lb>ÀºÉTú|¤‚ÌôSÊÔ ÐÞ4Uþ}køÉn,‚?p±çˆ ¤b„°ck2éKáØ!ìô‡g÷M^"Þ¼4@§µ¬ô“©å‰ÕS³À±äѬpï(y‚¬ÌVµœ=†w1ܱ¢ðbüÛ¿Ð5 ˜fíÒâÌÌCÙ…( @@ -1187,11 +1241,11 @@ x â|µŽ3ŽPV“i<"ÏåÎæPÜ™ST{¡ïDý¸Ûë̵{ŽôIcR½åSaŽƒç:ÖÉùàåå<›¥`prrýœw8›Û%%´ŽöÏîO©ÅU ~syPïiÛB{ÊPzhCààZ^#®Mðè¥ðy87’%J-öÄv<5»—ÜC-õü®…ª^J¾Æå6_ä@mœ¥uq=€ ®ç¹i´oÍØœò8–ÃðyUËó'rãA÷èÒÃÚ½|¦g,Uã’ç C_v ¬ myzéðùñ<†ÇÌæE[)æ8²èíáç«`éL~…óÔ»Óø’Kä¦bиQyfïÂ@€sØÊ]%òÐJê8Çd(ÃÓˆ>=Aäbl§¥óª)ä;vx¬ éZé)Š|ЧéLz_ýJpƒx˜ÏÌM!ǵJÕʧM¡÷RÌB:ß=2Gƒ$/XáÝéްÎÔ˜–~F‚/[œg}oXs…ñ74ôàäHD]é¶Yc¼ùÚÅZ>>>/Annots 35 0 R>>endobj -662 0 obj<>stream +694 0 obj<>>>/Annots 35 0 R>>endobj +695 0 obj<>stream xÕXÛnÛF}÷W PQ‹”]ì}pàºPi­¾hWäRÜ„ä2»¤dõë{f—)*6ŒZeqw®gfÎèËÅ”&øÒjFo–åïÖ?®/&ÁÕu/f‹&4›¿ f4¿Záýj\‘‘”àì„Þ\-ñúµ'‹é"Xž=\ƒêã T„w°dJë-¯V´ŽÝó ­£Q)ò?l¾)…µÕ¯×Ÿ.»yszDûTE)ÕVZªRI"ߢXTb#¬lGº¨„*ü‘{muRÑýíœd™CYɘXÁ^›˜5LhÈÞû ÒáL> @@ -1202,21 +1256,21 @@ K ‚×Å–àœ[9÷”GrûÖ7X&öàj8ÚH‚(ˬ!ÍWαNµ0†‰€3Þ­¦©Ø1Ýh95œ(QÃpMÄ;ܱnw…*p®B æFè‰Ýw7Q¥ é¶ÝÎXoxwÕ,µÓå {ñòzê÷¯‡›ûw7ôÁèOXåè¶¿ ò½±?>^Íð…K>>>/Annots 40 0 R>>endobj -665 0 obj<>stream +697 0 obj<>>>/Annots 40 0 R>>endobj +698 0 obj<>stream xUÁnã6¼û+Þ­°b$Ù–=8ÍîžRlk{É…–(‹[ŠtI*^ÿý)9¼Z1DÓä̼7óôï,£­sZTu³ÇrvÿiIYFeƒb³¦²¦”¥iJe5ß û*+A/óíÓî厤&g¨á–¸#²¢î+/&ÓÐIÖ‚¸œ´ð'cÿ!ÞûVh/+ã-oY±»òÛìc9ë‚å´Ü¬ñœãß jJ”-GJËœáqBjÁŒ¾lŸé£yèípàÖíY…/¯ -”…¿?ϲ"ÙWv”=¤l1®í~*F¶ºA.[ŠÒ‡äcT5A¥Š+%jѧ·w”gAà€°¦kì){˜ì¢-‘÷•¼=Ð…ü-+³g:òåsÞÊØH\¯ˆO¸bΈ ‚£”9I}bk:B«ÈèDI-¨ꈟX|)ãEÉd T¯¬çWí»¯Ûò·ˆEI^ÄrÍ¿¢ë´ãÝž£©y@= ä Í÷Jĺþx4ÖÃ^’  wÿ ÝŠnœS’œ¤oH WŸÎ_î>DnPmy'¼°°ŸR€¼5j$t¡{jäY‚"müH͵¦W5ÅâÁL¿ ©Uezí Ý­É ç‚³;®ùAtð1ÕÒ ÷U8‹X‹†÷ÊÓ^´üU{ƒ ÝPÛ»Aj(g¥’ãÅw› £Õ9ÂâɃ6(×øj¤„Ã?bô§ñ(iË}€F¦òu(øj±ÂgG‹,eëq5Ú;Å2$`§¡S\ø™À]lOà|bØ=8¥â…иS$஫EÀ®±[lÞ8ÆÝÉ»›A¸ž}7™·J`­Êž¶p#¨vô;Åd#ˡѡ]c%“àÍîaÖt¦î•€•¹º87£ ¹×qFinËÖ‰ªåZºÃQÔ˜c8Ò¡–7îÙ=?Ò›Ž‹0rHIzMÛÓàÂ_Çô¬.éyw* ÚŒMÃL % S¼;€7ã=Y±fá}×Ádï¶Ï[úbÍ7$‚žLÕ‡„Ä9nǼ§’áØüÿ ìåzÉ6xa¾äÙÈñ¯ÙÊçFendstream endobj -666 0 obj +699 0 obj 822 endobj -667 0 obj<>>>/Annots 47 0 R>>endobj -668 0 obj<>stream +700 0 obj<>>>/Annots 47 0 R>>endobj +701 0 obj<>stream x¥WÛnÛF}÷W Ї*€D‹º;@ ØIÕä!(Z«ŠªKr%nBrU.)Eß3C.))M‹ à˜ÜÙ¹ž93üë.¤1þ…´œÐtAq~÷´¹ûqs7V+ê•{<Œi2›3š­–øûa…?KM;¾C¨é~Aü~ý@“1mvоX®h“È9Þăש:Tº¤Y@o­«L±'EïM\Zgw½1®*MTW:¡µÉô‹ÍÇ»1&3(<Ÿ]¥sªJ­Éô¬òH±Û !ÁöFÓ0˜°ð,zW@]WÆ®‘œQ¶’“%ËmRý…Uj-m¶¤7;·}A‡ÒM¢¼Íµ*Ù‘ÓU* ¢‚šÌîM¬2:}âóÀ…"¡Ä”:®li´¸7Ãiãf•ªŠj§KÇêÒÒ"B(SqUC×!=;QšÙ–k†€Ó¨€³uòÁw¨ÐÕÉ–ŸxE*ËìÉÑ!¤fŸê²Í¥·¬ŽÊd*2™©ÎCr¹µPQ’ƒ›j¯I> LS E*SEÌÓUÐzs ˜&rñTdkqç†pnm•e«*’¡òëOŒšÏçHCN³E¶=ß]<æ¨WÌ/¯ 'Ê¡XHF{¨õ¨Jl\纨ÄIICW. jó3YÜ ãÈßätdÊ û©=!*üçbµÃ£¢ß ó™(Wqj @@ -1226,19 +1280,19 @@ P ¡ÆèšO¤ïœKØæÆ2va]2›hv,v™ÉM³‚JðÑõœ“ª#,þ® u´&Ÿ%H°GÏ °gå‘ÁD–,áÒ½pE ó¦%›U nd~Ú²Í7~ùoOjâ7[ÎÀMø¨J“ ¿ÀÖñËÝßgc!uendstream endobj -669 0 obj +702 0 obj 1534 endobj -670 0 obj<>>>>>endobj -671 0 obj<>stream +703 0 obj<>>>>>endobj +704 0 obj<>stream xuTËnÛ0¼û+æVˆUKvý8&MskÑ¢.zñ…&鈉Eª$eAß¡$'¨‘Z0 ˆ\ÎÎcùg’cÎ'ǺÀbYMîw“Kä9vG®¬6kìæÙ|>ÇNN§S‡ #š±Ô]up'#q2ö% :ÔÎØ˜^Ò2¬Ž­ó/¥ð: s Zaã-„UQøˆŸ¢:ˆìf÷<™cV¬²%1§¿‚öÎâáf¢e1äÉh¤°°®ÅÁ»6膛½&+n&ûôgí!"öü…„³ß«cÈp'¥ÁØ' èù"+z"#à|¿xÀ~Ú–F–u­Ï PÆk7ä4RÚÛßQ¼ðsÓ36R³qð®öFDj7h2´|ÕÁ¨[/Ë—Ý„`U,¨Ír³æ{Á?%9Žm‘S´äاÍ6[ýãÙ2Ëùà›‹:$Œ7iù¬HO«¨å«ÂVk•>h‚K`ލ½>ת\cÓ‚uvFM60•Pš[Ó7xSÇ+rg#5èLt‚(1Ò¥Vt©š°Ìwªá‘ÔŽG§ÄT”†ñ¢Ç Ÿaà%ÇÜÎÖÙ'÷Åj=®_r–_sö¹ñž©J•Úë˜ jôFFÓ;ÃôT¡'ì§`ÀŠŠþ†Ò5'DÒéäZí¥úÝn8=jú¿V.­>2oAËÆ›Ø¡n|í‚·Õ1n ØcË & }ýûÃeÆÎJqÖp­¥Î¥©YiÕ•µö•á8K:œé†–|¥Jód™S5F9Í]WæØ‹u=úf˜¼Ëdtï qáúªÅ˜íåvËD¿—mZÙßFùj¥›*Iùv#ý¼ûz‡ïÞ=sñàdSÑM‘¬K\gCÕl(›^ÏÂr½dzsŠEÚÏn~Lþ©pendstream endobj -672 0 obj +705 0 obj 687 endobj -673 0 obj<>>>/Annots 50 0 R>>endobj -674 0 obj<>stream +706 0 obj<>>>/Annots 50 0 R>>endobj +707 0 obj<>stream x•XMoÛF½ûW rb›–dYŠ{s ; P$iì´=ø²"Wæ6ä.³$­êß÷Í,—¢hEaÀEr>ß{3«'sšáoNë]¬(«NÞ?œœß]ÑbF[ÜY­ßÑCN³t6Ã7YrS¨ºÕž.Súöéã_ôEûÊ4q–Þ›¶!esúÓØÜíúôðöáï“-–°‘\g™nºq¶õ®¤ßLÓ6ü»›ã vwv1Oüðe:Oé£wÆ>‰Ñ¬Pö‰/Äm=¸m¨køë¶ÐpHÔè¬ó¦Ý÷®ç«”Hr£J÷Ôû[Ò|Þû[¬ùî'½#cÅÆ½ª6Šé,]’×¥V&ÓÈ-µ1%,ÓÖù!Gö™•F[äÞ:Ä¢ùQãɪÖ<ë!|h[Ä) ÏùEÈ3ÄE÷¿NÏÈXÒ­\n¶{qÛÙ\ûrÿZîi,ð Ñr®eÿªÅ?ÆÇLy½íJ²÷e®ª½Cç4‰X5r[¹–"®i)Ô|g-Çàì)GëÛçÑ´¦,Émônñ‰Û±5¥¦C§`¡Ô\I„§z»¤òÊX Á«UÍ”åBIZ·'Œ:ÍùÓ×'‹õ,]ÓòêºZÑâjÎû«’î»3\^I˘ýh{o¡« Qµqh™ë­êÊ–žUÙé˜>ÕÊ«J3Ð9O„2vUÑÅâ"½9_ãîêj2†uœ‰¢ó»E˜Ó4l²¨SVRÓÕµó­|0#¥3Ì ª¡Ö–„+:§-Z̯ßâ‚ø³àl€ßV•ìÇo%­ï¦OR¼VÊšº+u°sèv#¬é¼E¸·ÙÇJšKËõ%zµ|·NgL9޶Q¢$,—,‡n^¦‹”~u;†±ÐE`v°ÀÕýqr,FÂø;”0fú.á8P9á¥>Ãeöv¦-#Þ<-’uLïM×¶œ,üXhcÈÍ× ¼g‰èÆ ¶ÕSªäž…¡„^xõÛ§à­-Rú³@ó”•¶Õ®nκú”ƒC4ì‘ï…„V}C“/Þ¡è­ÑmKš„pD µCÔ·hpÅ#JÑKÆÆ³HQWËcÖùJ•=‘GH–Å”XµN¹¡RcåùÙ±$ É*²ÐµVm  .ˆ5§1ÒÁÖÕŒ&ÿp™dx?Rôó»¦)ÝH]¤,ˆ\¬ƒÚ{ׂëF3Å=þ‡ž5§SÓ_cä'É‹GéºË +ø‹YO&!ÞYí›ÂÔ“‡_–üE?â&ÂNËQž@£X{ U¯êIÓ5xô£Ó  G5Àˆâ[”ˆÅ¿ÐeŽÎ…Ñ`&qœ£n¨ºÖÊ“ ÃÎð9¼ÎdÒ\uû”a¬",v…É @@ -1248,11 +1302,11 @@ x zö:|ñâ…]àµtß ð 1p6¦=’™6²é²d»Ìá]áÈíl¨ô$ÓJ󹕀 îh?)ÅÈÌGmúE»ZE¿÷ƒóè¦7÷·_ÿ¸ýúø(PzL~cub;o'±^‚LcP›qˆ'ÁÐ4_F ãQ·ï?~¾˃½D;Ÿµr3˜ãx~bLB•\£šË¶&_£hüÖˆÊC ¹³²¹M#?Êú'>sÝdÞÔa¥myFÉWì¨ü™sì+Fp¼ÅðËû­zÓ‡ÛckXŠú>…­^5ÍÎùœr5ÇæýøöHåcÑbÝ”B8¹ŸÐà¤#ìyèC Tà€AâŽ÷½Ãn–¼ÜÁÆ,†Y¬«ÌÆC\³’×÷ª8Þ$ p.èTè×1ÛQSßÜ3{gõ¤É4=æJ-ZIÔwMŸ_gx *c†u)ˆ‘Y†ÅRÚ-ä:ˆJHVxäõ.·ô˜Èæ„bÃKftnšºTXSâô`àÓI©p.hõŒà‹…Kôr¸®ÅŸ&8…쀣ê 2Z\V9ÔÉÖ"”…ÏáÀÉF²S'Ã|ÅPåE,lÂØЧ“¤Õ³2¥ÚðÆÈ“£8ôgXè¼s²ëqƹ§tc¯<¡ H¡öX—€OÜ2P±YVu8çñ©¹?ãç0 -6“ígQ`t_^Ìò¡¼ý¶âö+s6iS`y~÷®ˆAKW|b½ù_¿'ÐÏ~CX®yªáŠ>>>>>endobj -677 0 obj<>stream +709 0 obj<>>>>>endobj +710 0 obj<>stream x•XÁrÛ6½û+vx3£Ð’lËN/Û±;î$N«I¾@$h¡& €,«_ß·)‘T’™Nf2²»oß¾}ð?GSšàß”Îgt2§´<ºZßžÒtJ‹+ó‹sZd4I&“ -Òx±’F’²$*º_PºÒ›ŠR]–¢ÊÈ­„£* ÚhóŒOnE¢\ ÂöŒDQè Z[iÂâeVªJYg„Ó†j£^T!Ÿä›ÅßGz;=If¸ý7ƽ×éš †pà&‡ò6l{>Ã_²øÿ½OÏOñöô_œñix·þqô©B6¦endstream endobj -678 0 obj +711 0 obj 1783 endobj -679 0 obj<>>>>>endobj -680 0 obj<>stream +712 0 obj<>>>>>endobj +713 0 obj<>stream x•WÁrÛ6½û+vtRfÙRlÉéÍ©›i&Ý6ê´_ ”“¦õ÷}»€$ r:ÓñØÖˆÀâí¾·ËïgSºÄÏ”3z7§¬:û°<»øxEÓ)- <™ß,h™Óåäòò’–Ùx¹ÑäufëÿZ²åÆé¬µnKv•ñÞØÚÓFyª-9­Jª´ªM½&25µØÿ×ý§Ž÷Ö•9)ÄtºqÚëºõo–ßÎ.éíôÝdcÞÇ_]|¼ŽØÆ42õF;Óê|í`¢·Õ"ø– SjÊ ;¨7íxÈøA½í%žD³ùäŠA|UÕJ‘ßÖ@ãמÓñz·Q‡%(¬£û%­¶„´ÚÎI PUó×·?ÿöZ1’´+›k,ã¨Ö}HaŸBH– ‹<üF9M!°¢Í³–~YžAšÏÞ!‘«›>Ïð‹µE ü=M‘!~}ó~2?¢üzr=¡/67Å–Y”*"µWy?æüÍX>ãd73ýêvB¨7Uªøc¶QõšeäÆ7¥Ú&uŽªÊ*í:©ßʾœ‹°(+Mö´ `î•ôðù÷˜V]ÛÚzB¿Ú^?kwÎÇ£Z\]*MeZÕŠÌ#5×üèа´Âž—Ú"®Jo`¦nµSYˆ"b” }‹Ú(—G^r¢Jù'ÖNŽOMÉ ÷î¾¢Jmë ‹¡ÆÁ0øT`InÕ“®¡X^e¶«ÛTåŸ @@ -1280,20 +1334,20 @@ Sj N"“:G–¿]Ìð&›ÿïkÍÕâ ÇÈÖÙœãð?Îþ²ãÓcendstream endobj -681 0 obj +714 0 obj 1613 endobj -682 0 obj<>>>/Annots 63 0 R>>endobj -683 0 obj<>stream +715 0 obj<>>>/Annots 63 0 R>>endobj +716 0 obj<>stream x¥XMÛ6½ï¯ä²°«•ü½zHФŠ4mãc.\™^3+‰Ž$¯×ùõ}3¤$Jv¢E€$’Èá|¼yóèoW Åø“ÐbL“9¥ùÕÛÕÕÝû1% ­6ø2_.hµ¦8Šã˜VéhcËTÓÚ”:­my¤J§ûÒÔGÊíZ¿^}Åæi»ùv<¦Ø>úT`“¢}¥KJ3“>UäÖÎüÚÑ«O¿½êoQmIívÙ‘ê­&Úé27UelQÑg•?(ÊÕ®’oæY½¦àÍl0¦ÛdÙ >þî±´ûÝÝÁ–Ùš¨¼;ܽP]š]¦J}CªX³É‚&Ë(ÝêôIŽH·ªxÔëÞ!È‚¢Áfõ¨LQÕ²öÁÔ[#S°ïVWœ>É!%ü¿¿~½Jæði>aÏrZŽÛ‡Œ>s øÉT¼îRÏYðö‚ 9%ñ2š{[Íöþyå#u5õ'­•TÕ“d®5"î‹‘¦¶#Ú©RåºÖeDoŠ#IÌõVÕD]jdÎåK^)¼(l-9A]®“k¤©2Ug†xQ¦75}+N¶…S™-€Ù£]¾4Dâ,µ`{WUº¨Ê²ã }×¥uÎùݼ¸KƨïºÃ﫞ð¢Ó‰V5 *Ôœ‹k7MÐÚÑ8ãóÔˆÙ½éÒ¯ìfjë½nÀéæÈÑJB9'õÖVüwwJgç9jp1^Σ{šÍ¦Q XM¯Ä?5ÀÀã¬×Ð6miô˽ijé¸^mðÀ!£vìG…ÂÓ³Êö€}EòŠƒÎÃqþ|~r~‹)i„0çûþ¥’wW IYká"*Ù×]iŸc¥[g¼ETjóªÍƒÉ˜»¦ÞzNG1(‹[±ChË;>Û´Q©ß‡ðÁ4¥]ïS½ŽhÎáú6TwRd¤ÙyQ[Ð!¨&[À sËË}¿[8¾x±Xø9ó³j>‹!”©ü랺ÊÇL3!™ÿ®_j·0cÓ¦uCgÕõ˜N"¨.ÄAx~NSÁcß›¶Š§8@(dè+¹ÉÓô«0@ÓåRà.ÃÆ=´1O—÷½ˆ›)ÕòE܆ð@n§Ü–Ú²ÔÕÎòÜðLã[å<Í ÏI,gH<ƒÍ í\Æ>ëgI¦²g¥ŽƒZêþܦ0Ñ 2È‚Qê€lŠGøë@€×–¬¶Ì–ÙA[þ@„×¶¸n`ëÚrŠ ¶dÂB g䞺Æ÷øÂöÿQsV0JÃ3áÁâ>š„Ïr<‹ÁWÔ€Ü7ôßÕˆfó©³t’@cHhžë¨Ol§ÌÖ›”ÌymHlÂîîÿ±f™x Kè ˆ°´q'íÓg;&»8öÅÊ ¢þ-yt³›á8gmçÞ5úÖËÙÄ ?„ÛÚv–1X’™à#Ç–’úÛQ8‘¢dîýbË5”’Ï[£Šß‹~ì´´Sµ"<Á½@I.'ȸµxƒÅâ—gîZWiiX<Øgh"1%ü¬_R½«!I¸;ôA±Úh†©8+êÏd‘e®VkÖ?ƒd¶É—ií>¶¬ã”Í`‡ë„6W[{\• ,öÏ9û—í «rU­ƒPÎd¦K-=Q¢ÚgDË}Ì:}íÄo)iÏ$C´¨[Ûæ4TÏîÞ2´6Hpçÿ™ûZ é/û?ðìT  9tàbƒ¢Lv"ÑZ"xÓ©–Z£C_¯ùM;~ðWŒ+/Št!î»yîÑ•»ô(¨µun "S¸SŠ7Ìd2]gW[ðS“UC‚¨j¾oŠzä¾å«*Kë–Y)¢8'r«0 \ãòh÷¾ÏNíw|‰awÀØ-çVþÔÍžo¾–um&—.GîžNN¼@€pΔ¢UÁNÅzP‘ÑFËW—ÕUq]{E§p{DçÔ&Ýgªôw*()‘B"nø—MNÃÆ²Æfw:ü³oÈÎÝ·)™$¸焉º—‡FSœ™Ùø Äÿâ‘LÆØê*ˆÍ—ÑìËké°Ë³Zh¸)ŒËrµÓ©Ù˜”Yœ~â$u}‚QÑÀ°c+¾}þ,*€Ôs´†…ƒUMÞÃi~`òÜæ^oüîýÒ§)™/pµ›ßO¨Ñç7ß¾¡?JûÁÑ/6Ý縀˴b—p™çÅ·‹1~AZfÑ,¢râJ²Ð/ÝÑÌ+Þ>]L¡ÿdëxÁ/Pß?¯þÑ)œKendstream endobj -684 0 obj +717 0 obj 1658 endobj -685 0 obj<>>>>>endobj -686 0 obj<>stream +718 0 obj<>>>>>endobj +719 0 obj<>stream x­•MSÛ0†ïù;œÂ qãHÚôc¦Óii3í‹"+X`K©$“É¿ï»ò®n.1’vß}ö]é÷$¥9þRZ-èü’d5¹Î&o>-)M)Ûbår½¢,§y2ŸÏ)“Ó+O¹òÒéÊÏHºÕFÐ"™'K …¢p¢RA9OïN³G[ôÁf‹KìÊò©tJE•ðO¼gNýÊÖ:©¨[·¹­çÚ)¬;¼~x°¥=?,¨Ï´WNQíUŽ*|P"'»Wk/kÏ{ ìNXËÇlt±\& Z®Wøâ ±¶ »·”¢Ffw‘2”!½‹d•Ðg:Bm íu(bR„É…Ë[ž[]*!€s P(v·Óæ¡úÒÙ‚»3mz€=ž¼­TWȇ›ÛAŒžî§¾– O'hANdMy8¹?ƒ`£»oŸÑN¹J{…žƒ b= e…öm?Òs”Ô•؃Æ€†hÝ$­Ù–Z|…½R¦áÚ¥¨Å«@ÏZ4å+Y;D¹¥} Ð8vh”ClqãˆX ,¡öDç¼£h/øˆöQ°/ìžêáSw•R@ÆRd9 )•÷D°gÌf÷F9Ò ,KêbôX#U0Éåù虾ôÅCÕHèÎ Y¨ ¥lõ¶l 5Šð44PáCf¬Ü,µ>>>/Annots 70 0 R>>endobj -689 0 obj<>stream +721 0 obj<>>>/Annots 70 0 R>>endobj +722 0 obj<>stream x•WËvÚHÝû+j‘9Ç$0†ìœ‡g2c;N '‹qÔ@g$µ¢–ÀÎ×Ï­~ð2™™ÛÇ GwÕ­[÷V?‹©Ÿ˜.Œ(-Î^ÏÎz×Jú4[àÎèrL³ŒúQ¿+içÍJT¬iÑ}­ÊF•Kš¶U¥ë†TISQÌ%Q=¾œ}³+ÅC·RwG Öꌢ8¢÷eSë¬M¥K÷äâØ?™\òs¯åR•%o°QÍŠš•´ ÷©–¹FžûÝŒÛÞ}¤ZKú¢ÊLo Ýͨ q2]‰R™Â*ª\²ldÆ»÷©\tk%ˆn§ÝO÷oè¡£"Ùe§÷>ÜL§TŠBfT©J>¼Œȵҭ¡µ¬ R1¤äãÒeþD>8¼s#Ê[Qn£9Ú6yn"1E-ë̲È2Å ‰œmiñ¹jž°^« ÏŸ\ârƒ}˜~[”$ÍÛLšW¼2 Ü K‡š-tMªÌµÈj ê›Õ@±&Z¨\jôÐÉEo2îÝÍz 3"Í@4ÔVº¤L¢Ì"â½zש¯g÷2ƒHHç!]ú›¡Ø|o ýç*DÀ¨ S`*{•eŽ…ˆô‹ú!ê %»ºÿòð’–}ú}aâtNF6Ü»ÙÚ²šbþôé·³ËatA–è?Žþ[NSî  w-IvíðЩå» [»ÃUë%uVMS½êõ@8¦¡‰ŒnëTö¥ŒJÎ.û‰ßbr€1ôgHžª.Ãà›ÂÓÚFÂÅ&Ë:p4]‘04mDݼÕé=G*ëszW¶ÅznÏ9É&"pþ¡3•¨ÖõXÆÃ ø:PL@7šD±ÿ¶ƒn8æRï+Éíôí¨—¶Ü†hZH4ÿba²2*TZk£M”ê¢wû@bbº–h|,Ü؃á€8 ’ŸuâÕý{ðçøÜŸ?˜D#¦ù~k1IÓTCo4+^N7Ê _@Ó77؆‘-8¤çßdŠ{'¶þ_íÃT×kBh~† ,þ½•­$ô§ªÚÜ(jÝ.²¶F²tA líYn2ш9tÖX,M…z¦–ßôœ>ü¿¶›ŒÑPÝ€Ül%Q°¨8—²$£ .äѤº\´,±$æºmh³[ šÈB*¤€öB}p]¢Ä@³¦RÓð‹ðŒï­ª­äs:–5;å (9Õ³z7ÅUilHy[/ë+m¬Õé:sà¶‹p[-j]le*H$çŠæíòhgù>`ƒïì# …ž,D¶ïd‡’R@‚iíÌ×Èš•»Ò¥ãÔ×ð‹c—óòÎ á7}þˆqÆhâw¡£Š-¾ºLaJK¡ÊómŽÇn‚FL(,}”n®!9‰¶œòø2f‡ÈãeT’]? éFZp^§M{‘rü® ά̸&ù¸RsõÜÚa”a,˜<îêrÅ X)f;UdÄgùDNˆµåmŒW#"mœ|‡8Ë VÈ?[É'`wÛ¨\ý@&P=#‚÷oo¥áÅ 6xXå¹Þ0L·Súó5ÖiTš#Ô!€¨h\Û++™W¤ô¤[»W&Qz¼e‘ ©ïûö+/6#ïÕú]oÔQÕö|Ö¸Åî4}FEˆç8Y ;–0‡÷7áEœÓÂ8¼a<ˆ0[ÚoÞvægæ×»ÓAì(´s\ï§¾éŽÌÀ_íý=ïyŒLïc<žôâ^ÿ"ºšÞïbòî ÿ)¹H àìTøŒ?Tkæá0Å&ñøÈÇFvYÝjÙÖVYy“Þõ…Ç4ž$ȹ›LØþ²ü}ñ•Ö&"÷EÖ/¾ž C ‡´V<^".;‘ì€J(¾¸<êähê$¢–pNØ.OÐT0 °bvºñvXè3¾ÂCÅßPf«pÏ»Û7ç Û¬ :‘ÖR°ºv^h=ÖjÖUÿš]߆rË$tj¸ï”Í0X{»Èш®©·Ø.'¥~Z6Od];š gÌ·Œl{ôð3·6 b)ÆÉ£5 æ–+…ãêkÏF…ß™åôù ªÃ²4?–^«©ÖÇ*¬îÊ {‡ÖãiSÉT-ÜA",j2¬®~3wJ:U¶ªþX÷ña¡lWLØïQ~)+—rЀ ¬;èçóлL.(˜Ë¡bÉj!Kx#ªûœ¬No­Ü•⦷7ŠÑq¶Í¼œ¸³kÍÂk†kT¯k½ë±/°÷ß_;Bq.ñç§dÂÐ Øgÿ<­ÉÆendstream endobj -690 0 obj +723 0 obj 1754 endobj -691 0 obj<>>>/Annots 82 0 R>>endobj -692 0 obj<>stream +724 0 obj<>>>/Annots 82 0 R>>endobj +725 0 obj<>stream xXÛŽÛF}Ÿ¯¨##Hê#ÀÚÎÎÂv6™Y,™<´È–D›d+Ýä(úû=UݼH#g7<ÓÓ·ªS§ªN󛈦ø?¢eLÉ‚ÒòæÃÓÍߟn¦“ÕŠúìƒ)%Ód² Ùj‰ß£Õl²"«iË[0‹sº°þþaFQDO[Ši±šÓS&óSzJGO{í4”U¥®µuw”WiÑdyµ£·O_oîâ°wt°y…%”Ùü?¶y¡ýŠöôQÎ)سÑ|L¦V§¹ªuFªÊÈíMSdT™š°‚/[«#6ý×Ü$ëédM‹%\§’fÉr² £‚ÙQ8³Œ09t§q¸$¯¨ÒGüpµ* Uç¦r¢c©40+¯¶Æ–òw2ÕûÜQºWÕNßLÓZhõ~Ö+´€;‡vÀªÅª³1XÕ#/ŽþÖ‘K[?ç;ëp:e#Š~»ü†í#2[ž'+¾l%“>Äì̤M©«zò FÙñ“óx2ÚÌæ` x¼ñÔ¹6ÓB0¿Š”¹YÔýLŒÓ[âÝ?¬)š1Ípcv h¶˜Ä“hB­†ÇàÄoB¦7¿³Ù==§4Ž—ìÛ§ŠŒÍ<ø®9Œ­%Í¡0J¸i¶tÁG!$øË,Wclñojªm¾k`¤’.S³߳Π··Ø"+d ÷ôð›ÀlÎpfæiö¨Êºu`£R…#gH,åó ë‘)'ÊKö@U5=û,zÃSÌ*§íKžJ ®oNDÿΫÌ}yòÞÊzd)“ò`ÍKžáˆ€8ý @@ -1329,11 +1383,11 @@ t ].Z,‘ ´y{>¾ÿüá=ýÓš¯‹~ Ÿ0äSˆ„Ù//cþ†0ú«O³%ù’eÉ”÷" ~¹ù/)¹¦endstream endobj -693 0 obj +726 0 obj 2102 endobj -694 0 obj<>>>/Annots 85 0 R>>endobj -695 0 obj<>stream +727 0 obj<>>>/Annots 85 0 R>>endobj +728 0 obj<>stream xWÛnÛF}÷WL…Q›ºZ’Û‡B¾5Y‘”KQÅŠ\I›\…KZqÑï™]’¢èÆ@kÁº»;3gΜ~=éP¯ »Ô\.On–'mo4¢Ã[²Á6 z]¼÷GCþ>À["iÍ;pÇ”oXÞºmÓ-×8z€£–½Ý¦¥ßü}—¨8ýñ3þ{½ü|Ò¦³laQ“ò¿¿Ï>öºŸFƒâ7>¦ÆGzohº¤o£Aãû{'Ó~»²µº÷â¼u1zak¯;¾›½—»ÍŽÃÝVü9þ4{ñ„·“Ù¢< jŽÏûívûÅݳÙÕasm÷Lïe2»²û[·çÔéXŒ{C¯OgÝ‘×eÇËåÍt9¹Ÿþ@4¿y÷~2¿¹¦ÙÍüíd±ÀÕãfs|”´ù¯œF:¿¸ðyŽ;89^pŽ[·ýÜ\—·=¬&u“N™PªÉÏ’DÆiøD"HP,÷$êÑÝ}Ò-D´´Õ&=%Ò±$½¦t:Tªtl(ÊLŠa@i’ÉŸØgô¬;°†›Ë­$áû:‹SÊŒÄ*»;–~Ê_SÜ>¡ü4ñˆM”©€íµé¡©<éáJ¢uZœöðšØVëÖÏ£=‚š nÐ|è†öæx¦=Àë :XxŽQDýN0º_aÀ¯ëYÆÊâÿD´âx"­-Cˆ¨óäVíÛó>2yäÍ¡Zm¶d»yÈE(umáÂò©˜-N±ßì)Mš*“zu8{½Ž7¬zà–#q™æû58‘%FžÚàÀÎ0Ò]äÞÒĤ* i§‘Æð-þ ˜~kJûƒÁ1Ù*P NЉÂÕ•Œ¥H·T(’gC‚õ\!ÍeŽmº lðid¶"Án¼‘‘–n¯)@ª8|zE«' äZdaj;âŠ)/´þhTŠi§Ó[ŠJƒÄêÐßǾ$.-“؇=FcJä× 1ep*yTX.â©2FûÊ®>Žþ”ŒŠv(ÒPoàzµhj0ðyÈzfT¼Á®\š:ÉS[ЦYð£¤Ç!¯MÔU‘³u¢#SQó>ðCÑðˆ¦âQmàpQÇ÷ ™˜R5óô¬¡Lü¸RîÎWœò°2[A@Œd,HÅZVr$(˜Üaðƒ‰Ôß2Y€jJžkdTÅ2¨ËHIRQšJÊ!,’®[rß,šeëö‚:PO– ÞÕ¶*¤¯‹-dš²“×V7 ­öÍ7Ô_,aw£v‡¬SKøÿR°ª ‹ð+Cå™°dQÝsIY²Å®·’\ÊA,µ&„<Õp€RpYVÂ)üÉQâèÚ€X™¢'Ä"’´¦(&Õ ×¢&Mïi6ŸL—7sºžO>àcüa<¹_ÞÝÐíýœ–o&¶¥ñ‘3#_ŒOÓ£;Ð*!ÙØãoE¼±eoX/húþîŽL @@ -1341,11 +1395,11 @@ x É3‹mÛ,Qî! ÐPT¾‰/\R,¡¶—Z7±Ìµ*Û4Ùmæ9Os5àJÇ@|§Èîx'ölšÿStTô³Òƒ r‹s£#bp…Goû×4ÑÊÃt»v—ËÚߺåË:ƒ¡‡ê!öÍÅøíå-HæB½Ö~ÆYÏ]:s‹Ï†]ûðò_çŠþ°9°[{ö ƒì»“xAÞ endstream endobj -696 0 obj +729 0 obj 1803 endobj -697 0 obj<>>>/Annots 94 0 R>>endobj -698 0 obj<>stream +730 0 obj<>>>/Annots 94 0 R>>endobj +731 0 obj<>stream xµXïoÛ6ýž¿âl˜ ÄŠ$;¶ œ5m3´I»í»‰²ÕJ¢FÊq²¿~ï(Ñ–dh6EÐüqïŽïÞóÏA@>þ4 ©7 (?8Ÿ\L|o4¢í‡^`àS8ð½>õGÃÍïZRÂ[0‹s6XüºOA@ÓÇFCšÆvÞ§iÔªZJMiQI-M• 2i, ßKJ UKQѧ´ˆÕÚÐÕ”¢,•Ee(V¼„VFb‰¤Éûs*µ=…ÌRhyDw«Š´°§G¢x1ýràS7èy!tìZŠS-£*{$ª‰âqs„*0¬‘µl/•a‹Œñý¤{{ó‡G4]¤J(R+ ,˜U.ذý”YÞ_»AKÁKá­Œ¤1B[÷i&8 xNËœca©ïy;߸k1HŠe"VYE¥ÔyjLª ³gÐÒE!cº{l”=wgÑ"½·à%Þp4ÛçqØðáŽԪ‡´–YÖýZ¨uA ­V¥Ç6-ipÕ½7pMAŽ_ŸRÐoèà‡Þh‡/ôzMVe©th™Ð h•ß&tã¶õ®Í¬nÈÌê\L³bZ€9`¡S# ŠWð¨],ïe¦ÊL¢K$<ù ü°´ãKA°à³i°ÄÑÑ`޺Ȕˆ÷ã›(MïÿféàPâv>XÂpàZTß|b3FårÍ8I¬¿®…®í‰Gç,5ö_&”+þà„¥Tâ&ÏN¶Û7Á`ètÒ!3s ƒ‘7lFMljbxŠÉv6@$ÙP›‘’98e>²`š‹mŸ @@ -1355,11 +1409,11 @@ x mž¿€Y.8qžð Í+ŽKw·su ⼓zÒ³åÐ|Ô ]`mú“=n/ºó^³rêì¿4R;ßNG¶0o_M—h5yÆÝEC9÷bï3½Ûöù˜MÎB˜|;]^ °¡Éí`Û¾îžoíÖ>b6ï¢Ë\lÞX̽j’Dö÷Æ{ŸFuS´õù›¾|…WÚRÜ#.Ù¹Ù ™‚׿›ÔB‹*õ•ìbÓ–cFÊ×éÒ¡â¡y4•Ì©N¹:›œ„µ’óXVѱ݉r/ç8EE ë˜GÃI žy9.v_éYQL¶OE[`ÛÉѧ%9õë”3 ­rD¡nŸ aÖ.õ[ªÛ×25èÄì‹ÚŠêQƒÈõæ¬Ò¶CÞÒ²Sk¤66Y;ì­ƒHò7­ð¸˜B67Ý{ûD…–¥à—t÷ÝP?[-˜Ð.¨Dw¯(SG˜1(oάu,À‹Ê^)ÿ’]›€8Ù¿QÔOü¢ùÉøýùÅB}ÌÓ+áy_TPfekŽ{1 C›àßõzíYí¾^È üæ^endstream endobj -699 0 obj +732 0 obj 1839 endobj -700 0 obj<>>>/Annots 103 0 R>>endobj -701 0 obj<>stream +733 0 obj<>>>/Annots 103 0 R>>endobj +734 0 obj<>stream x¥WMsÛ6½ûWìø¤ÌØ´(Ê”•KÇùpë™ÄueÒC. IHHB@Ûʯï[€ h%v;ÓIb‡Âî¾÷öíêûQJcüIi6¡,§¢>zµ8:»šRšÒb…'ùÅŒ%“ñxL‹bdª*j´£R®T#Ë Ic´!½¢ãË¢ÖÒÙ(Y“²d¤k ^$§Ém$•’Kˆn´“¸#œ¿ýbñ']à‰²¤­Q“†é4Í’ rm^Q‡ÄLGJ>È¢uÕ6¥4!šÆ ŽsóÁuÓÈ¿b¥9ñ…àRFU;d4jE¡[$É1Þ.ޏz¥ü¿¿¥é,É(ŸæÉ”jJó,9ï®*úÈ¹é ‡Ø-6ÒHÎSP¡ëm%k¡š5ua†ÇÔ4Ió>:¼ÆÓ|òSÈÇYš5íñŒù¦TÊJ‚…hN«MéïOóÕûÓö`¯@·‘µ¾ãôQ…QÒÒÊèÚ£||ˆ³I’ÓJW`c€%åYžä4½˜%cšàPYáÍ)f^xãIrñ¾ˆìSþ‹[“G¤¶Áð]ý®_Ò§ï<É œ(\ kƒœîÞã˜/1H5¨¹ /Cík¥ù {T>ŸzìF/ß¿ºÄTÖ_á½ôf8 øs§áõÓÙÄÝ¿£™Î¦Ñ³ŒO@÷þuô)ÅHendstream endobj -702 0 obj +735 0 obj 1730 endobj -703 0 obj<>>>>>endobj -704 0 obj<>stream +736 0 obj<>>>>>endobj +737 0 obj<>stream xW]s7}÷¯¸“'2 0œ—Žãĉ'qãÖtÒ‡}»/ÒFÒB˜Nÿ{Ï•´|¬=Ó™Ú Öê~œs ¨ïM†t1¦|}önvöavÖïM§tx±K|èÓÅàª7¤Ñt‚÷ƒ>¿·’|§°³Áóç·# h¶€ùñtB³"œ÷i–w”£B-•e¹#§–ZD%裮>Òv¥òåBÓ\Rípè m¤U‹ù•ðT‰üI,%f«K# ¾›"÷u0éW’Œ–¯gßÏúÔ\ ÐYѱr!­Å³JÃŒ¤»ue•öˆEx1Nöˆî<â‹ç·ã‡´ññOMJ$ž›õZjöbò+\t2¯­ò;ÊW2"Ž¿PNÌKYôØB@xŒ/€`Äqˆw Šç·W4%̆Œï1jãÞEoÔ£‡®ƒ'¼2šnJ%u+@¤=dÌ;÷Æ•^»ŽO[¹¶PzyŠ:¶˜‹ÓP%'P‹8€þDíÝÍn §ûéë·Ù×^åÚÀ-T°•—5C·U~Q ÎÔ6— Å5NfÜ.E'$ß<úRÌ`EºëÖgí‚ h{oC€&OfA̠ЕJKz¶$—[UA1èŽ'é°‘ŸíA€‚gŸ!SAK+*(Y”ÇK»H B鞸®þ§ëîp ‰ìóbl^‚$ë@ðs Ùkª¬Ù¨8 ZK¡1?jiwÏtÑÔ0³(A6A‚á9*,(+_ñM é²O• 7!qZ›B–¤3#meYòïÆ9cÒT21)‰TaÜ:”3ªdm|»¨Åz.­oJà rùm=§£ZC*oÅÂ(¹tÐNÏ2$çe…8Žr$Âç[0[aaMè–˦]¸õ<P[úl¨õ¬­òŸ ¢=¿íÓwƒH¾Œü¥@wÌ:®®*c}ð{‰îÇ„ ¢%PÓÁË^7|¡¡³Šÿn}&þ ûí£yKQ"Ü$‘¨5 Rx´âŠ›-:šŸ7v’a$»Á¿€,¾ K4¼äsŸ{´ÞÒŸÑ>_‘7‹ÐAÚ^.N£½s®fqiº.Ї(»÷A9Yz¿ìþñpÓŠàŸôy8è´Öc‚ÉS‹~YãRnNË2Cƒ&@ƹ¤2à‡C±ËœŽã`úŠöƒŒÏôÚµ#©sh mƒ›ä \¢Aâ>?Ût\Dbк@ØUÅ'\jä0%Y­ŒL`š„sé·6i#¬25æÖ^K©õ {”0·P•ü)8†7t\iJ‡NÎÕœ8c罺®ðlËïôEû äî…úm.½é+:©à«K ÿ²D¢sõó” ¡ö’—hŸè¹ÉWÉéñÈ€†V®Ý•Ù2uÜ¡,–‰”q´‹s±‘<¸OÔ;’‰5•x×H×ùü‚åÉlUY¶r…øåzŽ30/LKƒTÒ(~t¯ ÞB‰Ò,Q;؉ö¨&9,4”j§åúG­°|”Æ<ÁPð|ìz„…ÃíÐÚÖˆ~‰†Bi}8šë |Ÿ>¹Ï²Çp!ËnjlPÚßí­)¥ÇŸâû, 9eÙ½QÖh–jkTõ` î7Ó1às„(·bçxñ‹j\‰ô l$<ã] ?HŠ~ÕJ@`ŸÉ>8¥{qÝ=Ú3¨á­‚E$ÿŸÌ¡Û7§Oa)vĨ0Ýâ#… Qó–ò@}ƒ[ÔË’7Þ©9óÀÚ!ñPÐjô‹ŒÙ‰’Å·‹RM#S¿¾ ~ÀÉåãxäc¢UqÈ#£R­±„‡%ŸP)Ò¤YDyh2Iý içY@\0žç~‡VÒ G˜‚W—çWÓ–šã  GXÍ”æ:TÖùãEzÊô¥=zš†ñ`<éñ?7¼½þÿx¼¾w͵÷ƒŒÞ›¼fn _7ÞêÆkÿÞ»G“Q³!^ŒØöüßÏþ­°5Œendstream endobj -705 0 obj +738 0 obj 1527 endobj -706 0 obj<>>>/Annots 106 0 R>>endobj -707 0 obj<>stream +739 0 obj<>>>/Annots 106 0 R>>endobj +740 0 obj<>stream x­WMoÛ8½çWÌÞ –-ÙñGo ºéöÐEwc  Z¢-¶’¨%é8ù÷û†mEIEP}‘œyïÍ›ñ¿W)Mñ/¥eF³åõÕÝæjr¿¦tN›=Þ,V¸(hšL§SÚä£E2OèzóýjôUŒpJ7ä4í®éAÔ;AY2MžùY–dÉ3:¹ŸSš†ýÆÙû>«'‰…¥pÔÕ8i¨0xf¨8ÈZ6ŽJa)/EsmG'I¥n%©º5úIÛkR ñ)„[ÃûhCFVRXi?Pãã¦4NgøGûPECòYY§šYéŽm0åxC{]Uú„ØWTÔ WÚ„þF’ÀŸ+%µÚZµ«$Ù\6G[¬2t9õ# HÇ ãs¿ìéE©ÐÔhG…´ªÛª‘'zTM¡O–þÜP$Âam«ûÀ‹J޶‘²°íNb¯F&D·UuÎfl+Œ¨%àµtÒæ‡ÝâIàprŸwÄŒ—ÉŠ"BÛl±ô_ˆã×ÃLN!'~—â ·`Žôž³ˆ¬ò Ý¹âú@T€•ÖÏÝ Ë™Œ{¼ñIžÑòŒ}ð·`û),=óÉ '÷µ—Ü(†b“Bîû(ÇíUÅ>–P£­w çdÝ:KœY¥sá!¬°Z™s/‡NÄP$ßn>Ý‘h Ú UYRŽè¤@Rat‹ìO¾dŽ–éì-öBè¼PTÕ0a­Îâ) ÈÈêöÑopbHì&&]ƒ“:ÞIÛi]…De5Цˆœ“Ù‰üÇIH,×5„¯vªRî…y à3bb5×#W#gÓÈg‡*þ~)ÆwÅv“AR(‹Ÿ‰m±èj¬$`"ÊY'>jI&‚¡ÌLgF¥¶v¡y@uð³½f)/³žÊTêàk!C/ïÖÈ\²É¡ÐÃyºÒH¨½L>o{á¥#è¨C£70ÕäÕ±ÀwCfýúX(^spUf6úªF£›ü ¶Ù:é7¬±¾ï…ÝÏuÒ©å§e~ß/Áüh Ûµnª²º:rSˆEyË:ÚPª‘D6ŠÛo\j‘aFOCyÙ3Ø ;>ó‚Ç~ìÔÀ׿Fµ(Š!¨¡¼BŽç²@‰ç•B°áùŘÔÁ·¦Íßýç?€x”¾ ”xhÐMX+áß\qóô”R¾úû3úB2¥ù|ލ)]fɺ»«è;ð`…9psžÏo|É\šqé\ûq2áŽÈQ$ÂÏ%|I#݄Ͽl寰\µé• ê–ý/dþJgQG=EÓõ,™ÑxáË÷6/ݱ9üö&URÅÿ4OSôÞùj‰ëtKt>Ÿç¥Á`üXÝ â/ÉmphÄ\Z!ijXAd’ëæŸ÷*;5>±ª@ßFÉjò-Sr){eÎ}‰÷<ÌjÝ€àO¡CA¯ÂËðÖk6:îB¯H÷>2¹Ï:î7þ®°bsË%}Þ^¿;f¬W–÷óý7öçÁ†ÛÑÃÿ¶Wtø+›qÓ,e3ü®WwÞò;¥lµòÖôšá’Û÷Nò0x耵Oaá»Jœ+yÔ¬^,A£6ÔG>>>/Annots 113 0 R>>endobj -710 0 obj<>stream +742 0 obj<>>>/Annots 113 0 R>>endobj +743 0 obj<>stream x•WÑnÛF|÷W,P`‹)Y²ƒ´€Ç… Øicµ/uŽäIdLòÔ;Ò²þ¾³w<Š’í‡ IÇÝÙÙÙÙã'Mð'¢ELÓ9¥ÕÉÕòd|sAñ„–+ü2_œÓ2£I8™à›4øœ‹M#5-B22muÑìèÊT%Ššð÷AT‰ 8|ù°ünE3h4¡‚E…ô»*ê¢^“¨é~I×îñmÑä}€Ø˜Quâ?~iL[IÚ©–rñ,IôO¼‘~6Gнl®n¿>P-p^­ÈD±6`@_¾ýf (#¡%}?ØÕ—в”Ùaœ ¢©«ìúëÝQ¸SÚæEš©Ð?®?¿‰í p…ÓGÑ,¸f«(éS»ñ¬§ªn´2mÈÅï*çÇð˜sÌ]]~“†Ã:w2îø¾viâyˆVgÁmMJghC£,‹Ô䲃zJ«B›†L£6.»ÖeBVªx&_·µ}"UU…ÏQ ŸG+ÕüÔ¡‰|SM•l„1ÛŒFß ˆi¤ùfžF¹XSø2« BÓhÑ(ý³}ÈÝ!_ß !z¸…ÞâØWfs1|þг­ÈEã›Dÿ¤êrG•Hó¢–îw–Æc„Èi*m¡^Vƒ,—w”‰F$ÂÈÇD…éª i‰èzü#õâ.Õók‡…aðäØº0´ÀªÚºÈ›QÖ’+zG´ÑÅsQÊ5ªT$²ÌÍõÙtn¤B¢Û>DaŽršÖ²jK²ã¾- #™7I²kù¾LfáŽ?=›ÂñݧÎñ¡ØÉÙËß«í):Á‡J!%m-–Kr"ö¾¤Vì—$³¢qàmu¯6Àø¦ @ˆ+Ýê18{oì§6pÒà*ûûR9ZŽ˜¬Ázà ß뙸ÀÍœæ3쿊¢ùÔèi˜ŸÙ ÞÁ»ûèc€Æ`ÅãBbÛÓ;Áñ.À« îã½Á7‡ä8Ýà…ãD¿ ‡´”|ÁÂÜrSþY—*å¿ )xÉàmÀ)©ãšeÈšíF÷¬»A,Þ=aý Ãßœw§¡Ùé߀èi¶˜áw«,˜Î;êþ<ùˆ›¾endstream endobj -711 0 obj +744 0 obj 1500 endobj -712 0 obj<>>>/Annots 120 0 R>>endobj -713 0 obj<>stream +745 0 obj<>>>/Annots 120 0 R>>endobj +746 0 obj<>stream xW]oÛF|÷¯Øú%jaÓ"eKr€ ðG]¨´VuNäIbBò˜»£eýûÎÞiŠ6š¢HàYÜ]};ˆiŒ1ÍšL)-.¿,ÆÑ¯ó—˜¿üñëÁì4Jh:ŸFc*)>Fóð[A÷üÐÉÍ)Å1-V7Ïh‘¹çÇ´HGwòÉRºÕZ’ÝHúqñ…“ô£ æÙ$:Ý9@¡×tr“„,Ï~"Ú*ýu­USÓ;NòÀýä´0GT䕤¼rþZj)Š¿ÉÈÔæ /*ÒRdoØ“›³öØå=N¦ÀºÈF½|týá–sö‰èÞ' ²ä†ðŸ ¨D)I­ÜÏ™*@l% -é‹Ê«¼ZGGgI4£é˜ù.)‰“(¿ÞÁöx†?öùþS5T6Æ’(Œ¢xô´×B#¯•º Þ‡à³8:ß—Á^â€l˜œd•ê]m©Æ€ŸÌ|¿FZ&ÜÓÍ9vÒ„—ž{¦%¬”¦j45Fj°ªøácê8ž@¬hhÀveóTXP ßw úx}ñÛYƒñüžMgxœ3Ûþ·Žß³éÜE{ÖóM^‰¢Ø‘È2zI©²|µ{ø‘DËm?¸MæÑy/pÿwüuræ÷ÓþóóVÇ8D¬ÁÑÿïg­SwÛé./ÏHæo—×Wqøžøþ¶ÍS`±‘ÆëŸ§£Öy)ôŽD•ÑR¤_1ÍaHRUY­Š‚;~/Ê¥ ÚæEAÂZYBrh1¿E¤–çÚ ¯õeÀ¹UˆSO‚¹Xd‘ºHŠtf=³äþˆ0aÐ!•bG[Q9 ìZ»ÃÈ9f±}b™LÍNCªÁÃ(¿‡–¨Pø‰RUëWhp:î1yQ`¾+aóGÉÍWœfÊeÆ…!>,‡‡¦Œ ¡d'tÉT8Óµw¥>áxlñà JØ|ÔѲ¸"Gâãù¥¤·^­Ÿö ¿TÑOþ½¯ Qáe•Ñv“£E[xlÎòÈšTfL·WH£é, @@ -1417,11 +1471,11 @@ b _¡à1wßÉA•ÎQBJ7hN@m,c_O¯ˆ‚Œ•µñp3§yÑ9[B®,ÏÀNè Ÿ’œòÖÍ' ‹²düÒuº’̶'©ï±|JeíNetÝIÑe<¼÷·&W¬¥>¤•V¥ã l 3Q˺lÒËÝ€2Æ|x 'ë5dZ…mü (1zP2]©²n°±Ì!ÝÞ^áøºÍS­ŒZYò™h¼«2ª¸Çꢱ9Zƒ…ñí’|ÇÂpòyÿ|ñÍ¢IDŸ7;À£`L%Ò¨»‚x£¤wÁ~æª^q³«FkÀãÅúÔ= I»Æ†©ÞXÐ&¥Û¤Ž?6?gw8p`à0³BaÓ§*ê.`æ € fݡÇÎŽÄSîîg¯€°ÔJ)°*\71¼$?:¼ÍqÙ=<cöâB÷)ØžB‚A©\¾jâˆqC¹lX°[ÃR™gRýrá„&xd 9^°c iv˜Ÿ2”çýïäf>bĸûñyêŸ7²ÑýÅíå}Ôê d‡½§•ðpU1æcÿæãY‚Ï´Ùè?î´S|^œã#1ž˜Ì8 TøûÁ?»Û¯–endstream endobj -714 0 obj +747 0 obj 1709 endobj -715 0 obj<>>>/Annots 129 0 R>>endobj -716 0 obj<>stream +748 0 obj<>>>/Annots 129 0 R>>endobj +749 0 obj<>stream x}WMsÛ6½ûWìQ‘i}KîLNœt<Ó8n¬Œ{è"! 0iÙýõ} @$D7eÁ°oß¾ýà‹)Mð3¥õŒæ+JË‹wÛ‹Û‹I2ÁÿùcÊ_~¿˜M–É5­6«dB%Í«dV=ò©« šNi»Ç}«Íš¶™»`BÛtô,ëW²ªT…¨©1Ôä’L‘ÉšE¹deÚÖªy¥Òd’~Ù~c ± X\.Ï,Æk<ÝÌ’é9ž õN.œcëÿ†¯5 ²ýþ´û†Ó£1Ñ1—µ ˜¦-2ª„µp§6í!g·øì¥7t9ñ6‰t£RÑ(£©–?ZiæAГҙ9Z¢ûm°NJ;~¬(%Å+ í»^’©»S×›2u¶äDäfÊ‘›3𒦳93åV!rˆ×|á ö{(¤°X÷RˆXˆK|î[N’ùà¾sñ€»€`hÎïà?Åê§´Ó+ÏÒó ¡˜WÛÈÒqØ6†Ÿ¤¢(^ lYuÐôõþî/jUî`àÀ_ã‚ã°tLøý·¸Ü·A8…¨V6!ÚæÊRÊÒÄ_ñ, ã]…¦L>ËÂT%ÂK»Zè4—–ŒCå¥ágc'©>>»¶¡£* ÚñŽg™±#µôœw÷XctNÎVÉ‚µ´Å"{ºɧ2‡ú²` ½”³ÉèaÿìËh I=€ÌÎDa}yxOi.´†e\*_DÚÀsÞىס:’·Ï›ÌjÏ,•RhëÓj`Õ'¤%mŽI(«J4žz®¦n‘KàÎ‰Ãæª² æ¿ÑtIfá"ý=R‰LÆôjZJQdÙÀü©:qUàkÁ7´WKkÚ:•F§°\<#çq²Bñm_›2>|:ýpû>HsÒ „Ѥ©i!++¶¡îdÅEe 95¹Kø«ËP‡G]Y+[_§GÑ 0{/)²NŸ^®RŽÚŸ¿KYzjêÔÕ0SIT)WÈ”EQúpªiœÃ¸«0øßÉÚ ö @@ -1431,11 +1485,11 @@ a$ âø ¼qD¯Þ!ø®\Ä1CH`p-­àG´zq™;/¡:fÍT ``º÷@›¼u 8©86¬¼~C'k;ÔÙ *è^i®¯°à,BÔåyÉ%ÀÅ÷,ÑcÌ|„½p6}ºûÊ`]ZsPÞ‚|æTÀаÝ81é –”t¥›Tƽvê¶qç°mšs‡è7?ÞÝú …*böú §ƒký‰ê½>pZŒI6iB7(ãxŒ€Å¦\uc¨[+¼G±—/ÔŠgàoß6-&ŠPYÖÝ0Ä~….Ã5sR ÿPf¹ß‘¨ªB¡ípÉdB(  ¯qmrØH_µz íÔw:y9 L{ÌnëA"¸\s݃žêŠCŒ}5o'Òï¾êñÆ'NÞ';°…[fc*ÅwV85Ê=|¯ŠO ˪À€Ädzå…Z)õ³ªæÎ‹¬ ¢Îùå˜á6>0ÜõÙ««n„½>>>/Annots 138 0 R>>endobj -719 0 obj<>stream +751 0 obj<>>>/Annots 138 0 R>>endobj +752 0 obj<>stream xXMsÓH½çWtqY§*Vüm‡[>ÈB-„@̲‡Tm¥±= iÄHŠ×ÿ~_÷H²¬À!+ÒôÇëׯ{øq2¤þ i>¢ñŒÂääjyr~{A£-×x3›/hÑ  ð—°w½UY¡-zkwTXº¶éÚlJ§éA%+E£`D*'uºüv2 þh‚ó½{gåötceR>S8ÇÚñWìoˆÏØ_<ÄyœXÀîvúGirShú¬UdÒ?1¡á°:1šó÷WzmÃÞ–ºIKMΟ x,¶&§ÐFY¬U®)Qß5å:Þ«B+<…6±B­bM;SlÙ¢ä÷´R¹ «ä†cìÚÄ:§\»'âüåÉ*àS¤Òˆ¶)ŠEþ‹Š“šœ‘ÌTžï¬‹ˆtº}V›²A3 Znu›ÅβÓ7Ë®…„†üëóŸ'Ãá Ót¶&”Ðp1 .ª§˜¸¢<^àe»’…ÍLˆ:I¾OÀ9ò8i’䎸 ß‚'‚y¯Nî±7}<­¢Í^'Á´CcQ‹uë»1¢Bi¦6ZP,¶>4@Ð6g“Ù³„g‚œÕñu]¼9€^Ñã8ý:ØÙµgÑÛ_—AaÐ7äb‡ºÐtºf4ỸaÒºn©šâÓÑ$8nªE0 èJ…ß7ΖiÄöÎo§Úh˾§ø-ôk©Îùí¬®ÅeYl­û#'yëÖ°ö@Ð>²a™è´ üVLî•I•ÐŒsºQO&‚÷4µ)̼:tñý͵`Aýšç’ú+©FõÝݲîéÛËO¯@×+‹~©=zzåe¦]®#0lµ÷ÚT l}Én&Ôìý¯€gÎQù(2g¬c‘qÚw,‹ËVEà…Û ‰˜B•©•‰Ma¸G,©°õ¡¯&ì°,i‚B P'­ƒ=ööã)2ùÊß  Îh"¢¢ª‰3`V¦¡FÀk„ƒT3(A>:ôóbëŽãÈËal7œöÚÙ¤sJ ®S(£ßÃØ –¹(Ô&„NÙ²ˆMÊ  M ,YN©†å,»§ã¹­h>GÖlBî0üN¨r8\·ê É„ê;‹ ?Â‚Ç @@ -1443,30 +1497,30 @@ VW Êù5F i«?¶µæ2ƨú€séãŽ"UÅõ‘ŸñØ4Â5àV%*ÜbY"iaìŒ!Ö8´2§ûÍâbâUkò²Bð ˜#ØÚåy4=¤,2ø‰ ýD‘.”‰qE,Ã-sZfG-§g] <#]„A€¹;6Œ;ãpa­9V¯f&Þs-Âä™ –QYO[ÐÀgRù†©½X‚Ø©‚·'Ûðœj\5ý–‡õ$ÔYµkâÐÎÄ1¸À.ÏoÕ<…óñT.4/øÏÎ>ÞùÉœoHRÅñ{úõéäòñ…endstream endobj -720 0 obj +753 0 obj 1781 endobj -721 0 obj<>>>/Annots 183 0 R>>endobj -722 0 obj<>stream +754 0 obj<>>>/Annots 183 0 R>>endobj +755 0 obj<>stream x•XMsÚH½ûWôek‰kI 6•Úr’u’Ã:ÙØ·8‡A  D_ &Þ_¿¯{HÄ@bW µ43ýúuOw¾]øäáß§8 QDI~ñòîâï» o0™Ðþb–<Šñ„ÂIŒÛ0Ž!M ž—XfwÁðáuH¾Ow ¬Mbº›Ë{î’^® ›–…žSYd43©^àw¥<»ûâôcTº*·Ê†×SòÃfé0Œöâ“Áh@¯Êb‘.×&-–dWšnU>SôºÌUZðKkÊ,Ó†•µöڻÌEjjKµÕaJb´²¼˜¢Mi¾ò[òÃëW”ÖdK¢u1ט£Š¹¨¬”Q¹¶xD…Nt]+óÈKÕùlÞ€èmÒ,Û[ÜPè3ß\Œ¦Ñ`D‘烅œBŒ_'et+¬C ð°m~QZRÖê¼²ŒÊè¾þ^el6óÐÅl“ô•~$…û¼ÄÅ®æÏõ·µ²>IÊŒ›3ðgP'ƒ¨…ª-ãmwÞv"EÌD¤lÍ<´DoÙ¢\{¢h<™ r 8 °ãd<™v©ÔRóÔ}xÊ4÷àƒëÒÀÈâA©.ýÇ4©M3­ ÊÒâ+˜Ø¤v%ƒTb×*Ûù“æºNLZqdK{Ôx  Þ2×Uþ®ò*ÓÂæð;OöHok'ÝGd€Ez˜Oˆ·?Ý`æ;·Œ–Oˬœ©ì³K}Ÿ¹rÂßsz©ê4¡Zø?–—¬y$6{ÀKc?Ä5'ìî°¶”îöõÖeÍ„1&tbOÛYZ"Þøb7qÇ8½h,üÞ‡÷oÞw`x#ÀÎ)樋pó'$8<^(ïó oÕ¥)×ÕÏ‚¹¹úxóîŠGï–î>¬t×™Mõª\gsöM³‰hî² ïÿ¬L¹Bú0Hoå¼· a]#£1;ᨑb[¦9Мé-Ùã‰ÈÏQØQyâ^ß›röéŒÎˆ-oû·2z¡ §gÚqZu'¶Âp*Nl¯gt]ðî}Ù°û«ŠGlmÔ¡g‡¨P­RÕöäYsŸŒ•Z'¨Cöq·éè¾—¯Q[Ö sa"ÂôçÛ6þíúDZ3 ~û$x¤DóXYx¼Ruý4GâºÂòmÍ¥Ü%)NMmð£8”ºå#¯„ä¤ÓèG1W¸6úFý^ùq3šˆ{ÒŠz]U¥±Ûš•˲èÄç(ô÷ñé„3PÑvprý!>÷k?½)OÁÜHIFÑ®-—b‰Ê”‹4Óõ_j±‡9} ?Šh$¸¨Ý.Ip‚W»:Né=þ~»¹¿ßb€´æÑOrìÀsà¿×´*sMsÄHsÐb /ºAMêL­¨>,T3îDÖÇœ²³ƒˆûAlfnpÚì ŠÊ™=7éÉõV*ì¶.c.¯ ÙN8£uìªþ>6œVæã4Ù<ÂUè“TוNÒ¥¥.´AYw \ûávc–‰$Êшt{»‚ŸÄUFgèkÑá\^¾~{y)Á}#7‹Ÿ meåϨvØõ ~ÇŠÏíZ“Xΰâžô…}œ0Hò99ˆ¼ç­ÎZŠíM¥@S×êò[ìÍjäG®R„œµœpÚ ?îVŠÓ{i¸®ÍPŠÉ°æ³È0KgÃ-¿h¨™Xé|ÎàOˆÅYŬ޳zPŸý›¾&ÆpFi89H(Ô8¹v»ú':¿ÂªyžJW¬ÛzîOÜÊI‘ÛàNZ ÷áýi›ª¤ÞƪÆPNPâZÎXç¢3ÎÅ õeˆ&~XØCÛ©Ó‘£—{Z¹?­Ê³]\~£EÙVˆ)½¿s"}J‚öÇ­rAU™VŽê8¯púg2w,V3sù( ›#ÜðzÒÐ|”_$Ø‘Ðp{õÏË+ú`Ê/¨nø®¬¹’‰ÌHß ïÇçˆÞ¯~’Ñ:áë O · ÿ{ñ?DІmendstream endobj -723 0 obj +756 0 obj 1576 endobj -724 0 obj<>>>/Annots 190 0 R>>endobj -725 0 obj<>stream +757 0 obj<>>>/Annots 190 0 R>>endobj +758 0 obj<>stream x­WÛnÛF}÷W Ü•‹º[vßd§nSÄIš¨(Šº(VäÊbBî*Ü¥eõë{f/4©(iŠ$ˆx›Ë™3gf?Œhˆ?#širAiyr½<ÜNi4¢åšo]\Îi™Ñ0‡´L{?¨´Úo­Ìh+ŒÙé*3TÖÆÒJ’TbUÈ,!ºÕ•º’”I+òÂV´Ñ;"«)Ód7¹9§J®e…;gË'?,OØ…óC#þõîÇ“ÉE2¤‹ù8¹¤’FãËḫ‚Þs _T.àùïwB~}óî÷·Ë—o^'[ìîùK÷ _öâƒÛ4äÞŸÃÌh’Œa«w?¾˜‡ç~Ü_$S~¾ÜH2²zD> So·º²Èµ¹¢B?heH¨ŒD0ÐÄ=úCIë^øÓôÈl <*ñå˜ḃ1¡@a†Ja,¢]Uz‡À A¢”ø±Få~ËU†ÛDi‘Ke¹h…N…õBžù8(©=¾¸AéßRÙ×ù|U®k|--(ó‘®Ùm®MZ—ð!lŠä*-ê ÜÚåvãXBYnl•¯j÷Á¸ ü:Z¼Xœ#ÅëƒLcêϘZ€raè½(W‚Ƹ›iiHiKzÍü”êr[HdŸóÿÏÑê5=TºÞR)¶[Nf…ì¤T ~¯—þWy,ŸŽg õìrâ”4]6W‘Ôx8r¬znº_UþMÝ÷¸{+)ŠbOŸê±¹ s.RÆõ’OÛ‚™‡¿Ú…fsÀTÒd˜LÂÇÞº,i6K®ZϸYqÉ ·;Sd%t v7]I¦\%©VkÈM%JTÁS4WàBéYƒ:¤ÀÂr N_øŽ[°esJÆî I"Mu­¬IÚYÌæ@yz9GFcüC§­½ú]ÑM½†.ÎÆhN;âËdšÐMôv'ÒM®$-+VÀEðâúüg+èÆµášp÷ùð8Œg•BGXd{ 0É´Î`›k-Aã-»–ïׯ×[Ô°®¬#SÖ7n4wß«žCl7‚ ¯ªû3ùs÷†}#ø&G;¿|¦3°¨Zµ?÷͉>*½ƒIŽðôRs…Éip;q âØ@{á›a7a‘Zh,«,‚Ô5¶Nžð³FµÀø²Vœ1KGPŒ6ÂÀ5*ÓV¶ÒE!+¤´ ýƒÆ`K¹ÝÓôa›À`[ÉG=U+†UWùß FÚ82 # ÚõË7ïIñźÒå¨ 8“ ¼<ЛÌ”SGŽð+3ðªJmqd =æYìKìpà3FÚÁó"ÚXºzj `Cíàå'©RyŽ¢DwÍKÌ4XX aUR)Ë•<ÔbWÐÇJ¦¹PÎ30èéVÃÙ~¡êðŒÜìsbƒÚ+}PúüA¶Á!4"Vø€t‹&Ÿ·/n XK I4ZSÒP,™\­Â;ùÀ#h€¡ açœ×Fäü œ·ïì@4QYT©®ÁLÌÃïݨÇÎÕ¬Ña Â¹>‹!:ºÉÌCÌ¢WBÝq›M¦é7€ºAæ÷=p¾Ë=‡>¸›H«] ºî³Ì¿Ñl$÷g ºGh…ÂÂ8ûD¼ïa21Œ‡Ô±MLêΚµ@Ó#v³Õ*ãöqs±Çî·P‰®¦nŠ=H›Žæ–™ÛÚ©@%Ýc *EA°(ó°ý°½~ )%½þú —µiïËî°,c¯‘&¹?;¶á}‘°»L®ÜhâÕÂÅ‹"V+Ú‰½“7Ñ§Çæ‰ùž³hó t©E¦¨V ]k·5•FY»Èw w޽njV{´¯Â!ÀCßY§ÿÓÞzúFõÁœþºØŸ¶Bzæ]7©8ÜÝ”¬-Æ?OAfA+"?Ô02a˜ãjUÐæPnÜŽ3“í°jûºò¯0ŽXŽãÌxüÖžGRñöŠ5e£3®ìò3w]ÛF±ö|ŠjâÆðieÃ'*W¦RtÛ8c›òG*]òRûõ=g4Å^óÙž3J(ãÆ-<ÐHüÝÑÇ…ðúùÓ:¯°á´±eÝŠ9„Êò <ÎR®Æq÷ýP©ÏDà ¦AØŸì?4d\ RH'ªiìuµ;£x³x`{Ì·»nº=œñýNdN«ïÜ~â'š_Õ/¬ÌK¤Ö6 u¨:Æì®Ó[<þŠnF°è„(ŸŸFÜB$èU®ê'Záà•qö œëôŽÄGšTZÛo:MjƒÚT³Ê~ÈŠSé?ÐËF?£A&ª† öÓðÝ$Br[’°}ä]Èm~ƒÛÆ2õ ØðZƵàà6~ÞÂ!Øù‹MÀþíA)™cáô}4/òÔ/ƒýšïç~w6á 3¢‹+\d½÷‹»ë½­ô™Zìñ­s+Õ÷/÷çc'rÿß9a:ŸâêŒNGì }ýËÉ?IïnHendstream endobj -726 0 obj +759 0 obj 1878 endobj -727 0 obj<>>>/Annots 195 0 R>>endobj -728 0 obj<>stream +760 0 obj<>>>/Annots 195 0 R>>endobj +761 0 obj<>stream xWkoÛ6ýž_q—vˆ IJå·Óm@Ó.[‡¥Ýð -Ñ6[‰tE)Ž÷ëw.)Ê$0±-‘¼ÏsϽü|S1{ÔQ’Ÿ\ÎN¾Ÿt£É„vÅ]šö£ &cüìóÏBÒ[»4Âc¯^‰{xáV ‹ß|@Nçj@qL³ÔŽ&cš¥n½K³¤5[Iz1ûxÒ¹‚InO«#ˤ³ÖnR¿N·Hê²ØÒFeeÊ–Tât.’•Ò’´È%a­\‘ Óç§$Ök©S™žÓÆè³’VâNbÉI6¿f9ü–Õt©³G³´%HWX±+‰O¡SÒ†he >U…LJSl#º2É{‘¯3ºoDJg©Y¯·gÐ[ei­Wz¹§î?ýÍÔ' W•½2¦̘ڽa4`‹¾ç÷Ãîÿq½±Gnc«¶îo­’O¦1­‹N*ï:ìòEg®tg!2[o ‘o³®‘Ϋ¹¹“çuÒz!i«ç[”MsDJo)•6)ÔºTH‡KÚ¡äL&™B‚ÏIE2:§KaeŽç×&_W¥,"ouиÀFwãÚN¯˜[“áx¶¥¼b`«z'ËË·ïo¼~³ØSO¥áM 0•òoOM.”Žˆfx¶Ø”}jÉqáØ´Àå‘Ï…¡6%ê'1K­þñ©&a÷`UÐp¤T$‰©téÂ[…wf“…¯Ä…´k£S¥—ô›V÷T*-ü”š’BŠ’«„Õò¾$[Ê5)Ë^øErkÞÞpI;2ˆÏûRbt‰€±R~»A!µ?i³Ñ„—¥5ã\k¬ ÅéB jؤ^ÙZëu„ˆ&f¶ùðƒã¥a<Må4áË?dt÷ã$·ßÓ°!¦aÌö©ÉæsÏB·­Éí çlÃjNÖµâ&Ï™-8uvÅήd!›š Ødª0¦|V×Q°£Õ(¥¶ v^/÷”Ù¨ïA`ÃzŸ,Ð'[.×HS]Ggö [bícì¾rARškB—ÈK”=r5—ù\6 |Ï%7$XŽ+™ª„ÖLK8-—…Ä«âKÁk Ä\” @@ -1474,11 +1528,11 @@ x tš¯\½zV£~<ù©kÊÀwð€©ß6Àݺ:WSŠÁÿ,s] Eèz¢ ÷ƒöÒt#ø3Éj)¡ˆFãô×È„èÇ»wøÐ)o”N$Iø^«}ÔT¸‡ŠEEêŸ&­s†£/tžfDUbb(UÂlÁjmWýa7S< Ã9fñ)¾ýSèXxôÞ.— c°Ç~WÖó“­ÖkðcúqÁëÆdm¡–XºÎ< ©íÛ×k¦ÝköŸsă€s–[›ÞºkpïØ‘¦¾hüè²ÒµE"à©\½ì®m/¶ÖÑ0#v‹ÅìÐÚ ÄŽ}ýŒår‰aýY‚*_~!§ n`ð§H4|q×´öZð¥dD#ô{Ã-Áƒ>ÈôGÐ0Ó?+]Ý“ÝbÞÊöòx´ÿs™™¹ÈþraÂ74®B"zFßDQTHM™-QÈkQ€1,[¬|÷ðÈQèé[êT¶èXû™Çx½Rs! ö’bÌVmK»«µ¯éë*À†Yi2|‚”&õÜÆ_8qåÛ»ûݼº¾=æ#.UôÆ$Ïû›lzÛŸjûc­ÿObƒñAcÝ­A%£=ù5»€Jendstream endobj -729 0 obj +762 0 obj 1656 endobj -730 0 obj<>>>>>endobj -731 0 obj<>stream +763 0 obj<>>>>>endobj +764 0 obj<>stream x¥WÛnÛF}÷WL– ‹¶.±œháÈ1 MSXEP@/+r%mLî*»¤ý}ÏÌ’2EÄAƒú™\ÎåÌ93Ã/'ºÂ÷€&C]SZœ¼›Ÿ\Þ¿¡Á˜æ+ܹ¾Á‡Œ®’««+š§½›dœŒúÝkìšÊ¦in´-©tòß+”±çóÏ03¦Á šé'0Ó›ãøÖ»Tg•×´rž>׆¥Gf21COÊhgÊXÒ>gɭ蓱™Û…$ºº®]!‰þð:á {õ "öx*­Oõ'É ’ÙÅðzBÇÑò½gmÅs´'ë´ œ*Ç-ןÃVƒ¾hBãT‹-Îs¢¤,©4u R6£­ aç|ƾ¯¨?%Cާ܍’LÀ£æÉäz­³#oÑCBtKô Š¥"•(E(½*Í“>¸XôL¢“ RͱڵØß¨Ðqë+éÙi `̵>:€_œSQ…’–šPoíÚ‘ƒä¶šCÀs;“ç´R&'³â¬‘¤±Êï‰!ìømAÆk„o‘™p¤G+7¸Û WåÇ@A é»Y­€m@EHpŒºîBp©Q%Bç;—÷ ¾0´G—ºL/åy)É3y{œ­ß_H,A§•7åžÈkœ ‰ꣂ ë8þ ƒÐôQÏH¾P-ŬRø±o©ßoI~œ¹ƒLËZm„ ×^ •nŒÕTz®TƒZ" ßk•jÎ 1.Îön•#c×-WµÍä @@ -1488,11 +1542,11 @@ b m«Hã†&\ÃF…u÷±ªÐ´¬J(›,+$ÝèôQê¹t_ét* AdS½‚&è¶ÖYÝî¤%§D3ŽDNU€ÍÆi˧ ÈUþv–xú9N ÖýG:b þèf­ú ‚øŸ1l¥SCHCîxÿ »6xõÌèHEV;•£³(©¥C[d54äq@Ô4Ƚ«b[ Õv›ïŸæQ_íø:ˆ‡§CÝæu¶8èßÏO0.i4&×4¾™àó¿<ðºÓutuƒas<__'̦ô£wË\Ü2zï½óÒ¶/ï† Öxe™¡Æ¦y•aÐÙ«3ü‡ K¸õ´üqÞÒYÛŽ˜^ôÊý‚Þ0¢¶ õ;ý´Ó«8®8ácÐj»Õ6ÓYB÷^ëwwl¹­ÎEq(¸'ÜÆ$؇8ý†(vΞ•u;@î2µe{8‚ÇŒZÆÞÝRÊ<®' :Ï`gÁ‡ZÈ ÔÚ«â ÁB=¢Ëâ|=œM1’ •AÜh˜ìâÚ¯°0äû„\T7™VŒ†Mrå8CvVÃúº™SOf»‹H7ËU¬38m…£2ÌܸžÁZBú9µÛ¸¼]g‹-í²Þ¬Ü<"%I7ðÒÆ×8.…ð¬ùRiú›7£ÙýTÇÚ°³ìŒÖ2¬1¹Oÿfrl¯,”:k/G[d‚/´Nh÷té-kWTù…d‚Æ/ ^å¢6MDÐ-æW¹IQ^#eÆòÄb€0YÙÅŽu,3„/>K&ŽÑZíßÒN30^Z#GoÐdñŸ6ÂìÐ ‹¥‚Ó£ë%§´Â)™tlÊ sÞ¬²Ž*¶P]ôt²N`ÒÊ(Ãn©¡ö®(lʺèåÙÇé+\?Úý>ÞMë¥låòÜí ýIÊËCÇ«×7\4²ºdD­"‡·fÑbÊôíbñiöáÃ|±ø5òü@}¶'Ôû™.;;ZËÀ}å¡ï ÀËr½± ºX‚·èEJÔºö®Úžiìß,~SàÎ$í +_ˆÌëdÌŠ`›W™Eo©22™VÀ’oÊŠÀ@åP­5PˈXf $„è• ®Ðطα2D0nê>0 ’^ÎÞ0¹nÿxwËÓâ3DDw.­°Ý”²ïðSýÁõ‡û“¡¼ñüÀÜx2nÞ“Æ#6…Ñö×ɿԽt(endstream endobj -732 0 obj +765 0 obj 1534 endobj -733 0 obj<>>>>>endobj -734 0 obj<>stream +766 0 obj<>>>>>endobj +767 0 obj<>stream xW]OÛJ}çWŒªVM¥à|&—+(Л[¸Š¤jmoÛ›î® ù÷÷Ìî:qÝÒJ7­ÅöìÌ™sÎŒ¿ ¨š éhLIqp6?¸˜ô£é”ö?ôW£>MÑFý÷Ñ1 ‡Ñ”´¤?Ñú³ûÛ{—# h¾à°ã鄿©»¡Oó¤“Y¢TIC¥²Tk¥¦ÍJØ.ÆJá·(S²zKb)²2¢wóo½ËqˆØ§Ãá8!dg¾’d¶ÆÊ‚Qºx¹ZÒVU¤Jzè|èã38>{xáãÃ$!Ìá Ÿ´ó0OÂuÖ|mwÊŒ¾©¬”H Ç¥ª@Ndª$‘Æ,ª<ßR\Y .£Z/µH³rId *åß>Im2$¤.Ä(bA‰J%Íh)-ɹ¢²Á FN‚‹¥ìÒ«F*²K7¹FzìˆÁ#¥qRiªÜ2,š^|^ã8‘Y™«…Uúº!KâÆkËÅ àªB+8Ï}2C*I*müS ŒîfçdÈ!>ÈæhÑ¡µÎž„•½ûëÛOo¯¿ÜD¸ßßTw¡CNÉJ”K™FD—(F>‹bËn«n¹–…zBñèÒ"Ë¥c‘ø¾>ÕqÚ>CT=µY"¸—”h‰´Œoh$qðµvœ ¼Ùˆõš1‰EòèŽX(mW­tbi7Ö­74ŒúѤKó«žÝHòï‹Ósе(“•gÃC‡¡e¢ŠB–©LÁ["&ò@n±E+ZG%Jã G"`ªâblh™–}ˆÒÙ2+E^ó—¸9€³Y`v’g²´´Ðª¨‰Ù J¸‰ª%Ëâê,D²‚vÀÈÊ@$I¢*Ž“í Y¢Òuőڦ÷¶€>ƒŽœ!îbTð($‘¡¼ÿ­ã{fõ̉èpòšPÒNŠ´ç¥WP§þûÜ[½áÄ_.äUD÷°½·àøF«rù—ÓH[\ž&¢2S €7ç2+ñÄ|ð¤Ì Oýè`Òl±£qeœ®½ñô.‡{o­H¤)á8M&ÑÙÚ¶USH»R°DCusA=ÆÙµw£ªœÅŸB\–•),ÁýWÂ÷t£ô#„Ýín¡q‰¡5äì)dãí¬à§Q„'`µÓ„*!è' Ídûš²T†à¹Î õB”•È\€ªtðƬco @@ -1504,11 +1558,11 @@ Y ŸP5hý½Êxq&ÀZê"³‘q àþëaŽø«ÆûFÀ³V;~à=u#4Ï.ÐÉf±³x¾Á¥ìÓgnö.¹Ý†þò¡. ‹‹È}:ÍW—µò{ñbØMÿTI§vz·g³_C» Ÿà>>>/Annots 198 0 R>>endobj -737 0 obj<>stream +769 0 obj<>>>/Annots 198 0 R>>endobj +770 0 obj<>stream xXMsÛ6½ûWìMJÇ¢õ-+—Œ“8§ušÆJ3í𑄘T‚´¬ß·IALÚi›Œ5¢ì.Þ¾}»ôŸ#âÿˆcšÌ)É/^¯.nWÃhHóëe4¥éõßÇø)$mxùêÝ’FSZmpp>›EsZ¥„Ã!­’þu4èáhK™ÓG“©DIKB§ô±0•Iûbõ&¦4yƒñú÷U²#³¡r'Ié)rQ*£IËDZ+Š#•†T¾Ïd.uù]ŸÌ“Ò[úleÑzƒ-ô òµ`ÇCŒ&ј¦&XTÖ¹´"—$ø»( Þéä‹m"*+ÉmR¸™õf¿(šƒ¥+š o1"úÝTdw¦ÊRöéáÌ€ˆFüñéÇ‹åQ̇#|æ4šÍ£Eý”у h‡¼%„¶"uÁv‚öb‹ÖB0¸œœ ŸsÆÑ$p>cuºŒ–ájðŒÕ9‡ìçPÃçœ&Ãy4 VÃg¬Ž'Ñ,\ ž±:YœEÅ 0X'ØŠ-Õ°u‘¹kxÁ¹jˆæY×P©>O—£CëÀyƒ>‰'¡2±ÎÀöÂät¯’ÂX³)#>0p ÆsT8ô^¢(~¬aú¤©bΊŒRYŠ}Ég®ÞÍk²£ÂÚ£_˜hbmª2ŒËUÌ‘naȯüé¤>=XD×(9¸Çó…Kü©Žx­µ½2”€,àˆ,a«Þ ú¹¢ëë21z£¶ÑÞdÞIS}:‚¼yeKªÀxG7ÐûAO\UŒfÞemuÖX…1vÉgÙ5 Æ¢¼Ql¼¡ÒIV¥2¥ƒ*w\Gµ£5`ñ6ìúÚ”¼á‹)mé´¡ã…·ÚqBPÒâ>>>/Annots 207 0 R>>endobj -740 0 obj<>stream +772 0 obj<>>>/Annots 207 0 R>>endobj +773 0 obj<>stream x•XÛrÛÈ}×Wôé*$Hš’ö%å‹”¸J²“^ïVée ȱ€.f ZµÉ¿çt HHI%å2%âÒ×Ó§Ï苘¦øÓåŒæKJŠ‹÷ë‹›õÅ4šâ:Äüñõ¯³ømtMË«e4¥‚Ë+ü¬¿å´â·&· ŠcZglhyuIëT,Li ?ä&y¤.5G©;ØÜ©”ÂN“*“yÒ)e&×ôfý£ï¼ÜÒ0 û_&|F…IJç]¢Ä“~ÉÍfr¿º»ýtw³š|¾ùíÛ*ºùíæÜ¤CSϖѱ ×ðýÝXÄâéóšÈçI—Þ8K.“Èß¼.é^YµÅÏÌ•D]¡ŒõR6¥ÁJ—x¥}‘žzR&W›\s¨d¼\DsZ.Ø+ê6_F¨Ž|kêÆÕZ\JL]½²ÒtߦJOF’'’ëç©Iƒþ¯­¾þºþòåîX¦³~+Åý•hW—ø}†ÿH/«[}M1Š˜¡žËé,º:ëõUtÑ÷ äÐß]Ï÷”(KŸh«Ã_8ú+܆ ·ƒ«‡ÿ…²Ïä]U&Ús+ŒEé ¸3Çêâªôˆo?…¾äÆn)7>ø}½ý0ðÒ¥Ô%U¡mIiÏ£»ÆÆ0 ¥‰&ìĸWÅFQ @@ -1534,11 +1588,11 @@ _ µÕKFˆ2è}«ñ2ÇÚ…íp¹XQ4iáR¯ºH}¤_qFóÅõ¨Q§|ñͤ›Ÿ—#‚÷D¼x¦ïgMg…Ã{ Û3Vg•¦ÀA¶>÷ÖÒñt°Nb˜ð#|XúÝU=²â­FóE¤¿Î0ÜÏ÷| o:p:ð§Ý>¤…Î(òLJ›'ÆßÞ Wïîß¿ƒîr?08¾Ÿœ9Òq 2Ç"¼œ 6þ‡£ëâr<½X² ì‡\ü‡,b¯endstream endobj -741 0 obj +774 0 obj 2019 endobj -742 0 obj<>>>/Annots 224 0 R>>endobj -743 0 obj<>stream +775 0 obj<>>>/Annots 224 0 R>>endobj +776 0 obj<>stream xÕXMoã6½çWLEÜ"–-ÙñG/E7Û ›ÝíÚÅ¢€/´DÛj$QKRqréoïRòW’nºè¡E€À²¨!gæ½yOþ|R! #ê (ÎO.g'ë>…!Í–üÕ`4¤YBÝ ÛíÒ,nÝ©ME–=Ò£ªh“fR&d¥…±¸C§ï¤Ý(}G· ‹•¦™R™!Q$t±’…=%RÙµ¤w3šJ}/u@XD‰Â·©¡ïfœ`ëv4úؼõF!úÔ m©¬M‹•ÁÇ+UX­2ú @@ -1551,22 +1605,22 @@ $ ›àóW%uG¿á¨ïH×Ñõl£ó#²]Ï>ø¡Ë)¨Œóôö’L)ãZž²¶EK7ˆñ?ÈÓX+£–H )ÔIw½êpO¿"©Ýˆ=xaú ByC+x²æsUÉ,sæG.ã^矕±h4ùÂ^è[?`û«'Uƒ9{ÑQë½Sà™+¨¨òª¶•0-yJ&tpª€ÞàM^½„W*ÛÙîmÚ©Ëš4nüî¿ÔÕ¢ç^  ðÅî)_›óF¦UY*ýD¾Ø1þísµX?›©ßb«…^†x^DcèÁ˜%d;ï¡¢î¢.8Ê<îÐë€ü\!=gXÝ^ÜdÑ«éìÝL°¿)j㜰ghÛbžáP¶è†Ç¼²¡fZºÍùwÈ­ãæîµ™]¢ŠS‹÷whÃî˜b¡*ëØæâ´¨$1 ‚S–"¯ïÀÔqå…úshæ…ß W’ƒ¨Â™$Žå¤2“Âà»…ûn“é[Ui hGãëp÷ÛÃ<¤Á`à Ýš^Ü^^Эþàßu&µqqÖ’ÏÖC,o#7>GÁîŠí‡wŽŽ‡1,‰£¥£^º_ÇþC ÷¿žü‡äŒendstream endobj -744 0 obj +777 0 obj 1869 endobj -745 0 obj<>>>/Annots 229 0 R>>endobj -746 0 obj<>stream +778 0 obj<>>>/Annots 229 0 R>>endobj +779 0 obj<>stream x¥X]sÛº}÷¯Ø>YéH´$ȹ/wœÏúÁŽo¬ÛL§îH‚bÐA+ê¯ïÙiɬÛÉÌLñÀâìÙ³üãhFSü™ÑbN§TÔGï–G'ŸÎh6£eÅw/.´,išM§SZ£+»U»†‚®uë@q­"þÑTê'mýF‡†TÐôämë¢Æå˜ïä&9i£LIÊ•é¶Ã°ðfùýhJ“Ùi6Çb£U«‚âÁ=m‚/ÛB“ÂÀMÑZ¨Ò*¶Xk¿|M­3ºr;â_dÓ)žã\7‘V­nšc^nr°ƒÈÖÆ­¨öð'ŸŠ† И_dgÛÃü|Ú=îQÂÓÉéÛì‚wðÔÚEãml°á _Q£ê\ÑηGÛðŠ¼º¼GŒžŠ|¯Ù5Q×d"níD­+uÈ蘩YûÖ–ŒS®r»Ãž±QÎ’dõ€¤FNÃ!`ñ@Mg…wUÆê1ÃhµJÆàøMJÆÑ?W‹Øaz QU…yéîÃ{jÚÍÆ‡ø'€»v¤ÊÒjÈ:Çßá6&#Q“Ï£B>KºŸŒ"zÿ÷{êÁª¨¦v²Åž†û)ÖºxÄ$&’o_¸§áÿHuÏ„e©‘»Z=ê„ê`—l šAæÁèjLÖ#“ßz·z®ˆ0ú1 ­tDY»ƒdçº+S½pm¾Þð{HvЪ¤¿}ðî¥å‘Ãu¬-iWøÓ×à»Z¡FŠ…ràƒåÌÞ‚ ƒÅ<ªËƒ3Ô˜ka OøðæÏä6åL&ï4ã×¾ÑäLwt|}\ã>­½5%´åOAø&¥ñ¹XtgœÀn¸ôQƒÈ™Ðf…g/R£\³…FÕÊ@VRÍkûøÉŒ'‹à›F Îè›L#ÄjŠ5™Fˆ+R“ÊúÅ9Aì~}Õ¾ñôž&óó½ú›ß0ºñU"á þu²Šî’ÝÕÅbà®øÙ¤_zéIø&Ûp,D0¢þ [š©½ÃÅÆxœš¤]ËÔdjm»”[;ÐÖÄŒcû¸m•ǵùé"›Òé”|MóóËlÑ]u íur<ÏððLLÿ±Œ¾  t@‹DÛB§à©Ù`<M@¿|Öc5™Í9Ï´9”ÕÔ{1ì(5½FZØ€æÓkœˆÂ]ë{ °Ó£ ‚•º"ÓJå  D²?ÃÀÌ"9ì»Zgù‡Xf˜ô‚/*@‡ñ(?î‹k“e4µCûv§ ØÙ%ã9Ç_H~•Ngoi†£H…Š™Ï¹jöÐ]f—¬ ãX›bðVšà7ãJ¿mèí“›¼ÆÉ§ž ídÎG¼Ñ­ú—Añ–Ø^å­õ[–·î! ktÍ«k3>˜•qÊÂŒ~¹¹º¾Í"ZŸ/p4ÑOÆ·Ý @êÚ*Î?ÜÛ…]le¸#ö]¢Õ‚Á¬ðV9zcÉô %Å{ §þ± ¾¥ÑýFÊ‹Z‘é˜1¦ßåü%Ë&Pž‹bLù޾ÂÒ±™¸Ç¿-º0¸º£àTN æÊS°-áq|»‘³þ†fÂü@esc{ÁÕ¡–Ã:%¡< 7xˆ­3Ü¥Á¹*ÀÀÃãv´QÜJX:x¹6âÀúµX¦ ÀÙà” ·ÙE`´j¸ZbîdòXht²“†“_T!Ì”6ÓE†€®l㥿¨@ È/ãºI‡xáÎXœaãàlQøÑí€ETµNNûÊœ®PG)DŽ,èIŠ´ ÏOp2Â"+o‚=ØEb’P½ûúåÛýõíg.댮ñQ!}w@ÆaÈuÉŸy€iOfá®° ˆ!༇„¢Š™äv°áþûß>ùtÙu¬ÙÅ"›á Ô¹ôÔÑýÕÍ»+º þ;^?t–L`àq“ôúd!¢8úi-<[œõöãì’'Bûíè?ˆ>ôendstream endobj -747 0 obj +780 0 obj 2245 endobj -748 0 obj<>>>>>endobj -749 0 obj<>stream +781 0 obj<>>>>>endobj +782 0 obj<>stream xW]oÓH}ﯸ+m‘Ó¤!iØÕJý (…. }™Øãf¨í13ã–üû=÷ޤ¦íRMÆž{ï¹çÜoC:ÆÏ¦#:™PZœ/^^i8¤eŽ“Éé”–'ÇÇÇ´LçÞ7Ú“Ó… :£`)¬5ySÝzPØ;[Q¥Ã£u÷TÚL¤œ¦Ìø´ñÏ› ÏO^§ÁØ*!Z¨r¥È7um]ð”ÙR™êÅòëÁ1 †'ÉÖå^´½9Úñ©3uÀתʨñÚQíln @@ -1581,11 +1635,11 @@ M ŽÜ\^H8joÆh»a×óþèÂå]Fvº¸éFr]¥nSwó#ËšçH+y>c'20"öò*mW·Á:ÃÊ–ÞŽ&Si·»àøl»]u[ÒþpÄ‹˜Œß<Íó$S*ÈP˜\ƒÝC¥) ðÿÉè`tŠunžÂ€ˆº„ ¥ÝLÙµTá-ŒÀäƒO‘•éñåÕ«6âáä8Áô+²ƒaÅlœ ÙC%G%Ö+Ô.LoÀLò†ûmüçã[áÜd¢EÊ gpœ[<ݱ0Ϥ”í(=â9V¶Âœþˆ‚\²še`‘1,ÂÚÅ-{³A‘«És¿@\ΈPÜñpV-ð #‹ðLc×d1Û³V{UÍðVÎætœ:X‘ìEÍÙ{¶×ÑÈÊ-Ð^ʺÍ" Îb‹s<µ=AUTni¥³l5 |XœãqTäâ (+ôé<ËQùPt€žnó7Eþ¦#&íÓÅÙõùÝ8ûÍ….±}3¤²HuNø­A|íð‰~<wZÏøRÄø÷Á¿Ag~iendstream endobj -750 0 obj +783 0 obj 1909 endobj -751 0 obj<>>>>>endobj -752 0 obj<>stream +784 0 obj<>>>>>endobj +785 0 obj<>stream x­WïoÛ6ýž¿â–!˜8Ší8N\`’&i,n»ë†z(h‰²ØH¢+Rqýßï)ɶ’}Û¤¶EÞwïî¾ô©‡ÿût1 ³…ÙÁõìàvvÐ ./iû§Xâ ŽõFø;¼¼àÏü)$Å|a¦ùƒã§w8Ò§YL]žÓ,rÏ{4 ;Ÿ¦·Ç³o§wÃêL' š%’tžnÈȰ,”ÝP¦#I´NT˜à•¦”kKk]þù"©}/¢L‘á·ÒXô, %¬Ò9ò¦éÃ5•F”Êg™6 ¸ØÑ` 9¢«Ð–l£K6Ae À‘Maª„}«däऑ\ËÈHi8 ]8 §"[Ê8–Ðä³:*§L+ ÎzŠE¡×^ŒÛÊW†e¡ËÛE+Y —|IÁÐÍ[Tôs¢Rga1Õ¥B|p·Òƨ£Š¡Îcµ,A&Ñr ‡Ï𠓦 æ#2$›vÉä¢Uä©^2 LÙµ¦H„Z¸ŒTËBæ–â¿t3?îrpi%h©uÔò¯")8B£‘Îߺ$“è2PÇLf Dbat7o=’…\©{"ÉÓççþ‚&Ò^ߘå"“Žì®x|•]žìÍ'˜ -6ôYåpGeb7KªC.(׋QnŸˆ´Kǧ¾,•I·]KÔÈ_!畦{ðpЊëxåÛ©Æ5Ø M«Z|͓٣Fµ™ÊzMÙ‰^ÓB„O5#=guÜÔÝqk 9"}Äõ¿†U‡sN‡uÃÒ¯®Uä}Œƒ.ˆVN‰¯rC.×lx£ÜrÃ7r÷u±;æLUÄ@»¦„•\:ÚŠÿ½”ÆnA ê)Ôfn,B&Øa4êéf"LTîš‘±ÊQfà5=\ cðCTu8?¦§œ«Ÿiî….­v}5ÿ+ñ€Æã#ÄlתLVã‡QC#ê¶Av¶Ði* ÊåÚC·69¯ÏsaZp×¥q Ð!çå¦Ã!­DFsKÔ£ÆH@ƒáÍ0Ù«8k&OfµŸyÇ‘‚ц(¦å÷•ºT¨eb›óYn­š‰3PIb€É†»Ô[èõðrS®1íʈ¡ãƒ@WF2V¹r“€™<ø`žØ <´¢º%†]À"ç#èÒf;NDº›ª:hšÎTÕ|¾aëùë'ž“§×{üøŽ%™†Ã>tŒ? ÎGÁ%˜KÓ/߯>ÚÞÉ*•÷ÇR\sÏÎÁ¨z²+ÿ§wcêCžb¬gãKxÚ•{|½­¦¼W¼ûÜØ¢ôƒø M¥uÚ5yÔ"c?±Ø|,t qE?½;¯7ŠÁbx2³ ~EŽó ¸Ç{ÌYe \ÚØRNïFµ:;»p‚ºÝJ&f·?±™µ¤‰fUZ­tá&ËVR\Q@ßñ_<\y$Of;•3®ƒ›ˆWïb¬kÏOŒï°„Bˆý @@ -1593,11 +1647,11 @@ x ¡:¦zJcPÅeÊg”îZ+¤ZEZäTÙ*…žAÑ‘˜±blÚ«‡·V+‘‘ÈT°°q¥ÞI{ŸÇºžu{WÓ!-¹çÑð>>>>>endobj -755 0 obj<>stream +787 0 obj<>>>>>endobj +788 0 obj<>stream x¥WïO9ýÎ_1é•Â’„R?@9¤ê åŽTí©©*gãM\víÔö6Ô?þÞØ»ÉfÛJÕY{~¼yófòù O=|÷é|@§#J‹ƒëÉÁ“ƒ^2Óî—]àŸöɘ†ãs¼ðK+)ÃÙõɰz‚—½ø¶ð¶¿`èäöŒú}šdìp4>§É<èÑ$=º7^^ҳɧƒ“Ûauìè}þ”æ4‰rq1¢cZKZŠ/’æÊ¥æ‹´rN‚VÖÌrYÐz‰7è­Òs³v”æJj¿BS!”öø!Áö{tÜ?Mð~”­eê•Ñä ù¥¤÷KSH÷ÜRÀ®Ì¤_K©)7 ¥]B4ùîTQ:O÷¯'lÀÊÌXÉnŽ~f’J‡`9Ž7S¹¤•ðËä °÷h4¼ØÜ@òäö¢gú{°“q2À÷6ï‹wôÂèL-J+8±}DÓ`„z!÷‰!W®VÆz¾‹kb]Ú˜’BNˆ9€ÒAò€ˆ¡é l+ é¥MèQ3Š8Òf ¤S¦¾"OÇ` @@ -1608,11 +1662,11 @@ u ÷|Þ†@c8d„õw»†½Ž ƶ΀[ºTZvi{†•Ö[“ÓƒÐ2§oøë†Ù ‹ü1–ýzÓîÇ·ðÎÏ}ËSЋ°Ý‡1r§RkœÉ°‚Ç玾q¾Íý94Ø1¡ÃWf¶KC5½1LØCd>>>>>endobj -758 0 obj<>stream +790 0 obj<>>>>>endobj +791 0 obj<>stream x•W]sÛF|ׯ˜â å*’–d}ú%%Ëv¢:YñÅô¹RA*µäš–Ù]ˆâ¿¿žY,HùK¥¤QÄîÌt÷ô þ<:¥üœÒÕ½º¤¼>z3?zùþœNOi^â›Ëë+št2;99¡y~ü¹)´£/¦)ìÖÓÍÅ„>:[šJ{RNþÛTVº ÒÙšÂJãS+·£»´ÍŒîKÚÙ–VêIÿ5)ÿbþõ脦§¯fgˆ|<¾«Œn•ÖÑ£}ÒUE:l­[ûñ„/hä–MŸESPÅ‘ÈçÎlm Ž,¾O Iô7~ÒîI»Ù ôßeJ㄃”ö—é¤èCP*›«Šj•¯L£i:ˆ¬ha©¥2R_n›\£[’³ª6Í’RÉ2Rå×TëTÅÙåìœü`KÝR âpŸŠ—~0¹³Þ–¡‡”I2 -ì3!bàøô[ëµ›ÐFyØ‹ H®ñÅïÄÉiUpN_[5 Žý>#šï6§¤ ¯ê…"Ü àǾ»“UkÊŽÁµjvdA¯K_­‘?ŽZÒÏÆ‡ -ÚZ•Ã…ƒÈ@ç HξjY1Áä*@¢{€MŸÂÙ„ìwr6ˆ °ÀˆÂ t§<©Š|»ÙX<™½˜$"r þ„ºªCÖ~Ý‚“œZ)Z!ußæ¹ö¾l«jGOª2"}pД½®„wÓ wji:I|éJçÆ;íÇÿ³ÄÔE7”ÇfÏm Ci7à- ò-´_»™H ~eÛªà¦V‹ @@ -1621,11 +1675,11 @@ x ‰+ñˆ—y^cžƒñ.†5ïæвã:Ž ¬ó*_cÁ`”½V“˜×À³ø%ªÑ/P<[S?½º™]rK½Ú7Â¥ücÎ(Ê$èß§tYòÊ5²_?%ž¢eÇûñ²2E‘ߦZ²É^ˆõÌÞÞÎÙC…A‚\÷4‹«mù½ “„•—uóbÔtÛþÜcÚmB¸°[ŒºIØ•} b559Zç°³_úýyÊ˵2Ù]îtÐgºŒNÓÑ êQ×:ßCœ|N'«×µ-Þ|»]upü"~~ùþºë«Óó³Ù)]^ÝÌ®™ÁO·ÞܲJ¾2IomÞB^AøT$ûò O¯Î$™ëÙõ æwg›Ò,['Ñ=^»\›óÿv\7ÔõK÷bø™ßxºn“×éó«sD—/Î8Ì»ùÑ¿þ ÍÂK¢endstream endobj -759 0 obj +792 0 obj 1803 endobj -760 0 obj<>>>>>endobj -761 0 obj<>stream +793 0 obj<>>>>>endobj +794 0 obj<>stream x¥X]oÛH|÷¯h8œHŒäoûpÞu‚3°ñåÖ:‹Õ‘C‘ÉáÎ ­èß_uÏ’iìÓ%0 ÑätwuUuÓž,hŽÿ º>£ó+J듟–'?_ÐbAËœ/]Ý\Ó2£y2ŸÏi™ž¦…N·ä M©i¼n¼#“Ë÷Öš¼¬4µÊ´:uZÓ¤2ÓÈ• eÚ¥¶\ëŒH­Í«^}˜’j2\¯´×rDç´Mî—dì‡å÷“9ÍçÉâŸÊo¾Ü?‘„ÈîŸÕj[6R´Vé¶k©ÌÉê?»Òê,!>h†rú“®â¥³Kšß&W|úcNªªHWNS®ÊÊM©lR«¾;U¯ÕßÒ\wBATéWÜIÞÐZûÖ K!‹y(è#Ò'Û5H¨EBÚ“·*0Öl¬ªG•¹.-HḴͺºågíkÓ$ú‡VÆl‰kVÍž´µ|¼nõ.‰‡]%±½é¨P¯šTšj'iª†ž–l_µ2p `´Îã’'àeªÀØA'ÕHÈDZˆ&7‚øpN¹‡õ‹Ú"䛂§\‹þÁg‡öòçVr@ÅqÔ×2-v%ˆ3¥3‹v…„…—•y®­nP%)‹Ûøq&&·þUUàfh^€_þ´<“éòzŽÆ_Ü\ãó~ðt˜™{@Ž›7Ô¿In’³ä2¡oe“™ã\¿»u^ùø\$sNñ ð·oÌ7]Ó8b\XÆ4Rq¢ôªï ¢ ò(1;=ó›–(9vn„PeÒY ¬55fG®Õi™—€ÛÖt›Ù¡¶ @@ -1639,11 +1693,11 @@ W ö®ÐFK*·5Ìw”t+ò¢ƒ‘ÏzåÎ@ð}øíª×I×TüÆ2q-ýžþ)a£— »oÇzi•s;c3‡›÷ÚM¢Ø5!ù§§ŸýíëòñßO‰ÿá1ñ ˆãaùŒ!úÃF¥„{ l•e€+žÉ(Ë>-‡ÂÊÆ+ù'Ì3`F&\Ä´a‰Ø•l¦“Ž|ZŽ©‚J†× VR|…ýo ¥sÌí_ @(Mm*‚`û`ß<öM7FŒ#K7!V~%”Û­e4÷oδÞ3/3b7I+xïÌc§9D ûøù&¾',ÎÉ9XÈ Ôéóý—Ÿî £à;ûÖƒI1ͱŽ3$Rÿâê·Ï®Ïð†ì4¼e±ÛEó¶“åÛès|€#þ_]ÿËôDî¹ «‹ë D—/Ï9 ^ýþsò?B$“endstream endobj -762 0 obj +795 0 obj 2000 endobj -763 0 obj<>>>>>endobj -764 0 obj<>stream +796 0 obj<>>>>>endobj +797 0 obj<>stream x…W]O#G|çW´.á$¼ØÆŸHyàŽ\Bt‚}º‡8BãÝY<ÇîÌffãŸê™õ¾païzº»ºº«öŸ£µñÛ¡a—Δ–GfGgŸzÔéÐ,ç£!Í2j'ív›féÉ_ÅSZP·/êÇñZT+)5e)µwde*Õ³ÌH,Líi2£Êš\Ò]_âFá$™<¼o®¼Ÿ};jS«sžtèä¡ÞKë wñ—顬 P8~2«´ÉÕ匌=¥ÜXT oìzôtsßÍåäï„ý:;B%4œãµ7ⵋ?”ÇÊÇMå¸ç¼2Ú•>JFI7$ôUé̬—7•öYZ>z‡ªé’W3[Jœ­iã—J?’7伩hmjr•LU¾æ…FÒÂ/Q²ðáb¡žêbØ @@ -1656,11 +1710,11 @@ P  9"ñþ<€Œ°:g s)e3&a<öLŸvviVqDð¤ÂžÉ¢ Ö »îÝnÑn·Ã"è1äíUﶉK—²~ÁŽsسO£} P|T;™^Þ|¸d+üê•Ik~6 Æ—¿Õê„›[Ã.žç²“è¡yÀsõXC]ø1ãZ¡:å÷PÞ©ô*HÓ½%£ìBÁáS{ÃØNì÷øLÊŸGÿVCendstream endobj -765 0 obj +798 0 obj 1723 endobj -766 0 obj<>>>>>endobj -767 0 obj<>stream +799 0 obj<>>>>>endobj +800 0 obj<>stream xW]OÛH}çWÜ—ª©(+Q +´"°ÄUÊËØ'SlwfœÔûë÷Ü;¸&ZU•hÏǽçžsîõ?3:¿ÓÉ%ÅÁ×è`úí”f3Š2<9»8§(¥£ÉÑÑEÉÈ­EIn-‰^T™ê­¥yD‹«ûɧèÇÁŸMN±aÔ*ÍFJ°1–¤JëDžË”„%©p”!AU.TI™Ê%‰2¥Ê¨Ò‘ —£—‡§¿þ|zx~¤­6¯Øï”.I›öÎÙÉä˜ï ë—Ÿð„݈ÙQ%ŒS‰ª„“AÐ.øÊk]:£sZŽnî¯îæTÈ"–fLFÂ4ݺ$¬Ëí»{¿Šäµ®Þ¯\~šP¨¬(·%gjI‚{XLéE˜Š>Å1ݨ•,ô(ÜÚçèaЫ •‹a²•Ñi8;& I:£íZ%kr/Õ=™Š\—+Úù^ ‡å‹4¢l¨’ºBM‡Å_i ÛÕ€dµUåjLVS.ÝGN°!§)É¥0ž$B™áÉ·àBÓ»™lc,P€_kÛÕ\ûZ¹R–/H…±°2`»û™ „‚‚S(¨B¹ê‚¤Ò&F„ÈÈ(§D®þ lR%*S„Ï\#F• ¥œµï%Éjµ9.`¼ŸKõ“n„,ti¥'™©K,ˆ… ƒÛ{’åF]8j†ÈæÞ\?BU•«$„iuæ¶ÂH”^â/Ï ÉÁ­iSŠ;ò¼¡\‹TĨg®b#v(q¬ÀUVÒ«+]Nèb‰{¤þcl ¨ÚÁÍ’+íÖ H| @@ -1673,294 +1727,332 @@ $ ½’ùYãMS~°ÍB;>#V¾Â)|êéùéäïÀ8ñógþá6:øûà?Q$$¤endstream endobj -768 0 obj +801 0 obj 1722 endobj -769 0 obj<>>>>>endobj -770 0 obj<>stream +802 0 obj<>>>>>endobj +803 0 obj<>stream xmR»nÛ0Ýõgt³’¬HB7; C“´Q·, ue1¡H•¤äï{i…÷ò<õ'+óW )±©¡¦l×eßn+º'uÛ ë‘‹<ÏÑ©ÕÖL.DÐ;ùOôn’ÚâCƒQ¾îoðèõ$yx½ ¯œÞCÏ«Çë«ç »ÐSÐ^¾B%CJ5ž#^t¯YŽu±%+XñyÍd~g ;©ÞóyvGžBY‹*!t#@Ú¼˜–,fé£Vz–‘À^<ÍF+µ³pCZÁÓözå‹ „àÎÔ~±¨íþ‹èà6ž¥$-Xwt uWnšÙÒq+Ž,CÇÀRö:Dÿ)èM—q¨Ë ›©Ú†ï%O–ÊÚSeE݈T'·uV{Øm¹÷J*rdê01ÛÑfB_/¯Ö˳U+ZQ puƒÞü’Æe1•’ ßñD1²ßdä—“SºþÜ1S ÚPH¨US‰–ÿ!Îþ²>™ø™ý³Á•endstream endobj -771 0 obj +804 0 obj 383 endobj -772 0 obj<>>>/Annots 240 0 R>>endobj -773 0 obj<>stream -xXËrÛ6Ýû+îxSyF¢D=,«3]¸IÝz&iÜXm6Ú@(¡! -ëï{.HJ4íL“8E÷uνþë"¦ þÄ´œÒìš’üâÇõÅønEÓ ­S¼¹^ÞÐZÒ$šLðM2x·E©­"z,­ÓfG"ߊï<ýî•É^uµþóbB£é›·Ib+S’6©u¹(µ5øLÂЇ÷·ô^;•à¬#obÛ1v±íÑ,ަ|À*Š#z¨\a}8y|7§8nM—¼d½×ž¤Mª\Á’T>qz«<ííJK•W'{²µGp‡|7 -^çH¼á¯aϳ,øÏâYíïV’£)÷Š|¾-„÷¹,6W”êLED÷ˆÜ¾‡oëD;%$ËøÃ‘ökh+¼N¨2xãKa$çצ!OMJ[ˉ5‰*Jl2²Ù|°î+o8ˆhž:6´Á¡Y¦$¼ºCì9œQ&”D8T±DU*§|Ï0ÛkK¦•R‘)ô:•ÂrÍ™Hm–Ù;ãqŽøŒŸÖ £€%ŠùÓçŸ/âÉ$šÑbzÝPNSD·jž2zd0•‹é -o»(üT(Qðîå±nGƒ}YßLJÃ!²XœIQDÖíÆ/—°||—4€-a -H—ƒÍôzN‡ßñbÁxsšáxž/ψdãk¬ëú«2aTyÊÛ‘ëÊü“ÿº#lö‰(T”Ø||ªïÿ f>‹æ4¿YÁ9ÝÌ¢Ióð*¼XMÎÏüÿÕ–ªÆpSÒÎ9Å3dôåq½’#ÙµýW'úî³Ò`ˆ¾Í´GÙ½߀éÔbˆ´«´„W¶/³úñèK•ӭ̵Ѿt<Ŧ½Nö Y8±FI61 -8íT h)*ȧ„ƒW`o®Üq2 pæövL*`x.Ž ²·´U´WY‘V;ä«ô=‰iÁTo(Í¿|ú²þD]î‰YÓd4¤pÆGsBW€Ò<<5õyPd|¶ žœëšòèáý»ód,}+¹Ð¦ÄºÓöH÷;#mé­ -%ªuiŽ€áÍÍEžâÝ#mFÛ´g«i¬ZD÷¦tVV 7ÿ&Îi¿ÆÔ™êÇÒMóôg׋ޱk‡\òqÜ–‡¨­2„¦˜ê]ÆRk¥s.ÌlŠDÕ6ÙJ÷oçñË·g¼½žD‹Î^4§×µhƒê{{©LâŽEIa@X'=ý@Gå/¿UŒ”v°ò’ñ¦tyL´“Ö_·“pÆÍðÅã£Ú£º»CØW æO=#r5¤Ç¿®O>2Uö¡ÅóTƒÓ”ì…Ùj:ç¯y´Ã2ÍÄãV<µ³¿T[…¼œ“¯êŒÍ·Â¼Zïà&ðãfšÈ0æ¼OÐÝaЇÁÃs¶(œ…©‡;Ÿš`ØÓÞ™pˆÅTùÓ–™Îyð´¹rëåÞV±úÍUŸùð -yǬæžF;ÐH™µ_«ÂS^áB¡+œèÕ_ŠfÌ"¨Ÿõ’ÓJ‚&¾Á³†PRè;åÁ¶çqf:Ú§Bñ0y±`‡F¸X㢂j½{Þ³Ü^ Æ9l‹“Ã7$lP°ä¾’tð‰pFAém®†=»%K-ü5ÖŒl(ˆ ¡|a]Ãß*%9u,L -¤zÆÓ©(­q¼F²ƒpB›=HètUέWð\»E='¹ß×-K>è:è+‹¶Td:áî-Î’,Ѓßу”âlŽõlTÓ—©r­êù@»Á³Íü)‘5`-=?šd3ˆ7Wõ‹3A™.½ÅÞôàxÖ&À͇Håˆaˆ”@ÙB÷õ‘x‹ÃSÝ4C yÝ€u—òõDúÏŒD&N•NwDÔà1W˜œµy )ÙvÛ^¶DYBjWL´¶º²;Wg -Ø6õ\hLc"7‘!# |æ)þYexðÝK¦HªQÍÍàóýû×´»e­ iZe%óá"14Ñè³A•ŠºÐ“0WŠsØ x¦:u\hÄôC&$Ð%¼Ê e›è¶Ÿ1,oî1£œp'I@µ)§+DàIÆ 4q0ׯ‹\nQà)‰B˜…SOõeÆ3¿àB/Ï zãÛ9›Ø/êÊ íDÐÜÇO’w>>>/Annots 232 0 R>>endobj +806 0 obj<>stream +xWÛnÛ8}÷W З°Ë—Ø.PqÒnûÐ6[Èmh‰¶¹‘D…”âúï÷ IÙŽÜî‹A$‘s9sæÌä©S?1M4¼¢$ïÌ—÷ËN?šNéøËlðЧÁp]Ñh:ÁßÃ!þ4’Ö|aæð Ç/?ÌhЧåÖ¯&SZ¦î;Þ$7[QVÒÐ,¢zG•&Awµ‘Ùž"_ ºÑEet–ÉôõòïNŸzƒ \Üê\¨‚_±õïØzoGþ<‹âˆîŒ4ò©VVU’¾I‘ªbãoŒ(ŽÃÁ„ÏÏåZ#½®)CUÔ ¹¤ +ª¶ÊRâCíR™Ia%åâQ’E¬ø,*wWà!Ñ9lUb•IÚ©jË×jSx'Áþ¦ H1#õíN<âÐÇÓPæ4£ixÊhápÅãOÑóÝÝÞ°”J›µ’©X’ìPçÕ¸p—z¸Ôûøõ~ùõå)W8>#¥ñ$F4¾ÖÔ»)õ)ôãáËÂ΢ADs‘Þ Úz³|Õ1òäøýÑr…G/¸Ô…LßrÀ]ž%ˆøSÔíÑÒV!â­„5ãL²ÿBäÒ(…µð‘¾Pµ/}‘™”ÚxŒˆ–[ùŸ,3%­ç¥ré5’as°ÕuupÕ%|!ùSäà¼{[f"AΈÔ?s¨¶å·4z­páÙ +m•z ÜQZ×YF.9xfüøuD×xëºì4˜ƒ†Ñ(§T ¿ÐƒÎp˻սD°^Ðâú³c1‹ÆUäd !pnÓj§é,°ŒÀym˜3ÌŽ÷s l˜sþغ†´¨\˜ýùÅV0?.Ðg?^»BjPhæ,4Üuy~ÝÒ‹9߈¸žÄÍz©§ð"–Õ2ÑåžãæW'YØÝP9|§-䔄‚€vZT”’Su°úïÌGK íbæ™»ÚZIJ‘N+Yt!;DШçoSôíþ¢§YÊ}ŽÂ©nOÐÿv’@Dµ©¶{R^&‚(0Å÷œlK\³Õˆêž OGÔ9a1spºB< •±ÎDtë•›Qhå[)´hÑÀêng†•ÚZ¦Í‰´4#¼Ó“Œ%ÑëøK AË]ªgkcÉ©]¾Mö…*Ы4 ¤”ÏÏ ½^«DÁÇã«,1¬0<Ü<õ ACÁSŽ!©¡.EEþÝ@=ŠÊvÑIV7óôº:ècª1äÝ1“j%VkëúÀlbAp ;¿Æy÷ê ò ßEÁ«n «QRÜF[8¥gÓß7™^‰ì¡g!œ{h›¯"žÆ 1ÃèÜXY½a«—ú4ã †ZŒ½Z°´óø*é-·Ùüºqmˆ·†BhÊ·´—м<á¸ha%œ8N»»òCiÁãGd¤‘, –2…-CÐ÷-Rµ~fÐ÷BVÎæÙ-sMdVCöŒ%2³ƶáÖ>>>/Annots 249 0 R>>endobj -776 0 obj<>stream -x•X]sâ8}ϯ¸© -] 8È<-:=ÙM2Ù@jv«x¶ulËcÉ¡ù÷{®dÃ$½»†DAÖý:÷Ü£üy6 >¾4éjDQzöëâìëâ¬L&tx+6Xô)¼¹ -BNÆøy< -&THZóøÇ4oØÞ»Ò`@‹5NMÆ´ˆÝç}ZDB®eQȘ¬&•‘ÝJ¼”¡XGe*3+¬ÒVÒP¦-¶DIË_¾,¾ŸÁÇn8 -†8¯3¥TŠÌ^Ã[(ù®² •F$¢H—?ºÖEêÏ[:%ý¡²Xï …}8=¬z—4S…Œ¬.ö„Çße[ëÝEUÝ1¢…óqgŽÆÕ‡u„üYwÀ©9õ*ODÄNõ¤z¹0fÿ_'wà Nm"^ SFF:‹IY™R„hVÒE›æ‰2[ätµG -ØæÃlúLOó9BŽéyúH©ŽËDš€èáÛó!Jƒ<»ü¡FrÄ®ôu-\Зogá ®hÔ犧tÕŸ7Õ*¡¹+?–œ„v‘µ*Šbj/õÊ -•ÁCWˆçéìæzmw ZvØø@Î2PÔÙZ›ÿÒëív» qD:íouñÖåDö›ÞIvé@KXL\€ÈÙZmʉqêåB§\DobgÙ›•ÜsŠ—&Ò¹d„48¤Š®'WˆÜ÷Dˆ¾¨[¢wwCà”àúš¡sh€›à* y™çº°Hˆ«ÔÜáÎðÉíÞé†Ü;®¼ÛfD¯(Ò±äÖ ®ÌVø,Ñ2ˆ=ñ«¹•†O÷hà`~Ïeæa?=ÎÝÆ(Q躓¼4õCVÙ: Ko×lu™hÞ*AëjÚéâvÊnéIZ‰\^˜VKùÐZ¦h>ûGÐÔêÄp\º3Ñ9o.ñˆ‚ál4­…/,RìÊ„wO€‹\ÁðŠ.PE|°*7Œuønà½÷™é»·¢p®Õ€î×U5ÃÑò2œ„ À|2jV ̇(6sÏ¡”{]:gàóü’òD -…%SÂYd4 £.I¬ÙNñ¯]è m6¨G®W¢[íû›[ºpÈEƒÑkÃÆOv‰ñÇ^×~6'ÖÍ`°åÔw—¦O\øŽLîMÚ³>¶Ón„á8 Ø -‡Ïax59¡‰›`ˆV@>RáÜy‘‰£k³U9gˆqûrwKáUL¹6êÇÔs;ûýA£Ì9uU_Tƒ™Æ!™Œ¤1‚Þ[[3^P—ã¶P™?3±š^ ³Ë,+M{¨ç«âÏ:ö¥Ô-;OÚòXÖSGÛhÓ¯`dµVèQvÄ»à¹,”›‚‰+Í©Œ' àLY íâ01 <„ŽxîÖ•¨2EzõÃ-J0cvƒ—ÑV~¤öîútÃ<5À ¹vðî´ŸXvh¾×x ñF×à|ÑÓôñ+]´]Ðüõ…Ëi¾xy½]¼¾Lê8 '˜Ëˆÿ;ÎoéÂW«òóâ£}¯ó²I¥Šéœ -¼/¿|¸oúoÎ:E¶%é3ÏZ†;§Ì¶ù.~ÆÎ¥åmz£³’Mçéü$·k½öÛèMEoºYá´[‘ÝnE¶Á„åcil³† -±w‰Ø˜Ÿž+™°b~='“®~Óî§-¾Í -'ømT¨q€aa¦ÐŒ]¿ú‰ã±ô±˜:wºèð´ñò ->á •¢!¾ºÌïgH¬Oí¡«º ‰‘×5 ª‚¡ìuϛӖªæÇï÷3 æm½cÂx÷XH‘rû×ÑTZ -s͔іA›ÈH˜@ª˜pП—+¯y˜Ã‰‰ØЃàßJ•ŸþÈÂøxDÑl^35›±†ý”M8€ÇR -Ç4ƒ_ÕÄŠ%“\{˜r•*nrÉ«jçà á)ÿ'„ÿ?±mÿ ÿ˜Nf«@ŒW–ä ¹J!‹Ù˜ e™àkÃ0ØmÒÉD’Hæö3*Ã9`*ð´×i)VÿI-v;„çŠý%òIµ`ÙùóWêq!Gp©1íö¾>ÝÿË9ð‘bp¦ÇD âØOä¤ÞÇ|sqçˆÿxNÛZ’º1{Æê]Åeũγ¸¾À‹¶¨¬´‡a• @‚½“؉¶–'ËŽ 6SÖòK•rí‰È=9KíQvä .­SÌé|<÷\!vüG× ­Õ&s“·…ˆûŒ@w¸ú4ug©ñéehÙq©gä:ŽÂ;Ö~ɉ‚ÉÃàÄÑ8wT¾=Üÿ,:¨˜X[©ÌùvvdnQ¸ ŇwapNyŒžXõ|pÓ{WÂ=ªËbV]·äÕì…Op!¨ -´‘6ße"]âîpIÒgÐßF¹‹Ñn‚ŸFìi«ÒЩëÆÐÚ -Ð5gÑÉl¾|Õ†Uo’$Ä9_—î:caiÜ…#›ìë23ùfõ{q»•SñÆÙ´Œ$£*!î;ž+ïÄúË=`ï.!m•é3¾œ§ôÄæ'G<ÝÏÚ¬ÿn&­» mŽƒ!P|p€Œ@´pÈe¿EYãS /¼††¢q<Ë‘&làa^0’ÀsÍ¥¦nuµ¹Ds IÜàܨ9‰Ëx4˸sУ1Ȱ¾.V‰h¸€ÏèÝM*’ŒÆÁ€FãJ4ͧ¿Né¹Ð¬¶hÖþc?×õÛ»ãÐýá¿Ü‡ã!Ô’Ûy=áÇ1Ÿþyö*Geendstream +808 0 obj<>>>>>endobj +809 0 obj<>stream +x¥WÛnÛ8|ÏW`6lùÇv +,Š\ÔM»ˆÅy¡%Êf#‘®HÅõ~ýÎ!)[U’vEÑÄŽ¤s™33‡úv2¢!þh6¦³)¥åÉÕòäýòd˜ÌçtüQ­ñeHã1~Læ³æc%)çp Q?p÷àö‚FZæ>ãCæ¯i™ž^$gÉ(¡fG™‘–}1Õ£uÂ)£)W:#å,®•BiJv•) +Y½{³üz2¸Ðh÷Ç3>½¤»%íZ!ð”ÛÈ&ÀýåÇ«KüA8Ú À‚ +“Š‚j++r†V’D´S©p2£°üw_É1gRt–Œ9ë±.ÊME>KB zreiµÇ¥×Èx'ÝÕâÓ=iQJúVËjïŸâèëÊÔÛpÁùm”rœN:am],߇é†Lî»,ñYi\QŽÖí­DúHyeJ™s)¾Ê}?ƒ”ÀN…Æo»…YÝÉ\IİÎ&´4¤#³•š¬LëJ¹=mLð+ã6>_{œ;´²)ûpºütóé­= +âk7×”nŒ•úáM'ï Ŷ¦D„¨ºÌ’GÌ1Û5 r2ñ¸·”V2ãQ‹Â¢Ϥ“›+ßrDÊÞ08z$ì#˜ ¶ÛÊ<‰"áX^BC:ŸÁ–¨¨¦L[ç“iò\ ㄾ€’<7Ný8i‰Ê³×TÀwË'À ±×Qyºz-‰;mZê!&¾Fžƒÿ™Ñ’ ¾˜Êú@äæºµQŽ:~…å‘Ö+† ,fÀ|þH]b;ü­–Âò4S³Ýw¦p(°3g–£HAÿØB/P²¬]-ŠbÿƒÂ=ëù¾#`ÂH´'8™9ÁÉdþl‚“„®¡«{Q®„wº‚.!ô›`k׿´µ/ +’Â@-»"ŠèA|¡o §|’ìz€œÚl\|èLj@íÀ¬Ö½tÈ&å5ã Êm!K@f>XâPïRŠ’™Ç#æi!r­3”â ohìÑM¤0O Ù$ö5+1Fð<ãR¸ŒN>LÙ ¬ÔjÖn;Ú8e,ìo~¾+P=çFº‚6v –/þÑß’Í +óõ ¤’¢NðCÉáAÔ(ž„*ÄJ°³&oãò‹`²,?¾3Î3|f4#àÖšª²(‡a=O*•Á_1±à¨´‹ší€)Ì3³Óm:ž@µŸÊøb–L;÷¼Ù·@1–Õ4ø^ó”{6lJŒR¯#§ÐM4Œ·\6 ‡!1ä¹*˜ ê ›tðñòúÃâî}r¿¸!å]7ç]Äý/&½N&H}ç +d#ð­Q{¼Û”í #÷Û³å€9‹“(k<œuóËH¬á/L +%½Fú¶ÿ5ÑɤzdÃ.h·vŒÓRLæfû2oâòÀà qÀÁmO0ýY2§†áãé,^oN8|¹vá‡yÊàþ¥Õ÷àî™pb%l»»×é¦2Zýó³ +<¥Ä¾jØ—Íâî´:.x{v@Õ'ï,õü2a›k'Q)t0èF qd–e)2Ù#(—‡EØÐ—åx·¸Ç=~_Dîp±|3›Žq¢“ް{c¸”`u¶£R"=ß +n +¬‹Ì*X%µ©×^g‡\þz'Yð<+𠀉4•–Ïi¶3C>åò,½›q—9 ©®ä‹|9ƒ8¾Æ—)Kß³%xÒaÇ(Ç?(Õ–«8í#™>ÝN¯žÞž\Þ'WP¬«Tú¸‡b$Ú¶Z~‡¤qĦz±µÆt_k­‘Ê¥Þ#˜ó‡U²&Ê­šym ÅIp(°°ÓÔ“HÔlZ©-¦Ç £±xr¢×v0¼L`ÇóË/\g°µpJ +Šq8`ÝÉv°_æ/BÔ@ðDýñ'•~Ã[¥9¿?¹y5!Ê ¶9¿p5­cœßš_»Üy8ø?W;¸Ò¿|àúçþÐsÊ‚3ül<Ü8&7šN“Þ=-ýI>Wæ+h€£PŠwœÛ˜üT4áæþlŒÅìÿ½(NfÅÇ9ŸspÉÿ<ù1M©5endstream endobj -777 0 obj -2035 +810 0 obj +1589 endobj -778 0 obj<>>>/Annots 264 0 R>>endobj -779 0 obj<>stream -x¥WMsÚH½ó+ºÌÁJ•H‡È&NR•x³6·õie%¢‘Lø÷ûzô2©dc»Šb4£î×óúñmàÐÿù.ys -’Á›õàÝz0± ê>òr]|L>8¶K¹¤-ÎâáÌòÚrf®=­¶` »ðÐ~ÀÒøZoáx¾ðišý ­+WªÒ«õ×ÁøvVŸ²‚Œ´H6ÂÖÁ^&‚ƲÆ*“iŠl\=WïL[Ë#wëк“ß‹ŠÒ .CIÅ^ÖæÖ©ís+m£XâÝg¯Ä" í@¥ÛÞ 6­áÀX\*Ó‚Ôæ« -ÂáBD©¦â HEmÊBj~B#‡Ó°‡}ì)”.¤2S)) Î©Žœáh›Œ“ë2 -¯;Ki¼·R^(:=Ì$à ^zP®ÃHg±8Þ‰DþØÏ…|ÂQ¡ò]&s­Ò¸ä@Ç›*:µeÿZRRê‚6œqS­°i#· --wÁçÏjhW1OhÉ}çÐÈUÝ1öÛ鬴(ëØs. NžV­`šžDösù­Œr¤säJˆ2._5à.±‘¦ ©û»ØÍ'¦k '0R)C¸A.Î:í·]õZƒÛñÂýQÉÃT¿’ç(Ó@%‰Äµ*öHy Çmé¨J:~ªH—Y¦r> éþö×›ø¨ÕÝLJÇWu{‰Baûe¹X“4Ò'Ý|‚ËÆÛ4¼ .œNÑ15M‚ I‚ Ç·Kr@IÌ{Ó:Ãó-í™M:ÙV¡OoW_(9î^{ÄÖÇ·§äÆ´i­âVű:Déîä8 øO"ŠÅ¦â¯Ö°Jã#¢b_SšÛìhÄOGL©(Á¹C ÉÕM’Bóz“Ú·P•,B5vô`˜ºKGMþO€û÷oŽŒxS~-¡™oûõ"¦‡ÁÉ2¡ùÒöNöÎ&‰1†I‚‰å!ÙÌœ]"9Ò:6Û¹c&>AñÈÇ•ÄÐ ­Gwî›t €>gZƒÏ,:|õÞ‚‹ìµ{ñu%c¤fÞ3œ2’ùK :s„Ñ@5‹j½‡½$¯Ý;Y&´\œíýBçíY "L0&Ãô%¡L<¤´ Å,ºPê½…ÚöÚ½_€;á:=ƒ«Ëí6úþ°îr$5ØjÑ‚möü¥íP·÷s°îÒ1S©×Ì– —€õýî¾¹fÑ­÷|ˆÝÞ/€õ—nsïïAuÐYsrg<{r|‡³gV €ºëý9szm2„‚`æ ¥ ¯*!Ôˆ…N‚6ìa5¤øhÍêAýŒ.,JD -fÝÁ2T’V ¿8¦T™’C§‰~ ÑXÎ|P‰ë|C‚s÷%Uã°’•<¿K@6l /†óC(ˆòéÁXÆ!‰ .rõ¸,`Jcˆxl¦ç8Ž6ãÆ—©E7ÑÿÞÅj#âzÑ2(ó¨8ÒkÆU5\÷¦9"Ó ?f2¢õA塯Ùc«bbŽBn"¥)ŠéõêáÃúÝû?/9†¥w¹*3œ»[Ýß}\Õ§Î ÉP{.c“óóéx2Ž÷a-† x{ÇÂÀäz/SÚDiÈ£ -ϸ;º”#h”¯Õ䵪íñ°mÂ6ÚË(˜†á~ШZÕrMêÑ÷rŠª+ÑKæ°Õ»Z¢ŸŽ@Ȱ®ñ¾qÒèÐŽi#\-”(—Evàüðï¨êéµÑ=쟺”ᡞís†QsÜ•-máÆ4$à~4Bœ®L¢J¿¢'—m‘mX§%Ø‹t'õ L"m‚ªk¡ÊРès\Ψ¤MhLœùB\éëÏ"Å•ËoÂàµéhþ‚ŸW—Û‚t&ƒh{4Q™[TòZÓ^éÂ4à£UKrüSÄ—…·ªk?¾]ÔšÀ™ÏA:sÃí«ÏoVô%WæÜ[”,=E)3çFÎÜÇñ‘ïñS7õ§à,sv¶äP 7þü6Kendstream +811 0 obj<>>>>>endobj +812 0 obj<>stream +x•TMoã6¼ûW< ‡¤‹Z‘GvE‘ìnкM==ÐÒ“Å­D*$Wÿ¾óhÉqÜöP,ê}ͼ¾Ì2JñËhµ ëœŠvv¿™}ÞÌÒd½¦·‡Ûá%¥|u“,h¹^áÿb‘¬É1U’(s| üê!¥[ÚT(£Ô¦ŒŸSÚ—¥m•6Ô*ØÑ÷dì·›¯³”æ"r +hì΀½D\=,)ˤæ<£ù"Ç(F¥P3ý¾kìV5Ì=A[C¶Šç¾Ý&…5Õô~ÿécB›Z{ôÿ“}ŒÁYÓ €³Óq(©hTËô|÷ÓýÝ7Y1Mx}hº×¡Ž©¿=~y&Ïî•ÝX•¥ÎÙmÃ-©C‡wµ!оp¸üù™vÎöÝ¡Y¨U-+(i›nù8 —´¨µàIkxŠZ–1˜:å0¾ð{ñOº/¨²®8o¬´;V?;r°¥}­‹Z )ê~éù"âÃäŽ#¥4ˆü<9Ý*7ЧÃÎ?Zœm°%M¢Ð «4MòIVÖ¤ª«‡[Ê–²ð”nò<ŠãMF·ÉM’%ô£ÝSiéY]£ „&ì½SÞï1Šnø‡÷úÖ+ϯcÎ{Áœ$Ê:<¯ƒ~µjY©%,£Ö÷5Æö©Àv©ýA)iUÉ«è{\ägÄÔƒª MaJëʱ€4Œ…G]¿ÇAÊ”'!—SÛ(ïçsåLqÚìþ…ŠãØ*°‘î†! ¥McÃiXByywÐòÙD0W€¤Wþ+¼aâ—^¿ª†Mðß‘Ôö>ÀAè­:bS¸¡ P´±»3ùíµE½edïÕ `=#¹;Yó#¼_9ÛF Opö¸19Ðá ÄÇ}Ðp½L1v©€·$ÜûQ÷Á)ã;ëBÏtðÜT1,"Š3¡…* +î}[åáÅÔ +åò°}€`ÁŽwrZÄ':†Ý&‘œºfyÿ‡kÖã5™å«Dnvܺ'×o´3=9û7%ŒYô-6¡äÒ”!懬ù!íò»l¹Z¨ÒòòæV +Âä¿Ìþ¶þÄendstream endobj -780 0 obj -1477 +813 0 obj +812 endobj -781 0 obj<>>>>>endobj -782 0 obj<>stream -xVïoÛ6ýž¿â`‹3Øªí¸¶3 ÒeÅd]ø -Q6;‰ÔH)®ÿû½#)ÿª›M#éã»{ïÞñß‹õñ; ÉnÇ”–ïæ¿Ì/úÉtJû»ÂCŸ†ýI2¦Ñt‚ÿG£dDVR޽}z{;J¦qe0¾M†a Á°Švˆôæ}ŸîhžãÔ1N™g~¹Oó´CüSd¢"'í‹´tOb-–‰åR$Æ®næ/úÔ€cž…ýWô(s¥%ÕkI³Ù™ªVFÓf-5¥Fk™ÖJ¯¨6~G¦,^»±Hó Ö¢smòüºK×®¶¦ºpx0–®¾¦E'“¹hŠzq³¸9 €wï¾4µ +Ãjœ$¥=ʧLJgÁ9Îdwªã]cŹ;þŠ.}ù -Jê=ÝNïÎt•LU¾õp–Ð?´ }i6]ûÊ¢ð¯–5`jò\}Ba.Ms_IS²›¥÷ž[þô^žG²’ZZQKd Õ ƒ \5䢙Î×ÅCˆÛaÑù~ÑiTvÿ]*;fù¢H á\ô¦¦ÑžfÊ÷t>CÛ¡†Ð½o¨üÍû;ŒXÔ茻!ZãPÖwÉ8¡™L«ê- ‘O:žÁxß¼Ñ`¾ßNXóµDt¿zcH•L—Ð5UFéÚ ÁÊR–K¤íéÈ”Kè…•>\{œÉN#©k«¤‹Bk‹Å-‹Cw,&Õ8¢‚äzHÓê|èÌcЂ£¾„&,ÊgrclÆCºÞ=ŠÛ–M-éE Pîr¡©ÑR§v[Õ2£Cí'NJ#ÞÝ -¯È:‹áx[”¼ÖÄT΄ˆÌ†´Ñ=‘•h5tœõµ¤%7¾pÇà_ÁþUÐZZ{Ã)*¼«!ÈECUm•ÖÂá…';-ÐVTËO5É…20,A4)ê´”Œ9ãF„$Þhj2㜠mT½6MM™´êZ8á—÷«VJ‹‚Žr E¯œgý5R=7 ¶”Yh¼\YWï…¥œkd×½3Krå2éæHΊRrWƆšER¬k !¶„GŸ;ÁºèêßFê;GÎÖÚòv7È¿Õ~ëÞá ÿÖ1yÔ"NƒCÏŠã&!ú‹‡FˆˆTR³Oqç‡Õ%U³ëT·,@Dpñȇ/ÎŒçÈüit b¥ÎÀ ÆLÍOªèùU!RГû3€ùmçñQÓ좠)ܸK[ÓxÅ€;£W0GvÓX± -úÀ£ðÖ¸³ƒW«šçŸ•õ3Io1lb­ÅT˜¨¢ ©x–ñâ²Ý7šHä -—[SÒZ`Æ;?›O;×OŠÎ%ÝÛќӊ-‘Œÿ=ÿ¹á6g5<üüÄF²Â=Ç[lǢʼJOÒý±Ýï'½áÛàyWW¬cgM•ÅÆS–ÌFïš¹Kð7dî'úÒš Ý0m®M(^8Dšb¾³bØÝ=‡n²»w¡îÞ‚NøÛÒr Šœ6˜-ò ~ °³¹µÓø6÷®ÿ7”TŠ-KÄâYÆ…óQé)»æžÌÇ×°&G¸b!a·^-qV&ÃÝmñK³rp;õ·¯ýð.™´ÆÚBeC:‰¥ƒès>p»ã0.%î“A9Ø0Ÿé!zÖq…:{ Æx8as¿šRRï'Ü¸Ì -—´5/¿fZµiM«Ê\N䳨×1+<~{LFôˆ1pˆ2ãçoéR«*Œó#”áåWÆdÞïh<…kÇìá÷wôl ßÂèѤM v½92'½Áx’@¯“¡Ÿüÿ!p¼&Œû’üóâ?¢·Ýƒendstream +814 0 obj<>>>/Annots 245 0 R>>endobj +815 0 obj<>stream +xXMs㸽ûWtíeå*‰’(É©ÊÁ¯7®šÝqÆÚtHHBL\€´Fÿ>¯B¤d;›¤¦ì1Eýõúõƒþ¸˜Òÿ¦tÒ슲òâoË‹ñÃ-¥Znðæêú†–9M’ÉŸdƒO;QÕÒÒt’Ðsm¬Ò[zåZüèè7'íø‘í”–—Ë]Lh”α{p—e¦Ñ5)½1¶µ2“Ðôùþî‰î••Î:ð&6>Å.6>šM“”€µiBO­ŒóGæ4¶«Òk^³Ü)G¹ÉšRÂT.]fÕZ:Ú™=Õ†'óhà¹~¼Î’xëpÐt<ª­È"Šâà9ÇTï$¹r] çöùj°X]ÒF2!zDüŽð9̱NÔ~±•"g‹ÿq ÀZ §2j4Þ¸ZèY>³o6!w™Ñ™¬jlÒy»yoì —¥‹!½öl(C‹Bæðê (•'µAy¸0g&…EekTª±H+Û‹…SÒ ©*¤@Ž­ÜÀΙؘ¢0{vÆa§KøÄŸ–Œ&)šò__¾˜N&ÉŒéMrC%¥ÈòmûTÐ3cà\¤·xÛã—Jj y_Oµ[ìêºúËx¼ßïƒÅE.ªÄØíøt¹÷ËÇY‹ªÑ5Lðù`•^]ûÓá÷t1OàÇtß%Íð?¼ôO­—,ÙßéÖõýUO…в>æí@Ï¡2濪üÆ›]&*™d¦ëûÿ3Ÿ%sšßÜÏ%ÝÌ’Iûð&¼¸xÔw4ð«©eÀp[ÒÞ%MgÈèéqg%G²ƒý7'ùñ«TÜSOͺP\ ¬m,Ö€Û)bˆ´mT¯Lè ní烫eIwy©´rèY´:6íT¶k›…«eÎQŒ¼G£ØáV@硢ݤ°ÜéMYJ;?NRg&¹+d’hoHä‘-¢œil†Ž fKq ÊšWïèZÒNÕ¦)HXOl@Ù‚a5O™hÊÛE²hŸºV˜§ó³‚,Ñm§8ð­Å=àéyôtÿiĽ2úû—oË/§K»”–Bé?`¨õ·ZdÊÐ'ÓTR4‰·ð§Mr=g`²'¾•hìðôYh’9³xo¾p¿.©T[‹çÓ8óÛÆšò£ïºûüÏbòT‹ômQCæ^C¥Ðb+=Ù*ÛZÄÈî`Cx< ´ !‡aZNr¢k zÙƒ7jÛ‡ßMR<¦O&œŸÙ͵oþâNnâŽCp¶#§k>¤6Mè‘íçMÆYbw™Ÿ€à+š¥‹ôäMûô&õ° ØòpíÎ]ögÚx•úsx´Ò;\=KQî`“­ôŸñv>=}Û{ÆÛ« ÀÝíÏ{(ú_¿1¨so:³‡ª&?kÍý•ÒýðP´¨TxÉøºÇKˆ6UoÂÇQY üäž(^1 +±ÑW5=ÎïÑ¢”CúüËxŽ>2ëìü´d§)Û $ÖªäyªFñ±)ÄòE¼F1Q´–( «–Nr¼ ¨§@Þ £­¼qc8 y +('òWØ‚¯ü gÉR¯ ê‚Xâ9N{Uï{¼bëµI!,bÑM¹†paÒd5åh5ðú¯s·Þ™Æ!V·ºô$ +"èX”uƒ‚îa~½[TóÒTŽÊ/@›•´¬%q¤“4P|Š…¢úY½";Q^µú¾+HO ¯÷†SÒ÷»=§BBúþ.Ìì³Í24k×öœcb`4Äç(ÏÌð0]Âw 6HX²/g¶r  'VÏÒ«Ë!ÜE¬œê—€ª£µ©ëBÂÈ‹÷É•QH}c‰-ZÊœË4þÊå÷všõÂ;V0«Q/X1Þä&ÄÙ{ì>»õ¦SAÂa…4Z¤^’A|3Š’œ‡ÛºÀÐ…P½óákXœC{"¶²*TÆ#VtºÙ7ž§iV¦8ÅܨWÅ73¬zm»g,rQ´¾üŽÜBãÙ®¥uׯ¸ˆoÝAg«ÁtuyÞ$܉á³ãbçv.Ý[VDÐiÊáYÅ•1Þ‘¡0ËÞÍtÇq–éX‰;øµQþÚÁ¸AÞJ·B³õ‰(ˆ Ô ã àãx3!tŒ= a``È5¯Àù™ë=9#ꪆÛ?ÂHàrUÊî¢K@¤5ù½Rígj2àÁ2,Ӿʣ=ð˜sßnTl¯º«Á×Ç{PÃ{ˆüyáúv˜¼ã~‚üjŠš©¹B r\O2…Ñáï,"Ü}€X¦•R +íY+ÞÃ]°‹Û÷ tÒ˜Ó7µ!¸XäQ +FŠæ~¸{zl5ŒBRÁ :Ðk89Ü2}çCЗFƒœüý©mXà +;QækT€ÞðÂjPYùª©âœ€=‘°g™¿àùí\ì‡;a¾xP@b“3Ä3êxoýôû3ÕVJfeÈ‹¶ÁRˆÙ€Ðã|“kªÊØ:â\‚§k‘½HÀt5É61-7ñôñU ËC‹u#0 ¯¯óõÛå¸][Ð?È›²ÂMÛOÒèd,KÍ· ix!‡òÌ_\0a( ßí÷Íà®hjÃÊLÅ“` ±ø9îœÉ¨‰g÷HûyÊxŽû¹F܉Ü4º¯IŽ÷=þ2A#pQ¨úÐ žÇ¸¥8 8Pàñ»^½¡ƒiâcüpÓÖ-7[ÿo¿×¡ÿ廜9®í5újÂqC£þãâ߃Íendstream endobj -783 0 obj -1391 +816 0 obj +2085 endobj -784 0 obj<>>>/Annots 267 0 R>>endobj -785 0 obj<>stream -x¥W]oÛ6}ϯ¸0ÀbY’eÉ6&š¦k$Ði$þŽé±b¶š—»à¾Á¥ct»¹þ±×lߣf¦ºÔ ‚ãÅÜ4£¥5í‘MõLìx®‘÷8{Nס‰í+z7~;¥ zT€k=EØIûžºÙ¥¦¯'lc†Âr»·£­Túƒ x"‹Ó2h¸½Z™‹¯ÕlóP§èí¾ÍäROÃö¨c]™d}Ò^[bpþ¸ ʉìAçÁpUwàªÑ(³â"XÒ§nÔw]/Ýp4ø½0ŠA0™¼v§=Eµ£›mrSæÅ-yŸ|/ˆ‚n; ží³ÃôJÉróvÜ'Ïw½Z¨t}DÑéø=×wÛÞp2žô}0nƒvgØñ7˜LjGâË‹;^ ²‹ï¨çùAm“™ 3±L·¶dù~ŸÉ -1a Cøí“%¸áQÄr±°á¿É‹ãbš²eÞ§?ûª¯¿jÁ4ÒÆR‹×sݰvdŒXV)bJ=޽¦vLho­çæÌ¬+íäÒ&‡%aÕ9ÑôèÉ…¥ïo¹”¿Â§1Sx»ø)£~GÂDä0ùî=îŒ>]qÅÒ„F&Cžÿc³›øÄIOÙ©¡8Ù÷”ÖÚ¾W:Fß—Çîù'V»Mñïpsãó‡îÇÇ¿á§Z\ëd+Áó¥÷åzÎUŸà®z«Ä3ߥW.Ev·âiÚ§Ö\d­9ËWµ ¯ò÷R$ ïŠ×µÛ cÁo× :ôQ}A_ãê®B1ús«@5_ÊÖòEî^è½'㫯–?;[ÓîþåÇ CÇÃëý~^Ý n†ú ¤¾>ð"ãÍ0+X{FKÒôÂÛ›‘ÿ’ÆÏÞwõ‹æhh†9nÛ_Ïþø¤ÃAendstream +817 0 obj<>>>/Annots 254 0 R>>endobj +818 0 obj<>stream +x•XasÚHýî_Ñ•J•I•H`ÀûéXg}g{}×ÞUùË 0±¤ÑjF&üû{=#„ Nv/¡Ñôë×ݯ{üçYH}ü„4Žh0¢8;ûuqöyqÖ&:¼•k\ô)öƒ! 'c|‚ •’Vünb›æ Ë{7C +CZ¬°ûh2¦Eâî÷iwb­tiÅ2•´UvC•QùšDN&[˜mB+•Ê 2*+ÒÌ©ˆ%}hîð~¸›M)Q¥Œ­.wHå$Ò”ìF~Z|=ëS7ŒwW™Ì­°JçA}3ÁÜ\l$<ü¢•ÜR¡Un YMÆ–ÒK]YÚn„å­‰ïÝDµƒn—½è¦‰(ŒÈüͽ÷J´4”kKE©ßT""Ø#‡ÜTE&N°–r%ËR& ±E»Q;µ|8ì«ò8­ù ï‚v÷^M)“"7¤W ЖJ¾1Ë•‘%‰8ÖUn±;‘9NhUêŒ8¨<Ñ[CQAÆV½Iší)&<þ&Ë æ ®9莑 nÒy‰Fãúæž¾×⇕Aõ¤{>òÿ×ÎÝh‚ð63¯FÆ:OHY™Q o–*¼E)³§Ë]n.ó9\NèqzO™NªTÄçîËãÁKƒ\qü!Æe”+}®‡œðO_΢0 +ty9DYd4èO‚«ú*¥¹+\^•@ª–¥@HÌ£^Z¡ràsaxœÎîh®WvËIùÒq Ò”—³‹ël¬-~éõ¶ÛmPˆ$ àfïx©«I^úò ~ý¦·n]¸”J$,¦Î=0¶RëªD(NRÑ9N…ˆ_Å`ÍRî˜`ÎJëBr~¥§«.O]¶VŒŸð¼ŒÞÍ…¨=–‡áÕØÕèA Â~0h¸PÍ]âØ—nÄâÂ%\—”È’%Å:‘\;QÀ¡ÙØ2§î§Àœ¸ [i,>zõa~/dîl1TŸènaœ*HÇ 5Më‚FéKo×lt•"Óy,q¨â­._½b=HkbQÈsÓª)ïZËÍgÿ +špN*·'JçÕq/¸†Œ¦•ð±e!ãH¡Æˆ W$• ,ºD qcY­9ÙÁœA(=fÖ)¬ÞˆÒ=¸Rߺ]14 8˜ÑU0â<ŸŒš«&χƒ>n¶Å~§+ðX¨8Ç/¨H¥€QX2€‚!èrqzÂÆÅ_;׿O|p½ÝzÝ?ÜU K—¼À9ì¹MÕ8‡“ôÇ_íq6;îëÎÐ÷ØM?€ðLîŽMà~ÛN»†áqÝóGµÀ8Ú졆¨Б ‡æI¦N®ÍFL§íÓÍ5Eƒþ}˨oS¯í û:™3suYÔDc“\Æèt¢Ü¡ª5îÀ–ãªP¹ß3CÝÝe—ßTVš—PÏÅïuŒ¥ƒ¤{éfc‡|l8¶:YQRÉbÃØ8Cæ€5Áë_§5ºú;û©·Cx®Üá£O¢ËKñ±9DàÓníóÃí€÷Fw$ÎôXÑ`Aãl…Ž…çÄ#!ä~m÷Ó©#ˆe4Q8ÂTµ¸:dÍá (Úó%å6GO¬zÞ9ò½)áž‚æå O_×ä§ÚŸâlPh-m±ÍEö‚cÄI`L ¸—.øXÊUÄíÇ'¶½l]Ä•2W)Rk# ÛÌ¢·ù¶7¬r ISˆs¾ªr@uÎn¬q(ŽmºÛ‡™“‘h˜‚O¬¶K9¯Ì&ÎßÚUä¾â9ò ZÑwb€Ñ]`P¶5Ó,ÿ|N#¦ôÄæ¶x¸sjó9îæÒº³hsŒIÅ;‡”Áß*rŒÀ}¸¬b‹ÙM‘½›I­9áh„ø«ÊÄÚùôþ×)=–š§šµÿHÀ»~yw¹óù_­†ã!„Û-…ü<ôþßgÿ7´ˆSendstream endobj -786 0 obj -1338 +819 0 obj +2114 endobj -787 0 obj<>>>/Annots 270 0 R>>endobj -788 0 obj<>stream -xm‘]Oƒ0…ïùç/Vié -ܹùyc6]¯+tÈR†ã¿÷-#™SCJ }Ï9OO?"Ž„ŽL U(Ûh©£[%,Ê &!óŒ¾-o± Û—w¸„Þ’PÍçLAW A’@—qÁ -†ë®mí~è/ônr£š¯çûH¤)y+‘‘ºEš,Ÿþ6Ç Χ‘ÿ -Y;kz‹Ö4Æ9”S1ÖÆW;ÆðÖôxX½è†d8QøñÎzÿuÕ›öÕ°Î×çSãh˜b€nUWÆcáÓôp¦px¯Ì`+е˜ñ” ê#övël9†Å&øS…‚¥8¢³S3P‰¤ãý×s>UÀUÆÂQÁ?šÞ,— ¬}· A7œšnÜgGÕì(û{/2“Tz°Œ•˜pž¢o«ˆZendstream +820 0 obj<>>>>>endobj +821 0 obj<>stream +xV]oâ8}çW\©¥R „ï>¶3ÛU¥Ýîì–yC™Ä€g“8µþýž›8Rf&•¢_ßsνö{'¤þBš i4¥(í<-:¿-:ƒ`>§ÓËlð1 ‡)^ãù ïp: +†d$­a; Ñp‚O¿4ããÜÿòn¦óTÆCl.½ nÿùÂ1-ÖÈh:™SZÄåî-¢n8&}ÒÙZm +£² ½‰t%h§Ü–þøüøånñ½3 ÞÖqeôW.3^¤ÈoNéŒMûÏc +Ã*Zo8ãM M*‹’"–d‹<ׯÑZr[|s¬Ç(ÒEæH¯¾ËÈÁ–DvŠ+ƒ_µ9•æ?iîi­Œuˆœ؇Ï/dà¬ôØh+SËD’Ód‘Ç·ö<[:zªÄÿ1ñ) „7£µ»¡jyâ—»Q^å]GéKõ5Ib‘÷«ÐýXx—¯rïî€0çÑÏ*8÷Ò­ +@í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ uO£¸Ç +›Vò–ÅQ%ÎĹ­peÊ)²:eÑÇ*’–ÐôåwÕ”jôDaåºH’S»Û{ÿ/oâv¨+ò3y­“Dïøl‘{‘扼/É¡ Ìua 3K©ÀÁá>ž +Q"¬…ɲËÓ!×ÖªUràÔÞŸ­ ÞNí7A„¥L’åÝõÖ£_1X«¡¨z‚›f[Aœ·-K '÷þH+“G‡ÉwoÔhžZùêÛF:Tžï2‘.»Z•bÈžZ•r#íýÑkÝ%<¼èò¸v»ùΨøªc¬5}62mj‡£×¹À´°Lo“ã-LXiQ1‚®1 +”V’9Æ5U6W×"]áâç˜è©øÊlócfQÖ¨úº·Trį£*hyŸîm—o]s_§³€o‚|:Ý»Þÿ|z¤/F—wžÏ:*xŒ¯Q½jW¯Úöc·´ñlŒ©^ÞÓ¦CFþÝù{ áendstream endobj -789 0 obj -312 +822 0 obj +1030 endobj -790 0 obj<>>>>>endobj -791 0 obj<>stream -x¥WMoÛF½ûW zrP[¶dGrzK‚0Ð8n­ =ä²"—âÖä.Ã%Ũ¿¾ïí’M‚"Ž“»óñæÍ›áד¹\âß\V ¹ZJRž¼[Ÿ\ܾ‘Å¥¬3¼Y®ndÊåìòO’Ó÷¹ª]Ëür&Ÿ¬ÉŒNå·uÖËF7ÖV>›ºÎËýúÕúŸ“K9_\ÃÄ©²©|º¿û[Zoì–§68È#ô7Çú;¿šÏ<ó™¼Ýø¦VI]Ë|Þ[¬xèÎ6z[«Æ8+.‹æéçƒIjç]ÖŒ‚‘&¯]»ÍE”´}ä#—\1xDž “ê9)ù%wÅ^`Ý¿ô‰Ì¯blw4Pp[mµk½àfYµ óÒvgjgKm/™«a©pxÞ˜RÏä³–ªÖ/%¦´ìS:•n ÈééîÓ¸³¼ƒ›\Ë£*7j“oM£…'*ÄU«Ò ÒRâ]ÀeãÂÝç©ãì¦Ð%‹ÞÕѼ*eÊ -/á8" ã§Gœÿzx/‰* -&E»Ý*˜•·-¢µIâý.m ,ó¸W%B~ÔõÎ$Ȫ3M’3NØqÝPº‰Ëûµ¤®T("­}8^UZhXu•`¹÷dã!¤ß§Tª$7•XçÆK¥p^Rí“Úl7ƒÕtJî÷¾Ñå™èoUç¬4g­Mˆ®*L³Óü(„$s¤€ðZefÛ‚Vg Qö¯:W?y1àp Å~ÆT_Ÿ Ùäõü ~_߬ð{ÿ5| ½9ôÊõÍëÀÇcw¢i3AWÔ€:F“·ØŒ±qB`. -y²®;rÕü rµ°©É2tÈXºT‘ãµîYM\X¦9)ÜÝW![ôDù@(xzd³ÑInÚÒ ìž{ÄAÕP¹ ¢WJ•jÍÀLÒ (1qMˆ):Ô¬éœÄr|¶Âñ4èê½Àžµºµ \ËYP¯V³K0éÐQ‘ƒp—ªýQDÀߤք B`?j+\O{l’ĵ”Û¸”“[_¢†¾ b:øCÌx'è€ÄÎ7>Bèy(™Aèª -‚Ò°× XƒZÓòø@>fŠb Ã²Ú•‚ŽÉ4ÁwÞéÝ k*MY :)tPÂØŸCŽ^3á ð†¤âOjͤXIî@ö`*Tª¿W)ïÑ0).àu­¿¶†:ðƒÙ.7ÐH•B+È klH¾5ÿFºõZwTH}â{( =r -3ccx!#23¤7À6Ðúž -@¨Ïwµ6\ŽP 2Np£ÖZ| )@ ÑþÆ1šLÜ4½ Ü€$2˜ÙË.ãý‹Û¤Ÿ3ç«Ù Æ,fç—ÅrÕ¡Aøî xcñFi'Î|õçí>ô…”$WvKÖÍÿcþ|q<t—jª)''@ôÈj \2k’þûőεEÚKž“(V‡Aì1%šÜµa/M‰´­ŠaÚ”ÏÔ´¡Ûç•'­zSQ5B¡™âP)”ÇŒ B¼U`BZ•–HÜ“ `h,2œKbÒ–HpðÁ˜h’z˜{ý³A@ -DxêÑé[EUí12y„°`øÏ!(>{ó7ËÙòco¾\€§ã¥cï -+ GxĵRú9Ù?ü0ÿ†c1¢~W F#ª(ÓjÖ Ù`> A×…2ÅZnÜ7ªM”3p.k‹b‚U©Ë Ð +823 0 obj<>>>/Annots 269 0 R>>endobj +824 0 obj<>stream +x¥WM“ÚF½ó+ºv+A[µć‡=à¬×v•í8^n!‡A@ö !3’1ÿÞoZÀZqœ¬]Å2ôL÷ëî×Ý3wà@ÑF!Ż΋Eçå¢3ð§S:}˜ Ø6šúSO#|M"?$#iíŽ@ +=Íö÷fŒi±†úpŠ/ Ë´ˆ½`àOü¡O¿éln +“fz»•¸Y|êôÆåÁÞ0ÂAo±…­”>¸{aÄNæÒX°/¾ˆT‰•’”fdw+?†VÒ™:Ò!Í·TêV:½^ÏýÚS‰Ø[±»4èÑAX¨‰U‘È„» ê#èÄz·OUƒ×wbWí~àbðñUg"FaúcÚBU E³åŽÂ™?:“]Ä’•!–ÈLDPuDçY«ay·?®<îEÈžxËaq8€¸Ä7pnÕøxqÂWɦc¤9ld­øN)sHcŽÕ)Ý%Ri¾Hó °“™£`¶\4`k˜9£“ìl¹£ÙôBöïŽLf`ákÙ ‘ì@³${Ž#QˆŒÔŽðâäH%›ŽíI#û °‘Kówpm±^§_Ÿ6!ÿ5X^œÀV²hæ4id?6t¤úì:U¨êç€ Nõ6áÅ l%‹&.²ì'ÀN‚¶ÊÛk“ÿ?¨J9¤ÉpÌt¢ÀEW,ÊiÁä"Ph…=}/‘66é +} +„ÌÑ!/ÑԽë[âÒ›,o.÷ÔÍ£ÈÐW7М%d5ZŸR”éœV=~/E;[i¤OôZ$Jù–¡ƒî•d¥§Y$äÓõmC s/†•·÷ó”¤Fƹ6GŠu¡{˜0$¬SÕÐÌõÿ€zC—-´®ëkêÖô•Ž…êÃìJôUºê×¶jYnûŸ¥WBýõägrÿ¬Œ1qò#Ý9\%ݾ:É[d›ã>GD¬=h“Xì=J‡Y0 ˜¼oÍd¾Jµ¥ # »óÇ׋—¯~o3 MŸ7F{ì{?ÿøþͼÚu¡ðš¸Ï©8æ§a×¾9‘ë4“œÿû÷”ë2Ö[™Ñ*Í7¨ð›cÇ)äp髽¹püšÜ¨­ÝæÜåÛÔTãÓñÁ"k%åêЃ,JË‚xÌkÚ–‰d%þÐÁêâ<J¨wh†4çÝCŠŒÌ÷çrïë\aûΡ¶_3ôýÖ®ªŠR—õódÅ„Ü7kŽÈÕEC¿¢/BM’Ÿ„%ÞŠl#í-"M€Ê2‘ q©ÀG¾¸;Ã9¥.lWqvÇWz'2ž¹ÕÅÝ^j”Ómß1ÃÝm6Wí™'»—qº>²/\Ueb»–¶ÚæLÈ¥~ˆBåÖtÅãDUhCXª>±+ŸQø€ÐŽàþĽÇÇ·¤÷yª3:8òá–¡ÂÛø×ž¸¥×Õëu÷¼È…É)W ôŽ®ÎºÔø±¼ùx«€¼9ßú¬`\ wqqí©bKGk'UŽ^ˆ»ó­I&\Ç€@gW?@ÉVïh4µ¿S þBŸ*x+`²½rí׺i‡’ÛÉŒÖù¸­s˳‡J<åK£<†Zßš‚CÂõQ 3_né¨ ²[žm;¸*u¿È¯©u5Q‡ªzTð#¸€r­3.‘B•sóÂÈsÌý"—–;MÿaZÝôƒ0ÂU"ÄEŒ‡àãüÝ‹9}0ÚŘîu\8Ù†Ð+·÷¢!?­~“£1tò¾pä#/t¾˰Ùöendstream +endobj +825 0 obj +1429 +endobj +826 0 obj<>>>/Annots 272 0 R>>endobj +827 0 obj<>stream +x­W[sÛ6~÷¯8ã>¬²#Ñ’,Krfü ¦u›[ñVšéìŒ_ ”% ¥èßïw’¢Ù¤ÍÃ&3–(‚À¹|—Ã?®&4Æÿ -¦t;§8¿úq{õóöj-—tùcö¸À²ûûhJ³åßg³hFFRÊOà&¶iÿ`ùÍãŒ&Ú¦Ø}¾\Ð6ñ÷Ç´Ï">¨BZq¬«Âá 6ÊE!ö2¡“rrIVä;± +KHï>ËØÅ™°vHŸ+ë(Sÿ•TYi.ûDô«>É£4CRîöÝöóÕ˜F“[½MUINÓYWüa68Ì´í¢ +”¨4•FŽœ‘’têzúiõB…È¥-E,ßûßìAWYÂQôκÖÕÃ/FW¥&ñC™ U|Ö’¿k³¿n ½_C¢Hˆy‘ºÌü²o?âSŽè_¨AïÐX©ÚW¨%’4´ÞlüÆ/«g_i“¨bŸéuPÙJdÙU*|¥o¤‹o²D”oAÍ>Â)]Pª2ùú.ªÏšÎÑvócAî Ia%M£it;ôÛù¤ê~æ\F{¶Næ¤,í°4!ìZj«¾ÔéG´=à^.¹ î \غ—].|¿îÄïá«Ü…GDÚP¡O>[šÖÛ‘GL®Ž(`ÎÇø:Øgz'²Þ©R¦c‘Õ±Ö•ðÓÝò6ZÖ„˜‚ nïi‚:1úïîúú'ãhÑFÆ•Qîì;ÔE:Ÿß%ÏhÊäl@¤ç‰;iRy©(m©ˆ62—ùN:d Û¸²÷¥²Íq(]÷4B{ŒzÉ'Ê€tÚœ}÷oç5¥¡£kæÛÛ ˆ…w=Jv–¿€µ'mÐxCT¸öR8,ÛUNÒQd¢ÐØ ¡ªElÎ¥X<ï@R 0FNŠë@F ”ŸË;xÎõÍ&J¾×’ÿ«a‚úp#‘ä¨@PÔ’ŽJž¾ü_Äþ]¡5š8š.¡Im Ñ\0¨lªt?øfÇ —!'¿8’T +eBÃp ¨ŒQ§W@ÆCR¨ j298¯¥ºr”H£ŽÀB¯¿¼NµWðÝ9Ê¢-ÅÞFä©”C)T›<(èËO&Ò •¡i)==߬·ý†€t”ƒÃr>:°¦vŠ ÛÅo¿°wÐl²’Ã…ð.2Ú\u.sšŒgÌ5¿’o¾±¿»,¼B]ìæçõ‡ßþó²ýøiMñAS®·òßðì Ñ/l£_?ý¾ý4ú ³ `ìÕÅk€¿ ”Kξ©2ð¤–fÊÚJ5¼fa%k³k²ù.(l) Œ‘ ˆ©¨²†Áh1³¼-ø×ÈïuîuÀ?Ü<ÞÕD4‡ÐÔ5ÜkÀ6x}44JPá0ŽžƒÌ^1 úN ÓZ1Zî#)Z ¿³°„â§RÌÍ^d,ƒá 6a_È´U» °ÔŒÊþsã„qÛ§M`9`.‹œ']JÀV[ü0öÂÏGnÌGŸeÇÞ%æ4†Ã ½9óP$koz¬‡0E?a \ +OÛµ¿¬jšþ©¬}H¬µ' Œùá#¥Òh§cq%YBPÁЄõ6Gèaíe¼øxKm=ÚR´•@ÎÍtÓ+9ÖtcÑÎsFæ*Ëøô£J &¶*}ÇÁbœÎ  °\ @e˜‚7ô>Öy^ +Q²ùï¤;It=Î Oï`–¡ÐkÛ/Å1aOíWÔV瓯ü¾(º€Ž<´ +¬Ð/ ãRœÓAHÁõ%’ï÷bâb´ØEÍühQke¢ Þ¹x +në_­>‹cêYFµ——2VÆÑÚ¿%†ew.ñHûúôf]wðc†½1Èxiñå°¶{¡ÍÝaæRå~Ç£WëçÕú‚ÂÉ|´;ƒòlØÍ…@^ì3Z +†Ár ”×Þ™’hÚV¿—äP4V9L88ïWg‰æ5¦3é4Hõ“NãKoáq©áà½Ï¡ïÓÔ$Q¿}GüÔ‰¸—Ëÿ!þò”< ë6Ò¿Þ¼‰ŸEã®Ü£°Nå|Q‹ N0ˆÉýb쌚ØTi@ßl/TowŒå›íøÄã9ÞNypßÛ¿e­4“ÛetOóù}P‘Íêùǽͯ¼ô“Ž+~Cñøá G“ù"‚è,¦~òýŽ÷‰Ù‚G'¿z>ã-0ˆýûêÅôqendstream +endobj +828 0 obj +1781 +endobj +829 0 obj<>>>/Annots 275 0 R>>endobj +830 0 obj<>stream +xÅX]oÛÆ}÷¯¸¨XŒH}Ú@dKŽ 4Mo¢"¹¸ìÊ\I“\•KFñ¿¿gvIJ¢4)nÓ‘»3sfæÌÙýã§þú4¨?¢(½¸]\Ì=o2¡ýG¾ÆzøLÆøõ½€rI+^€gØ¥ùÀÛ/ﱩO‹ï:šŒiÛz´ˆ:"ŠŠûD¬Í‹Å§‹—÷ƒêÍÎ ™"WÙšôŠŠ6"Q!sC¦Ìs]f±ŒiùLæRÀôOŸdaè¿¿\ÙæÒȬàõ0€· ZÕFzÔõÙáEÜ1e´!aè7 +;¥‘yøâŠ>„ΟL! +¥3þåcØÉ4m…1x“ü²UyóPd1Ñ,ìÄʈe"ãð…G.”¨ +¥;ö&T[ ƒÑ¸z^ƒÂ»ÁȰG‰^ël¡RyÇcVȵÌé³HJI@@€É3•<ÏÙ¾qçkk‡Øàjõ#->©èé›Üîâ;‘ÝmD¶þaÀÂæ›Ò?ÖèF§r–«Ï§Qš­ŒÔJICÅFRÌïP" tšv…NÀ—Tlí ôÛ/w(ùbCõBÛmv•˨Ðù³Ç5zÐM‹öÆ)â§¥<ØBev÷•ÎSºüxsI°,ѾI9Ç*—Ðô{7[½“+ëmË,¿xiûÆ…u ¿s‘J­²G&]z‘ÎVag¾@ÞYƒ°tN©†}•±K¶©Ï¶oÝž_ë¦þµ7²„åj[ü +ÜNú—Ñ1ÍcÚæz+óv” 9¢·á3%ýdÈÅæÖ^‘w÷f†ÏùÇùé¼……w;]ÐJ%Ò#kÏQh„x‘†¬L÷»µÂç2AÐ(`Ì8f²¨¬o±Iƒ¹}êPn™t~ý“ Jù,ê{t…+ç*Ð +Új)]lGÅ­.a«ÆÐ ä! ‰¥ÑIYØ;(~†”‚÷êÖiÃWW)¿z¯?©Ñìÿ·ŠM— ³åzÔíßT±¼‚âš lqY1Ú¶òZAT#þ¨>WdíZ†BNŒ,ˆ‡ì>“€ø¿®ÜûQ³Ñe¶’.l²ÛJÔAÔ…lË‚?5ùcéÁÞ[¶ +ñQ|†H 7G6qòv'ÕÓ +•›¯ª¥v]TäÅQYü)uÕÔô5êÐ +œ£{ásR«…Ùy!r–>¿I‰ä*>1Êð«Jø4ªÎÒtœª‘"S1ë> ºœ êÞ=ξ"Ⱦɥm®R‘?¿†ÞÜ>ÎÎzwÎpe·v±Ú…Ö¼ Õ¿ºžp{IŶgµ$î¨ÖF).M*>é\aˆ¸J5r?ú ¡FIg¬YbÎfô^¤KÁ¼)mµ1¾Ñ¯³;^¦Ò©ÀÀ ;y5h¹úÙA{¨U½ÏÒþÝkÖùÔŽð™’ßxãê ½?>Ø|hÀ ÇÚߺӅýîÃÛ‹·ljp°ß°¬cY$–…P‰A@èö+çj]"HdœÖ1êöo„t{"”ä‘n‰±nL‰4,¦ïó×oiƒ:ÊPaK‰~ij,æS¢kžEÅFhÃúÀêt#B¯ˆ§Å¿~Æ¿ÒS÷p‡vžt +Ee(1´žÂÖ-¨‡Z´÷q"ïwµ°ó•2hÞ˜.—2zz¾t¢šÚé:×ÚW¶‚ÝNÁ©ßmÕtVm‡q°…Í9л0´¶=·­R•x“[•Aˆ•*·ÝÃFÀ¸,UüÊns¥ËW[©9IqôʶÑùú’ãhæ-¾0Á!Ëz'1Ÿ¯\C2ËÕý jCOgºpX²–eöØ´jì3NÇ çKÊm""ÑŽ v -[q¿¿Ìä£ÅÖ`°"à'ÅŠwd­vìó@²opÔöE„ê0 °î¥Ã@Æ€!Í'žÛŽ ˆwÑC¬Ê!"Xc“”“±l¹Ž‘vÜÓâ\Äß@ùþîñWÆÌ“d3îlÎÅäoÄS½\úFR؉9¹a2Ø'‰9\0Gs¡å¸d4ãÂðA{ðiÜüX—HjæR8÷„ãň! ‚^‰bÉÉ|l|m56€;`@L®ØqÆ@üMÓÑ/ lZA® -¹‰_EqK ƒ Ò(?1¶™È;(t`nŽ ÃVÏ½È ðó“¢ÃœÛéBäËéΨÙýãcX3&>Cñ+7p—©¼—ÂljUÂß9§«as$€n Ü}ßì€WíuÎËûkòq5±â›¡`l9ûÛ¿ç]{4wÍD?ÏïiNäc&Ÿ­Ä]:@ëV@ÒpØ1§X‡q›_ÃútÖ¿ô‡·CÐÌçn\=Ù«74ò|ܾÙ`ÞOßÜN1,5C†a3wáÅ«ºþhŒ—»ãÀj‘ïN2âhvíhÈ¢Æþ}ñ?õ,endstream endobj -792 0 obj -1672 +831 0 obj +1836 endobj -793 0 obj<>>>>>endobj -794 0 obj<>stream +832 0 obj<>>>/Annots 278 0 R>>endobj +833 0 obj<>stream +xUYÛ6~÷¯˜Gˆe’’uX >·²É&VÑEh‰–å•D•¢°q‹þ÷%_a¶Ûµ ˜áßÌ|óç€Á‹BÀÀõ!)óx°ŠÄ C¸ÞT†\F^à;sC'%`‡Ê&Qäø'Q:^/Ac(D—Z¯ DïЫ^â´ˆ“aýœ~äÞ=Jð +"ʼwña@`D1Ô2“Uœ—b +ÄÉíA$zQð¦™BÃË-Ÿ%‰l+méµy:…¬f–ä)Ožän×›gÔ ¼Ðõ½ÀÒâI¢×ÏÐËï¿üçß–š‰ôm) ñ­ÓÆ‚W‹=¯²sªãµ”ìFFÌÇj ñ« ‹B>çUy¼‚Ëk•VG)h#ÚJ½ڷРv +µlòo'¬ G11(Šfj¢º)ÙˆM°ºè5­¦€8Þe WZ¨÷ Û»ZȺïÓä®.x^d÷.Uf¥öJ Ó¼Á³ÇOÜÔ÷^(^¤°è<Ø6ÊG ðY*„o2aaÄ¥óÕr­Ö³ÙÒ{îd>¡ñV+ëh­ò’«ã½’mýa‰è3B-•ï:é×ônaµôÞØ1m#Ô5­¿u¬õ?óú‰Cøõé/ì'ËnßÉ} ~}jË­PSÀî²G%Áò½ +¯Ìòj³E1…ñ6¯Æ[Þì-oêï,OÏaТxÛ¸½@ ̵ºÌ‘-ØËR,s…Ä Õ“1ßcÙh‘Éñ©}­Ì^˜½BéCÛèóhþ'MTúZË0—!¡žOüÅrÆ"?fž‡­J݉»^t Ó/Ò,e.eÈ­É"•Ž×Pœ½26 ýÞr'Ò#þa!Ëç¾1 õöNôK ½0×Åfæ%¸$ÂgÿUÀÆÐÿ•dÐÍ„Zn Á%Ï àEÉÉF™q•šÑ{ä Ÿ?ÿ-¡CöÂÿ]¸†¡Ôñ§nbœ3A\´º}a´€ØXKeÒviÁ3o™IC[§\‹]œkçöt¨Ä®ÀbwD·1;˜ÃìBw®Èc¦wZhß!žx–úc¶#®§›=µ™=Ìgð¨¤Y7°<Çu.+c}ÔŸõdž/T÷ +:6F‡~ÇûXª/ƒµNXendstream +endobj +834 0 obj +860 +endobj +835 0 obj<>>>>>endobj +836 0 obj<>stream +x¥WMoÛF½ûW zrP[¶dGrzK‚0Ð8n­ =ä²"—âÖä.Ã%Ũ¿¾ïí’M‚"Ž“»óñæÍ›áד¹\âß\V ¹ZJRž¼[Ÿ\ܾ‘Å¥¬3¼Y®ndÊåìòO’Ó÷¹ª]Ë|>“OÖdF§ò‡Û:ëe£›Nk+ŸM]çå~ýjýÏÉ¥œ/®aâTÙT>Ýßý-­7vËSäú›ã ý_Íg ‡¸x»ñM­’&»†ÛþØbÅCw¶ÑÛZ5ÆYqY4O?LR;ï²fŒ4yíÚm.¢¤í#/¹äŠÁ#òi˜T×ÈIÉ/¹+öë¦ø¥Od~c3¸£‚Ûj«]ë7˪m˜—¶;S;[jÛxÉ\ K…ÃóÆ”z&ŸµTµöx)1¥eŸÒ©tc@†LOÏpŸÆåäØäZU¹Q“˜|k-Og7….Xô.¨ŽæµP)SVx ÇaŸ8=âü×Ã{ITQø3y(ÚíVÁ¬¼m­mLïpi[hœ`‰˜Ç½*ò£®w&AVi’œqÂŽë†ÒM\Þ¯%u¥B iíÃñªÒ +@ê«4è£È½'!ý>¥R%¹±¨Ä:7^*…ó’jŸÔfƒ¼Ô¨ ãPr¿÷.ÏD« +8g¥y8kmBtUaš½˜†àï@!$™#<€Ð*3Û´:C`ˆ²Õ¹úÉ‹‡k(ö3¦úûúÍ&¯çoðûúf…ß ü¯ákèÍ¡W®o^>»M³˜ º¢Ô!0š¼¸èÄfŒëtQÈ“uØ‘«æý“«€MM–¡C@ÆÒ¥ºˆ¯uÏjâº0ÍIá¶è¾ +Ù¢'ÊÈBÁÓ#›NrëЖÕ`÷(Ø#ª†Êe…иRªThf’¶h@‰‰kBL™Ð¡fMç$–“à³EާAWïö¬Õu¨áZ΂z}´š}X‚I‡ŽŠ„»Tí"þ&µ$ûQ[±àzÚc“$®¥<ÀØÆ5 <˜Øú5ôeÓ!àÀbÆ;A$vþ¸ñBÏCÉ ú@W5P”†½ÅÔšv€ÈïÀ÷ò1S–Õ®tL¦ ¾ëôN×èfXSiÊÑH¡ƒÆþrôš g€74 xRk&ÅJr²S¡Rý½Jy†Iq¯kýµ5Ôé€Ìv¹v@‚¬ZA^Xc›@ò­ù7ҭ׺ã BêßCí‘Q˜ûà ‘™!½¶&Ð÷ÔPB}¾«µárpt€•q‚µÖâKHhˆö7†ˆÑ|dâ¦éhà$‘ÁÈ^vï_Ü&ýœ9_Ín0f1;¿,–«~ òÀwÅ‹7J;qæû«?o÷¡/¤$¹²[²†hþóç‹èà »TSM99¢¯@Vå:X“ôß/Žt®-Ò^öœDá°Ú8˜8 b)Ñä® {ÉhJ¤mU Ó¤|¦v  Ý>¯ñØvd@¼‹Îr`UÁ󠘤œŒeËuŒ´ãžç"þÊ÷w¿2fžœx$›q7`sî,&ßx#žêåÖ5’ÂNÌÉ “Á>IÌá‚„8º˜ -Ç%£w†ÚƒOãæÇºDR3—¹'ì/F ôJKNæ³`ãk«±ØbrÅŽ3:àŸhšŽFxa `Ó +r}èPÈMü*Š[ê•Fù‰±ÍDÞéD! ss¶ÂxîE^€ŸŸæÜN"_NwF…ÈîÚ1ñòˆßXÙ¸³¸Lå½fS«zÿåþøÈ9ÅX ›#ä¡#=Féâ,Û“^£Âí±¾Â`¶M¨ðÅíÍñSíê2~5ýÔ§c zÏ^"ß7,S»^]3l¹â¬Ìžük~Õ­endstream +endobj +837 0 obj +1670 +endobj +838 0 obj<>>>>>endobj +839 0 obj<>stream x…WMsÓH½çWtíÉT%Æ_$áhÈn-‡„,1‡\ZÒX"͘ÉZí¯ß×3’?IJ@ÖLw¿~ïuûûÅœfø5§›-¯)­.Þm.^ÿ±¢ùœ6[|r}{C›ŒfÓÙlF›tòÙ+çɪ EŸ>|¥ŠÓBE)‡‡†¯èa#9b“Qîl³#2\)OìådG­mÊ,¼ú›áZïÕoñ¶ðÖôÕæÛÅŒ®æËéÑ'9!÷§…m mu‰›È[\Åu¼"|¦2J:‰žÙŠuÈEÒu¤öÊPis<«åœ¢óì%QטQ`Ž/}½ú¢Mf[òÊ{âQŸ†^\OW}ÂÀ¨ìÈ&{mO8®SÔ€Cθ/Á3Òž¥M.H„ÿÅ’FØEèj~Q!ó­uÕ(Ñ»÷ëÏχƒ4< èOiS ~•¢vÔ kâ²´­?äl2U+WIGc.NeÚ©4æn‰G‘{ SkjgË=G”–Mz(pÚ±«uÚ”ì°/ ƒ Ý:-¨v—Wûkx8µUN™Tecl×Y¦%dÞ]ß9»×™ ÝiÐ_ƒ˜pðp¯Ó¡œH?z<–MžsR*ZŸUyo³FH÷&êÉk`)Ý>yG4ãk‹‹9`AËzŸ'½ìhùó«Ð¤ß7ð z³œãçêö?øƒ(Ûh+oiyˆ­¬ÞÞie>›.§s À.W5}†ÔŒS/ºZˆMN´S‡—‘?$e]ÎÀ!ô\p£‚÷¨Ù©¿µ¯!ô#a‘ÚÀ7³uìA´ng EOLxΨ­öElyƒÅû€õ‹¯û »P þ8=вÕ@&êÉk`)Ý>yG4ãk‹‹9`AËzŸ'½ìhùó«Ð¤ß7ð z³œãçêö?øƒ(Ûh+oiyˆ­¬ÞÞie>Ÿ.§s À.W5}†ÔŒS/ºZˆMN´S‡—‘?$e]ÎÀ!ô\p£‚÷¨Ù©¿µ¯!ô#a‘ÚÀ7³uìA´ng EOLxΨ­öElyƒÅû€õ‹¯û »P þ8=вÕ@€OúÉÜËØÛô¦Ñ2&‚ÈÜqê{b¡CÀ•E¢ÁÃGb€¹2J”Áúáé)N=jd¬SFL&”AŠc^aÚÈ<Ó\…±²z€J`G& ‰þT…c€%@›:à1ëœÇ„>mýbµ˜^ÿ¢õ‹Ùíôölqƒ¿®Ä_LþˆáRI&î÷%üŒ á%ì’@~ê;Ij ´sðÚDFH¡œˆYV±=»°=q•0mÀ{ªT•È 2•ÚL /àf/úÇöÖëâ™c6ß?}z|˜Î½é ³Ô è 9*‹"z ¢:U6ØÐº<ÎR ¶@/S¤ßzEÁiÙdÂ:ñ¬Øpz{)±-Ї t?ásï7;kK\Í”âõyËAh! —µ bÉ¡AÖ3[ƒN ÙO+ytº’5ï.,£"ß·5l4w‚m–<ëøZv)Kb!f[bßî´*3Г)±¶Û-…þEËúàЂr°øQä]ãv³}¬”Á€˜ø@¡Ÿ¸´¶(ÓTA«Ãôx!pÑcXs£4ñ¦MÂ\Œ -B¾˜†Ø™6£|8‘¡*ë9ÖÇ£$ô,|eˆWNé#vg¹ÈW‘¡PD;i0üqå‹éIvµ…M 6yfî¸Mé]GqÙFÇá*®^íxhU0·È«¡ìÓò.†Rñnì›ÂÉïdI`Á×T¦úèòã7²~¿[¾ýÉä¹í]}ŽÙ$ß(ggô´¾··ù&SýΦh&Ö‘˜€sO]Åc“Ÿ¬ƒ«›|M.ž\¯ärúëâ_ ŸÚ…endstream +B¾˜†Ø™6£|8‘¡*ë9ÖÇ£$ô,|eˆWNé#vg¹ÈW‘¡PD;i0üqå‹éIvµ…M 6yfî¸Mé]GqÙFÇá*®^íxhU0·È«¡ìÓò.†Rñnì›ÂÉïdI`Á×T¦úèòã7²~¿[¾ýÉä¹í]}ŽÙ$ß(ggô´¾··ù&SýΦh&Ö‘˜€sO]Åc“Ÿ¬ƒ«›|M.ž\ßÊ1äô×Å¿¶ßÚendstream endobj -795 0 obj +840 0 obj 1691 endobj -796 0 obj<>>>>>endobj -797 0 obj<>stream -x…XMsÛ6½ûWìääÎØ´%»¶“›ã439Øu+eÚ["A‰1H0hUýõ}»)ŠJëÉd¢ˆÀ~¾}û¨ï'3ºÄŸÝÎéê†òúäãòäâó{š]Ӳē›;|(è2»¼¼¤e~:»Ì®³yFOªÖ´ÐîµÊñï¶ -ùæ§å7\½¦Ù,^=Ÿßâêér£túŒ¬£§ÅâŒ*OŠJ­Bç4… -ü µN{ÝàsCµjvôõéËŸd[íT¨š5ùºö} ¤Œ±[Ïî/é|v•ÍÙm<@¸_ZWã’mÈwù†”§õ¡Aþ ¶+•òa4u^»ƒK,­4!k^uA¥³5UYj‡ø¦^mçr°>#;ý·ª[£Ïž°­Œm4ÅL¶Ö½àK «V»Þ|Êë qÚUˆÑ–D¥QSÇeeðÐë"R ¨º±¹2$O¤ZÝS£»Æ¡q(ÃG1êÚÎ:¥üƒ˜&YK„#og$¥D å¶ñ]zú² BµB­ M9.5¾SôéiÁ¹¾¢ rªoÖÄ稯Yz4¿É¬q‹©¶5UkÜ:»vª®;U´+€‘CÛªYUè='=à.xmJF J/]åÒGTýw(´åœS娗À–1%x“²¬íZ@„þHnñØ£a@ýYªà(ɉO» -ªjz8*¶U`èiÙ¯óìÿqñûó€`àƒÓ³¯UÌ„í(1•ç¶Ã¸é¦«eÆlÓ—µŸ¨¯b0"Ù¡X’š©VN¹]t€™ÀsÕ fx µ4:NWÌŠÄ@­ò !×5 ž¤Ùw†'Ókiر5P¬!óÂbœjMÇÞv\–(úïÑ˰±ÝzÃAíh‹N3mN|³ÏÔ«ôd °ÖUµ$n›àl3Á+8 Œ¯\|µ -žÒ…ùEã½Pe†©(㉞/O žT—1xkõÂìX}ï4f4ØI¨…ÅScíK×ĨøõáoXÓ€ÞŒG’UnÎvS9Á¢ùF ªdLýa×jÐãqçR¬º8C=JtïZ…Bï­ h˜WAh|  8<¤¤a–Ù«k3Zbd&…àºVë´ouÎŒƒ¯˜Šk0¶ð ¦Y– s gâ S0Õm!£Š²my!YWh‡]ÃW4ÅèÿÇså?ÄæþWàÐX­¾^9v™40a3£_†0¢ì' =?䞣c>A†¸Á^ø¿£Áí´ï&–5Ïžç{>æéÆÆÛ‘VÌÄÛàï›Þ`Žù^t2BXí@…à¹ÑºàÌ'×…È„#m¦HII”{Üϑ㠢¤ï),Vô.™zãŽç`¾M@G"'•×Y¯ -Dƒ%a64 -0J †ÍPCäÜ·6’Ë@ï‘]¤W¿,O ti~s%q}wËŸñ´SN…ñ|þ>»9–ÆW=›n½V+Lä}ǵ½y”9ÊÚ»èä·®AFo饱[”×Óóý#Tº }"ò.öʧ0ØýêÐ=ž`‚XWý%ok쬙¡pb™ÝôS‰2o­÷g‡Š -Å–»½Ƽ:­5\€óÄù ¡ûðGƒ‡Ù£´Q¯œ œ9Ûº…Îe„*ÆçQuÄÉÅàay”ù8q:l©˜Ü¡;QŽZ ­Çî ,)¿¯¶* &+®6D·hÛ€Ó€9»xe l7—¤!r™¶PR쉷¢†–•#;‚V¨ÂÞ²`wDRb AÅõÄ;JÇ<½–E5Qz ˜òSÏ7ˆ-RÛ´™ªQkY¢BËCœÈ~x }6|³¦…ôzœõŠ5ÖBÈM%]!w|/Ónì3礛K”<ß«©ÓQB¼â׋ü΃7à -/&hÑs’uŸ¢”¤‡(ï ¯ÿ¥À.Ë"W°–oT³HVët8<6»Bd~²Ž4^$ó€ ¼ð“ÞÝ&qŒÃHuì—J~T>x…–%e>ƒßú4®Uô?z³Ø7lìH¦¶ªÎŠ#^ç4ZÖ½xc¤15ïSd4aŠì”î%Fë·Vx;a½À1l9ÕÜây—‡ý]RY³›Ûl†_,ÞóKàâþñã=Úi¿qy?Ùï5Iüñ­óxøüvŽŸ5Š·~Ö¸¾½ÎîðkNÞüÌ×±(~;ù¾’ª”endstream +841 0 obj<>>>>>endobj +842 0 obj<>stream +x…XMsÛ6½ûWìøäÎØ´%»²›ã439Øu+eÚ["A‰1H0hUýõ}»%ŠJëÉd¢ˆÀ~¾}û¨ï'ºÂŸ ÝNézFy}òqqrùùž&7´(ñdv‡]eWWW´ÈÏ&“ì&›fô¬jMsíÞªÿnª¯Z|ÃÕšLâÕ‹é-®ž-ÖúG§ÏÉ:zžÏÏ©ò¤¨Ô*tNSX«ÀßPë´× >7T«fK_Ÿ¿üI¶ÕN…ªY‘ßú kŸÑ—@Ê»ñìþŠ.&×Ù”ÝÆ„û¥u5.Ù†|—¯IyZ[$àÏa»20P)¯FSPçµ;¸DÁÒR±æMT:[SQ•¥vˆoìÕv.×ë3²Ó«º5úéùÛÊØFSÌdcÝ+¾”°jµíͧ¼‡0¡]…mIT5v\V}°!"Õ€ª›+CòDª•Ñ5:°kF€2lqÐy3 ®mà¬SÊ?ˆi”µD8ðvNRJÄÐPnߨ¥ç/s*TPKԚДãRã;EŸžçœëÚ §úf|úš¥GÓYÆ`ˆ›ÏIµ­©òXãÖÙ•SuÍØ©š ]©ÜˆÚTͲBï9éî‚צd´ ôÒU.}DÕ‡BÎ9UŽ} lS‚7)ËÊÙ®Dèä=Ôï"K$9òi—AUMGŶ + =/úâužý?Íy$ |pzö­*9°$¦òÜv7ÝtµÌ˜mú²öõU F$;KR3ÕÒ)·0Óx®šh-ŽÓsg€"1P«|DÈuMƒ€GiöáÉôZvl kȼ°ç†ZÓ±·-×%Šþ{ô2¬m·ZsP[Ú`€ÓŒD›#ßì3õ*=¬uU-‰Û&8ÇLð +Ncã+—ŸA­Â†gt©C~Ùx/T™a*Êx¢çË3ƒ'ÕeÞZ½2;Vß; vjañÔXûÚµ1*þH}cø[Ö8 wã‘d`•›³YW`N°h¾¨jSضôxܹ«.ÎÅPO†Ýi«PˆâôÐ +ІI1q„†ÁÒŠÃCJf™½º6£FfT®kµŠAûVç̘1øŠ©¸c `Á`šeÙ0×p&Ð0S}Ñ2ª(Û†’u…vØ5|ESŒþüÁàÄa¶À(­ÕçgNç¶n¡sa ŠáyTqr1¸FXegD>Žœî¶€ÔLîÐÎ(G­…VŒcwP–‘”ßW[“W¢[´mÀiÀœÝŒ¼²¶ˆ›K Ò¹Ì [()öÄ[QCËŠÀÊ‘AKTaoY°; )±… †âz䥃cž^Ë¢š‡(½Œù©çÄ©mÜLÕ¨•,Q¡å]œÈ~÷@ú°ØðÍšÒ;èQXpÖ+ÖX !7•te„tÜñ½L?º±Ï Ÿ’nB,QPò|/ÇN ñŠ_A.ò;Þ +¼˜ E/IÖ}ŠR’£¼3¼þ»,‹\ÁZ¾VÍJ YD¬kÐ9àðhØdì +‘ùýÈ:Òx‘Ì&ðÀOzwÅ1 #Õ±_* øQùàZ–x”ù r|¿Ó§q­¢ÿћžacG2µUuVñ:o¤Á²îÅ#利yŸ"£€Td7 t‡,1X¿µÂÛ ë.ðàŽaË©æÏÓ¸<Æèï’ÊšÌn³ ~±¸ç—ÀùÃÓÇ´Ó~ãò~²9Þk’øã[ñðÅí?kïý¬qs{“ÝáלœÝóu,ŠßNþÕ骛endstream endobj -798 0 obj +843 0 obj 1820 endobj -799 0 obj<>>>/Annots 273 0 R>>endobj -800 0 obj<>stream -xWÛrÛ6}÷W웕›¶(Y’ßêÄMâ¶¹4Q&}ÈL"! 6 ()Yß³ R¢é4íxr±ìåìÙ³‹ï'CºÄϦ)&”•'/ç'¯Ç4Ò|‰o&³)ÍsºL.//iž -³ðÊï©pî!P½¡jmQælå]AKShªåºÒ¾4VÓn­**]^:ð7…S¹œp¸ª‰Tle2Ug)[ëì”ÍÉX¹ûb~rIçÃQ’"ó¹ö ÍÙ«±p²T™¦R=ÀºÊscW0IVïú†ƒö[ƒ£Kç髱 [L´ -û3RExªÕ:GBˆt¡{¾s‡|àWÎqðüýÅkÀ'` 6ªü{M'ÁÅ/[$ Ä2·1ZPèY¸¼Agµ7Õþ¢oQa·oÞ=E5ßD±Wr‘Q÷Zr¯-(ÄÈÝ.Ðû¹”ÄTL6 t@ äêÁÉáHy‹ÂçLÓ¥ÁÝoƒOw·ß^Döp‡# -…Y­«bO¹Y.µÇ=æÓ—÷wÒ&[ÓZ¡ä•]irKö¶Ð¾!—‰ƒ~4N÷’MM -Uêx¿ïž»†]ÀáárÄ $tW1ýšúžºw >ˆîE+T„¬¤G%R“âb¯$݃cA%DŒqÏsc5òÛ.ͪöȸÂã -ZÚ(ø@ºL)qkGaÃ]ÌnÔóSMÛSæ™ã6_ -Ù­,sHîa–pÑ©½°„kæupų@p„KãêfJ}³èå{¤ Ÿ¶ú±ŠI!¥w%$K‰™'š¤dï2ÒfSHV£F-Û(?g`ß=¯-Ê;ÁZ+ð²„-æ,~ïåÕÍ\M@Cã°€(±c¹…&hV4G Hê¢ -±dÀˆ=±À2Cêœ6Àׄ - Û¡Ø0Ê=Úž„ب… -šÖºEWTå j?þ—Ò6€;M;DR²Ë&Ѷ“˜«ð¨˜½M ´Sû®ôŒG#ÎÏ¥gt}-“å8âDz®ú$éÓ+•­‘5ס;±¹A™èC؇’2 °ÒV{( ‚+œP^@?N–û—gh½)çXç5Z R©Ú9ÿ€¼À¿Ø.¡¯³ÍÕ¶•E0PQx—`)`ŽÂcŸÆ*ÛýŒ±ô÷Z[8Š’C¡"¢½{–ÂÜ•êYƒ5ý@­Ñú_žêª…Ë8¼®joá)úxûJÄ!á3|ÔrW,Ú™jSmD=ž7ñ©"8îÍÆ0Œp&°µ÷p»Í,5BÏ“*:í6Ū¥¹µ”ŠÚszœ¬˜øBމ-òÑ  ëðýµ\?n *x&ѵubò ;èÑ‘†žk‹ù‘¹2‰ƒj…B°±tôªÖh(» …´ýàp@MÉ‚…(R¶îË .Dr4¶L'q.^nB¦°r!Çëv;fv÷ ÎÌDÆjU°-§Û,é,EÇý¼+ÓñLtèIW¢'ï ”.òCzå⨑OŽN°Ôbc¥!ÿõéÍÉ0a¿HS,TR:š%Ãæ·‚>÷WÞ4ö|¿c¾`ë³XyÀonmiîÑžºP|ú î±ó÷¿«6è°.Am¥êÔñ -Ÿ–9€Ù°5²Á2ho?|h†ÆRÈû±¨Û™Æwñh®CæÍº¹Æ^‡0Wº:´G€íW6v†Í×ÖÊ®ŒsM{CÇâhÂ×¥;#Ñ]!){W{úÃØú‘î§¢=„ÞöùÁiÜH>‡®‡½¼Á2È?ÇšÑpŠzý1†£és¹¾J†L @e˜ØèÄZ^ }´l˹ d+›W=ðžA; †ìË=æCþ†)¸µ¿-NûVÁ8–gJ”©Zài„Î=–¹\lw—gPûžŠ¯ÙnE›c9ÀF¬µ+¨…l÷‹#Ûmú»(0o§^¯êBùSÐ(òà Ê%ÒŽZ+/Ä©Ú`ÅÄ‚¨±LðÅX¨öR›ßqG8Ep¡¡%;¼\°ÄæWtA:ÏX+Mv* ƹ¼ÅZm7Kb&ÅljPHA¬ÖÐhH®,j®g_¶øF©X{±Â"Ðq6°húÈÞÄÁ9yâл(KB$o×ñÈ[ÐÅëYó¢N¸¸“éU2ã(¢ñÑ»{$@·ÝWà<?Ÿ¦x)çƒÿû‚OÇ0/W&“¦þ<ùt…ûŸendstream -endobj -801 0 obj -1780 -endobj -802 0 obj<>>>/Annots 276 0 R>>endobj -803 0 obj<>stream +844 0 obj<>>>/Annots 281 0 R>>endobj +845 0 obj<>stream +xWÛrÛ6}÷W웕›–(Ù’ßêÄMâ¶¹4Q&}ÈL"! 6 ()Yß³ R¢é4íxr±ìåìÙ³‹ï'#âgDÓ”ÆW”•'/ç'¯'4Ñ|‰o®fSšç4L†Ã!ͳAa^ù=Î=ª7T­M Êœ­¼+hi +M•£\WÚ—ÆjÚ­UE¥ËëBþ¦p*—W5‘ªñ­L¦*ã,ek=²9+w_ÌïO†t>')8ŸkŸÐœ½ 'K•i*Õ¬«<7v“dõ®o8h¿58ºtž¾»0p±ÕÈD«°?#Uˆ¡Z­s$„Hºç;wÈ~åÏß_¼|Ö`£Ê¿wÑt\ü²ErÐ`@l s£…ž… À{tV{Sí/úvûñæÝSÄgŧ;@y]è­²5‰¯Q°\UÑ52v»gøo¢6ú¬QÌÆaD¡b™ÆÒùgéJ™"$̯óІ®Òq2¡ÉlŠÿ§øƒ(–‘e×4šD–]ή“«'<’ ~è Â:¼ñl»»¥ÄÉòäž2W_Á'p æ›(öJ.2ê^Kîµ…˜¹Ûz?—’˜Š)À†„\=8Y Ü)oQøœiº4¸ûmðéîöÛ‹HÃîpD¡0«uUì)7Ë¥ö¸Ç|úòþî/PÚdkZ+”ƒ¼²+MnÉÞÚ7Äâ2qðÂÆé^²  iC Jï÷Ýs×° 8<\Ž„„î*¦_SßÓ@÷nÁѽh…Š•ô¨DjòC\앤{p,¨„ˆ1îyn¬F~Û¥YÕ9Wx\@KH—)%.bà(l¸‹Ùz~ª)`{ÊIúôJekdÍuèÆFlnA&úöÀ¡¤ ¬´ÕJ‚à +'”Ѐ“åþåZo@ʹÖyˆTªvÎ? /ð/¶Kèëlsµme TÞ%X +˜£ðÀØç„±Êv?clý½ÖŽ¢äP¨…ˆhïÅž¥0w¥zÖ`Íp/Pk´þ—§ºjAá2¯«Ú[8dcŠ>Þ¾1@Hø µÜU…‹v¦ZãTQçM|ªŽ{³1 #œ ,Gí=ÜnóK…Ðó¤ŠN»M±ƒjin-e£¢öœ§E'+&¾ƒcb‹|4(Ã:|``-׃ +žItmF˜<Ãzt¤¡çšÁb~d®„Lâ Z¡,@,½ª5ÊÅnÃ@a m?8PS²`!Š”­ûr‚ ‘-ÓIœ‹—›)¬\ˆÁñº‡ÝŽ™Ý=ˆsÇs‘±DlËÅé6 A:KÑq?ïÊt2zÒ•èÉ;@¥‹|ã^¹8jä“£,µØXiÄ}zs2JgØ/Òt£%¥ãY2j~+èsåMSìO–‘wÌl}+/øÍ­-Í=ÚS²Н£C¿¢Á=Öaþþ—`ÕÖ%¨­Tƒ:^áÓ20¶F6Xí퇯óÍ0ÀX +y?u{"Óø.ÍuȼY@7רëæJW‡–ã°ýÊÆÎ°ùÚZÙ•q®ioèXMøº³”cgä!Ú£+$eïjO[?ÒÂ=âT´‡ÐÛ>?8 ÒçïÐõP¢—7XùçX3MQ¯ÿ Æh<}.חɈ©È!¢ ýXË«¡ƒ-c9—¡ƒleóê¢Þ3hÔ}¹Ç|ÈßâÁ0—¢ö·Åiß*ÇòÌ@‰2µQ <йÇ27€‹íâò jßSñµ"ûÁ­hs,؈µvµí~qd»Mæ ãÔëU]( +EœAù±$BºÀQ ¢`å…8U¬˜X5– ¾ Õ^jó;îò±.4´d‡— ÖØüŠN#Hçk¥ÉNeaØ0—·X« ífI̤ø8 +)ˆÕ éÁ•EÍõìËß(k/ PX:ÎMYÀ›88'/PZbåbcIˆäíz ¹q ºx=k^t£+.îÕô2™ñNÑøèÝ= Û+pŸOS¼”óÁÿ}ÁL¦˜—+ÓaÓ žü‘×ûŸendstream +endobj +846 0 obj +1782 +endobj +847 0 obj<>>>/Annots 284 0 R>>endobj +848 0 obj<>stream x¥XMsÛ6¼ûW¼žªÌH´HË’==tœ4i3Çn¢Ž/¾€$$"æ‡JVõï» ”ÌÆ¹t2±%xxûvü÷Y(sü eÉÅR’âìíúìüÃRÂPÖ>Z^­dÊ<˜Ïç²N&ÙAlVµy*¥©¤ÉŒýõÍúv%Ý®Ù*¸‚Ñu:yŒ–+ñ/ÝK¾›EË`Á÷kl•çÕÞ–¯7·ooD¥…)mjÕT5Ϩu~ªtKDµXY6&QÁ³B'™ÂêÂö+>¯ÏL}â¹s™…Aijî{'ÚÃ9#Rm$­ -eh®ˆum‘ÞŒ´¤¬$¯Ê­®¥Ô:¥W™zÖbõNÁOÍÃf'§©$©Ú²œò‘ÁÒ³®ƒ.%}–±­OÈCVõÙ5âV©)·.Çp0i þÿ’ýÇÝÃúNõT[³- sb¶ÑÅËÄ37r¨ZQµ1Å.×t€ùp~%“»èO‚÷aŠ*SÙ›1Y“25ʨ•5ùáñ –Þ2w¢ÿAµiv”óM]t ¯*ÜÆ‡fvêS5ÉØ°‘¬3ÕˆU&¶ª`9?¯¯ïonìtÝLÅV.ÞB¼W# źi€lcø´ÇJxÅj#=Œ•ø²ZeŸAî¿>C÷ÈåEˆŸ‹«~Føœn|·]KˆnØ e×+Öc»…óà2ˆù¢ÿnMíòoiôüCßPD[tÒËÁR!Ö"V’TåÆl[d™½ÂRÁ?d¢¯jÒÖ5JŠºæ¨@ŒÁ9y{óî“|\Ë_÷?½æ7¨D—6Ƈ£NMÁðõ"¸81|ú½(¼|qìéw¼½XáÉ^:EïqÔ[éã» -Ø \>{Û[Ï¿ƒg&(øTCÇ 6%ˆ%É+@ÓÙ(L]So rf°3ö Ó¦ZW§ž¾}™W½Bra6Ñh±Tc4€Š9MÈo^ͽt*6¹iz²FËvÙ CÙÑŽí”0Ùë<çï]E‚1°‰ùfà9Ü$Úqð‰âíêêÙ¤€p|ða÷ñú®›:™yœìòv»um:š@Іm®-d±@7°™­n@° eâéej?θä!û:õ0¢y¦­tf£óW•~ÄðRÑaé¸+7q­jƒ¬ 3ªlFG£ÇÜé~jŽ? ¤`e¬„N¥PiÝ@a!û« œºƒuUe¢ÙsNƒ0k©Ò޹ì9›«Å,ŠxìQç&ÝA1ÑÏÚ¼±Ó‘g`V4w¦óݦÍÙQ*‡¤»“QP˜êgW;Î1sò<[2’?k`ÙG/[[ŸãFáÕãò—+O8îœ{ -åˆè´@h%ÇLNGEpý¢lJÜšœdæ$]æ¡õïÂó=Ö7"ŠÆÛà±cuÚ|ÏzîÂØ×fmg.Ãì þ㌋ÛîhHÚ¡'ÃcÒ‹ço˜ÐÉ]=5A¿ŠCWìTºRc(Á8Ÿ´þ}Örx™Ó Wÿˆ]äËý-Y ˆÌó. Ùà‚°xkܰ6—å2Xâ>pœ7:ª y×]üÈ×§ÆUå%NæÛ5ÐóòALù½þZ1 \ŽŽPmü…—w³Í`@M9ÃBðMíd¦Ö¤1½³˜.˜¿‘QºK¨‰µ -S~ªwºt·àvªÚgØqW0n:xWëgSµ–DèPG„}uw @ÑÉ™ÃÒù‡«Ž½Â%¤I–×¼;y`Þ×Õ7\.0=ø«¶ žÍüâÙ*šsõk—²ÅjÑÿåc¹â>íϳJ¸Aendstream -endobj -804 0 obj -1990 -endobj -805 0 obj<>>>/Annots 289 0 R>>endobj -806 0 obj<>stream -x¥WÛŽÛ6}÷W ‡8ÈZ²äëm¤éyHÒvýÖ- -J¢le%Ñ¥u ôã{†%y/F.À±,ræÌœ33ä¿£€¦øÐ*¤Ù’âbôf3úm3šzë5õÕS -C|Ì×+|áÌ[R%)ÅÚ)Íæ <ÚW³“7ËY¿i¹ÄR³^° ®»¸ð¯¦tI›p–p¿IÌë)mâq¥TýìÅæóÈ¿ -ì˜ù&‹¦V±*Sûº511ï'bà5çöâVRœKQ~¯…ª m½XÄ;ù½f<ßZi¢ÉäÕ;|”QV&ßk‘Cû‘½”•ºynmÌ)˜ž žÓ$\z!çv³Ë4²<¿ èH‰LE“×n+]¿þðæ5žÈ±FÆ~£+?W±È}-ŠHœú{t-%Õ;I…Àfk%QqSȲu¦JÊR:ª†÷MiÌ,šƒ(kªÕ=÷Zò°“H¬Ìµôè}m“ȵ¢¨ÉòĸjÓü"ã¦Q.I” åYT‰*“Ú3Q˜™Òb=ƒº¬èYäNÙþÕe›)¬YÌN„ A.<@õèW£æÚF´{Æ¥Öà>Þy½¨½±AÃI|£ŒÚiþð3·üÈ~•R&Ñ*ªšÒm7.œ{—ƒS{cJ„,tl©T³Ý‘ƒi,²½U¤ö™5ŒYEûJíeÅ– 1çÌŸ¾ ­¬ô£¬êAÅvÐ(Þ“çY¹øZ5U,}ÃGøþO ߯üÓiûï-÷©jÀoV#ŠXj-ª#‡bZ§9Uy®`rKúXD*Ïb¤²¼}õm°ó’&ÚÀyåß½ðIäÕá‚„&Î@G€LÇ)²±/ë¸ËÑ@Q®–Ç.R(©Ñ²2Û‚á=¡ÎXò-µw™Î¸ÒJìc@('ʺí˜:/"èÃñÛ‘¦üçJÝ‚´l(G¤5Psè`©ã¥#“pak€Ú¿½@q%¯Ì›ãÆÕuX©n½Þ‰D†ë]ì÷š”ÙuôÀ°åÒ= †}ó‘ºDåt¶¨\ÑqwåúâQW xÐ4ó#1Chio a!Oì@±ä8 c2SÊl(å—ÚEÔ6Ð:+[誂æu- ôµRC¹FMÍ¥BH{*𪢛1·Ga¢Êç\Emo1[n^´=oyc!ʆ‘w4}]Õû3ÐwÁÐäŽþ£m%÷.K§á jÜL&®e}_l§ÍâÔšìÈrÓü‘W'eT B•ñNiŠD|K‚0ëñ?Ö iC8Ÿw§¡§CˆuzÆiGÃl8t=R´ƒ¯å¬DN{Q‰B‚TFJÛå18YΊQ&ã…,êJå\BºÚ‰»LU¤Ò¯,ãB›ºAÿvsØùìÓÒžö>òýùnÎ.‘€`Ų+(¼œ{˜€æ)§k>†öU³Íʹ™ðý¡6;©Qˆ7‘:®²ÈÔÊüRƒD>wt•Ñ6 œ8ÇŽÜ›ñúæCíטo¼†e‹ünqlx¤muɵ™è‹Ìt«ƒÐüûÄDÐQ -•di;(³2ΛĞtúiãzoKà_Û\E"ÿ›´Œytvt¿Ï¹…&”{íì'Ïó~yìÅ3˜eýÔÈ#Ú |²Òy”Ð - ÞÑó—Ï/lÛ}ûéÃë÷_º×l²×|)˜††Ì 0Ôš§–Ì>¯.÷!ÈŸÚžÓSêú^ HÙ³CwIè9ù™^šÄ†«{Q>càÔd zF|à5š/)tÞÉvüõU[î7s2ßÏa_X<¼¢8èpm’ü(hƒfb œƒ¿ý -øfâœà_\‚ƒ¿ù~ÿ’ïNÏ?„Þž$d‰c:ŧtt•.5œñþ„q~ÆY]˜Ø¸ŠòÃ9ô³µ™ëñ³g#]c¼WÝP9Gyâçd¦=˜1ýæáœçpõïÆsOÊY×þÄoN¼º ®»—|›Å]Ê^s~¯Ôg:½^wŒ^‚å -Ë'«ÐÜ|Û‰A©ùôƒ~ˆOMŸ3Óç«9Ú¦Y¸\ónèüÑÿ½»e†endstream -endobj -807 0 obj +eh®ˆum‘ÞŒ´¤¬$¯Ê­®¥Ô:¥W™zÖbõNÁOÍÃf'§©$©Ú²œò‘ÁÒ³®ƒ.%}–±­OÈCVõÙ5âV©)·.Çp0i þÿ’ýÇÝÃúNõT[³- sb¶ÑÅËÄ37r¨ZQµ1Å.×t€ùp~%“»èO‚÷aŠ*SÙ›1Y“25ʨ•5ùáñ –Þ2w¢ÿAµiv”óM]t ¯*ÜÆ‡fvêS5ÉØ°‘¬3ÕˆU&¶ª`9?¯¯ïonìtÝLÅV.ÞB¼W# źi€lcø´ÇJxÅj#=Œ•ø²ZeŸAî¿>C÷ÈåEˆŸ‹«~Føœn|·]KˆnØ e×+Öc»…apD|Ñ·¦vù·4zþ¡o(¢‡-:éŠå`©k+Iªrc¶-²Ì^a©à2ÑW5ië%E]sT Æàœ¼½y÷I>®å¯ûŸ^<éàq„ONÀF9CûXfy:BýDb•ý^H^¾8öô;Þ^,ƒðd/¢÷Ç8ê­ôqŒ]lP.ŸÎ½Ží­çßÁ‚3 |*€¡cȃ›Ä’ä él¦®©7ˆ93Ø™?{ÐiS­+SO߾̫^ !¹0›h´Xªƒ1@Åœ&ä7¯æ^º‰F›Ü4=Y£e;‡l€¡ìèGvJ˜ìužó÷®"ÁØÄü3ð +ní8øDñvuõlR@8>ø°ûx}×MÌ(n[:ŽªÙͦò©30Ê-Íù,]öº`‹¸ÓçAzMÖHù½Eì·‘±S®=†?a€è75œÍØûꢔùÃ)"ýïeÑ ®m‘8î…ÄÕ®ˆ f¶LUº^í°Á¹àö¨Fwî3“dbÛ†=çQ?¹ Èy]*“‹'88õü:"úfìÚÖÉ ¢tCpª=…q #Œ®v µåô1t0È ‰¦-Ÿì£—­­Ïq£ð‡êqùË•'wÎ=…rDtZ ´’c & +§£"¸~Q6%nMN2s’À.óP„úwáùëEãmðر:í ¾g=waìk3ˆ¶3—aöÿqÆÅm w4$ íГá1iŠÅó·GLè䮞š _Å¡+ö*Ý )ƒ‡1”`œOZÿ>k¹ +¼Ìé„«Ä.òåþ–¬Dæy—„ŽlpAX¼Æ5nX›Ër,q8ÎÕ„¼ë®~äëSãªò 'óíèyy ¦ü^­.GG¨6þB€Ë»Ùf 0 ¦œa!ø¦v2SkÒ˜ÞYLÌ_„È(Ý%ÔÄZ…)?Õ;]º[p»Uí3 ì¸+7¼«õ³©ZK"t¨#¾º; èäÌaéüÃUÇ^áÒ$Ëë Þ<0ïëê.˜üUÛ…GÏf~ñl͹úµKÙbµèÿò± +¹Eûóì__ÝAendstream +endobj +849 0 obj +1989 +endobj +850 0 obj<>>>/Annots 297 0 R>>endobj +851 0 obj<>stream +x¥WÛnÛF}÷W ‡(ˆEŠÔÕA[ ië"IÚZouQ¬È•Ä„äª\ÒŽ~|ÏÌrIÊ!`HíîÌ™9sÛÏ"šà_D˘¦ Jг7ë³_×g“`µ¢þQíð1¡8Æc¶ZâÅÓ`A•¦-öNh:›ãÓ-MVÓþÐb­rZp ª»T„—º õpP¿NeyBëdTS?{±þx^FnÄ΀|ŽTS›Ä”[·ÜŠËú8‚ ¼çÔùB}Ò”äZ•ß*¡*ˆd» QÉ^«˜ tR¸h<¾Íê=å&+Óo•Ȧ}ÏYÊJ[«÷Géêõ»7¯ñEˆ2 +[…¹ITZUlÔ±ŽQ@WZS½×T(vRR“4….kUg¦¤lKw¦ásGS‡æV•5Õæžzk +}»×p¬Î­èm-ˆIåÖЦÉòTTµîNIÖIS«M®I•)åÙ¦RU¦m VH‚Lh¾š"º\ÐsûÈ//ZOaÏ|zÈQÌ@ èg‰æÚYµgF¥µà>Ù}P{y#AÃN|‰ŒÚ±ÿàð3süè~•Z§ÖªšRŒvç^½÷Á±¼¥Jp:ŽT¦ÙíÉÉ,oƒ,2‡Ì Ƭ¢CeºbI†˜sæÏž“5N ê‰DÖõ c;h”(\¸„Ö4U¢C#Gxÿ§…€WþéØŠü·Žû­iÀoVÊD[«ª;6EJ»ykòÜ@äŽì]±1y–À•å§W_;/ilÎ(þÄO"onÏIYbqtèv#…ºN: "ÊçòˆÍ…+`%5VW`;0| ä‡|KíMf3N‡me +Ö1 ”åÔvL¢€èÝÝ×#ÝfПó  d#QxÔ¶j6,u¼´mdÏ]PûwPH®ô•|±8.\]…e“Ú~á÷Û½JÍíp¿·ýÞFq™ÛG‡—ÞÝãhX7ÉKTPvg‹Ê'WWÎ/nu’E3¿#f% á[‚ÄGXÈS×P9ȤKÉR®½Em­³¾E\Uˆy[ëumƒPCºnššS…àö­ÂRE×#.„©)ŸsµµEŽ\¿hk4Vù`¡Ê†‘w4}YÖ‡=0ôÆÐø†þ£]¥ÞKÇæ r\:ç²½lÇÅâXŠìÊr)þð«ed LÕÉÞXÚ¨ä)B¯ÇÿØ,¤m ñlÖMCO5† ëxÆi[ÃtØl±y$i&^é]©œªR…%È´”¶Ê£qrXx)™ŒaQW&çÒˆ«½ºÉLEfû…i<@è\7¨ß¾{½[Úi/â‘ïÏßÎâé-9ì +Š/f: |åtÅchŸ5óXvΤÃ÷C!­÷Ú")`oªmReÉ*ŒüRƒDž;ºÌè‡MÁ€‰säɽ­®_0Ô~¼ñ[øw‡±á‘²Õ9×y¢O2©V·Êòïc± ›Q +“fÛ¶Qfe’7©›túnãkoKà_»ÜlTþ7Ypëìè~óÅ”{åì‡ ~zláÄrüÔð#Ê tr¤s7(SH€zOÏ_>?we÷—ï^¿}ÿÒ/³@„}¼âKÁ$2£H¨•¯–ÌÞ¯Þ÷1ÈŸ¸šÓSêë^ ȸ١»$ôœüH/űñòž•Ï85YŠ…Vøã˜åe‹8od „5AÖ„ûÍŒäýöU„ÍÃ+ЇÕâäGA š±@9÷ð¥ãáŸ_€ƒ¿¼ŸÂ¿à»ÓCÇCów¡w“„.1¦# xJGUé\Ãï'Œ#ðSö:èBÇÆU”?N¡Ÿ®¤¯?ÄÏš%tExuÃȹÓGš1'3íÑ”é—Sšã弋枔“ªÃK¿L¼ª ®»|›Å]Ê]s~¯ÌG$:ý2¼îH¼D‹%¶—±Ü|ÛŽAkmyúA=ÄÓÒ‡Fzúl9CÙ”K™&çœýТe„endstream +endobj +852 0 obj 1521 endobj -808 0 obj<>>>/Annots 294 0 R>>endobj -809 0 obj<>stream -x­VkoÛ6ýž_q×¢ˆ‹Úò[v CÚ$E´éÅ€~¡%ÚV"‰*IÅ3°¿sIÊvÜ$@±5…`‰{ï9çòûQŸzøëÓd@Ø’âèýìèbvÔ‹¦SÚ=ô/= ðM'xö§xhI LÅ[/ÞŽÄüs;Ç£hÖ ‡QìGËyû@„îeNh¶@61¢ÏR7Ü£YÒ"þ÷š–Ùƒ¤uVγ2¥ÚHmH`C‘“YÉ<§o-Uæ*¥LeJÙ‚ìJnh%°Êʼ”–D’Hc¾½};»óe6Iô9“?? ¸®xG*¨ßçäý[N7ŒÍ.c·i¦˜1Áüý„­,ª\XI+UÈ4Óo·ÔýÂÒýJ]žÑEQ¥í¾9ï¾¹ ©ùDâ1@"=†.vo/&ðGO'âz! `Ú ³Ú!CñxMw̼#t/O 3¨ãGñú½h £QD¿«¬dèæìÓû3[R“UîÛ—ó”ªBd%Çë^޶v¾„ÖEiy>6X¨?ߢ̸MKQHêQ§?tܶԂh£jM_¡>µ6!â|¶>K‹¬ÌŒÕÂ*Gý®@ªõÅ;#=‘BË»e,ôJgY.—ÒGò !¿Eäc£#[µRöµ7ES·6º›«Dä]#йè2輦W˜uJ;ò¸PG;;·ôB5€§¡k**­*p¦¥©Ti@'»aͬT§4—§ôŠÕe†<ü×F­W?É%Æ[ìñêc†vÎí`k'ÜjÞÜžûf?%÷qD7VhKuåJ -•R*d¡J§+¥Ìþò¸¢=/dik‘ç›6 FK[‹Ò:¹«4[l¼A‡h&ÑYåf¨-:Êfà&˜•*tÈA6x 9|Ÿ*¡©Â¾†Xì¡o9P›æ5'ÏíQ)c²yîÙ嚆îjü`2C,ÌÒ6Cå‹LÍ”OÆ~ΑÁÛ~èümë£OXاÆÿ$û—g¹:.Häk±AÕB‹Re©£2ÏÙàA¦†·8{®#>“À®Ë¶E?Ù¤•¡Žô-µ¬HÓgÓœ­ò ÉЊiH&§?>cÌk‡c±Q&'ë³ ´4ý<ìÁÙ#êõNÝÿGiì©ö³Z£>x´÷jw³ÔÛdõ†AZâØ58ã HLbrCÌY5ŒZ8ÇñÍ™+lûÿ`®¶PÔ©_Æ,’L`Às‘Ü×sØ6«ßß.š¬¾Ëß~Ý& i_¢tù·À/Ûtåêå¶§V¶9GwÜ*8Üy:6 YÚúpqýîÏeÃ}¬Ÿ×:ŧÙzoäc ðŸø~g;ÂIè`§{=·Ë§ÌÌ÷!nM·hÍÇ@vúÎøùÎÓºž?dª6ìZWþ®ÅÖšR±iœý»ÆÁ7¿Ñönz÷n±§ÏËãwÇ®ƒöd÷ 2%B8á,“PÜÙß‚ô–ZÁ&÷µ·Ðª · -b{–…½Ó³ï¯¥ÃøÁu4m=yˆ®ƒæ–¾Âi8rû¸õN(>q ½¥~ÑêN&–ÎUR0;×¼ªÓ'  Üìp—¢åŠÐçåÒÐuíèMFЃ›Ÿðjdý ¤[gUendstream -endobj -810 0 obj +853 0 obj<>>>/Annots 302 0 R>>endobj +854 0 obj<>stream +x­VkoÛ6ýž_q×¢ˆ‹Ú²å‡ì†´IŠ hÓ­.ŠýBK´­TU’Šg`?~ç’”í¸I€bk +Á÷ÞsÎ=ä÷“˜ø‹i:¤QBiyòf~r9?D³íz…— ‡xŒgS<ãZÒSñ6Hv# ÿÜ$É8‡5£Q”øÁ2DÞ=¡5 3š/‘M‚èóÌ hžvˆÿ=§U~'i“W‹¼Ê¨1RØPdÖ²(èkGUÅ–*)3™Q¾$»–[Z ¬²²¨¤%‘¦Ò˜¯/_Îo}™m1gò结!וL“hH%Å1'ïß +úÄØì3v+öp†SÌ?LØÊ².„•´V¥ÌrÍñöKÝ/,íЯÔç}UÙþ‹‹þ‹Ï!5ŸH2AHdÀÐ%îíÉDþøáDBO¤Lû aÖ{d(™L¢YàŽ™w¤ƒþÕ a¦Õpr/^G“h#ú]å@ŸÎß¿9'°u'5Yå¾}¼xK™*E^q¼þÕx·aoèKè\V–çcƒ¥* +„V”ª²à»”âX=Þþ¶ Jû]Ú¬%r÷‘†!Rçâæýùõ‡ûá;”·i%JÉCêÅ#ÇmG-‰¶ªÑôêSò'Îçhëó¬Ì«ÜX-¬rÔï t Z_¼1ÒS)´¼_ÆB¯u~—r% y$ò[D>6z00²P+eŸûÑI[4õ£û…JEÑ7¢\ˆ>ónÊE-ŒÙdÔ»% õ´ƒ°÷™ž¨ð´tÍAE­U δ4µª èñd·¬™µjŠŒò5=cu G™Àņ!ÿµ•GçÙOrÉ„ñ<†ú˜a‡s;ØÚ·š7·ÇÄ>†™%É}Ñ'+´¥¦v%Ê(²T•Óˆ•ÆRn¹_Ñ‚—w²²(Šm—…£ƒ¥mDeÜU–/·^€ ‹ ‡C4“ê¼v3H4esp Ì«;:ä(›#<оOÈÐTc_C,öз¨K‹†“çö¨•1ù¢ðìrM +C· ~0™!fi›£òe®ˆæÊ§ „Žã?gƒÈáÎ] ?tþ®õÑ',ìׯÿ$û—G¹>-I±EÕB‹J噣²ÈÙàA¦·8{®#>“Ànª +¶E?Ù¤µ¡žô­´¬[H³GÓœ¯ò¨ÉЊY“J&§?>cÌë†c±U&'ë³ ´´ý<ÀÙ# ^»ÿ÷Ò8PíµA}ðhïÕî4f©wÉê-ƒ´Â±kpÆA‘˜Äå†X°jµpŽã›3WØöÿÁ,\m©¨×fïendstream +endobj +855 0 obj 1279 endobj -811 0 obj<>>>>>endobj -812 0 obj<>stream +856 0 obj<>>>>>endobj +857 0 obj<>stream x½VmoÛ6þî_qHÆÅbÉ’;)P ‰“Å–—-Ú†aÙY¢#6©TFO·èøÈ9 FÁuzõÀþÅŽ!šc:c ¥Ö<€(éMϯ¿:“EÌœ¤úMô±3€~€9¢ã¦ýÍÔ æ÷ÓæûTee^Üb*…Q2Ïw;M™2pSÍr®³Ý·IÆŠ¸½sñKÅ5k÷y¯dUÂÌy²„©b±‘ -®¢Žè_Œ Ë~ýpŒA”¢ V‰Äp)`ÿž&Ì>$±!0cPi–‚‘€&¨Ÿs|,Ähs˜I“A.“8‡X¤ps6¥JÛ·{JH{©%˜Œ5ý!^`ä9Â%\ÜC"‹W¿%j¸Ë[‰IŽÈUIi^9ëamíQB˜+”±Ö‹Ô›7–þ,+Й¬òÔVÛÔ1›Ø`ÚòAãûƒ¥¬<ßó™Iü]»÷Ü.Dcf«ƒÔqÑ•¿àˆ Ö̶ ‰™uåOõÜÛg& rÅlg¹”Íã*7˜9ËsíÕë8¨g:Æu&³ða³°Q©ØJl¹ƒšxŸ—·ÑKèÚ½h¥¨ña¸’.)ßj•ë_¯Ú6Vk©¢$½¡7öà‚ÿF°ÔXM3-Ö*ñRŸ nð.f.ßfÛh+ƒŸóœY±® ½Q aãV®˜‚›q‘nq¤iÌ -$½`,ÕÄp0BQ€ â–J–ˆŒf Ãü/—Û²ÛËö,¨}jMXo!·àƒmØï8[›µ5~®dÑT÷lÞ4õ+­|;Õ|ÔÙ,ö‘?nï5šd—µxó%µÙ·oy´ë±ê°lðß;øjêÕÇ\?{Ä d?n>„_|Ö_~…ׯq UIþSl5÷àëj¦—šXŸ>ÁÝ] EP5Á‚ÅL¥ýÎmËé3½¯í;ªX–ûk g1ŽnšJ1]J‘’–ðúA7<9²Êàù»°3Vê²3‰äõ5ãOô.ËM»Mj§æý‹£úô Æc¯¹^÷nO.OOàFÉx!3™T–Óõëã :÷'!ÞÁÓ^}°C„hB$¢ ‰†ëÊóh2‹€uœ è^"¾ëü†ôj‘endstream +®¢Žè_Œ Ë~ýpŒA”¢ V‰Äp)`ÿž&Ì>$±!0cPi–‚‘€&¨Ÿs|,Ähs˜I“A.“8‡X¤ps6¥JÛ·{JH{©%˜Œ5ý!^`ä9Â%\ÜC"‹W¿%j¸Ë[‰IŽÈUIi^9ëamíQB˜+”±Ö‹Ô›7–þ,+Й¬òÔVÛÔ1›Ø`ÚòAãûƒ¥¬<ßó™Iü]»÷Ü.Dcf«ƒÔqÑ•¿àˆ Ö̶ ‰™uåOõÜÛg& rÅlg¹”Íã*7˜9ËsíÕë8¨g:Æu&³ða³°Q©ØJl¹ƒšxŸ—·ÑKèÚ½h¥¨ña¸’.)ßj•ë_¯Ú6Vk©wè ½±ü7‚¥Æ:hši±V‰—ú\pƒt1sù6Ûö@›X$øœçÌŠuMèb·rÅäØŒ‹t‹#=HcV éc©&†Û€â9Šm#ÍÕN€i}± ñ~+¢Øáæ¢a{2U ó" q‚ü/i4P?Wc¨æŠ‰õÃñÓæIi2åsG9¶Œcì6€&ÀDñÒÐqš6¬°•sñ$Q¾A§*ö‰l·T²Dd4{¬˜Hæ¹Ü– Ø^¶gAísPkÂz ¹lûÀxìÀÙÚ¬­ñs%‹¦ºgó¦¨_iåÛ©æ£Îf±üq{¯Ñl$»¬Å›/©È¾}Ë£}XU‡eƒÿÆØ!ÀWS¯>æúá¡zv›»ÞÝø½iC}²Aýó͇«³w{·—§{-,É$ôt÷nI<4,º´;¨žxÂô[h[Z‹c$κ÷ìú&úp}uÛþûóèÇ“oßu¿n±Sz-&WÚÕÿ^Q º÷/•þƒÚ~rS© ÿÿ¨u›’ ao1Êulø·Êúºn9ôÙ#^ ûqó!üâ˰þò+¼~©J2ðŸb«¹_W3½ÔÄ2øô îîZ(‚"¨ ´x(f*…ìwn[NŸé}}„l߉PŲÜ_k8‹qtãÐTŠéRŠ”´„׺ÙàÉ‘UÏß…™°R—I$w¨¯¢wYþkrÇ„¬ÜmR;5ï_Õ§o0{Íõºw{ryz7J~Ä œÉ¤*°Ì˜®‡X?Oй? ñžöêƒ"¼@"]H4\W†œG“^¬ãdDðñ]ç[j—endstream endobj -813 0 obj +858 0 obj 1172 endobj -814 0 obj<>>>>>endobj -815 0 obj<>stream -x­W]oÛ6}ϯ¸ÈŠÂlÉrÛ-éº`ÁֵƆaZ¢cÖ’è’RK|1|BzGQlumR—Ö"Jºôu7³Ý£L ‡6[šoëƒö|@w£ÀLµG?£uõÛN¿½‰ÅxþèYwí€Ýó´0ºàò»Mi³?št Òa޽§ÂöˆûI;™HõZyºq<ÙŽÃ-a°jØÿªÌ[+ÓÚ¨j:c‘É{¨Æ–>ÊìG Ô¹’Eßóty¤¾8Wó¸qt¼ÆÃêöp{´éš7Öµnï;ý 'âïE™}ݘݰø@ÝÜÄ™æQÖÕÞ8Sºå½Ì"º%/­¹\4¢…¶°ÐB«„}ÙÔnGƒÑ%®[ÐXX°¡uçRÙÙ äŽ$&W©M!ò¦´ ¹†Ü4™w@k­ùïzhAÐÒÂi! ²Â}w¾Ê¼”æv¶ïŽ‹Eµn@ËoáÎdÐvH¬,ý!딫ÙcûøÆPˆ-Ïà0mÄÝSÁå…£Ã(™6}?å¿RʾVfWGÇÂQÓïç£Å¿måîî „ D #m;Ù:(冚 d+S§¸.É~{î¤â²\1ŒÄ^59¢?V‹Ë¬ñ{œ;é1܇õì©Î¡ý¦ /]{§¤‡îì„n])‡vû\­Â»ö‡I;z­ùÖcßLÓŒÇÀrü"‰Æ<£Ÿ®ß¾¾¦Fæk×Ö:ìd•ã’1C?˜ŒðC'ë…Íp§ä«Èl‰§¥÷µ;d/ð -?Øxã$akܵ~9ùcáü°endstream +859 0 obj<>>>>>endobj +860 0 obj<>stream +x­WkoÛ6ýž_q‘…Ø’åÄŠtmÐ`ëc­±aX†–èXµ$:¤Ïößw.IɲgºlŠ÷uôýIDCüG4Ñù„âüäõüäíüdÌf´è;|Òh\ÐÅlŠÑ-i‰­CšÎðxìE45&£Q0Û›ŒG{›)¶Þ‘Só@ìðzH/h¾Džä5Oìë!Íãù¿uše­b2ù"9›=Ò BØÜìùüvþëÕÏ—Ï^y/ã•:òê§›o.O?¼}zdÛÒ  g§_VUY¦Å%j‹ïlIFê‡4–æ%³oò/þ+ÿÑwð[Z,Ò"9–ÄÿVÄÖÅyºçÇ ùƒž¹fÑ@ÞƒŸQ/Œ¾Y9÷+Òóç¤s,)|:ÌT¼Mµ0;‚Oõíô Z–•F]2ÿð÷ðú‚¢ˆ¹9ˆh€1ãn–´SmJ¡K*W’Üæ±ßÜ«iº·ïõ»{j*ì!Q$Ým¸[›)2W…!Á)¤†6*-ʾMͬT•%´$™¤RQ¬ŠBÆØ©8ߺÖsWùBXKMÁî\¤å2_`ékeJ^O]á[‰a„ˆŒ*°?`VW Ó1æÒ©E£"˜ûðú…G{.ÆcEÁ88¦ý¨ŠezWÁ¿'³äÓÕûÃn€3V­öÍX‰I¹H$¥Ž¥ÐŒu¡¶(0ÕHZ§®hP[¥×<Ò¥º“GD¾Å[QXÈPd2ïŠñ„0=¤,*e‹2U-•&Å>­¥Ü€8"A<„™ƒ:‘swlÙÞ2ͤ¡BÊ„Ý/º¡EV¢ ¡?¶ï¦”øºí½IOLß7Xçb-i!âuµ1¤lÿ–NïÒÍs¨Bï-Ç{Ê2‘P`g»M¶%çôŠq)H–(àÜ0·g~±nÏï”-ÔÛ•#lµ¹J*ÇJàºoÊ6-WLN¬9Üj]µ@àä ­?p;Vùiy$,L|–¸bø„ðô‚ШJÇ2,ŒA”xåê®g»GIª1Jïh±®ÊñÝAŒ3yT‹~Z©ò÷¶™~z‹ñüËÓ%0öÚÛò´Ô*çò»Mi²?š´'Òa޽§ÂöˆûI{™ˆÕ&utã x²-‡Â`U³ÿªÌ[#ãJ§åÎwÆ “P}–É; Ô¹”yßñt y¤¾0Kaíèx‡Õµp{´ñ†7Öµnï;ý 'ⷢ̿mÌ~X\ nîâDñ(«²5ίDq'“€nÈIk&—µh¡-,´Ð*a^Ö5ûÛÑ`4Æu šÇJÃ7#-ï+07©¯I¥Ø:qBÅk°®– Kב{`ïÜOq¬*ÈÝ÷;ÝÓ»}j2‚‡s 6€#7Lžtéé'²Ìªµäƒ…«Z{.]‘õAöHbrJç"«Kó)ÈA“y´Ö(ÿ¶-Í­"c Ü·gà«Ì +Yb`gúö¸X–›D°üîtm‡ÄʲV¹ê=¦ßÉo ¹Øað4ÓZÜl^8:t +² Óºï²üwŠ”’o•ÙÖѱ°Ôtûùhqo¹»=C~B§AÄH›N¶J¹¥:(™RW1®K²ßœ;±@‡¸,[ #Ѫ&CôÇj±™Õ^C‡s'=†û°ž–êÚo«úÒµ·JZ{èÎŽïÖ%˜rh׿jéß5?LšÑkÌw³ðzæœh2–“Q0áýrõþõ}Òê+_»Þ¨¸ÊÑa+«wMúÁt„:IÏ߀hŽ;%_Eæ+< }¬ì!{_PøÁƧc¶Æ]ë—“mqü¶endstream endobj -816 0 obj -1384 +861 0 obj +1385 endobj -817 0 obj<>>>>>endobj -818 0 obj<>stream -x­X]oÛ6}ϯ¸ÈIlg@Òv¬E·xØ´DIl$R%©¸ú÷;—”l×q´‹[q(òÞ{Îý8Ì—“)MðoJ‹Ï)­OÞ¬N~[L’å’v[à˄Ηü¼X.ðœN®’YI9^žÐål™,ÃÒ9-æø1¬à0,ÂÂö“Æ·4Ò*‡áùrA«,¬Oh•Žn¥Ü7ä¤}T©tä mŒ} ÆšFÚª;¥Î´´QUE¢r†´”¿$•/¥%*Å£$¥3õ¨²VT”)+So¬ÂY9Ç[”™Z(M-Œ¸_VŸO&t6=G0«l$*+EÖÁœtR{2šÂöGÚS i)t!ÃoKSã´ÞBG^ÖM%<Ö *¤–vσ.Øp<Ú?°¼IˆV%,S*4­%IáTÕ o•.¢3¼s| -ˆ#W¯“Ôè<þzÀvDEeÖ°0lGqñrسó•c@›þ\fóä‚qWý[³céÓq#ê$ƒ±ƒý”«jED,ƒóÀ¥ªÌüé5H -T‹<;pÌj¡9U«J€,ÁõZô Dñù@ëýÙ¸µŽzCîTÆVQZ -ôÄP$äšÑFt¨Š;OUÆyí^5±C–Kï»#L¾j޾ ­V_9EQ:ŸreÿÔ·íåO«ærÈâ‡Õ&Ðx©]¾æóÕ¼;âõBc1k¹©½Þ¡¯WH{$ìj:ŘãÏÓNŒ¹è &Eì‡ÇkñN‡¾™ëä)Ý‘È2ÖÛ‰·šaìQöÔÜ·„íÌP… -ƒg-!C`gÝú¨`¶æbÁÖöDÉ– ž-‡%¸oD¬ «Ê“3S.[kŒG/@Kq„õ¨´ô¬«¸Yì»!ž…]¼Cóï¥ÒÓ蟯Ê}' ¹ïù6êÑ÷ä¸ -ˆ!«229A-˜.Ȣ̴ëJxÍX7>ê¾!¹]P6AáBÏNx´G=;ƒˆ4ëøöЦÐ=¬Pg‹i2ÿF£¢ÌúÅ N¾Ðwv²jbQ;ú»9%X¤ÛzáuµÛɪGÁChFº•4Ò<…äKái#©„üåè™À”e'væ­oíaÐý QÆ@Òo%ÜàŽÚšÃä0ñ( ·€_P¨!óWºýJ,¹"tgÔ§H_š¶(©1~³C(„5¼y@A܇øm*­‡î†ÁÆ`ºÂ^B¬÷¡yö΃êÍYöbù”8ò>ûƒ[oÞÚ -èYàÈê…E>Ý:Ó»ÍnÂJÃ>‡]xTÞÇ+Ýo”‡rôcÕEâÓ „¨40 i²¶’Û Ó—@]ÑTñ-Á ãU£Æ ?×РÿÃý}0@oÞSÁ—Á7 -úëÃÝ? \gƺ¤/Á´×êg ˆÀó«„£góE¿>(^>»œE¥¸&µhø€bÏ ¤gfVôçÝ»@X°¥2H`8¬Ñj‘¡ «—$_ֹ✙làÎáy˜gà‘lJø¨Õl™ÛËYK…5m©wRâ>Ó º?a…R‹Ž¯8™bAÛVг  —µ¡Eº—?^î#&s"%€¯9Û˜ Võð}·Žtâkj¬m‘™tÞšNfG±î@Ïa?pó61ÀãÌìY`¼Ùƒ{F#îîð1àöðPá¶ MÉ%€ÆÍø«úÜP½Uiè@|/DŸè!]3Ú|gä ï^fކ8ܪ¶!ö r¹DÚëË>9§óEÂ<Àå}ïóþÍ }´æ3îÞôΤmb -11«gq×YÜ6:ÚO/Èh>v´˜ñ&xôÇÉò€?endstream +862 0 obj<>>>>>endobj +863 0 obj<>stream +x­X]oÛ6}ϯ¸ÈIlg@Òv¬E·xØ´DIl$R%©¸ú÷;—”l×q´‹±)òÞ{Îý8Ì—“)Mð3¥ÅŒÎç”Ö'oV'¿­N&ÉrI»7[àÄΗü~±\à}:¹Jfd%åxxB—³e² Kç´˜ãϰ‚ð Û7œ4¾½ é”V9 Ï— Zea}B«ttk,å¾!'í£J¥#ohcì5Ö4ÒVÝ)u¦¥ª*•3¤¥Ìø!©|)-Q)%)©G•µ¢¢LY™zcÎÊq8ž¢ÌÔBijaÄý²ú|2¡³é9‚Ye#QY)²椓ړѶ°?ÒžNHK¡ ¾-MÓz yY7•ðX3$¨ZÚ=º`_ÀñhÿÀrð&!Z•°L©Ð´–$…SU4<¼UºˆÎðÎñ-( Ž\½NR£óøõ€íˆŠÊ¬aaØŽââå°gç+Ç€6'ü¸ÌæÉã¯ú#¶fÇÒ§ãFÔI6cû)WÕ6ŠˆXçKU™ øÓk¨)xvà ˜ÕB4rªV•Y&‚/êµèˆâóÖû!²qk#õ4†Ü©Œy J=0©ÊýC™Ð§è\F DëKŠ/+¿´ !á5®ÔzìdÚZå;FäS¥œ"A²âšÉ‹ÚÉëLjd¼¿ºÀ<2MZ{íZ !³!XT`ÈÊe׿¹Jçæ1Ë=°‰3Ïñ‚ó΋ô 5xí:‡Î8üŸ?´”U厸•¦¦ ±ÐOG¶;âõ"sHIÅÅOhdßåú%¸vÝîŒsiûÌ÷ë©2…Ò1 wå|¬¢´艡HÈ 4£èPwž4ªŒóÚ½jb‡,—ÞwG˜|Õ}!Z­¾rŠ¢t>åÊ:ÿ©nÛËŸVÍÿäĪM ñR»„}!Ìç«ywÄë…ÆbÖrS{½C_¯öHØ;Ô4uŠ1ǯ§sÑLŠØ×â}3×ÉSº#‘e¬)¶o;4ÃØ£ì©¹o Û™¡ +5ÏZB†ÀκõQÁlÍÅ‚¬í‰’-<[Kp߈XV?þ”'g¦\¶Ö^€–âëQiéYWq³ØwC< +»x‡æßK¥§Ñ?_•ûN2$rß;òmÔ£ï#ÈqCVedr‚Z0]E™iו<ðš±n|Ô}Cr» l‚Â…žðhzv;hÖñíM¡{X¡ÎÓdþFâ‹„~‡Fñ‚“/ô]„¬šXÔŽþîEN Öé¶^#dx]ív²êQðÚÁ†‘ne͇ôOaùRxÚH*!9z&0eÙ‰yë[{tB”1ô[ 7¸£¶æ09ŒÆ›x[À/(Ôù¿+Ý~%–ܺ3j€S¤Š/M[”Ô ¿Ù! +ž<  îCü€6•ÖCwÃ`c0]a/!ÖûÐ<{çAõæ,{±|JyŸýÁ­·omô,pä +õÂ"ŒnéÝf7a¥aŸÃ®<*ïãƒî7ÊÃ9ú±j‹"qƒiBT†Î4Y[Éí„éK .hªø]KpÃxÕ¨qÂß54èÿp ÐÇ›÷TðåcpGà‰‚þúp÷(×™±.éK0íµúÙ"ðü*$áèßÙ|ѯÊ€—Ï.gQ)®€I-š> Øsé™ÙÀýy÷.l© k´†Zd(ȪÀ%É—5B®8'G&¸„s¸AæxG$›R>j5ÛEæörÖRaMÛDꔸÏtƒîOX¡Ô¢ã+N¦Xжô,hÂemhQ¤îGÅå‡ûH†€IÅœB àkÎ6&ƒU=$7ToU:ß Ñ'zH׌6ßù»—™£!·ªmˆ}ƒ\.‘vÇúã²OÎé|‘ð?pyß»Åßß¼sC­ùŒ»7½3i[£˜BLÌêYÜu·ŽöÓ‹Å2š-æ¼ ýqòøL?endstream endobj -819 0 obj +864 0 obj 1577 endobj -820 0 obj<>>>>>endobj -821 0 obj<>stream -xmRËnÛ0¼ë+昶*Ù‚ä´r°áÔ*Ú+C®%¦éòa¥ߥe EP‚âÎÎÌe% -~J4+¬kÈ1»o³ŸPVhO|Ro¸P(ò¢(ÐÊ»²È›ÖÈ!zm͇ö•û+”åÜ¿\5Ü×ö„I›müoh\ ôÎÆ®ç/!z‚=]˽ Gr- 8N:È~ûN¼ „md€ ZŠÀ|ØYò £ye¹ÎW‰TœÏΞí´tÖÛSÀ×ä^\\Ù‰K@°`ÄE+‚'1òXh¨s3Kü;ç;›±“Ǿ}Ç«ì(´IžœKÀ·ýÓ›ñiŽ|´çÓΑüGEyµÄØ´¡Fm´‰›uBZÒ’\4F›Ž£~£÷¦¯L¼ –Ca²îgžô}i3 uQç5ªMÃõŠ_G8Íon™•u“§ü9Þr>nw÷[œ}%ðÙÊ8r×­¤é˵œaÿ½USå¾AL³¾)zÎþò½¾|endstream +865 0 obj<>>>>>endobj +866 0 obj<>stream +xmRËnÛ0¼ë+昶*9‚ä¤z°áÔ*Ú+C®%¦éòa¥Ÿ¥e E‚âÎÎÌÿd% +~J4+ÜÕcvßfŸ¾~FY¡=òI½æB¡È‹¢@+oÊ2orи@è]Ï_Bô{¼”;1äÎZp˜týû!vx›È´ù°µ*äF%òËò._%Rq:9{rZ´ÕÒYoß÷b>>>/Annots 303 0 R>>endobj -824 0 obj<>stream -x¥W]oâF}ϯ¸â%‰6ÈJ«*‰’.j¾v¡ÝVâelà=ã‡å¥¿½çŽmHP»«¶‰DbÏ×sÏ=çòõh@}ühÑðœ’âèj~t3?ê“ í?Ì -˜ ‚ˆF“1þ‚IK^Al³ûÀôðö‚¢>Í—Øý|<¡yêÇñ&9¹^‹ÒICƒA@³ˆ®óL*G?ÏOç_Žxí`T¯í ùÈyz‚ɘ~{ùÑò”>õ†Ø«yzC‰P4¥D«e¶ªÚã,Œè³0%]k¥dâHzõvDÂ’h¶œåIR³ÄÔ™(bñ{DÚ+øžŸ~>ŠÎ.‚# QÐh<Áßú)§£ÞŽpÇúgãá .©Ð1ÑE™K'I(»$N“[g–¾VÒºL+§X-u¥R îi à>¡µså»0L„Ñy°É” ª¨<ü3—²Ú„–/n€F°vEþvŸ:Þ&hЈΑ] q%l–ˆ<ßvi«+RR¦ÐÈ:r­7ûŽ×€<½vÑ|-é6ËùR)=™ ¹mR¼89ž^ÝÓ“”æxqêïÞ& H½12à“ºˆÎÇÍ`‹ õÚ óë§púD¼›‘”td«²ÔÆý¯]vçAº«éãŒô ²QŸÓ¡Ôdüˆóðæêæ×é¿<¦MøŸ©²˜fj,QA™±ŽÜ©×+‰7†6™[û±XXIº”F8žNvk,˜‚â\¨çö 8#¿•¹È2”)¿˜©ßä³E®ªy@Óe]´æÈé–b)ÖúàdÚ¥¸ruÖQ[,‚Ͱßt@Ôæ™#kðïR…€q‡ƒs;3™£#5·£ ífƒ‘Ž¿p6ÁwfõUgÒUe³óTšCz^¦i‹âw3t”v”J›˜,Bí)5ž¨_*d!FæÛvT+$éð*©Nª¼GF´ -hæ„qD÷OóYpóûM— É3gèñ—WHP#Kw—O³Ž?²žÊs;\¬W¸=ÜÌ=»ù´£#¢ã'£Ntn¢9kÇŠ‹Y†_A^^¸V5_Wư¾¶øÀ±ªN f ç×vÎÞ]¤ÁV+Iª*biêÐ3•€4ÈuæhitÂÅYâ™@޽†í”¸FªÙ½ 0Éï5–¬4(°Å‰…(4¹(PC¹†þ€^1ÈV‹×D]2ü¬L$Ò” J\†äà…‘ÖâIûCìa -ëã,qÈDçÁ¯½Ë¬ëtÙ$l)“l‰­‰>OfM|,­>_âÃ>fºpþøìO·×0B ŠLé\¯¶‹S8¶ãI¬«Tˆm#®šR½Q¹¸‡¢ªLÜke¯œv Y]1øÀÉßú~xÍ\¾Èœ=Ο7âŒûÚ¤ŒK„2"x"bÐÅWWmu]°dÕVÏ×:ýkoŽÎ¹xíìÞ¤£¹ñ@r96®¼8í6® «ï‚CC¤ ±qå(øæAØ[òksíEc6«?€$÷—¸ï}–mõÒÑÝåÝ …‹Š‚(iMÉoì{&2ÜbÐg,(EäŸkß÷:­÷1a|ÇÒ[2>ƒ¢"€ã‡W•…º…µ)ÚÝ_>h…Âæôh>>>/Annots 306 0 R>>endobj -827 0 obj<>stream -x­V]oÛ6}÷¯¸È“ 8´åø# Ò Ië¬)²4‹…Ã: ´DÙì(Q©x~Ùoß¹”œØÎú61d‹¼÷ÜsϹä÷NDüE4ÒÉ„’¼swú×o)QœáÍä) Ä`0 8éF‘ˆÄ‰ ËJ‘_)|ÊbC–I;W+Gë•*èó¼?¤¯]~ù¤*§mñõ aÕN¥$É7ñ·Î€Ž£‰8E†nb´*üOükÿzDQÔä?Nùí#ÇÜØšRK’îf1}¹™=’­8¡£kmLJ÷•.<Ñû”³u•(ºªìÚ©ê¨G…¥¹Ì’ð•Á‘[Ù5Õ¥à䳸ÃņŠ)⧇Ÿ;ÑøDLi2œˆå jÌÍ7Cs¦ D /DÅ+›È‚h¡(Ó£êÅØKé“e•Í)0°Ÿ«ZR—VÞ—gý~"+kÄZNÔOR¦ÿQª^÷ƒï#¦XùÜìG Ø9Š ŠAK“n­aºHLª4ì÷'bÈìêÀŒôèaÛ,²YÑ OÒ8K¡ô[— +š¶—•]•»¹¥¡·e¥˜Z],ÉX|`«Q…Ì[qd·‹o*ñˆ 1¥•\.AUà‡Ûúh«¿J#Ñ¿ùJ¡ò6´{·"0Ù4ŽÆ§oÑœÑé­âA³CQǓע ú@`7´TE@F`$­4HÁïëÂX™Òˆ¸2Ê ¾ óFºîGÚ½Ö•ó=J*†ÁŸ[q¥‰4…þ~ÿpsxøòÊ’žÂLzŒå©±hä{[nXým¾“êbÍEðã€^fQÌ.ÿ Mp”×Î“ó­ œ*eXè þ -J)1Ó[sÙJ/u! ä<€7±zÁn…õBëíëWÛ"fÕcY`ÍmœWyðƬѦ{Ó&`Ôwñ–üŒ) „’ÚÖ4/zD2Mn Èå ‘Ø" ^« :4±GGÖ ·ÑrYÒ;f©=|4[3lµÚ,ØN¢îÑs6¸…Ññ:"WªDgºq÷~Ìî"õˆpbO°‘ö« ¿¶:gªÚ’VÁl ÅŒ¶³vÙ–És Á¥ôŽÎwH¹/Äyªž4ÜÅÑ.z¤ÄRœ}¼§[ ‚Æ·Øy{9Ÿ=|šÅbÿÍAÊß0 yä­ä“‚ÐŒ×<(Pž,KðèƒÌ™WÝÏ‚ma6-³›ÀMÌN1/Ê 4îÔÐk{Ãz‘+=+ãÙ½¼¾ tÀj>ÉÄ×Ð÷fCÅx[Ôˆ…ý;¦§°Í‡ÉÄÇÓKxv2[C>ImZn”ãôy8ƒ[°=Ò8»BT4Atˆøâ3Äé¼<>JÒ”ÇPÈøÒÃçÉlã=˜ÊxŠ­W³±ŸCÔo·ªÞano°ž 8-þk°ž¶&Š&SÁ7 \vn óË_®.q([žòôÁ&uŽƒ^z\ .¼ë¸Ùö?Þ/hçF1šŽp(0®îtÌYqXüÚù'Âbendstream -endobj -828 0 obj +868 0 obj<>>>/Annots 311 0 R>>endobj +869 0 obj<>stream +x¥W]oâF}ϯ¸â%‰6ÈJ«*‰’.ÚÍÇ.´ÛJ¼Œí¼±g¼3ã°¼ô·÷ܱ jSµM${¾îœ{î9—ïGêãw@㈆ç”GWó£›ùQ?˜LhÿaVxÀ´hD4šŒñÿhŒÈHZò + b›Ý¦‡·õi¾Äîçã ÍS?Ž7ÉÉõZ”NlÐÃ,¢ë<“Êч‡¯ó‡Óù·#^;Õk{C>ržž`ò  ÛËÏ–§ô©7Ä^Ík |ÐJ„¢)%Z-³U…ÐfaD_…)éZ+%GÚЋ·#–D³Ýà<à(O’:˜%¦ÎD‹ŸxÜ#Ò^qÀ÷üòóQtv èl‚Fã þÖO9Í•ðvDƒA}³ñð—Th„˜è¢Ì¥“$”ݧɭ3Kß+i]¦•¿S,‰–ºR)á…w‡´pŸÐÚ¹ò]&Âè<ØdÊÕ³Tþ‘KYmBË— 7@#X»"½Oo4hDçÈ.и6KDžo»´Õ))Shd¹VÈ›}Çk@ž^»h¾–t›å|©”M†Ü6)^œO¯îèQJs¼8õw o“¤ÞðI]Dçãf°EÇzƒaÍ…ùõc8}$ÞMHJ:²UYjãþ×®»s/ÝÕôaFúÙ¨ÏéPj2~ÄyxsuóËô_Ó‹&|‡ÏTYL3µ–¨ ÌXGnƒÔë•ÄC›Ì­ýX,¬$]J#O'»µNÌAq.ÔSûœ‘?Ê\d +Ê”_ÌÔoòÙ"WU‰< é². Zs äFŠtK±” +k}p2íR\¹:먭@ÁÎfØï: jóÄ‘5øw©BÀ¸ÃÁ¹™ÌQ€€‘šÛƒÑ†€v³A‡HÇ߸F›à;³úª3骲ƒÙy*Í!=/Ó´EñÍÌ¥¥Ò&&‹P{J‡'ê· +Yˆ…‘ù¶Õ +I:¼Jª“ªï‘­š9aÑÝã|ÜüvÓ%HòÄzøøâ¡ jdéÓåã¬ã¬§òÜ—ëÕn÷7sOLJ_o¾ìè„èøÑh§Ûã€hΚÁ±âb–áW—g®UMÇו1¬¯m>p¬ªS‚ÙÂùµÝƒ³wé@°ÕJ’ªŠXš:ôL% r9Z] pq„x&c¯a;%®‘jvoE dò{%+ +lqb! +M® +ÇP®¡? W ²Õ"ä5Q— ?+‰4%¨…—!9xa¤µxÒþ{˜Âú8K2ѹ÷k?eÖuºl¶”I¶ÄÖD_§÷³&>€VÈ/ña3]8|ö—Ûë!PE¦t®WÛÅ) Û¿ò$ÖU*ĶWM©Þ¨\ ÜCQU¦îÀµ²WN;†¬®|àäï}?¼f.ŸeÎçÏqÆ}mÒFÆ¥@B™Æ@<1èâ««¶:Š.X²j«gƒkþ¥7GçܼtvoÒpõ·Ýx ¹W^œvW†ÕwÁ¡!RЂظrüð ì-ù¥¹ö¢1›Õï@’{€F‚ÀKÜ÷.KŒ¶zéèÓå=Ý …‹Š‚(iMÉoì{&2ÜbÐg,(EäŸkß÷:­÷1a|ÇÒ[2>ƒ¢"€ã‡W•…º…µ)ÚÝ]Þh…Âæôh¹1fR ±Î|cÕ…gå¬Û˜ð¶Oܱ `×guD?Qÿ½eS +ä]Å¡UfÌDÎÞ³G>ÁRXw蛳ŸÓ´»çxñ =Éc D¥÷åF§Eï2·º QÇnWÀ*É«e~õѼ6ýL,Áð_àW«Õ6 9pã ë©1ªaÐ4‰pK”ÃÅtôm5ÐdèØ÷ølî³—‡y“ðü ÷…’¤¨A_$e‡ÚF!ˆ&#Tif}}ìk¯åþ‰gz˜Àó¼)ßñ¿¦ø/+¯l²ëʹÛÜÇüOßKF¨Ê¦COd>ý è$Ñûendstream +endobj +870 0 obj +1597 +endobj +871 0 obj<>>>/Annots 314 0 R>>endobj +872 0 obj<>stream +x­VaoÛ6ýî_qÈ'phKqì$H3$­³¦ÈÒ, ë0Ðm³£DU¤âùK{ßQrb;ë·!ˆ![äÝ»wïù­Ñc:Qšw®’Nÿú”¢!%s¼à!£ ”¤Ý(‘8tY)òK…OY¬Éò#içjåhµT}šöcúÒå—OªrÚ_ÞVPíTFÒ‘|“|í è0‰dè¦F«Âÿ¿ö¯‡EMþÃxÌo9æÚÖ”Y’t7IèóÍä‘lÅñ\kÃ`2º¯tá‰Þ…€ô œ­«TÑUeWNU=*,Me>“„¯ ŽÜÒ®¨.'Ÿ$.6TL?=üÚ‰ŽÄ˜FñH (Q107ß M™2€¾•,Ql* ¢™¢¹þUÏÖÀ^JŸ.i^Ùœ»¹ªuié}yÖï§²²F¬táDý$EaúßRõªï|1ÅÒçf7JÀÎQQZšt+m ãÐEjêLea¸?1³« 3Ò£‡m³ÈÎŽÝx’ÆY +E o”ÚºÕXÑ´½¬į̀ÜõÈÕ( ½-+ÅÔêbAÆâ[*dÞŠc/»}U©Gdˆ)«äbª?ÜÖG[ýS‰þM— +E·¡ÝÛ ɦqt|rŠæ OÆhUŒï‹úøxôZÔCA ì†Ê£ÈŒd•)ø}U+3ZWFs¨/ȼ‘®û™v¯uå|ÒJaðç–\i*A¡Þ?ÜÜ%ï>ÿ…²¤g‡p“by&A,ùΖkV›¯EĤºÆ„Xsg<ÄØ£—Y“Ë¿Cåµóä|+§JYzgƒ¿‚R +dÌôÆ\¶Ò ]H9àM¬^°[a=$€Ðzûú•À6ˆYõXXskçU<‡1kñ éÞ´ õ]²!ÎÂImk‰="™e 7Päò™Hm1^« :4±GÖÅ›h¹,é-³Ô¿Ž_ÍÆ ­6 6“¨{ðœ nat¼ŽÈ•*Õsݸ{7f÷'‘zÄ8±'ØH»Õ†_[3U{ mÉ «`6Ðb FÛY»lÃä9†àÖÒ zKç[$„ÜâÜÓ­„…?ÂÇ·Øy{9<|œ$b÷Í^Ê?0 yä-å“‚ÐŒ×<(Pž,KðèƒÌ™WÝŸÚ¬[f×› ˜­b^”hܪ¡×ö†õ"=VzVƳ{y}hÕ |’©¯¡ïõñ6« û·LOa›“‰§—ðìd¶†|’Ú´>þÔ(Ç)ès·`{¤qv…¨>>>/Annots 313 0 R>>endobj -830 0 obj<>stream -xWQoÛ6~ϯ8ä¥)ÐÈ–ìØIž¶uK[ h·Æm0 /4EÙ¬%R#)kþ÷ûŽ’ÅéТhmYGÞÝwßwwýç,¥)þ¤´Ìh¶ Yý¶:›ÜÝP6¥U7‹å5­rš&Ó)~‘¯·¢ÊQš%ôöãÃê#ý*¥òžîEµämã¤"isõrõílJ—Ùç/öZÐë/÷üßžâG¾ýr–&¿ÇuiBïLp6odÐÖt¦sJÓÞ4[²açF{ÊÕ^•¶V9iC¾Rf¯5•2!!ú½7qž¯Ø?}½xmlœƒ}QÎÓ6º?ø ª¯/)Ø>îtÖEv.·Jî´9ÇYQzK;c[xôDçÒV•ç8fT;ÎÎc /<í…Ó¶ñÑûÚ ƒëŒ(DóÙüÇhO§ßC¢î±î;@«Öÿƒôß¶‰ºèDñ )>@w!*ÄŸ:(zxx µ³-²a˜›e‰G6d´GWIkøËxœd«M®÷:oDIÄ也°ÒF5d¨£öqgiíŽYÝ™ì5w"øŽÕfË®+ÀpÑ?½?";ªô1on.Âï:Ɔʕ¸—+¿V¡UhpÂb}{áÁÁi°Cá‹dA³ôÿV”¥Üg»§£ÐgÙ/ÇùŒ.Éy}þôžnZ·r£/×Ú°rûê>i=cÝΦ7Éõt›-ŸU ÝŽxO?"Q³›LœÑXsÌ$Ad¬«PsÜE²ÔÝĈÚè=XÀª¹E³ƒ¦˜>ΖdY5ü -ü„G¹¥V‡í÷¹3fe(¶ Ôn-FZp -^£ªwJÕ|ME >-å\稻OüÆ0ˆ@=ß«BऩvªP˜u9U*lmÎׄ͠.bÜ/Äq–¢S¿ÆúÖø€RxÖÅ 1öŒÚβ,™QzsNñYà³{:r+½áÇÜZ! ÎÒŠ<W")øàèGÅyEµÕ3€Ø nµý +Û¶Mäõ” d8‰PGÏÀÄ‹$æÉV»0{9½xk[F~£b„/ C³ëF°-P*]„–áÔ'bNo>|¦7¾çMm¤ß‰¾¾Ä6ðÁ¢„aÛõ ÆÜ ûÑÐðû1@'ê­–@ûtÇLªhP±vŠ+öh´”+–.ÄÛQÅÖÈT!4¹…‹NÒäÕñå=[âQ3ƒÃHŒ(¢=V Á“­p¶¢~j?Åyhi`BÜöPë  žkQpÇ}†+ÎëÇZXî×q´Uƒ¾t‡qÉ#‰Ô¿¢ªáUw;‡÷Ø?˜9€õ× -°äti’¶>0Ç#ùã°s+é/WdaàÆ¯›½föc‘|Ü -;1øfVšXÇÓâI •É@ýÔ&#ªh‚•úrå67Œ'¦¼J Ñt7¼á¼œ‚Íû$ou¼cÍ8©¨õجW¸C»ô%–dlçX£»g<‰OM7!ú’?µG[efLî®ú=›O³³ËœnënY¸Åó/Çué–Û½³h˜s:öÂÉÝuË%ç=[¢Õ#¦ŸÿCìq=YçË9ŽÇ¤– Ž}篳ÿMìendstream +874 0 obj<>>>/Annots 321 0 R>>endobj +875 0 obj<>stream +xWQoÛ6~÷¯8ä¥)PË–íÄNž¶uK[ h·Æm0 /4EÙ¬%R#)kþ÷ûŽ’ÅéТhmYGÞÝwßwwýg”ÒRZÎh~M²ý¶Mînh6¥uŽ7×Ë­3š&Ó)~‘—¯w¢ +ÊQ:OèíLJõGúUJå=Ý‹r#ÈÛÚIEÒfêåúÛhJãÙç/ZÐë/÷üßžâG¾}Ù…²x–BLñIWóª³X-ñSqŠòž¹=·7«„¹÷È].i Ñq6X:¹g“»g|[óRÈ6êÑ–\m‡ªÞZÇ®zS´,C<•õ:Xw¤Üºî5¸Qh„ó`©1_¢§]%ä^l•E(¹,êŒ ƒ}EÎç3ú¦ĸ©· !P  ð74!C8zöЇ×Qˆuà•ƒW²i+ôè{g}PˆóÅÑžN¿‡6DÝaÝu€Fmþé¿muÑŠâR|þˆîB”‹>uPôðð@gdÃ07‹lÈh®’Öð—ñ8ËV›LtV‹‚rˆÉs?a¥ jÈPGíãÎÂÚ=³º59hî Dð«Í–mW€á6¢~DvPéSÞÜ\„ß·Œ!( •+p/W~£B£Ðà„9Æúvƒƒó`ûÂ]_'×4OoðoI³”ûlûtú|6ÅË¡@>£Kr^Ÿ?½§ÛŸÖ­ÜêñFVnWÝ'­g¨Ûùô&Yý@·³åÓ ¢j¡ÛàéG$Š`¶“‰3jŽ™$ˆŒu%jŽ»Hº‘C[} ˜Be-whvÐÓÇÙ‚,«†_¡ƒŸñ(³Ôè°û>w†¬ŒÅÖšEÃèB NÁkTõ^©Š¯)©Æ§¥L€ëuò™ß˜¨ç;@œ4UNå +³.£R…͸tšÐyLƒû…8ÍRt*ðר@ßjðB +Ϻè5ÆžQÛùl–Ì)½¹§xˆ\ã³}:q+½á‡ÜZ# Ί,W )øàèÅyE•Õ3€Øõn{µý +›¦Iäõ” d8‰PFOÏÄË$æÉVû30;9½xkF~«b„/ C³oG°ÍQ*‡†áÔ'bNo>|¦7¾çMm¤Û‰¾¾Ä6ðÁ¢„a×ö ÆÜõûQßð»1@['ª–@ûtËLªhP±rŠ+öh´”Ë–.ÄÛRÅÖ%ÈT"4¹…‹ÎÒäÕòå=[âQ3½ÃHŒ(¢V Á“-w¶¤nj?Źoi`BÜöPë- ŽkQp§}†+ÎëÇš[î×q´U¾t‡qÉ#‰Ô¿¢¬àU·;‡÷Ø?˜9€õ×°ä|i’¶:2Ç#ùã°r+é.Wdaà†¯›½fvc‘|Ü +[1øzƒVêXÇóâI •É@ÝÔ&#Êh‚•z܃ò›ÆŠS^¥úhºÞp^NÁæˆ}’·:Þ1NfœTÔzlV„Ž+Ü1‰]zŒ%Û9Öèö§EâSÝNˆ®äOíÑV™“»«nÏæ“}ÀìlœÑmÕ. ·xþå´.Ýr»w­sNÇ^8¹[u·Œ9ïù­1ýüÿbëȺX.p<&µšrŒè;þ3ìendstream endobj -831 0 obj -1482 +876 0 obj +1481 endobj -832 0 obj<>>>/Annots 316 0 R>>endobj -833 0 obj<>stream -xTMo›@½ûW<åD¤‚ãøTç«í¡’›Xí%R´†“ëì.qýï;»‹?ÛCea;¼™÷æÍ¼"„ô‹Æ‘5ƒ›Å`ø а(Ì«ñ$Å"G„aˆEæýZñ•So -[Ñ¡ k¦ÔFÈz»æ¸\¼JÔ£xÙ‡rov¸^`CBøñ8Hß{ìZèG&š†µ¹=ö©Ê™{#>|¸êé`ÿ%ÃÏ1]+.?¸œÒógÅš% „,§Cz”Bh†}{ZˆTÂbU)lªºF&9ÓœXå•ä™r‹ŒÕ5ÏaµšUmÕ–¶fÔ­t¨D'3C$çxöª€6èëýìÎ䦄Ñ(ˆ -ÍÊ’0 ¥dm¶z¾ `«@ÖIÉ[]SbAwj-Ú\A 5 -Bäüƒ×bÝP´ä”Ä€Ó¹ýùÔÃrAÚJ˜ˆI‹%‡X -”~¹E§vTœ:ñ®q¾<•˃éMÎ Gž( e ¥Ç uE"ˆâŒ¥£¶T» -Ñ–pmÇÅÝ驤 - ËÖv ¾„ª´KdL"Ú³<’¿w¦ ÔDÒÉÑ;iOLªK^s¦\w¨f+v&ºšdàÈEËOå(D]‹§÷å¹ÿ#úO³ï7³—ø%þ—+LiÆ”‘vÔ6Ìt[ á’ô©œt½ù¬ß²kKjwG-÷¿ ¢!—ë•ûüLD'öÞöÓýî<›œ+`FqtŒ¡Ý:7³CéÏ øýb@»ÉhB1É$¥û˜.ÉQ¸]sˆ6LA“ž„Q0!œÃ²ùÖæü÷…V­!DæïñË ŠMÞQjÆ©A4QÿTãÉ{'‡tØ©;€ÏeÕ0í;ÑÐ$à–†ZR¿¹üä–“ÉrÈ'Kx¸aÙ[)q­nûFÇÉnCSSMrey¶Ý˜KñJû„2f™\¦+gc?²á~Û}·§PÑ·Ó´×áÇàsç©Ðendstream +877 0 obj<>>>/Annots 324 0 R>>endobj +878 0 obj<>stream +xTMo›@½ûW<åD¤‚›øTç«í¡’›Xí%R´†“ëì.qýï;»‹?ÛCea;¼™÷æÍ¼"„ô‹0‰1#k7‹Áð!AaQ˜Wãt‚EŽ0ËÌûµâ-* ¦Þ¶¢C!$ÖL©9ôvÍq¹x%”¨Gñ²åÞìp½À†„ðãq¾÷صÐ+ŽL4 ks{ìS”3÷F.|øpÕ#ÒÁþK‡ŸcºV\~p9¥çÏŠ5KYN‡ô(…Ð ûö´ÿ¨„ŪRØTuLr¦9±Ê+É3-ä«kž;Âj5«Úª-mͨ)ZéþP‰Nf†HÎñìUlÐ×ûÙÉM £QZš•%aKÉÚlõ|ÀV¬“’·º¦Ä‚îÔZ´¹‚j„Èù¯Åº¡ hÉ)‰?¦sûó©‡å +‚´•05“K±4(ýr‹Ní¨8uâ]ã|y*—Ó›œŽ<Q@ËJêŠDÅKGm©v¢#,áÚŽ‹»¡ rSI–­í6| Ui—ȘD´gy$ïL¨‰¤“£wÒž˜T—¼æL¹îPÍVìLt5ÉÀ‘‹–ŸÊQˆº#NïËs# þÿFô%žfßof/ñKü/W™ÒŒ)#í¨m˜é¶@Ã%éS9ézóY¿e+Ö–ÔîŽ(Zî@!EC.×+÷ù™ˆNì½í§û9Üy69WÀŒâè:Cºunf‡&ÒŸðûÅ€v’QJ1I:¡û˜.ÉQ¸]sˆ6LA“ž„QÎaÙ|ksþû€B«ŠÖ"ó÷øeÅ&ïhbÆ©A”Žƒ¨ªñäÀǽ“C:HìÔÀç²jöhhpKC-©ß\~rËÉd9ä“%<ܰ쭔ƸV·}„ £ˆáCºÛP㉩&¹²Œ<ÛnÌ¥x¥}B³ÎL.Ó•³±ÙpÛ}·§PÑ©ÛiÔëðcðs¶©Ëendstream endobj -834 0 obj +879 0 obj 734 endobj -835 0 obj<>>>/Annots 362 0 R>>endobj -836 0 obj<>stream +880 0 obj<>>>/Annots 370 0 R>>endobj +881 0 obj<>stream xÍœ[s¹…ßý+æ-›ª„æp8¼ä%åK6ë*_6+m9¯45²ó¢”7ûïsh§rÊ›Ør²U±Fƒó 4  gþù¨mÆø¯m擦›5ëÝ£§—¿l&ãæòºiûå¨mfóisyÕŒGã1~»þîrõn;4‡ëæÙaöçÓï/ÿñè/—¤@(Õ´òÓO•ß4³éÿ¿k¦íh©ÛæBþŽ+|ß<þ¾oÚVþ2t=þýÕg7«Ûóplôn×ôÏŽ·¢%5 vÍ|>šÙšÅÛNýÃá—$'Å®Y,G½•ÇÛN~>$5 vM;™Œ&Vï;ù‹ýé¼Únƒe€L'£¹…hGYí¯24 Ìzß u„ËátÎí`2ý¨s•ˆââÉ«§O¤»¬Kzù»Ñü¯UËéfb•]?ZÀ*û^Z?\¨U>þ~ª6ˆ1Cá…1ÃvDVTÄÉŠ˜¤lO¸8·©£¥h] ±b&èmOÿ)éI‚>l§þaô¾ü4¬Š Œn<šÚJ$¬‡œo†T Vá¯Á’ @@ -1997,11 +2089,11 @@ E^ »L§ß]È̼"ù||¤y~XßíñG: ošôÍç!_ô»ü _ÇÿÛ£Ç)endstream endobj -837 0 obj +882 0 obj 5352 endobj -838 0 obj<>>>/Annots 407 0 R>>endobj -839 0 obj<>stream +883 0 obj<>>>/Annots 415 0 R>>endobj +884 0 obj<>stream xÍœoo[DZÆßûSE‘¾Ãsÿ¸(;¾u;n¬Þ\à¢(h‰–ØŠ¤JR±óíûÌììî3s”4v,å&@¢£Ýç§åîììììþëQÛŒñoÛÌ»¦Ÿ5çÛG_ž=úâÙ²éÆÍÙÛ¦.Gm3›Oš³‹f<ñÛóÏÎVo®×Íþmód¿;­w§ãïÏþñ諳GRAk5­üôí?êg£q3›,ñßm3ëGS{¸n^Ë ‚ÃeóųIÓ¶ò§ÑšÙŽþîdÔâ߯þá¶Íb9ê<;ÂËýi­­í&£>÷ÙÅg£ÿGÿt}íÉfÖu£ºmÒŽ–ö`Ýöų©u:·ëQ‹{éÉÕêæ´>än"ù¶™v‘eÅ2-ÝLts?šû¶XqÔÿõåóÿÍ- ѶiûÅhâV¯Ö‡íæxÜìwÄZ`›°'í%ë˜\!¢¾ÜœŽB2@°Á± ²Ú]©¶M×Íb¯ h$|·Ù]ìß•–°”‰˜¤û8¹Bä¼<Ë aóElH®ÏÏ×ÇÚn›¾]ȤçŽÍäˆpØ_çæ°œÉ86'Wˆœ¯7ÇäEº1¬ããæe7±É“œÎx ,~*ŽAÊìaÓÊäé3%Câm³œÊÜaR*þg³~·Ù]æN!ì­ˆÑ2%•(ln$»ŸcÆ;„QŒó«Õî’šÂR±ý¹X·Å* @išï·=¼éÀˆ&î—þJQ®ÖƒxË/×QE2ú62!•ÆXš£ô•Éø‹#e†Q#Ľ(U4Àåà»ßèc2âfÕIÐ)'ñ’Š#dùþ‹_évA¾‡õž¿t’ߎV‡Ñ)‘Ÿþ\‡|ý='Š5î3qrجN¥^Ÿ3vþ’˜úìÌÁëxù\Zd­Ÿš!÷öéå×ãÊàW¥t»di&ûö¼\ŸÞíõ˪ d<ÐØ’¯÷—û]rüâ1ïaà&.Ác/ ³´oõç:T¸ªƒ,N?W‰L/Is°>•FÂO —5¤Õ^e’ × )?1`JiJèØ¦ð’%é0d¸÷‹¥¬_¬8BnË’Aèq3@^©#}"Fý·ûÕ–²Î¤“T–~åC6BþŠ#Úl¼$A·…Ü ;ñk ;>þºýÔ¥oa%úÓŸ«Á¹úÙƒÅÖ»ËY#î\ÉÔ˜ˆ8ø‰ú§ß¼xüüåߟ|óòìÛo¾Þ×¼i%ÀZ5cþÀFŽ@â6kK‡pzîÚb¸Ø˜àÄI»ÀŽí§dÅR/S‘zD?8d}"F½_I£@xà?ˆGFXIÆÀŒGÈïŠaV丹äNµ£XOBd)Ã'þàïf˜êfL!ûqýI¿›qýBðÏeaÆ×Ãâ¿’ýìõã_>n0þï¶kžîÏo·¸Š­KŒ®§í´ù|®×µ?Ûlä7¸qó—Gÿȱendstream endobj -840 0 obj +885 0 obj 5223 endobj -841 0 obj<>>>/Annots 447 0 R>>endobj -842 0 obj<>stream -xÍœKs7Çïþ}[§jw<ýž9m)rœ¨Ê¯XÊz¾ŒF-©³šie–óíó ²PZE›µ¥lU6T?¡$A¶~{–gSü/ÏÚ"+›l¹zöýɳ¯æY1ÍNγ¼žOò¬i«ìä,›N¦SütùüdqzÕeÃyv8¬wÝz·ýîä×g?œ<£®W–Ó}ø‘~’5Õÿ^eU>™sã*;¦ßcúo.²¯ê,Ïé7C®Æ/¿õðrq½ë6ÿ2[euaÙþ±AÌ'AZ¬²ùtRiÍüc#}¼6ýú" „Ô*ËËDÿÜ2«ÓÅß¶!ÅV°y>iµ"ÜÁP~Ùv›oËË~Ý”ª*'µFqƒ:X.‡ýz)Bn••Ó"¡ø†Ò¯Ï‡Íj±ë‡u IYòÊÚ˜;$¤"³ÉL¿3 `1j Dhrû.Ì4€×/ÞG„"xÚXÿ0Õ ^ö›n‰hùbµ*Ì'gÏ'wýS·ÒeCÃ¥¬ñ¢ézRpƒ‡Ë‹WŒÔgj|`¤Žá= -»ðFT9,“˜m ï÷›ëaÛ‘6å}Jßõ2_ñçÆNE1i¢\ƒßެS”x(³Ç|Rë°|>£k#Þ< âh½Û gû%E9ÙI¢¸Çµ_Ñ Ú˜¯UEó¸†0ONO›§4æaù|ZRJ€7O‚8Þ__›]w¥ YÑà‘ îä”b€4mñÜrÜm>w75•Sxø¿ÁÄšÿŸÔ39´ëy[òÐöÑ'õ¼ÅCí“Jû$ÈÏ }%ï\’Ž——Ýjü!Ä`ɜҡ‚ðs«Æb=zT‘3æV@µŒÝ•›¶—ýuPGŠ6˱ÒPú„¶"B –ÁÄeœ7¥æÍbŠ•„Vƒ±–ñáÕaÐCJÑÜ[#Þ#t°Œ¢œ¶"ÄhꥹFC¸ƒ… g÷_xwyiŽWøëánbwVºUœ4×±;³Ù¤6‘ËÒóYFJ3OËoW§“å°>¦bp3†3"EBø¹†è,2Ê€ÐÎþ!@5âz±Y¬:,:]©üÞ¿n×f–z®Rˆs!…¸†pC;MÖqËÏ)×RÞ;"!wËý¦ßý]1 -ÂyI#Nb<8Á¨$2 -y_M˜š0¶´vqÞ<Â¥™*oÔ â9xÃ5„7êuBo½7r¬F¾}$=$ðÌ{bѵkˆ÷¬hi¯ßsf¢Žå‘I1r¥¼º„ð×Åê{L6¶CĤðs«Çë—G¯BJQÏàÅ,ä¬úúnܱ IŠÞ’¦@©K@[6HQ!æ(d#Åà–§r)C­ä5¡–Ž!Äè×ÊiM® òö¸úq Dež¬~Än¶35ËçØ”bŠ–E âpX­By™èk½èCFVèÛlª‘ÔXeÓ¦ÏU-|ƒm#+"õ´2ùý¶šH`!PVÌ,¦[–Î!2… ö5ÙYø±ü²îÏûqÝ/äÝ®0¢(üÜR^ÃzgBŽÆYE u `‹9ív7]·o$%ãòNqm9ûõÙpõᜓ§¤š–Ò't°œ·'A)JkÆ?覈©SÊ€€ -¡|™ÐÁ2~y{ô暴£ÂÌŒr²‚p ÙoEõKÊ‚—Á,.)¡ƒ¥À®§0-?ŒøàäÓ”2§TP•&à†>¾Ç(–TóÜLňù±Z"¤õ3xV¡ø±Eœnw›ÅrçÞ„j6O)»L&ÆPm‹h †r1ùVn=,gp˜g,—ø÷g@ž×ˆ—Jø9¥ÉxÒåc†ÒK°Žkë44ûÈ7ƒuÆj‰{ÌhZI?¶ˆ—‹XsBÈt(Z6ÁÏ„HaXKA`P(›¤&¡ƒå¼ß Ÿû³ÎWJhÓù(qlRãBi¶r áúwˆÑ<ÊÀÓ)ÊŠÐÌÑÖ„“Åæ¢‹þ2äœr‹Ô!tÐå QAx"¹ ©T®,[(‚Ü5„MK*¯› ËO>Š0«°.¨$€[ÄOÃMˆN!C&¥´"ðsKàÉ"P¤ 0XöÁ·R‘Ð!á ›ÿxçÐl÷(Në>ãldÜäåÖ5„C -*"%±aÎÎÊ’Aaž0ÞôËͰÎÇX÷é<`PÒ†c$&­6ºÕ°‹´\Â1sZÚh w°$Ÿew¶ßŒ$!KëµT!î`I‡‹««o8þŒ+QuÓ«s¥kWæ…™1`‰«nŸåá×AžLoQ˜ -ÃBˆÀø%m%* ˜SÛê@õñ~R L˜È$$tH87ýnyI‰3×#M“¦–™®„AÜtNÞðÑ%âG'nç 1¡R0ÆÇL3àŽ”ñþjqáŽÅY) ª•$Fz±*¡ƒÕæ`¿»Ä¦µ_ªÓT ðâ28þ ÷'VWqr¯¾~î3®˜ÕãD^º†pÅì– '&çàp¢Î€ü`t.Å(@n¤ò‚g Ö@쵤UA±$_ tЄ7Ã~<âR` @¯)FEZiÂÑËð -RNGÝ¡¨Ä™¨WWƒŠEÔÖ¼É -5ŠÿÓ¨qØÒÒ‰Wq¥kç·ô:É7¸¬è¥°+£3 … ÷'ˆÝv'7!ëãÀ$µàçVCw±â‚Þ‡æ¸\`ó£¢·¼¥k£b®ƒÉM˜”–¦^†Æè(‚[ÇÑ^^3ŽÖÛfW„4—vÇŠ¼+ h”`B„9•˜5;Xupë輿Øoœ>ä%\Òø¦^2Á±\œûK×AÝQo‹CÌ2ÎKÁ¸s#H…yÂxº[kcñƉØ5„i°PI&blNõ²¨d„? ó-fiƇî·=nßĺ/Bºþú“Þ½‰²Qw|JÅí­o»ÐÕ;qïÍŒ]ž0 wÕBE «ÂI·Ý‰Ò¢¡K["…à–‚Ûf±*Å©i–ÑÏ5w{W/Ëé"Äãmô3¦þ•O~®!œcød–ÏT… Œ€EfIàç–ñº_õ;!ÂMÑó'£Äm8˜p×Ñ -¬“âtã£u -$m߬|Ɖû îí Ç#\+u¸0€i:JÈïË+›ý-+Ü} -8§äÚ¿ÏãÎU|ƒßLžÚ(Åé.6qÓ*ÅÁÌ^iMÐáÏ k¯qé9XFÊ‚L‰¬$߇;$ªŒ×$¤¸YdŒËD&m"åpP‰j¾q2wH(Ò&RŒ ´UoÃHì!e@@R7þå a—\RˆTdÕJxjŠˆJZº½dš–*ÓKA`0¥›¡ÇŒ¸#¥pï¡pÙQÆwHÇt ìŸ4]àâï]7ÀLšÂyC,´®ÁãÒ~µYÃP’2Û/Ò”DPšJIšb 8¡HyŸ¦Bš¦"Âe‰Tû"6M‚O5šà¡–pWš -$Ÿ¦‰á–$‡$g!†p¾QæZˆ’R Ù;g$ qi*±kÆ‚”€<®_µFž‘V‰OÏרæ„(3ªUh-¸ƒ¥pºüôÝߣBB£ -³‘Uˆ;X”JwR¬á)>)þCÈ3ØRòQ)-È4 -ÂÜí+¥ÀÀ!ºñOè`ã …€À*9S©ÁT‹(&_‚U¥¸)h_…±–¡rÕ(…\å*ZÆZ†ÊU·WaM¦BU-Ö’ -×nC\¹¢’•) x)¬7é¬A!(S%ˆƒq "$hAEë_%ÏÏí•BWŒ )ˆ«à)•S-ëxÁXÊ€€K´FÐÁê1"ÁíRŽ–Sôe•Ö£ÆèJ¬Ño·{q×Sˆapc_DN ÅåÔm^¹ÁùMÐC -³jr‚@„ömd¾”b€`ß`<:Xȧç°R¿IBK¡Ïh°ÿô]|)!‹1…¨}©ùm¡–õãRFÈ€€™#[š%@­.ûíxÏPŠ‚*)¹TØ6t°¹¤…€ÀZ—¢S"˜š ‚-¤ 8…³J0Ôü’Ê-dppúg«a­:è,p»%ÖW}C¤ |Mªë0:Ž©Çí©‹Føeˆk0‚ÒE‚H6,ž£NFýI–g¢UâlüzGÈø„ãKB€Z„X׸Y?è€e9vŠ_Ôäm!-p–€1­ÜÁ2®ñ1°øYJ‚ã.&j£-çlÓc„…x’‚”0\|*u˜œ`†›õÕ°ˆßjIQ€°ÖÇþZ‚B ºÁ]Q-–’”6Ü.Lqm9™˜A¥F ª×ï -Â\ ‘iPŠÑ`¥aª ¡ƒ…ø¡¶õ›º¿ðàºJvTöó—þù²¶opÈ˲]<ÖåÛÊ~åjtŠåÊ~)“P!ƒ€CÙ9gÕX~nÕpå¶Àb€`Þ!¡ƒ¥à;œnó¹Æ]©VoƒîÇÚ"n}UR´i‹Á¬ÜÁª²ö›ñ"‹¤DãYaB‹Yg±#Å©èn«†0×B>÷ñ )>g² ÆZÆá¿Ži{‹JÅ]ÛÛ;Ës÷=hÕù|Ž•D¬íûF dQãô™M­;q++†¡+cÝjA:0³ø9ùA2žî&ŒhìT‰ËÓ¹kð»¡~;/Ê7é{¸[Ž -ÀíÝi„@B# ·õgø•¤«ÀÏ-ÁŒO!Gܾ†T”¶ñ­­¢!N÷ï4‚;X„ûäh2lÜ… -÷•ÓƒÓï}a}ïsãO¬7㲉>0kò'î|˜eùSĻˑŒð#)ÖM)øÃ}Âä¥È©ôGV#`­*"½H)0ìò]BË@lÝt§®€F»‘oï ï-ãd»x"NW®§!¾É%Å-CÌ9„l9I ‡­îïIP­FêŒ@pW0Õ[°3ŒËÏÔ?»þ¿7Òÿ÷Ñ!nƒé—Nvpƒ ×à|CM{½úh}Ö}qsÖ#žß=ðÍ[w ïʲÈý—ûDGîOÑ?üñ#ìšÈïÏÞ|áÂò¯tÌñrXîé’I¼„TºòÀ?Zwááyß÷d‚ÿüì+˜W|endstream -endobj -843 0 obj -4120 -endobj -844 0 obj<>endobj -845 0 obj<>endobj -846 0 obj<>endobj -847 0 obj<>endobj -848 0 obj<>endobj -849 0 obj<>endobj -850 0 obj<>endobj -851 0 obj<>endobj -852 0 obj<>endobj -853 0 obj<>endobj -854 0 obj<>endobj -855 0 obj<>endobj -856 0 obj<>endobj -857 0 obj<>endobj -858 0 obj<>endobj -859 0 obj<>endobj -860 0 obj<>endobj -861 0 obj<>endobj -862 0 obj<>endobj -863 0 obj<>endobj -864 0 obj<>endobj -865 0 obj<>endobj -866 0 obj<>endobj -867 0 obj<>endobj -868 0 obj<>endobj -869 0 obj<>endobj -870 0 obj<>endobj -871 0 obj<>endobj -872 0 obj<>endobj -873 0 obj<>endobj -874 0 obj<>endobj -875 0 obj<>endobj -876 0 obj<>endobj -877 0 obj<>endobj -878 0 obj<>endobj -879 0 obj<>endobj -880 0 obj<>endobj -881 0 obj<>endobj -882 0 obj<>endobj -883 0 obj<>endobj -884 0 obj<>endobj -885 0 obj<>endobj -886 0 obj<>endobj -887 0 obj<>endobj -888 0 obj<>endobj -889 0 obj<>endobj -890 0 obj<>endobj -891 0 obj<>endobj -892 0 obj<>endobj -893 0 obj<>endobj -894 0 obj<>endobj -895 0 obj<>endobj -896 0 obj<>endobj -897 0 obj<>endobj -898 0 obj<>endobj -899 0 obj<>endobj -900 0 obj<>endobj -901 0 obj<>endobj -902 0 obj<>endobj -903 0 obj<>endobj -904 0 obj<>endobj -905 0 obj<>endobj -906 0 obj<>endobj -907 0 obj<>endobj -908 0 obj<>endobj -909 0 obj<>endobj -910 0 obj<>endobj -911 0 obj<>endobj -912 0 obj<>endobj -913 0 obj<>endobj -914 0 obj<>endobj -915 0 obj<>endobj -916 0 obj<>endobj -917 0 obj<>endobj -918 0 obj<>endobj -919 0 obj<>endobj -920 0 obj<>endobj -921 0 obj<>endobj -922 0 obj<>endobj -923 0 obj<>endobj -924 0 obj<>endobj -925 0 obj<>endobj -926 0 obj<>endobj -927 0 obj<>endobj -928 0 obj<>endobj -929 0 obj<>endobj -930 0 obj<>endobj -931 0 obj<>endobj -932 0 obj<>endobj -933 0 obj<>endobj -934 0 obj<>endobj -935 0 obj<>endobj -936 0 obj<>endobj -937 0 obj<>endobj -938 0 obj<>endobj -939 0 obj<>endobj -940 0 obj<>endobj -941 0 obj<>endobj -942 0 obj<>endobj -943 0 obj<>endobj -944 0 obj<>endobj -945 0 obj<>endobj -946 0 obj<>endobj -947 0 obj<>endobj -948 0 obj<>endobj -949 0 obj<>endobj -950 0 obj<>endobj -951 0 obj<>endobj -952 0 obj<>endobj -953 0 obj<>endobj -954 0 obj<>endobj -955 0 obj<>endobj -956 0 obj<>endobj -957 0 obj<>endobj -958 0 obj<>endobj -959 0 obj<>endobj -960 0 obj<>endobj -961 0 obj<>endobj -962 0 obj<>endobj -963 0 obj<>endobj -964 0 obj<>endobj -965 0 obj<>endobj -966 0 obj<>endobj -967 0 obj<>endobj -968 0 obj<>endobj -969 0 obj<>endobj -970 0 obj<>endobj -971 0 obj<>endobj -972 0 obj<>endobj -973 0 obj<>endobj -974 0 obj<>1<>4<>]>>>>endobj +886 0 obj<>>>/Annots 461 0 R>>endobj +887 0 obj<>stream +xÍœ_s[·Åßý)øVg¦•yyy/ɧŽ"Ç­g’ص”qòBS×[þQHªN¿}Ï àìBNÓ©e»™éè8?‚‹ÅXàò—'ÍhŒÿšÑl2jûÑjûäÛ«'Ï^,F“ñèêý¨égͨŸMGW×£ñÙxŒ]=½Z¾Û £ýûÑÅ~wv§ã7WÿxòÝÕ©jùëÍ_ä_Fýtÿߎ¦ÍÙB6£KùWÿp3zö¢5|2t>Œ>õâvyw#ý0ÂmGÝijc±C,Î’šÛÑlvÖÛ–Åb§þëþC’“b;š/Î:+ÅN~Ú'5 ¶£Åìlnձة—ILõ·£¦mÎfVËúõýaØü;!XFßûh¹\nßåf°j;šLÆg­m‡Vp ñ˜Ã~³®ScX +PWõ…Vp çûír½_h;˜@\åéÙ§ý_7SWk{qc|ÎnÜug}P7~öbªN‹Ô£òÜø-FPq»"†á›±8Nà*Jáñú0†_î×ÇõiHvc5XÓ™oVªàao†åõzw£¦ëÅt¿·#œ‰' Ädâð vÃNZr@XœMœaUߌ%âô ˆ†­ß.Wÿ¼9ìïw×bŒúÉ5‡5›3¾Ô4'ÌÁ]E¸Xf' 8Áó½!ÄòŠ`í$dÒˆ+ò×PnEy—' ‹0‡ˆÔ +Q i@軪±BEÅÚý]ö(Jðj½I•\aìB€…Àt­8:›D+T˜²ˆG6âžÎ»¾¬‘»ð@.vOÖ;炪Ç„±>º`E Y”4ˆc˜ -@‹ezæ&\ç}/I ƒ™h±×¿L=N +øM3­ô‘èõÇ!/cY$Î+‹GÓ„TÁ3ÈíH6o…lÆDõˆâÿ¤ÿŸK87­à v(“¬®\o$°§|ûü"8ì¤GËÅaŒ§Î‹§mØÌÄ©/<c-`§tlµTB\¹1A™žA~L˜nÜÈH`‚–{BqdÖAR8†*xDöeÖ€0 áœÛ*xÂa¸Û¬WKʤ~*îdHZÁ“x~'‚ &s8“ahÏ8nßÝ-ÇyIÉZZñ>CJ<éýz3¿Ä‡?N:Gݲ[èªNöi]3 ‹º-Œꇜ‰ì;¯?”‰L¤.ôdÀ*IÙÍD +k¤@T ñ„åZlå—§ý9œ„ \ ­š åŽ!é¼?”U"Éd>•…¶±HâZÊOÇáðì‡åêv½Ëkò¿•*XÔùj…LLÖ¬ÛŽZ,]R©aQ-´Œõîýþ°5[%V‚Ó,$b³…QáN²- o§2g¹mCÊÂ%ôâq L øþùùëÜI"]òTÑc=éLñ|}V𓇭ýo¯û±Ùê`1%ËÜ^´]xÈ£‚RÝxŠržêáÕ%×Ijøµìþ J‹=™ê»ýqæ´¿Ýæ§™ÇýGk¦ébŒè¦fŠj&¤+§‹…Î8´%Ó&@Ó`zÓ'%ëÔŒ—’=¿¾_I*@LôUe,up"ùÊøMÂYg&1ÊY§$,I#Ó«ÌS&h¹g\ÞßÝí§r¶ÀR™eÇpBJ<‰Ë™µD¹r9þ5Âá’‚ýg\låQÐ7<®§˜ÅC.8_x .Á~Êæà0šËþ5š\ Y8Gšñ× +q¹º¶yåK22ÄPÑrߎ%e¬H$}!)4ƒÿà o†M˜Ž·ë²$1PsÙVY”Vð°rŽÇ"™2'2¦Ù¬©B… Ä-©ÀÀª|j ëo^ää +«Àè‰&ÜŽTÁ3wž¥9†e2MÊc!Êõ„ëõ¯:w‡˜$ìÿ»±pŽ‹–#äè„ᷫܶìyI]þÂz-·lí߯oîy…%Þš¤u²x4 TÁ’ì–Tâ¼’ã´ œqNÝ·ù°>ݦ.b‰ø›Å”i!ÁL:;×G]Yç¨#ôy°+ +ÉûMÃu VžÕ:ÂløŠ +v›È +Ì0úž=ãÕݰ3aœt  ÿ‰ñÎ-I`B†9xCˆ ÁÁg•ê14Μø.aå Èœ“…nnÅ Íd·Ð ŠhP»Ó§ËaΊñИ ©Œ‰ +”ؾ=aT|v4ö”‡¾5.ÚH Řð@6E8¬Ö+}±h˜PÐŒ;±/b”©4ËŒ”âè’Ò4 Ãêß6…çGÒH—ˆ/[‚Vð_ç/8¿+ !! –§î %²Çl—»åͰŠ0Pd3ûÿÎU·Õÿ`;²Å2"¯râCéÈID±Ê™ÙŽL€f,ëECY3.‡f‹S¹`CJtC81œ„öá®$sYºY†VðŒ£ìëi>î?û6ªŸòÀjçâ>:°âõǼ +Us×*Ç! Rœ’Q×:‡|’Èp’³ÐrÛ‚ãݰZ/7e,,ÿ;KI`‹YžN‡õ»û “T:TnÖ™æ$¶!Ÿ‘çÒÈ:OæsKÐ +–Àv#¸ðõ8ãÒuüL®š¤ŽÔñXªT“~¹ŸšâùdË-÷Œï~]nïp7Qý…Ù“*xÎ÷Ï_¾Èè©-H/Ãê¢<ä;lÖùî )Å‘pCÇq´‚ç°J|H:Ò¶E+xFÞƒ±F|H¡– PO`/ó¢±µ¥í;?àça±#)¤6<ႪõvÉA•ä*\=‰`¯¦{1BË=äb¿•I,ŒÜÆ™ŽY¬ž×ø—¾WÓȤm%&êÍÚø –áìu‹“s;å=”¿N,gª`e…üu Áú&ÒhÛ4F‹}+~ÚÉÕ°|rrÔ© ¾z*|?m†–{Ê÷û›ý®kÒÉ “&SØcÞáÔPn\°£·[]kRÏy‹ë5û¹=¬§••·ùV©‚çüx•ŒË"°rnk­´Íh%ÁµÄg£¤ +žñÓ/ÿž›A2IÈ‘…h¹?ÒAë@Á—A,妤 +ž»¾ƒiÅùaÄÿ9ðôæ*¯¤ôËŠ$<äqCùíVîÀÓtx|ñù8)+Nô+ƒb±œ¿;žËUX‡[¿Ÿamü@ ùØ?9#a3Rfïð FBv»û[Å0í0ÃÊL1»Ý2!Z§b|ÝÙmãBrC-çþãC±Î7ܤÔÐuÜðígÍm¸ïÖ Åa®ã¢ò:½E(´BÄA”†4 ÁSc1©‚ç¼>ìÿµ¾bf»Çþ"~lÝunŸ`±)C;>P‡Ìýõh¸«¹`ZT°voe Ã4©WËà Ý-!•tЬ}M;[ap‚,‰Iæ+Ygôæâã$¬‘tȲ𻸀eÝ©A` 3šqõ +ÁW5ŠFŒ*·\ A™¾:]O/B`B¦Ê`¹âÈÍ[™t0Æ>Ù½ÒÅßÿ»ë\R ÓWpÚð@ÒÙäPèš¶Š†çŽrçmœƒzÈ~X¯ûãþ}>˜g™Xs"ÂTÁ¶äͰÝÓµ’‚´ÌÔA´‚… ô¬†k¼Í”»–”²R«£,çb¹Ù|ÆQç:K˜œ —õÝ<™S막nc,#Š&×Ð…Š+ƒPU!~\n³ÅHÃcáˆ8ÅmXà¹ÈYæz•,gM˜Ä¢jÎ3V·:¢¾ÐÄqÖ§+@áÅ.9ËÉôø@ÃiâïÏ…EGÕ¡7!Žë…§âÐãõæþæ&¼D©»9ž8œ™´K1©‚oÍù=®qíNr#Œß @\§<î\.Øä‰}úø»ë +lÐC>5Ï’ ûà ³h8ßlöÑ“Ä/q óÞh}|û/%3sièi5ÈpðùÀšƒ}ƒ#(áÏq„ +ñf8ÞoòG"ôÂ|‰ZîÛqîÁ¥W+¿à‚AmÚ`[·½ñ¡µ™W“T¦¤$—,Þ0Õ‡-‹'¼Üá¥M¼x‘=“´bX¹#eH€ãlSx€‘zì³°_ç–$¤%¤ÃË|„Ûˉϸkq“€<ÿKÖŸçÉ,ÙÖ#U§áQà<&`Ü»f|½[kg¸RžŒ›ð@>Šn«öÕÕÉvT‰wÉ댆!¦©oäÍêC8´ +B|è#½Éñ_B -ž™«[ò~wžãÙ%Üðv©*\Ê Ú°)Nˆ&\Û4 ±KŸŽ'JݱLŒ+"Iü5¸+\ ¾ÉQÓÉc1Jö˜W÷!o†7u¿à;Ú®Spq7Ÿ47á:¾j–rW¢f!› +΄Ԋñýz»>Å»laŠ~´·Ž¬3þ¾§Y:œëjI”é&>½<.eâO_È|xA»˜ðçÌêMÔp¾ —€õ  /aaá§¢>,­Õ#Tz¿´õ1zpk +µéÃ#Í<ÿXEV@Ž‚£Z’+Ðëiu‘£™8 +ayz9_Œ)BúÕb±Üáí;úµWÒ^¼6ˆõëã'ù É$ˆF¤VŒý‡Ýf¿Ì÷TI +Ò¸ü@öÐbO‘ߨ£d*é$ȆÆ@"ÖCF4㑃WqîÌ͈LOà€F"…²\`‚{BFǸ—¼ÆïG4®âB&L+8ü~ûgLá·ÿÔà5ì-Ð!ràûôòü‡oÏG¸úñÙS>߯îårv>Ì‘wUûÑŸfá¶åÓõz­‡ê{òpì³Dendstream +endobj +888 0 obj +5057 +endobj +889 0 obj<>>>/Annots 468 0 R>>endobj +890 0 obj<>stream +xÅ–MsÓ0†ïþ{,}Xþ8¦@LxÊ9±Ý’Nƒã~>»¶ì¬e†Ói“™Ä²´¤}wWú(øUk0äUp‹u +ZBvʦBA‡ …”ø6¿Ê¶»§ê{XÕ‡¶<´Ç7Ùcð> h@7 +=}ý@o +Sü­ T"u'ØÐ<Þøæk JÑÌhgq26ëêûöG[6à&c¸ +l"Â)»ïöʈÁœYT ¤¥mv ukëû=û·ß²ÛÀah—„à1–y^#„™!$…ö æ!6Ûj· ̦BÙba=B?ÀcëS“—„›!Ä(M!n€Éëâ‚`FˆgŠ8ª‡8ïÇp$ÄÒ×Ô ð«» …„VÂ`ÔdÅ•x¶O"]°™ˆÄ5V$ȑĿ¾á‚e±]ØbE88™D.†Y£àª ¼ìX®ßgÜÚ¦.Ny»¯´(«1Ržy»ÿí7ÏOZcø ~ênoäm°“ç5zG{Þq€$¤ŠÁ½sf !’™ ¹7!©8Áõû‹ð²’ÙQjKªœ2€}L[ëàF”Ø–2j‚pTq¤äuó@*‡sàåUöô”)®õì*\×`z*JÓ™ž,Þ/Vè©IRΈ°=cxr0+µ;“8ÃagV\¸2°¼c`L=vÆÀØúUîH ãÚ_^Œ>+§’Ø4Âôw’ô‹$6±s& K2’d@ô¾›0P’9ão’ŒŒÎwÆ€õ—2“ddƒ’Lë3òswã ÂñjzŒµr†î:61ø‹‡—Nê›æÉÍ¡(S\iûú»·óï‡DÑ‚/÷¶î©»·%îT¡Æb©°ÒãI¼Y~º^Âç¦~,óÞÕù©Âëâv8ÃŒÒð6¦›fqµ?/‘_‚? [4Rendstream +endobj +891 0 obj +699 +endobj +892 0 obj<>endobj +893 0 obj<>endobj +894 0 obj<>endobj +895 0 obj<>endobj +896 0 obj<>endobj +897 0 obj<>endobj +898 0 obj<>endobj +899 0 obj<>endobj +900 0 obj<>endobj +901 0 obj<>endobj +902 0 obj<>endobj +903 0 obj<>endobj +904 0 obj<>endobj +905 0 obj<>endobj +906 0 obj<>endobj +907 0 obj<>endobj +908 0 obj<>endobj +909 0 obj<>endobj +910 0 obj<>endobj +911 0 obj<>endobj +912 0 obj<>endobj +913 0 obj<>endobj +914 0 obj<>endobj +915 0 obj<>endobj +916 0 obj<>endobj +917 0 obj<>endobj +918 0 obj<>endobj +919 0 obj<>endobj +920 0 obj<>endobj +921 0 obj<>endobj +922 0 obj<>endobj +923 0 obj<>endobj +924 0 obj<>endobj +925 0 obj<>endobj +926 0 obj<>endobj +927 0 obj<>endobj +928 0 obj<>endobj +929 0 obj<>endobj +930 0 obj<>endobj +931 0 obj<>endobj +932 0 obj<>endobj +933 0 obj<>endobj +934 0 obj<>endobj +935 0 obj<>endobj +936 0 obj<>endobj +937 0 obj<>endobj +938 0 obj<>endobj +939 0 obj<>endobj +940 0 obj<>endobj +941 0 obj<>endobj +942 0 obj<>endobj +943 0 obj<>endobj +944 0 obj<>endobj +945 0 obj<>endobj +946 0 obj<>endobj +947 0 obj<>endobj +948 0 obj<>endobj +949 0 obj<>endobj +950 0 obj<>endobj +951 0 obj<>endobj +952 0 obj<>endobj +953 0 obj<>endobj +954 0 obj<>endobj +955 0 obj<>endobj +956 0 obj<>endobj +957 0 obj<>endobj +958 0 obj<>endobj +959 0 obj<>endobj +960 0 obj<>endobj +961 0 obj<>endobj +962 0 obj<>endobj +963 0 obj<>endobj +964 0 obj<>endobj +965 0 obj<>endobj +966 0 obj<>endobj +967 0 obj<>endobj +968 0 obj<>endobj +969 0 obj<>endobj +970 0 obj<>endobj +971 0 obj<>endobj +972 0 obj<>endobj +973 0 obj<>endobj +974 0 obj<>endobj +975 0 obj<>endobj +976 0 obj<>endobj +977 0 obj<>endobj +978 0 obj<>endobj +979 0 obj<>endobj +980 0 obj<>endobj +981 0 obj<>endobj +982 0 obj<>endobj +983 0 obj<>endobj +984 0 obj<>endobj +985 0 obj<>endobj +986 0 obj<>endobj +987 0 obj<>endobj +988 0 obj<>endobj +989 0 obj<>endobj +990 0 obj<>endobj +991 0 obj<>endobj +992 0 obj<>endobj +993 0 obj<>endobj +994 0 obj<>endobj +995 0 obj<>endobj +996 0 obj<>endobj +997 0 obj<>endobj +998 0 obj<>endobj +999 0 obj<>endobj +1000 0 obj<>endobj +1001 0 obj<>endobj +1002 0 obj<>endobj +1003 0 obj<>endobj +1004 0 obj<>endobj +1005 0 obj<>endobj +1006 0 obj<>endobj +1007 0 obj<>endobj +1008 0 obj<>endobj +1009 0 obj<>endobj +1010 0 obj<>endobj +1011 0 obj<>endobj +1012 0 obj<>endobj +1013 0 obj<>endobj +1014 0 obj<>endobj +1015 0 obj<>endobj +1016 0 obj<>endobj +1017 0 obj<>endobj +1018 0 obj<>endobj +1019 0 obj<>endobj +1020 0 obj<>endobj +1021 0 obj<>endobj +1022 0 obj<>endobj +1023 0 obj<>endobj +1024 0 obj<>endobj +1025 0 obj<>endobj +1026 0 obj<>endobj +1027 0 obj<>endobj +1028 0 obj<>endobj +1029 0 obj<>endobj +1030 0 obj<>endobj +1031 0 obj<>endobj +1032 0 obj<>endobj +1033 0 obj<>endobj +1034 0 obj<>1<>5<>]>>>>endobj xref -0 975 +0 1035 0000000000 65535 f 0000000015 00000 n 0000000244 00000 n @@ -2421,752 +2542,812 @@ xref 0000016830 00000 n 0000016917 00000 n 0000016951 00000 n -0000017007 00000 n -0000017094 00000 n -0000017163 00000 n -0000017250 00000 n -0000017301 00000 n -0000017388 00000 n -0000017475 00000 n -0000017561 00000 n -0000017610 00000 n -0000017697 00000 n -0000017755 00000 n -0000017807 00000 n -0000017894 00000 n -0000017949 00000 n -0000018036 00000 n -0000018083 00000 n -0000018170 00000 n -0000018217 00000 n -0000018304 00000 n -0000018354 00000 n -0000018394 00000 n -0000018481 00000 n -0000018524 00000 n -0000018611 00000 n -0000018655 00000 n -0000018742 00000 n -0000018785 00000 n -0000018872 00000 n -0000018915 00000 n -0000019002 00000 n -0000019043 00000 n -0000019130 00000 n -0000019177 00000 n -0000019264 00000 n -0000019338 00000 n -0000019390 00000 n -0000019476 00000 n -0000019502 00000 n -0000019556 00000 n -0000019643 00000 n -0000019669 00000 n -0000019731 00000 n -0000019818 00000 n -0000019844 00000 n -0000019893 00000 n -0000019980 00000 n -0000020006 00000 n -0000020053 00000 n -0000020140 00000 n -0000020189 00000 n -0000020276 00000 n -0000020319 00000 n -0000020406 00000 n -0000020449 00000 n -0000020535 00000 n -0000020584 00000 n -0000020669 00000 n -0000020718 00000 n -0000020803 00000 n -0000020869 00000 n -0000020917 00000 n -0000021004 00000 n -0000021050 00000 n -0000021137 00000 n -0000021171 00000 n -0000021250 00000 n -0000021337 00000 n -0000021419 00000 n -0000021505 00000 n -0000021580 00000 n -0000021667 00000 n -0000021740 00000 n -0000021827 00000 n -0000021877 00000 n -0000021955 00000 n -0000022042 00000 n -0000022068 00000 n -0000022131 00000 n -0000022218 00000 n -0000022281 00000 n -0000022368 00000 n -0000022422 00000 n -0000022509 00000 n -0000022551 00000 n -0000022592 00000 n -0000022679 00000 n -0000022705 00000 n -0000022810 00000 n -0000022916 00000 n -0000023022 00000 n -0000023128 00000 n -0000023234 00000 n -0000023340 00000 n -0000023446 00000 n -0000023552 00000 n -0000023658 00000 n -0000023764 00000 n -0000023870 00000 n -0000023976 00000 n -0000024082 00000 n -0000024188 00000 n -0000024294 00000 n -0000024400 00000 n -0000024506 00000 n -0000024612 00000 n -0000024718 00000 n -0000024824 00000 n -0000024929 00000 n -0000025035 00000 n -0000025141 00000 n -0000025247 00000 n -0000025353 00000 n -0000025459 00000 n -0000025565 00000 n -0000025671 00000 n -0000025777 00000 n -0000025883 00000 n -0000025989 00000 n -0000026095 00000 n -0000026201 00000 n -0000026307 00000 n -0000026413 00000 n -0000026519 00000 n -0000026625 00000 n -0000026731 00000 n -0000026837 00000 n -0000026942 00000 n -0000027048 00000 n -0000027154 00000 n -0000027260 00000 n -0000027363 00000 n -0000027467 00000 n -0000027845 00000 n -0000027951 00000 n -0000028056 00000 n -0000028162 00000 n -0000028268 00000 n -0000028374 00000 n -0000028480 00000 n -0000028586 00000 n -0000028692 00000 n -0000028798 00000 n -0000028904 00000 n -0000029010 00000 n -0000029115 00000 n -0000029221 00000 n -0000029327 00000 n -0000029433 00000 n -0000029539 00000 n -0000029645 00000 n -0000029751 00000 n -0000029857 00000 n -0000029963 00000 n -0000030069 00000 n -0000030175 00000 n -0000030281 00000 n -0000030387 00000 n -0000030493 00000 n -0000030598 00000 n -0000030704 00000 n -0000030810 00000 n -0000030916 00000 n -0000031021 00000 n -0000031127 00000 n -0000031233 00000 n -0000031339 00000 n -0000031445 00000 n -0000031551 00000 n -0000031657 00000 n -0000031763 00000 n -0000031869 00000 n -0000031975 00000 n -0000032081 00000 n -0000032187 00000 n -0000032292 00000 n -0000032396 00000 n -0000032500 00000 n -0000032870 00000 n -0000032975 00000 n -0000033081 00000 n -0000033187 00000 n -0000033293 00000 n -0000033399 00000 n -0000033505 00000 n -0000033611 00000 n -0000033717 00000 n -0000033823 00000 n -0000033929 00000 n -0000034034 00000 n -0000034140 00000 n -0000034246 00000 n -0000034352 00000 n -0000034458 00000 n -0000034564 00000 n -0000034670 00000 n -0000034776 00000 n -0000034882 00000 n -0000034988 00000 n -0000035094 00000 n -0000035200 00000 n -0000035306 00000 n -0000035412 00000 n -0000035518 00000 n -0000035624 00000 n -0000035730 00000 n -0000035835 00000 n -0000035941 00000 n -0000036047 00000 n -0000036153 00000 n -0000036259 00000 n -0000036365 00000 n -0000036470 00000 n -0000036576 00000 n -0000036682 00000 n -0000036788 00000 n -0000036894 00000 n -0000036998 00000 n -0000037328 00000 n -0000037362 00000 n -0000037396 00000 n -0000039815 00000 n -0000039864 00000 n -0000039913 00000 n -0000039962 00000 n -0000040011 00000 n -0000040060 00000 n -0000040109 00000 n -0000040158 00000 n -0000040207 00000 n -0000040256 00000 n -0000040305 00000 n -0000040354 00000 n -0000040403 00000 n -0000040452 00000 n -0000040501 00000 n -0000040550 00000 n -0000040599 00000 n -0000040648 00000 n -0000040697 00000 n -0000040746 00000 n -0000040795 00000 n -0000040844 00000 n -0000040893 00000 n -0000040942 00000 n -0000040991 00000 n -0000041040 00000 n -0000041089 00000 n -0000041138 00000 n -0000041187 00000 n -0000041236 00000 n -0000041285 00000 n -0000041334 00000 n -0000041383 00000 n -0000041432 00000 n -0000041481 00000 n -0000041530 00000 n -0000041579 00000 n -0000041628 00000 n -0000041677 00000 n -0000041726 00000 n -0000041775 00000 n -0000041824 00000 n -0000041873 00000 n -0000041922 00000 n -0000041971 00000 n -0000042020 00000 n -0000042069 00000 n -0000042118 00000 n -0000042167 00000 n -0000042216 00000 n -0000042265 00000 n -0000042314 00000 n -0000042363 00000 n -0000042412 00000 n -0000042461 00000 n -0000042510 00000 n -0000042559 00000 n -0000042608 00000 n -0000042657 00000 n -0000042706 00000 n -0000042755 00000 n -0000042804 00000 n -0000042853 00000 n -0000042902 00000 n -0000042951 00000 n -0000043000 00000 n -0000043049 00000 n -0000043098 00000 n -0000043147 00000 n -0000043196 00000 n -0000043245 00000 n -0000043294 00000 n -0000043343 00000 n -0000043392 00000 n -0000043441 00000 n -0000043490 00000 n -0000043539 00000 n -0000043588 00000 n -0000043637 00000 n -0000043686 00000 n -0000043735 00000 n -0000043784 00000 n -0000043833 00000 n -0000043882 00000 n -0000043931 00000 n -0000043980 00000 n -0000044029 00000 n -0000044078 00000 n -0000044127 00000 n -0000044176 00000 n -0000044225 00000 n -0000044274 00000 n -0000044323 00000 n -0000044372 00000 n -0000044421 00000 n -0000044470 00000 n -0000044519 00000 n -0000044568 00000 n -0000044617 00000 n -0000044666 00000 n -0000044715 00000 n -0000044764 00000 n -0000044813 00000 n -0000044862 00000 n -0000044911 00000 n -0000044960 00000 n -0000045009 00000 n -0000045058 00000 n -0000045107 00000 n -0000045156 00000 n -0000045205 00000 n -0000045254 00000 n -0000045303 00000 n -0000045352 00000 n -0000045401 00000 n -0000045450 00000 n -0000045499 00000 n -0000045548 00000 n -0000045597 00000 n -0000045646 00000 n -0000045695 00000 n -0000045744 00000 n -0000045793 00000 n -0000045842 00000 n -0000045891 00000 n -0000045940 00000 n -0000045989 00000 n -0000046038 00000 n -0000046087 00000 n -0000046136 00000 n -0000046185 00000 n -0000046234 00000 n -0000046283 00000 n -0000046332 00000 n -0000046381 00000 n -0000046430 00000 n -0000046479 00000 n -0000046528 00000 n -0000046577 00000 n -0000046626 00000 n -0000046675 00000 n -0000046724 00000 n -0000046773 00000 n -0000046822 00000 n -0000046871 00000 n -0000046920 00000 n -0000046969 00000 n -0000047018 00000 n -0000047067 00000 n -0000047116 00000 n -0000047833 00000 n -0000047989 00000 n -0000048561 00000 n -0000048582 00000 n -0000048756 00000 n -0000049918 00000 n -0000049940 00000 n -0000050091 00000 n -0000051612 00000 n -0000051634 00000 n -0000051794 00000 n -0000053230 00000 n -0000053252 00000 n -0000053430 00000 n -0000054690 00000 n -0000054712 00000 n -0000054854 00000 n -0000056438 00000 n -0000056460 00000 n -0000056593 00000 n -0000058428 00000 n -0000058450 00000 n -0000058583 00000 n -0000059106 00000 n -0000059127 00000 n -0000059288 00000 n -0000060572 00000 n -0000060594 00000 n -0000060755 00000 n -0000062510 00000 n -0000062532 00000 n -0000062692 00000 n -0000064337 00000 n -0000064359 00000 n -0000064501 00000 n -0000066571 00000 n -0000066593 00000 n -0000066735 00000 n -0000068547 00000 n -0000068569 00000 n -0000068711 00000 n -0000070436 00000 n -0000070458 00000 n -0000070609 00000 n -0000072373 00000 n -0000072395 00000 n -0000072570 00000 n -0000074677 00000 n -0000074699 00000 n -0000074859 00000 n -0000076455 00000 n -0000076477 00000 n -0000076652 00000 n -0000078147 00000 n -0000078169 00000 n -0000078321 00000 n -0000079128 00000 n -0000079149 00000 n -0000079300 00000 n -0000080938 00000 n -0000080960 00000 n -0000081125 00000 n -0000082897 00000 n -0000082919 00000 n -0000083084 00000 n -0000083977 00000 n -0000083998 00000 n -0000084172 00000 n -0000085777 00000 n -0000085799 00000 n -0000085942 00000 n -0000086700 00000 n -0000086721 00000 n -0000086904 00000 n -0000088772 00000 n -0000088794 00000 n -0000088963 00000 n -0000090817 00000 n -0000090839 00000 n -0000090999 00000 n -0000092683 00000 n -0000092705 00000 n -0000092878 00000 n -0000094607 00000 n -0000094629 00000 n -0000094780 00000 n -0000095704 00000 n -0000095725 00000 n -0000095909 00000 n -0000097734 00000 n -0000097756 00000 n -0000097930 00000 n -0000100103 00000 n -0000100125 00000 n -0000100318 00000 n -0000102192 00000 n -0000102214 00000 n -0000102398 00000 n -0000104308 00000 n -0000104330 00000 n -0000104506 00000 n -0000106307 00000 n -0000106329 00000 n -0000106499 00000 n -0000108097 00000 n -0000108119 00000 n -0000108304 00000 n -0000109780 00000 n -0000109802 00000 n -0000109995 00000 n -0000111566 00000 n -0000111588 00000 n -0000111763 00000 n -0000113543 00000 n -0000113565 00000 n -0000113721 00000 n -0000115282 00000 n -0000115304 00000 n -0000115489 00000 n -0000117341 00000 n -0000117363 00000 n -0000117529 00000 n -0000119176 00000 n -0000119198 00000 n -0000119383 00000 n -0000121332 00000 n -0000121354 00000 n -0000121538 00000 n -0000123265 00000 n -0000123287 00000 n -0000123457 00000 n -0000125062 00000 n -0000125084 00000 n -0000125253 00000 n -0000127126 00000 n -0000127148 00000 n -0000127333 00000 n -0000129197 00000 n -0000129219 00000 n -0000129395 00000 n -0000131485 00000 n -0000131507 00000 n -0000131682 00000 n -0000133622 00000 n -0000133644 00000 n -0000133820 00000 n -0000136136 00000 n -0000136158 00000 n -0000136310 00000 n -0000138290 00000 n -0000138312 00000 n -0000138472 00000 n -0000140339 00000 n -0000140361 00000 n -0000140512 00000 n -0000142264 00000 n -0000142286 00000 n -0000142418 00000 n -0000144292 00000 n -0000144314 00000 n -0000144456 00000 n -0000146527 00000 n -0000146549 00000 n -0000146700 00000 n -0000148494 00000 n -0000148516 00000 n -0000148648 00000 n -0000150441 00000 n -0000150463 00000 n -0000150586 00000 n -0000151040 00000 n -0000151061 00000 n -0000151246 00000 n -0000153297 00000 n -0000153319 00000 n -0000153486 00000 n -0000155592 00000 n -0000155614 00000 n -0000155799 00000 n -0000157347 00000 n -0000157369 00000 n -0000157539 00000 n -0000159001 00000 n -0000159023 00000 n -0000159198 00000 n -0000160607 00000 n -0000160629 00000 n -0000160777 00000 n -0000161160 00000 n -0000161181 00000 n -0000161333 00000 n -0000163076 00000 n -0000163098 00000 n -0000163240 00000 n -0000165002 00000 n -0000165024 00000 n -0000165175 00000 n -0000167066 00000 n -0000167088 00000 n -0000167245 00000 n -0000169096 00000 n -0000169118 00000 n -0000169312 00000 n -0000171373 00000 n -0000171395 00000 n -0000171570 00000 n -0000173162 00000 n -0000173184 00000 n -0000173368 00000 n -0000174718 00000 n -0000174740 00000 n -0000174900 00000 n -0000176143 00000 n -0000176165 00000 n -0000176316 00000 n -0000177771 00000 n -0000177793 00000 n -0000177954 00000 n -0000179602 00000 n -0000179624 00000 n -0000179757 00000 n -0000180227 00000 n -0000180248 00000 n -0000180415 00000 n -0000182081 00000 n -0000182103 00000 n -0000182260 00000 n -0000183448 00000 n -0000183470 00000 n -0000183627 00000 n -0000185180 00000 n -0000185202 00000 n -0000185386 00000 n -0000186191 00000 n -0000186212 00000 n -0000186369 00000 n -0000191792 00000 n -0000191814 00000 n -0000191971 00000 n -0000197265 00000 n -0000197287 00000 n -0000197444 00000 n -0000201635 00000 n -0000201657 00000 n -0000201713 00000 n -0000201818 00000 n -0000201996 00000 n -0000202115 00000 n -0000202250 00000 n -0000202386 00000 n -0000202534 00000 n -0000202684 00000 n -0000202824 00000 n -0000202965 00000 n -0000203118 00000 n -0000203280 00000 n -0000203429 00000 n -0000203617 00000 n -0000203750 00000 n -0000203878 00000 n -0000203996 00000 n -0000204132 00000 n -0000204274 00000 n -0000204390 00000 n -0000204516 00000 n -0000204632 00000 n -0000204823 00000 n -0000204922 00000 n -0000205070 00000 n -0000205188 00000 n -0000205312 00000 n -0000205434 00000 n -0000205560 00000 n -0000205718 00000 n -0000205848 00000 n -0000205972 00000 n -0000206090 00000 n -0000206208 00000 n -0000206327 00000 n -0000206517 00000 n -0000206703 00000 n -0000206856 00000 n -0000207019 00000 n -0000207170 00000 n -0000207274 00000 n -0000207491 00000 n -0000207597 00000 n -0000207729 00000 n -0000207851 00000 n -0000208056 00000 n -0000208161 00000 n -0000208261 00000 n -0000208465 00000 n -0000208626 00000 n -0000208774 00000 n -0000208902 00000 n -0000209045 00000 n -0000209169 00000 n -0000209298 00000 n -0000209443 00000 n -0000209608 00000 n -0000209760 00000 n -0000209940 00000 n -0000210045 00000 n -0000210164 00000 n -0000210289 00000 n -0000210434 00000 n -0000210576 00000 n -0000210726 00000 n -0000210857 00000 n -0000210983 00000 n -0000211108 00000 n -0000211248 00000 n -0000211375 00000 n -0000211506 00000 n -0000211637 00000 n -0000211815 00000 n -0000211943 00000 n -0000212079 00000 n -0000212214 00000 n -0000212420 00000 n -0000212533 00000 n -0000212649 00000 n -0000212794 00000 n -0000212965 00000 n -0000213114 00000 n -0000213269 00000 n -0000213409 00000 n -0000213541 00000 n -0000213675 00000 n -0000213807 00000 n -0000213945 00000 n -0000214095 00000 n -0000214263 00000 n -0000214410 00000 n -0000214627 00000 n -0000214727 00000 n -0000214845 00000 n -0000214973 00000 n -0000215131 00000 n -0000215261 00000 n -0000215392 00000 n -0000215498 00000 n -0000215643 00000 n -0000215744 00000 n -0000215950 00000 n -0000216052 00000 n -0000216171 00000 n -0000216299 00000 n -0000216419 00000 n -0000216543 00000 n -0000216684 00000 n -0000216812 00000 n -0000216953 00000 n -0000217090 00000 n -0000217213 00000 n -0000217350 00000 n -0000217471 00000 n -0000217592 00000 n -0000217719 00000 n -0000217837 00000 n -0000217941 00000 n -0000218106 00000 n -0000218204 00000 n -0000218389 00000 n -0000218579 00000 n -0000218762 00000 n -0000218921 00000 n -0000219108 00000 n -0000219214 00000 n -0000219344 00000 n -0000219470 00000 n -0000219580 00000 n -0000219673 00000 n +0000017003 00000 n +0000017090 00000 n +0000017116 00000 n +0000017172 00000 n +0000017259 00000 n +0000017328 00000 n +0000017415 00000 n +0000017466 00000 n +0000017553 00000 n +0000017640 00000 n +0000017727 00000 n +0000017783 00000 n +0000017870 00000 n +0000017919 00000 n +0000018006 00000 n +0000018072 00000 n +0000018124 00000 n +0000018211 00000 n +0000018266 00000 n +0000018353 00000 n +0000018400 00000 n +0000018487 00000 n +0000018534 00000 n +0000018621 00000 n +0000018671 00000 n +0000018711 00000 n +0000018798 00000 n +0000018841 00000 n +0000018928 00000 n +0000018972 00000 n +0000019059 00000 n +0000019102 00000 n +0000019189 00000 n +0000019232 00000 n +0000019319 00000 n +0000019360 00000 n +0000019447 00000 n +0000019494 00000 n +0000019581 00000 n +0000019655 00000 n +0000019702 00000 n +0000019788 00000 n +0000019814 00000 n +0000019866 00000 n +0000019952 00000 n +0000019978 00000 n +0000020032 00000 n +0000020119 00000 n +0000020145 00000 n +0000020207 00000 n +0000020294 00000 n +0000020320 00000 n +0000020369 00000 n +0000020456 00000 n +0000020482 00000 n +0000020529 00000 n +0000020616 00000 n +0000020665 00000 n +0000020752 00000 n +0000020795 00000 n +0000020882 00000 n +0000020925 00000 n +0000021011 00000 n +0000021060 00000 n +0000021145 00000 n +0000021194 00000 n +0000021279 00000 n +0000021345 00000 n +0000021393 00000 n +0000021480 00000 n +0000021526 00000 n +0000021613 00000 n +0000021647 00000 n +0000021726 00000 n +0000021813 00000 n +0000021895 00000 n +0000021981 00000 n +0000022056 00000 n +0000022143 00000 n +0000022216 00000 n +0000022303 00000 n +0000022353 00000 n +0000022431 00000 n +0000022518 00000 n +0000022544 00000 n +0000022607 00000 n +0000022694 00000 n +0000022757 00000 n +0000022844 00000 n +0000022898 00000 n +0000022985 00000 n +0000023027 00000 n +0000023068 00000 n +0000023155 00000 n +0000023181 00000 n +0000023286 00000 n +0000023392 00000 n +0000023498 00000 n +0000023604 00000 n +0000023710 00000 n +0000023816 00000 n +0000023922 00000 n +0000024028 00000 n +0000024134 00000 n +0000024240 00000 n +0000024346 00000 n +0000024452 00000 n +0000024558 00000 n +0000024664 00000 n +0000024770 00000 n +0000024876 00000 n +0000024982 00000 n +0000025088 00000 n +0000025194 00000 n +0000025300 00000 n +0000025405 00000 n +0000025511 00000 n +0000025617 00000 n +0000025723 00000 n +0000025829 00000 n +0000025935 00000 n +0000026041 00000 n +0000026147 00000 n +0000026253 00000 n +0000026359 00000 n +0000026465 00000 n +0000026571 00000 n +0000026677 00000 n +0000026783 00000 n +0000026889 00000 n +0000026995 00000 n +0000027101 00000 n +0000027207 00000 n +0000027313 00000 n +0000027418 00000 n +0000027524 00000 n +0000027630 00000 n +0000027736 00000 n +0000027839 00000 n +0000027943 00000 n +0000028321 00000 n +0000028427 00000 n +0000028532 00000 n +0000028638 00000 n +0000028744 00000 n +0000028850 00000 n +0000028956 00000 n +0000029062 00000 n +0000029168 00000 n +0000029274 00000 n +0000029380 00000 n +0000029486 00000 n +0000029591 00000 n +0000029697 00000 n +0000029803 00000 n +0000029909 00000 n +0000030015 00000 n +0000030121 00000 n +0000030227 00000 n +0000030333 00000 n +0000030439 00000 n +0000030545 00000 n +0000030651 00000 n +0000030757 00000 n +0000030863 00000 n +0000030969 00000 n +0000031074 00000 n +0000031180 00000 n +0000031286 00000 n +0000031392 00000 n +0000031497 00000 n +0000031603 00000 n +0000031709 00000 n +0000031815 00000 n +0000031921 00000 n +0000032027 00000 n +0000032133 00000 n +0000032239 00000 n +0000032345 00000 n +0000032451 00000 n +0000032557 00000 n +0000032663 00000 n +0000032768 00000 n +0000032872 00000 n +0000032976 00000 n +0000033346 00000 n +0000033451 00000 n +0000033557 00000 n +0000033663 00000 n +0000033769 00000 n +0000033875 00000 n +0000033981 00000 n +0000034087 00000 n +0000034193 00000 n +0000034299 00000 n +0000034404 00000 n +0000034510 00000 n +0000034616 00000 n +0000034722 00000 n +0000034828 00000 n +0000034934 00000 n +0000035040 00000 n +0000035146 00000 n +0000035252 00000 n +0000035358 00000 n +0000035464 00000 n +0000035570 00000 n +0000035676 00000 n +0000035781 00000 n +0000035887 00000 n +0000035993 00000 n +0000036099 00000 n +0000036205 00000 n +0000036311 00000 n +0000036417 00000 n +0000036523 00000 n +0000036629 00000 n +0000036735 00000 n +0000036841 00000 n +0000036947 00000 n +0000037053 00000 n +0000037159 00000 n +0000037265 00000 n +0000037371 00000 n +0000037477 00000 n +0000037582 00000 n +0000037688 00000 n +0000037794 00000 n +0000037899 00000 n +0000038003 00000 n +0000038107 00000 n +0000038485 00000 n +0000038590 00000 n +0000038696 00000 n +0000038802 00000 n +0000038908 00000 n +0000039014 00000 n +0000039118 00000 n +0000039184 00000 n +0000039218 00000 n +0000039252 00000 n +0000041865 00000 n +0000041914 00000 n +0000041963 00000 n +0000042012 00000 n +0000042061 00000 n +0000042110 00000 n +0000042159 00000 n +0000042208 00000 n +0000042257 00000 n +0000042306 00000 n +0000042355 00000 n +0000042404 00000 n +0000042453 00000 n +0000042502 00000 n +0000042551 00000 n +0000042600 00000 n +0000042649 00000 n +0000042698 00000 n +0000042747 00000 n +0000042796 00000 n +0000042845 00000 n +0000042894 00000 n +0000042943 00000 n +0000042992 00000 n +0000043041 00000 n +0000043090 00000 n +0000043139 00000 n +0000043188 00000 n +0000043237 00000 n +0000043286 00000 n +0000043335 00000 n +0000043384 00000 n +0000043433 00000 n +0000043482 00000 n +0000043531 00000 n +0000043580 00000 n +0000043629 00000 n +0000043678 00000 n +0000043727 00000 n +0000043776 00000 n +0000043825 00000 n +0000043874 00000 n +0000043923 00000 n +0000043972 00000 n +0000044021 00000 n +0000044070 00000 n +0000044119 00000 n +0000044168 00000 n +0000044217 00000 n +0000044266 00000 n +0000044315 00000 n +0000044364 00000 n +0000044413 00000 n +0000044462 00000 n +0000044511 00000 n +0000044560 00000 n +0000044609 00000 n +0000044658 00000 n +0000044707 00000 n +0000044756 00000 n +0000044805 00000 n +0000044854 00000 n +0000044903 00000 n +0000044952 00000 n +0000045001 00000 n +0000045050 00000 n +0000045099 00000 n +0000045148 00000 n +0000045197 00000 n +0000045246 00000 n +0000045295 00000 n +0000045344 00000 n +0000045393 00000 n +0000045442 00000 n +0000045491 00000 n +0000045540 00000 n +0000045589 00000 n +0000045638 00000 n +0000045687 00000 n +0000045736 00000 n +0000045785 00000 n +0000045834 00000 n +0000045883 00000 n +0000045932 00000 n +0000045981 00000 n +0000046030 00000 n +0000046079 00000 n +0000046128 00000 n +0000046177 00000 n +0000046226 00000 n +0000046275 00000 n +0000046324 00000 n +0000046373 00000 n +0000046422 00000 n +0000046471 00000 n +0000046520 00000 n +0000046569 00000 n +0000046618 00000 n +0000046667 00000 n +0000046716 00000 n +0000046765 00000 n +0000046814 00000 n +0000046863 00000 n +0000046912 00000 n +0000046961 00000 n +0000047010 00000 n +0000047059 00000 n +0000047108 00000 n +0000047157 00000 n +0000047206 00000 n +0000047255 00000 n +0000047304 00000 n +0000047353 00000 n +0000047402 00000 n +0000047451 00000 n +0000047500 00000 n +0000047549 00000 n +0000047598 00000 n +0000047647 00000 n +0000047696 00000 n +0000047745 00000 n +0000047794 00000 n +0000047843 00000 n +0000047892 00000 n +0000047941 00000 n +0000047990 00000 n +0000048039 00000 n +0000048088 00000 n +0000048137 00000 n +0000048186 00000 n +0000048235 00000 n +0000048284 00000 n +0000048333 00000 n +0000048382 00000 n +0000048431 00000 n +0000048480 00000 n +0000048529 00000 n +0000048578 00000 n +0000048627 00000 n +0000048676 00000 n +0000048725 00000 n +0000048774 00000 n +0000048823 00000 n +0000048872 00000 n +0000048921 00000 n +0000048970 00000 n +0000049019 00000 n +0000049068 00000 n +0000049117 00000 n +0000049166 00000 n +0000049215 00000 n +0000049264 00000 n +0000049313 00000 n +0000049362 00000 n +0000049411 00000 n +0000049460 00000 n +0000049509 00000 n +0000049558 00000 n +0000049607 00000 n +0000049656 00000 n +0000049705 00000 n +0000049754 00000 n +0000050511 00000 n +0000050667 00000 n +0000051239 00000 n +0000051260 00000 n +0000051434 00000 n +0000052596 00000 n +0000052618 00000 n +0000052769 00000 n +0000054275 00000 n +0000054297 00000 n +0000054457 00000 n +0000055893 00000 n +0000055915 00000 n +0000056093 00000 n +0000057353 00000 n +0000057375 00000 n +0000057517 00000 n +0000059101 00000 n +0000059123 00000 n +0000059256 00000 n +0000061091 00000 n +0000061113 00000 n +0000061246 00000 n +0000061769 00000 n +0000061790 00000 n +0000061951 00000 n +0000063235 00000 n +0000063257 00000 n +0000063418 00000 n +0000065173 00000 n +0000065195 00000 n +0000065355 00000 n +0000067000 00000 n +0000067022 00000 n +0000067164 00000 n +0000069234 00000 n +0000069256 00000 n +0000069398 00000 n +0000071210 00000 n +0000071232 00000 n +0000071374 00000 n +0000073099 00000 n +0000073121 00000 n +0000073272 00000 n +0000075036 00000 n +0000075058 00000 n +0000075233 00000 n +0000077340 00000 n +0000077362 00000 n +0000077522 00000 n +0000079118 00000 n +0000079140 00000 n +0000079315 00000 n +0000080810 00000 n +0000080832 00000 n +0000080984 00000 n +0000081791 00000 n +0000081812 00000 n +0000081963 00000 n +0000083601 00000 n +0000083623 00000 n +0000083788 00000 n +0000085560 00000 n +0000085582 00000 n +0000085747 00000 n +0000086640 00000 n +0000086661 00000 n +0000086835 00000 n +0000088440 00000 n +0000088462 00000 n +0000088605 00000 n +0000089363 00000 n +0000089384 00000 n +0000089567 00000 n +0000091435 00000 n +0000091457 00000 n +0000091626 00000 n +0000093480 00000 n +0000093502 00000 n +0000093662 00000 n +0000095346 00000 n +0000095368 00000 n +0000095541 00000 n +0000097270 00000 n +0000097292 00000 n +0000097443 00000 n +0000098367 00000 n +0000098388 00000 n +0000098572 00000 n +0000100397 00000 n +0000100419 00000 n +0000100593 00000 n +0000102766 00000 n +0000102788 00000 n +0000102981 00000 n +0000104855 00000 n +0000104877 00000 n +0000105061 00000 n +0000106971 00000 n +0000106993 00000 n +0000107169 00000 n +0000108970 00000 n +0000108992 00000 n +0000109162 00000 n +0000110760 00000 n +0000110782 00000 n +0000110967 00000 n +0000112443 00000 n +0000112465 00000 n +0000112658 00000 n +0000114229 00000 n +0000114251 00000 n +0000114426 00000 n +0000116206 00000 n +0000116228 00000 n +0000116384 00000 n +0000117945 00000 n +0000117967 00000 n +0000118152 00000 n +0000120004 00000 n +0000120026 00000 n +0000120192 00000 n +0000121839 00000 n +0000121861 00000 n +0000122046 00000 n +0000123995 00000 n +0000124017 00000 n +0000124201 00000 n +0000125928 00000 n +0000125950 00000 n +0000126120 00000 n +0000127725 00000 n +0000127747 00000 n +0000127916 00000 n +0000129789 00000 n +0000129811 00000 n +0000129996 00000 n +0000131860 00000 n +0000131882 00000 n +0000132058 00000 n +0000134148 00000 n +0000134170 00000 n +0000134345 00000 n +0000136285 00000 n +0000136307 00000 n +0000136483 00000 n +0000138799 00000 n +0000138821 00000 n +0000138973 00000 n +0000140953 00000 n +0000140975 00000 n +0000141135 00000 n +0000143002 00000 n +0000143024 00000 n +0000143175 00000 n +0000144927 00000 n +0000144949 00000 n +0000145081 00000 n +0000146955 00000 n +0000146977 00000 n +0000147119 00000 n +0000149190 00000 n +0000149212 00000 n +0000149363 00000 n +0000151157 00000 n +0000151179 00000 n +0000151311 00000 n +0000153104 00000 n +0000153126 00000 n +0000153249 00000 n +0000153703 00000 n +0000153724 00000 n +0000153881 00000 n +0000155494 00000 n +0000155516 00000 n +0000155668 00000 n +0000157328 00000 n +0000157350 00000 n +0000157492 00000 n +0000158375 00000 n +0000158396 00000 n +0000158581 00000 n +0000160737 00000 n +0000160759 00000 n +0000160935 00000 n +0000163120 00000 n +0000163142 00000 n +0000163293 00000 n +0000164394 00000 n +0000164416 00000 n +0000164592 00000 n +0000166092 00000 n +0000166114 00000 n +0000166299 00000 n +0000168151 00000 n +0000168173 00000 n +0000168358 00000 n +0000170265 00000 n +0000170287 00000 n +0000170444 00000 n +0000171375 00000 n +0000171396 00000 n +0000171548 00000 n +0000173289 00000 n +0000173311 00000 n +0000173453 00000 n +0000175215 00000 n +0000175237 00000 n +0000175388 00000 n +0000177279 00000 n +0000177301 00000 n +0000177458 00000 n +0000179311 00000 n +0000179333 00000 n +0000179527 00000 n +0000181587 00000 n +0000181609 00000 n +0000181784 00000 n +0000183376 00000 n +0000183398 00000 n +0000183582 00000 n +0000184932 00000 n +0000184954 00000 n +0000185114 00000 n +0000186357 00000 n +0000186379 00000 n +0000186530 00000 n +0000187986 00000 n +0000188008 00000 n +0000188169 00000 n +0000189817 00000 n +0000189839 00000 n +0000189972 00000 n +0000190442 00000 n +0000190463 00000 n +0000190630 00000 n +0000192298 00000 n +0000192320 00000 n +0000192477 00000 n +0000193665 00000 n +0000193687 00000 n +0000193844 00000 n +0000195396 00000 n +0000195418 00000 n +0000195602 00000 n +0000196407 00000 n +0000196428 00000 n +0000196585 00000 n +0000202008 00000 n +0000202030 00000 n +0000202187 00000 n +0000207481 00000 n +0000207503 00000 n +0000207660 00000 n +0000212788 00000 n +0000212810 00000 n +0000212967 00000 n +0000213737 00000 n +0000213758 00000 n +0000213815 00000 n +0000213920 00000 n +0000214098 00000 n +0000214217 00000 n +0000214352 00000 n +0000214488 00000 n +0000214636 00000 n +0000214786 00000 n +0000214926 00000 n +0000215067 00000 n +0000215220 00000 n +0000215382 00000 n +0000215531 00000 n +0000215719 00000 n +0000215852 00000 n +0000215980 00000 n +0000216098 00000 n +0000216234 00000 n +0000216376 00000 n +0000216492 00000 n +0000216618 00000 n +0000216734 00000 n +0000216925 00000 n +0000217024 00000 n +0000217172 00000 n +0000217290 00000 n +0000217414 00000 n +0000217536 00000 n +0000217662 00000 n +0000217820 00000 n +0000217950 00000 n +0000218074 00000 n +0000218192 00000 n +0000218310 00000 n +0000218429 00000 n +0000218619 00000 n +0000218805 00000 n +0000218958 00000 n +0000219121 00000 n +0000219272 00000 n +0000219376 00000 n +0000219593 00000 n +0000219699 00000 n +0000219831 00000 n +0000219953 00000 n +0000220158 00000 n +0000220263 00000 n +0000220363 00000 n +0000220567 00000 n +0000220728 00000 n +0000220876 00000 n +0000221004 00000 n +0000221147 00000 n +0000221271 00000 n +0000221400 00000 n +0000221545 00000 n +0000221710 00000 n +0000221862 00000 n +0000222042 00000 n +0000222147 00000 n +0000222266 00000 n +0000222391 00000 n +0000222536 00000 n +0000222678 00000 n +0000222828 00000 n +0000222959 00000 n +0000223085 00000 n +0000223210 00000 n +0000223350 00000 n +0000223477 00000 n +0000223608 00000 n +0000223739 00000 n +0000223917 00000 n +0000224045 00000 n +0000224181 00000 n +0000224316 00000 n +0000224522 00000 n +0000224635 00000 n +0000224751 00000 n +0000224896 00000 n +0000225067 00000 n +0000225216 00000 n +0000225371 00000 n +0000225511 00000 n +0000225643 00000 n +0000225777 00000 n +0000225909 00000 n +0000226047 00000 n +0000226197 00000 n +0000226365 00000 n +0000226512 00000 n +0000226699 00000 n +0000226812 00000 n +0000226928 00000 n +0000227084 00000 n +0000227242 00000 n +0000227373 00000 n +0000227519 00000 n +0000227653 00000 n +0000227786 00000 n +0000228007 00000 n +0000228108 00000 n +0000228227 00000 n +0000228356 00000 n +0000228515 00000 n +0000228649 00000 n +0000228780 00000 n +0000228907 00000 n +0000229046 00000 n +0000229181 00000 n +0000229333 00000 n +0000229482 00000 n +0000229587 00000 n +0000229797 00000 n +0000229902 00000 n +0000230025 00000 n +0000230157 00000 n +0000230281 00000 n +0000230409 00000 n +0000230554 00000 n +0000230686 00000 n +0000230831 00000 n +0000230972 00000 n +0000231099 00000 n +0000231240 00000 n +0000231365 00000 n +0000231490 00000 n +0000231621 00000 n +0000231743 00000 n +0000231850 00000 n +0000232020 00000 n +0000232121 00000 n +0000232310 00000 n +0000232504 00000 n +0000232691 00000 n +0000232853 00000 n +0000233045 00000 n +0000233154 00000 n +0000233288 00000 n +0000233418 00000 n +0000233531 00000 n +0000233626 00000 n trailer -<<64268b0e570acbffcd1a25cd41042ebe>]>> +<]>> startxref -219887 +233841 %%EOF diff --git a/docs/docbook/Makefile.in b/docs/docbook/Makefile.in index 83b9920535a..39f891b4b5d 100644 --- a/docs/docbook/Makefile.in +++ b/docs/docbook/Makefile.in @@ -58,7 +58,8 @@ HOWTOSRC=projdoc/DOMAIN_MEMBER.sgml projdoc/NT_Security.sgml \ projdoc/UNIX_INSTALL.sgml projdoc/winbind.sgml projdoc/OS2-Client-HOWTO.sgml \ projdoc/Samba-PDC-HOWTO.sgml projdoc/ENCRYPTION.sgml \ projdoc/CVS-Access.sgml projdoc/Integrating-with-Windows.sgml \ - projdoc/PAM-Authentication-And-Samba.sgml projdoc/Samba-LDAP-HOWTO.sgml + projdoc/PAM-Authentication-And-Samba.sgml projdoc/Samba-LDAP-HOWTO.sgml \ + projdoc/Samba-BDC-HOWTO.sgml diff --git a/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml new file mode 100644 index 00000000000..4456ef01a83 --- /dev/null +++ b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml @@ -0,0 +1,233 @@ + + + + + + VolkerLendecke + + Samba Team +
    Volker.Lendecke@SerNet.DE
    +
    +
    + (26 Apr 2001) +
    + + +How to a Purely Samba Controlled Domain + + + +Prerequisite Reading + + +Before you continue reading in this chapter, please make sure +that you are comfortable with configuring a Samba PDC +as described in the Samba-PDC-HOWTO. + + + + + + + +Background + + +What is a Domain Controller? It is a machine that is able to answer +logon requests from workstations in a Windows NT Domain. Whenever a +user logs into a Windows NT Workstation, the workstation connects to a +Domain Controller and asks him whether the username and password the +user typed in is correct. The Domain Controller replies with a lot of +information about the user, for example the place where the users +profile is stored, the users full name of the user. All this +information is stored in the NT user database, the so-called SAM. + + + +There are two kinds of Domain Controller in a NT 4 compatible Domain: +A Primary Domain Controller (PDC) and one or more Backup Domain +Controllers (BDC). The PDC contains the master copy of the +SAM. Whenever the SAM has to change, for example when a user changes +his password, this change has to be done on the PDC. A Backup Domain +Controller is a machine that maintains a read-only copy of the +SAM. This way it is able to reply to logon requests and authenticate +users in case the PDC is not available. During this time no changes to +the SAM are possible. Whenever changes to the SAM are done on the PDC, +all BDC receive the changes from the PDC. + + + +Since version 2.2 Samba officially supports domain logons for all +current Windows Clients, including Windows 2000 and XP. This text +assumes the domain to be named SAMBA. To be able to act as a PDC, some +parameters in the [global]-section of the smb.conf have to be set: + + + +workgroup = SAMBA +domain master = yes +domain logons = yes + + + +Several other things like a [homes] and a [netlogon] share also may be +set along with settings for the profile path, the users home drive and +others. This will not be covered in this document. + + + + + + +What qualifies a Domain Controller on the network? + + +Every machine that is a Domain Controller for the domain SAMBA has to +register the NetBIOS group name SAMBA#1c with the WINS server and/or +by broadcast on the local network. The PDC also registers the unique +NetBIOS name SAMBA#1b with the WINS server. The name type #1b is +normally reserved for the domain master browser, a role that has +nothing to do with anything related to authentication, but the +Microsoft Domain implementation requires the domain master browser to +be on the same machine as the PDC. + + + + +How does a Workstation find its domain controller? + + +A NT workstation in the domain SAMBA that wants a local user to be +authenticated has to find the domain controller for SAMBA. It does +this by doing a NetBIOS name query for the group name SAMBA#1c. It +assumes that each of the machines it gets back from the queries is a +domain controller and can answer logon requests. To not open security +holes both the workstation and the selected (TODO: How is the DC +chosen) domain controller authenticate each other. After that the +workstation sends the user's credentials (his name and password) to +the domain controller, asking for approval. + + + + + + +When is the PDC needed? + + +Whenever a user wants to change his password, this has to be done on +the PDC. To find the PDC, the workstation does a NetBIOS name query +for SAMBA#1b, assuming this machine maintains the master copy of the +SAM. The workstation contacts the PDC, both mutually authenticate and +the password change is done. + + + + + + + + +Can Samba be a Backup Domain Controller? + + +With version 2.2, no. The native NT SAM replication protocols have +not yet been fully implemented. The Samba Team is working on +understanding and implementing the protocols, but this work has not +been finished for version 2.2. + + + +Can I get the benefits of a BDC with Samba? Yes. The main reason for +implementing a BDC is availability. If the PDC is a Samba machine, +a second Samba machine can be set up to +service logon requests whenever the PDC is down. + + + + + + +How do I set up a Samba BDC? + + +Several things have to be done: + + + + + +The file private/MACHINE.SID identifies the domain. When a samba +server is first started, it is created on the fly and must never be +changed again. This file has to be the same on the PDC and the BDC, +so the MACHINE.SID has to be copied from the PDC to the BDC. + + + +The Unix user database has to be synchronized from the PDC to the +BDC. This means that both the /etc/passwd and /etc/group have to be +replicated from the PDC to the BDC. This can be done manually +whenever changes are made, or the PDC is set up as a NIS master +server and the BDC as a NIS slave server. To set up the BDC as a +mere NIS client would not be enough, as the BDC would not be able to +access its user database in case of a PDC failure. + + + +The Samba password database in the file private/smbpasswd has to be +replicated from the PDC to the BDC. This is a bit tricky, see the +next section. + + + +Any netlogon share has to be replicated from the PDC to the +BDC. This can be done manually whenever login scripts are changed, +or it can be done automatically together with the smbpasswd +synchronization. + + + + + +Finally, the BDC has to be found by the workstations. This can be done +by setting + + + +workgroup = samba +domain master = no +domain logons = yes + + + +in the [global]-section of the smb.conf of the BDC. This makes the BDC +only register the name SAMBA#1c with the WINS server. This is no +problem as the name SAMBA#1c is a NetBIOS group name that is meant to +be registered by more than one machine. The parameter 'domain master = +no' forces the BDC not to register SAMBA#1b which as a unique NetBIOS +name is reserved for the Primary Domain Controller. + + + +How do I replicate the smbpasswd file? + + +Replication of the smbpasswd file is sensitive. It has to be done +whenever changes to the SAM are made. Every user's password change is +done in the smbpasswd file and has to be replicated to the BDC. So +replicating the smbpasswd file very often is necessary. + + + +As the smbpasswd file contains plain text password equivalents, it +must not be sent unencrypted over the wire. The best way to set up +smbpasswd replication from the PDC to the BDC is to use the utility +rsync. rsync can use ssh as a transport. ssh itself can be set up to +accept *only* rsync transfer without requiring the user to type a +password. + + + + + +
    diff --git a/docs/docbook/projdoc/samba-doc.sgml b/docs/docbook/projdoc/samba-doc.sgml index a95e4c3ca0a..e2fc5a1eb19 100644 --- a/docs/docbook/projdoc/samba-doc.sgml +++ b/docs/docbook/projdoc/samba-doc.sgml @@ -8,6 +8,7 @@ + @@ -57,6 +58,7 @@ Cheers, jerry &PRINTER-DRIVER2; &DOMAIN-MEMBER; &Samba-PDC-HOWTO; +&Samba-BDC-HOWTO; &Samba-LDAP; &WINBIND; &OS2-Client; diff --git a/docs/htmldocs/Samba-BDC-HOWTO.html b/docs/htmldocs/Samba-BDC-HOWTO.html new file mode 100644 index 00000000000..0847335fe66 --- /dev/null +++ b/docs/htmldocs/Samba-BDC-HOWTO.html @@ -0,0 +1,245 @@ +How to a Purely Samba Controlled Domain

    Prerequisite Reading

    Before you continue reading in this chapter, please make sure +that you are comfortable with configuring a Samba PDC +as described in the Samba-PDC-HOWTO.


    Background

    What is a Domain Controller? It is a machine that is able to answer +logon requests from workstations in a Windows NT Domain. Whenever a +user logs into a Windows NT Workstation, the workstation connects to a +Domain Controller and asks him whether the username and password the +user typed in is correct. The Domain Controller replies with a lot of +information about the user, for example the place where the users +profile is stored, the users full name of the user. All this +information is stored in the NT user database, the so-called SAM.

    There are two kinds of Domain Controller in a NT 4 compatible Domain: +A Primary Domain Controller (PDC) and one or more Backup Domain +Controllers (BDC). The PDC contains the master copy of the +SAM. Whenever the SAM has to change, for example when a user changes +his password, this change has to be done on the PDC. A Backup Domain +Controller is a machine that maintains a read-only copy of the +SAM. This way it is able to reply to logon requests and authenticate +users in case the PDC is not available. During this time no changes to +the SAM are possible. Whenever changes to the SAM are done on the PDC, +all BDC receive the changes from the PDC.

    Since version 2.2 Samba officially supports domain logons for all +current Windows Clients, including Windows 2000 and XP. This text +assumes the domain to be named SAMBA. To be able to act as a PDC, some +parameters in the [global]-section of the smb.conf have to be set:

    workgroup = SAMBA
    +domain master = yes
    +domain logons = yes

    Several other things like a [homes] and a [netlogon] share also may be +set along with settings for the profile path, the users home drive and +others. This will not be covered in this document.


    What qualifies a Domain Controller on the network?

    Every machine that is a Domain Controller for the domain SAMBA has to +register the NetBIOS group name SAMBA#1c with the WINS server and/or +by broadcast on the local network. The PDC also registers the unique +NetBIOS name SAMBA#1b with the WINS server. The name type #1b is +normally reserved for the domain master browser, a role that has +nothing to do with anything related to authentication, but the +Microsoft Domain implementation requires the domain master browser to +be on the same machine as the PDC.


    How does a Workstation find its domain controller?

    A NT workstation in the domain SAMBA that wants a local user to be +authenticated has to find the domain controller for SAMBA. It does +this by doing a NetBIOS name query for the group name SAMBA#1c. It +assumes that each of the machines it gets back from the queries is a +domain controller and can answer logon requests. To not open security +holes both the workstation and the selected (TODO: How is the DC +chosen) domain controller authenticate each other. After that the +workstation sends the user's credentials (his name and password) to +the domain controller, asking for approval.


    When is the PDC needed?

    Whenever a user wants to change his password, this has to be done on +the PDC. To find the PDC, the workstation does a NetBIOS name query +for SAMBA#1b, assuming this machine maintains the master copy of the +SAM. The workstation contacts the PDC, both mutually authenticate and +the password change is done.


    Can Samba be a Backup Domain Controller?

    With version 2.2, no. The native NT SAM replication protocols have +not yet been fully implemented. The Samba Team is working on +understanding and implementing the protocols, but this work has not +been finished for version 2.2.

    Can I get the benefits of a BDC with Samba? Yes. The main reason for +implementing a BDC is availability. If the PDC is a Samba machine, +a second Samba machine can be set up to +service logon requests whenever the PDC is down.


    How do I set up a Samba BDC?

    Several things have to be done:

    • The file private/MACHINE.SID identifies the domain. When a samba +server is first started, it is created on the fly and must never be +changed again. This file has to be the same on the PDC and the BDC, +so the MACHINE.SID has to be copied from the PDC to the BDC.

    • The Unix user database has to be synchronized from the PDC to the +BDC. This means that both the /etc/passwd and /etc/group have to be +replicated from the PDC to the BDC. This can be done manually +whenever changes are made, or the PDC is set up as a NIS master +server and the BDC as a NIS slave server. To set up the BDC as a +mere NIS client would not be enough, as the BDC would not be able to +access its user database in case of a PDC failure.

    • The Samba password database in the file private/smbpasswd has to be +replicated from the PDC to the BDC. This is a bit tricky, see the +next section.

    • Any netlogon share has to be replicated from the PDC to the +BDC. This can be done manually whenever login scripts are changed, +or it can be done automatically together with the smbpasswd +synchronization.

    Finally, the BDC has to be found by the workstations. This can be done +by setting

    workgroup = samba
    +domain master = no
    +domain logons = yes

    in the [global]-section of the smb.conf of the BDC. This makes the BDC +only register the name SAMBA#1c with the WINS server. This is no +problem as the name SAMBA#1c is a NetBIOS group name that is meant to +be registered by more than one machine. The parameter 'domain master = +no' forces the BDC not to register SAMBA#1b which as a unique NetBIOS +name is reserved for the Primary Domain Controller.


    How do I replicate the smbpasswd file?

    Replication of the smbpasswd file is sensitive. It has to be done +whenever changes to the SAM are made. Every user's password change is +done in the smbpasswd file and has to be replicated to the BDC. So +replicating the smbpasswd file very often is necessary.

    As the smbpasswd file contains plain text password equivalents, it +must not be sent unencrypted over the wire. The best way to set up +smbpasswd replication from the PDC to the BDC is to use the utility +rsync. rsync can use ssh as a transport. ssh itself can be set up to +accept *only* rsync transfer without requiring the user to type a +password.

    \ No newline at end of file diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index 870b0ec6e82..8009bb8b86f 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -668,155 +668,231 @@ HREF="#AEN1602" >
    9. Storing Samba's User/Machine Account information in an LDAP DirectoryHow to a Purely Samba Controlled Domain
    9.1. PurposePrerequisite Reading
    9.2. IntroductionBackground
    9.3. Supported LDAP ServersWhat qualifies a Domain Controller on the network?
    9.3.1. How does a Workstation find its domain controller?
    9.3.2. When is the PDC needed?
    9.4. Schema and Relationship to the RFC 2307 posixAccountCan Samba be a Backup Domain Controller?
    9.5. smb.conf LDAP parametersHow do I set up a Samba BDC?
    9.5.1. How do I replicate the smbpasswd file?
    9.6. 10. Storing Samba's User/Machine Account information in an LDAP Directory
    10.1. Purpose
    10.2. Introduction
    10.3. Supported LDAP Servers
    10.4. Schema and Relationship to the RFC 2307 posixAccount
    10.5. Configuring Samba with LDAP
    10.5.1. OpenLDAP configuration
    10.5.2. Configuring Samba
    10.6. Accounts and Groups management
    10.7. Security and sambaAccount
    9.7. 10.8. LDAP specials attributes for sambaAccounts
    9.8. 10.9. Example LDIF Entries for a sambaAccount
    9.9. 10.10. Comments
    10. 11. Unified Logons between Windows NT and UNIX using Winbind
    10.1. 11.1. Abstract
    10.2. 11.2. Introduction
    10.3. 11.3. What Winbind Provides
    10.3.1. 11.3.1. Target Uses
    10.4. 11.4. How Winbind Works
    10.4.1. 11.4.1. Microsoft Remote Procedure Calls
    10.4.2. 11.4.2. Name Service Switch
    10.4.3. 11.4.3. Pluggable Authentication Modules
    10.4.4. 11.4.4. User and Group ID Allocation
    10.4.5. 11.4.5. Result Caching
    10.5. 11.5. Installation and Configuration
    10.5.1. 11.5.1. Introduction
    10.5.2. 11.5.2. Requirements
    10.5.3. 11.5.3. Testing Things Out
    10.5.3.1. 11.5.3.1. Configure and compile SAMBA
    10.5.3.2. 11.5.3.2. Configure nsswitch.conf
    10.5.3.3. 11.5.3.3. Configure smb.conf
    10.5.3.4. 11.5.3.4. Join the SAMBA server to the PDC domain
    10.5.3.5. 11.5.3.5. Start up the winbindd daemon and test it!
    10.5.3.6. 11.5.3.6. Fix the /etc/rc.d/init.d/smb startup files
    10.5.3.7. 11.5.3.7. Configure Winbind and PAM
    10.6. 11.6. Limitations
    10.7. 11.7. Conclusion
    11. 12. OS2 Client HOWTO
    11.1. 12.1. FAQs
    11.1.1. 12.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?
    11.1.2. 12.1.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?
    11.1.3. 12.1.3. Are there any other issues when OS/2 (any version) is used as a client?
    11.1.4. 12.1.4. How do I get printer driver download working for OS/2 clients?
    12. 13. HOWTO Access Samba source code via CVS
    12.1. 13.1. Introduction
    12.2. 13.2. CVS Access to samba.org
    12.2.1. 13.2.1. Access via CVSweb
    12.2.2. 13.2.2. Access via cvs
    Index
    1.6. Step 5: Starting the smbd and nmbd

    You must choose to start smbd and nmbd either +>You must choose to start smbd and nmbd either as daemons or from inetd. Don't try +>. Don't try to do both! Either you can put them in inetd.conf and have them started on demand +> and have them started on demand by inetd /etc/rc.local. See the man pages for details - on the command line options. Take particular care to read - the bit about what user you need to be in order to start +>. See the man pages for details + on the command line options. Take particular care to read + the bit about what user you need to be in order to start Samba. In many cases you must be root.

    The main advantage of starting nmbd as a daemon is that they will - respond slightly more quickly to an initial connection - request. This is, however, unlikely to be a problem.

    using the recommended daemon method + is that they will respond slightly more quickly to an initial connection + request.



    Chapter 9. Storing Samba's User/Machine Account information in an LDAP DirectoryChapter 9. How to a Purely Samba Controlled Domain

    9.1. Purpose9.1. Prerequisite Reading

    Before you continue reading in this chapter, please make sure +that you are comfortable with configuring a Samba PDC +as described in the Samba-PDC-HOWTO.


    9.2. Background

    What is a Domain Controller? It is a machine that is able to answer +logon requests from workstations in a Windows NT Domain. Whenever a +user logs into a Windows NT Workstation, the workstation connects to a +Domain Controller and asks him whether the username and password the +user typed in is correct. The Domain Controller replies with a lot of +information about the user, for example the place where the users +profile is stored, the users full name of the user. All this +information is stored in the NT user database, the so-called SAM.

    There are two kinds of Domain Controller in a NT 4 compatible Domain: +A Primary Domain Controller (PDC) and one or more Backup Domain +Controllers (BDC). The PDC contains the master copy of the +SAM. Whenever the SAM has to change, for example when a user changes +his password, this change has to be done on the PDC. A Backup Domain +Controller is a machine that maintains a read-only copy of the +SAM. This way it is able to reply to logon requests and authenticate +users in case the PDC is not available. During this time no changes to +the SAM are possible. Whenever changes to the SAM are done on the PDC, +all BDC receive the changes from the PDC.

    Since version 2.2 Samba officially supports domain logons for all +current Windows Clients, including Windows 2000 and XP. This text +assumes the domain to be named SAMBA. To be able to act as a PDC, some +parameters in the [global]-section of the smb.conf have to be set:

    workgroup = SAMBA
    +domain master = yes
    +domain logons = yes

    Several other things like a [homes] and a [netlogon] share also may be +set along with settings for the profile path, the users home drive and +others. This will not be covered in this document.


    9.3. What qualifies a Domain Controller on the network?

    Every machine that is a Domain Controller for the domain SAMBA has to +register the NetBIOS group name SAMBA#1c with the WINS server and/or +by broadcast on the local network. The PDC also registers the unique +NetBIOS name SAMBA#1b with the WINS server. The name type #1b is +normally reserved for the domain master browser, a role that has +nothing to do with anything related to authentication, but the +Microsoft Domain implementation requires the domain master browser to +be on the same machine as the PDC.


    9.3.1. How does a Workstation find its domain controller?

    A NT workstation in the domain SAMBA that wants a local user to be +authenticated has to find the domain controller for SAMBA. It does +this by doing a NetBIOS name query for the group name SAMBA#1c. It +assumes that each of the machines it gets back from the queries is a +domain controller and can answer logon requests. To not open security +holes both the workstation and the selected (TODO: How is the DC +chosen) domain controller authenticate each other. After that the +workstation sends the user's credentials (his name and password) to +the domain controller, asking for approval.


    9.3.2. When is the PDC needed?

    Whenever a user wants to change his password, this has to be done on +the PDC. To find the PDC, the workstation does a NetBIOS name query +for SAMBA#1b, assuming this machine maintains the master copy of the +SAM. The workstation contacts the PDC, both mutually authenticate and +the password change is done.


    9.4. Can Samba be a Backup Domain Controller?

    With version 2.2, no. The native NT SAM replication protocols have +not yet been fully implemented. The Samba Team is working on +understanding and implementing the protocols, but this work has not +been finished for version 2.2.

    Can I get the benefits of a BDC with Samba? Yes. The main reason for +implementing a BDC is availability. If the PDC is a Samba machine, +a second Samba machine can be set up to +service logon requests whenever the PDC is down.


    9.5. How do I set up a Samba BDC?

    Several things have to be done:

    • The file private/MACHINE.SID identifies the domain. When a samba +server is first started, it is created on the fly and must never be +changed again. This file has to be the same on the PDC and the BDC, +so the MACHINE.SID has to be copied from the PDC to the BDC.

    • The Unix user database has to be synchronized from the PDC to the +BDC. This means that both the /etc/passwd and /etc/group have to be +replicated from the PDC to the BDC. This can be done manually +whenever changes are made, or the PDC is set up as a NIS master +server and the BDC as a NIS slave server. To set up the BDC as a +mere NIS client would not be enough, as the BDC would not be able to +access its user database in case of a PDC failure.

    • The Samba password database in the file private/smbpasswd has to be +replicated from the PDC to the BDC. This is a bit tricky, see the +next section.

    • Any netlogon share has to be replicated from the PDC to the +BDC. This can be done manually whenever login scripts are changed, +or it can be done automatically together with the smbpasswd +synchronization.

    Finally, the BDC has to be found by the workstations. This can be done +by setting

    workgroup = samba
    +domain master = no
    +domain logons = yes

    in the [global]-section of the smb.conf of the BDC. This makes the BDC +only register the name SAMBA#1c with the WINS server. This is no +problem as the name SAMBA#1c is a NetBIOS group name that is meant to +be registered by more than one machine. The parameter 'domain master = +no' forces the BDC not to register SAMBA#1b which as a unique NetBIOS +name is reserved for the Primary Domain Controller.


    9.5.1. How do I replicate the smbpasswd file?

    Replication of the smbpasswd file is sensitive. It has to be done +whenever changes to the SAM are made. Every user's password change is +done in the smbpasswd file and has to be replicated to the BDC. So +replicating the smbpasswd file very often is necessary.

    As the smbpasswd file contains plain text password equivalents, it +must not be sent unencrypted over the wire. The best way to set up +smbpasswd replication from the PDC to the BDC is to use the utility +rsync. rsync can use ssh as a transport. ssh itself can be set up to +accept *only* rsync transfer without requiring the user to type a +password.


    Chapter 10. Storing Samba's User/Machine Account information in an LDAP Directory

    10.1. Purpose

    This document describes how to use an LDAP directory for storing Samba user -account information normally stored in the smbpasswd(5) file. It is +account information traditionally stored in the smbpasswd(5) file. It is assumed that the reader already has a basic understanding of LDAP concepts and has a working directory server already installed. For more information on LDAP architectures and Directories, please refer to the following sites.

    It may also be helpful to supplement the reading of the HOWTO with -the Two additional Samba resources which may prove to be helpful are

    • The Samba-PDC-LDAP-HOWTO -maintained by Ignacio Coupeau.

    • The NT migration scripts from IDEALX that are + geared to manage users and group in such a Samba-LDAP Domain Controller configuration. +


    9.2. Introduction10.2. Introduction

    Traditionally, when configuring

    As a result of these defeciencies, a more robust means of storing user attributes used by smbd was developed. The API which defines access to user accounts -is referred to as the samdb interface (previously this was called the passdb -API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support +is commonly referred to as the samdb interface (previously this was called the passdb +API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support for a samdb backend (e.g.


    9.3. Supported LDAP Servers10.3. Supported LDAP Servers

    The LDAP samdb code in 2.2.3 has been developed and tested using the OpenLDAP @@ -8078,8 +8423,8 @@ CLASS="SECT1" >


    9.4. Schema and Relationship to the RFC 2307 posixAccount10.4. Schema and Relationship to the RFC 2307 posixAccount

    Samba 2.2.3 includes the necessary schema file for OpenLDAP 2.0 in @@ -8104,7 +8449,7 @@ CLASS="PROGRAMLISTING" MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ - description $ userWorkstations $ primaryGroupID ))


    10.5. Configuring Samba with LDAP

    10.5.1. OpenLDAP configuration

    To include support for the sambaAccount object in an OpenLDAP directory server, first copy the samba.schema file to slapd's configuration directory.

    It is recommended that you maintain some indices on some of the most usefull attributes, +like in the following example, to speed up searches made on sambaAccount objectclasses +(and possibly posixAccount and posixGroup as well).

    # Indices to maintain
    +## required by OpenLDAP 2.0
    +index objectclass   eq
    +
    +## support pb_getsampwnam()
    +index uid           pres,eq
    +## support pdb_getsambapwrid()
    +index rid           eq
    +
    +## uncomment these if you are storing posixAccount and
    +## posixGroup entries in the directory as well
    +##index uidNumber     eq
    +##index gidNumber     eq
    +##index cn            eq
    +##index memberUid     eq



    9.5. smb.conf LDAP parameters

    10.5.2. Configuring Samba

    The following parameters are available in smb.conf only with ' to store the # passphrase in the secrets.tdb file. If the "ldap admin dn" values # changes, this password will need to be reset. - ldap admin dn = "cn=Manager,dc=samba,dc=org" + ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org" # specify the LDAP server's hostname (defaults to locahost) ldap server = ahab.samba.org @@ -8328,13 +8722,39 @@ CLASS="REPLACEABLE" >


    10.6. Accounts and Groups management

    As users accounts are managed thru the sambaAccount objectclass, you should +modify you existing administration tools to deal with sambaAccount attributes.

    Machines accounts are managed with the sambaAccount objectclass, just +like users accounts. However, it's up to you to stored thoses accounts +in a different tree of you LDAP namespace: you should use +"ou=Groups,dc=plainjoe,dc=org" to store groups and +"ou=People,dc=plainjoe,dc=org" to store users. Just configure your +NSS and PAM accordingly (usually, in the /etc/ldap.conf configuration +file).

    In Samba release 2.2.3, the group management system is based on posix +groups. This meand that Samba make usage of the posixGroup objectclass. +For now, there is no NT-like group system management (global and local +groups).


    9.6. Security and sambaAccount10.7. Security and sambaAccount

    There are two important points to remember when discussing the security @@ -8359,7 +8779,12 @@ of sambaAccount entries in the directory.

    These password hashes are clear text equivalents and can be used to impersonate -the user without deriving the original clear text strings.

    ENCRYPTION chapter of the Samba-HOWTO-Collection.

    To remedy the first security issue, the "ldap ssl" smb.conf parameter defaults to require an encrypted session (ldap ssl = off).

    Note that the LDAPS protocol is deprecated in favor of the LDAPv3 StartTLS +extended operation. However, the OpenLDAP library still provides support for +the older method of securing communication between clients and servers.

    The second security precaution is to prevent non-administrative users from harvesting password hashes from the directory. This can be done using the following ACL in

    ## allow users to update their own password, but not to browse others
    -access to attrs=userPassword,lmPassword,ntPassword
    -     by self write
    -     by * auth
    ## allow the "ldap admin dn" access, but deny everyone else +access to attrs=lmPassword,ntPassword + by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write + by * none

    You may of course, add in write access to administrative DN's as necessary.


    9.7. 10.8. LDAP specials attributes for sambaAccounts

    There are currently four sambaAccount attributes which map directly onto -smb.conf parameters.

    The sambaAccount objectclass is composed of the following attributes:

    • smbHome -> "logon home"

      lmPassword: the LANMAN password 16-byte hash stored as a character + representation of a hexidecimal string.

    • ntPassword: the NT password hash 16-byte stored as a character + representation of a hexidecimal string.

    • pwdLastSet: The integer time in seconds since 1970 when the + lmPassword and ntPassword attributes were last set. +

    • acctFlags: string of 11 characters surrounded by square brackets [] + representing account flags such as U (user), W(workstation), X(no password expiration), and + D(disabled).

    • logonTime: Integer value currently unused

    • logoffTime: Integer value currently unused

    • kickoffTime: Integer value currently unused

    • pwdCanChange: Integer value currently unused

    • pwdMustChange: Integer value currently unused

    • homeDrive: specifies the drive letter to which to map the + UNC path specified by homeDirectory. The drive letter must be specified in the form "X:" + where X is the letter of the drive to map. Refer to the "logon drive" parameter in the + smb.conf(5) man page for more information.

    • scriptPath: The scriptPath property specifies the path of + the user's logon script, .CMD, .EXE, or .BAT file. The string can be null. The path + is relative to the netlogon share. Refer to the "logon script" parameter in the + smb.conf(5) man page for more information.

    • profilePath: specifies a path to the user's profile. + This value can be a null string, a local absolute path, or a UNC path. Refer to the + "logon path" parameter in the smb.conf(5) man page for more information.

    • smbHome: The homeDirectory property specifies the path of + the home directory for the user. The string can be null. If homeDrive is set and specifies + a drive letter, homeDirectory should be a UNC path. The path must be a network + UNC path of the form \\server\share\directory. This value can be a null string. + Refer to the "logon home" parameter in the smb.conf(5) man page for more information. +

    • profilePath -> "logon path"

      userWorkstation: character string value currently unused. +

    • homeDrive -> "logon drive"

      rid: the integer representation of the user's relative identifier + (RID).

    • scriptPath -> "logon script"

      primaryGroupID: the relative identifier (RID) of the primary group + of the user.

    First of all, these parameters are only used when Samba is acting as a -PDC or a domain (refer to the The majority of these parameters are only used when Samba is acting as a PDC of +a domain (refer to the Samba-PDC-HOWTO -for details on how to configure Samba as a Primary Domain Controller). -Furthermore, these attributes are only stored with the sambaAccount entry if +> for details on +how to configure Samba as a Primary Domain Controller). The following four attributes +are only stored with the sambaAccount entry if the values are non-default values:

    • smbHome

    • scriptPath

    • logonPath

    • homeDrive

    These attributes are only stored with the sambaAccount entry if the values are non-default values. For example, assume TASHTEGO has now been configured as a PDC and that logon home string is expanded to \\TASHTEGO\becky.

    If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org", +> string is expanded to \\TASHTEGO\becky. +If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org", this value is used. However, if this attribute does not exist, then the value of the


    9.8. Example LDIF Entries for a sambaAccount10.9. Example LDIF Entries for a sambaAccount

    The following is a working LDIF with the inclusion of the posixAccount objectclass:


    9.9. Comments10.10. Comments

    Please mail all comments regarding this HOWTO to


    Chapter 10. Unified Logons between Windows NT and UNIX using WinbindChapter 11. Unified Logons between Windows NT and UNIX using Winbind

    10.1. Abstract11.1. Abstract

    Integration of UNIX and Microsoft Windows NT through @@ -8599,8 +9167,8 @@ CLASS="SECT1" >


    10.2. Introduction11.2. Introduction

    It is well known that UNIX and Microsoft Windows NT have @@ -8653,8 +9221,8 @@ CLASS="SECT1" >


    10.3. What Winbind Provides11.3. What Winbind Provides

    Winbind unifies UNIX and Windows NT account management by @@ -8695,8 +9263,8 @@ CLASS="SECT2" >


    10.3.1. Target Uses11.3.1. Target Uses

    Winbind is targeted at organizations that have an @@ -8719,8 +9287,8 @@ CLASS="SECT1" >


    10.4. How Winbind Works11.4. How Winbind Works

    The winbind system is designed around a client/server @@ -8739,8 +9307,8 @@ CLASS="SECT2" >


    10.4.1. Microsoft Remote Procedure Calls11.4.1. Microsoft Remote Procedure Calls

    Over the last two years, efforts have been underway @@ -8765,8 +9333,8 @@ CLASS="SECT2" >


    10.4.2. Name Service Switch11.4.2. Name Service Switch

    The Name Service Switch, or NSS, is a feature that is @@ -8845,8 +9413,8 @@ CLASS="SECT2" >


    10.4.3. Pluggable Authentication Modules11.4.3. Pluggable Authentication Modules

    Pluggable Authentication Modules, also known as PAM, @@ -8894,8 +9462,8 @@ CLASS="SECT2" >


    10.4.4. User and Group ID Allocation11.4.4. User and Group ID Allocation

    When a user or group is created under Windows NT @@ -8920,8 +9488,8 @@ CLASS="SECT2" >


    10.4.5. Result Caching11.4.5. Result Caching

    An active system can generate a lot of user and group @@ -8943,8 +9511,8 @@ CLASS="SECT1" >


    10.5. Installation and Configuration11.5. Installation and Configuration

    Many thanks to John Trostel


    10.5.1. Introduction11.5.1. Introduction

    This HOWTO describes the procedures used to get winbind up and @@ -9013,8 +9581,8 @@ CLASS="SECT2" >


    10.5.2. Requirements11.5.2. Requirements

    If you have a samba configuration file that you are currently @@ -9071,8 +9639,8 @@ CLASS="SECT2" >


    10.5.3. Testing Things Out11.5.3. Testing Things Out

    Before starting, it is probably best to kill off all the SAMBA @@ -9116,8 +9684,8 @@ CLASS="SECT3" >


    10.5.3.1. Configure and compile SAMBA11.5.3.1. Configure and compile SAMBA

    The configuration and compilation of SAMBA is pretty straightforward. @@ -9191,8 +9759,8 @@ CLASS="SECT3" >


    10.5.3.2. Configure 11.5.3.2. Configure nsswitch.conf and the @@ -9281,8 +9849,8 @@ CLASS="SECT3" >

    10.5.3.3. Configure smb.conf11.5.3.3. Configure smb.conf

    Several parameters are needed in the smb.conf file to control @@ -9365,8 +9933,8 @@ CLASS="SECT3" >


    10.5.3.4. Join the SAMBA server to the PDC domain11.5.3.4. Join the SAMBA server to the PDC domain

    Enter the following command to make the SAMBA server join the @@ -9411,8 +9979,8 @@ CLASS="SECT3" >


    10.5.3.5. Start up the winbindd daemon and test it!11.5.3.5. Start up the winbindd daemon and test it!

    Eventually, you will want to modify your smb startup script to @@ -9481,7 +10049,7 @@ CEO+TsInternetUserObviously, I have named my domain 'CEO' and my winbindd +>winbind separator is '+'.


    10.5.3.6. Fix the 11.5.3.6. Fix the /etc/rc.d/init.d/smb startup files

    10.5.3.7. Configure Winbind and PAM11.5.3.7. Configure Winbind and PAM

    If you have made it this far, you know that winbindd and samba are working @@ -9904,8 +10472,8 @@ CLASS="SECT1" >


    10.6. Limitations11.6. Limitations

    Winbind has a number of limitations in its current @@ -9945,8 +10513,8 @@ CLASS="SECT1" >


    10.7. Conclusion11.7. Conclusion

    The winbind system, through the use of the Name Service @@ -9962,23 +10530,23 @@ CLASS="CHAPTER" >


    Chapter 11. OS2 Client HOWTOChapter 12. OS2 Client HOWTO

    This document describes how to use an LDAP directory for storing Samba user -account information normally stored in the smbpasswd(5) file. It is +account information traditionally stored in the smbpasswd(5) file. It is assumed that the reader already has a basic understanding of LDAP concepts and has a working directory server already installed. For more information on LDAP architectures and Directories, please refer to the following sites.

    It may also be helpful to supplement the reading of the HOWTO with -the Two additional Samba resources which may prove to be helpful are

    • The Samba-PDC-LDAP-HOWTO -maintained by Ignacio Coupeau.

    • The NT migration scripts from IDEALX that are + geared to manage users and group in such a Samba-LDAP Domain Controller configuration. +


    Introduction

    • The first is that all lookups must be performed sequentially. Given that there are approximately two lookups per domain logon (one for a normal session connection such as when mapping a network drive or printer), this -is non-optimal. What is needed is an indexed approach such as is used in -databases.

    • The second problem is that administrators who desired to replicate a smbpasswd file to more than one Samba server were left to use external @@ -116,16 +139,20 @@ CLASS="COMMAND" >ssh(1) and wrote custom, in-house scripts.

    • And finally, the amount of information which is stored in an smbpasswd entry leaves no room for additional attributes such as a home directory, password expiration time, or even a Relative Identified (RID).

    As a result of these defeciencies, a more robust means of storing user attributes used by smbd was developed. The API which defines access to user accounts -is referred to as the samdb interface (previously this was called the passdb -API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support +is commonly referred to as the samdb interface (previously this was called the passdb +API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support for a samdb backend (e.g.


    Supported LDAP Servers


    Schema and Relationship to the RFC 2307 posixAccount

    The samba.schema file has been formatted for OpenLDAP 2.0. The OID's are @@ -264,6 +291,23 @@ This means that the Samba server must also have the LDAP NSS library installed and functioning correctly. This division of information makes it possible to store all Samba account information in LDAP, but still maintain UNIX account information in NIS while the network is transitioning to a full LDAP infrastructure.


    Configuring Samba with LDAP

    OpenLDAP configuration

    To include support for the sambaAccount object in an OpenLDAP directory server, first copy the samba.schema file to slapd's configuration directory.

    It is recommended that you maintain some indices on some of the most usefull attributes, +like in the following example, to speed up searches made on sambaAccount objectclasses +(and possibly posixAccount and posixGroup as well).

    # Indices to maintain
    +## required by OpenLDAP 2.0
    +index objectclass   eq
    +
    +## support pb_getsampwnam()
    +index uid           pres,eq
    +## support pdb_getsambapwrid()
    +index rid           eq
    +
    +## uncomment these if you are storing posixAccount and
    +## posixGroup entries in the directory as well
    +##index uidNumber     eq
    +##index gidNumber     eq
    +##index cn            eq
    +##index memberUid     eq



    smb.conf LDAP parameters

    Configuring Samba

    The following parameters are available in smb.conf only with ' to store the # passphrase in the secrets.tdb file. If the "ldap admin dn" values # changes, this password will need to be reset. - ldap admin dn = "cn=Manager,dc=samba,dc=org" + ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org" # specify the LDAP server's hostname (defaults to locahost) ldap server = ahab.samba.org @@ -434,12 +501,38 @@ CLASS="REPLACEABLE" # ldap filter = "(&(uid=%u)(objectclass=sambaAccount))"


    Accounts and Groups management

    As users accounts are managed thru the sambaAccount objectclass, you should +modify you existing administration tools to deal with sambaAccount attributes.

    Machines accounts are managed with the sambaAccount objectclass, just +like users accounts. However, it's up to you to stored thoses accounts +in a different tree of you LDAP namespace: you should use +"ou=Groups,dc=plainjoe,dc=org" to store groups and +"ou=People,dc=plainjoe,dc=org" to store users. Just configure your +NSS and PAM accordingly (usually, in the /etc/ldap.conf configuration +file).

    In Samba release 2.2.3, the group management system is based on posix +groups. This meand that Samba make usage of the posixGroup objectclass. +For now, there is no NT-like group system management (global and local +groups).


    Security and sambaAccount

    These password hashes are clear text equivalents and can be used to impersonate -the user without deriving the original clear text strings.

    ENCRYPTION chapter of the Samba-HOWTO-Collection.

    To remedy the first security issue, the "ldap ssl" smb.conf parameter defaults to require an encrypted session (ldap ssl = off).

    Note that the LDAPS protocol is deprecated in favor of the LDAPv3 StartTLS +extended operation. However, the OpenLDAP library still provides support for +the older method of securing communication between clients and servers.

    The second security precaution is to prevent non-administrative users from harvesting password hashes from the directory. This can be done using the following ACL in

    ## allow users to update their own password, but not to browse others
    -access to attrs=userPassword,lmPassword,ntPassword
    -     by self write
    -     by * auth
    ## allow the "ldap admin dn" access, but deny everyone else +access to attrs=lmPassword,ntPassword + by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write + by * none

    You may of course, add in write access to administrative DN's as necessary.


    LDAP specials attributes for sambaAccounts

    There are currently four sambaAccount attributes which map directly onto -smb.conf parameters.

    The sambaAccount objectclass is composed of the following attributes:

    • smbHome -> "logon home"

      lmPassword: the LANMAN password 16-byte hash stored as a character + representation of a hexidecimal string.

    • ntPassword: the NT password hash 16-byte stored as a character + representation of a hexidecimal string.

    • profilePath -> "logon path"

      pwdLastSet: The integer time in seconds since 1970 when the + lmPassword and ntPassword attributes were last set. +

    • homeDrive -> "logon drive"

      acctFlags: string of 11 characters surrounded by square brackets [] + representing account flags such as U (user), W(workstation), X(no password expiration), and + D(disabled).

    • scriptPath -> "logon script"

      logonTime: Integer value currently unused

    • logoffTime: Integer value currently unused

    • kickoffTime: Integer value currently unused

    • pwdCanChange: Integer value currently unused

    • pwdMustChange: Integer value currently unused

    • homeDrive: specifies the drive letter to which to map the + UNC path specified by homeDirectory. The drive letter must be specified in the form "X:" + where X is the letter of the drive to map. Refer to the "logon drive" parameter in the + smb.conf(5) man page for more information.

    • scriptPath: The scriptPath property specifies the path of + the user's logon script, .CMD, .EXE, or .BAT file. The string can be null. The path + is relative to the netlogon share. Refer to the "logon script" parameter in the + smb.conf(5) man page for more information.

    • profilePath: specifies a path to the user's profile. + This value can be a null string, a local absolute path, or a UNC path. Refer to the + "logon path" parameter in the smb.conf(5) man page for more information.

    • smbHome: The homeDirectory property specifies the path of + the home directory for the user. The string can be null. If homeDrive is set and specifies + a drive letter, homeDirectory should be a UNC path. The path must be a network + UNC path of the form \\server\share\directory. This value can be a null string. + Refer to the "logon home" parameter in the smb.conf(5) man page for more information. +

    • userWorkstation: character string value currently unused. +

    • rid: the integer representation of the user's relative identifier + (RID).

    • primaryGroupID: the relative identifier (RID) of the primary group + of the user.

    First of all, these parameters are only used when Samba is acting as a -PDC or a domain (refer to the The majority of these parameters are only used when Samba is acting as a PDC of +a domain (refer to the Samba-PDC-HOWTO -for details on how to configure Samba as a Primary Domain Controller). -Furthermore, these attributes are only stored with the sambaAccount entry if +> for details on +how to configure Samba as a Primary Domain Controller). The following four attributes +are only stored with the sambaAccount entry if the values are non-default values:

    • smbHome

    • scriptPath

    • logonPath

    • homeDrive

    These attributes are only stored with the sambaAccount entry if the values are non-default values. For example, assume TASHTEGO has now been configured as a PDC and that logon home string is expanded to \\TASHTEGO\becky.

    If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org", +> string is expanded to \\TASHTEGO\becky. +If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org", this value is used. However, if this attribute does not exist, then the value of the


    Example LDIF Entries for a sambaAccount


    Comments

    Step 5: Starting the smbd and nmbd

    You must choose to start smbd and nmbd either +>You must choose to start smbd and nmbd either as daemons or from inetd. Don't try +>. Don't try to do both! Either you can put them in inetd.conf and have them started on demand +> and have them started on demand by inetd /etc/rc.local. See the man pages for details - on the command line options. Take particular care to read - the bit about what user you need to be in order to start +>. See the man pages for details + on the command line options. Take particular care to read + the bit about what user you need to be in order to start Samba. In many cases you must be root.

    The main advantage of starting nmbd as a daemon is that they will - respond slightly more quickly to an initial connection - request. This is, however, unlikely to be a problem.

    using the recommended daemon method + is that they will respond slightly more quickly to an initial connection + request.


    Obviously, I have named my domain 'CEO' and my winbindd +>winbind separator is '+'.

    Date: Sat, 2 Feb 2002 15:12:32 +0000 Subject: large debian packaging checking from Eloy. jerry --- packaging/Debian/README | 42 +- packaging/Debian/debian/README.build | 397 ++ packaging/Debian/debian/README.debian | 71 + packaging/Debian/debian/TODO | 10 + packaging/Debian/debian/changelog | 1559 +++++ packaging/Debian/debian/config.cache | 231 + packaging/Debian/debian/config.cache.alpha-linux | 12 + packaging/Debian/debian/config.cache.sparc-linux | 13 + packaging/Debian/debian/control | 151 + packaging/Debian/debian/control.smbwrapper | 111 + packaging/Debian/debian/copyright | 36 + packaging/Debian/debian/libpam-smbpass.files | 1 + packaging/Debian/debian/libsmbclient-dev.files | 2 + packaging/Debian/debian/libsmbclient.files | 2 + packaging/Debian/debian/libsmbclient.postinst | 10 + packaging/Debian/debian/libsmbclient.shlibs | 1 + packaging/Debian/debian/mksmbpasswd.8 | 28 + packaging/Debian/debian/mksmbpasswd.awk | 5 + packaging/Debian/debian/patches/Makefile.patch | 49 + packaging/Debian/debian/patches/configure.patch | 6044 ++++++++++++++++++++ packaging/Debian/debian/patches/loadparm.patch | 78 + packaging/Debian/debian/patches/samba.patch | 199 + packaging/Debian/debian/patches/smbadduser.patch | 22 + .../Debian/debian/patches/smbclient-pager.patch | 11 + .../debian/patches/smbclient-xfer-speed.patch | 17 + packaging/Debian/debian/rules | 274 + packaging/Debian/debian/rules.old | 194 + packaging/Debian/debian/rules.smbwrapper | 172 + packaging/Debian/debian/samba-common.conffiles | 2 + packaging/Debian/debian/samba-common.files | 7 + packaging/Debian/debian/samba-common.postrm | 6 + packaging/Debian/debian/samba-doc.docs | 9 + packaging/Debian/debian/samba-doc.examples | 3 + packaging/Debian/debian/samba.conffiles | 3 + packaging/Debian/debian/samba.cron.daily | 16 + packaging/Debian/debian/samba.dirs | 11 + packaging/Debian/debian/samba.docs | 3 + packaging/Debian/debian/samba.init | 94 + packaging/Debian/debian/samba.logrotate | 21 + packaging/Debian/debian/samba.pamd | 5 + packaging/Debian/debian/samba.postinst | 218 + packaging/Debian/debian/samba.postrm | 26 + packaging/Debian/debian/samba.preinst | 47 + packaging/Debian/debian/samba.prerm | 74 + packaging/Debian/debian/sambaconfig | 130 + packaging/Debian/debian/sambaconfig.8 | 40 + packaging/Debian/debian/scripts/patch-source | 7 + packaging/Debian/debian/scripts/unpatch-source | 7 + packaging/Debian/debian/smb.conf | 147 + packaging/Debian/debian/smbclient.files | 9 + packaging/Debian/debian/smbfs.files | 10 + packaging/Debian/debian/smbfs.suid | 5 + packaging/Debian/debian/smbwrapper.dirs | 2 + packaging/Debian/debian/smbwrapper.docs | 2 + packaging/Debian/debian/smbwrapper.files | 1 + packaging/Debian/debian/swat.dirs | 2 + packaging/Debian/debian/swat.docs | 1 + packaging/Debian/debian/swat.files | 2 + packaging/Debian/debian/swat.postinst | 23 + packaging/Debian/debian/swat.postrm | 19 + packaging/Debian/debian/wins2dns.awk | 38 + packaging/Debian/stable/README | 4 +- packaging/Debian/unstable/README | 3 + packaging/Debian/unstable/README.build | 397 -- packaging/Debian/unstable/README.debian | 67 - packaging/Debian/unstable/TODO | 4 - packaging/Debian/unstable/changelog | 1418 ----- packaging/Debian/unstable/config.cache | 231 - packaging/Debian/unstable/config.cache.alpha-linux | 12 - packaging/Debian/unstable/config.cache.sparc-linux | 13 - packaging/Debian/unstable/control | 121 - packaging/Debian/unstable/control.smbwrapper | 111 - packaging/Debian/unstable/copyright | 36 - packaging/Debian/unstable/cron.daily | 16 - packaging/Debian/unstable/docs | 3 - packaging/Debian/unstable/init.d | 94 - packaging/Debian/unstable/libpam-smbpass.files | 1 - packaging/Debian/unstable/mksmbpasswd.8 | 28 - packaging/Debian/unstable/mksmbpasswd.awk | 5 - packaging/Debian/unstable/rules | 229 - packaging/Debian/unstable/rules.old | 194 - packaging/Debian/unstable/rules.smbwrapper | 172 - packaging/Debian/unstable/samba-common.conffiles | 2 - packaging/Debian/unstable/samba-common.files | 7 - packaging/Debian/unstable/samba-common.postrm | 6 - packaging/Debian/unstable/samba-doc.docs | 9 - packaging/Debian/unstable/samba-doc.examples | 3 - packaging/Debian/unstable/samba.conffiles | 2 - packaging/Debian/unstable/samba.dirs | 11 - packaging/Debian/unstable/samba.logrotate | 15 - packaging/Debian/unstable/samba.pamd | 5 - packaging/Debian/unstable/samba.postinst | 218 - packaging/Debian/unstable/samba.postrm | 26 - packaging/Debian/unstable/samba.preinst | 47 - packaging/Debian/unstable/samba.prerm | 74 - packaging/Debian/unstable/sambaconfig | 130 - packaging/Debian/unstable/sambaconfig.8 | 40 - packaging/Debian/unstable/smb.conf | 147 - packaging/Debian/unstable/smbclient.files | 9 - packaging/Debian/unstable/smbfs.files | 8 - packaging/Debian/unstable/smbfs.suid | 5 - packaging/Debian/unstable/smbwrapper.dirs | 2 - packaging/Debian/unstable/smbwrapper.docs | 2 - packaging/Debian/unstable/smbwrapper.files | 1 - packaging/Debian/unstable/smbwrapper.substvars | 1 - packaging/Debian/unstable/swat.dirs | 2 - packaging/Debian/unstable/swat.docs | 1 - packaging/Debian/unstable/swat.files | 2 - packaging/Debian/unstable/swat.postinst | 23 - packaging/Debian/unstable/swat.postrm | 19 - packaging/Debian/unstable/wins2dns.awk | 38 - 111 files changed, 10726 insertions(+), 4020 deletions(-) create mode 100644 packaging/Debian/debian/README.build create mode 100644 packaging/Debian/debian/README.debian create mode 100644 packaging/Debian/debian/TODO create mode 100644 packaging/Debian/debian/changelog create mode 100644 packaging/Debian/debian/config.cache create mode 100644 packaging/Debian/debian/config.cache.alpha-linux create mode 100644 packaging/Debian/debian/config.cache.sparc-linux create mode 100644 packaging/Debian/debian/control create mode 100644 packaging/Debian/debian/control.smbwrapper create mode 100644 packaging/Debian/debian/copyright create mode 100644 packaging/Debian/debian/libpam-smbpass.files create mode 100644 packaging/Debian/debian/libsmbclient-dev.files create mode 100644 packaging/Debian/debian/libsmbclient.files create mode 100644 packaging/Debian/debian/libsmbclient.postinst create mode 100644 packaging/Debian/debian/libsmbclient.shlibs create mode 100644 packaging/Debian/debian/mksmbpasswd.8 create mode 100644 packaging/Debian/debian/mksmbpasswd.awk create mode 100644 packaging/Debian/debian/patches/Makefile.patch create mode 100644 packaging/Debian/debian/patches/configure.patch create mode 100644 packaging/Debian/debian/patches/loadparm.patch create mode 100644 packaging/Debian/debian/patches/samba.patch create mode 100644 packaging/Debian/debian/patches/smbadduser.patch create mode 100644 packaging/Debian/debian/patches/smbclient-pager.patch create mode 100644 packaging/Debian/debian/patches/smbclient-xfer-speed.patch create mode 100755 packaging/Debian/debian/rules create mode 100644 packaging/Debian/debian/rules.old create mode 100644 packaging/Debian/debian/rules.smbwrapper create mode 100644 packaging/Debian/debian/samba-common.conffiles create mode 100644 packaging/Debian/debian/samba-common.files create mode 100644 packaging/Debian/debian/samba-common.postrm create mode 100644 packaging/Debian/debian/samba-doc.docs create mode 100644 packaging/Debian/debian/samba-doc.examples create mode 100644 packaging/Debian/debian/samba.conffiles create mode 100644 packaging/Debian/debian/samba.cron.daily create mode 100644 packaging/Debian/debian/samba.dirs create mode 100644 packaging/Debian/debian/samba.docs create mode 100644 packaging/Debian/debian/samba.init create mode 100644 packaging/Debian/debian/samba.logrotate create mode 100644 packaging/Debian/debian/samba.pamd create mode 100644 packaging/Debian/debian/samba.postinst create mode 100644 packaging/Debian/debian/samba.postrm create mode 100644 packaging/Debian/debian/samba.preinst create mode 100644 packaging/Debian/debian/samba.prerm create mode 100644 packaging/Debian/debian/sambaconfig create mode 100644 packaging/Debian/debian/sambaconfig.8 create mode 100755 packaging/Debian/debian/scripts/patch-source create mode 100755 packaging/Debian/debian/scripts/unpatch-source create mode 100644 packaging/Debian/debian/smb.conf create mode 100644 packaging/Debian/debian/smbclient.files create mode 100644 packaging/Debian/debian/smbfs.files create mode 100644 packaging/Debian/debian/smbfs.suid create mode 100644 packaging/Debian/debian/smbwrapper.dirs create mode 100644 packaging/Debian/debian/smbwrapper.docs create mode 100644 packaging/Debian/debian/smbwrapper.files create mode 100644 packaging/Debian/debian/swat.dirs create mode 100644 packaging/Debian/debian/swat.docs create mode 100644 packaging/Debian/debian/swat.files create mode 100644 packaging/Debian/debian/swat.postinst create mode 100644 packaging/Debian/debian/swat.postrm create mode 100644 packaging/Debian/debian/wins2dns.awk create mode 100644 packaging/Debian/unstable/README delete mode 100644 packaging/Debian/unstable/README.build delete mode 100644 packaging/Debian/unstable/README.debian delete mode 100644 packaging/Debian/unstable/TODO delete mode 100644 packaging/Debian/unstable/changelog delete mode 100644 packaging/Debian/unstable/config.cache delete mode 100644 packaging/Debian/unstable/config.cache.alpha-linux delete mode 100644 packaging/Debian/unstable/config.cache.sparc-linux delete mode 100644 packaging/Debian/unstable/control delete mode 100644 packaging/Debian/unstable/control.smbwrapper delete mode 100644 packaging/Debian/unstable/copyright delete mode 100644 packaging/Debian/unstable/cron.daily delete mode 100644 packaging/Debian/unstable/docs delete mode 100644 packaging/Debian/unstable/init.d delete mode 100644 packaging/Debian/unstable/libpam-smbpass.files delete mode 100644 packaging/Debian/unstable/mksmbpasswd.8 delete mode 100644 packaging/Debian/unstable/mksmbpasswd.awk delete mode 100644 packaging/Debian/unstable/rules delete mode 100644 packaging/Debian/unstable/rules.old delete mode 100644 packaging/Debian/unstable/rules.smbwrapper delete mode 100644 packaging/Debian/unstable/samba-common.conffiles delete mode 100644 packaging/Debian/unstable/samba-common.files delete mode 100644 packaging/Debian/unstable/samba-common.postrm delete mode 100644 packaging/Debian/unstable/samba-doc.docs delete mode 100644 packaging/Debian/unstable/samba-doc.examples delete mode 100644 packaging/Debian/unstable/samba.conffiles delete mode 100644 packaging/Debian/unstable/samba.dirs delete mode 100644 packaging/Debian/unstable/samba.logrotate delete mode 100644 packaging/Debian/unstable/samba.pamd delete mode 100644 packaging/Debian/unstable/samba.postinst delete mode 100644 packaging/Debian/unstable/samba.postrm delete mode 100644 packaging/Debian/unstable/samba.preinst delete mode 100644 packaging/Debian/unstable/samba.prerm delete mode 100644 packaging/Debian/unstable/sambaconfig delete mode 100644 packaging/Debian/unstable/sambaconfig.8 delete mode 100644 packaging/Debian/unstable/smb.conf delete mode 100644 packaging/Debian/unstable/smbclient.files delete mode 100644 packaging/Debian/unstable/smbfs.files delete mode 100644 packaging/Debian/unstable/smbfs.suid delete mode 100644 packaging/Debian/unstable/smbwrapper.dirs delete mode 100644 packaging/Debian/unstable/smbwrapper.docs delete mode 100644 packaging/Debian/unstable/smbwrapper.files delete mode 100644 packaging/Debian/unstable/smbwrapper.substvars delete mode 100644 packaging/Debian/unstable/swat.dirs delete mode 100644 packaging/Debian/unstable/swat.docs delete mode 100644 packaging/Debian/unstable/swat.files delete mode 100644 packaging/Debian/unstable/swat.postinst delete mode 100644 packaging/Debian/unstable/swat.postrm delete mode 100644 packaging/Debian/unstable/wins2dns.awk diff --git a/packaging/Debian/README b/packaging/Debian/README index 8f87eeedfde..042499b46fa 100644 --- a/packaging/Debian/README +++ b/packaging/Debian/README @@ -2,21 +2,41 @@ Building Samba Packages for Debian GNU/Linux -------------------------------------------- If you want to build Samba packages for Debian and you just want to use -upstream sources, i.e. no patches from the official Samba Debian packages, -follow these instructions: +upstream sources, i.e. you don't want to wait for us to put official +packages out, or you want packages for a Debian version for which we +don't provide deb's, or you don't want to use official packages, or +you want to add --this-cool-switch to configure, or whatever, follow +these instructions: +0) Make sure you have the following packages installed: + debhelper + libpam0g-dev + libreadline4-dev + libcupsys2-dev + + the minimum Debian development stuff (dpkg-dev, libc6-dev, etc.) + Note: libcupsys2-dev is not available for Potato. It's safe + to not install it if you don't need CUPS support. 1) cd samba[-] -2) ln -s packaging/Debian/ debian +2) cp -a packaging/Debian/debian/ debian + It's important that you copy instead of symlink because the build + tools in Potato have a problem that prevents the build to work with + a symlink. 3) dch -i - - Edit the changelog and make sure the version is right. For example, - for Samba 2.2.2, the version number should be 2.2.2-0.1 (use - a number less than 1 like 0.1, 0.2, etc. so there is no conflict - with future upgrades to the official Debian packages.) -4) debian/rules binary + - Edit the changelog and make sure the version is right. For example, + for Samba 2.2.3, the version number should be 2.2.3-0.1 (use + a number less than 1 like 0.1, 0.2, etc. so there is no conflict + with future upgrades to the official Debian packages.) +4) Run 'debian/rules binary'. + - It is better that you prefix the above command with 'fakeroot'. + If you have problems you might try building as root. 5) That's it. Your new packages should be in ../. Install with dpkg. -Please e-mail Eloy Paris with comments and/or -suggestions. +Please e-mail samba@packages.debian.org with comments, question or +usggestions. Please talk to us and not to the Samba Team. They have +better things to do and know nothing about the Debian packaging system. -Eloy A. Paris Fri Oct 12 15:06:46 EDT 2001 +Eloy A. Paris +Steve Langasek + +Sat Feb 2 00:44:42 CET 2002 diff --git a/packaging/Debian/debian/README.build b/packaging/Debian/debian/README.build new file mode 100644 index 00000000000..0a11a1f6ea6 --- /dev/null +++ b/packaging/Debian/debian/README.build @@ -0,0 +1,397 @@ +From: Steve Langasek +To: "Eloy A. Paris" +Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) +Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 +In-Reply-To: <20010823100906.A1092@antenas> +Message-ID: +MIME-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII + +On Thu, 23 Aug 2001, Eloy A. Paris wrote: + +> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: + +> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, +> > cache) support into the package. Issues like this are frequent enough with +> > Samba, and the configure tests add enough time to the build process, that I +> > think there'd be much benefit in being able to step past a lot of these. + +> Uhhmmm... I don't know, I guess I don't like much the idea of +> maintaining a config.cache. It looks like extra work plus a +> compilation process that is "synthetic" or atificial. What happens if +> the Samba Team adds a new test, or modifies the configure script, will +> the config.cache pick those up? + +> In any case, you are the expert, so if you think that's the way to go, +> and the burden far exceeds the problems we have right now I say let's +> go for it. I am not well versed on autoconf and the configure process, +> that's all... + +Well, I'll attach my work to the bottom of this message and let you judge it +for yourself. + +The config.cache I'm trying to generate here is not equivalent to what +a configure script outputs. The only values I'm including are those which 1) +are no-brainers on any glibc-based platform, 2) are questions we need to force +a particular value for regardless of the kernel being built against, or 3) are +questions about specific bizarre features of proprietary Unices that we'll +always get an answer of 'no' to. + +I've removed all of the config.cache variables related to headers, or to +checks for particular libraries; I think it's pretty safe to assert that glibc +provides basic C functions like select(), setenv(), and waitpid() on all our +build targets, but I think it's less safe to assert that they'll always be +provided by particular header files. + +So the config.cache won't automatically be updated with answers to new +configure tests, but it also doesn't need to in order to be useful. There's +really only a handful of variables in there that we /need/ in order to +guarantee correctly-built packages, and if you want to leave out everything +else, that's perfectly ok too. Everything from the fifth stanza on down is +just a build-time speed-up for some of the slower architectures. Well, it +also has the fringe benefit that the packages will FAIL to build if someone +tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I +see that as a plus :), you may disagree, but in any case my next trick would +be to add a global variable developers can set to bypass the provided +config.cache. + + +It is a little artificial, but the whole point of .debs is to be able to build +binaries in a controlled environment. Right now, we don't really have control +over what happens in the autobuilders. We have even /less/ control over what +happens in a stable release: it's been two weeks now since I built binaries +for bug #94380, and they haven't been uploaded to security.d.o yet. I'm +guessing they won't be uploaded until Wichert is back from vacation, either -- +which is fine, but it would be nice if we didn't have to worry about +mis-builds by the security team, or about putting the security team to extra +trouble after the fact to get packages fixed. + +With a pre-loaded config.cache, we can ensure that bugs of this kind don't +happen in woody. We can take the arm autobuilder problem into our own hands, +and not have to worry about quirkiness in the build environment. We can even +close bug #109773, since we no longer have to worry about detecting the +setuid() routines. + + +So to me, it definitely seems worth it. But you're the maintainer, and I +won't ask you to put anything in the package that you're not comfortable with. + + +> By the way, I think I remember someone was able to build 2.2.x succesfully on +> the ARM. If this is the case, could it be that there's something weird +> with Phillip's setup? + +It could be. There are arm packages for 2.2.1a-1, so at /some/ point the +autobuilder was able to pass the locking test. + + +> P.S. How did you know about the ARM build problems? I don't see any +> bugs about this... + +, follow the links for samba... The +exact reference for the arm autobuilder is at +. + +Regards, +Steve Langasek +postmodern programmer + + +diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog +--- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 +@@ -1,3 +1,12 @@ ++samba (2.2.1a-4.1) unstable; urgency=low ++ ++ * Fix up the build system to avoid needing to run configure as root to ++ answer questions we already know the answers to. ++ * In the process, make surprising progress towards being able to ++ cross-compile the samba packages. ++ ++ -- Steve Langasek Wed, 22 Aug 2001 23:35:00 -0500 ++ + samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. +diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache +--- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,231 @@ ++# ++# 22 August 2001 Steve Langasek ++# ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++# ++# This config.cache file contains a list of acceptable autoconf ++# values which can be used in compiling Samba for Debian woody/sid. ++# ++# Autoconf sorts options alphabetically in its output. This file ++# groups options logically. ++ ++ ++# Load any architecture-specific settings ++if [ -n "$DEB_HOST_GNU_TYPE" \ ++ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then ++ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} ++fi ++ ++ ++# This is at the top because it's most in need of regular tweaking. ++# These are options which are supported on 2.4 kernels, but not on 2.2 ++# kernels. ++ ++samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} ++samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} ++samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} ++ ++ ++# These are present in 2.2 kernels, but not in 2.0... ++ ++samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} ++samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} ++ ++ ++# POSIX ACL support not present in Linux 2.2; not allowed in the ++# Debian packages, even if present on the build machine. ++ ++ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} ++ ++ ++# Various basic libc/compiler stuff that it's blindingly obvious that ++# Linux supports (now watch me get bitten for saying that) ++ ++ac_cv_c_const=${ac_cv_c_const=yes} ++ac_cv_c_inline=${ac_cv_c_inline=inline} ++samba_cv_volatile=${samba_cv_volatile=yes} ++ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} ++ac_cv_func_bzero=${ac_cv_func_bzero=yes} ++ac_cv_func_chmod=${ac_cv_func_chmod=yes} ++ac_cv_func_chown=${ac_cv_func_chown=yes} ++ac_cv_func_chroot=${ac_cv_func_chroot=yes} ++ac_cv_func_connect=${ac_cv_func_connect=yes} ++ac_cv_func_dup2=${ac_cv_func_dup2=yes} ++ac_cv_func_execl=${ac_cv_func_execl=yes} ++ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} ++ac_cv_func_fchown=${ac_cv_func_fchown=yes} ++ac_cv_func_fstat=${ac_cv_func_fstat=yes} ++ac_cv_func_fsync=${ac_cv_func_fsync=yes} ++ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} ++ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} ++ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} ++ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} ++ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} ++ac_cv_func_glob=${ac_cv_func_glob=yes} ++ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} ++ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} ++ac_cv_func_llseek=${ac_cv_func_llseek=yes} ++ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} ++ac_cv_func_memmove=${ac_cv_func_memmove=yes} ++ac_cv_func_memset=${ac_cv_func_memset=yes} ++ac_cv_func_mktime=${ac_cv_func_mktime=yes} ++ac_cv_func_pipe=${ac_cv_func_pipe=yes} ++ac_cv_func_poll=${ac_cv_func_poll=yes} ++ac_cv_func_pread=${ac_cv_func_pread=yes} ++ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} ++ac_cv_func_rand=${ac_cv_func_rand=yes} ++ac_cv_func_random=${ac_cv_func_random=yes} ++ac_cv_func_readlink=${ac_cv_func_readlink=yes} ++ac_cv_func_rename=${ac_cv_func_rename=yes} ++ac_cv_func_select=${ac_cv_func_select=yes} ++ac_cv_func_setenv=${ac_cv_func_setenv=yes} ++ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} ++ac_cv_func_setsid=${ac_cv_func_setsid=yes} ++ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} ++ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} ++ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} ++ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} ++ac_cv_func_srand=${ac_cv_func_srand=yes} ++ac_cv_func_srandom=${ac_cv_func_srandom=yes} ++ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} ++ac_cv_func_strchr=${ac_cv_func_strchr=yes} ++ac_cv_func_strdup=${ac_cv_func_strdup=yes} ++ac_cv_func_strerror=${ac_cv_func_strerror=yes} ++ac_cv_func_strftime=${ac_cv_func_strftime=yes} ++ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} ++ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} ++ac_cv_func_symlink=${ac_cv_func_symlink=yes} ++ac_cv_func_usleep=${ac_cv_func_usleep=yes} ++ac_cv_func_utime=${ac_cv_func_utime=yes} ++ac_cv_func_utimes=${ac_cv_func_utimes=yes} ++ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} ++ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} ++ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} ++ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} ++ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} ++ac_cv_type_size_t=${ac_cv_type_size_t=yes} ++ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} ++samba_cv_socklen_t=${samba_cv_socklen_t=yes} ++ ++# Yes, we know Linux supports fcntl locking. Just ignore ++# any errors caused by building on an NFS mount. ++samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} ++ ++ ++# smbwrapper doesn't work because the glibc maintainers don't want ++# to support transparent userland VFS. We might as well preempt ++# any checks for shadowed symbols that are only useful for smbwrapper. ++ ++ac_cv_func___acl=${ac_cv_func___acl=no} ++ac_cv_func__acl=${ac_cv_func__acl=no} ++ac_cv_func___chdir=${ac_cv_func___chdir=no} ++ac_cv_func__chdir=${ac_cv_func__chdir=no} ++ac_cv_func___close=${ac_cv_func___close=no} ++ac_cv_func__close=${ac_cv_func__close=no} ++ac_cv_func___closedir=${ac_cv_func___closedir=no} ++ac_cv_func__closedir=${ac_cv_func__closedir=no} ++ac_cv_func___dup=${ac_cv_func___dup=no} ++ac_cv_func__dup=${ac_cv_func__dup=no} ++ac_cv_func___dup2=${ac_cv_func___dup2=no} ++ac_cv_func__dup2=${ac_cv_func__dup2=no} ++ac_cv_func___facl=${ac_cv_func___facl=no} ++ac_cv_func__facl=${ac_cv_func__facl=no} ++ac_cv_func___fchdir=${ac_cv_func___fchdir=no} ++ac_cv_func__fchdir=${ac_cv_func__fchdir=no} ++ac_cv_func___fcntl=${ac_cv_func___fcntl=no} ++ac_cv_func__fcntl=${ac_cv_func__fcntl=no} ++ac_cv_func___fork=${ac_cv_func___fork=no} ++ac_cv_func__fork=${ac_cv_func__fork=no} ++ac_cv_func___fstat=${ac_cv_func___fstat=no} ++ac_cv_func__fstat=${ac_cv_func__fstat=no} ++ac_cv_func___fstat64=${ac_cv_func___fstat64=no} ++ac_cv_func__fstat64=${ac_cv_func__fstat64=no} ++ac_cv_func___fxstat=${ac_cv_func___fxstat=no} ++ac_cv_func___getcwd=${ac_cv_func___getcwd=no} ++ac_cv_func__getcwd=${ac_cv_func__getcwd=no} ++ac_cv_func___getdents=${ac_cv_func___getdents=no} ++ac_cv_func__getdents=${ac_cv_func__getdents=no} ++ac_cv_func___llseek=${ac_cv_func___llseek=no} ++ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} ++ac_cv_func__llseek=${ac_cv_func__llseek=no} ++ac_cv_func___lseek=${ac_cv_func___lseek=no} ++ac_cv_func__lseek=${ac_cv_func__lseek=no} ++ac_cv_func___lstat=${ac_cv_func___lstat=no} ++ac_cv_func__lstat=${ac_cv_func__lstat=no} ++ac_cv_func___lstat64=${ac_cv_func___lstat64=no} ++ac_cv_func__lstat64=${ac_cv_func__lstat64=no} ++ac_cv_func___lxstat=${ac_cv_func___lxstat=no} ++ac_cv_func___open=${ac_cv_func___open=no} ++ac_cv_func__open=${ac_cv_func__open=no} ++ac_cv_func___open64=${ac_cv_func___open64=no} ++ac_cv_func__open64=${ac_cv_func__open64=no} ++ac_cv_func___opendir=${ac_cv_func___opendir=no} ++ac_cv_func__opendir=${ac_cv_func__opendir=no} ++ac_cv_func___pread=${ac_cv_func___pread=no} ++ac_cv_func__pread=${ac_cv_func__pread=no} ++ac_cv_func___pread64=${ac_cv_func___pread64=no} ++ac_cv_func__pread64=${ac_cv_func__pread64=no} ++ac_cv_func___pwrite=${ac_cv_func___pwrite=no} ++ac_cv_func__pwrite=${ac_cv_func__pwrite=no} ++ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} ++ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} ++ac_cv_func___read=${ac_cv_func___read=no} ++ac_cv_func__read=${ac_cv_func__read=no} ++ac_cv_func___readdir=${ac_cv_func___readdir=no} ++ac_cv_func__readdir=${ac_cv_func__readdir=no} ++ac_cv_func___readdir64=${ac_cv_func___readdir64=no} ++ac_cv_func__readdir64=${ac_cv_func__readdir64=no} ++ac_cv_func___seekdir=${ac_cv_func___seekdir=no} ++ac_cv_func__seekdir=${ac_cv_func__seekdir=no} ++ac_cv_func___stat=${ac_cv_func___stat=no} ++ac_cv_func__stat=${ac_cv_func__stat=no} ++ac_cv_func___stat64=${ac_cv_func___stat64=no} ++ac_cv_func__stat64=${ac_cv_func__stat64=no} ++ac_cv_func___telldir=${ac_cv_func___telldir=no} ++ac_cv_func__telldir=${ac_cv_func__telldir=no} ++ac_cv_func___write=${ac_cv_func___write=no} ++ac_cv_func__write=${ac_cv_func__write=no} ++ac_cv_func___xstat=${ac_cv_func___xstat=no} ++ ++ ++ ++# Miscellaneous stuff that isn't, and shouldn't be, available ++# in Debian. Those interested in building debs for other systems may ++# need to remove some of these defines. ++ ++ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} ++ac_cv_func_crypt16=${ac_cv_func_crypt16=no} ++ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} ++ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} ++ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} ++ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} ++ac_cv_func_rdchk=${ac_cv_func_rdchk=no} ++ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} ++ac_cv_func_setgidx=${ac_cv_func_setgidx=no} ++ac_cv_func_setluid=${ac_cv_func_setluid=no} ++ac_cv_func_setpriv=${ac_cv_func_setpriv=no} ++ac_cv_func_setuidx=${ac_cv_func_setuidx=no} ++ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} ++ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} ++ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} ++ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} ++ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} ++ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} ++ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} ++ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} ++ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} ++ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} +diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux +--- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,12 @@ ++# 22 Aug 2001 Steve Langasek ++ ++# This file contains autoconf settings specific to the alpha-linux ++# platform that should be preloaded when building for this architecture. ++ ++ ++# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but ++# Linux 2.4 does. Ensure that packages compiled for woody remain ++# compatible with 2.2 kernels, even if the build machine is running 2.4. ++samba_cv_have_setresgid=${samba_cv_have_setresgid=no} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} ++samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules +--- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 +@@ -15,6 +15,14 @@ + # This has to be exported to make some magic below work. + export DH_OPTIONS + ++# Set the host and build architectures for use with config.cache loading, ++# cross-building, etc. ++DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++export DEB_HOST_GNU_TYPE ++export DEB_BUILD_GNU_TYPE ++ + BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + + DESTDIR=`pwd`/debian/samba +@@ -48,8 +56,11 @@ + # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ + # --localstatedir=/var + ++ if [ -f debian/config.cache ]; then \ ++ cp -f debian/config.cache source/config.cache; \ ++ fi + # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) +- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) ++ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) + + touch configure-stamp + diff --git a/packaging/Debian/debian/README.debian b/packaging/Debian/debian/README.debian new file mode 100644 index 00000000000..82be3f4df4a --- /dev/null +++ b/packaging/Debian/debian/README.debian @@ -0,0 +1,71 @@ +Samba for Debian +---------------- + +This package was built by Eloy Paris and Steve +Langasek , current maintainers of the Samba packages +for Debian, based on work from Bruce Perens , Andrew +Howell , Klee Dienes and Michael +Meskes , all previous maintainers of the packages +samba and sambades (now merged together - see below). + +As of Samba 2.0.6-1, the Debian version of Samba is compiled with +Pluggable Authentication Modules (PAM) support. PAM support was +discontinued during the libc5 -> libc6 migration process and I never +brought it back until 2.0.6-1. + +The smbfs package does not support the 2.0.x Linux kernels anymore. +This has been the case since the very first packages of the CVS sources +that eventually became Samba 2.2. To use the smbfs package you need to +run a 2.2.x kernel or later. + +Starting with the Debian packages for Samba 2.2, the Samba log files (for +nmbd and smbd) have been moved to a new location: /var/log/samba/. The +files also have new names: log.nmbd and log.smbd. The old files +(/var/log/{nmb,smb} were moved to the new location. + +As of Samba 2.2.2-11, the Samba sources produce the following binary +packages: + +samba: A LanManager like file and printer server for Unix. +samba-common: Samba common files used by both the server and the client. +smbclient: A LanManager like simple client for Unix. +swat: Samba Web Administration Tool +samba-doc: Samba documentation. +smbfs: Mount and umount commands for the smbfs (works with 2.2.x and + above kernels, not with 2.0.x kernels.) +libpam-smbpass: pluggable authentication module for SMB password + database. +libsmbclient: Shared library that allows applications to talk to SMB servers. +libsmbclient-dev: libsmbclient shared libraries. + + +Please note that the package smbwrapper (a shared library that provides +SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 +does not exist any more. The reason is that starting with Samba 2.0.6-1, that +code does not even compile, and the upstream author (Andrew Tridgell) +recommended to disable the compilation of smbwrapper until some issues +with glibc2.1 get cleared out (the problem is with glibc, not with Samba +itself). + +Support for NT Domains +---------------------- + +Samba 2.2 includes preliminary support for NT domains. A Samba server +can now be part of a Windows NT domain whose Primary Domain Controller +is a Windows NT server. This feature is supposed to be stable although I +haven't tried it myself. Read the documentation in the samba-doc package +for help on how to do this (hint: "security = domain" in the smb.conf +file). + +Samba 2.2 has also experimental support for Primary Domain +Controller. This means that a Samba server can act now as a PDC. There +are no special flags needed to compile Samba with NT domain PDC +support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation +section). + +Please note that NT domain PDC support is far from complete and is still +experimental. + +Eloy A. Paris +Steve Langasek +January 14, 2002 diff --git a/packaging/Debian/debian/TODO b/packaging/Debian/debian/TODO new file mode 100644 index 00000000000..95bcd64e2bc --- /dev/null +++ b/packaging/Debian/debian/TODO @@ -0,0 +1,10 @@ +In no particular order: + +- New packages for winbind stuff. +- Fix stuff in packaging/Debian/ (add infrastructure for stable + builds) +- Compile with LDAP support. +- Finish debconf support. +- Test debconf support. +- Review /etc/init.d/samba (Brian White reports problems, should add + --oknodo to start-stop-daemon) diff --git a/packaging/Debian/debian/changelog b/packaging/Debian/debian/changelog new file mode 100644 index 00000000000..93bb6d4f042 --- /dev/null +++ b/packaging/Debian/debian/changelog @@ -0,0 +1,1559 @@ +samba (2.2.2.cvs20020201-1) unstable; urgency=low + + * Getting ready for Samba 2.2.3. + * Using a poor's man build system to keep our patches to upstream + under the debian/ directory. + + -- Eloy A. Paris Fri, 1 Feb 2002 16:10:58 -0500 + +samba (2.2.2-12) unstable; urgency=high + + * (Steve) Patch for source/client/client.c. + Closes: #86438 smbclient: Transfering several GB causes the average + speed to be messed up. + * Uploading with urgency=high to expedite the move from unstable + to testing because of the security problem fixed in -11. + + -- Eloy A. Paris Fri, 25 Jan 2002 22:31:12 -0500 + +samba (2.2.2-11) unstable; urgency=low + + * Building with --with-libsmbclient. We have created two new + packages: libsmbclient and libsmbclient-dev. Hopefully this + will help some people that want to add the capability of + speaking SMB to their applications. + Closes: #117132 - libsmbclient support library? + * (Steve) Make swat do the right thing when reading (parsing) + the saved preferences in smb.conf. + Closes: #55617 swat mutilates the linpopup message command. + * Updated README.Debian. Updated descriptions in debian/control. + * Remembered to bump up version number in source/include/version.h + (need to automate this or else I'll keep forgetting.) + * (Steve) one liner for source/web/diagnose.c. + Closes: #106976 - smbd/nmbd not running message with swat/linuxconf. + * Added '|| true' to the post-rotate script so logrotate doesn't + fail if either nmbd or smbd is not running. + Closes: #127897 - /etc/logrotate.d/samba fails if there is no smbd process. + * Fixed incorrect file locations in swat's man page and added a + Debian-specific note to /usr/share/doc/swat/README. + Closes: #71586 swat: needs documentation fixes for debian. + * smbmount in the smbfs package does not have the setuid bit set. + Apparently, smbmount uses libsmb without checking the environment. + Thanks to Christian Jaeger for + finding the local root exploit. + * Applied old patch from Jerry) Carter" to correct + the following two problems in Samba 2.2.2: + - %U and %G could not be used in services names + in smb.conf. + - %G would fail to be expanded in an "include = ..." + line. + + -- Eloy A. Paris Sat, 19 Jan 2002 21:35:26 -0500 + +samba (2.2.2-10) unstable; urgency=low + + * (Steve) Add missing manual pages. + Closes: Bug#128928: missing manpages in smbfs. + + -- Eloy A. Paris Sun, 13 Jan 2002 14:39:55 -0500 + +samba (2.2.2-9) unstable; urgency=low + + * (Steve) Fix broken URL's in HTML docs. + Closes: Bug#17741: bad links in html docs (at last!!!) + + -- Eloy A. Paris Fri, 11 Jan 2002 13:37:07 -0500 + +samba (2.2.2-8) unstable; urgency=low + + * Added "Replaces: samba (<= 2.2.2-5)" to the smbclient section in + debian/control so rpcclient.1, which was in samba-2.2.2-5, does not + cause problems now that it is part of smbclient (>= 2.2.2-6). Closes: + Closes: Bug#128684: error upgrading smbclient in sid. + + -- Eloy A. Paris Fri, 11 Jan 2002 11:42:40 -0500 + +samba (2.2.2-7) unstable; urgency=low + + * (Steve) Patch to make behavior honor what the docs. say about "hosts allow" + taking precedence over "hosts deny". + Closes: Bug#49249: swat: error with host deny ?! + + -- Eloy A. Paris Thu, 10 Jan 2002 12:36:58 -0500 + +samba (2.2.2-6) unstable; urgency=low + + * (Steve) Adds manpage for rpcclient to the proper file, + removes smbtorture from the distro because this tool isn't intended for + widespread consumption. + Closes: #63057 - no manual page for smbtorture. + * (Steve) Removed -gnu from the configure arguments (--build, --host) in + debian/rules so config.sub is able to properly create the host and target + tuples. + + -- Eloy A. Paris Wed, 9 Jan 2002 14:39:51 -0500 + +samba (2.2.2-5) unstable; urgency=low + + * Fixes from vorlon: + * Use /usr/bin/pager instead of more. + Closes: #125603: smbclient violates pager policy. + * Make /etc/logrotate.d/samba a conffile, send smbd and nmbd + a SIGHUP to have the log files reopened, fixes to + /etc/logrotate.d/samba. + Closes: #127897: log file rotation. + Closes: #118277: /etc/logrotate.d/samba not listed in conffiles. + * s/covert/convert/. + Closes: #121653 probable typo in install message. + + -- Eloy A. Paris Sun, 6 Jan 2002 03:14:58 -0500 + +samba (2.2.2-4) unstable; urgency=low + + * Applied patch from Steve to work around problem in glibc that affects the + HPPA architecure. The patch detects the error condition at configure time + and compiles without LFS support if necessary. + Closes: Bug#126763: samba completely broken on hppa. + * Including unicode_map.1251. + Closes: Bug#126719: samba-common: unicode_map.1251 missing. + * Updated smbd daemon version to match Debian package version. + Closes: Bug#127199: Package version and smbd daemon version don't match. + + -- Eloy A. Paris Mon, 31 Dec 2001 14:32:47 -0500 + +samba (2.2.2-3) unstable; urgency=low + + * Added some spaces in package description in debian/control. + Closes: #120730 - missing spaces in package description for nice + alignment. + * Spelling fixes. + Closes: #125328, #125329, #125330, #125367, #125365, #125403. + * Steve Langasek is the co-maintainer of the Debian + Samba packages!!! Added him to the uploaders field in debian/control. + + -- Eloy A. Paris Tue, 18 Dec 2001 00:54:25 -0500 + +samba (2.2.2-2) unstable; urgency=low + + * Backed out changes to source/filename.c per Andrew Tridgell's request. + This changes were introduced in 2.2.1a-7 as an attempt to fix #47493. + Tridge found out that they break smbd. + * Changed version number in source/includes/version.h so it is clear that + this is a version of Samba packaged for Debian. This is another request from + Tridge and will help the Samba Team to get bogus bug reports. + * Added Samba-HOWTO-Collection.pdf and other README files to the + /usr/share/doc// directories. + * Installing libnss_winbind.so and pam_winbind.so. + Closes: #116790: nss and pam modules for winbind missing. + * Removed user-emacs-settings from changelog. + + -- Eloy A. Paris Mon, 29 Oct 2001 19:16:26 -0500 + +samba (2.2.2-1) unstable; urgency=low + + * New upstream version. + * Temporary fix for #113763 (Steve Langasek) + * Quick hack to avoid smbmount reveal password length. Please note + that even with this hack there is a small window when password is + completely visible with 'ps aux'. There are other methods that should + be used to automate mounting of SMB shares. + Closes: #112195: smbmount-2.2.x reveals password length. + * Applied patch from Steve Langasek to prevent + forcing use of setresuid() in Sparc. + Closes: #112779: samba build forces use of setresuid, which causes + smbd to fail on Sparc. + + -- Eloy A. Paris Mon, 15 Oct 2001 10:26:10 -0400 + +samba (2.2.1a-9) unstable; urgency=low + + * Replaced $(LD) with $(CC) all the way through source/Makefile. + Closes: #111036: ld shouldn't be used to link shlibs. + * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and + sgml as well.) + Closes: #110963: smb.conf: mail should be /usr/bin/mail. + * Documented better smbclient's -W behavior. Patch from Steve + Langasek. + Closes: #53672: smbclient: -W flag is interpreted as domain, not + workgroup. + + -- Eloy A. Paris Tue, 4 Sep 2001 23:10:41 -0400 + +samba (2.2.1a-8) unstable; urgency=low + + * Set some reasonable default perms for the samba logdir (again, + thanks to vorlon :-) + Closes: #72529: insecure permissions on log files. + + -- Eloy A. Paris Sun, 26 Aug 2001 15:40:47 -0400 + +samba (2.2.1a-7) unstable; urgency=low + + * Another attempt at fixing #47493. Patch from Steve Langasek + . Let's keep our fingers crossed Steve! + + -- Eloy A. Paris Sun, 26 Aug 2001 13:37:06 -0400 + +samba (2.2.1a-6) unstable; urgency=low + + * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing + smbd to die with signal 11 under some unidentified situations. + Closes: #109774: Latest debian version breaks printer driver download. + Closes: #109946: not all files appear in samba-exported directories. + * Another patch from Steve Langasek. This one adds quotes around + printer names for print systems it's reasonable for Debian to + support. Together with the patch in #29957 (see changelog for + 2.2.1a-4), this should take care of the problems with multi-word + printer names in Samba. + + -- Eloy A. Paris Fri, 24 Aug 2001 21:12:27 -0400 + +samba (2.2.1a-5) unstable; urgency=low + + * Important changes that affect how Samba is built on Debian + machines are implemented in this release. All of this changes + were suggested by the energetic Steve Langasek , + and his arguments were so sound and reasonable that I decided + to implement them. Here's Steve's original changelog: + + * Fix up the build system to avoid needing to run configure + as root to answer questions we already know the answers to. + * In the process, make surprising progress towards being able to + cross-compile the samba packages. + + -- Eloy A. Paris Fri, 24 Aug 2001 01:08:06 -0400 + +samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. + Closes: #109317: smbfs: mistype in smbmount manpage. + * Included symlink to smbspool to better support CUPS printing. + Closes: #109509: include symlink for cups samba support. + * Applied patch from Steve Langasek to + fix bug #29957. + Closes: #29957: samba strips trailing " from strings in smb.conf. + * First attempt at fixing #47493. Another patch from Steve "I want + a bug-free Samba" Langasek. + Closes: #47493: Samba doesn't handle ':' in dir names right. + + -- Eloy A. Paris Tue, 21 Aug 2001 23:26:38 -0400 + +samba (2.2.1a-3) unstable; urgency=low + + * Steve Langasek has been hard at work in + the last few days looking at the long list of open bugs filed + against the Samba packages. I don't know how to thank him. It's been + a pleasure working with Steve, and all the fixes, patches, etc. in + this release come from him. The bug list is greatly reduced thanks + to Steve's efforts. + * Steve's additions/modifications/patches/etc. are: + - New package that (libpam-smbpass) provides pam_smbpass. Before, this + was provided in another package but now the sources are part of + the Samba sources so we can start providing it from here. + Closes: #107043 - pam_smbpass now present in Samba source, + should be built from there + - Patch to source/smbd/service.c that allows admins to call + /bin/umount from the root postexec of a Samba share. + Closes: #40561 - samba pre/postexec commands do not work. + - Clear TMPDIR before starting smbd in /etc/init.d/samba. + Closes: #51295 - Problems with Samba and TMPDIR. + - Correction to documentation of "guest only". + Closes #38282 - "guest only" share still requires a password. + * Applied patch from Santiago Vila to convert + /usr/sbin/mksmbpasswd from a shell script into a real awk script. + Sorry it took so long, Santiago; I hadn't realized you even + provided a patch :-) + Closes: #77891 - mksmbpasswd could be a real awk script. + * Updated description of the smbfs and smbclient packages. Also have + each package recommend the other. + Closes: #108650: Should suggest or recommend smbfs. + + -- Eloy A. Paris Mon, 13 Aug 2001 22:21:55 -0400 + +samba (2.2.1a-2) unstable; urgency=low + + * Build-depends: depend on debhelper (>=2.0.103). + Closes: #105795: Build-Depends are wrong. + * Run samba's preinst and postinst scripts without -e so failed commands + do not abort installation. + Closes: #106384: postinstall crashes abnormally. (And really closes + #104471.) + + -- Eloy A. Paris Thu, 26 Jul 2001 00:30:37 -0400 + +samba (2.2.1a-1) unstable; urgency=low + + * New upstream version. + * Make sure samba's postinst script exits with a zero status. + Closes: #104471: Samba postinst problem. + + -- Eloy A. Paris Thu, 12 Jul 2001 21:55:21 -0400 + +samba (2.2.1-1) unstable; urgency=low + + * New upstream version. + Closes: #103339: config.guess and config.sub update required. + Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to + incompatibility with PAM. + Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. + Closes: #95777: Samba 2.2 is unable to join or authenticate against + Samba 2.2 PDC domain. + Closes: #68842: samba should use PAM for password changing (I + haven't personally tried this one, but it's been + advertised this works.) + Closes: #102506: PAM account checking fails. + Closes: #102518: Complains about unknown paramter "obey pam + restrictions" + Closes: #94774: Build failure on PARISC machines. + * Moved away from /etc/cron.weekly/samba for log file rotation. + Now using logrotate. + Closes: #95548: typo in /etc/cron.weekly/samba. + Closes: #74951: nmbd does not rename its log file. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris Wed, 11 Jul 2001 00:44:14 -0400 + +samba (2.2.0.final.a-1) unstable; urgency=high + + * New upstream version (contains security fix from DSA-065-1.) + Closes: #97241: samba 2.2.0 fails to process hostnames in + "hosts allow" config line. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris Sun, 24 Jun 2001 11:11:59 -0400 + +samba (2.2.0.final-2) unstable; urgency=low + + * Added libcupsys2-dev to Build-Depends. + * Samba depends now (again) on netbase so update-inetd is always + available for the Samba maintainer scripts. + Closes: #86063: Fails to uninstall if inetd is not installed. + * Updated source/config.{sub,guess} so ARM built doesn't fail. + Closes: #94480: config.sub out of date; can't build on arm. + Closes: #85801: config.sub/guess out of date. + * Not using brace expansion, i.e. {foo,bar} in any of the maintainers + scripts nor in debian/rules. + Closes: #88007: samba postrm has is not POSIX sh compliant. + + -- Eloy A. Paris Sat, 21 Apr 2001 17:27:18 -0400 + +samba (2.2.0.final-1) unstable; urgency=low + + * New upstream release. Lots of new things. See WHATSNEW.txt. + * Goofy version number because of my stupidity when assigning version + numbers to the CVS packages I have been uploading to experimental. + Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release + will follow soon. + + -- Eloy A. Paris Tue, 17 Apr 2001 22:58:14 -0400 + +samba (2.2.0.cvs20010416-1) experimental; urgency=low + + * CVS update. + + -- Eloy A. Paris Mon, 16 Apr 2001 21:25:15 -0400 + +samba (2.2.0.cvs20010410-1) experimental; urgency=low + + * CVS update. + * Added libreadline4-dev to Build-Depends. + + -- Eloy A. Paris Tue, 10 Apr 2001 16:53:45 -0400 + +samba (2.2.0.cvs20010407-1) experimental; urgency=low + + * CVS update. Includes what is in 2.2.0alpha3. + + -- Eloy A. Paris Sat, 7 Apr 2001 16:00:33 -0400 + +samba (2.2.0.cvs20010316-1) experimental; urgency=low + + * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch + from Samba CVS. + * Not compiling rpctorture as it has compile errors. Change in + debian/rules. + * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now + the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is + needed to use smbfs. Updated debian/control, debian/rules and + README.Debian to reflect this change. + * Added to swat a versioned dependency on samba (so a user is forced to + install a new version of swat each time a new version of samba is + installed.) + + -- Eloy A. Paris Sun, 18 Mar 2001 14:21:14 -0500 + +samba (2.0.7-5) unstable; urgency=medium + + * Transition from suidmanager to dpkg-statoverride. + + -- Eloy A. Paris Thu, 18 Jan 2001 23:51:56 -0500 + +samba (2.0.7-4) unstable; urgency=medium + + * Applied Urban Widmark fixes to smbmount. Urban + is the maintainer of the smbfs in the kernel and of the userland + utilities. + * Links to HTML documents are correct now. + Closes: #69439: swat: Broken help file symlinks + Closes: #72615: samba-doc directory changed: removed htmldocs from path + Closes: #75847: swat: Wrong symlink + Closes: #66857: Wrong links to html documents. + Closes: #77912: misplaced documentation symlinks for swat + * Building Samba with CUPS support. For this I reverted the change to + source/configure.in that I did in 2.0.7-3 and re-ran autoconf. + Closes: #59038: samba: not compiled with cups support. + * Fix against previous known/unknown user time difference patch to swat + (make username / password lookups take the same time.) Remove CGI + logging code in Swat. + Closes: #76341 - Security holes in swat + * Updated Build-depends. + * Updated debian/copyright to refer to the correct location of the GPL. + * debian/rules: changed DESTDIR to `pwd`/debian/samba (was + `pwd`/debian/tmp.) + * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some + strange reason dh_installdirs is not creating debian/tmp/ so I needed + to tweak everything to install stuff in debian/samba rather than in + debian/tmp.) + * debian/control: changed section of samba-docs to 'doc' (was 'docs') + * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules + and source/scripts/installswat.sh.) + * Fixed (by tweaking debian/rules) + /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. + * Added "Provides: samba-client" to smbclient's section in control. + Closes: #71143: smbclient: Smbclient should provide samba-client. + * Fix for desired_access being zero in map_share_mode() (patch to + source/smbd/nttrans.c.) Thanks to Gary Wilson + for bringing this patch to my + attention. + * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and + 2.2.x kernels even when the build is done in a system running + a 2.2.x kernel. + Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but + doesnt depend on it. + Closes: #72758: README.Debian should comment on 2.0.x kernels. + Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. + Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. + Closes: #60580: samba: failed to set gid. + Closes: #64280: Samba panics, can't set gid. + Closes: #66816: Must deal with brokenness under 2.0.x. + Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. + Closes: #69735: PANIC: failed to set gid + Closes: #66122: "smbclient -L localhost -U%" returns with "tree + connect failed: code 0". + Closes: #57637: Samba says tree connect error. + Closes: #58015: potato samba wins support is broken. + * Fixed comments in sample smb.conf to point to the correct location. + Closes: #69578: comments in smb.conf points to wrong path. + * Move codepages from /etc/samba/codepages/ to + /usr/share/samba/codepages/. + Closes: #63813: samba; codepages should go in /usr/lib. + * Moved /var/samba/ to /var/state/samba/. + Closes: #49011: samba package not FHS compliant. + * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() + is found. + Closes: #44558: netgroup support missing in samba 2.0.5a-1. + * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and + --exec. Got rid of --exec so --pidfile works. + + -- Eloy A. Paris Thu, 11 Jan 2001 00:15:57 -0500 + +samba (2.0.7-3) frozen unstable; urgency=high + + * Release manager: this closes a RC bug. + * Commented out the section in source/configure.in that auto-detects + CUPS support and then ran autoconf to generate a new configure + script. This was done to prevent machines that have libcupsys-dev + installed from detecting CUPS support and adding an unwanted + dependency on libcupsys. This way the whole printing system + won't break on upgrades. CUPS support should be added after + Potato is released. + Closes: #65185: samba-common: Upgrading removes printing system. + Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. + * Updated README.debian. + Closes: #64594: Old README.Debian in /usr/share/doc/samba. + + -- Eloy A. Paris Tue, 20 Jun 2000 19:16:04 -0400 + +samba (2.0.7-2) frozen unstable; urgency=high + + * Release manager: this closes RC bug #63839 that prevents Samba + to be built from source. + * Fixed a stupid typo in debian/rules that was preventing Samba + to be built from source. + Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) + * I forgot to mention that O'Reilly's book "Using Samba" was donated + to the Open Source community. The book was included in Samba 2.0.7 + in HTML format and is part of the Debian Samba package since + Samba 2.0.7-1. + * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help + files were supposed to be provided in both the swat and the samba-doc + packages. This duplication was a waste of space. Starting with + Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML + files are included only in samba-doc, and are accessed via symlinks + from within swat. + Closes: #58810: superfluous files in swat? + * Added a 'echo "."' to /etc/init.d/samba in the reload) section. + Closes: #63394: "echo ." missing in reload section of init.d script + * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. + Closes: #64344: typo "encrypted passwords" + * Cleaned up samba's postrm script so important common files aren't + deleted when samba is purged. Created a samba-common.postrm script. + Closes: #62675: purging samba removes /etc/samba/smb.conf. + Closes: #63386: samba --purge removes /etc/samba dir even though + smbclient/smbfs/samba-common packages are still installed + + -- Eloy A. Paris Wed, 3 May 2000 02:42:07 -0400 + +samba (2.0.7-1) frozen unstable; urgency=low + + * New upstream version. Dear Release Manager: please allow this + package to go to frozen as it contains fixes to a _lot_ of problems. + You can take a look at all the problems fixed by this release in + the official upstream announcement at + http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. + * Added --with-utmp to add utmp support to smbd (this is new in Samba + 2.0.7) + * Closes: #62148 - samba not rotating filled logs. + * Closes: #56711: Samba doesn't manage well long share name (please note + that it's possible to connect to shares with names longer than + 14 characters but the share will be listed with a name truncated to + 13 characters.) + * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). + Closes: #50907 - logon path not working. + This is not a bug, it's just Samba doing the same thing an NT server + does. See WHATSNEW.txt and smb.conf's man page for details. + * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper + is not supported anymore.) + * Closes: #58994 swat: typo in swat description. + * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware + problems, person that reported the bug never came back.) + Closes: #54398 - smbadduser fails, looks for ypcat. + * Fixed swat's man page to include Debian specific installation + instructions. There's not necessary to edit /etc/services or + /etc/inetd.conf. + (Closes: #58616 - incomplete install config && incorrect installation + instructions.) + * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat + to look for smbd and nmbd in the wrong place when requested to start or + stop smbd or nmbd. + (Closes: #55028 - swat can't start samba servers.) + * Closes: #37274: smbclient does not honour pot. (Tested and seems to be + working now.) + * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, + #50479, #39818, #54383, #59411. + (please re-open any of this if the problem still exists - I was unable + to confirm any of this because I could never reproduce them.) + Closes: #56699 - Samba's nmbd causes random kernel oops several + times in a row. + Closes: #62185 - nmbd's forking until no more file descriptors are + available. + Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. + Closes: #52218 - Either wins proxy does not work, or I don't understand + it. + Closes: #43492 - intermittent problem changing password. + Closes: #50479 - Can't access windows 2000 shares with samba. + Closes: #39818 - samba-common: Upgrading Samba from the Slink version. + Closes: #54383 - samba-common: Missing /etc/smb.conf. + Closes: #59411 - smbclient: cannot browse Win2k shares. + + -- Eloy A. Paris Thu, 27 Apr 2000 16:07:45 -0400 + +samba (2.0.6-5) frozen unstable; urgency=low + + * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries + in this package are broken unless libcupsys1 is installed. + samba-common has a "grave" bug because of this. Instead of adding + libcupsys1 to the Depends: list of each package in debian/control + I investigated why dh_shlibs was not picking the dependency + automatically. It turns out that it's probably a bug in libcupsys1 + because the format of its shlibs file is not correct. I fixed that + file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are + picked correctly. I'll talk to the libcupsys1 maintainer. + + I think the addition of CUPS support to Samba is a big change that + should not go into Frozen. So, I decided to back up the addition + of CUPS support I did in 2.0.6-4 to minimize problems. I'll add + CUPS support again when I start working on Samba for Woody. + (Closes: #59337 - samba-common has a missing dependency) + + -- Eloy A. Paris Wed, 1 Mar 2000 08:40:02 -0500 + +samba (2.0.6-4) frozen unstable; urgency=low + + * It seems that sometimes nmbd or smbd are not killed when upgrading. + I think it is because in samba's prerm script I was calling + start-stop-daemon with the --pidfile switch and in old versions of + Samba the nmbd and smbd daemons did not store their PIDs in a file in + /var/samba/. I changed debian/samba.prerm so the existence of the + PID files is checked before calling "start-stop-daemon --pidfile ..." + If the PID files do not exist then start-stop-daemon is called + without the --pidfile parameter. + (Closes: #58058 - upgrade from slink went badly) + * Fixed typo in description of swat package in debian/control. + * Installed libcupsys1-dev so the configure script picks up CUPS + and Samba is compiled with CUPS support. Also added libcupsys1 to + the Depends: list of package samba in debian/control. + (Closes: #59038 - samba not compiled with cups support) + * Added a small paragraph to debian/README.debian warning about possible + problems with the WINS code in Samba 2.0.6. + + -- Eloy A. Paris Mon, 28 Feb 2000 14:00:42 -0500 + +samba (2.0.6-3) frozen unstable; urgency=low + + * Applied patch posted by Jeremy Allison to the samba mailing list + that should take care of the internal errors reported in bug #52698 + (release-critical). Wichert: please test as I never could reproduce + it here. + (Closes: #52698 - samba gets interbal errors) + * Moved samba-docs to the 'docs' section. + (Closes: #51077 - samba-doc: wrong section) + * Added reload capability to /etc/init.d/samba (only for smbd because + nmbd does not support reloading after receiving a signal). + (Closes: #50954 - patch to add reload support to /etc/init.d/samba) + * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so + Unix password syncronization works with the passwd program currently + in Potato. Thanks to Augustin Luton for + the correct chat script. + * Stole source/lib/util_sec.c from the CVS tree of what will become + Samba 2.0.7 or whatever so we can use the same binaries under + both 2.0.x and 2.2.x kernels. + (Closes: #51331 - PANIC: failed to set gid) + * smbadduser is now provided as an example and it's customized for Debian. + I am not providing this script in /usr/sbin/ because then I would need + a dependency on csh, something that I don't want to do. + (Closes: #51697, #54052) + * Fixed the short description of the smbfs package in debian/control. + (Closes: 53534 - one-line description out of date). + + -- Eloy A. Paris Tue, 23 Nov 1999 16:32:12 -0500 + +samba (2.0.6-2) unstable; urgency=low + + * samba-common now depends on libpam-modules (not on libpam-pwdb, which + I have been told is obsolete). I modified /etc/pam.d/samba accordingly + to reflect the change. + (Closes: Bug#50722: pam pwdb dependence?). + * The old /etc/pam.d/samba file which had references to pam_pwdb caused + smbd to die with a signal 11. The new /etc/pam.d/samba file fixes + this problem. + (Closes: #50876, #50838, #50698) + * Compiled with syslog support (use at your own risk: syslog support + is still experimental in Samba). I added the parameters "syslog = 0" + and "syslog only = no" to the sample smb.conf to avoid pestering + users that do not want Samba to log through syslog. + (Closes: Bug#50703 - syslog only option doesn't work) + * Removed the stupid code in the smbmount wrapper script that tries + to load the smbfs module if smbfs is not listed in /proc/filesystems. + (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled + as a module in the kernel) + * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so + 'mount -t smb ...' works just as 'mount -t smbfs ...'. + (Closes: Bug#50763 - 'mount -t smb' doesn't work) + + -- Eloy A. Paris Sat, 20 Nov 1999 18:53:35 -0500 + +samba (2.0.6-1) unstable; urgency=low + + * Samba 2.0.6 has been released. This is the first try of the Debian + Samba packages. I know for sure that smbd won't work properly on + 2.0.x kernels because the patch that Wichert sent me does not apply + to the new source/lib/util_sec.c in Samba 2.0.6. That file was + completely re-written by Tridge. + * Updated README.Debian. + * A new client utility called smbspool appeared in Samba 2.0.6. I added + this utility to the smbclient package, although I haven't tried it yet. + * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. + This is to be able to type "mouont -t smbfs ...". This symlink goes + in the smbfs package, of course. + * This new release should close the following bugs (some of these + are fixed for sure in this new upstream release, some others I could + not reproduce but I believe they are fixed if they were real bugs. + As always, please feel free to re-open the bugs if the problem is not + solved). + Closes: Bug#33240: icmp mask needs a bug workaround. + Closes: Bug#37692: samba: Has problems detecting interfaces. + Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. + Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast + properly. + Closes: Bug#44131: smbfs: no longer possible to set file and + directory-modes. + Closes: Bug#46992: smbmount-2.2.x manpage wrong. + Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. + Closes: Bug#46605: smbmnt segfaults. + Closes: Bug#48186: smbmount. + Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. + Closes: Bug#47332: smbmount: could -f and -P be added back? + * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM + module). To succesfully add PAM support, I created /etc/pam.d/samba and + added this file as a conffile for the samba-common package. I also made + samba-common depend on libpam-pwdb. + * Added simple man pages for the wrapper scripts smbmount and smbmount. + (Closes: Bug#44705 - Missing smbmount man page) + * Installed libreadlineg2-dev in my system so smbclient now has a + "history" command and libreadline support :-) + * This time I did add a check to the smbmount wrapper script to see if + the kernel has support for smbfs, as suggested by Jeroen Schaap + . I mentioned in the changelog + for samba-2.0.5a-3 that I did this but I forgot at the end. + + -- Eloy A. Paris Thu, 11 Nov 1999 12:08:15 -0500 + +samba (2.0.5a-5) unstable; urgency=low + + * I am sorry to report that the smbwrapper package is gone for the + moment. The reason for this is twofold: first of all, smbwrapper + is completely broken in Samba-2.0.5a (it compiles but it doesn't + run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, + when I asked Andrew Tridgell (father of Samba) about the state of + smbwrapper he told me that Ulrich Drepper (head of the glibc project) + broke on purpose the glibc stuff in which smbwrapper is based. + Consequently, Tridge recommended me to compile Samba without + support for smbwrapper. When, I have no idea. Sorry folks. Here is + the original message I received from Andrew: + + > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's + > smbwrapper doesn't even compile under glibc2.1. + + yep, Ulrich deliberately broke it. It won't get fixed till glibc + allows the sorts of games it plays to work again. I suggest you turn + it off in your build scripts until that gets sorted out. + + * Swat's file are now in /usr/share/samba/ instead of + /usr/lib/samba/ (bug #49011). + * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). + + -- Eloy A. Paris Tue, 2 Nov 1999 12:59:13 -0500 + +samba (2.0.5a-4) unstable; urgency=low + + * Applied patch from our fearless leader (Wichert) to fix the darn bug + that prevents Samba to work on 2.0.x kernels if it was compiled + in a system running a 2.2.x kernel. This closes #40645 (build uses + setresuid which doesn't work under 2.0.34 (does apparently under + 2.2.x) ). + * Fixed the entry that swat's postinst script adds to /etc/inetd.conf + so it is '## swat\t\tstream\ttcp\tnowait.400 ...' instead of + '##swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused + 'update-inetd --enable swat' to leave the entry for swat disabled. + Thanks to Dave Burchell for finding out + this problem. This closes #48762 (swat uses non-standard syntax to + comment out inetd.conf entry). + * /usr/sbin/swat does not think anymore that the smbd daemon lives + in /usr/local/samba/bin/. To fix this I am running now source/configure + with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba + 'swat' fails: incorrect hardwired path in the binary). + + -- Eloy A. Paris Sun, 31 Oct 1999 03:42:38 -0500 + +samba (2.0.5a-3) unstable; urgency=low + + * I am pretty darn busy with my MBA, I apologize for the long time it's + taking to squash bugs in the Samba packages. + * Built with debhelper v2 for FHS compliancy. Changed a couple of + things in debian/rules to accomodate for the new place for the docs. + I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} + to make sure that the symlink from /usr/doc/xxx exists and points to + /usr/share/doc/xxx (the reason for this is that I am not letting + debhelper to create these scripts for me automatically). + * Built with latest libc6. + * smbfs: finally, the nasty bug that causes smbmount to die after + a while is gone thanks to Ben Tilly . + The problem was just a typo in source/client/smbmount.c. + This closes grave bug #42764 (smbmount dies) and #43341 + (smbfs-2.2.x won't function after a while). + * Fixed the smbmount wrapper script to eliminate a bashism (closes + #45202 - "wrapper scripts use $* instead of "$@") and to recognize + 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize + kernel 2.3.x"). + * Added a check to the smbmount wrapper script to see if the + kernel has support for smbfs, as suggested by Jeroen Schaap + . + * swat's man page is now part of the swat package, not of the samba + package. This closes #44808 (Samba has a man page for swat, but + the binary is not included). + * The interface program smbrun is not longer needed by smbd because + of the availability of execl() under Linux. Because of this, the + smbrun is not even being compiled. Since there is no need for smbrun + now, the smbrun man page was taken out of the samba package. This + closes #45266 (/usr/bin/smbrun missing). + * smbpasswd is now part of the samba-common package, and not part of + the samba package. This is to let administrators that do not want + to install a full Samba server administer passwords in remote + machines. This closes bug #42624 (smbpasswd should be included in + smbclient). This bug report also suggests that swat becomes part of + the samba package, that smbfs becomes part of the smbclient package, + and that the binary smbpasswd becomes part of the smbclient package. + I moved smbpasswd to the samba-common package but I am reluctant to + do the other things the bug report suggests. + * In order to keep dpkg happy when moving smbpasswd from the samba + package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" + in the control section of the samba-common package and a + "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the + samba package (in debian.control). + * Samba is now being compiled with the "--with-netatalk" option. This + closes #47480 (Could samba be compiled with the --with-netatalk option). + * All packages that depend on samba-common have a versioned dependency + now. This was accomplished by adding "(= ${Source-Version})" to the + relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho + for the hint. This closes #42985 (samba should probably + have a versioned depends on samba-common). + * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all + the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). + * Added the smbadduser helper script to the samba package. This closes + #44480 (Samba doesn't come with the smbadduser program). + * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount + to leave an entry in /etc/mtab for a share that could not be mounted + because of invalid user of password. The patch also allows smbumount + to unmount the share in the event that something goes wrong with the + smbmount process. This closes bug #48613 (Mount/umount problems + + patch) as well as #44130 (failed mount is still mounted). + * smbmount-2.2.x is now setuid root. This is needed for the patch + applied above to be effective. If smbmount-2.2.x is not setuid root + then an entry will be left in /etc/mtab even when the mount + fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid + for this to work. + + -- Eloy A. Paris Wed, 27 Oct 1999 10:36:13 -0400 + +samba (2.0.5a-2) unstable; urgency=low + + * This version is basically the same as 2.0.5a-1 but it was compiled + on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 + for more information. + + -- Eloy A. Paris Tue, 27 Jul 1999 02:25:29 -0400 + +samba (2.0.5a-1) stable; urgency=high + + * I'm back from the Honey Moon. We are pretty busy because we are moving + to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still + have plenty of things to pack and to do. Samba 2.0.5 was released + while I was in the Honey Moon and it is just now (almost 3 AM) when + I have time to package it. + * Because of the security problems fixed in 2.0.5, this upload goes + to both stable and unstable (the Security Team asked for this). + * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will + be compiled on a Potato system. + * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common + section in debian/control (as suggested by Steve Haslam + ) to fix the problems that appear when upgrading + from the Samba package in Slink. Please test this as I am completely + unable to do so. This should fix bug #39818 (Upgrading Samba from the + Slink version). + * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in + order to have defined several socket options when compiling with + Linux 2.2.x kernel headers - the fix is now upstream. + * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command + line syntax similar to the one used by the old smbmount (for 2.0.x + kernels). This means that the wrapper script is no longer necessary + so I removed it. In its place there is a simple wrapper script that + calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is + running. + * Because of the wedding, the Honey Moon, and our move to Pittsburgh, + I can't work on fixing other bugs in this release. + + -- Eloy A. Paris Tue, 27 Jul 1999 02:18:51 -0400 + +samba (2.0.4b-3) unstable; urgency=low + + * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files + and because of this /usr/bin/smbumount was part of the samba package + instead of part of the smbfs package. + + -- Eloy A. Paris Thu, 1 Jul 1999 01:51:24 -0400 + +samba (2.0.4b-2) unstable; urgency=low + + * Dark (and archive maintainers): please remove from Potato the smbfsx + binary package and also the old source package for smbfs. smbfs and + smbfsx have been merged starting with this version. + * Merged the old smbfs package with Samba. Now there is only one package + for the smbfs utilities and is called "smbfs". The package smbfsx + does not exist any more and this new smbfs package must be used + for both 2.0.x and > 2.1.x kernels. + * A wrapper script was added to handle the syntax change in smbmount + in the new smbfs utilities (required for kernels > 2.1.70). The + home page for this script is http://www.wittsend.com/mhw/smbmount.html. + Please _note_ that this will change (for good) in Samba 2.0.5 :-) + * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x + or smbumount-2.0.x depending on the kernel currently running. + * Not using -t for savelog in cron.weekly script. + * Recompiled without libreadlineg-dev (Samba does not seem to be using + it so unnecessary dependencies are produced). + * glibc2.1 build. + * Removed smbpasswd.8 man page from the debian/ directory because it is + now being provided upstream. + * Got rid of the ugly hack I put in source/lib/util_sock.c to have + IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the + autoconf stuff to #include . I've sent the patch to + Jeremy Allison so we have this upstream. + + -- Eloy A. Paris Mon, 28 Jun 1999 17:47:19 -0400 + +samba (2.0.4b-1) unstable; urgency=low + + * New upstream release. This release fixes the following Debian bugs: + #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and + #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy + Allison released Samba 2.0.4 and found out that there were a couple + of minor bugs so he released 2.0.4a. Then he found out about more + serious bugs and released 2.0.4b. I have built this package several + times between yesterday and today because of this. Now I am releasing + the Debian packages for Samba with what I believe will be the latest + release the Samba Team will make at least in the next 4 days (Jeremy + is taking a short vacation). + * Still compiling against glibc2.0 (sorry about that :-) + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. It looks + now in /usr/lib/samba/ for this file. This fixes #32971, #32989, + #33278, #34911 and #36317. + * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf + and /etc/samba/codepages/. This fixes #33128 (smbmount complains about + missing /etc/smb.conf). + * Package swat does not depend on httpd anymore (there's no need to). + This fixes #35795 (swat requires httpd). + * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and + smbumount-2.2.x. Same applies to the man pages. + * Changed minor type in smbmount's man page (changed "\"" by "\'"). This + fixes #34070 (wrong quotes in manpage). + * Used Fabrizio Polacco's procedure to create the + Debian package for Samba. This closes #35781 (samba has no pristine + source). + * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only + if the size of either is different than 0. Also, added comments at the + beginning of this script to explain how rotation of log files works in + Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) + for the suggestions. This closes #37490 (cron.weekly script rotates not + used [sn]mb.old files). As I side effect, this should also close + #31462 (still trouble with /etc/cron.weekly/samba). + * Check for old /etc/pam.d/samba file which is not provided by this version + of the Debian Samba package but was provided in older versions. If this + file exists we delete it. We check for this in the postinst. This closes + #37356 (samba put stuff in pam.d that pam complains about) and #34312 + (libpam0g: questions during upgrade). + * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done + in the postinst script. This closes #35730 (Security problem with + /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). + * I have just checked and it looks like #28748 (smbfsx doesn't "return ") + has been fixed. This might have been fixed since a long time ago. + * Long long standing bug #18488 (smbclient: internal tar is broken) is + closed in this release of Samba. The bug might have been closed for a + long long time, but I did not check for this before. + * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" + message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), + #34148 (warnings from smbd) and #35333 (samba warnings). + + -- Eloy A. Paris Thu, 20 May 1999 00:35:57 -0400 + +samba (2.0.3-1) unstable; urgency=low + + * New upstream version. + * Removed the convert_smbpasswd.pl program I created and put in + /usr/doc/samba/ because there's a convert_smbpasswd script in the + upstream sources that does the same thing. I modified the postinst + script to use this script instead of the one I created. + + -- Eloy A. Paris Sun, 28 Feb 1999 01:35:37 -0400 + +samba (2.0.2-2) unstable; urgency=low + + * Updated the README.Debian file. + * Updated the description of the samba package in the control file. + * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now + installed setuid root as they should be. This was done by doing a + a "chmod u+s" for each binary in debian/rules and by creating the + file debian/smbfsx.suid. + * Minor patch to source/client/smbumount.c to allow normal users + to umount what they have mounted (problem was a kernel vs. libc6 + size mismatch). I sent the patch upstream. + * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is + created. + * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to + debian/smbwrapper/usr/lib/samba/. + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. + + -- Eloy A. Paris Thu, 11 Feb 1999 18:11:34 -0400 + +samba (2.0.2-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Thu, 11 Feb 1999 01:35:51 -0400 + +samba (2.0.1-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Sat, 6 Feb 1999 06:51:18 -0400 + +samba (2.0.0final-4) unstable; urgency=low + + * The samba postinst made an unwarranted assumption that the file + /etc/samba/smbpasswd exists. If the file did not exist (which is + perfectly valid) the postinst will fail. This fixes #32953. + + -- Eloy A. Paris Fri, 5 Feb 1999 23:32:46 -0400 + +samba (2.0.0final-3) unstable; urgency=low + + * Added to debian/control a "Depends: ${shlibs:Depends}" line for the + samba-common package so dependencies for this package are set + correctly (thanks to Dark for pointing this out). + + -- Eloy A. Paris Thu, 4 Feb 1999 09:45:21 -0400 + +samba (2.0.0final-2) unstable; urgency=low + + * Finally!!! The first upload to unstable. Sorry for the delay folks + but I have been quite busy lately :-) Another reason for the delay + is that I wanted to ease the migration from Samba 1.9.18p10 and + before to Samba 2.0.0. I changed the location of the config. files + from /etc/ to /etc/samba/ and this made things a little bit harder. + * This package needs 2.2 kernel headers to compile (well, this is + true for the smbfsx package, all others compile fine with 2.0 kernel + headers). + * Created a preinst script for the samba package to take care of the + location migration of smb.conf (from /etc/ to /etc/samba/). The + preinst script also takes care of moving /etc/smbpasswd to its new + location (/etc/samba/). + * Created postinst and postrm scripts to add/remove an entry for swat + in /etc/inetd.conf. + * I had forgotten to install the sambaconfig script so I changed + debian/rules to install this script. + * Added a postrm script for the samba package (I had forgotten to add + this script to the new Samba packages after the migration from 1.9.18 + to 2.0.0). + * Created a small Perl script that is called from the samba postinst + to convert the smbpasswd from the old format used in version prior + to 2.0.0 to the new one used in 2.0.0 and beyond. + * The upgrade process should be automatically now. Please let me know + of any problems you encounter. + + -- Eloy A. Paris Sat, 23 Jan 1999 09:34:10 -0400 + +samba (2.0.0final-1) experimental; urgency=low + + * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable + because I still have to work out the migration from the old + samba packages to the new ones. I also need to work more on the + new swat package. + + -- Eloy A. Paris Thu, 14 Jan 1999 22:40:02 -0400 + +samba (2.0.0beta5-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris Tue, 5 Jan 1999 00:37:57 -0400 + +samba (2.0.0beta4-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris Wed, 23 Dec 1998 18:37:45 -0400 + +samba (2.0.0beta3-1) experimental; urgency=low + + * New upstream version. + * I have just realized that the documentation patches (for man pages) + that I used for the 1.9.18 release are not longer necessary because + there was a major re-write of all the Samba documentation that added + the missing bits of information. So, I have just removed these minor + patches. + + -- Eloy A. Paris Tue, 8 Dec 1998 12:00:30 -0400 + +samba (2.0.0beta2-1) experimental; urgency=low + + * New upstream version. + * This new version fixes the potential security problem that + was posted to debian-private (using the "message command" parameter + to execute arbitrary commands from messages sent from LinPopUp). + * Changed /etc/init.d/samba to use one of the variables stored in + /etc/samba/debian_config to know how Samba is being run (from inetd or + as daemons) instead of grepping /etc/inetd.conf which may not exist + if the user is running xinetd (this fixes bug #29687 - assumes using + vanilla inetd) + + -- Eloy A. Paris Mon, 23 Nov 1998 23:32:03 -0400 + +samba (2.0.0beta1-1) experimental; urgency=low + + * First beta release of the samba-2.0.0 code. Before the beta I was + working with sources downloaded directly from the CVS server. This + package goes into experimental and I plan to release the new + samba to unstable as soon as it gets out of beta. + * Created several packages out of the Samba sources. They are: + samba (nmbd and smbd daemons + related programs), smbclient (FTP + like command line utility to retrieve files from SMB servers), + swat (Samba Web Administration Tool), samba-common (common files + used by samba, smbclient and swat), smbfsx (smbfs utilities for + kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). + * Refreshed debian/samba-doc.docs so recently added docs. are + installed in the samba-doc package. New additions include man + pages in the /usr/doc/samba-doc/htmldocs/ directory. + * Deleted Debian specific nmblookup(1) man page as it is now upstream. + * Added smbtorture to smbclient package. + * Moved rpcclient from the samba package to the smbclient package. + * The Samba daemons (nmbd and smbd) now create a PID file so I changed + all calls to start-stop-daemon to use the PID file. + * Fixed debian/rules to install mksmbpasswd (fixes #27655). + * Modified /etc/init.d/samba so nmbd is started without the -a (append + to the log file instead of overwrite) switch. The new behavior of + nmbd is to NOT overwrite log files, so the -a switch can be deleted + safely. + * Moved from debstd to debhelper. + + -- Eloy A. Paris Thu, 1 Oct 1998 08:37:41 -0400 + +samba (1.9.18p10-5) frozen unstable; urgency=high + + * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than + the one I was trying to fix: in /etc/init.d/samba I got rid of the test + that tells us whether the Samba daemons are running from inetd or as + standalone daemons. I corrected the problem by editing again + /etc/init.d/samba to uncomment the test. + * Wishlist bug #28298 (typos in samba) was fixed. + * Wishlist bug #28309 (typos in smb.conf) was fixed. + + -- Eloy A. Paris Wed, 28 Oct 1998 09:11:47 -0400 + +samba (1.9.18p10-4) unstable; urgency=low + + * Minor patch to debian/rules to delete *substvars instead of only + substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz + for this). + * Small patch to source/shmem_sysv.c that eases compilation under + glibc-2.1 (thanks to Daniel for this). + + -- Eloy A. Paris Thu, 17 Sep 1998 15:33:49 -0400 + +samba (1.9.18p10-3) unstable; urgency=low + + * Patched smbclient again to fix minor formatting problem introduced + by Magosanyi Arpad's smbclient patch. + + -- Eloy A. Paris Thu, 3 Sep 1998 11:03:23 -0400 + +samba (1.9.18p10-2) unstable; urgency=low + + * Sync'ed include files for the smbfs utilities with the ones in + kernel 2.1.119. + * Added to the /usr/doc/samba/examples/ directory a new script called + wins2dns (courtesy of Jason Gunthorpe ) that + generates BIND sonze files for hosts in the WINS database. + * Patched smbclient to include enhancements by Magosanyi Arpad + that make scripting easier. + + -- Eloy A. Paris Fri, 28 Aug 1998 13:34:54 -0400 + +samba (1.9.18p10-1) stable unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). I built a 1.9.18p9-1 but I + never released it because an obscure bug was found just a couple + of days before the official release, so the Samba Team stopped + the rollover of 1.9.18p9. + * Updated documentation (new files were added to the docs/ directory + that were not installed in /usr/doc/samba/). + * Fixed long standing bug #7695 (smb.conf's man page doesn't document + 'printing=lprng') - I made a couple of changes to the man page to + include references to lprng. + * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it + is necessary to make samba suggest psmisc just because the postinst + script mentions to call killall. So, I removed all references to + "killall" in the scripts. + * Fixes bug #25999 (Samba does not by default work with unix password + sync): I added the "passwd program" and "passwd chat" parameters to + the sample smb.conf to reflect the Debian environment. + + -- Eloy A. Paris Fri, 21 Aug 1998 08:59:18 -0400 + +samba (1.9.18p9-1) unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). + * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is + now part of the new upstream version. + * Corrected small typo in addtosmbpass' man page (fixes #25629). + + -- Eloy A. Paris Tue, 11 Aug 1998 08:53:08 -0400 + +samba (1.9.18p8-2) frozen unstable; urgency=medium + + * Applied patch received from Jeremy Allison (Samba Team) that fixes + "grave" bug #23903 (samba maps username before authenicating with + NT password server). + * Added a "sleep 2" between "start-stop-daemon --stop" and + "start-stop-daemon --start" in /etc/init.d/samba so when this script + is called with the "restart" parameter the Samba daemons are restarted + properly. This fixes bug #24211 (init.d script doesn't restart). + * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to + avoid annoying warning messages. + * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 + and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't + find who sent this suggestion to me. If you are listening, drop me a + note and I'll put your name here :-) + + -- Eloy A. Paris Mon, 29 Jun 1998 08:45:01 -0400 + +samba (1.9.18p8-1) frozen unstable; urgency=low + + * New upstream release that fixes _lots_ of "ugly" bugs. The list of + fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). + * Fixed postinst to quote arguments to if [ arg .. ] constructs + (fixes #22881). + * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing + list) that solves a problem with username maps (the Samba Team did + not catch this problem before final 1.9.18p8). + * Made /etc/init.d/samba to print out a warning when Samba is running + from inetd and the user runs /etc/init.d/samba to start|stop|restart + Samba (there's no point on doing this because inetd will start the + daemons again when there is traffic on UDP port 137-139). + + -- Eloy A. Paris Sat, 13 Jun 1998 00:18:25 -0400 + +samba (1.9.18p7-4) frozen unstable; urgency=medium + + * Fixes the serious problem of having the WINS name server + database getting deleted at boot time. That happened because the + WINS database was being stored under /var/lock/samba/ and all files + under /var/lock/ are deleted at boot time. The place where the WINS + database is stored was moved to /var/samba/. + + -- Eloy A. Paris Mon, 18 May 1998 20:24:29 -0400 + +samba (1.9.18p7-3) stable; urgency=high + + * Libc5 version for Bo (stable) that fixes the recently reported + security hole. + + -- Eloy A. Paris Mon, 18 May 1998 20:19:33 -0400 + +samba (1.9.18p7-2) frozen unstable; urgency=low + + * Added patches from the non-mantainer upload that make us able + to compile Samba on Alpha systems. This fixes bug #22379. + + -- Eloy A. Paris Wed, 13 May 1998 20:38:51 -0400 + +samba (1.9.18p7-1) frozen unstable; urgency=low + + * New upstream release (just bug fixes, no new functionality). + + -- Eloy A. Paris Wed, 13 May 1998 11:47:32 -0400 + +samba (1.9.18p6-2) frozen unstable; urgency=low + + * Uploaded to frozen (I forgot to upload last version to frozen + so it got installed only in unstable). + + -- Eloy A. Paris Tue, 12 May 1998 18:10:17 -0400 + +samba (1.9.18p6-1.1) unstable; urgency=low + + * non-maintainer upload for Alpha + * patch needed for source/quota.c (_syscall4() confusion) + + -- Paul Slootman Tue, 12 May 1998 20:39:13 +0200 + +samba (1.9.18p6-1) unstable; urgency=low + + * New upstream release that fixes a possible buffer overflow. + This security hole was reported on BugTraq by Drago. The + previous Debian version (1.9.18p5-1) was not released because + 1.9.18p5 and 1.9.18p6 were released very closely. + + -- Eloy A. Paris Mon, 11 May 1998 20:28:33 -0400 + +samba (1.9.18p5-1) unstable; urgency=low + + * New upstream release (no new funcionality, just bug fixes - see + /usr/doc/samba/WHATSNEW.txt.gz). + * Backed off Debian patches that were added upstream. + + -- Eloy A. Paris Mon, 11 May 1998 08:43:53 -0400 + +samba (1.9.18p4-2) frozen unstable; urgency=low + + * Patched smbclient(1) man page to not reference the unsopported + -A parameter (fixes #6863). + * Changes to start nmbd with the -a option (in /etc/init.d/samba + and in the entry added to /etc/inetd.conf). + * Fixed typo in sample smb.conf (fixes #21484). + * Fixed yet another typo in sample smb.conf (fixes #21447). + + -- Eloy A. Paris Fri, 17 Apr 1998 22:19:23 -0400 + +samba (1.9.18p4-1) frozen unstable; urgency=low + + * New upstream version that fixes several bugs. + * New scheme for keeping track of Debian specific configuration. + This new scheme fixes bug #18624 (Samba always asks the user about + configuration options). New scheme stores Debian specific + configuration information in /etc/samba/debian_config. + * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the + new configuration scheme. + * Moved required kernel 2.1.x include files inside the source tree + so I don't have to do very nasty things like creating crazy + symlinks in /usr/include to make this package compile. This + allows non-root users to build the package and fixes bug + #20104. + * Fixed address of the FSF in /usr/doc/samba/copyright (problem + reported by lintian). + * The /etc/init.d/samba script now supports the force-reload + argument, as required by the policy (problem reported by lintian). + * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. + * Now the samba package can be installed even if no nmbd or smbd processes + are running. This fixes the following bugs: #8917, #9334, #10268, + #10411, #11146 and #13387. + * Provides the original README in /usr/doc/samba. This fixes bug #9693. + * Added a --no-reload option to sambaconfig to not reload Samba + after configuration. + * Created man pages for sambaconfig(8), addtosmbpass(8), + mksmbpasswd(8) and nmblookup(1). + * Corrected small typo in sample /etc/smb.conf. + * Added two new parameters to /etc/smb.conf: "preserver case" and + "short preserve case". + * "rm -Rf /var/lock/samba" in postrm when package is being purged. + * Patched upstream source (nmbd.c) to not overwrite log files when + nmbd is called with the -a parameter (fixes #17704: nmbd ignores + -a option). + * /etc/init.d/samba now starts the nmbd daemon with the -a parameter + to not overwrite log files. + + -- Eloy A. Paris Mon, 23 Mar 1998 21:22:03 -0400 + +samba (1.9.18p3-1) unstable; urgency=low + + * New upstream version. + * Oppsss!!! I really screwed it up (actually, debstd did). + 1.9.18p2-2 still contained man pages (smbmount and smbumount) part + of other packages. This version does have this corrected. If not, + I no longer deserve to be a Debian developer! So, this version + fixes bug #18438 and some of the bugs I claimed to fix in + 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd + with -m in debian/rules (man pages are installed by "make install" + so it's a bad idea to re-install man pages with debstd). + + -- Eloy A. Paris Mon, 23 Feb 1998 17:32:42 -0400 + +samba (1.9.18p2-2) unstable; urgency=low + + * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided + a man page for smbmount, which conflicts with package smbfs. This + was solved by creating a multi-binary package that produces + package samba and new package smbfsx. + * Fixes bug #18000 (typo in postinst). + * Fixes bug #17958 (postinst asks obsolete question). Actually, + the question is still asked, but only if Samba is run as daemons. + * Created a multi-binary package from the Samba sources: package + samba and new package smbfsx which provides SMB mount utilities + for kernels > 2.1.70. + + -- Eloy A. Paris Mon, 9 Feb 1998 19:47:05 -0400 + +samba (1.9.18p2-1) unstable; urgency=low + + * New upstream version. + * Removed /etc/cron.weekly/samba because Samba does not handle well + rotation of log files (if the log file is rotated Samba will + continue to log to the rotated file, instead of the just created + one). In any case, Samba will rotate log files after an specific + file size. + + -- Eloy A. Paris Tue, 27 Jan 1998 22:34:27 -0400 + +samba (1.9.18p1-2) unstable; urgency=low + + * Created a multi-binary package out of the Samba sources to provide + packages samba and smbfsx (userland utilities to work with + smbfs with kernels > 2.1.x. + + -- Eloy A. Paris Sat, 17 Jan 1998 09:23:48 -0400 + +samba (1.9.18p1-1) unstable; urgency=low + + * New upstream version. + * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in + /var/backups/smbpasswd.bak. + + -- Eloy A. Paris Wed, 14 Jan 1998 13:40:56 -0400 + +samba (1.9.18alpha14-1) unstable; urgency=low + + * New upstream version. + * Added a note to the postinst script telling the user that he/she + needs to run smbpasswd manually after creating a new /etc/smbpasswd + from /etc/passwd. + + -- Eloy A. Paris Tue, 23 Dec 1997 23:44:37 -0400 + +samba (1.9.18alpha13-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Tue, 16 Dec 1997 13:02:32 -0400 + +samba (1.9.18alpha12-1) unstable; urgency=low + + * New upstream version. + * Conflicts with the sambades package because the new Samba 1.9.18 + series do not depend on the DES libraries to support encrypted + passwords. + * Added parameter "encrypt passwords = yes" to /etc/smb.conf. + * Compiled with support for quotas in disk_free(). + * Home directories are now exported read only by default. + * Re-worked debian/rules. + * Re-worked sample smb.conf. + + -- Eloy A. Paris Thu, 4 Dec 1997 22:50:34 -0400 + +samba (1.9.17p4-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable by everybody because some Samba utilities + will fail otherwise when run by non-root users. + * Dropped PAM support while the PAM libraries are ported to libc6. + + -- Eloy A. Paris Tue, 21 Oct 1997 18:08:49 -0400 + +samba (1.9.17p3-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable only by root as suggested by smbd's man page. + + -- Eloy A. Paris Wed, 15 Oct 1997 09:21:25 -0400 + +samba (1.9.17p2-2) unstable; urgency=low + + * Running Samba as daemons instead of from inetd. + * Removing netbios entries in /etc/inetd.conf. + + -- Eloy A. Paris Thu, 9 Oct 1997 23:37:25 -0400 + +samba (1.9.17p2-1) unstable; urgency=low + + * New upstream version that fixes a serious security hole. + * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because + these patches are now part of the upstream release. + + -- Eloy A. Paris Sun, 28 Sep 1997 22:54:33 -0400 + +samba (1.9.17p1-1) unstable; urgency=low + + * New upstream version. + * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up + compiler warnings. + * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. + * Included crypt.h to have function prototype for crypt(). + * Included netinet/tcp.h to have some socket options included. + * Included netinet/ip.h to have some socket options included. + * Linking with libcrypt (LIBM='... -lcrypt'). Without including this + library smbd generates a seg. fault when authenticating users (?). + + -- Eloy A. Paris Wed, 10 Sep 1997 22:09:18 -0400 + +samba (1.9.17-1) unstable; urgency=low + + * New upstream version (called the "Browse Fix Release") + * Added the option --oknodo to the start-stop-daemon invocation in prerm + script. This was because the prerm was failing because start-stop-daemon + was returning an error code if no nmbd or smbd daemons were found + to kill. + * The function yp_get_default_domain(), referenced in three source + files was part of libc5 but with libc6 (glibc2) it has been moved + to libnss_nis. Since the linker was unable to find the function + I had to add LIBSM='-lnss_nis' to debian/rules. + * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules + because compiling was failing because of conflicts with glibc2. + * Patched source/includes.h to include termios.h if GLIBC2 is defined. + + -- Eloy A. Paris Wed, 27 Aug 1997 08:39:32 -0400 + +samba (1.9.17alpha5-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Thu, 14 Aug 1997 18:05:02 -0400 + +samba (1.9.16p11-3) unstable; urgency=low + + * Fixed accidental omission of /etc/pam.d/samba. + + -- Klee Dienes Sat, 15 Mar 1997 22:31:26 -0500 + +samba (1.9.16p11-2) unstable; urgency=low + + * Recompiled against newer PAM libraries. + * Added /etc/pam.d/samba. + + -- Klee Dienes Sat, 8 Mar 1997 01:16:28 -0500 + +samba (1.9.16p11-1) unstable; urgency=low + + * New upstream release. + * Added PAM support. + + -- Klee Dienes Tue, 25 Feb 1997 18:00:12 -0500 + +samba (1.9.16p9-2) unstable; urgency=low + + * minor packaging changes + + -- Klee Dienes Sun, 3 Nov 1996 11:45:37 -0700 + +samba (1.9.16p9-1) unstable; urgency=low + + * upgraded to new upstream version + + -- Klee Dienes Sat, 26 Oct 1996 21:38:20 -0700 + +1.9.16alpha10-1: + 960714 + * Removed Package_Revision from control file. + * Removed -m486 compiler option. + * Added Architecture, Section and Priority fields to control file. + * Upgraded to latest upstream version. + * Uses update-inetd now. + * Added shadow passwords support. + * Fixed Bug#1946: nmbd won't browse + +1.9.15p4-1: + 951128 + * Upgraded to latest upstream version. + * Fixed many bugs. + * Adds Master Browsing support. + * Converted to ELF. + * Fixed bug #1825 - nmbd is now killed when removing samba. + +1.9.14-1: + 950926 Andrew Howell + * Upgraded to latest version. + * Fixed Bug #1139 - samba won't print + +1.9.14alpha5-1: + * Fixes killing of inetd problem in debian.postint and debian.postrm + +1.9.14alpha5-0: + 950704 Andrew Howell + * Taken over samba package from Bruce Perens. + * Upgraded to newest version of samba. + +1.9.02-1: + 9-January-1994 Bruce Perens + * Added Debian GNU/Linux package maintenance system files, and + configured for Debian systems. diff --git a/packaging/Debian/debian/config.cache b/packaging/Debian/debian/config.cache new file mode 100644 index 00000000000..c0a70a5b19b --- /dev/null +++ b/packaging/Debian/debian/config.cache @@ -0,0 +1,231 @@ +# +# 22 August 2001 Steve Langasek +# +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +# +# This config.cache file contains a list of acceptable autoconf +# values which can be used in compiling Samba for Debian woody/sid. +# +# Autoconf sorts options alphabetically in its output. This file +# groups options logically. + + +# Load any architecture-specific settings +if [ -n "$DEB_HOST_GNU_TYPE" \ + -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then + . ../debian/config.cache.${DEB_HOST_GNU_TYPE} +fi + + +# This is at the top because it's most in need of regular tweaking. +# These are options which are supported on 2.4 kernels, but not on 2.2 +# kernels. + +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} + + +# These are present in 2.2 kernels, but not in 2.0... + +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} + + +# POSIX ACL support not present in Linux 2.2; not allowed in the +# Debian packages, even if present on the build machine. + +ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} + + +# Various basic libc/compiler stuff that it's blindingly obvious that +# Linux supports (now watch me get bitten for saying that) + +ac_cv_c_const=${ac_cv_c_const=yes} +ac_cv_c_inline=${ac_cv_c_inline=inline} +samba_cv_volatile=${samba_cv_volatile=yes} +ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} +ac_cv_func_bzero=${ac_cv_func_bzero=yes} +ac_cv_func_chmod=${ac_cv_func_chmod=yes} +ac_cv_func_chown=${ac_cv_func_chown=yes} +ac_cv_func_chroot=${ac_cv_func_chroot=yes} +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_dup2=${ac_cv_func_dup2=yes} +ac_cv_func_execl=${ac_cv_func_execl=yes} +ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} +ac_cv_func_fchown=${ac_cv_func_fchown=yes} +ac_cv_func_fstat=${ac_cv_func_fstat=yes} +ac_cv_func_fsync=${ac_cv_func_fsync=yes} +ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} +ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} +ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} +ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} +ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} +ac_cv_func_glob=${ac_cv_func_glob=yes} +ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} +ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} +ac_cv_func_llseek=${ac_cv_func_llseek=yes} +ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} +ac_cv_func_memmove=${ac_cv_func_memmove=yes} +ac_cv_func_memset=${ac_cv_func_memset=yes} +ac_cv_func_mktime=${ac_cv_func_mktime=yes} +ac_cv_func_pipe=${ac_cv_func_pipe=yes} +ac_cv_func_poll=${ac_cv_func_poll=yes} +ac_cv_func_pread=${ac_cv_func_pread=yes} +ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} +ac_cv_func_rand=${ac_cv_func_rand=yes} +ac_cv_func_random=${ac_cv_func_random=yes} +ac_cv_func_readlink=${ac_cv_func_readlink=yes} +ac_cv_func_rename=${ac_cv_func_rename=yes} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_func_setenv=${ac_cv_func_setenv=yes} +ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} +ac_cv_func_setsid=${ac_cv_func_setsid=yes} +ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} +ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} +ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} +ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} +ac_cv_func_srand=${ac_cv_func_srand=yes} +ac_cv_func_srandom=${ac_cv_func_srandom=yes} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} +ac_cv_func_strchr=${ac_cv_func_strchr=yes} +ac_cv_func_strdup=${ac_cv_func_strdup=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} +ac_cv_func_strftime=${ac_cv_func_strftime=yes} +ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} +ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} +ac_cv_func_symlink=${ac_cv_func_symlink=yes} +ac_cv_func_usleep=${ac_cv_func_usleep=yes} +ac_cv_func_utime=${ac_cv_func_utime=yes} +ac_cv_func_utimes=${ac_cv_func_utimes=yes} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} +ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} +ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} +ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} +ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} +samba_cv_socklen_t=${samba_cv_socklen_t=yes} + +# Yes, we know Linux supports fcntl locking. Just ignore +# any errors caused by building on an NFS mount. +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} + + +# smbwrapper doesn't work because the glibc maintainers don't want +# to support transparent userland VFS. We might as well preempt +# any checks for shadowed symbols that are only useful for smbwrapper. + +ac_cv_func___acl=${ac_cv_func___acl=no} +ac_cv_func__acl=${ac_cv_func__acl=no} +ac_cv_func___chdir=${ac_cv_func___chdir=no} +ac_cv_func__chdir=${ac_cv_func__chdir=no} +ac_cv_func___close=${ac_cv_func___close=no} +ac_cv_func__close=${ac_cv_func__close=no} +ac_cv_func___closedir=${ac_cv_func___closedir=no} +ac_cv_func__closedir=${ac_cv_func__closedir=no} +ac_cv_func___dup=${ac_cv_func___dup=no} +ac_cv_func__dup=${ac_cv_func__dup=no} +ac_cv_func___dup2=${ac_cv_func___dup2=no} +ac_cv_func__dup2=${ac_cv_func__dup2=no} +ac_cv_func___facl=${ac_cv_func___facl=no} +ac_cv_func__facl=${ac_cv_func__facl=no} +ac_cv_func___fchdir=${ac_cv_func___fchdir=no} +ac_cv_func__fchdir=${ac_cv_func__fchdir=no} +ac_cv_func___fcntl=${ac_cv_func___fcntl=no} +ac_cv_func__fcntl=${ac_cv_func__fcntl=no} +ac_cv_func___fork=${ac_cv_func___fork=no} +ac_cv_func__fork=${ac_cv_func__fork=no} +ac_cv_func___fstat=${ac_cv_func___fstat=no} +ac_cv_func__fstat=${ac_cv_func__fstat=no} +ac_cv_func___fstat64=${ac_cv_func___fstat64=no} +ac_cv_func__fstat64=${ac_cv_func__fstat64=no} +ac_cv_func___fxstat=${ac_cv_func___fxstat=no} +ac_cv_func___getcwd=${ac_cv_func___getcwd=no} +ac_cv_func__getcwd=${ac_cv_func__getcwd=no} +ac_cv_func___getdents=${ac_cv_func___getdents=no} +ac_cv_func__getdents=${ac_cv_func__getdents=no} +ac_cv_func___llseek=${ac_cv_func___llseek=no} +ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} +ac_cv_func__llseek=${ac_cv_func__llseek=no} +ac_cv_func___lseek=${ac_cv_func___lseek=no} +ac_cv_func__lseek=${ac_cv_func__lseek=no} +ac_cv_func___lstat=${ac_cv_func___lstat=no} +ac_cv_func__lstat=${ac_cv_func__lstat=no} +ac_cv_func___lstat64=${ac_cv_func___lstat64=no} +ac_cv_func__lstat64=${ac_cv_func__lstat64=no} +ac_cv_func___lxstat=${ac_cv_func___lxstat=no} +ac_cv_func___open=${ac_cv_func___open=no} +ac_cv_func__open=${ac_cv_func__open=no} +ac_cv_func___open64=${ac_cv_func___open64=no} +ac_cv_func__open64=${ac_cv_func__open64=no} +ac_cv_func___opendir=${ac_cv_func___opendir=no} +ac_cv_func__opendir=${ac_cv_func__opendir=no} +ac_cv_func___pread=${ac_cv_func___pread=no} +ac_cv_func__pread=${ac_cv_func__pread=no} +ac_cv_func___pread64=${ac_cv_func___pread64=no} +ac_cv_func__pread64=${ac_cv_func__pread64=no} +ac_cv_func___pwrite=${ac_cv_func___pwrite=no} +ac_cv_func__pwrite=${ac_cv_func__pwrite=no} +ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} +ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} +ac_cv_func___read=${ac_cv_func___read=no} +ac_cv_func__read=${ac_cv_func__read=no} +ac_cv_func___readdir=${ac_cv_func___readdir=no} +ac_cv_func__readdir=${ac_cv_func__readdir=no} +ac_cv_func___readdir64=${ac_cv_func___readdir64=no} +ac_cv_func__readdir64=${ac_cv_func__readdir64=no} +ac_cv_func___seekdir=${ac_cv_func___seekdir=no} +ac_cv_func__seekdir=${ac_cv_func__seekdir=no} +ac_cv_func___stat=${ac_cv_func___stat=no} +ac_cv_func__stat=${ac_cv_func__stat=no} +ac_cv_func___stat64=${ac_cv_func___stat64=no} +ac_cv_func__stat64=${ac_cv_func__stat64=no} +ac_cv_func___telldir=${ac_cv_func___telldir=no} +ac_cv_func__telldir=${ac_cv_func__telldir=no} +ac_cv_func___write=${ac_cv_func___write=no} +ac_cv_func__write=${ac_cv_func__write=no} +ac_cv_func___xstat=${ac_cv_func___xstat=no} + + + +# Miscellaneous stuff that isn't, and shouldn't be, available +# in Debian. Those interested in building debs for other systems may +# need to remove some of these defines. + +ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} +ac_cv_func_crypt16=${ac_cv_func_crypt16=no} +ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} +ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} +ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} +ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} +ac_cv_func_rdchk=${ac_cv_func_rdchk=no} +ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} +ac_cv_func_setgidx=${ac_cv_func_setgidx=no} +ac_cv_func_setluid=${ac_cv_func_setluid=no} +ac_cv_func_setpriv=${ac_cv_func_setpriv=no} +ac_cv_func_setuidx=${ac_cv_func_setuidx=no} +ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} +ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} +ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} +ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} +ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} +ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} +ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} +ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} +ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} +ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/debian/config.cache.alpha-linux b/packaging/Debian/debian/config.cache.alpha-linux new file mode 100644 index 00000000000..6d171920263 --- /dev/null +++ b/packaging/Debian/debian/config.cache.alpha-linux @@ -0,0 +1,12 @@ +# 22 Aug 2001 Steve Langasek + +# This file contains autoconf settings specific to the alpha-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian/config.cache.sparc-linux b/packaging/Debian/debian/config.cache.sparc-linux new file mode 100644 index 00000000000..a2a21b1d3ad --- /dev/null +++ b/packaging/Debian/debian/config.cache.sparc-linux @@ -0,0 +1,13 @@ +# 24 Spe 2001 Steve Langasek + +# This file contains autoconf settings specific to the sparc-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresuid=${samba_cv_have_setresuid=no} +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian/control b/packaging/Debian/debian/control new file mode 100644 index 00000000000..2054da9f188 --- /dev/null +++ b/packaging/Debian/debian/control @@ -0,0 +1,151 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Eloy A. Paris +Uploaders: Steve Langasek +Build-Depends: debhelper (>=2.0.103), libpam0g-dev, libreadline4-dev, libcupsys2-dev +Standards-Version: 3.1.1 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends} +Replaces: samba-common (<= 2.0.5a-2) +Suggests: samba-doc +Description: A LanManager like file and printer server for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + As of Samba 2.2.1a-3, the Samba Debian packages consist of the following: + . + samba - A LanManager like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - A LanManager like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfs - Mount and umount commands for the smbfs (kernels 2.0.x and above). + libpam-smbpass - pluggable authentication module for SMB password database + libsmbclient - Shared library that allows applications to talk to SMB servers + libsmbclient-dev - libsmbclient shared libraries + +Package: samba-common +Architecture: any +Depends: libpam-modules, ${shlibs:Depends} +Replaces: samba (<= 2.0.5a-2) +Description: Samba common files used by both the server and the client. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: samba (<= 2.2.2-5) +Provides: samba-client +Suggests: smbfs +Description: A LanManager like simple client for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains some client components of the Samba suite. In + particular it includes the command line utilities smbclient, smbtar, + and smbspool. If you want to mount shares exported from Microsoft + Windows machines or a Samba server you must install the smbfs package. + +Package: swat +Architecture: any +Depends: samba (= ${Source-Version}), ${shlibs:Depends} +Recommends: samba-doc +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration of the Samba server. + +Package: samba-doc +Section: doc +Architecture: all +Description: Samba documentation. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Suggests: smbclient +Replaces: smbfsx +Conflicts: smbfsx, suidmanager (<< 0.50) +Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + LAN Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + If you want to use command-line utilities like smbclient, smbtar + and/or smbspool just need to install the smbclient package. + . + Starting with the Debian Samba packages version 2.2.0-1, the old smbfs + utilities for 2.0.x have been removed. There are no wrapper scripts + that call a specific smbmount/smbmount depending on the kernel version. + If you are using a 2.0.x kernel please upgrade or use the latest Samba + 2.0.7 Debian package. + +Package: libpam-smbpass +Section: admin +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Suggests: samba +Description: pluggable authentication module for SMB password database + This is a stackable PAM module that allows a system administrator to easily + migrate to using encrypted passwords for Samba and to keep smb passwords in + sync with unix passwords. Unlike other solutions, it does this without + requiring users to change their existing passwords or login to Samba using + cleartext passwords. + +Package: libsmbclient +Section: libs +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Description: Shared library that allows applications to talk to SMB servers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient shared library. + +Package: libsmbclient-dev +Section: devel +Priority: extra +Architecture: any +Depends: libsmbclient (= ${Source-Version}), ${shlibs:Depends} +Description: libsmbclient static libraries and headers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient static libraries and headers + needed to build applications that use SMB services. diff --git a/packaging/Debian/debian/control.smbwrapper b/packaging/Debian/debian/control.smbwrapper new file mode 100644 index 00000000000..70444ca5f58 --- /dev/null +++ b/packaging/Debian/debian/control.smbwrapper @@ -0,0 +1,111 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Eloy A. Paris +Standards-Version: 2.4.0.0 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: samba-common (<= 2.0.5a-2) +Suggests: samba-doc +Description: A LanManager like file and printer server for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + As of Samba 2.0.0, the Samba Debian packages consist of the following: + . + samba - A LanManager like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - A LanManager like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfsx - Mount and umount commands for the smbfs and kernels > 2.1.70. + smbwrapper - A shared library that provides SMB client services + +Package: samba-common +Architecture: any +Depends: ${shlibs:Depends} +Replaces: samba (<= 2.0.5a-2) +Description: Samba common files used by both the server and the client. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Description: A LanManager like simple client for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the client components of the Samba suite. + +Package: swat +Architecture: any +Depends: samba, ${shlibs:Depends} +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration fo the Samba server. + +Package: samba-doc +Architecture: all +Description: Samba documentation. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: smbfsx +Conflicts: smbfsx +Description: Mount and umount commands for the smbfs (2.0.x and 2.1.x kernels) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + Lan Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + Starting with the Debian Samba packages version 2.0.4b-2, the old smbfs + utilities for 2.0.x and the new smbfs utilities for 2.2.x kernels have been + merged in a single package called smbfs. A wrapper script called smbmount.sh + identifies the version of the kernel running and calls the correct binary. + +Package: smbwrapper +Section: otherosfs +Priority: optional +Architecture: any +Depends: ${shlibs:Depends} +Description: A shared library that provides SMB client services + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains prelodable shared library that provides SMB client + services for existing executables. Using this you can simulate a smb + filesystem. diff --git a/packaging/Debian/debian/copyright b/packaging/Debian/debian/copyright new file mode 100644 index 00000000000..95bac89a540 --- /dev/null +++ b/packaging/Debian/debian/copyright @@ -0,0 +1,36 @@ +This is the Debian Linux prepackaged version of the Samba SMB +(LAN-Manager) server. Samba was written by Andrew Tridgell + and many others. + +This package was put together by Eloy Paris +based on previous work by Klee Dienes , +Andrew Howell and Bruce Perens +from sources found at . + +As of early in the samba-2.0.0alpha series, the Samba package for Debian +was split into the following packages: + +- samba (the Samba server) +- smbclient (a LAN Manager client - like the ftp program) +- swat (Samba Web Administration Tool) +- smbfs (smbfs userland utilities for kernels > 2.0.x) +- samba-doc (Samba documentation). + +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/debian/libpam-smbpass.files b/packaging/Debian/debian/libpam-smbpass.files new file mode 100644 index 00000000000..4263df5c0f0 --- /dev/null +++ b/packaging/Debian/debian/libpam-smbpass.files @@ -0,0 +1 @@ +lib/security/pam_smbpass.so diff --git a/packaging/Debian/debian/libsmbclient-dev.files b/packaging/Debian/debian/libsmbclient-dev.files new file mode 100644 index 00000000000..3ca6033fe7b --- /dev/null +++ b/packaging/Debian/debian/libsmbclient-dev.files @@ -0,0 +1,2 @@ +usr/lib/libsmbclient.a +usr/include/libsmbclient.h diff --git a/packaging/Debian/debian/libsmbclient.files b/packaging/Debian/debian/libsmbclient.files new file mode 100644 index 00000000000..18b7f3b1654 --- /dev/null +++ b/packaging/Debian/debian/libsmbclient.files @@ -0,0 +1,2 @@ +usr/lib/libsmbclient.so.0.1 +usr/lib/libsmbclient.so.0 diff --git a/packaging/Debian/debian/libsmbclient.postinst b/packaging/Debian/debian/libsmbclient.postinst new file mode 100644 index 00000000000..76f61de067a --- /dev/null +++ b/packaging/Debian/debian/libsmbclient.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +# +# postinst script for libsmbclient +# + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/libsmbclient.shlibs b/packaging/Debian/debian/libsmbclient.shlibs new file mode 100644 index 00000000000..74329f2c08d --- /dev/null +++ b/packaging/Debian/debian/libsmbclient.shlibs @@ -0,0 +1 @@ +libsmbclient 0.1 libsmbclient (>= 2.2.2-11) diff --git a/packaging/Debian/debian/mksmbpasswd.8 b/packaging/Debian/debian/mksmbpasswd.8 new file mode 100644 index 00000000000..0a500102e8a --- /dev/null +++ b/packaging/Debian/debian/mksmbpasswd.8 @@ -0,0 +1,28 @@ +.TH MKSMBPASSWD 8 12-Apr-1998 +.SH NAME +mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file +.SH SYNOPSIS +mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd +.SH DESCRIPTION +.B mksmbpasswd +should be used only once, the first time Samba is installed. The idea +is to ease accounts creation by transferring all user accounts from +/etc/passwd to /etc/samba/smbpasswd. +.PP +Please note that passwords are not transferred automatically from +/etc/passwd to the new /etc/samba/smbpasswd file. After running +.B mksmbpasswd +all accounts are disabled so the system administrator must run +smbpasswd for each account that needs to be enable. +.SH FILES +.TP +/etc/passwd +System wide accounts file +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris (man page based on sendmailconfig's man page +by Robert Leslie ) diff --git a/packaging/Debian/debian/mksmbpasswd.awk b/packaging/Debian/debian/mksmbpasswd.awk new file mode 100644 index 00000000000..a7b41a725d3 --- /dev/null +++ b/packaging/Debian/debian/mksmbpasswd.awk @@ -0,0 +1,5 @@ +#!/usr/bin/awk -f +BEGIN {FS=":" + printf("#\n# SMB password file.\n#\n") + } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/debian/patches/Makefile.patch b/packaging/Debian/debian/patches/Makefile.patch new file mode 100644 index 00000000000..2b28da5c3a9 --- /dev/null +++ b/packaging/Debian/debian/patches/Makefile.patch @@ -0,0 +1,49 @@ +--- samba-2.2.2.cvs20020120.orig/source/Makefile.in ++++ samba-2.2.2.cvs20020120/source/Makefile.in +@@ -91,7 +91,7 @@ + + SPROGS = bin/smbd bin/nmbd bin/swat + PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/make_printerdef @RUNPROG@ +-PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ ++PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@ + MPROGS = @MPROGS@ + LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) + PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup +@@ -614,13 +614,15 @@ + @echo Linking shared library $@ + @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) + +-libsmbclient: $(LIBSMBCLIENT_PICOBJS) +- @echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@ +- @$(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ \ ++bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS) ++ @echo Linking libsmbclient shared library $@ ++ @$(SHLD) @LDSHFLAGS@ -o $@ \ + $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ + @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR) +- @echo Linking libsmbclient non-shared library bin/$@.a +- @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) ++ ++bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) ++ @echo Linking libsmbclient non-shared library $@ ++ @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS) + + bin/smbsh: $(SMBSH_OBJ) bin/.dummy + @echo Linking $@ +@@ -673,10 +675,12 @@ + installswat: installdirs + @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir) + +-installclientlib: +- -$(INSTALLCMD) bin/libsmbclient.so +- -$(INSTALLCMD) -d ${prefix}/include +- -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include ++installclientlib: bin/libsmbclient.so bin/libsmbclient.a ++ # Installed (in the wrong location, BTW) by installbin above (peloy@debian.org) ++ # -$(INSTALLCMD) bin/libsmbclient.so $(BASEDIR)/lib ++ # -$(INSTALLCMD) bin/libsmbclient.a $(BASEDIR)/lib ++ -$(INSTALLCMD) -d $(INCLUDEDIR) ++ -$(INSTALLCMD) include/libsmbclient.h $(INCLUDEDIR) + + # revert to the previously installed version + revert: diff --git a/packaging/Debian/debian/patches/configure.patch b/packaging/Debian/debian/patches/configure.patch new file mode 100644 index 00000000000..497455120d3 --- /dev/null +++ b/packaging/Debian/debian/patches/configure.patch @@ -0,0 +1,6044 @@ +--- samba-2.2.2.cvs20020120.orig/source/configure ++++ samba-2.2.2.cvs20020120/source/configure +@@ -1077,7 +1077,7 @@ + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-for ac_prog in gawk mawk nawk awk ++for ac_prog in mawk gawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +@@ -1537,6 +1537,47 @@ + rm -fr conftest* + fi + ++ if test x$LINUX_LFS_SUPPORT = xyes ; then ++ if test "$cross_compiling" = yes; then ++ LINUX_LFS_SUPPORT=cross ++else ++ cat > conftest.$ac_ext < ++#include ++#include ++main() { ++ unsigned int *padding; ++ struct flock foo_lock = {F_WRLCK, SEEK_SET, 0, 1, 0}; ++ int fd = open("/dev/null", O_RDWR); ++ ++ /* Yes, we're depending on the internals of the Linux flock structure ++ here -- but this test is explicitly Linux-specific to begin with. */ ++ padding = (unsigned int *)&foo_lock; ++ padding[1] = 0xffffffff; ++ foo_lock.l_start = 0; ++ if (fcntl(fd, F_SETLK, &foo_lock) < 0) ++ exit(1); ++ ++ exit(0); ++} ++ ++EOF ++if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++then ++ LINUX_LFS_SUPPORT=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -fr conftest* ++ LINUX_LFS_SUPPORT=no ++fi ++rm -fr conftest* ++fi ++ ++ fi + CPPFLAGS="$old_CPPFLAGS" + if test x$LINUX_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" +@@ -1546,14 +1587,14 @@ + + *hurd*) + echo $ac_n "checking for LFS support""... $ac_c" 1>&6 +-echo "configure:1550: checking for LFS support" >&5 ++echo "configure:1591: 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 < +@@ -1565,7 +1606,7 @@ + #endif + } + EOF +-if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1610: \"$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 +@@ -1587,21 +1628,21 @@ + esac + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:1591: checking for inline" >&5 ++echo "configure:1632: checking for inline" >&5 + if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +@@ -1627,7 +1668,7 @@ + esac + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1631: checking how to run the C preprocessor" >&5 ++echo "configure:1672: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1642,13 +1683,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1693: \"$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 + : +@@ -1659,13 +1700,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1710: \"$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 + : +@@ -1676,13 +1717,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1727: \"$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 + : +@@ -1707,12 +1748,12 @@ + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1711: checking for ANSI C header files" >&5 ++echo "configure:1752: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1720,7 +1761,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1765: \"$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* +@@ -1737,7 +1778,7 @@ + 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 +@@ -1755,7 +1796,7 @@ + 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 +@@ -1776,7 +1817,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -1787,7 +1828,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -1815,12 +1856,12 @@ + 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:1819: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:1860: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -1828,7 +1869,7 @@ + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -1853,7 +1894,7 @@ + # 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:1857: checking for opendir in -ldir" >&5 ++echo "configure:1898: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1861,7 +1902,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1917: \"$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 +@@ -1894,7 +1935,7 @@ + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:1898: checking for opendir in -lx" >&5 ++echo "configure:1939: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1902,7 +1943,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1958: \"$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 +@@ -1936,12 +1977,12 @@ + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:1940: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:1981: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1950,7 +1991,7 @@ + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -1971,12 +2012,12 @@ + fi + + echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +-echo "configure:1975: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++echo "configure:2016: checking for sys/wait.h that is POSIX.1 compatible" >&5 + if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1992,7 +2033,7 @@ + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; return 0; } + EOF +-if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes + else +@@ -2016,17 +2057,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2020: checking for $ac_hdr" >&5 ++echo "configure:2061: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2071: \"$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* +@@ -2056,17 +2097,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2060: checking for $ac_hdr" >&5 ++echo "configure:2101: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2111: \"$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* +@@ -2096,17 +2137,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2100: checking for $ac_hdr" >&5 ++echo "configure:2141: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2151: \"$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* +@@ -2136,17 +2177,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2140: checking for $ac_hdr" >&5 ++echo "configure:2181: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2191: \"$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* +@@ -2176,17 +2217,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2180: checking for $ac_hdr" >&5 ++echo "configure:2221: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2231: \"$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* +@@ -2216,17 +2257,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2220: checking for $ac_hdr" >&5 ++echo "configure:2261: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2271: \"$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* +@@ -2256,17 +2297,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2260: checking for $ac_hdr" >&5 ++echo "configure:2301: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2311: \"$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* +@@ -2296,17 +2337,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2300: checking for $ac_hdr" >&5 ++echo "configure:2341: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2351: \"$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* +@@ -2340,14 +2381,14 @@ + case "$host_os" in + *hpux*) + cat > conftest.$ac_ext < + int main() { + struct spwd testme + ; return 0; } + EOF +-if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_shadow_h=yes + else +@@ -2369,17 +2410,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2373: checking for $ac_hdr" >&5 ++echo "configure:2414: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2424: \"$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* +@@ -2409,17 +2450,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2413: checking for $ac_hdr" >&5 ++echo "configure:2454: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2464: \"$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* +@@ -2449,17 +2490,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2453: checking for $ac_hdr" >&5 ++echo "configure:2494: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2504: \"$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* +@@ -2489,17 +2530,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2493: checking for $ac_hdr" >&5 ++echo "configure:2534: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2544: \"$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* +@@ -2529,17 +2570,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2533: checking for $ac_hdr" >&5 ++echo "configure:2574: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2584: \"$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* +@@ -2571,17 +2612,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2575: checking for $ac_hdr" >&5 ++echo "configure:2616: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2626: \"$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* +@@ -2613,17 +2654,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2617: checking for $ac_hdr" >&5 ++echo "configure:2658: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2668: \"$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* +@@ -2655,17 +2696,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2659: checking for $ac_hdr" >&5 ++echo "configure:2700: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2710: \"$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* +@@ -2693,7 +2734,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:2697: checking size of int" >&5 ++echo "configure:2738: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2701,18 +2742,19 @@ + ac_cv_sizeof_int=cross + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2758: \"$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 +@@ -2732,7 +2774,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:2736: checking size of long" >&5 ++echo "configure:2778: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2740,18 +2782,19 @@ + ac_cv_sizeof_long=cross + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2798: \"$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 +@@ -2771,7 +2814,7 @@ + + + echo $ac_n "checking size of short""... $ac_c" 1>&6 +-echo "configure:2775: checking size of short" >&5 ++echo "configure:2818: checking size of short" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2779,18 +2822,19 @@ + ac_cv_sizeof_short=cross + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(short)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2838: \"$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 +@@ -2811,12 +2855,12 @@ + + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:2815: checking for working const" >&5 ++echo "configure:2859: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -2886,21 +2930,21 @@ + fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:2890: checking for inline" >&5 ++echo "configure:2934: checking for inline" >&5 + if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +@@ -2926,14 +2970,14 @@ + esac + + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +-echo "configure:2930: checking whether byte ordering is bigendian" >&5 ++echo "configure:2974: checking whether byte ordering is bigendian" >&5 + if eval "test \"`echo '$''{'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 < + #include +@@ -2944,11 +2988,11 @@ + #endif + ; return 0; } + EOF +-if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2992: \"$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 < + #include +@@ -2959,7 +3003,7 @@ + #endif + ; return 0; } + EOF +-if { (eval echo configure:2963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes + else +@@ -2979,7 +3023,7 @@ + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3040: \"$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 +@@ -3016,14 +3060,14 @@ + fi + + echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 +-echo "configure:3020: checking whether char is unsigned" >&5 ++echo "configure:3064: checking whether char is unsigned" >&5 + if eval "test \"`echo '$''{'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 <&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3103: \"$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 +@@ -3080,12 +3124,12 @@ + + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:3084: checking return type of signal handlers" >&5 ++echo "configure:3128: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -3102,7 +3146,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -3121,12 +3165,12 @@ + + + echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +-echo "configure:3125: checking for uid_t in sys/types.h" >&5 ++echo "configure:3169: checking for uid_t in sys/types.h" >&5 + if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF +@@ -3155,12 +3199,12 @@ + fi + + echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +-echo "configure:3159: checking for mode_t" >&5 ++echo "configure:3203: checking for mode_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3188,12 +3232,12 @@ + fi + + echo $ac_n "checking for off_t""... $ac_c" 1>&6 +-echo "configure:3192: checking for off_t" >&5 ++echo "configure:3236: checking for off_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3221,12 +3265,12 @@ + fi + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:3225: checking for size_t" >&5 ++echo "configure:3269: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3254,12 +3298,12 @@ + fi + + echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:3258: checking for pid_t" >&5 ++echo "configure:3302: checking for pid_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3287,12 +3331,12 @@ + fi + + echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +-echo "configure:3291: checking for st_rdev in struct stat" >&5 ++echo "configure:3335: checking for st_rdev in struct stat" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -3300,7 +3344,7 @@ + struct stat s; s.st_rdev; + ; return 0; } + EOF +-if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes + else +@@ -3321,12 +3365,12 @@ + fi + + echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 +-echo "configure:3325: checking for d_off in dirent" >&5 ++echo "configure:3369: checking for d_off in dirent" >&5 + if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -3336,7 +3380,7 @@ + struct dirent d; d.d_off; + ; return 0; } + EOF +-if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_dirent_d_off=yes + else +@@ -3357,12 +3401,12 @@ + fi + + echo $ac_n "checking for ino_t""... $ac_c" 1>&6 +-echo "configure:3361: checking for ino_t" >&5 ++echo "configure:3405: checking for ino_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3390,12 +3434,12 @@ + fi + + echo $ac_n "checking for loff_t""... $ac_c" 1>&6 +-echo "configure:3394: checking for loff_t" >&5 ++echo "configure:3438: checking for loff_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3423,12 +3467,12 @@ + fi + + echo $ac_n "checking for offset_t""... $ac_c" 1>&6 +-echo "configure:3427: checking for offset_t" >&5 ++echo "configure:3471: checking for offset_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3456,12 +3500,12 @@ + fi + + echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +-echo "configure:3460: checking for ssize_t" >&5 ++echo "configure:3504: checking for ssize_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3489,12 +3533,12 @@ + fi + + echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 +-echo "configure:3493: checking for wchar_t" >&5 ++echo "configure:3537: checking for wchar_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -3526,7 +3570,7 @@ + # for cups support we need libcups, and a handful of header files + + echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 +-echo "configure:3530: checking for httpConnect in -lcups" >&5 ++echo "configure:3574: checking for httpConnect in -lcups" >&5 + ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3534,7 +3578,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcups $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3593: \"$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 +@@ -3580,17 +3624,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:3584: checking for $ac_hdr" >&5 ++echo "configure:3628: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:3594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:3638: \"$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* +@@ -3629,7 +3673,7 @@ + ############################################ + # we need libdl for PAM and the new VFS code + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:3633: checking for dlopen in -ldl" >&5 ++echo "configure:3677: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -3637,7 +3681,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3696: \"$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 +@@ -3676,13 +3720,13 @@ + ############################################ + # check if the compiler can do immediate structures + echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 +-echo "configure:3680: checking for immediate structures" >&5 ++echo "configure:3724: checking for immediate structures" >&5 + if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -3694,7 +3738,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_immediate_structures=yes + else +@@ -3717,13 +3761,13 @@ + ############################################ + # check for unix domain sockets + echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 +-echo "configure:3721: checking for unix domain sockets" >&5 ++echo "configure:3765: checking for unix domain sockets" >&5 + if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -3738,7 +3782,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_unixsocket=yes + else +@@ -3759,13 +3803,13 @@ + fi + + echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 +-echo "configure:3763: checking for socklen_t type" >&5 ++echo "configure:3807: checking for socklen_t type" >&5 + if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -3778,7 +3822,7 @@ + socklen_t i = 0 + ; return 0; } + EOF +-if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_socklen_t=yes + else +@@ -3799,13 +3843,13 @@ + fi + + echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 +-echo "configure:3803: checking for sig_atomic_t type" >&5 ++echo "configure:3847: checking for sig_atomic_t type" >&5 + if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -3818,7 +3862,7 @@ + sig_atomic_t i = 0 + ; return 0; } + EOF +-if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_sig_atomic_t=yes + else +@@ -3841,20 +3885,20 @@ + # stupid headers have the functions but no declaration. grrrr. + + echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 +-echo "configure:3845: checking for errno declaration" >&5 ++echo "configure:3889: checking for errno declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)errno + ; return 0; } + EOF +-if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_errno_decl=yes + else +@@ -3876,20 +3920,20 @@ + + + echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 +-echo "configure:3880: checking for setresuid declaration" >&5 ++echo "configure:3924: checking for setresuid declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)setresuid + ; return 0; } + EOF +-if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_setresuid_decl=yes + else +@@ -3911,20 +3955,20 @@ + + + echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 +-echo "configure:3915: checking for setresgid declaration" >&5 ++echo "configure:3959: checking for setresgid declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)setresgid + ; return 0; } + EOF +-if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_setresgid_decl=yes + else +@@ -3946,20 +3990,20 @@ + + + echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 +-echo "configure:3950: checking for asprintf declaration" >&5 ++echo "configure:3994: checking for asprintf declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)asprintf + ; return 0; } + EOF +-if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_asprintf_decl=yes + else +@@ -3981,20 +4025,20 @@ + + + echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 +-echo "configure:3985: checking for vasprintf declaration" >&5 ++echo "configure:4029: checking for vasprintf declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)vasprintf + ; return 0; } + EOF +-if { (eval echo configure:3998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_vasprintf_decl=yes + else +@@ -4016,20 +4060,20 @@ + + + echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 +-echo "configure:4020: checking for vsnprintf declaration" >&5 ++echo "configure:4064: checking for vsnprintf declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)vsnprintf + ; return 0; } + EOF +-if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_vsnprintf_decl=yes + else +@@ -4051,20 +4095,20 @@ + + + echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 +-echo "configure:4055: checking for snprintf declaration" >&5 ++echo "configure:4099: checking for snprintf declaration" >&5 + if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + int i = (int)snprintf + ; return 0; } + EOF +-if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_snprintf_decl=yes + else +@@ -4088,7 +4132,7 @@ + # 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:4092: checking for real setresuid" >&5 ++echo "configure:4136: checking for real setresuid" >&5 + if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4097,12 +4141,12 @@ + samba_cv_have_setresuid=cross + else + cat > conftest.$ac_ext < + main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} + EOF +-if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4150: \"$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 +@@ -4127,7 +4171,7 @@ + # Do the same check for setresguid... + # + echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 +-echo "configure:4131: checking for real setresgid" >&5 ++echo "configure:4175: checking for real setresgid" >&5 + if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4136,13 +4180,13 @@ + samba_cv_have_setresgid=cross + else + cat > conftest.$ac_ext < + #include + main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} + EOF +-if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4190: \"$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 +@@ -4165,7 +4209,7 @@ + fi + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +-echo "configure:4169: checking for 8-bit clean memcmp" >&5 ++echo "configure:4213: checking for 8-bit clean memcmp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4173,7 +4217,7 @@ + ac_cv_func_memcmp_clean=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4231: \"$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 +@@ -4207,7 +4251,7 @@ + + # test for where we get readline() from + echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 +-echo "configure:4211: checking whether to use readline" >&5 ++echo "configure:4255: checking whether to use readline" >&5 + # Check whether --with-readline or --without-readline was given. + if test "${with_readline+set}" = set; then + withval="$with_readline" +@@ -4219,17 +4263,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4223: checking for $ac_hdr" >&5 ++echo "configure:4267: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4277: \"$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* +@@ -4259,17 +4303,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4263: checking for $ac_hdr" >&5 ++echo "configure:4307: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4317: \"$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* +@@ -4300,17 +4344,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4304: checking for $ac_hdr" >&5 ++echo "configure:4348: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4358: \"$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* +@@ -4333,7 +4377,7 @@ + + for termlib in ncurses curses termcap terminfo termlib; do + echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 +-echo "configure:4337: checking for tgetent in -l${termlib}" >&5 ++echo "configure:4381: checking for tgetent in -l${termlib}" >&5 + ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4341,7 +4385,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l${termlib} $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4400: \"$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 +@@ -4374,7 +4418,7 @@ + + done + echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 +-echo "configure:4378: checking for rl_callback_handler_install in -lreadline" >&5 ++echo "configure:4422: checking for rl_callback_handler_install in -lreadline" >&5 + ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4382,7 +4426,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $TERMLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4441: \"$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 +@@ -4444,17 +4488,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4448: checking for $ac_hdr" >&5 ++echo "configure:4492: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4502: \"$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* +@@ -4484,17 +4528,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4488: checking for $ac_hdr" >&5 ++echo "configure:4532: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4542: \"$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* +@@ -4525,17 +4569,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4529: checking for $ac_hdr" >&5 ++echo "configure:4573: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4583: \"$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* +@@ -4558,7 +4602,7 @@ + + for termlib in ncurses curses termcap terminfo termlib; do + echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 +-echo "configure:4562: checking for tgetent in -l${termlib}" >&5 ++echo "configure:4606: checking for tgetent in -l${termlib}" >&5 + ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4566,7 +4610,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l${termlib} $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4625: \"$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 +@@ -4599,7 +4643,7 @@ + + done + echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 +-echo "configure:4603: checking for rl_callback_handler_install in -lreadline" >&5 ++echo "configure:4647: checking for rl_callback_handler_install in -lreadline" >&5 + ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4607,7 +4651,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $TERMLIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4666: \"$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 +@@ -4673,12 +4717,12 @@ + for ac_func in connect + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4677: checking for $ac_func" >&5 ++echo "configure:4721: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4749: \"$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 +@@ -4729,7 +4773,7 @@ + case "$LIBS" in + *-lnsl*) ;; + *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 +-echo "configure:4733: checking for printf in -lnsl_s" >&5 ++echo "configure:4777: checking for printf in -lnsl_s" >&5 + ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4737,7 +4781,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl_s $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4796: \"$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 +@@ -4779,7 +4823,7 @@ + case "$LIBS" in + *-lnsl*) ;; + *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 +-echo "configure:4783: checking for printf in -lnsl" >&5 ++echo "configure:4827: checking for printf in -lnsl" >&5 + ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4787,7 +4831,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4846: \"$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 +@@ -4829,7 +4873,7 @@ + case "$LIBS" in + *-lsocket*) ;; + *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +-echo "configure:4833: checking for connect in -lsocket" >&5 ++echo "configure:4877: checking for connect in -lsocket" >&5 + ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4837,7 +4881,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4896: \"$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 +@@ -4879,7 +4923,7 @@ + case "$LIBS" in + *-linet*) ;; + *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 +-echo "configure:4883: checking for connect in -linet" >&5 ++echo "configure:4927: checking for connect in -linet" >&5 + ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4887,7 +4931,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linet $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4946: \"$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 +@@ -4942,12 +4986,12 @@ + for ac_func in yp_get_default_domain + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4946: checking for $ac_func" >&5 ++echo "configure:4990: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5018: \"$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 +@@ -4996,7 +5040,7 @@ + + if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then + echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +-echo "configure:5000: checking for yp_get_default_domain in -lnsl" >&5 ++echo "configure:5044: checking for yp_get_default_domain in -lnsl" >&5 + ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -5004,7 +5048,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5063: \"$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 +@@ -5045,12 +5089,12 @@ + for ac_func in execl + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5049: checking for $ac_func" >&5 ++echo "configure:5093: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5121: \"$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 +@@ -5106,12 +5150,12 @@ + for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5110: checking for $ac_func" >&5 ++echo "configure:5154: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5182: \"$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 +@@ -5161,12 +5205,12 @@ + for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5165: checking for $ac_func" >&5 ++echo "configure:5209: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5237: \"$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 +@@ -5216,12 +5260,12 @@ + for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5220: checking for $ac_func" >&5 ++echo "configure:5264: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5292: \"$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 +@@ -5271,12 +5315,12 @@ + for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5275: checking for $ac_func" >&5 ++echo "configure:5319: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5347: \"$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 +@@ -5326,12 +5370,12 @@ + for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5330: checking for $ac_func" >&5 ++echo "configure:5374: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5402: \"$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 +@@ -5381,12 +5425,12 @@ + for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5385: checking for $ac_func" >&5 ++echo "configure:5429: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5457: \"$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 +@@ -5436,12 +5480,12 @@ + for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5440: checking for $ac_func" >&5 ++echo "configure:5484: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5512: \"$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 +@@ -5491,12 +5535,12 @@ + for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5495: checking for $ac_func" >&5 ++echo "configure:5539: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5567: \"$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 +@@ -5546,12 +5590,12 @@ + for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5550: checking for $ac_func" >&5 ++echo "configure:5594: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5622: \"$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 +@@ -5601,12 +5645,12 @@ + for ac_func in syslog vsyslog + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5605: checking for $ac_func" >&5 ++echo "configure:5649: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5677: \"$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 +@@ -5658,12 +5702,12 @@ + for ac_func in syscall + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5662: checking for $ac_func" >&5 ++echo "configure:5706: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5734: \"$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 +@@ -5714,12 +5758,12 @@ + 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:5718: checking for $ac_func" >&5 ++echo "configure:5762: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5790: \"$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 +@@ -5769,12 +5813,12 @@ + 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:5773: checking for $ac_func" >&5 ++echo "configure:5817: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5845: \"$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 +@@ -5824,12 +5868,12 @@ + for ac_func in __getcwd _getcwd + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5828: checking for $ac_func" >&5 ++echo "configure:5872: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5900: \"$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 +@@ -5879,12 +5923,12 @@ + for ac_func in __xstat __fxstat __lxstat + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5883: checking for $ac_func" >&5 ++echo "configure:5927: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:5955: \"$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 +@@ -5934,12 +5978,12 @@ + for ac_func in _stat _lstat _fstat __stat __lstat __fstat + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:5938: checking for $ac_func" >&5 ++echo "configure:5982: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6010: \"$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 +@@ -5989,12 +6033,12 @@ + 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:5993: checking for $ac_func" >&5 ++echo "configure:6037: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6065: \"$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 +6088,12 @@ + for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6048: checking for $ac_func" >&5 ++echo "configure:6092: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6120: \"$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 +@@ -6099,12 +6143,12 @@ + 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:6103: checking for $ac_func" >&5 ++echo "configure:6147: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6175: \"$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 +@@ -6154,12 +6198,12 @@ + for ac_func in _write __write _fork __fork + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6158: checking for $ac_func" >&5 ++echo "configure:6202: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6230: \"$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 +@@ -6209,12 +6253,12 @@ + for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6213: checking for $ac_func" >&5 ++echo "configure:6257: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6285: \"$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 +@@ -6264,12 +6308,12 @@ + 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:6268: checking for $ac_func" >&5 ++echo "configure:6312: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6340: \"$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 +@@ -6319,12 +6363,12 @@ + for ac_func in pread _pread __pread pread64 _pread64 __pread64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6323: checking for $ac_func" >&5 ++echo "configure:6367: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6395: \"$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 +@@ -6374,12 +6418,12 @@ + for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6378: checking for $ac_func" >&5 ++echo "configure:6422: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6450: \"$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 +@@ -6429,12 +6473,12 @@ + for ac_func in open64 _open64 __open64 creat64 + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6433: checking for $ac_func" >&5 ++echo "configure:6477: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6505: \"$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 +@@ -6488,9 +6532,9 @@ + + if test x$ac_cv_func_stat64 = xno ; then + echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 +-echo "configure:6492: checking for stat64 in " >&5 ++echo "configure:6536: checking for stat64 in " >&5 + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_stat64=yes + else +@@ -6521,9 +6565,9 @@ + + if test x$ac_cv_func_lstat64 = xno ; then + echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 +-echo "configure:6525: checking for lstat64 in " >&5 ++echo "configure:6569: checking for lstat64 in " >&5 + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_lstat64=yes + else +@@ -6554,9 +6598,9 @@ + + if test x$ac_cv_func_fstat64 = xno ; then + echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 +-echo "configure:6558: checking for fstat64 in " >&5 ++echo "configure:6602: checking for fstat64 in " >&5 + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_fstat64=yes + else +@@ -6593,7 +6637,7 @@ + + if test x$ac_cv_func_strcasecmp = xno ; then + echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 +-echo "configure:6597: checking for strcasecmp in -lresolv" >&5 ++echo "configure:6641: checking for strcasecmp in -lresolv" >&5 + ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -6601,7 +6645,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6660: \"$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 +@@ -6648,12 +6692,12 @@ + *-lsecurity*) for ac_func in putprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6652: checking for $ac_func" >&5 ++echo "configure:6696: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6724: \"$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 +@@ -6701,7 +6745,7 @@ + done + ;; + *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 +-echo "configure:6705: checking for putprpwnam in -lsecurity" >&5 ++echo "configure:6749: checking for putprpwnam in -lsecurity" >&5 + ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -6709,7 +6753,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsecurity $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6768: \"$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 +@@ -6750,12 +6794,12 @@ + for ac_func in putprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6754: checking for $ac_func" >&5 ++echo "configure:6798: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6826: \"$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 +@@ -6809,12 +6853,12 @@ + *-lsec*) for ac_func in putprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6813: checking for $ac_func" >&5 ++echo "configure:6857: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6885: \"$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 +@@ -6862,7 +6906,7 @@ + done + ;; + *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 +-echo "configure:6866: checking for putprpwnam in -lsec" >&5 ++echo "configure:6910: checking for putprpwnam in -lsec" >&5 + ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -6870,7 +6914,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsec $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6929: \"$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 +@@ -6911,12 +6955,12 @@ + for ac_func in putprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6915: checking for $ac_func" >&5 ++echo "configure:6959: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6987: \"$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 +@@ -6971,12 +7015,12 @@ + *-lsecurity*) for ac_func in set_auth_parameters + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6975: checking for $ac_func" >&5 ++echo "configure:7019: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7047: \"$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 +@@ -7024,7 +7068,7 @@ + done + ;; + *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 +-echo "configure:7028: checking for set_auth_parameters in -lsecurity" >&5 ++echo "configure:7072: checking for set_auth_parameters in -lsecurity" >&5 + ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7032,7 +7076,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsecurity $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7091: \"$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 +@@ -7073,12 +7117,12 @@ + for ac_func in set_auth_parameters + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7077: checking for $ac_func" >&5 ++echo "configure:7121: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7149: \"$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 +@@ -7132,12 +7176,12 @@ + *-lsec*) for ac_func in set_auth_parameters + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7136: checking for $ac_func" >&5 ++echo "configure:7180: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7208: \"$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 +@@ -7185,7 +7229,7 @@ + done + ;; + *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 +-echo "configure:7189: checking for set_auth_parameters in -lsec" >&5 ++echo "configure:7233: checking for set_auth_parameters in -lsec" >&5 + ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7193,7 +7237,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsec $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7252: \"$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 +@@ -7234,12 +7278,12 @@ + for ac_func in set_auth_parameters + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7238: checking for $ac_func" >&5 ++echo "configure:7282: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7310: \"$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 +@@ -7295,12 +7339,12 @@ + *-lgen*) for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7299: checking for $ac_func" >&5 ++echo "configure:7343: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7371: \"$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 +@@ -7348,7 +7392,7 @@ + done + ;; + *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 +-echo "configure:7352: checking for getspnam in -lgen" >&5 ++echo "configure:7396: checking for getspnam in -lgen" >&5 + ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7356,7 +7400,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgen $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7415: \"$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 +@@ -7397,12 +7441,12 @@ + for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7401: checking for $ac_func" >&5 ++echo "configure:7445: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7473: \"$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 +@@ -7457,12 +7501,12 @@ + *-lsecurity*) for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7461: checking for $ac_func" >&5 ++echo "configure:7505: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7533: \"$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 +@@ -7510,7 +7554,7 @@ + done + ;; + *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 +-echo "configure:7514: checking for getspnam in -lsecurity" >&5 ++echo "configure:7558: checking for getspnam in -lsecurity" >&5 + ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7518,7 +7562,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsecurity $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7577: \"$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 +@@ -7559,12 +7603,12 @@ + for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7563: checking for $ac_func" >&5 ++echo "configure:7607: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7635: \"$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 +@@ -7618,12 +7662,12 @@ + *-lsec*) for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7622: checking for $ac_func" >&5 ++echo "configure:7666: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7694: \"$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 +@@ -7671,7 +7715,7 @@ + done + ;; + *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 +-echo "configure:7675: checking for getspnam in -lsec" >&5 ++echo "configure:7719: checking for getspnam in -lsec" >&5 + ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7679,7 +7723,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsec $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7738: \"$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 +@@ -7720,12 +7764,12 @@ + for ac_func in getspnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7724: checking for $ac_func" >&5 ++echo "configure:7768: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7796: \"$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 +@@ -7780,12 +7824,12 @@ + *-lsecurity*) for ac_func in bigcrypt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7784: checking for $ac_func" >&5 ++echo "configure:7828: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7856: \"$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 +@@ -7833,7 +7877,7 @@ + done + ;; + *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 +-echo "configure:7837: checking for bigcrypt in -lsecurity" >&5 ++echo "configure:7881: checking for bigcrypt in -lsecurity" >&5 + ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -7841,7 +7885,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsecurity $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7900: \"$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 +@@ -7882,12 +7926,12 @@ + for ac_func in bigcrypt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7886: checking for $ac_func" >&5 ++echo "configure:7930: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:7958: \"$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 +@@ -7941,12 +7985,12 @@ + *-lsec*) for ac_func in bigcrypt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7945: checking for $ac_func" >&5 ++echo "configure:7989: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8017: \"$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 +@@ -7994,7 +8038,7 @@ + done + ;; + *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 +-echo "configure:7998: checking for bigcrypt in -lsec" >&5 ++echo "configure:8042: checking for bigcrypt in -lsec" >&5 + ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8002,7 +8046,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsec $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8061: \"$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 +@@ -8043,12 +8087,12 @@ + for ac_func in bigcrypt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8047: checking for $ac_func" >&5 ++echo "configure:8091: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8119: \"$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 +@@ -8103,12 +8147,12 @@ + *-lsecurity*) for ac_func in getprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8107: checking for $ac_func" >&5 ++echo "configure:8151: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8179: \"$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 +@@ -8156,7 +8200,7 @@ + done + ;; + *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 +-echo "configure:8160: checking for getprpwnam in -lsecurity" >&5 ++echo "configure:8204: checking for getprpwnam in -lsecurity" >&5 + ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8164,7 +8208,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsecurity $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8223: \"$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 +@@ -8205,12 +8249,12 @@ + for ac_func in getprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8209: checking for $ac_func" >&5 ++echo "configure:8253: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8281: \"$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 +@@ -8264,12 +8308,12 @@ + *-lsec*) for ac_func in getprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8268: checking for $ac_func" >&5 ++echo "configure:8312: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8340: \"$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 +@@ -8317,7 +8361,7 @@ + done + ;; + *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 +-echo "configure:8321: checking for getprpwnam in -lsec" >&5 ++echo "configure:8365: checking for getprpwnam in -lsec" >&5 + ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -8325,7 +8369,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsec $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8384: \"$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 +@@ -8366,12 +8410,12 @@ + for ac_func in getprpwnam + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:8370: checking for $ac_func" >&5 ++echo "configure:8414: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:8442: \"$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 +@@ -8437,7 +8481,7 @@ + # Assume non-shared by default and override below + BLDSHARED="false" + echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 +-echo "configure:8441: checking ability to build shared libraries" >&5 ++echo "configure:8485: checking ability to build shared libraries" >&5 + + # and these are for particular systems + case "$host_os" in +@@ -8572,7 +8616,7 @@ + *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:8576: checking for $ac_word" >&5 ++echo "configure:8620: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8626,15 +8670,15 @@ + esac + echo "$ac_t""$BLDSHARED" 1>&6 + echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 +-echo "configure:8630: checking linker flags for shared libraries" >&5 ++echo "configure:8674: checking linker flags for shared libraries" >&5 + echo "$ac_t""$LDSHFLAGS" 1>&6 + echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 +-echo "configure:8633: checking compiler flags for position-independent code" >&5 ++echo "configure:8677: checking compiler flags for position-independent code" >&5 + echo "$ac_t""$PICFLAGS" 1>&6 + + # 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:8638: checking whether ${CC-cc} accepts -fpic" >&5 ++echo "configure:8682: checking whether ${CC-cc} accepts -fpic" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8654,7 +8698,7 @@ + fi + if test x$PICFLAG = x; then + echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6 +-echo "configure:8658: checking whether ${CC-cc} accepts -KPIC" >&5 ++echo "configure:8702: checking whether ${CC-cc} accepts -KPIC" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8675,7 +8719,7 @@ + fi + if test x$PICFLAG = x; then + echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6 +-echo "configure:8679: checking whether ${CC-cc} accepts -Kpic" >&5 ++echo "configure:8723: checking whether ${CC-cc} accepts -Kpic" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8698,7 +8742,7 @@ + ################ + + echo $ac_n "checking for long long""... $ac_c" 1>&6 +-echo "configure:8702: checking for long long" >&5 ++echo "configure:8746: checking for long long" >&5 + if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8707,12 +8751,12 @@ + samba_cv_have_longlong=cross + else + cat > conftest.$ac_ext < + main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } + EOF +-if { (eval echo configure:8716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8760: \"$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 +@@ -8739,20 +8783,20 @@ + # AIX needs this. + + echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 +-echo "configure:8743: checking for LL suffix on long long integers" >&5 ++echo "configure:8787: checking for LL suffix on long long integers" >&5 + if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + long long i = 0x8000000000LL + ; return 0; } + EOF +-if { (eval echo configure:8756: \"$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_compiler_supports_ll=yes + else +@@ -8774,7 +8818,7 @@ + + + echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 +-echo "configure:8778: checking for 64 bit off_t" >&5 ++echo "configure:8822: checking for 64 bit off_t" >&5 + if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8783,13 +8827,13 @@ + samba_cv_SIZEOF_OFF_T=cross + else + cat > conftest.$ac_ext < + #include + main() { exit((sizeof(off_t) == 8) ? 0 : 1); } + EOF +-if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8837: \"$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 +@@ -8812,7 +8856,7 @@ + fi + + echo $ac_n "checking for off64_t""... $ac_c" 1>&6 +-echo "configure:8816: checking for off64_t" >&5 ++echo "configure:8860: checking for off64_t" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8821,7 +8865,7 @@ + samba_cv_HAVE_OFF64_T=cross + else + cat > conftest.$ac_ext < + 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:8835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8879: \"$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 +@@ -8854,7 +8898,7 @@ + fi + + echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 +-echo "configure:8858: checking for 64 bit ino_t" >&5 ++echo "configure:8902: checking for 64 bit ino_t" >&5 + if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8863,13 +8907,13 @@ + samba_cv_SIZEOF_INO_T=cross + else + cat > conftest.$ac_ext < + #include + main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } + EOF +-if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8917: \"$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 +@@ -8892,7 +8936,7 @@ + fi + + echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 +-echo "configure:8896: checking for ino64_t" >&5 ++echo "configure:8940: checking for ino64_t" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8901,7 +8945,7 @@ + samba_cv_HAVE_INO64_T=cross + else + cat > conftest.$ac_ext < + 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:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:8959: \"$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 +@@ -8934,7 +8978,7 @@ + fi + + echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 +-echo "configure:8938: checking for dev64_t" >&5 ++echo "configure:8982: checking for dev64_t" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8943,7 +8987,7 @@ + samba_cv_HAVE_DEV64_T=cross + else + cat > conftest.$ac_ext < + main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } + EOF +-if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_DEV64_T=yes + else +@@ -8976,13 +9020,13 @@ + fi + + echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 +-echo "configure:8980: checking for struct dirent64" >&5 ++echo "configure:9024: checking for struct dirent64" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_STRUCT_DIRENT64=yes + else +@@ -9015,7 +9059,7 @@ + fi + + echo $ac_n "checking for major macro""... $ac_c" 1>&6 +-echo "configure:9019: checking for major macro" >&5 ++echo "configure:9063: checking for major macro" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9024,7 +9068,7 @@ + samba_cv_HAVE_DEVICE_MAJOR_FN=cross + else + cat > conftest.$ac_ext < + main() { dev_t dev; int i = major(dev); return 0; } + EOF +-if { (eval echo configure:9037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_DEVICE_MAJOR_FN=yes + else +@@ -9056,7 +9100,7 @@ + fi + + echo $ac_n "checking for minor macro""... $ac_c" 1>&6 +-echo "configure:9060: checking for minor macro" >&5 ++echo "configure:9104: checking for minor macro" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9065,7 +9109,7 @@ + samba_cv_HAVE_DEVICE_MINOR_FN=cross + else + cat > conftest.$ac_ext < + main() { dev_t dev; int i = minor(dev); return 0; } + EOF +-if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_DEVICE_MINOR_FN=yes + else +@@ -9097,7 +9141,7 @@ + fi + + echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 +-echo "configure:9101: checking for makedev macro" >&5 ++echo "configure:9145: checking for makedev macro" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9106,7 +9150,7 @@ + samba_cv_HAVE_MAKEDEV_FN=cross + else + cat > conftest.$ac_ext < + main() { dev_t dev = makedev(1,2); return 0; } + EOF +-if { (eval echo configure:9119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_MAKEDEV_FN=yes + else +@@ -9138,7 +9182,7 @@ + fi + + echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 +-echo "configure:9142: checking for unsigned char" >&5 ++echo "configure:9186: checking for unsigned char" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9147,12 +9191,12 @@ + samba_cv_HAVE_UNSIGNED_CHAR=cross + else + cat > conftest.$ac_ext < + main() { char c; c=250; exit((c > 0)?0:1); } + EOF +-if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9200: \"$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 +@@ -9175,13 +9219,13 @@ + fi + + echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 +-echo "configure:9179: checking for sin_len in sock" >&5 ++echo "configure:9223: checking for sin_len in sock" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9190,7 +9234,7 @@ + struct sockaddr_in sock; sock.sin_len = sizeof(sock); + ; return 0; } + EOF +-if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_SOCK_SIN_LEN=yes + else +@@ -9211,13 +9255,13 @@ + fi + + echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 +-echo "configure:9215: checking whether seekdir returns void" >&5 ++echo "configure:9259: checking whether seekdir returns void" >&5 + if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9226,7 +9270,7 @@ + return 0; + ; return 0; } + EOF +-if { (eval echo configure:9230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_SEEKDIR_RETURNS_VOID=yes + else +@@ -9247,20 +9291,20 @@ + fi + + echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 +-echo "configure:9251: checking for __FILE__ macro" >&5 ++echo "configure:9295: checking for __FILE__ macro" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + printf("%s\n", __FILE__); + ; return 0; } + EOF +-if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_FILE_MACRO=yes + else +@@ -9281,20 +9325,20 @@ + fi + + echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 +-echo "configure:9285: checking for __FUNCTION__ macro" >&5 ++echo "configure:9329: checking for __FUNCTION__ macro" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + int main() { + printf("%s\n", __FUNCTION__); + ; return 0; } + EOF +-if { (eval echo configure:9298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_FUNCTION_MACRO=yes + else +@@ -9315,7 +9359,7 @@ + fi + + echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 +-echo "configure:9319: checking if gettimeofday takes tz argument" >&5 ++echo "configure:9363: checking if gettimeofday takes tz argument" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9324,14 +9368,14 @@ + samba_cv_HAVE_GETTIMEOFDAY_TZ=cross + else + cat > conftest.$ac_ext < + #include + main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} + EOF +-if { (eval echo configure:9335: \"$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_GETTIMEOFDAY_TZ=yes + else +@@ -9354,7 +9398,7 @@ + fi + + echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 +-echo "configure:9358: checking for C99 vsnprintf" >&5 ++echo "configure:9402: checking for C99 vsnprintf" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9363,7 +9407,7 @@ + samba_cv_HAVE_C99_VSNPRINTF=cross + else + cat > conftest.$ac_ext < +@@ -9385,7 +9429,7 @@ + main() { foo("hello"); } + + EOF +-if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_C99_VSNPRINTF=yes + else +@@ -9408,7 +9452,7 @@ + fi + + echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 +-echo "configure:9412: checking for broken readdir" >&5 ++echo "configure:9456: checking for broken readdir" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9417,7 +9461,7 @@ + samba_cv_HAVE_BROKEN_READDIR=cross + else + cat > conftest.$ac_ext < + #include +@@ -9425,7 +9469,7 @@ + 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:9429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:9473: \"$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 +@@ -9448,13 +9492,13 @@ + fi + + echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 +-echo "configure:9452: checking for utimbuf" >&5 ++echo "configure:9496: checking for utimbuf" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9462,7 +9506,7 @@ + struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); + ; return 0; } + EOF +-if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UTIMBUF=yes + else +@@ -9486,12 +9530,12 @@ + for ac_func in pututline pututxline updwtmp updwtmpx getutmpx + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9490: checking for $ac_func" >&5 ++echo "configure:9534: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9562: \"$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 +@@ -9540,13 +9584,13 @@ + + + echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 +-echo "configure:9544: checking for ut_name in utmp" >&5 ++echo "configure:9588: checking for ut_name in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9554,7 +9598,7 @@ + struct utmp ut; ut.ut_name[0] = 'a'; + ; return 0; } + EOF +-if { (eval echo configure:9558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_NAME=yes + else +@@ -9575,13 +9619,13 @@ + fi + + echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 +-echo "configure:9579: checking for ut_user in utmp" >&5 ++echo "configure:9623: checking for ut_user in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9589,7 +9633,7 @@ + struct utmp ut; ut.ut_user[0] = 'a'; + ; return 0; } + EOF +-if { (eval echo configure:9593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_USER=yes + else +@@ -9610,13 +9654,13 @@ + fi + + echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 +-echo "configure:9614: checking for ut_id in utmp" >&5 ++echo "configure:9658: checking for ut_id in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9624,7 +9668,7 @@ + struct utmp ut; ut.ut_id[0] = 'a'; + ; return 0; } + EOF +-if { (eval echo configure:9628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_ID=yes + else +@@ -9645,13 +9689,13 @@ + fi + + echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 +-echo "configure:9649: checking for ut_host in utmp" >&5 ++echo "configure:9693: checking for ut_host in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9659,7 +9703,7 @@ + struct utmp ut; ut.ut_host[0] = 'a'; + ; return 0; } + EOF +-if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_HOST=yes + else +@@ -9680,13 +9724,13 @@ + fi + + echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 +-echo "configure:9684: checking for ut_time in utmp" >&5 ++echo "configure:9728: checking for ut_time in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9694,7 +9738,7 @@ + struct utmp ut; time_t t; ut.ut_time = t; + ; return 0; } + EOF +-if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TIME=yes + else +@@ -9715,13 +9759,13 @@ + fi + + echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 +-echo "configure:9719: checking for ut_tv in utmp" >&5 ++echo "configure:9763: checking for ut_tv in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9729,7 +9773,7 @@ + struct utmp ut; struct timeval tv; ut.ut_tv = tv; + ; return 0; } + EOF +-if { (eval echo configure:9733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TV=yes + else +@@ -9750,13 +9794,13 @@ + fi + + echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 +-echo "configure:9754: checking for ut_type in utmp" >&5 ++echo "configure:9798: checking for ut_type in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9764,7 +9808,7 @@ + struct utmp ut; ut.ut_type = 0; + ; return 0; } + EOF +-if { (eval echo configure:9768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TYPE=yes + else +@@ -9785,13 +9829,13 @@ + fi + + echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 +-echo "configure:9789: checking for ut_pid in utmp" >&5 ++echo "configure:9833: checking for ut_pid in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9799,7 +9843,7 @@ + struct utmp ut; ut.ut_pid = 0; + ; return 0; } + EOF +-if { (eval echo configure:9803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_PID=yes + else +@@ -9820,13 +9864,13 @@ + fi + + echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 +-echo "configure:9824: checking for ut_exit in utmp" >&5 ++echo "configure:9868: checking for ut_exit in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9834,7 +9878,7 @@ + struct utmp ut; ut.ut_exit.e_exit = 0; + ; return 0; } + EOF +-if { (eval echo configure:9838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_EXIT=yes + else +@@ -9855,13 +9899,13 @@ + fi + + echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 +-echo "configure:9859: checking for ut_addr in utmp" >&5 ++echo "configure:9903: checking for ut_addr in utmp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9869,7 +9913,7 @@ + struct utmp ut; ut.ut_addr = 0; + ; return 0; } + EOF +-if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_ADDR=yes + else +@@ -9891,13 +9935,13 @@ + + if test x$ac_cv_func_pututline = xyes ; then + echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 +-echo "configure:9895: checking whether pututline returns pointer" >&5 ++echo "configure:9939: checking whether pututline returns pointer" >&5 + if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9905,7 +9949,7 @@ + struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); + ; return 0; } + EOF +-if { (eval echo configure:9909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_PUTUTLINE_RETURNS_UTMP=yes + else +@@ -9927,13 +9971,13 @@ + fi + + echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 +-echo "configure:9931: checking for ut_syslen in utmpx" >&5 ++echo "configure:9975: checking for ut_syslen in utmpx" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -9941,7 +9985,7 @@ + struct utmpx ux; ux.ut_syslen = 0; + ; return 0; } + EOF +-if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UX_UT_SYSLEN=yes + else +@@ -9962,7 +10006,7 @@ + fi + + echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 +-echo "configure:9966: checking for Linux kernel oplocks" >&5 ++echo "configure:10010: checking for Linux kernel oplocks" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9971,7 +10015,7 @@ + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross + else + cat > conftest.$ac_ext < +@@ -9985,7 +10029,7 @@ + } + + EOF +-if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes + else +@@ -10008,7 +10052,7 @@ + fi + + echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 +-echo "configure:10012: checking for kernel change notify support" >&5 ++echo "configure:10056: checking for kernel change notify support" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10017,7 +10061,7 @@ + samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross + else + cat > conftest.$ac_ext < +@@ -10031,7 +10075,7 @@ + } + + 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 ++if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes + else +@@ -10054,7 +10098,7 @@ + fi + + echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 +-echo "configure:10058: checking for kernel share modes" >&5 ++echo "configure:10102: checking for kernel share modes" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10063,7 +10107,7 @@ + samba_cv_HAVE_KERNEL_SHARE_MODES=cross + else + cat > conftest.$ac_ext < +@@ -10079,7 +10123,7 @@ + } + + EOF +-if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_KERNEL_SHARE_MODES=yes + else +@@ -10105,13 +10149,13 @@ + + + echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 +-echo "configure:10109: checking for IRIX kernel oplock type definitions" >&5 ++echo "configure:10153: checking for IRIX kernel oplock type definitions" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -10119,7 +10163,7 @@ + oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; + ; return 0; } + EOF +-if { (eval echo configure:10123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes + else +@@ -10140,7 +10184,7 @@ + fi + + echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 +-echo "configure:10144: checking for irix specific capabilities" >&5 ++echo "configure:10188: checking for irix specific capabilities" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10149,7 +10193,7 @@ + samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross + else + cat > conftest.$ac_ext < + #include +@@ -10164,7 +10208,7 @@ + } + + 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 ++if { (eval echo configure:10212: \"$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 +@@ -10192,13 +10236,13 @@ + # + + echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +-echo "configure:10196: checking for int16 typedef included by rpc/rpc.h" >&5 ++echo "configure:10240: checking for int16 typedef included by rpc/rpc.h" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #if defined(HAVE_RPC_RPC_H) +@@ -10208,7 +10252,7 @@ + int16 testvar; + ; return 0; } + EOF +-if { (eval echo configure:10212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes + else +@@ -10229,13 +10273,13 @@ + fi + + echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +-echo "configure:10233: checking for uint16 typedef included by rpc/rpc.h" >&5 ++echo "configure:10277: checking for uint16 typedef included by rpc/rpc.h" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #if defined(HAVE_RPC_RPC_H) +@@ -10245,7 +10289,7 @@ + uint16 testvar; + ; return 0; } + EOF +-if { (eval echo configure:10249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes + else +@@ -10266,13 +10310,13 @@ + fi + + echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +-echo "configure:10270: checking for int32 typedef included by rpc/rpc.h" >&5 ++echo "configure:10314: checking for int32 typedef included by rpc/rpc.h" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #if defined(HAVE_RPC_RPC_H) +@@ -10282,7 +10326,7 @@ + int32 testvar; + ; return 0; } + EOF +-if { (eval echo configure:10286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes + else +@@ -10303,13 +10347,13 @@ + fi + + echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +-echo "configure:10307: checking for uint32 typedef included by rpc/rpc.h" >&5 ++echo "configure:10351: checking for uint32 typedef included by rpc/rpc.h" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #if defined(HAVE_RPC_RPC_H) +@@ -10319,7 +10363,7 @@ + uint32 testvar; + ; return 0; } + EOF +-if { (eval echo configure:10323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes + else +@@ -10341,13 +10385,13 @@ + + + echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 +-echo "configure:10345: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 ++echo "configure:10389: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #ifdef HAVE_SYS_SECURITY_H +@@ -10361,7 +10405,7 @@ + int testvar; + ; return 0; } + EOF +-if { (eval echo configure:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no + else +@@ -10382,16 +10426,16 @@ + fi + + echo $ac_n "checking for test routines""... $ac_c" 1>&6 +-echo "configure:10386: checking for test routines" >&5 ++echo "configure:10430: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10439: \"$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 +@@ -10405,7 +10449,7 @@ + + + echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 +-echo "configure:10409: checking for ftruncate extend" >&5 ++echo "configure:10453: checking for ftruncate extend" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10414,11 +10458,11 @@ + samba_cv_HAVE_FTRUNCATE_EXTEND=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10466: \"$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 +@@ -10441,7 +10485,7 @@ + fi + + echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 +-echo "configure:10445: checking for broken getgroups" >&5 ++echo "configure:10489: checking for broken getgroups" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10450,11 +10494,11 @@ + samba_cv_HAVE_BROKEN_GETGROUPS=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10502: \"$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 +@@ -10477,7 +10521,7 @@ + fi + + echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 +-echo "configure:10481: checking whether getpass should be replaced" >&5 ++echo "configure:10525: checking whether getpass should be replaced" >&5 + if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10485,7 +10529,7 @@ + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_REPLACE_GETPASS=yes + else +@@ -10521,7 +10565,7 @@ + fi + + echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 +-echo "configure:10525: checking for broken inet_ntoa" >&5 ++echo "configure:10569: checking for broken inet_ntoa" >&5 + if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10530,7 +10574,7 @@ + samba_cv_REPLACE_INET_NTOA=cross + else + cat > conftest.$ac_ext < +@@ -10544,7 +10588,7 @@ + strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } + exit(1);} + EOF +-if { (eval echo configure:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10592: \"$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 +@@ -10567,7 +10611,7 @@ + fi + + echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 +-echo "configure:10571: checking for secure mkstemp" >&5 ++echo "configure:10615: checking for secure mkstemp" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10576,7 +10620,7 @@ + samba_cv_HAVE_SECURE_MKSTEMP=cross + else + cat > conftest.$ac_ext < + #include +@@ -10593,7 +10637,7 @@ + exit(0); + } + EOF +-if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_SECURE_MKSTEMP=yes + else +@@ -10616,7 +10660,7 @@ + fi + + echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 +-echo "configure:10620: checking for sysconf(_SC_NGROUPS_MAX)" >&5 ++echo "configure:10664: checking for sysconf(_SC_NGROUPS_MAX)" >&5 + if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10625,12 +10669,12 @@ + samba_cv_SYSCONF_SC_NGROUPS_MAX=cross + else + cat > conftest.$ac_ext < + main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } + EOF +-if { (eval echo configure:10634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_SYSCONF_SC_NGROUPS_MAX=yes + else +@@ -10653,7 +10697,7 @@ + fi + + echo $ac_n "checking for root""... $ac_c" 1>&6 +-echo "configure:10657: checking for root" >&5 ++echo "configure:10701: checking for root" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10662,11 +10706,11 @@ + samba_cv_HAVE_ROOT=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10714: \"$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 +@@ -10694,7 +10738,7 @@ + # look for a method of finding the list of network interfaces + iface=no; + echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 +-echo "configure:10698: checking for iface AIX" >&5 ++echo "configure:10742: checking for iface AIX" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10703,7 +10747,7 @@ + samba_cv_HAVE_IFACE_AIX=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_IFACE_AIX=yes + else +@@ -10735,7 +10779,7 @@ + + if test $iface = no; then + echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 +-echo "configure:10739: checking for iface ifconf" >&5 ++echo "configure:10783: checking for iface ifconf" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10744,7 +10788,7 @@ + samba_cv_HAVE_IFACE_IFCONF=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_IFACE_IFCONF=yes + else +@@ -10777,7 +10821,7 @@ + + if test $iface = no; then + echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 +-echo "configure:10781: checking for iface ifreq" >&5 ++echo "configure:10825: checking for iface ifreq" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10786,7 +10830,7 @@ + samba_cv_HAVE_IFACE_IFREQ=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_IFACE_IFREQ=yes + else +@@ -10823,7 +10867,7 @@ + seteuid=no; + if test $seteuid = no; then + echo $ac_n "checking for setresuid""... $ac_c" 1>&6 +-echo "configure:10827: checking for setresuid" >&5 ++echo "configure:10871: checking for setresuid" >&5 + if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10832,7 +10876,7 @@ + samba_cv_USE_SETRESUID=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10888: \"$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 +@@ -10866,7 +10910,7 @@ + + if test $seteuid = no; then + echo $ac_n "checking for setreuid""... $ac_c" 1>&6 +-echo "configure:10870: checking for setreuid" >&5 ++echo "configure:10914: checking for setreuid" >&5 + if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10875,7 +10919,7 @@ + samba_cv_USE_SETREUID=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10931: \"$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 +@@ -10908,7 +10952,7 @@ + + if test $seteuid = no; then + echo $ac_n "checking for seteuid""... $ac_c" 1>&6 +-echo "configure:10912: checking for seteuid" >&5 ++echo "configure:10956: checking for seteuid" >&5 + if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10917,7 +10961,7 @@ + samba_cv_USE_SETEUID=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10973: \"$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 +@@ -10950,7 +10994,7 @@ + + if test $seteuid = no; then + echo $ac_n "checking for setuidx""... $ac_c" 1>&6 +-echo "configure:10954: checking for setuidx" >&5 ++echo "configure:10998: checking for setuidx" >&5 + if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -10959,7 +11003,7 @@ + samba_cv_USE_SETUIDX=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11015: \"$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 +@@ -10992,7 +11036,7 @@ + + + echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +-echo "configure:10996: checking for working mmap" >&5 ++echo "configure:11040: checking for working mmap" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11001,11 +11045,11 @@ + samba_cv_HAVE_MMAP=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_MMAP=yes + else +@@ -11028,7 +11072,7 @@ + fi + + echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 +-echo "configure:11032: checking for ftruncate needs root" >&5 ++echo "configure:11076: checking for ftruncate needs root" >&5 + if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11037,11 +11081,11 @@ + samba_cv_FTRUNCATE_NEEDS_ROOT=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_FTRUNCATE_NEEDS_ROOT=yes + else +@@ -11064,7 +11108,7 @@ + fi + + echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 +-echo "configure:11068: checking for fcntl locking" >&5 ++echo "configure:11112: checking for fcntl locking" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11073,11 +11117,11 @@ + samba_cv_HAVE_FCNTL_LOCK=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11125: \"$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 +@@ -11100,7 +11144,7 @@ + fi + + echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 +-echo "configure:11104: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 ++echo "configure:11148: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11109,11 +11153,11 @@ + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes + else +@@ -11138,7 +11182,7 @@ + + + echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 +-echo "configure:11142: checking for 64 bit fcntl locking" >&5 ++echo "configure:11186: checking for 64 bit fcntl locking" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11147,7 +11191,7 @@ + samba_cv_HAVE_STRUCT_FLOCK64=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11219: \"$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 +@@ -11196,13 +11240,13 @@ + fi + + echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +-echo "configure:11200: checking for st_blocks in struct stat" >&5 ++echo "configure:11244: checking for st_blocks in struct stat" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -11211,7 +11255,7 @@ + struct stat st; st.st_blocks = 0; + ; return 0; } + EOF +-if { (eval echo configure:11215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:11259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_STAT_ST_BLOCKS=yes + else +@@ -11234,13 +11278,13 @@ + case "$host_os" in + *linux*) + echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 +-echo "configure:11238: checking for broken RedHat 7.2 system header files" >&5 ++echo "configure:11282: checking for broken RedHat 7.2 system header files" >&5 + if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:11302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no + else +@@ -11277,13 +11321,13 @@ + esac + + echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 +-echo "configure:11281: checking for broken nisplus include files" >&5 ++echo "configure:11325: checking for broken nisplus include files" >&5 + if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #if defined(HAVE_RPCSVC_NIS_H) +@@ -11293,7 +11337,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:11297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:11341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no + else +@@ -11317,7 +11361,7 @@ + ################################################# + # check for smbwrapper support + echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 +-echo "configure:11321: checking whether to use smbwrapper" >&5 ++echo "configure:11365: 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" +@@ -11361,7 +11405,7 @@ + ################################################# + # check for the AFS filesystem + echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 +-echo "configure:11365: checking whether to use AFS" >&5 ++echo "configure:11409: 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" +@@ -11387,7 +11431,7 @@ + ################################################# + # check for the DFS auth system + echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 +-echo "configure:11391: checking whether to use DCE/DFS auth" >&5 ++echo "configure:11435: checking whether to use DCE/DFS auth" >&5 + # Check whether --with-dfs or --without-dfs was given. + if test "${with_dfs+set}" = set; then + withval="$with_dfs" +@@ -11412,7 +11456,7 @@ + ################################################# + # check for Kerberos IV auth system + echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 +-echo "configure:11416: checking whether to use Kerberos IV" >&5 ++echo "configure:11460: 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" +@@ -11424,7 +11468,7 @@ + EOF + + echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 +-echo "configure:11428: checking for dn_expand in -lresolv" >&5 ++echo "configure:11472: checking for dn_expand in -lresolv" >&5 + ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -11432,7 +11476,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:11491: \"$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 +@@ -11487,7 +11531,7 @@ + ################################################# + # check for Kerberos 5 auth system + echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 +-echo "configure:11491: checking whether to use Kerberos 5" >&5 ++echo "configure:11535: checking whether to use Kerberos 5" >&5 + # Check whether --with-krb5 or --without-krb5 was given. + if test "${with_krb5+set}" = set; then + withval="$with_krb5" +@@ -11515,7 +11559,7 @@ + ################################################# + # check for automount support + echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 +-echo "configure:11519: checking whether to use AUTOMOUNT" >&5 ++echo "configure:11563: 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" +@@ -11540,7 +11584,7 @@ + ################################################# + # check for smbmount support + echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 +-echo "configure:11544: checking whether to use SMBMOUNT" >&5 ++echo "configure:11588: 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" +@@ -11577,7 +11621,7 @@ + # check for a PAM password database + with_pam_for_crypt=no + echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 +-echo "configure:11581: checking whether to use PAM password database" >&5 ++echo "configure:11625: checking whether to use PAM password database" >&5 + # Check whether --with-pam or --without-pam was given. + if test "${with_pam+set}" = set; then + withval="$with_pam" +@@ -11603,7 +11647,7 @@ + + # we can't build a pam module if we don't have pam. + echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 +-echo "configure:11607: checking for pam_get_data in -lpam" >&5 ++echo "configure:11651: checking for pam_get_data in -lpam" >&5 + ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -11611,7 +11655,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpam $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:11670: \"$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 +@@ -11649,7 +11693,7 @@ + ################################################# + # check for pam_smbpass support + echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 +-echo "configure:11653: checking whether to use pam_smbpass" >&5 ++echo "configure:11697: checking whether to use pam_smbpass" >&5 + # Check whether --with-pam_smbpass or --without-pam_smbpass was given. + if test "${with_pam_smbpass+set}" = set; then + withval="$with_pam_smbpass" +@@ -11691,12 +11735,12 @@ + for ac_func in crypt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:11695: checking for $ac_func" >&5 ++echo "configure:11739: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:11767: \"$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 +@@ -11745,7 +11789,7 @@ + + if test x"$ac_cv_func_crypt" = x"no"; then + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +-echo "configure:11749: checking for crypt in -lcrypt" >&5 ++echo "configure:11793: checking for crypt in -lcrypt" >&5 + ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -11753,7 +11797,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:11812: \"$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 +@@ -11799,7 +11843,7 @@ + ## + if test $with_pam_for_crypt = no; then + echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 +-echo "configure:11803: checking for a crypt that needs truncated salt" >&5 ++echo "configure:11847: checking for a crypt that needs truncated salt" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -11808,11 +11852,11 @@ + samba_cv_HAVE_TRUNCATED_SALT=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:11860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + samba_cv_HAVE_TRUNCATED_SALT=no + else +@@ -11850,7 +11894,7 @@ + ################################################# + # check for a TDB password database + echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 +-echo "configure:11854: checking whether to use TDB SAM database" >&5 ++echo "configure:11898: checking whether to use TDB SAM database" >&5 + # Check whether --with-tdbsam or --without-tdbsam was given. + if test "${with_tdbsam+set}" = set; then + withval="$with_tdbsam" +@@ -11876,7 +11920,7 @@ + ################################################# + # check for a LDAP password database + echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 +-echo "configure:11880: checking whether to use LDAP SAM database" >&5 ++echo "configure:11924: checking whether to use LDAP SAM database" >&5 + # Check whether --with-ldapsam or --without-ldapsam was given. + if test "${with_ldapsam+set}" = set; then + withval="$with_ldapsam" +@@ -11903,7 +11947,7 @@ + ################################################# + # check for a NISPLUS password database + echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 +-echo "configure:11907: checking whether to use NISPLUS SAM database" >&5 ++echo "configure:11951: checking whether to use NISPLUS SAM database" >&5 + # Check whether --with-nisplussam or --without-nisplussam was given. + if test "${with_nisplussam+set}" = set; then + withval="$with_nisplussam" +@@ -11931,7 +11975,7 @@ + # smbpasswd SAM is only used if another format + # has not been defined + echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 +-echo "configure:11935: checking whether to use traditional smbpasswd file" >&5 ++echo "configure:11979: checking whether to use traditional smbpasswd file" >&5 + if test $with_smbpasswd_sam = yes; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +@@ -11953,7 +11997,7 @@ + ################################################# + # check for a NISPLUS_HOME support + echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 +-echo "configure:11957: checking whether to use NISPLUS_HOME" >&5 ++echo "configure:12001: 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" +@@ -11978,7 +12022,7 @@ + ################################################# + # check for the secure socket layer + echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 +-echo "configure:11982: checking whether to use SSL" >&5 ++echo "configure:12026: 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" +@@ -12052,7 +12096,7 @@ + ################################################# + # check for syslog logging + echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 +-echo "configure:12056: checking whether to use syslog logging" >&5 ++echo "configure:12100: 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" +@@ -12077,7 +12121,7 @@ + ################################################# + # check for a shared memory profiling support + echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 +-echo "configure:12081: checking whether to use profiling" >&5 ++echo "configure:12125: checking whether to use profiling" >&5 + # Check whether --with-profiling-data or --without-profiling-data was given. + if test "${with_profiling_data+set}" = set; then + withval="$with_profiling_data" +@@ -12105,7 +12149,7 @@ + QUOTAOBJS=smbd/noquotas.o + + echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 +-echo "configure:12109: checking whether to support disk-quotas" >&5 ++echo "configure:12153: 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" +@@ -12117,13 +12161,13 @@ + *linux*) + # Check for kernel 2.4.x quota braindamage... + echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 +-echo "configure:12121: checking for linux 2.4.x quota braindamage.." >&5 ++echo "configure:12165: checking for linux 2.4.x quota braindamage.." >&5 + if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -12135,7 +12179,7 @@ + struct mem_dqblk D; + ; return 0; } + EOF +-if { (eval echo configure:12139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:12183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_linux_2_4_quota_braindamage=yes + else +@@ -12179,7 +12223,7 @@ + # check for experimental utmp accounting + + echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 +-echo "configure:12183: checking whether to support utmp accounting" >&5 ++echo "configure:12227: 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" +@@ -12205,7 +12249,7 @@ + # check for MS Dfs support + + echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 +-echo "configure:12209: checking whether to support Microsoft Dfs" >&5 ++echo "configure:12253: checking whether to support Microsoft Dfs" >&5 + # Check whether --with-msdfs or --without-msdfs was given. + if test "${with_msdfs+set}" = set; then + withval="$with_msdfs" +@@ -12231,7 +12275,7 @@ + # check for Samba VFS support + + echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 +-echo "configure:12235: checking whether to support the experimental Samba vfs" >&5 ++echo "configure:12279: checking whether to support the experimental Samba vfs" >&5 + # Check whether --with-vfs or --without-vfs was given. + if test "${with_vfs+set}" = set; then + withval="$with_vfs" +@@ -12258,9 +12302,9 @@ + # should we build libsmbclient? + + LIBSMBCLIENT_SHARED= +-LIBSMBCLIENT= ++LIBSMBCLIENT_STATIC= + echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 +-echo "configure:12264: checking whether to build the libsmbclient shared library" >&5 ++echo "configure:12308: checking whether to build the libsmbclient shared library" >&5 + # Check whether --with-libsmbclient or --without-libsmbclient was given. + if test "${with_libsmbclient+set}" = set; then + withval="$with_libsmbclient" +@@ -12268,10 +12312,10 @@ + yes) + if test $BLDSHARED = true; then + LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT +- LIBSMBCLIENT=libsmbclient ++ LIBSMBCLIENT_STATIC=bin/libsmbclient.a + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no shared library support" 1>&6 ++ echo "$ac_t""no static or shared libsmbclient support" 1>&6 + fi + ;; + *) +@@ -12287,14 +12331,14 @@ + ################################################# + # these tests are taken from the GNU fileutils package + echo "checking how to get filesystem space usage" 1>&6 +-echo "configure:12291: checking how to get filesystem space usage" >&5 ++echo "configure:12335: 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:12298: checking statvfs64 function (SVR4)" >&5 ++echo "configure:12342: checking statvfs64 function (SVR4)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12302,7 +12346,7 @@ + fu_cv_sys_stat_statvfs64=cross + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12364: \"$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 +@@ -12349,12 +12393,12 @@ + if test $space = no; then + # SVR4 + echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 +-echo "configure:12353: checking statvfs function (SVR4)" >&5 ++echo "configure:12397: checking statvfs function (SVR4)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -12362,7 +12406,7 @@ + struct statvfs fsd; statvfs (0, &fsd); + ; return 0; } + EOF +-if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12410: \"$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 +@@ -12387,7 +12431,7 @@ + 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:12391: checking for 3-argument statfs function (DEC OSF/1)" >&5 ++echo "configure:12435: checking for 3-argument statfs function (DEC OSF/1)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12395,7 +12439,7 @@ + fu_cv_sys_stat_statfs3_osf1=no + else + cat > conftest.$ac_ext < +@@ -12408,7 +12452,7 @@ + exit (statfs (".", &fsd, sizeof (struct statfs))); + } + EOF +-if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12456: \"$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 +@@ -12435,7 +12479,7 @@ + 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:12439: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 ++echo "configure:12483: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12443,7 +12487,7 @@ + fu_cv_sys_stat_statfs2_bsize=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12510: \"$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 +@@ -12489,7 +12533,7 @@ + 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:12493: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 ++echo "configure:12537: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12497,7 +12541,7 @@ + fu_cv_sys_stat_statfs4=no + else + cat > conftest.$ac_ext < + #include +@@ -12507,7 +12551,7 @@ + exit (statfs (".", &fsd, sizeof fsd, 0)); + } + EOF +-if { (eval echo configure:12511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12555: \"$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 +@@ -12534,7 +12578,7 @@ + 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:12538: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 ++echo "configure:12582: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12542,7 +12586,7 @@ + fu_cv_sys_stat_statfs2_fsize=no + else + cat > conftest.$ac_ext < + #ifdef HAVE_SYS_PARAM_H +@@ -12558,7 +12602,7 @@ + exit (statfs (".", &fsd)); + } + EOF +-if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12606: \"$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 +@@ -12585,7 +12629,7 @@ + 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:12589: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 ++echo "configure:12633: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -12593,7 +12637,7 @@ + fu_cv_sys_stat_fs_data=no + else + cat > conftest.$ac_ext < + #ifdef HAVE_SYS_PARAM_H +@@ -12613,7 +12657,7 @@ + exit (statfs (".", &fsd) != 1); + } + EOF +-if { (eval echo configure:12617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:12661: \"$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 +@@ -12646,9 +12690,9 @@ + # file support. + # + echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 +-echo "configure:12650: checking if large file support can be enabled" >&5 ++echo "configure:12694: checking if large file support can be enabled" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:12709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes + else +@@ -12728,7 +12772,7 @@ + # check for ACL support + + echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 +-echo "configure:12732: checking whether to support ACLs" >&5 ++echo "configure:12776: checking whether to support ACLs" >&5 + # Check whether --with-acl-support or --without-acl-support was given. + if test "${with_acl_support+set}" = set; then + withval="$with_acl_support" +@@ -12781,7 +12825,7 @@ + ;; + *) + echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 +-echo "configure:12785: checking for acl_get_file in -lacl" >&5 ++echo "configure:12829: checking for acl_get_file in -lacl" >&5 + ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -12789,7 +12833,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lacl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12848: \"$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 +@@ -12828,13 +12872,13 @@ + fi + + echo $ac_n "checking for ACL support""... $ac_c" 1>&6 +-echo "configure:12832: checking for ACL support" >&5 ++echo "configure:12876: checking for ACL support" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -12842,7 +12886,7 @@ + acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); + ; return 0; } + EOF +-if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_POSIX_ACLS=yes + else +@@ -12862,13 +12906,13 @@ + EOF + + echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 +-echo "configure:12866: checking for acl_get_perm_np" >&5 ++echo "configure:12910: checking for acl_get_perm_np" >&5 + if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -12876,7 +12920,7 @@ + acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); + ; return 0; } + EOF +-if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_ACL_GET_PERM_NP=yes + else +@@ -12931,7 +12975,7 @@ + # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). + + echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 +-echo "configure:12935: checking whether to build winbind" >&5 ++echo "configure:12979: checking whether to build winbind" >&5 + + # Initially, the value of $host_os decides whether winbind is supported + +@@ -13010,11 +13054,11 @@ + : + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:13062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "configure OK"; + else +@@ -13184,7 +13228,7 @@ + s%@SHLIBEXT@%$SHLIBEXT%g + s%@BLDSHARED@%$BLDSHARED%g + s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g +-s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g ++s%@LIBSMBCLIENT_STATIC@%$LIBSMBCLIENT_STATIC%g + s%@CC@%$CC%g + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +--- samba-2.2.2.cvs20020120.orig/source/configure.in ++++ samba-2.2.2.cvs20020120/source/configure.in +@@ -145,7 +145,7 @@ + AC_SUBST(SHLIBEXT) + AC_SUBST(BLDSHARED) + AC_SUBST(LIBSMBCLIENT_SHARED) +-AC_SUBST(LIBSMBCLIENT) ++AC_SUBST(LIBSMBCLIENT_STATIC) + + # compile with optimization and without debugging by default + CFLAGS="-O ${CFLAGS}" +@@ -340,6 +340,28 @@ + #endif + } + ], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) ++ if test x$LINUX_LFS_SUPPORT = xyes ; then ++ AC_TRY_RUN([ ++#include ++#include ++#include ++main() { ++ unsigned int *padding; ++ struct flock foo_lock = {F_WRLCK, SEEK_SET, 0, 1, 0}; ++ int fd = open("/dev/null", O_RDWR); ++ ++ /* Yes, we're depending on the internals of the Linux flock structure ++ here -- but this test is explicitly Linux-specific to begin with. */ ++ padding = (unsigned int *)&foo_lock; ++ padding[1] = 0xffffffff; ++ foo_lock.l_start = 0; ++ if (fcntl(fd, F_SETLK, &foo_lock) < 0) ++ exit(1); ++ ++ exit(0); ++} ++], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) ++ fi + CPPFLAGS="$old_CPPFLAGS" + if test x$LINUX_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" +@@ -2232,7 +2254,7 @@ + # should we build libsmbclient? + + LIBSMBCLIENT_SHARED= +-LIBSMBCLIENT= ++LIBSMBCLIENT_STATIC= + AC_MSG_CHECKING(whether to build the libsmbclient shared library) + AC_ARG_WITH(libsmbclient, + [ --with-libsmbclient Build the libsmbclient shared library (default=no)], +@@ -2240,10 +2262,10 @@ + yes) + if test $BLDSHARED = true; then + LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT +- LIBSMBCLIENT=libsmbclient ++ LIBSMBCLIENT_STATIC=bin/libsmbclient.a + AC_MSG_RESULT(yes) + else +- AC_MSG_RESULT(no shared library support) ++ AC_MSG_RESULT(no static or shared libsmbclient support) + fi + ;; + *) diff --git a/packaging/Debian/debian/patches/loadparm.patch b/packaging/Debian/debian/patches/loadparm.patch new file mode 100644 index 00000000000..d7880a25146 --- /dev/null +++ b/packaging/Debian/debian/patches/loadparm.patch @@ -0,0 +1,78 @@ +--- samba-2.2.2.cvs20020201/source/param/loadparm.c.orig Fri Feb 1 17:03:50 2002 ++++ samba-2.2.2.cvs20020201/source/param/loadparm.c Fri Feb 1 18:45:41 2002 +@@ -1085,26 +1085,26 @@ + case PRINT_AIX: + case PRINT_LPRNT: + case PRINT_LPROS2: +- string_set(&sDefault.szLpqcommand, "lpq -P%p"); +- string_set(&sDefault.szLprmcommand, "lprm -P%p %j"); ++ string_set(&sDefault.szLpqcommand, "lpq -P'%p'"); ++ string_set(&sDefault.szLprmcommand, "lprm -P'%p' %j"); + string_set(&sDefault.szPrintcommand, +- "lpr -r -P%p %s"); ++ "lpr -r -P'%p' %s"); + break; + + case PRINT_LPRNG: + case PRINT_PLP: +- string_set(&sDefault.szLpqcommand, "lpq -P%p"); +- string_set(&sDefault.szLprmcommand, "lprm -P%p %j"); ++ string_set(&sDefault.szLpqcommand, "lpq -P'%p'"); ++ string_set(&sDefault.szLprmcommand, "lprm -P'%p' %j"); + string_set(&sDefault.szPrintcommand, +- "lpr -r -P%p %s"); ++ "lpr -r -P'%p' %s"); + string_set(&sDefault.szQueuepausecommand, +- "lpc stop %p"); ++ "lpc stop '%p'"); + string_set(&sDefault.szQueueresumecommand, +- "lpc start %p"); ++ "lpc start '%p'"); + string_set(&sDefault.szLppausecommand, +- "lpc hold %p %j"); ++ "lpc hold '%p' %j"); + string_set(&sDefault.szLpresumecommand, +- "lpc release %p %j"); ++ "lpc release '%p' %j"); + break; + + case PRINT_CUPS: +@@ -1120,19 +1120,19 @@ + string_set(&Globals.szPrintcapname, "cups"); + #else + string_set(&sDefault.szLpqcommand, +- "/usr/bin/lpstat -o %p"); ++ "/usr/bin/lpstat -o '%p'"); + string_set(&sDefault.szLprmcommand, +- "/usr/bin/cancel %p-%j"); ++ "/usr/bin/cancel '%p-%j'"); + string_set(&sDefault.szPrintcommand, +- "/usr/bin/lp -d %p %s; rm %s"); ++ "/usr/bin/lp -d '%p' %s; rm %s"); + string_set(&sDefault.szLppausecommand, +- "lp -i %p-%j -H hold"); ++ "lp -i '%p-%j' -H hold"); + string_set(&sDefault.szLpresumecommand, +- "lp -i %p-%j -H resume"); ++ "lp -i '%p-%j' -H resume"); + string_set(&sDefault.szQueuepausecommand, +- "/usr/bin/disable %p"); ++ "/usr/bin/disable '%p'"); + string_set(&sDefault.szQueueresumecommand, +- "/usr/bin/enable %p"); ++ "/usr/bin/enable '%p'"); + string_set(&Globals.szPrintcapname, "lpstat"); + #endif /* HAVE_CUPS */ + break; +@@ -1437,7 +1437,10 @@ + else + StrnCpy(ret, s, len); + +- trim_string(ret, "\"", "\""); ++ if (trim_string(ret, "\"", "\"")) { ++ if (strchr(ret,'"') != NULL) ++ StrnCpy(ret, s, len); ++ } + + standard_sub_basic(ret); + return (ret); diff --git a/packaging/Debian/debian/patches/samba.patch b/packaging/Debian/debian/patches/samba.patch new file mode 100644 index 00000000000..be251861cb1 --- /dev/null +++ b/packaging/Debian/debian/patches/samba.patch @@ -0,0 +1,199 @@ +--- samba-2.2.2.cvs20020120.orig/source/client/smbmount.c ++++ samba-2.2.2.cvs20020120/source/client/smbmount.c +@@ -719,7 +719,7 @@ + *lp = 0; + pstrcpy(password,lp+1); + got_pass = True; +- memset(strchr(opteq+1,'%')+1,'X',strlen(password)); ++ memset(strchr(opteq+1,'%')+1,'\0',strlen(password)); + } + if ((lp=strchr(username,'/'))) { + *lp = 0; +@@ -729,7 +729,7 @@ + !strcmp(opts, "password")) { + pstrcpy(password,opteq+1); + got_pass = True; +- memset(opteq+1,'X',strlen(password)); ++ memset(opteq+1,'\0',strlen(password)); + } else if(!strcmp(opts, "credentials")) { + pstrcpy(credentials,opteq+1); + } else if(!strcmp(opts, "netbiosname")) { +@@ -822,7 +822,7 @@ + *p = 0; + pstrcpy(password,p+1); + got_pass = True; +- memset(strchr(getenv("USER"),'%')+1,'X',strlen(password)); ++ memset(strchr(getenv("USER"),'%')+1,'\0',strlen(password)); + } + strupper(username); + } +--- samba-2.2.2.cvs20020120.orig/source/script/installbin.sh ++++ samba-2.2.2.cvs20020120/source/script/installbin.sh +@@ -11,7 +11,7 @@ + shift + shift + +-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do ++for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then +@@ -33,9 +33,11 @@ + chmod $INSTALLPERMS $BINDIR/$p2 + + # this is a special case, mount needs this in a specific location +- if [ $p2 = smbmount ]; then +- ln -sf $BINDIR/$p2 /sbin/mount.smbfs +- fi ++# Commented out for the Debian Samba package. We take care of this ++# important symlink in debian/rules. (peloy@debian.org) ++# if [ $p2 = smbmount ]; then ++# ln -sf $BINDIR/$p2 /sbin/mount.smbfs ++# fi + done + + +--- samba-2.2.2.cvs20020120.orig/source/script/installswat.sh ++++ samba-2.2.2.cvs20020120/source/script/installswat.sh +@@ -48,8 +48,8 @@ + for f in $SRCDIR../docs/htmldocs/*.html; do + FNAME=$SWATDIR/help/`basename $f` + echo $FNAME +- cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? +- chmod 0644 $FNAME ++ ln -s ../../../../doc/samba-doc/htmldocs/`basename $f` $FNAME || echo Cannot install $FNAME. Does $USER have privileges? ++# chmod 0644 $FNAME + done + + # Install "server-side" includes +@@ -63,7 +63,10 @@ + + # Install Using Samba book + +-if [ "x$BOOKDIR" != "x" ]; then ++# For Debian we do not install anything here, we just create a symlink ++# pointing to /usr/share/doc/samba-doc/htmldocs/using_samba/ in ++# debian/rules (peloy@debian.org) ++if /bin/false; then + + # Create directories + +--- samba-2.2.2.cvs20020120.orig/source/web/diagnose.c ++++ samba-2.2.2.cvs20020120/source/web/diagnose.c +@@ -54,6 +54,7 @@ + static struct cli_state cli; + extern struct in_addr loopback_ip; + ++ loopback_ip.s_addr = htonl((127 << 24) + 1); + if (!cli_initialise(&cli)) + return False; + +--- samba-2.2.2.cvs20020120.orig/source/web/startstop.c ++++ samba-2.2.2.cvs20020120/source/web/startstop.c +@@ -37,7 +37,7 @@ + return; + } + +- slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", SBINDIR); ++ slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", "/usr/sbin"); + + become_daemon(); + +@@ -58,7 +58,7 @@ + return; + } + +- slprintf(binfile, sizeof(pstring) - 1, "%s/nmbd", SBINDIR); ++ slprintf(binfile, sizeof(pstring) - 1, "%s/nmbd", "/usr/sbin"); + + become_daemon(); + +--- samba-2.2.2.cvs20020120.orig/source/web/swat.c ++++ samba-2.2.2.cvs20020120/source/web/swat.c +@@ -49,6 +49,19 @@ + #define ENABLE_USER_FLAG "enable_user_flag" + #define RHOST "remote_host" + ++typedef struct html_conversion { ++ char src; ++ char *dest; ++} html_conversion; ++ ++static const html_conversion entities[] = { ++ { '"', """ }, ++ { '&', "&" }, ++ { '<', "<" }, ++ { '>', ">" }, ++ { '\0', NULL }, ++}; ++ + /* we need these because we link to locking*.o */ + void become_root(void) {} + void unbecome_root(void) {} +@@ -77,6 +90,51 @@ + return newstring; + } + ++static char *htmlentities(char *str) ++{ ++ int i,j, destlen = 0; ++ int length = strlen(str); ++ /* Feel free to use a pstring if appropriate -- I haven't ++ checked if it's guaranteed to be long enough, and suspect it ++ isn't. -SRL */ ++ char *dststr = NULL; ++ char *p; ++ ++ for (i = 0; i < length; i++) { ++ for (j = 0; entities[j].src; j++) { ++ if (str[i] == entities[j].src) { ++ destlen += strlen(entities[j].dest); ++ break; ++ } ++ } ++ if (!entities[j].src) { ++ destlen++; ++ } ++ } ++ if (length == destlen) { ++ return(strdup(str)); ++ } ++ p = dststr = malloc(destlen + 1); ++ if (!dststr) { ++ return(NULL); ++ } ++ dststr[destlen] = '\0'; ++ for (i = 0; i < length; i++) { ++ for (j = 0; entities[j].src; j++) { ++ if (str[i] == entities[j].src) { ++ strncpy(p, entities[j].dest, ++ strlen(entities[j].dest)); ++ p += strlen(entities[j].dest); ++ break; ++ } ++ } ++ if (!entities[j].src) { ++ *p++ = str[i]; ++ } ++ } ++ return(dststr); ++} ++ + static char *stripspace(char *str) + { + static char newstring[1024]; +@@ -182,8 +240,12 @@ + + case P_STRING: + case P_USTRING: +- printf("", +- make_parm_name(parm->label), *(char **)ptr); ++ str = htmlentities(*(char **)ptr); ++ printf("", ++ make_parm_name(parm->label), str); ++ if (str != NULL) { ++ free(str); ++ } + printf("", + make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); + break; diff --git a/packaging/Debian/debian/patches/smbadduser.patch b/packaging/Debian/debian/patches/smbadduser.patch new file mode 100644 index 00000000000..9bfb4573012 --- /dev/null +++ b/packaging/Debian/debian/patches/smbadduser.patch @@ -0,0 +1,22 @@ +--- samba-2.2.2.cvs20020120.orig/source/script/smbadduser ++++ samba-2.2.2.cvs20020120/source/script/smbadduser +@@ -2,13 +2,14 @@ + # + # smbadduser - Written by Mike Zakharoff + # ++# Customized for Debian by Eloy A. Paris ++# + unalias * +-set path = ($path /usr/local/samba/bin) ++# No need to set a path in Debian ++#set path = ($path /usr/local/samba/bin) + +-set smbpasswd = /usr/local/samba/private/smbpasswd +-#set smbpasswd = /etc/samba.d/smbpasswd +-set user_map = /usr/local/samba/lib/users.map +-#set user_map = /etc/samba.d/smbusers ++set smbpasswd = /etc/samba/smbpasswd ++set user_map = /etc/samba/users.map + # + # Set to site specific passwd command + # diff --git a/packaging/Debian/debian/patches/smbclient-pager.patch b/packaging/Debian/debian/patches/smbclient-pager.patch new file mode 100644 index 00000000000..d600c1bd9c2 --- /dev/null +++ b/packaging/Debian/debian/patches/smbclient-pager.patch @@ -0,0 +1,11 @@ +--- samba-2.2.2.cvs20020120.orig/source/include/local.h ++++ samba-2.2.2.cvs20020120/source/include/local.h +@@ -105,7 +105,7 @@ + /* the default pager to use for the client "more" command. Users can + override this with the PAGER environment variable */ + #ifndef PAGER +-#define PAGER "more" ++#define PAGER "/usr/bin/pager" + #endif + + /* the size of the uid cache used to reduce valid user checks */ diff --git a/packaging/Debian/debian/patches/smbclient-xfer-speed.patch b/packaging/Debian/debian/patches/smbclient-xfer-speed.patch new file mode 100644 index 00000000000..3ff8b600691 --- /dev/null +++ b/packaging/Debian/debian/patches/smbclient-xfer-speed.patch @@ -0,0 +1,17 @@ +--- samba-2.2.2.cvs20020120/source/client/client.c.orig Wed Jan 23 23:32:44 2002 ++++ samba-2.2.2.cvs20020120/source/client/client.c Wed Jan 23 23:33:50 2002 +@@ -92,10 +92,10 @@ + extern file_info def_finfo; + + /* timing globals */ +-int get_total_size = 0; +-int get_total_time_ms = 0; +-int put_total_size = 0; +-int put_total_time_ms = 0; ++SMB_BIG_UINT get_total_size = 0; ++unsigned int get_total_time_ms = 0; ++SMB_BIG_UINT put_total_size = 0; ++unsigned int put_total_time_ms = 0; + + /* totals globals */ + static double dir_total; diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian/rules new file mode 100755 index 00000000000..1083a10f466 --- /dev/null +++ b/packaging/Debian/debian/rules @@ -0,0 +1,274 @@ +#!/usr/bin/make -f +# +# Important modifications (introduction of a saved config.cache to +# solve build problems) we introduced in Samba 2.2.1a-5. These +# modification were made by Steve Langasek . +# + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=2 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Set the host and build architectures for use with config.cache loading, +# cross-building, etc. +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +export DEB_HOST_GNU_TYPE +export DEB_BUILD_GNU_TYPE + +BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + +DESTDIR=`pwd`/debian/samba +SWATDIR=`pwd`/debian/swat +SAMBABOOK=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/state/samba \ + INCLUDEDIR=$(DESTDIR)/usr/include \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat \ + SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba \ + CODEPAGEDIR=$(DESTDIR)/usr/share/samba/codepages + +patch: patch-stamp +patch-stamp: + dh_testdir + if [ ! -f patch-stamp ]; then debian/scripts/patch-source; fi + touch patch-stamp + +unpatch: + dh_testdir + if [ -f patch-stamp ]; then debian/scripts/unpatch-source; fi + rm -f patch-stamp + +configure: patch-stamp configure-stamp +configure-stamp: + dh_testdir + + # Add here commands to configure the package. +# > +# > Does the --with-fhs option work in configure? I tried it with +# > alpha3, but everything was stored in /usr/local. Is that correct? +# > ... +# +# Yes - the default prefix is still /usr/local; --with-fhs just +# changes the default paths for the config, etc. files to match +# the GNU/FHS specs. To get a complete FHS directory spec, use: +# +# ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ +# --localstatedir=/var + + if [ -f debian/config.cache ]; then \ + cp -f debian/config.cache source/config.cache; \ + fi + +# [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) + [ -f source/Makefile ] || (cd source && ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --with-fhs \ + --prefix=/usr \ + --sysconfdir=/etc \ + --with-privatedir=/etc/samba \ + --with-lockdir=/var/state/samba \ + --localstatedir=/var \ + --with-netatalk \ + --with-smbmount \ + --with-pam \ + --with-syslog \ + --with-sambabook \ + --with-utmp \ + --with-readline \ + --with-pam_smbpass \ + --with-libsmbclient) + + touch configure-stamp + +build: patch-stamp configure-stamp build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first +# $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + $(MAKE) -C source all + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean +# -$(MAKE) -C source clean + -$(MAKE) -C source distclean + + # Delete stuff left after a build that is not deleted by 'make clean' + rm -f source/bin/wbinfo source/bin/winbindd source/bin/rpctorture \ + source/bin/debug2html + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # libsmbclient is installed in usr/bin/. Move to usr/lib/. + mv $(DESTDIR)/usr/bin/libsmbclient.so $(DESTDIR)/usr/lib/libsmbclient.so.0.1 + mv $(DESTDIR)/usr/bin/libsmbclient.a $(DESTDIR)/usr/lib/ + + # This is to comply with policy (the symlink that ldconfig would + # produce must exist in the package). + /sbin/ldconfig -n $(DESTDIR)/usr/lib/ + + # libsmbclient include file is not installed by standard + # 'make install' - do it manually. + $(MAKE) -C source installclientlib $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + install -m 0755 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ + + # This is only temporary, while we create new packages for winbind and friends + install -m 0644 source/nsswitch/libnss_winbind.so $(DESTDIR)/lib/libnss_winbind.so.2 + install -m 0644 source/nsswitch/pam_winbind.so $(DESTDIR)/lib/security/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smb.8 + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smbfs.8 + + # For CUPS to support printing to samba printers, it's necessary + # to make the following symlink (according to + # Erich Schubert in #109509): + ln -s /usr/bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb + + # To avoid duplication of a large number of files, the swat package + # does not contain the "Using Samba" book nor the HTML docs. + # Instead, these are provided by the samba-doc package and + # are accessed through symlinks provided in the swat package. + # Here we create the symlink for the book, and the symlinks + # for the HTML files are created by the script installswat.sh. + ln -s ../../../doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba + + # Install man pages for files without man pages in the upstream sources + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # Install samba-common's conffiles - they'll get moved later to their + # correct place by dh_movefiles. + cp debian/smb.conf $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + + dh_movefiles --sourcedir=debian/samba/ + + # Remove empty directories that will never be used. + rmdir $(DESTDIR)/sbin + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: DH_OPTIONS=-i +binary-indep: build install + # Need this version of debhelper for DH_OPTIONS to work. + dh_testversion 1.1.17 + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build docs/README* docs/Samba-HOWTO-Collection.pdf + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && dh_installexamples +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + dh_installdeb +# dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +# Pass -a to all debhelper commands in this target to reduce clutter. +binary-arch: DH_OPTIONS=-a +binary-arch: build install + # Need this version of debhelper for DH_OPTIONS to work. + dh_testversion 1.1.17 + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build docs/README* docs/Samba-HOWTO-Collection.pdf + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && dh_installexamples +# dh_installmenu + # dh_installlogrotate is not available in Debian Potato... + if [ -x /usr/bin/dh_installlogrotate ]; then dh_installlogrotate; else mkdir debian/samba/etc/logrotate.d; cp debian/samba.logrotate debian/samba/etc/logrotate.d/samba; fi +# dh_installemacsen +# dh_installpam + dh_installinit + dh_installcron +# dh_installmanpages +# dh_installinfo + dh_undocumented + dh_installchangelogs + dh_strip + dh_link + dh_compress + dh_fixperms + + # You may want to make some executables suid here. + # The smbmnt and smbumount binaries should be setuid-root. This + # has security implications because these programs haven't had + # a thorough security audit. smbmount _does not_ have to have + # the setuid bit set. In fact, it is a security hole. + chmod u+s debian/smbfs/usr/bin/smbmnt + chmod u+s debian/smbfs/usr/bin/smbumount + + # Set some reasonable default perms for the samba logdir. + chmod 0750 $(DESTDIR)/var/log/samba/ + chown root.adm $(DESTDIR)/var/log/samba/ + + dh_installdeb +# dh_makeshlibs +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/debian/rules.old b/packaging/Debian/debian/rules.old new file mode 100644 index 00000000000..ac322185a9d --- /dev/null +++ b/packaging/Debian/debian/rules.old @@ -0,0 +1,194 @@ +#!/usr/bin/make -f +# Made with the iad of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BVARS = BASEDIR=/usr \ + LIBDIR=/etc/samba \ + SMB_PASSWD_FILE=/etc/samba/smbpasswd \ + SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ + LOCKDIR=/var/samba \ + SWATDIR=/usr/share/samba/swat + +DESTDIR=`pwd`/debian/tmp +SWATDIR=`pwd`/debian/swat +SAMBABOOK=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/samba \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat \ + SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba + +build: build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first + [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) + $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + + # Now compile the old smbfs package + $(MAKE) -C source/smbfs-2.0.x + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean + -$(MAKE) -C source distclean +# -$(MAKE) -C source clean + rm -f source/bin/{rpctorture,smbtorture,debug2html} + + # Now clean the old smbfs-2.0.x package + -$(MAKE) -C source/smbfs-2.0.x clean + + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + + # To avoid duplication of a large number of files, the swat package + # does not contain the "Using Samba" book nor the HTML docs. + # Instead, these are provided by the samba-doc package and + # are accessed through symlinks provided in the swat package. + # Here we create the symlink for the book, and the symlinks + # for the HTML files are created by the script installswat.sh. + ln -s /usr/share/doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba + + # Install man pages for files without man pages in the upstream dist. + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # smbrun is not longer needed by smbd, so delete its man page + rm $(DESTDIR)/usr/share/man/man1/smbrun.1 + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # We need to rename the SMB mount utilities so they don't have the same + # names as the files in the smbfs package. + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 + + # These files are not part of the main samba package, move to where they + # belong... + #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ + + # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must + # be setuid-root. + chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x + + # Install samba-common's conffiles + cp debian/smb.conf $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + + # OK, now it's time to install the smbfs-2.0.2 files + $(MAKE) -C source/smbfs-2.0.x install $(IVARS) + + # Rename the old smbfs utilities to more convenient names + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 + + # Now install the smbmount and smbumount wrappers and its man pages + install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount + install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount + install -m 0644 debian/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount.8 + install -m 0644 debian/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount.8 + + # Install some docs. that go in "unusual" places + cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ + cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ + + dh_movefiles + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# dh_testversion + dh_testdir -i + dh_testroot -i + dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -i +# dh_installmenu -i +# dh_installemacsen -i +# dh_installinit -i +# dh_installcron -i +# dh_installmanpages -i + dh_undocumented + dh_installchangelogs -i + dh_compress -i +# dh_suidregister -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir -a + dh_testroot -a + dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt -A debian/README.linux + dh_installexamples -a +# dh_installmenu -a +# dh_installemacsen -a + dh_installinit -a + dh_installcron -a +# dh_installmanpages -a + dh_undocumented + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_suidregister -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a +# dh_makeshlibs -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/debian/rules.smbwrapper b/packaging/Debian/debian/rules.smbwrapper new file mode 100644 index 00000000000..e3c72ee47c4 --- /dev/null +++ b/packaging/Debian/debian/rules.smbwrapper @@ -0,0 +1,172 @@ +#!/usr/bin/make -f +# Made with the iad of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BVARS = BASEDIR=/usr \ + LIBDIR=/etc/samba \ + SMB_PASSWD_FILE=/etc/samba/smbpasswd \ + SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ + LOCKDIR=/var/samba \ + SWATDIR=/usr/share/samba/swat + +DESTDIR=`pwd`/debian/tmp +SWATDIR=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/samba \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat + +build: build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first + [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-smbwrapper) + $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + + # Now compile the old smbfs package + $(MAKE) -C source/smbfs-2.0.x + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean + -$(MAKE) -C source distclean +# -$(MAKE) -C source clean + rm -f source/bin/{rpctorture,smbtorture,debug2html} + + # Now clean the old smbfs-2.0.x package + -$(MAKE) -C source/smbfs-2.0.x clean + + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + install -m 0755 source/smbadduser $(DESTDIR)/usr/sbin/ + + # Install man pages for files without man pages in the upstream dist. + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # smbrun is not longer needed by smbd, so delete its man page + rm $(DESTDIR)/usr/share/man/man1/smbrun.1 + + # We need to rename the SMB mount utilities so they don't have the same + # names as the files in the smbfs package. + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 + + # These files are not part of the main samba package, move to where they + # belong... + mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ + + # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must + # be setuid-root. + chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x + + # Install samba-common's conffiles + cp debian/smb.conf $(DESTDIR)/etc/samba/ + + + # OK, now it's time to install the smbfs-2.0.2 files + $(MAKE) -C source/smbfs-2.0.x install $(IVARS) + + # Rename the old smbfs utilities to more convenient names + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 + + # Now install the smbmount and smbumount wrappers + install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount + install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount + + # Install some docs. that go in "unusual" places + cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ + cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ + + dh_movefiles + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# dh_testversion + dh_testdir -i + dh_testroot -i + dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -i +# dh_installmenu -i +# dh_installemacsen -i +# dh_installinit -i +# dh_installcron -i +# dh_installmanpages -i + dh_undocumented + dh_installchangelogs -i + dh_compress -i +# dh_suidregister -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir -a + dh_testroot -a + dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -a +# dh_installmenu -a +# dh_installemacsen -a + dh_installinit -a + dh_installcron -a +# dh_installmanpages -a + dh_undocumented + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_suidregister -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a +# dh_makeshlibs -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/debian/samba-common.conffiles b/packaging/Debian/debian/samba-common.conffiles new file mode 100644 index 00000000000..b5703025dde --- /dev/null +++ b/packaging/Debian/debian/samba-common.conffiles @@ -0,0 +1,2 @@ +/etc/samba/smb.conf +/etc/pam.d/samba diff --git a/packaging/Debian/debian/samba-common.files b/packaging/Debian/debian/samba-common.files new file mode 100644 index 00000000000..94f2e25f6a6 --- /dev/null +++ b/packaging/Debian/debian/samba-common.files @@ -0,0 +1,7 @@ +etc/samba/ +usr/bin/nmblookup +usr/bin/smbpasswd +etc/pam.d/ +usr/share/man/man1/nmblookup.1 +usr/share/man/man8/smbpasswd.8 +usr/share/samba/codepages/ diff --git a/packaging/Debian/debian/samba-common.postrm b/packaging/Debian/debian/samba-common.postrm new file mode 100644 index 00000000000..2cd832b33d2 --- /dev/null +++ b/packaging/Debian/debian/samba-common.postrm @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$1" = purge ]; then + # Remove any files left in /etc/samba/ + rm -Rf /etc/samba/ +fi diff --git a/packaging/Debian/debian/samba-doc.docs b/packaging/Debian/debian/samba-doc.docs new file mode 100644 index 00000000000..68753e54f08 --- /dev/null +++ b/packaging/Debian/debian/samba-doc.docs @@ -0,0 +1,9 @@ +README +docs/Samba-HOWTO-Collection.pdf +docs/THANKS +docs/announce +docs/history +docs/textdocs/ +docs/faq/ +docs/htmldocs/ +docs/Registry/ diff --git a/packaging/Debian/debian/samba-doc.examples b/packaging/Debian/debian/samba-doc.examples new file mode 100644 index 00000000000..e692dd810f0 --- /dev/null +++ b/packaging/Debian/debian/samba-doc.examples @@ -0,0 +1,3 @@ +examples/ +debian/wins2dns.awk +source/script/smbadduser diff --git a/packaging/Debian/debian/samba.conffiles b/packaging/Debian/debian/samba.conffiles new file mode 100644 index 00000000000..908a791a629 --- /dev/null +++ b/packaging/Debian/debian/samba.conffiles @@ -0,0 +1,3 @@ +/etc/cron.daily/samba +/etc/init.d/samba +/etc/logrotate.d/samba diff --git a/packaging/Debian/debian/samba.cron.daily b/packaging/Debian/debian/samba.cron.daily new file mode 100644 index 00000000000..42fc98d8f6d --- /dev/null +++ b/packaging/Debian/debian/samba.cron.daily @@ -0,0 +1,16 @@ +#!/bin/sh +# +# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. +# +# Written by Eloy A. Paris for the Debian project. +# + +BAK=/var/backups + +umask 022 +if cd $BAK; then + # Make sure /etc/samba/smbpasswd exists + if [ -f /etc/samba/smbpasswd ]; then + cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak + fi +fi diff --git a/packaging/Debian/debian/samba.dirs b/packaging/Debian/debian/samba.dirs new file mode 100644 index 00000000000..237603750a1 --- /dev/null +++ b/packaging/Debian/debian/samba.dirs @@ -0,0 +1,11 @@ +sbin +usr/bin +usr/sbin +var/log/samba +var/state/samba +etc/samba +etc/pam.d +usr/share +usr/share/samba +lib/security +usr/lib/cups/backend diff --git a/packaging/Debian/debian/samba.docs b/packaging/Debian/debian/samba.docs new file mode 100644 index 00000000000..187fdd34058 --- /dev/null +++ b/packaging/Debian/debian/samba.docs @@ -0,0 +1,3 @@ +README +Roadmap +WHATSNEW.txt diff --git a/packaging/Debian/debian/samba.init b/packaging/Debian/debian/samba.init new file mode 100644 index 00000000000..8ac2e97148f --- /dev/null +++ b/packaging/Debian/debian/samba.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# Start/stops the Samba daemons (nmbd and smbd). +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +# clear conflicting settings from the environment +unset TMPDIR + +# Sanity check: see if Samba has been configured on this system. +if [ ! -f $DEBIAN_CONFIG ]; then + echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" + echo "with the installation of Samba on this system. Please re-install" + echo "Samba. I can't continue!!!" + exit 1 +fi + +# Read current Samba configuration +. $DEBIAN_CONFIG + +# the Samba daemons. + +# If Samba is running from inetd then there is nothing to do +if [ "$run_mode" = "from_inetd" ]; then + # Commented out to close bug #26884 (startup message is rather long). I + # have yet to think how to let the user know that if he/she is running + # Samba from inetd, he can't just "/etc/init.d/samba stop" to stop + # the Samba daemons. +# echo "Warning: Samba is not running as daemons. Daemons not restarted/stopped." +# echo "Daemons will start automatically by inetd (if you wanted to start Samba)." +# echo "If you want to stop Samba, get the PID's of all nmbd and smbd processes" +# echo "and send them a SIGTERM signal but keep in mind that inetd could restart them." + exit 0 +fi + +# See if the daemons are there +test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 + +case "$1" in + start) + echo -n "Starting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + echo -n " smbd" + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + + echo "." + ;; + stop) + echo -n "Stopping Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --stop --quiet --pidfile $NMBDPID + + echo -n " smbd" + start-stop-daemon --stop --quiet --pidfile $SMBDPID + + echo "." + ;; + reload) + echo -n "Reloading /etc/samba/smb.conf (smbd only)" + start-stop-daemon --stop --signal HUP --pidfile $SMBDPID + + echo "." + ;; + restart|force-reload) + echo -n "Restarting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --stop --quiet --pidfile $NMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + echo -n " smbd" + start-stop-daemon --stop --quiet --pidfile $SMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + + echo "." + ;; + *) + echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/Debian/debian/samba.logrotate b/packaging/Debian/debian/samba.logrotate new file mode 100644 index 00000000000..d264ce3d71b --- /dev/null +++ b/packaging/Debian/debian/samba.logrotate @@ -0,0 +1,21 @@ +/var/log/samba/log.smbd { + weekly + missingok + rotate 7 + postrotate + killall -q -HUP smbd || true + endscript + compress + notifempty +} + +/var/log/samba/log.nmbd { + weekly + missingok + rotate 7 + postrotate + killall -q -HUP nmbd || true + endscript + compress + notifempty +} diff --git a/packaging/Debian/debian/samba.pamd b/packaging/Debian/debian/samba.pamd new file mode 100644 index 00000000000..1a5a14c7089 --- /dev/null +++ b/packaging/Debian/debian/samba.pamd @@ -0,0 +1,5 @@ +auth required pam_unix.so nullok +account required pam_unix.so +session required pam_unix.so +password required pam_unix.so + diff --git a/packaging/Debian/debian/samba.postinst b/packaging/Debian/debian/samba.postinst new file mode 100644 index 00000000000..5f42cf4b369 --- /dev/null +++ b/packaging/Debian/debian/samba.postinst @@ -0,0 +1,218 @@ +#!/bin/sh +# +# Post-installation script for the Samba package for Debian GNU/Linux +# +# Written by Eloy A. Paris for the Debian project. +# +# The prerm script (run before the postinst) disables Samba in /etc/inetd.conf +# and stops both nmbd and smbd. So, when this script is run we +# know that neither nmbd nor smbd can start. +# + +case "$1" in + configure) + # continue below + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# Take care of the /usr/doc/ to /usr/shar/doc/ migration. +if [ -d /usr/doc -a ! -e /usr/doc/samba -a -d /usr/share/doc/samba ]; then + ln -sf ../share/doc/samba /usr/doc/samba +fi + +# Starting with Samba 2.0.7-4 the location of the WINS database, the browse +# database and other important run-time files are stored in +# /var/state/samba/ rather than in /var/samba/. The following +# code takes care of moving the files in the old directory to +# the new directory. +if [ -d /var/samba/ ]; then + mv /var/samba/* /var/state/samba/ + rmdir /var/samba/ +fi + +# Define some constants... +DEBIAN_CONFIG=/etc/samba/debian_config +CONFIG_VERSION=1 + +# Now some variables... +samba_configured=no + + +if [ -f $DEBIAN_CONFIG ]; then + . $DEBIAN_CONFIG + if [ "$config_version" -ge "$CONFIG_VERSION" ]; then + samba_configured=yes + fi +fi + +# If Samba is configured we don't want to pester the user with +# configuration questions, just tell him that he can reconfigure +# Samba at any time by running /usr/sbin/sambaconfig. +if [ "$samba_configured" = "no" ]; then + # Samba is not configured, go and ask the user the information needed + # to configure it, and configure it! + + # Create Debian specific configuration file + echo "config_version=$CONFIG_VERSION" > $DEBIAN_CONFIG + + # We always run /etc/init.d/samba, even if we run Samba from inetd. + # This script file takes care of handling the conflict of running + # from inetd or as daemons. + update-rc.d samba defaults >/dev/null + + # We want to add these entries to inetd.conf commented out. Otherwise + # UDP traffic could make inetd to start nmbd or smbd right during + # the configuration stage. + update-inetd --add "## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" + update-inetd --add "## netbios-ns dgram udp wait root /usr/sbin/tcpd /usr/sbin/nmbd -a" + + echo "" + echo Samba Configuration + echo ------------------- + echo "The Samba server may be run either as a daemon at startup, or it may be" + echo "run from the inetd meta-daemon upon request. If run as a daemon, the" + echo "server will always be ready, so starting sessions will be faster. If run" + echo "from the inetd meta-daemon some memory will be saved and utilities such" + echo "as the tcpd TCP-wrapper may be used for extra security. If you don't" + echo "know what to do, running from inetd is a safe choice." + echo "" + echo "Run Samba as daemons or from inetd?" + echo -n "Press 'D' to run as daemons or 'I' to run from inetd: [I] " + + read mode + test -n "$mode" || mode="I" + + case "$mode" in + [Dd]*) + echo "Samba will run as daemons. Run sambaconfig to reconfigure" + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + echo "run_mode=as_daemons" >> $DEBIAN_CONFIG + ;; + + *) + echo "Samba will run from inetd. Run sambaconfig to reconfigure" + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + echo "run_mode=from_inetd" >> $DEBIAN_CONFIG + ;; + esac + + if [ ! -f /etc/samba/smbpasswd ]; then + echo "" + echo "If you are going to use encrypted passwords you need to have a" + echo "separate password file for this (the format is different from " + echo "/etc/passwd). Right now you don't have an /etc/samba/smbpasswd file." + echo "Do you want to generate this new file from your existing" + echo -n "/etc/passwd file? [y/N] " + + read yn + test -n "$yn" || yn="N" + + if [ $yn = y -o $yn = Y ]; then + cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd + chmod 600 /etc/samba/smbpasswd + echo "" + echo "/etc/samba/smbpasswd now has the same user names as /etc/passwd. However," + echo "you need to run smbpasswd manually to set the password for each user." + echo "" + echo "smbpasswd_created=yes" >> $DEBIAN_CONFIG + else + echo "smbpasswd_created=no" >> $DEBIAN_CONFIG + fi + fi + + echo "" + + # Start Samba: nothing wrong will happen if Samba is running from inetd + # and /etc/init.d/samba is run. However, to simplify things, we + # do not run /etc/init.d/samba if we're running from inetd. + + if [ $mode = d -o $mode = D ]; then + echo -n "Samba will run as daemons - start Samba now? [Y/n] " + read yn + test -n "$yn" || yn="Y" + + case "$yn" in + [Nn]*) + echo "Not started; to start later, do: /etc/init.d/samba start" + echo -n "Press [ENTER] " + read line + ;; + + *) + /etc/init.d/samba start + ;; + esac + else + echo "Since you are running Samba from inetd, the daemons will start" + echo "automatically by inetd when there is traffic on the NetBIOS" + echo "ports." + echo -n "Press [ENTER] " + read line + fi +else # if (samba_configured) ... + # We are here because Samba was already configured... + + # At this point the NetBIOS daemons are disabled in /etc/inetd.conf. + # This is a consequence of what we did in the prerm. If Samba was + # configured to run from inetd we need to enable the entries in + # /etc/inetd.conf. + + # Read current Samba configuration + . $DEBIAN_CONFIG + + if [ "$run_mode" = "from_inetd" ]; then + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + fi + + echo "" + echo "Samba was already installed and configured so I skipped the " + echo "configuration questions. You can run the script /usr/sbin/sambaconfig" + echo "at any time to reconfigure Samba. See sambaconfig(8) for more" + echo "details. I will not even ask you if you want to restart Samba," + echo "I will just do it!" + echo "" + + /etc/init.d/samba start +fi # if (samba_configured) ... + +if test "$1" = configure && dpkg --compare-versions "$2" lt 2.0.0final-2 && [ -f /etc/samba/smbpasswd ]; then + + cat << EOF + +*** IMPORTANT *** + +The format of the smbpasswd file (which is used only if you are using +encrypted passwords) is different in Samba 2.0.0 and above. I will +convert it to the new format. + +EOF + + mv /etc/samba/smbpasswd /etc/samba/smbpasswd.old + cat /etc/samba/smbpasswd.old | /usr/bin/convert_smbpasswd \ + > /etc/samba/smbpasswd 2> /dev/null +fi + +# This check is a safety net: the /etc/samba/smbpasswd file must have +# permissions 600. +if [ -f /etc/samba/smbpasswd ]; then + chmod 600 /etc/samba/smbpasswd +fi + +# Do the same check for /var/backup/smbpasswd.bak, just in case. +if [ -f /var/backups/smbpasswd.bak ]; then + chmod 600 /var/backups/smbpasswd.bak +fi + +exit 0 diff --git a/packaging/Debian/debian/samba.postrm b/packaging/Debian/debian/samba.postrm new file mode 100644 index 00000000000..73b2f0d0a1f --- /dev/null +++ b/packaging/Debian/debian/samba.postrm @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ "$1" = purge ]; then + update-rc.d samba remove >/dev/null + + # Remove WINS.DAT, BROWSE.DAT and lock information file + rm -Rf /var/samba/ + + # Remove any files in the old and obsolete /var/lock/samba directory + rm -Rf /var/lock/samba/ + + # Remove files left in /etc/samba/ + rm -Rf /etc/samba/debian_config + rm -Rf /etc/samba/MACHINE.SID + + # Remove log files + rm -f /var/log/[ns]mb* + + # Remove NetBIOS entries from /etc/inetd.conf + update-inetd --remove netbios-ssn + update-inetd --remove netbios-ns +else + # Not purging, do not remove NetBIOS entries from /etc/inetd.conf + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns +fi diff --git a/packaging/Debian/debian/samba.preinst b/packaging/Debian/debian/samba.preinst new file mode 100644 index 00000000000..6ebefb8fb1b --- /dev/null +++ b/packaging/Debian/debian/samba.preinst @@ -0,0 +1,47 @@ +#!/bin/sh +# +# The purpose of the preinst script for the samba package is to help +# the migration of the conffiles smb.conf and smbpasswd from their +# old location (/etc/) to their new location (/etc/samba/). +# +# Thanks to Ben Pfaff for sharing on debian-devel +# his ideas about how to move conffiles to new locations. +# + +# First see if a smb.conf file currently exists. +test -f /etc/smb.conf || exit 0 + +# Now see if a smb.conf file exists in the new location. +test -e /etc/samba/smb.conf && exit 0 + +# +# Move smb.conf conffile from its old location (/etc/) to its new one +# (/etc/samba). +# +# If conffile exists in old location AND conffile does not exist on new +# location then... +# +if [ -f /etc/smb.conf -a ! -e /etc/samba/smb.conf ]; then + # The new location for the conffile should not exist yet, so we create the + # dir. + mkdir -p /etc/samba + + # Finally, move the conffile to its new location. + mv /etc/smb.conf /etc/samba/smb.conf +fi + +# +# Move smbpasswd conffile from its old location (/etc/) to its new one +# (/etc/samba). +# +# If conffile exists in old location AND conffile does not exist on new +# location then... +# +if [ -f /etc/smbpasswd -a ! -e /etc/samba/smbpasswd ]; then + # The new location for the conffile should not exist yet, so we create the + # dir. + mkdir -p /etc/samba + + # Finally, move the conffile to its new location. + mv /etc/smbpasswd /etc/samba/smbpasswd +fi diff --git a/packaging/Debian/debian/samba.prerm b/packaging/Debian/debian/samba.prerm new file mode 100644 index 00000000000..acd6d087b5c --- /dev/null +++ b/packaging/Debian/debian/samba.prerm @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Pre-removal script for the Samba package for Debian GNU/Linux. +# +# Written by Eloy A. Paris for the Debian project. +# + +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +# The most important thing the prerm script must do is to stop the Samba +# daemons (nmbd and smbd). Note that this can be tricky since Samba +# can be running from the inetd meta-daemon or as daemons (it's a +# user choice). + +# Before we stop Samba we need to know how it is running (from inetd +# or as daemons). We could source in the debian_config file but it +# is safer to grep /etc/inetd.conf. +if grep -q '^netbios-ns' /etc/inetd.conf; then + # Samba is running from inetd. We need to disable the Samba daemons + # in /etc/inetd.conf before we stop the daemons. Otherwise traffic + # in the NetBIOS ports will make inetd start them again. + # + # Note: user preferences regarding the mode he/she wants Samba to + # be run (inetd or daemons) will be lost next. In the postinst + # we depend on the information present in the debian_config + # file to restore everything back to the way it was. + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + + # Now it is safe to stop the daemons... + + # I have just recalled that old versions of nmbd and smbd did not store + # their PID's in /var/samba/state/ (or whatever directory + # was used for this purpose in configure), so I can't use + # --pidfile in start-stop-daemon to stop nmbd or smbd. I + # will handle this by testing first whether the PID file exists. + if [ -f $NMBDPID ]; then + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID + else + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet + fi + + # nmbd must be dead by now, now it's smbd's turn + if [ -f $SMBDPID ]; then + start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID + else + start-stop-daemon --stop --oknodo --user root --name smbd --quiet + fi +elif [ -x /etc/init.d/samba ]; then # Old Samba packages didn't have a + # /etc/init.d/samba so we better + # check first. + # Samba is running as daemons. No problem here, just stop Samba... + /etc/init.d/samba stop +fi + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/samba ]; then + rm -f /usr/doc/samba +fi + +# Make sure there are no nmbd or smbd daemons running (security check) +# (as you see this code is commented out - so far I haven't had the need +# to do this sanity check - peloy, Aug. 23, 1998) +#ps -ax | grep nmbd +#if [ $? ... ]; then +# killall -9 nmbd +#fi + +#ps -ax | grep smbd +#if [ $? ... ]; then +# killall -9 smbd +#fi diff --git a/packaging/Debian/debian/sambaconfig b/packaging/Debian/debian/sambaconfig new file mode 100644 index 00000000000..0d35a519670 --- /dev/null +++ b/packaging/Debian/debian/sambaconfig @@ -0,0 +1,130 @@ +#!/bin/sh +# +# Written by Eloy A. Paris for Debian GNU/Linux. +# + +PATH="/usr/sbin:/usr/bin:/sbin:/bin" +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +if [ ! -f $DEBIAN_CONFIG ]; then + echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" + echo "with the installation of Samba on this system. Please re-install" + echo "Samba." + exit 1 +fi + +# Read current Samba configuration +. $DEBIAN_CONFIG + +reload=1 + +while [ $# -gt 0 ] +do + case "$1" in + --run-from-inetd) + run_from_inetd=1 + shift + ;; + + --run-as-daemons) + run_from_inetd=0 + shift + ;; + --no-reload) + reload=0 + shift + ;; + + *) + echo "Usage: $0 [--run-from-inetd|--run-as-daemons] [no-reload]" >&2 + exit 1 + ;; + esac +done + +# Make sure there are no Samba daemons (nmbd or smbd) running +# + +if [ "$run_mode" = "from_inetd" ]; then + # Samba is running from inetd - need to disable inetd before + # killing the daemons. + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID + start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID +else + # Samba is running as daemons + /etc/init.d/samba stop +fi + +if [ "x$run_from_inetd" = "x" ] +then + echo "Run Samba as daemons or from inetd?" + echo -n "Press 'D' for to run as daemons or 'I' to run from inetd: [I] " + + read mode + test -n "$mode" || mode="I" + + case "$mode" in + [Dd]*) + run_from_inetd=0 + ;; + + *) + run_from_inetd=1 + ;; + esac +fi + +if [ "$run_from_inetd" = 1 ]; then + echo "Samba will run from inetd. Run sambaconfig to reconfigure." + echo "" + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + run_mode="from_inetd" +else + echo "Samba will run as daemons. Run sambaconfig to reconfigure." + echo "" + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + run_mode="as_daemons" +fi + +# Rebuild Debian configuration file (only thing that could have +# changed so far is the variable called "run_mode". + +# Start the Samba daemons (take care of whether the user used the --no-reload +# option and how Samba is running: from inetd or as daemons) +echo "config_version=$config_version" > $DEBIAN_CONFIG +echo "run_mode=$run_mode" >> $DEBIAN_CONFIG +echo "smbpasswd_created=$smbpasswd_created" >> $DEBIAN_CONFIG + +if [ "$reload" = 0 ]; then + echo "Samba will not start (--no-reload parameter provided). Please note" + echo "that if you configured Samba to run from inetd, the Samba daemons" + echo "will start automatically when there is traffic in the NetBIOS ports" +elif [ "$run_from_inetd" = 1 ]; then + echo "The --no-reload parameter was not provided so I assume you want" + echo "to have the Samba daemons started. Since you are running from inetd" + echo "the Samba daemosn will start automatically when there is traffic" + echo "in the NetBIOS ports." +else + echo -n "The --no-reload parameter was not provided, start Samba now? [Y/n] " + read yn + test -n "$yn" || yn="Y" + + case "$yn" in + [Nn]*) + echo "Not started; to start later, do: /etc/init.d/samba start" + echo -n "Press [ENTER] " + read line + ;; + + *) + /etc/init.d/samba start + ;; + esac +fi diff --git a/packaging/Debian/debian/sambaconfig.8 b/packaging/Debian/debian/sambaconfig.8 new file mode 100644 index 00000000000..2a0aaa9aa31 --- /dev/null +++ b/packaging/Debian/debian/sambaconfig.8 @@ -0,0 +1,40 @@ +.TH SAMBACONFIG 8 06-Apr-1998 +.SH NAME +sambaconfig \- configure Samba for Debian systems +.SH SYNOPSIS +sambaconfig [--run-from-inetd|--run-as-daemons] [--no-reload] +.SH DESCRIPTION +.B sambaconfig +is used to simplify the configuration of samba(8) for use on Debian +systems. +.PP +You may run this program to (re)configure samba for your Debian system +at any time. +.PP +Normally +.B sambaconfig +will ask if you want to reload the Samba daemons after making changes to its +configuration. The --no-reload option will avoid this question. Note +that if Samba is running from inetd and --no-reload is not supplied no +questions is asked because Samba will start automatically from inetd +when there is traffic on the NetBIOS ports. +.SH FILES +.TP +/etc/inetd.conf +If the lines that start the NetBIOS daemons nmbd and smbd are +commented out then Samba will start as daemons from /etc/init.d/start +.TP +/etc/init.d/samba +Script that will start/stop/restart Samba when running as daemons +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.TP +/etc/samba/debian_config +Debian specific configuration information, it holds the mode in which +Samba is running (from inetd or as daemons). +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris (man page based on sendmailconfig's man page +by Robert Leslie ) diff --git a/packaging/Debian/debian/scripts/patch-source b/packaging/Debian/debian/scripts/patch-source new file mode 100755 index 00000000000..a95a0020488 --- /dev/null +++ b/packaging/Debian/debian/scripts/patch-source @@ -0,0 +1,7 @@ +#!/bin/sh -e + +for patch in debian/patches/*.patch; do + patch -p1 < $patch +done + +exit 0 diff --git a/packaging/Debian/debian/scripts/unpatch-source b/packaging/Debian/debian/scripts/unpatch-source new file mode 100755 index 00000000000..81d51f7dd4e --- /dev/null +++ b/packaging/Debian/debian/scripts/unpatch-source @@ -0,0 +1,7 @@ +#!/bin/sh -e + +for patch in debian/patches/*.patch; do + patch -p1 -R < $patch +done + +exit 0 diff --git a/packaging/Debian/debian/smb.conf b/packaging/Debian/debian/smb.conf new file mode 100644 index 00000000000..14cc20f49c4 --- /dev/null +++ b/packaging/Debian/debian/smb.conf @@ -0,0 +1,147 @@ +; +; /etc/samba/smb.conf +; +; Sample configuration file for the Samba suite for Debian GNU/Linux +; +; Please see the manual page for smb.conf for detailed description of +; every parameter. +; + +[global] + printing = bsd + printcap name = /etc/printcap + load printers = yes + guest account = nobody + invalid users = root + +; "security = user" is always a good idea. This will require a Unix account +; in this server for every user accessing the server. + security = user + +; Change this for the workgroup your Samba server will part of + workgroup = WORKGROUP + + server string = %h server (Samba %v) + +; If you want Samba to log though syslog only then set the following +; parameter to 'yes'. Please note that logging through syslog in +; Samba is still experimental. + syslog only = no + +; We want Samba to log a minimum amount of information to syslog. Everything +; should go to /var/log/{smb,nmb} instead. If you want to log through +; syslog you should set the following parameter to something higher. + syslog = 0; + +; This socket options really speed up Samba under Linux, according to my +; own tests. + socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 + +; Passwords are encrypted by default. This way the latest Windows 95 and NT +; clients can connect to the Samba server with no problems. + encrypt passwords = yes + +; It's always a good idea to use a WINS server. If you want this server +; to be the WINS server for your network change the following parameter +; to "yes". Otherwise leave it as "no" and specify your WINS server +; below (note: only one Samba server can be the WINS server). +; Read BROWSING.txt for more details. + wins support = no + +; If this server is not the WINS server then specify who is it and uncomment +; next line. +; wins server = 172.16.0.10 + +; Please read BROWSING.txt and set the next four parameters according +; to your network setup. There is no valid default so they are commented +; out. +; os level = 0 +; domain master = no +; local master = no +; preferred master = no + +; What naming service and in what order should we use to resolve host names +; to IP addresses + name resolve order = lmhosts host wins bcast + +; This will prevent nmbd to search for NetBIOS names through DNS. + dns proxy = no + +; Name mangling options + + preserve case = yes + short preserve case = yes + +; This boolean parameter controlls whether Samba attempts to sync. the Unix +; password with the SMB password when the encrypted SMB password in the +; /etc/samba/smbpasswd file is changed. + unix password sync = false + +; For Unix password sync. to work on a Debian GNU/Linux system, the following +; parameters must be set (thanks to Augustin Luton +; for sending the correct chat script for +; the passwd program in Debian Potato). + passwd program = /usr/bin/passwd %u + passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . + +; The following parameter is useful only if you have the linpopup package +; installed. The samba maintainer and the linpopup maintainer are +; working to ease installation and configuration of linpopup and samba. +; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & + +; The default maximum log file size is 5 MBytes. That's too big so this +; next parameter sets it to 1 MByte. Currently, Samba rotates log +; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes. +; A better solution would be to have Samba rotate the log file upon +; reception of a signal, but for now on, we have to live with this. + max log size = 1000 + + obey pam restrictions = yes + +[homes] + comment = Home Directories + browseable = no + +; By default, the home directories are exported read only. Change next +; parameter to "no" if you want to be able to write to them. + read only = yes + +; File creation mask is set to 0700 for security reasons. If you want to +; create files with group=rw permissions, set next parameter to 0775. + create mask = 0700 + +; Directory creation mask is set to 0700 for security reasons. If you want to +; create dirs. with group=rw permissions, set next parameter to 0775. + directory mask = 0700 + +[printers] + comment = All Printers + browseable = no + path = /tmp + printable = yes + public = no + writable = no + create mode = 0700 + +; A sample share for sharing your CD-ROM with others. +;[cdrom] +; comment = Samba server's CD-ROM +; writable = no +; locking = no +; path = /cdrom +; public = yes +; +; The next two parameters show how to auto-mount a CD-ROM when the +; cdrom share is accesed. For this to work /etc/fstab must contain +; an entry like this: +; +; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 +; +; The CD-ROM gets unmounted automatically after the connection to the +; +; If you don't want to use auto-mounting/unmounting make sure the CD +; is mounted on /cdrom +; +; preexec = /bin/mount /cdrom +; postexec = /bin/umount /cdrom + diff --git a/packaging/Debian/debian/smbclient.files b/packaging/Debian/debian/smbclient.files new file mode 100644 index 00000000000..5a660fc8d4e --- /dev/null +++ b/packaging/Debian/debian/smbclient.files @@ -0,0 +1,9 @@ +usr/bin/smbclient +usr/bin/smbtar +usr/bin/rpcclient +usr/bin/smbspool +usr/share/man/man1/smbclient.1 +usr/share/man/man1/smbtar.1 +usr/share/man/man1/rpcclient.1 +usr/share/man/man8/smbspool.8 +usr/lib/cups/backend/smb diff --git a/packaging/Debian/debian/smbfs.files b/packaging/Debian/debian/smbfs.files new file mode 100644 index 00000000000..870db7d6453 --- /dev/null +++ b/packaging/Debian/debian/smbfs.files @@ -0,0 +1,10 @@ +sbin/mount.smbfs +sbin/mount.smb +usr/bin/smbmount +usr/bin/smbumount +usr/bin/smbmnt +usr/share/man/man8/smbmount.8 +usr/share/man/man8/smbumount.8 +usr/share/man/man8/smbmnt.8 +usr/share/man/man8/mount.smb.8 +usr/share/man/man8/mount.smbfs.8 diff --git a/packaging/Debian/debian/smbfs.suid b/packaging/Debian/debian/smbfs.suid new file mode 100644 index 00000000000..9569087fff3 --- /dev/null +++ b/packaging/Debian/debian/smbfs.suid @@ -0,0 +1,5 @@ +usr/bin/smbmnt +usr/bin/smbmount-2.2.x +usr/bin/smbumount-2.2.x +usr/bin/smbmount-2.0.x +usr/bin/smbumount-2.0.x diff --git a/packaging/Debian/debian/smbwrapper.dirs b/packaging/Debian/debian/smbwrapper.dirs new file mode 100644 index 00000000000..fd727bddf05 --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/samba diff --git a/packaging/Debian/debian/smbwrapper.docs b/packaging/Debian/debian/smbwrapper.docs new file mode 100644 index 00000000000..2924e78734a --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.docs @@ -0,0 +1,2 @@ +source/smbwrapper/README +source/smbwrapper/PORTING diff --git a/packaging/Debian/debian/smbwrapper.files b/packaging/Debian/debian/smbwrapper.files new file mode 100644 index 00000000000..08edbead6e6 --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.files @@ -0,0 +1 @@ +usr/bin/smbsh diff --git a/packaging/Debian/debian/swat.dirs b/packaging/Debian/debian/swat.dirs new file mode 100644 index 00000000000..d5df7df4b8e --- /dev/null +++ b/packaging/Debian/debian/swat.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/samba/swat diff --git a/packaging/Debian/debian/swat.docs b/packaging/Debian/debian/swat.docs new file mode 100644 index 00000000000..afbfcf0c612 --- /dev/null +++ b/packaging/Debian/debian/swat.docs @@ -0,0 +1 @@ +swat/README diff --git a/packaging/Debian/debian/swat.files b/packaging/Debian/debian/swat.files new file mode 100644 index 00000000000..6fed39111be --- /dev/null +++ b/packaging/Debian/debian/swat.files @@ -0,0 +1,2 @@ +usr/sbin/swat +usr/share/man/man8/swat.8 diff --git a/packaging/Debian/debian/swat.postinst b/packaging/Debian/debian/swat.postinst new file mode 100644 index 00000000000..c5ab4890441 --- /dev/null +++ b/packaging/Debian/debian/swat.postinst @@ -0,0 +1,23 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + *) + echo "$0: Unknown action \"$1\"" + exit 0 + ;; +esac + +# Set up swat, turned off by default. +update-inetd --group OTHER --add \ + '## swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' + +if [ -d /usr/doc -a ! -e /usr/doc/swat -a -d /usr/share/doc/swat ]; then + ln -sf ../share/doc/swat /usr/doc/swat +fi diff --git a/packaging/Debian/debian/swat.postrm b/packaging/Debian/debian/swat.postrm new file mode 100644 index 00000000000..e203d2855ff --- /dev/null +++ b/packaging/Debian/debian/swat.postrm @@ -0,0 +1,19 @@ +#!/bin/sh + +case "$1" in + purge) + update-inetd --remove '/usr/sbin/swat$' + exit 0 + ;; + remove) + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "$0: unknown action \"$1\"" + exit 0 + ;; +esac + +exit 0 + diff --git a/packaging/Debian/debian/wins2dns.awk b/packaging/Debian/debian/wins2dns.awk new file mode 100644 index 00000000000..176868a115d --- /dev/null +++ b/packaging/Debian/debian/wins2dns.awk @@ -0,0 +1,38 @@ +#!/usr/bin/awk -f +# +# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) +# From: Jason Gunthorpe +# To: samba@packages.debian.org +# Subject: Nifty samba script +# +# Here is a really nifty script I just wrote for samba, it takes the wins +# database in /var/samba/wins and writes out two dns files for it. In this +# way network wide wins clients can get into the dns for use by unix +# machines. +# +# Perhaps this could be included in /usr/doc/examples or somesuch. +# + +BEGIN { + FS="#|\""; +FORWARD="/tmp/wins.hosts" +REVERSE="/tmp/wins.rev" +DOMAIN="ven.ra.rockwell.com" +} +$3 == "00" { + split($4,a," " ); + split(a[2],b,"."); + while (sub(" ","-",$2)); + $2=tolower($2); + if (b[1] == "255") + next; + if (length($2) >= 8) + print $2"\ta\t"a[2] > FORWARD + else + print $2"\t\ta\t"a[2] > FORWARD + print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE +} +END { + system("echo killall -HUP named"); +} + diff --git a/packaging/Debian/stable/README b/packaging/Debian/stable/README index 235daf31e15..18e9bb94e6e 100644 --- a/packaging/Debian/stable/README +++ b/packaging/Debian/stable/README @@ -1,3 +1,3 @@ -Coming soon... +See new packaging notes in ../README -Eloy A. Paris Fri Oct 12 15:06:46 EDT 2001 +Eloy A. Paris Sat Feb 2 08:46:04 CST 2002 diff --git a/packaging/Debian/unstable/README b/packaging/Debian/unstable/README new file mode 100644 index 00000000000..18e9bb94e6e --- /dev/null +++ b/packaging/Debian/unstable/README @@ -0,0 +1,3 @@ +See new packaging notes in ../README + +Eloy A. Paris Sat Feb 2 08:46:04 CST 2002 diff --git a/packaging/Debian/unstable/README.build b/packaging/Debian/unstable/README.build deleted file mode 100644 index 0a11a1f6ea6..00000000000 --- a/packaging/Debian/unstable/README.build +++ /dev/null @@ -1,397 +0,0 @@ -From: Steve Langasek -To: "Eloy A. Paris" -Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) -Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 -In-Reply-To: <20010823100906.A1092@antenas> -Message-ID: -MIME-Version: 1.0 -Content-Type: TEXT/PLAIN; charset=US-ASCII - -On Thu, 23 Aug 2001, Eloy A. Paris wrote: - -> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: - -> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, -> > cache) support into the package. Issues like this are frequent enough with -> > Samba, and the configure tests add enough time to the build process, that I -> > think there'd be much benefit in being able to step past a lot of these. - -> Uhhmmm... I don't know, I guess I don't like much the idea of -> maintaining a config.cache. It looks like extra work plus a -> compilation process that is "synthetic" or atificial. What happens if -> the Samba Team adds a new test, or modifies the configure script, will -> the config.cache pick those up? - -> In any case, you are the expert, so if you think that's the way to go, -> and the burden far exceeds the problems we have right now I say let's -> go for it. I am not well versed on autoconf and the configure process, -> that's all... - -Well, I'll attach my work to the bottom of this message and let you judge it -for yourself. - -The config.cache I'm trying to generate here is not equivalent to what -a configure script outputs. The only values I'm including are those which 1) -are no-brainers on any glibc-based platform, 2) are questions we need to force -a particular value for regardless of the kernel being built against, or 3) are -questions about specific bizarre features of proprietary Unices that we'll -always get an answer of 'no' to. - -I've removed all of the config.cache variables related to headers, or to -checks for particular libraries; I think it's pretty safe to assert that glibc -provides basic C functions like select(), setenv(), and waitpid() on all our -build targets, but I think it's less safe to assert that they'll always be -provided by particular header files. - -So the config.cache won't automatically be updated with answers to new -configure tests, but it also doesn't need to in order to be useful. There's -really only a handful of variables in there that we /need/ in order to -guarantee correctly-built packages, and if you want to leave out everything -else, that's perfectly ok too. Everything from the fifth stanza on down is -just a build-time speed-up for some of the slower architectures. Well, it -also has the fringe benefit that the packages will FAIL to build if someone -tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I -see that as a plus :), you may disagree, but in any case my next trick would -be to add a global variable developers can set to bypass the provided -config.cache. - - -It is a little artificial, but the whole point of .debs is to be able to build -binaries in a controlled environment. Right now, we don't really have control -over what happens in the autobuilders. We have even /less/ control over what -happens in a stable release: it's been two weeks now since I built binaries -for bug #94380, and they haven't been uploaded to security.d.o yet. I'm -guessing they won't be uploaded until Wichert is back from vacation, either -- -which is fine, but it would be nice if we didn't have to worry about -mis-builds by the security team, or about putting the security team to extra -trouble after the fact to get packages fixed. - -With a pre-loaded config.cache, we can ensure that bugs of this kind don't -happen in woody. We can take the arm autobuilder problem into our own hands, -and not have to worry about quirkiness in the build environment. We can even -close bug #109773, since we no longer have to worry about detecting the -setuid() routines. - - -So to me, it definitely seems worth it. But you're the maintainer, and I -won't ask you to put anything in the package that you're not comfortable with. - - -> By the way, I think I remember someone was able to build 2.2.x succesfully on -> the ARM. If this is the case, could it be that there's something weird -> with Phillip's setup? - -It could be. There are arm packages for 2.2.1a-1, so at /some/ point the -autobuilder was able to pass the locking test. - - -> P.S. How did you know about the ARM build problems? I don't see any -> bugs about this... - -, follow the links for samba... The -exact reference for the arm autobuilder is at -. - -Regards, -Steve Langasek -postmodern programmer - - -diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog ---- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 -+++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 -@@ -1,3 +1,12 @@ -+samba (2.2.1a-4.1) unstable; urgency=low -+ -+ * Fix up the build system to avoid needing to run configure as root to -+ answer questions we already know the answers to. -+ * In the process, make surprising progress towards being able to -+ cross-compile the samba packages. -+ -+ -- Steve Langasek Wed, 22 Aug 2001 23:35:00 -0500 -+ - samba (2.2.1a-4) unstable; urgency=low - - * Fixed typo in smbmount's mount page. -diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache ---- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 -+++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 -@@ -0,0 +1,231 @@ -+# -+# 22 August 2001 Steve Langasek -+# -+# This file is a shell script that caches the results of configure -+# tests run on this system so they can be shared between configure -+# scripts and configure runs. It is not useful on other systems. -+# If it contains results you don't want to keep, you may remove or edit it. -+# -+# By default, configure uses ./config.cache as the cache file, -+# creating it if it does not exist already. You can give configure -+# the --cache-file=FILE option to use a different cache file; that is -+# what configure does when it calls configure scripts in -+# subdirectories, so they share the cache. -+# Giving --cache-file=/dev/null disables caching, for debugging configure. -+# config.status only pays attention to the cache file if you give it the -+# --recheck option to rerun configure. -+# -+# -+# This config.cache file contains a list of acceptable autoconf -+# values which can be used in compiling Samba for Debian woody/sid. -+# -+# Autoconf sorts options alphabetically in its output. This file -+# groups options logically. -+ -+ -+# Load any architecture-specific settings -+if [ -n "$DEB_HOST_GNU_TYPE" \ -+ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then -+ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} -+fi -+ -+ -+# This is at the top because it's most in need of regular tweaking. -+# These are options which are supported on 2.4 kernels, but not on 2.2 -+# kernels. -+ -+samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} -+samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} -+samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} -+ -+ -+# These are present in 2.2 kernels, but not in 2.0... -+ -+samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} -+samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} -+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} -+ -+ -+# POSIX ACL support not present in Linux 2.2; not allowed in the -+# Debian packages, even if present on the build machine. -+ -+ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} -+ -+ -+# Various basic libc/compiler stuff that it's blindingly obvious that -+# Linux supports (now watch me get bitten for saying that) -+ -+ac_cv_c_const=${ac_cv_c_const=yes} -+ac_cv_c_inline=${ac_cv_c_inline=inline} -+samba_cv_volatile=${samba_cv_volatile=yes} -+ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} -+ac_cv_func_bzero=${ac_cv_func_bzero=yes} -+ac_cv_func_chmod=${ac_cv_func_chmod=yes} -+ac_cv_func_chown=${ac_cv_func_chown=yes} -+ac_cv_func_chroot=${ac_cv_func_chroot=yes} -+ac_cv_func_connect=${ac_cv_func_connect=yes} -+ac_cv_func_dup2=${ac_cv_func_dup2=yes} -+ac_cv_func_execl=${ac_cv_func_execl=yes} -+ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} -+ac_cv_func_fchown=${ac_cv_func_fchown=yes} -+ac_cv_func_fstat=${ac_cv_func_fstat=yes} -+ac_cv_func_fsync=${ac_cv_func_fsync=yes} -+ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} -+ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} -+ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} -+ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} -+ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} -+ac_cv_func_glob=${ac_cv_func_glob=yes} -+ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} -+ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} -+ac_cv_func_llseek=${ac_cv_func_llseek=yes} -+ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} -+ac_cv_func_memmove=${ac_cv_func_memmove=yes} -+ac_cv_func_memset=${ac_cv_func_memset=yes} -+ac_cv_func_mktime=${ac_cv_func_mktime=yes} -+ac_cv_func_pipe=${ac_cv_func_pipe=yes} -+ac_cv_func_poll=${ac_cv_func_poll=yes} -+ac_cv_func_pread=${ac_cv_func_pread=yes} -+ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} -+ac_cv_func_rand=${ac_cv_func_rand=yes} -+ac_cv_func_random=${ac_cv_func_random=yes} -+ac_cv_func_readlink=${ac_cv_func_readlink=yes} -+ac_cv_func_rename=${ac_cv_func_rename=yes} -+ac_cv_func_select=${ac_cv_func_select=yes} -+ac_cv_func_setenv=${ac_cv_func_setenv=yes} -+ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} -+ac_cv_func_setsid=${ac_cv_func_setsid=yes} -+ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} -+ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} -+ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} -+ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} -+ac_cv_func_srand=${ac_cv_func_srand=yes} -+ac_cv_func_srandom=${ac_cv_func_srandom=yes} -+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} -+ac_cv_func_strchr=${ac_cv_func_strchr=yes} -+ac_cv_func_strdup=${ac_cv_func_strdup=yes} -+ac_cv_func_strerror=${ac_cv_func_strerror=yes} -+ac_cv_func_strftime=${ac_cv_func_strftime=yes} -+ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} -+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} -+ac_cv_func_symlink=${ac_cv_func_symlink=yes} -+ac_cv_func_usleep=${ac_cv_func_usleep=yes} -+ac_cv_func_utime=${ac_cv_func_utime=yes} -+ac_cv_func_utimes=${ac_cv_func_utimes=yes} -+ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} -+ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} -+ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} -+ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} -+ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} -+ac_cv_type_size_t=${ac_cv_type_size_t=yes} -+ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} -+samba_cv_socklen_t=${samba_cv_socklen_t=yes} -+ -+# Yes, we know Linux supports fcntl locking. Just ignore -+# any errors caused by building on an NFS mount. -+samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} -+ -+ -+# smbwrapper doesn't work because the glibc maintainers don't want -+# to support transparent userland VFS. We might as well preempt -+# any checks for shadowed symbols that are only useful for smbwrapper. -+ -+ac_cv_func___acl=${ac_cv_func___acl=no} -+ac_cv_func__acl=${ac_cv_func__acl=no} -+ac_cv_func___chdir=${ac_cv_func___chdir=no} -+ac_cv_func__chdir=${ac_cv_func__chdir=no} -+ac_cv_func___close=${ac_cv_func___close=no} -+ac_cv_func__close=${ac_cv_func__close=no} -+ac_cv_func___closedir=${ac_cv_func___closedir=no} -+ac_cv_func__closedir=${ac_cv_func__closedir=no} -+ac_cv_func___dup=${ac_cv_func___dup=no} -+ac_cv_func__dup=${ac_cv_func__dup=no} -+ac_cv_func___dup2=${ac_cv_func___dup2=no} -+ac_cv_func__dup2=${ac_cv_func__dup2=no} -+ac_cv_func___facl=${ac_cv_func___facl=no} -+ac_cv_func__facl=${ac_cv_func__facl=no} -+ac_cv_func___fchdir=${ac_cv_func___fchdir=no} -+ac_cv_func__fchdir=${ac_cv_func__fchdir=no} -+ac_cv_func___fcntl=${ac_cv_func___fcntl=no} -+ac_cv_func__fcntl=${ac_cv_func__fcntl=no} -+ac_cv_func___fork=${ac_cv_func___fork=no} -+ac_cv_func__fork=${ac_cv_func__fork=no} -+ac_cv_func___fstat=${ac_cv_func___fstat=no} -+ac_cv_func__fstat=${ac_cv_func__fstat=no} -+ac_cv_func___fstat64=${ac_cv_func___fstat64=no} -+ac_cv_func__fstat64=${ac_cv_func__fstat64=no} -+ac_cv_func___fxstat=${ac_cv_func___fxstat=no} -+ac_cv_func___getcwd=${ac_cv_func___getcwd=no} -+ac_cv_func__getcwd=${ac_cv_func__getcwd=no} -+ac_cv_func___getdents=${ac_cv_func___getdents=no} -+ac_cv_func__getdents=${ac_cv_func__getdents=no} -+ac_cv_func___llseek=${ac_cv_func___llseek=no} -+ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} -+ac_cv_func__llseek=${ac_cv_func__llseek=no} -+ac_cv_func___lseek=${ac_cv_func___lseek=no} -+ac_cv_func__lseek=${ac_cv_func__lseek=no} -+ac_cv_func___lstat=${ac_cv_func___lstat=no} -+ac_cv_func__lstat=${ac_cv_func__lstat=no} -+ac_cv_func___lstat64=${ac_cv_func___lstat64=no} -+ac_cv_func__lstat64=${ac_cv_func__lstat64=no} -+ac_cv_func___lxstat=${ac_cv_func___lxstat=no} -+ac_cv_func___open=${ac_cv_func___open=no} -+ac_cv_func__open=${ac_cv_func__open=no} -+ac_cv_func___open64=${ac_cv_func___open64=no} -+ac_cv_func__open64=${ac_cv_func__open64=no} -+ac_cv_func___opendir=${ac_cv_func___opendir=no} -+ac_cv_func__opendir=${ac_cv_func__opendir=no} -+ac_cv_func___pread=${ac_cv_func___pread=no} -+ac_cv_func__pread=${ac_cv_func__pread=no} -+ac_cv_func___pread64=${ac_cv_func___pread64=no} -+ac_cv_func__pread64=${ac_cv_func__pread64=no} -+ac_cv_func___pwrite=${ac_cv_func___pwrite=no} -+ac_cv_func__pwrite=${ac_cv_func__pwrite=no} -+ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} -+ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} -+ac_cv_func___read=${ac_cv_func___read=no} -+ac_cv_func__read=${ac_cv_func__read=no} -+ac_cv_func___readdir=${ac_cv_func___readdir=no} -+ac_cv_func__readdir=${ac_cv_func__readdir=no} -+ac_cv_func___readdir64=${ac_cv_func___readdir64=no} -+ac_cv_func__readdir64=${ac_cv_func__readdir64=no} -+ac_cv_func___seekdir=${ac_cv_func___seekdir=no} -+ac_cv_func__seekdir=${ac_cv_func__seekdir=no} -+ac_cv_func___stat=${ac_cv_func___stat=no} -+ac_cv_func__stat=${ac_cv_func__stat=no} -+ac_cv_func___stat64=${ac_cv_func___stat64=no} -+ac_cv_func__stat64=${ac_cv_func__stat64=no} -+ac_cv_func___telldir=${ac_cv_func___telldir=no} -+ac_cv_func__telldir=${ac_cv_func__telldir=no} -+ac_cv_func___write=${ac_cv_func___write=no} -+ac_cv_func__write=${ac_cv_func__write=no} -+ac_cv_func___xstat=${ac_cv_func___xstat=no} -+ -+ -+ -+# Miscellaneous stuff that isn't, and shouldn't be, available -+# in Debian. Those interested in building debs for other systems may -+# need to remove some of these defines. -+ -+ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} -+ac_cv_func_crypt16=${ac_cv_func_crypt16=no} -+ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} -+ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} -+ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} -+ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} -+ac_cv_func_rdchk=${ac_cv_func_rdchk=no} -+ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} -+ac_cv_func_setgidx=${ac_cv_func_setgidx=no} -+ac_cv_func_setluid=${ac_cv_func_setluid=no} -+ac_cv_func_setpriv=${ac_cv_func_setpriv=no} -+ac_cv_func_setuidx=${ac_cv_func_setuidx=no} -+ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} -+ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} -+ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} -+ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} -+ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} -+ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} -+ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} -+ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} -+ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} -+ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} -diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux ---- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 -+++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 -@@ -0,0 +1,12 @@ -+# 22 Aug 2001 Steve Langasek -+ -+# This file contains autoconf settings specific to the alpha-linux -+# platform that should be preloaded when building for this architecture. -+ -+ -+# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but -+# Linux 2.4 does. Ensure that packages compiled for woody remain -+# compatible with 2.2 kernels, even if the build machine is running 2.4. -+samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -+samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} -diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules ---- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 -+++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 -@@ -15,6 +15,14 @@ - # This has to be exported to make some magic below work. - export DH_OPTIONS - -+# Set the host and build architectures for use with config.cache loading, -+# cross-building, etc. -+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -+ -+export DEB_HOST_GNU_TYPE -+export DEB_BUILD_GNU_TYPE -+ - BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb - - DESTDIR=`pwd`/debian/samba -@@ -48,8 +56,11 @@ - # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ - # --localstatedir=/var - -+ if [ -f debian/config.cache ]; then \ -+ cp -f debian/config.cache source/config.cache; \ -+ fi - # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) -- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) -+ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) - - touch configure-stamp - diff --git a/packaging/Debian/unstable/README.debian b/packaging/Debian/unstable/README.debian deleted file mode 100644 index b57e034ced9..00000000000 --- a/packaging/Debian/unstable/README.debian +++ /dev/null @@ -1,67 +0,0 @@ -samba for DEBIAN ----------------- - -This package was built by me (Eloy Paris ) based on work -from Bruce Perens , Andrew Howell , -Klee Dienes and Michael Meskes , -all previous maintainers of the packages samba and sambades (now merged -together - see below). - -Password encryption is now supported in the standard samba package -(>= 1.9.18alpha12-1). This has been possible because Samba 1.9.18 -and later does not depend on the DES encryption libraries. This makes -package sambades (part of the non-us section) obsolete. - -Also, there are no more export restrictions with this version of Samba. - -As of Samba 2.0.6-1, the Debian version of Samba is compiled with -Pluggable Authentication Modules (PAM) support. PAM support was -discontinued during the libc5 -> libc6 migration process and I never -brought it back until 2.0.6-1. I don't use PAM myself so let me know -if you find any problems. - -Since Samba 2.0.5a-3, the smbfs utilities included in the smbfs package -can now handle kernels > 2.0.x so there is no need to have two smbfs -packages. - -As of Samba 2.0.5a-5, the Samba sources produce the following binary packages: - -samba: A LanManager like file and printer server for Unix. -samba-common: Samba common files used by both the server and the client. -smbclient: A LanManager like simple client for Unix. -swat: Samba Web Administration Tool -samba-doc: Samba documentation. -smbfs: Mount and umount commands for the smbfs (works with 2.2.x and - above kernels, not with 2.0.x kernels.) - -Please note that the package smbwrapper (a shared library that provides -SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 -does not exist any more. The reason is that starting with Samba 2.0.6-1, that -code does not even compile, and the upstream author (Andrew Tridgell) -recommended to disable the compilation of smbwrapper until some issues -with glibc2.1 get cleared out (the problem is with glibc, not with Samba -itself). - -Support for NT Domains ----------------------- - -Samba 2.2 includes preliminary support for NT domains. A Samba server -can now be part of a Windows NT domain whose Primary Domain Controller -is a Windows NT server. This feature is supposed to be stable although I -haven't tried it myself. Read the documentation in the samba-doc package -for help on how to do this (hint: "security = domain" in the smb.conf -file). - -Samba 2.2 has also experimental support for Primary Domain -Controller. This means that a Samba server can act now as a PDC. There -are no special flags needed to compile Samba with NT domain PDC -support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation -section). - -Please note that NT domain PDC support is far from complete and is still -experimental. - -Your comments are welcome. - - -Eloy A. Paris , Sunday March 18, 2001. diff --git a/packaging/Debian/unstable/TODO b/packaging/Debian/unstable/TODO deleted file mode 100644 index 748f1edcd15..00000000000 --- a/packaging/Debian/unstable/TODO +++ /dev/null @@ -1,4 +0,0 @@ -* Check in the smbmount wrapper script that the kernel has support -for smbfs, as suggested by Jeroen Schaap -. - diff --git a/packaging/Debian/unstable/changelog b/packaging/Debian/unstable/changelog deleted file mode 100644 index a26c219600c..00000000000 --- a/packaging/Debian/unstable/changelog +++ /dev/null @@ -1,1418 +0,0 @@ -samba (2.2.1a.cvs20011002-1) experimental; urgency=low - - * Building from CVS sources. This code will become Samba 2.2.2 RSN. - * Temporary fix for #113763 (Steve Langasek) - - -- Eloy A. Paris Thu, 4 Oct 2001 00:02:08 -0400 - -samba (2.2.1a-9.1) unstable; urgency=low - - * Quick hack to avoid smbmount reveal password length. Please note - that even with this hack there is a small window when password is - completely visible with 'ps aux'. There are other methods that should - be used to automate mounting of SMB shares. - Closes: #112195: smbmount-2.2.x reveals password length. - * Applied patch from Steve Langasek to prevent - forcing use of setresuid() in Sparc. - Closes: #112779: samba build forces use of setresuid, which causes - smbd to fail on Sparc. - - -- Eloy A. Paris Mon, 24 Sep 2001 19:52:07 -0400 - -samba (2.2.1a-9) unstable; urgency=low - - * Replaced $(LD) with $(CC) all the way through source/Makefile. - Closes: #111036: ld shouldn't be used to link shlibs. - * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and - sgml as well.) - Closes: #110963: smb.conf: mail should be /usr/bin/mail. - * Documented better smbclient's -W behavior. Patch from Steve - Langasek. - Closes: #53672: smbclient: -W flag is interpreted as domain, not - workgroup. - - -- Eloy A. Paris Tue, 4 Sep 2001 23:10:41 -0400 - -samba (2.2.1a-8) unstable; urgency=low - - * Set some reasonable default perms for the samba logdir (again, - thanks to vorlon :-) - Closes: #72529: insecure permissions on log files. - - -- Eloy A. Paris Sun, 26 Aug 2001 15:40:47 -0400 - -samba (2.2.1a-7) unstable; urgency=low - - * Another attempt at fixing #47493. Patch from Steve Langasek - . Let's keep our fingers crossed Steve! - - -- Eloy A. Paris Sun, 26 Aug 2001 13:37:06 -0400 - -samba (2.2.1a-6) unstable; urgency=low - - * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing - smbd to die with signal 11 under some unidentified situations. - Closes: #109774: Latest debian version breaks printer driver download. - Closes: #109946: not all files appear in samba-exported directories. - * Another patch from Steve Langasek. This one adds quotes around - printer names for print systems it's reasonable for Debian to - support. Together with the patch in #29957 (see changelog for - 2.2.1a-4), this should take care of the problems with multi-word - printer names in Samba. - - -- Eloy A. Paris Fri, 24 Aug 2001 21:12:27 -0400 - -samba (2.2.1a-5) unstable; urgency=low - - * Important changes that affect how Samba is built on Debian - machines are implemented in this release. All of this changes - were suggested by the energetic Steve Langasek , - and his arguments were so sound and reasonable that I decided - to implement them. Here's Steve's original changelog: - - * Fix up the build system to avoid needing to run configure - as root to answer questions we already know the answers to. - * In the process, make surprising progress towards being able to - cross-compile the samba packages. - - -- Eloy A. Paris Fri, 24 Aug 2001 01:08:06 -0400 - -samba (2.2.1a-4) unstable; urgency=low - - * Fixed typo in smbmount's mount page. - Closes: #109317: smbfs: mistype in smbmount manpage. - * Included symlink to smbspool to better support CUPS printing. - Closes: #109509: include symlink for cups samba support. - * Applied patch from Steve Langasek to - fix bug #29957. - Closes: #29957: samba strips trailing " from strings in smb.conf. - * First attempt at fixing #47493. Another patch from Steve "I want - a bug-free Samba" Langasek. - Closes: #47493: Samba doesn't handle ':' in dir names right. - - -- Eloy A. Paris Tue, 21 Aug 2001 23:26:38 -0400 - -samba (2.2.1a-3) unstable; urgency=low - - * Steve Langasek has been hard at work in - the last few days looking at the long list of open bugs filed - against the Samba packages. I don't know how to thank him. It's been - a pleasure working with Steve, and all the fixes, patches, etc. in - this release come from him. The bug list is greatly reduced thanks - to Steve's efforts. - * Steve's additions/modifications/patches/etc. are: - - New package that (libpam-smbpass) provides pam_smbpass. Before, this - was provided in another package but now the sources are part of - the Samba sources so we can start providing it from here. - Closes: #107043 - pam_smbpass now present in Samba source, - should be built from there - - Patch to source/smbd/service.c that allows admins to call - /bin/umount from the root postexec of a Samba share. - Closes: #40561 - samba pre/postexec commands do not work. - - Clear TMPDIR before starting smbd in /etc/init.d/samba. - Closes: #51295 - Problems with Samba and TMPDIR. - - Correction to documentation of "guest only". - Closes #38282 - "guest only" share still requires a password. - * Applied patch from Santiago Vila to convert - /usr/sbin/mksmbpasswd from a shell script into a real awk script. - Sorry it took so long, Santiago; I hadn't realized you even - provided a patch :-) - Closes: #77891 - mksmbpasswd could be a real awk script. - * Updated description of the smbfs and smbclient packages. Also have - each package recommend the other. - Closes: #108650: Should suggest or recommend smbfs. - - -- Eloy A. Paris Mon, 13 Aug 2001 22:21:55 -0400 - -samba (2.2.1a-2) unstable; urgency=low - - * Build-depends: depend on debhelper (>=2.0.103). - Closes: #105795: Build-Depends are wrong. - * Run samba's preinst and postinst scripts without -e so failed commands - do not abort installation. - Closes: #106384: postinstall crashes abnormally. (And really closes - #104471.) - - -- Eloy A. Paris Thu, 26 Jul 2001 00:30:37 -0400 - -samba (2.2.1a-1) unstable; urgency=low - - * New upstream version. - * Make sure samba's postinst script exits with a zero status. - Closes: #104471: Samba postinst problem. - - -- Eloy A. Paris Thu, 12 Jul 2001 21:55:21 -0400 - -samba (2.2.1-1) unstable; urgency=low - - * New upstream version. - Closes: #103339: config.guess and config.sub update required. - Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to - incompatibility with PAM. - Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. - Closes: #95777: Samba 2.2 is unable to join or authenticate against - Samba 2.2 PDC domain. - Closes: #68842: samba should use PAM for password changing (I - haven't personally tried this one, but it's been - advertised this works.) - Closes: #102506: PAM account checking fails. - Closes: #102518: Complains about unknown paramter "obey pam - restrictions" - Closes: #94774: Build failure on PARISC machines. - * Moved away from /etc/cron.weekly/samba for log file rotation. - Now using logrotate. - Closes: #95548: typo in /etc/cron.weekly/samba. - Closes: #74951: nmbd does not rename its log file. - * Removed Debian-specific addtosmbpass.8 man page since this script - is not longer provided upstream. Users should use the smbpasswd - program instead. - * Updated sample /etc/samba/smb.conf to reflect the recent changes - affecting handling of PAM authentication. Also updated - /etc/pam.d/samba. - - -- Eloy A. Paris Wed, 11 Jul 2001 00:44:14 -0400 - -samba (2.2.0.final.a-1) unstable; urgency=high - - * New upstream version (contains security fix from DSA-065-1.) - Closes: #97241: samba 2.2.0 fails to process hostnames in - "hosts allow" config line. - * Removed Debian-specific addtosmbpass.8 man page since this script - is not longer provided upstream. Users should use the smbpasswd - program instead. - Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. - * Updated sample /etc/samba/smb.conf to reflect the recent changes - affecting handling of PAM authentication. Also updated - /etc/pam.d/samba. - - -- Eloy A. Paris Sun, 24 Jun 2001 11:11:59 -0400 - -samba (2.2.0.final-2) unstable; urgency=low - - * Added libcupsys2-dev to Build-Depends. - * Samba depends now (again) on netbase so update-inetd is always - available for the Samba maintainer scripts. - Closes: #86063: Fails to uninstall if inetd is not installed. - * Updated source/config.{sub,guess} so ARM built doesn't fail. - Closes: #94480: config.sub out of date; can't build on arm. - Closes: #85801: config.sub/guess out of date. - * Not using brace expansion, i.e. {foo,bar} in any of the maintainers - scripts nor in debian/rules. - Closes: #88007: samba postrm has is not POSIX sh compliant. - - -- Eloy A. Paris Sat, 21 Apr 2001 17:27:18 -0400 - -samba (2.2.0.final-1) unstable; urgency=low - - * New upstream release. Lots of new things. See WHATSNEW.txt. - * Goofy version number because of my stupidity when assigning version - numbers to the CVS packages I have been uploading to experimental. - Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release - will follow soon. - - -- Eloy A. Paris Tue, 17 Apr 2001 22:58:14 -0400 - -samba (2.2.0.cvs20010416-1) experimental; urgency=low - - * CVS update. - - -- Eloy A. Paris Mon, 16 Apr 2001 21:25:15 -0400 - -samba (2.2.0.cvs20010410-1) experimental; urgency=low - - * CVS update. - * Added libreadline4-dev to Build-Depends. - - -- Eloy A. Paris Tue, 10 Apr 2001 16:53:45 -0400 - -samba (2.2.0.cvs20010407-1) experimental; urgency=low - - * CVS update. Includes what is in 2.2.0alpha3. - - -- Eloy A. Paris Sat, 7 Apr 2001 16:00:33 -0400 - -samba (2.2.0.cvs20010316-1) experimental; urgency=low - - * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch - from Samba CVS. - * Not compiling rpctorture as it has compile errors. Change in - debian/rules. - * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now - the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is - needed to use smbfs. Updated debian/control, debian/rules and - README.Debian to reflect this change. - * Added to swat a versioned dependency on samba (so a user is forced to - install a new version of swat each time a new version of samba is - installed.) - - -- Eloy A. Paris Sun, 18 Mar 2001 14:21:14 -0500 - -samba (2.0.7-5) unstable; urgency=medium - - * Transition from suidmanager to dpkg-statoverride. - - -- Eloy A. Paris Thu, 18 Jan 2001 23:51:56 -0500 - -samba (2.0.7-4) unstable; urgency=medium - - * Applied Urban Widmark fixes to smbmount. Urban - is the maintainer of the smbfs in the kernel and of the userland - utilities. - * Links to HTML documents are correct now. - Closes: #69439: swat: Broken help file symlinks - Closes: #72615: samba-doc directory changed: removed htmldocs from path - Closes: #75847: swat: Wrong symlink - Closes: #66857: Wrong links to html documents. - Closes: #77912: misplaced documentation symlinks for swat - * Building Samba with CUPS support. For this I reverted the change to - source/configure.in that I did in 2.0.7-3 and re-ran autoconf. - Closes: #59038: samba: not compiled with cups support. - * Fix against previous known/unknown user time difference patch to swat - (make username / password lookups take the same time.) Remove CGI - logging code in Swat. - Closes: #76341 - Security holes in swat - * Updated Build-depends. - * Updated debian/copyright to refer to the correct location of the GPL. - * debian/rules: changed DESTDIR to `pwd`/debian/samba (was - `pwd`/debian/tmp.) - * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some - strange reason dh_installdirs is not creating debian/tmp/ so I needed - to tweak everything to install stuff in debian/samba rather than in - debian/tmp.) - * debian/control: changed section of samba-docs to 'doc' (was 'docs') - * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules - and source/scripts/installswat.sh.) - * Fixed (by tweaking debian/rules) - /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. - * Added "Provides: samba-client" to smbclient's section in control. - Closes: #71143: smbclient: Smbclient should provide samba-client. - * Fix for desired_access being zero in map_share_mode() (patch to - source/smbd/nttrans.c.) Thanks to Gary Wilson - for bringing this patch to my - attention. - * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and - 2.2.x kernels even when the build is done in a system running - a 2.2.x kernel. - Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but - doesnt depend on it. - Closes: #72758: README.Debian should comment on 2.0.x kernels. - Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. - Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. - Closes: #60580: samba: failed to set gid. - Closes: #64280: Samba panics, can't set gid. - Closes: #66816: Must deal with brokenness under 2.0.x. - Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. - Closes: #69735: PANIC: failed to set gid - Closes: #66122: "smbclient -L localhost -U%" returns with "tree - connect failed: code 0". - Closes: #57637: Samba says tree connect error. - Closes: #58015: potato samba wins support is broken. - * Fixed comments in sample smb.conf to point to the correct location. - Closes: #69578: comments in smb.conf points to wrong path. - * Move codepages from /etc/samba/codepages/ to - /usr/share/samba/codepages/. - Closes: #63813: samba; codepages should go in /usr/lib. - * Moved /var/samba/ to /var/state/samba/. - Closes: #49011: samba package not FHS compliant. - * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() - is found. - Closes: #44558: netgroup support missing in samba 2.0.5a-1. - * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and - --exec. Got rid of --exec so --pidfile works. - - -- Eloy A. Paris Thu, 11 Jan 2001 00:15:57 -0500 - -samba (2.0.7-3) frozen unstable; urgency=high - - * Release manager: this closes a RC bug. - * Commented out the section in source/configure.in that auto-detects - CUPS support and then ran autoconf to generate a new configure - script. This was done to prevent machines that have libcupsys-dev - installed from detecting CUPS support and adding an unwanted - dependency on libcupsys. This way the whole printing system - won't break on upgrades. CUPS support should be added after - Potato is released. - Closes: #65185: samba-common: Upgrading removes printing system. - Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. - * Updated README.debian. - Closes: #64594: Old README.Debian in /usr/share/doc/samba. - - -- Eloy A. Paris Tue, 20 Jun 2000 19:16:04 -0400 - -samba (2.0.7-2) frozen unstable; urgency=high - - * Release manager: this closes RC bug #63839 that prevents Samba - to be built from source. - * Fixed a stupid typo in debian/rules that was preventing Samba - to be built from source. - Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) - * I forgot to mention that O'Reilly's book "Using Samba" was donated - to the Open Source community. The book was included in Samba 2.0.7 - in HTML format and is part of the Debian Samba package since - Samba 2.0.7-1. - * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help - files were supposed to be provided in both the swat and the samba-doc - packages. This duplication was a waste of space. Starting with - Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML - files are included only in samba-doc, and are accessed via symlinks - from within swat. - Closes: #58810: superfluous files in swat? - * Added a 'echo "."' to /etc/init.d/samba in the reload) section. - Closes: #63394: "echo ." missing in reload section of init.d script - * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. - Closes: #64344: typo "encrypted passwords" - * Cleaned up samba's postrm script so important common files aren't - deleted when samba is purged. Created a samba-common.postrm script. - Closes: #62675: purging samba removes /etc/samba/smb.conf. - Closes: #63386: samba --purge removes /etc/samba dir even though - smbclient/smbfs/samba-common packages are still installed - - -- Eloy A. Paris Wed, 3 May 2000 02:42:07 -0400 - -samba (2.0.7-1) frozen unstable; urgency=low - - * New upstream version. Dear Release Manager: please allow this - package to go to frozen as it contains fixes to a _lot_ of problems. - You can take a look at all the problems fixed by this release in - the official upstream announcement at - http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. - * Added --with-utmp to add utmp support to smbd (this is new in Samba - 2.0.7) - * Closes: #62148 - samba not rotating filled logs. - * Closes: #56711: Samba doesn't manage well long share name (please note - that it's possible to connect to shares with names longer than - 14 characters but the share will be listed with a name truncated to - 13 characters.) - * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). - Closes: #50907 - logon path not working. - This is not a bug, it's just Samba doing the same thing an NT server - does. See WHATSNEW.txt and smb.conf's man page for details. - * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper - is not supported anymore.) - * Closes: #58994 swat: typo in swat description. - * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware - problems, person that reported the bug never came back.) - Closes: #54398 - smbadduser fails, looks for ypcat. - * Fixed swat's man page to include Debian specific installation - instructions. There's not necessary to edit /etc/services or - /etc/inetd.conf. - (Closes: #58616 - incomplete install config && incorrect installation - instructions.) - * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat - to look for smbd and nmbd in the wrong place when requested to start or - stop smbd or nmbd. - (Closes: #55028 - swat can't start samba servers.) - * Closes: #37274: smbclient does not honour pot. (Tested and seems to be - working now.) - * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, - #50479, #39818, #54383, #59411. - (please re-open any of this if the problem still exists - I was unable - to confirm any of this because I could never reproduce them.) - Closes: #56699 - Samba's nmbd causes random kernel oops several - times in a row. - Closes: #62185 - nmbd's forking until no more file descriptors are - available. - Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. - Closes: #52218 - Either wins proxy does not work, or I don't understand - it. - Closes: #43492 - intermittent problem changing password. - Closes: #50479 - Can't access windows 2000 shares with samba. - Closes: #39818 - samba-common: Upgrading Samba from the Slink version. - Closes: #54383 - samba-common: Missing /etc/smb.conf. - Closes: #59411 - smbclient: cannot browse Win2k shares. - - -- Eloy A. Paris Thu, 27 Apr 2000 16:07:45 -0400 - -samba (2.0.6-5) frozen unstable; urgency=low - - * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries - in this package are broken unless libcupsys1 is installed. - samba-common has a "grave" bug because of this. Instead of adding - libcupsys1 to the Depends: list of each package in debian/control - I investigated why dh_shlibs was not picking the dependency - automatically. It turns out that it's probably a bug in libcupsys1 - because the format of its shlibs file is not correct. I fixed that - file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are - picked correctly. I'll talk to the libcupsys1 maintainer. - - I think the addition of CUPS support to Samba is a big change that - should not go into Frozen. So, I decided to back up the addition - of CUPS support I did in 2.0.6-4 to minimize problems. I'll add - CUPS support again when I start working on Samba for Woody. - (Closes: #59337 - samba-common has a missing dependency) - - -- Eloy A. Paris Wed, 1 Mar 2000 08:40:02 -0500 - -samba (2.0.6-4) frozen unstable; urgency=low - - * It seems that sometimes nmbd or smbd are not killed when upgrading. - I think it is because in samba's prerm script I was calling - start-stop-daemon with the --pidfile switch and in old versions of - Samba the nmbd and smbd daemons did not store their PIDs in a file in - /var/samba/. I changed debian/samba.prerm so the existence of the - PID files is checked before calling "start-stop-daemon --pidfile ..." - If the PID files do not exist then start-stop-daemon is called - without the --pidfile parameter. - (Closes: #58058 - upgrade from slink went badly) - * Fixed typo in description of swat package in debian/control. - * Installed libcupsys1-dev so the configure script picks up CUPS - and Samba is compiled with CUPS support. Also added libcupsys1 to - the Depends: list of package samba in debian/control. - (Closes: #59038 - samba not compiled with cups support) - * Added a small paragraph to debian/README.debian warning about possible - problems with the WINS code in Samba 2.0.6. - - -- Eloy A. Paris Mon, 28 Feb 2000 14:00:42 -0500 - -samba (2.0.6-3) frozen unstable; urgency=low - - * Applied patch posted by Jeremy Allison to the samba mailing list - that should take care of the internal errors reported in bug #52698 - (release-critical). Wichert: please test as I never could reproduce - it here. - (Closes: #52698 - samba gets interbal errors) - * Moved samba-docs to the 'docs' section. - (Closes: #51077 - samba-doc: wrong section) - * Added reload capability to /etc/init.d/samba (only for smbd because - nmbd does not support reloading after receiving a signal). - (Closes: #50954 - patch to add reload support to /etc/init.d/samba) - * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so - Unix password syncronization works with the passwd program currently - in Potato. Thanks to Augustin Luton for - the correct chat script. - * Stole source/lib/util_sec.c from the CVS tree of what will become - Samba 2.0.7 or whatever so we can use the same binaries under - both 2.0.x and 2.2.x kernels. - (Closes: #51331 - PANIC: failed to set gid) - * smbadduser is now provided as an example and it's customized for Debian. - I am not providing this script in /usr/sbin/ because then I would need - a dependency on csh, something that I don't want to do. - (Closes: #51697, #54052) - * Fixed the short description of the smbfs package in debian/control. - (Closes: 53534 - one-line description out of date). - - -- Eloy A. Paris Tue, 23 Nov 1999 16:32:12 -0500 - -samba (2.0.6-2) unstable; urgency=low - - * samba-common now depends on libpam-modules (not on libpam-pwdb, which - I have been told is obsolete). I modified /etc/pam.d/samba accordingly - to reflect the change. - (Closes: Bug#50722: pam pwdb dependence?). - * The old /etc/pam.d/samba file which had references to pam_pwdb caused - smbd to die with a signal 11. The new /etc/pam.d/samba file fixes - this problem. - (Closes: #50876, #50838, #50698) - * Compiled with syslog support (use at your own risk: syslog support - is still experimental in Samba). I added the parameters "syslog = 0" - and "syslog only = no" to the sample smb.conf to avoid pestering - users that do not want Samba to log through syslog. - (Closes: Bug#50703 - syslog only option doesn't work) - * Removed the stupid code in the smbmount wrapper script that tries - to load the smbfs module if smbfs is not listed in /proc/filesystems. - (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled - as a module in the kernel) - * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so - 'mount -t smb ...' works just as 'mount -t smbfs ...'. - (Closes: Bug#50763 - 'mount -t smb' doesn't work) - - -- Eloy A. Paris Sat, 20 Nov 1999 18:53:35 -0500 - -samba (2.0.6-1) unstable; urgency=low - - * Samba 2.0.6 has been released. This is the first try of the Debian - Samba packages. I know for sure that smbd won't work properly on - 2.0.x kernels because the patch that Wichert sent me does not apply - to the new source/lib/util_sec.c in Samba 2.0.6. That file was - completely re-written by Tridge. - * Updated README.Debian. - * A new client utility called smbspool appeared in Samba 2.0.6. I added - this utility to the smbclient package, although I haven't tried it yet. - * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. - This is to be able to type "mouont -t smbfs ...". This symlink goes - in the smbfs package, of course. - * This new release should close the following bugs (some of these - are fixed for sure in this new upstream release, some others I could - not reproduce but I believe they are fixed if they were real bugs. - As always, please feel free to re-open the bugs if the problem is not - solved). - Closes: Bug#33240: icmp mask needs a bug workaround. - Closes: Bug#37692: samba: Has problems detecting interfaces. - Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. - Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast - properly. - Closes: Bug#44131: smbfs: no longer possible to set file and - directory-modes. - Closes: Bug#46992: smbmount-2.2.x manpage wrong. - Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. - Closes: Bug#46605: smbmnt segfaults. - Closes: Bug#48186: smbmount. - Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. - Closes: Bug#47332: smbmount: could -f and -P be added back? - * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM - module). To succesfully add PAM support, I created /etc/pam.d/samba and - added this file as a conffile for the samba-common package. I also made - samba-common depend on libpam-pwdb. - * Added simple man pages for the wrapper scripts smbmount and smbmount. - (Closes: Bug#44705 - Missing smbmount man page) - * Installed libreadlineg2-dev in my system so smbclient now has a - "history" command and libreadline support :-) - * This time I did add a check to the smbmount wrapper script to see if - the kernel has support for smbfs, as suggested by Jeroen Schaap - . I mentioned in the changelog - for samba-2.0.5a-3 that I did this but I forgot at the end. - - -- Eloy A. Paris Thu, 11 Nov 1999 12:08:15 -0500 - -samba (2.0.5a-5) unstable; urgency=low - - * I am sorry to report that the smbwrapper package is gone for the - moment. The reason for this is twofold: first of all, smbwrapper - is completely broken in Samba-2.0.5a (it compiles but it doesn't - run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, - when I asked Andrew Tridgell (father of Samba) about the state of - smbwrapper he told me that Ulrich Drepper (head of the glibc project) - broke on purpose the glibc stuff in which smbwrapper is based. - Consequently, Tridge recommended me to compile Samba without - support for smbwrapper. When, I have no idea. Sorry folks. Here is - the original message I received from Andrew: - - > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's - > smbwrapper doesn't even compile under glibc2.1. - - yep, Ulrich deliberately broke it. It won't get fixed till glibc - allows the sorts of games it plays to work again. I suggest you turn - it off in your build scripts until that gets sorted out. - - * Swat's file are now in /usr/share/samba/ instead of - /usr/lib/samba/ (bug #49011). - * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). - - -- Eloy A. Paris Tue, 2 Nov 1999 12:59:13 -0500 - -samba (2.0.5a-4) unstable; urgency=low - - * Applied patch from our fearless leader (Wichert) to fix the darn bug - that prevents Samba to work on 2.0.x kernels if it was compiled - in a system running a 2.2.x kernel. This closes #40645 (build uses - setresuid which doesn't work under 2.0.34 (does apparently under - 2.2.x) ). - * Fixed the entry that swat's postinst script adds to /etc/inetd.conf - so it is '## swat\t\tstream\ttcp\tnowait.400 ...' instead of - '##swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused - 'update-inetd --enable swat' to leave the entry for swat disabled. - Thanks to Dave Burchell for finding out - this problem. This closes #48762 (swat uses non-standard syntax to - comment out inetd.conf entry). - * /usr/sbin/swat does not think anymore that the smbd daemon lives - in /usr/local/samba/bin/. To fix this I am running now source/configure - with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba - 'swat' fails: incorrect hardwired path in the binary). - - -- Eloy A. Paris Sun, 31 Oct 1999 03:42:38 -0500 - -samba (2.0.5a-3) unstable; urgency=low - - * I am pretty darn busy with my MBA, I apologize for the long time it's - taking to squash bugs in the Samba packages. - * Built with debhelper v2 for FHS compliancy. Changed a couple of - things in debian/rules to accomodate for the new place for the docs. - I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} - to make sure that the symlink from /usr/doc/xxx exists and points to - /usr/share/doc/xxx (the reason for this is that I am not letting - debhelper to create these scripts for me automatically). - * Built with latest libc6. - * smbfs: finally, the nasty bug that causes smbmount to die after - a while is gone thanks to Ben Tilly . - The problem was just a typo in source/client/smbmount.c. - This closes grave bug #42764 (smbmount dies) and #43341 - (smbfs-2.2.x won't function after a while). - * Fixed the smbmount wrapper script to eliminate a bashism (closes - #45202 - "wrapper scripts use $* instead of "$@") and to recognize - 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize - kernel 2.3.x"). - * Added a check to the smbmount wrapper script to see if the - kernel has support for smbfs, as suggested by Jeroen Schaap - . - * swat's man page is now part of the swat package, not of the samba - package. This closes #44808 (Samba has a man page for swat, but - the binary is not included). - * The interface program smbrun is not longer needed by smbd because - of the availability of execl() under Linux. Because of this, the - smbrun is not even being compiled. Since there is no need for smbrun - now, the smbrun man page was taken out of the samba package. This - closes #45266 (/usr/bin/smbrun missing). - * smbpasswd is now part of the samba-common package, and not part of - the samba package. This is to let administrators that do not want - to install a full Samba server administer passwords in remote - machines. This closes bug #42624 (smbpasswd should be included in - smbclient). This bug report also suggests that swat becomes part of - the samba package, that smbfs becomes part of the smbclient package, - and that the binary smbpasswd becomes part of the smbclient package. - I moved smbpasswd to the samba-common package but I am reluctant to - do the other things the bug report suggests. - * In order to keep dpkg happy when moving smbpasswd from the samba - package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" - in the control section of the samba-common package and a - "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the - samba package (in debian.control). - * Samba is now being compiled with the "--with-netatalk" option. This - closes #47480 (Could samba be compiled with the --with-netatalk option). - * All packages that depend on samba-common have a versioned dependency - now. This was accomplished by adding "(= ${Source-Version})" to the - relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho - for the hint. This closes #42985 (samba should probably - have a versioned depends on samba-common). - * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all - the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). - * Added the smbadduser helper script to the samba package. This closes - #44480 (Samba doesn't come with the smbadduser program). - * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount - to leave an entry in /etc/mtab for a share that could not be mounted - because of invalid user of password. The patch also allows smbumount - to unmount the share in the event that something goes wrong with the - smbmount process. This closes bug #48613 (Mount/umount problems + - patch) as well as #44130 (failed mount is still mounted). - * smbmount-2.2.x is now setuid root. This is needed for the patch - applied above to be effective. If smbmount-2.2.x is not setuid root - then an entry will be left in /etc/mtab even when the mount - fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid - for this to work. - - -- Eloy A. Paris Wed, 27 Oct 1999 10:36:13 -0400 - -samba (2.0.5a-2) unstable; urgency=low - - * This version is basically the same as 2.0.5a-1 but it was compiled - on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 - for more information. - - -- Eloy A. Paris Tue, 27 Jul 1999 02:25:29 -0400 - -samba (2.0.5a-1) stable; urgency=high - - * I'm back from the Honey Moon. We are pretty busy because we are moving - to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still - have plenty of things to pack and to do. Samba 2.0.5 was released - while I was in the Honey Moon and it is just now (almost 3 AM) when - I have time to package it. - * Because of the security problems fixed in 2.0.5, this upload goes - to both stable and unstable (the Security Team asked for this). - * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will - be compiled on a Potato system. - * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common - section in debian/control (as suggested by Steve Haslam - ) to fix the problems that appear when upgrading - from the Samba package in Slink. Please test this as I am completely - unable to do so. This should fix bug #39818 (Upgrading Samba from the - Slink version). - * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in - order to have defined several socket options when compiling with - Linux 2.2.x kernel headers - the fix is now upstream. - * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command - line syntax similar to the one used by the old smbmount (for 2.0.x - kernels). This means that the wrapper script is no longer necessary - so I removed it. In its place there is a simple wrapper script that - calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is - running. - * Because of the wedding, the Honey Moon, and our move to Pittsburgh, - I can't work on fixing other bugs in this release. - - -- Eloy A. Paris Tue, 27 Jul 1999 02:18:51 -0400 - -samba (2.0.4b-3) unstable; urgency=low - - * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files - and because of this /usr/bin/smbumount was part of the samba package - instead of part of the smbfs package. - - -- Eloy A. Paris Thu, 1 Jul 1999 01:51:24 -0400 - -samba (2.0.4b-2) unstable; urgency=low - - * Dark (and archive maintainers): please remove from Potato the smbfsx - binary package and also the old source package for smbfs. smbfs and - smbfsx have been merged starting with this version. - * Merged the old smbfs package with Samba. Now there is only one package - for the smbfs utilities and is called "smbfs". The package smbfsx - does not exist any more and this new smbfs package must be used - for both 2.0.x and > 2.1.x kernels. - * A wrapper script was added to handle the syntax change in smbmount - in the new smbfs utilities (required for kernels > 2.1.70). The - home page for this script is http://www.wittsend.com/mhw/smbmount.html. - Please _note_ that this will change (for good) in Samba 2.0.5 :-) - * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x - or smbumount-2.0.x depending on the kernel currently running. - * Not using -t for savelog in cron.weekly script. - * Recompiled without libreadlineg-dev (Samba does not seem to be using - it so unnecessary dependencies are produced). - * glibc2.1 build. - * Removed smbpasswd.8 man page from the debian/ directory because it is - now being provided upstream. - * Got rid of the ugly hack I put in source/lib/util_sock.c to have - IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the - autoconf stuff to #include . I've sent the patch to - Jeremy Allison so we have this upstream. - - -- Eloy A. Paris Mon, 28 Jun 1999 17:47:19 -0400 - -samba (2.0.4b-1) unstable; urgency=low - - * New upstream release. This release fixes the following Debian bugs: - #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and - #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy - Allison released Samba 2.0.4 and found out that there were a couple - of minor bugs so he released 2.0.4a. Then he found out about more - serious bugs and released 2.0.4b. I have built this package several - times between yesterday and today because of this. Now I am releasing - the Debian packages for Samba with what I believe will be the latest - release the Samba Team will make at least in the next 4 days (Jeremy - is taking a short vacation). - * Still compiling against glibc2.0 (sorry about that :-) - * Hacked source/smbwrapper/smbsh.c to fix the problem - of smbsh not finding the shared library smbwrapper.so. It looks - now in /usr/lib/samba/ for this file. This fixes #32971, #32989, - #33278, #34911 and #36317. - * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf - and /etc/samba/codepages/. This fixes #33128 (smbmount complains about - missing /etc/smb.conf). - * Package swat does not depend on httpd anymore (there's no need to). - This fixes #35795 (swat requires httpd). - * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and - smbumount-2.2.x. Same applies to the man pages. - * Changed minor type in smbmount's man page (changed "\"" by "\'"). This - fixes #34070 (wrong quotes in manpage). - * Used Fabrizio Polacco's procedure to create the - Debian package for Samba. This closes #35781 (samba has no pristine - source). - * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only - if the size of either is different than 0. Also, added comments at the - beginning of this script to explain how rotation of log files works in - Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) - for the suggestions. This closes #37490 (cron.weekly script rotates not - used [sn]mb.old files). As I side effect, this should also close - #31462 (still trouble with /etc/cron.weekly/samba). - * Check for old /etc/pam.d/samba file which is not provided by this version - of the Debian Samba package but was provided in older versions. If this - file exists we delete it. We check for this in the postinst. This closes - #37356 (samba put stuff in pam.d that pam complains about) and #34312 - (libpam0g: questions during upgrade). - * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done - in the postinst script. This closes #35730 (Security problem with - /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). - * I have just checked and it looks like #28748 (smbfsx doesn't "return ") - has been fixed. This might have been fixed since a long time ago. - * Long long standing bug #18488 (smbclient: internal tar is broken) is - closed in this release of Samba. The bug might have been closed for a - long long time, but I did not check for this before. - * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" - message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), - #34148 (warnings from smbd) and #35333 (samba warnings). - - -- Eloy A. Paris Thu, 20 May 1999 00:35:57 -0400 - -samba (2.0.3-1) unstable; urgency=low - - * New upstream version. - * Removed the convert_smbpasswd.pl program I created and put in - /usr/doc/samba/ because there's a convert_smbpasswd script in the - upstream sources that does the same thing. I modified the postinst - script to use this script instead of the one I created. - - -- Eloy A. Paris Sun, 28 Feb 1999 01:35:37 -0400 - -samba (2.0.2-2) unstable; urgency=low - - * Updated the README.Debian file. - * Updated the description of the samba package in the control file. - * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now - installed setuid root as they should be. This was done by doing a - a "chmod u+s" for each binary in debian/rules and by creating the - file debian/smbfsx.suid. - * Minor patch to source/client/smbumount.c to allow normal users - to umount what they have mounted (problem was a kernel vs. libc6 - size mismatch). I sent the patch upstream. - * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is - created. - * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to - debian/smbwrapper/usr/lib/samba/. - * Hacked source/smbwrapper/smbsh.c to fix the problem - of smbsh not finding the shared library smbwrapper.so. - - -- Eloy A. Paris Thu, 11 Feb 1999 18:11:34 -0400 - -samba (2.0.2-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Thu, 11 Feb 1999 01:35:51 -0400 - -samba (2.0.1-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Sat, 6 Feb 1999 06:51:18 -0400 - -samba (2.0.0final-4) unstable; urgency=low - - * The samba postinst made an unwarranted assumption that the file - /etc/samba/smbpasswd exists. If the file did not exist (which is - perfectly valid) the postinst will fail. This fixes #32953. - - -- Eloy A. Paris Fri, 5 Feb 1999 23:32:46 -0400 - -samba (2.0.0final-3) unstable; urgency=low - - * Added to debian/control a "Depends: ${shlibs:Depends}" line for the - samba-common package so dependencies for this package are set - correctly (thanks to Dark for pointing this out). - - -- Eloy A. Paris Thu, 4 Feb 1999 09:45:21 -0400 - -samba (2.0.0final-2) unstable; urgency=low - - * Finally!!! The first upload to unstable. Sorry for the delay folks - but I have been quite busy lately :-) Another reason for the delay - is that I wanted to ease the migration from Samba 1.9.18p10 and - before to Samba 2.0.0. I changed the location of the config. files - from /etc/ to /etc/samba/ and this made things a little bit harder. - * This package needs 2.2 kernel headers to compile (well, this is - true for the smbfsx package, all others compile fine with 2.0 kernel - headers). - * Created a preinst script for the samba package to take care of the - location migration of smb.conf (from /etc/ to /etc/samba/). The - preinst script also takes care of moving /etc/smbpasswd to its new - location (/etc/samba/). - * Created postinst and postrm scripts to add/remove an entry for swat - in /etc/inetd.conf. - * I had forgotten to install the sambaconfig script so I changed - debian/rules to install this script. - * Added a postrm script for the samba package (I had forgotten to add - this script to the new Samba packages after the migration from 1.9.18 - to 2.0.0). - * Created a small Perl script that is called from the samba postinst - to convert the smbpasswd from the old format used in version prior - to 2.0.0 to the new one used in 2.0.0 and beyond. - * The upgrade process should be automatically now. Please let me know - of any problems you encounter. - - -- Eloy A. Paris Sat, 23 Jan 1999 09:34:10 -0400 - -samba (2.0.0final-1) experimental; urgency=low - - * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable - because I still have to work out the migration from the old - samba packages to the new ones. I also need to work more on the - new swat package. - - -- Eloy A. Paris Thu, 14 Jan 1999 22:40:02 -0400 - -samba (2.0.0beta5-1) experimental; urgency=low - - * New upstream version. - - -- Eloy A. Paris Tue, 5 Jan 1999 00:37:57 -0400 - -samba (2.0.0beta4-1) experimental; urgency=low - - * New upstream version. - - -- Eloy A. Paris Wed, 23 Dec 1998 18:37:45 -0400 - -samba (2.0.0beta3-1) experimental; urgency=low - - * New upstream version. - * I have just realized that the documentation patches (for man pages) - that I used for the 1.9.18 release are not longer necessary because - there was a major re-write of all the Samba documentation that added - the missing bits of information. So, I have just removed these minor - patches. - - -- Eloy A. Paris Tue, 8 Dec 1998 12:00:30 -0400 - -samba (2.0.0beta2-1) experimental; urgency=low - - * New upstream version. - * This new version fixes the potential security problem that - was posted to debian-private (using the "message command" parameter - to execute arbitrary commands from messages sent from LinPopUp). - * Changed /etc/init.d/samba to use one of the variables stored in - /etc/samba/debian_config to know how Samba is being run (from inetd or - as daemons) instead of grepping /etc/inetd.conf which may not exist - if the user is running xinetd (this fixes bug #29687 - assumes using - vanilla inetd) - - -- Eloy A. Paris Mon, 23 Nov 1998 23:32:03 -0400 - -samba (2.0.0beta1-1) experimental; urgency=low - - * First beta release of the samba-2.0.0 code. Before the beta I was - working with sources downloaded directly from the CVS server. This - package goes into experimental and I plan to release the new - samba to unstable as soon as it gets out of beta. - * Created several packages out of the Samba sources. They are: - samba (nmbd and smbd daemons + related programs), smbclient (FTP - like command line utility to retrieve files from SMB servers), - swat (Samba Web Administration Tool), samba-common (common files - used by samba, smbclient and swat), smbfsx (smbfs utilities for - kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). - * Refreshed debian/samba-doc.docs so recently added docs. are - installed in the samba-doc package. New additions include man - pages in the /usr/doc/samba-doc/htmldocs/ directory. - * Deleted Debian specific nmblookup(1) man page as it is now upstream. - * Added smbtorture to smbclient package. - * Moved rpcclient from the samba package to the smbclient package. - * The Samba daemons (nmbd and smbd) now create a PID file so I changed - all calls to start-stop-daemon to use the PID file. - * Fixed debian/rules to install mksmbpasswd (fixes #27655). - * Modified /etc/init.d/samba so nmbd is started without the -a (append - to the log file instead of overwrite) switch. The new behavior of - nmbd is to NOT overwrite log files, so the -a switch can be deleted - safely. - * Moved from debstd to debhelper. - - -- Eloy A. Paris Thu, 1 Oct 1998 08:37:41 -0400 - -samba (1.9.18p10-5) frozen unstable; urgency=high - - * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than - the one I was trying to fix: in /etc/init.d/samba I got rid of the test - that tells us whether the Samba daemons are running from inetd or as - standalone daemons. I corrected the problem by editing again - /etc/init.d/samba to uncomment the test. - * Wishlist bug #28298 (typos in samba) was fixed. - * Wishlist bug #28309 (typos in smb.conf) was fixed. - - -- Eloy A. Paris Wed, 28 Oct 1998 09:11:47 -0400 - -samba (1.9.18p10-4) unstable; urgency=low - - * Minor patch to debian/rules to delete *substvars instead of only - substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz - for this). - * Small patch to source/shmem_sysv.c that eases compilation under - glibc-2.1 (thanks to Daniel for this). - - -- Eloy A. Paris Thu, 17 Sep 1998 15:33:49 -0400 - -samba (1.9.18p10-3) unstable; urgency=low - - * Patched smbclient again to fix minor formatting problem introduced - by Magosanyi Arpad's smbclient patch. - - -- Eloy A. Paris Thu, 3 Sep 1998 11:03:23 -0400 - -samba (1.9.18p10-2) unstable; urgency=low - - * Sync'ed include files for the smbfs utilities with the ones in - kernel 2.1.119. - * Added to the /usr/doc/samba/examples/ directory a new script called - wins2dns (courtesy of Jason Gunthorpe ) that - generates BIND sonze files for hosts in the WINS database. - * Patched smbclient to include enhancements by Magosanyi Arpad - that make scripting easier. - - -- Eloy A. Paris Fri, 28 Aug 1998 13:34:54 -0400 - -samba (1.9.18p10-1) stable unstable; urgency=low - - * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a - description of what has changed). I built a 1.9.18p9-1 but I - never released it because an obscure bug was found just a couple - of days before the official release, so the Samba Team stopped - the rollover of 1.9.18p9. - * Updated documentation (new files were added to the docs/ directory - that were not installed in /usr/doc/samba/). - * Fixed long standing bug #7695 (smb.conf's man page doesn't document - 'printing=lprng') - I made a couple of changes to the man page to - include references to lprng. - * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it - is necessary to make samba suggest psmisc just because the postinst - script mentions to call killall. So, I removed all references to - "killall" in the scripts. - * Fixes bug #25999 (Samba does not by default work with unix password - sync): I added the "passwd program" and "passwd chat" parameters to - the sample smb.conf to reflect the Debian environment. - - -- Eloy A. Paris Fri, 21 Aug 1998 08:59:18 -0400 - -samba (1.9.18p9-1) unstable; urgency=low - - * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a - description of what has changed). - * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is - now part of the new upstream version. - * Corrected small typo in addtosmbpass' man page (fixes #25629). - - -- Eloy A. Paris Tue, 11 Aug 1998 08:53:08 -0400 - -samba (1.9.18p8-2) frozen unstable; urgency=medium - - * Applied patch received from Jeremy Allison (Samba Team) that fixes - "grave" bug #23903 (samba maps username before authenicating with - NT password server). - * Added a "sleep 2" between "start-stop-daemon --stop" and - "start-stop-daemon --start" in /etc/init.d/samba so when this script - is called with the "restart" parameter the Samba daemons are restarted - properly. This fixes bug #24211 (init.d script doesn't restart). - * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to - avoid annoying warning messages. - * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 - and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't - find who sent this suggestion to me. If you are listening, drop me a - note and I'll put your name here :-) - - -- Eloy A. Paris Mon, 29 Jun 1998 08:45:01 -0400 - -samba (1.9.18p8-1) frozen unstable; urgency=low - - * New upstream release that fixes _lots_ of "ugly" bugs. The list of - fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). - * Fixed postinst to quote arguments to if [ arg .. ] constructs - (fixes #22881). - * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing - list) that solves a problem with username maps (the Samba Team did - not catch this problem before final 1.9.18p8). - * Made /etc/init.d/samba to print out a warning when Samba is running - from inetd and the user runs /etc/init.d/samba to start|stop|restart - Samba (there's no point on doing this because inetd will start the - daemons again when there is traffic on UDP port 137-139). - - -- Eloy A. Paris Sat, 13 Jun 1998 00:18:25 -0400 - -samba (1.9.18p7-4) frozen unstable; urgency=medium - - * Fixes the serious problem of having the WINS name server - database getting deleted at boot time. That happened because the - WINS database was being stored under /var/lock/samba/ and all files - under /var/lock/ are deleted at boot time. The place where the WINS - database is stored was moved to /var/samba/. - - -- Eloy A. Paris Mon, 18 May 1998 20:24:29 -0400 - -samba (1.9.18p7-3) stable; urgency=high - - * Libc5 version for Bo (stable) that fixes the recently reported - security hole. - - -- Eloy A. Paris Mon, 18 May 1998 20:19:33 -0400 - -samba (1.9.18p7-2) frozen unstable; urgency=low - - * Added patches from the non-mantainer upload that make us able - to compile Samba on Alpha systems. This fixes bug #22379. - - -- Eloy A. Paris Wed, 13 May 1998 20:38:51 -0400 - -samba (1.9.18p7-1) frozen unstable; urgency=low - - * New upstream release (just bug fixes, no new functionality). - - -- Eloy A. Paris Wed, 13 May 1998 11:47:32 -0400 - -samba (1.9.18p6-2) frozen unstable; urgency=low - - * Uploaded to frozen (I forgot to upload last version to frozen - so it got installed only in unstable). - - -- Eloy A. Paris Tue, 12 May 1998 18:10:17 -0400 - -samba (1.9.18p6-1.1) unstable; urgency=low - - * non-maintainer upload for Alpha - * patch needed for source/quota.c (_syscall4() confusion) - - -- Paul Slootman Tue, 12 May 1998 20:39:13 +0200 - -samba (1.9.18p6-1) unstable; urgency=low - - * New upstream release that fixes a possible buffer overflow. - This security hole was reported on BugTraq by Drago. The - previous Debian version (1.9.18p5-1) was not released because - 1.9.18p5 and 1.9.18p6 were released very closely. - - -- Eloy A. Paris Mon, 11 May 1998 20:28:33 -0400 - -samba (1.9.18p5-1) unstable; urgency=low - - * New upstream release (no new funcionality, just bug fixes - see - /usr/doc/samba/WHATSNEW.txt.gz). - * Backed off Debian patches that were added upstream. - - -- Eloy A. Paris Mon, 11 May 1998 08:43:53 -0400 - -samba (1.9.18p4-2) frozen unstable; urgency=low - - * Patched smbclient(1) man page to not reference the unsopported - -A parameter (fixes #6863). - * Changes to start nmbd with the -a option (in /etc/init.d/samba - and in the entry added to /etc/inetd.conf). - * Fixed typo in sample smb.conf (fixes #21484). - * Fixed yet another typo in sample smb.conf (fixes #21447). - - -- Eloy A. Paris Fri, 17 Apr 1998 22:19:23 -0400 - -samba (1.9.18p4-1) frozen unstable; urgency=low - - * New upstream version that fixes several bugs. - * New scheme for keeping track of Debian specific configuration. - This new scheme fixes bug #18624 (Samba always asks the user about - configuration options). New scheme stores Debian specific - configuration information in /etc/samba/debian_config. - * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the - new configuration scheme. - * Moved required kernel 2.1.x include files inside the source tree - so I don't have to do very nasty things like creating crazy - symlinks in /usr/include to make this package compile. This - allows non-root users to build the package and fixes bug - #20104. - * Fixed address of the FSF in /usr/doc/samba/copyright (problem - reported by lintian). - * The /etc/init.d/samba script now supports the force-reload - argument, as required by the policy (problem reported by lintian). - * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. - * Now the samba package can be installed even if no nmbd or smbd processes - are running. This fixes the following bugs: #8917, #9334, #10268, - #10411, #11146 and #13387. - * Provides the original README in /usr/doc/samba. This fixes bug #9693. - * Added a --no-reload option to sambaconfig to not reload Samba - after configuration. - * Created man pages for sambaconfig(8), addtosmbpass(8), - mksmbpasswd(8) and nmblookup(1). - * Corrected small typo in sample /etc/smb.conf. - * Added two new parameters to /etc/smb.conf: "preserver case" and - "short preserve case". - * "rm -Rf /var/lock/samba" in postrm when package is being purged. - * Patched upstream source (nmbd.c) to not overwrite log files when - nmbd is called with the -a parameter (fixes #17704: nmbd ignores - -a option). - * /etc/init.d/samba now starts the nmbd daemon with the -a parameter - to not overwrite log files. - - -- Eloy A. Paris Mon, 23 Mar 1998 21:22:03 -0400 - -samba (1.9.18p3-1) unstable; urgency=low - - * New upstream version. - * Oppsss!!! I really screwed it up (actually, debstd did). - 1.9.18p2-2 still contained man pages (smbmount and smbumount) part - of other packages. This version does have this corrected. If not, - I no longer deserve to be a Debian developer! So, this version - fixes bug #18438 and some of the bugs I claimed to fix in - 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd - with -m in debian/rules (man pages are installed by "make install" - so it's a bad idea to re-install man pages with debstd). - - -- Eloy A. Paris Mon, 23 Feb 1998 17:32:42 -0400 - -samba (1.9.18p2-2) unstable; urgency=low - - * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided - a man page for smbmount, which conflicts with package smbfs. This - was solved by creating a multi-binary package that produces - package samba and new package smbfsx. - * Fixes bug #18000 (typo in postinst). - * Fixes bug #17958 (postinst asks obsolete question). Actually, - the question is still asked, but only if Samba is run as daemons. - * Created a multi-binary package from the Samba sources: package - samba and new package smbfsx which provides SMB mount utilities - for kernels > 2.1.70. - - -- Eloy A. Paris Mon, 9 Feb 1998 19:47:05 -0400 - -samba (1.9.18p2-1) unstable; urgency=low - - * New upstream version. - * Removed /etc/cron.weekly/samba because Samba does not handle well - rotation of log files (if the log file is rotated Samba will - continue to log to the rotated file, instead of the just created - one). In any case, Samba will rotate log files after an specific - file size. - - -- Eloy A. Paris Tue, 27 Jan 1998 22:34:27 -0400 - -samba (1.9.18p1-2) unstable; urgency=low - - * Created a multi-binary package out of the Samba sources to provide - packages samba and smbfsx (userland utilities to work with - smbfs with kernels > 2.1.x. - - -- Eloy A. Paris Sat, 17 Jan 1998 09:23:48 -0400 - -samba (1.9.18p1-1) unstable; urgency=low - - * New upstream version. - * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in - /var/backups/smbpasswd.bak. - - -- Eloy A. Paris Wed, 14 Jan 1998 13:40:56 -0400 - -samba (1.9.18alpha14-1) unstable; urgency=low - - * New upstream version. - * Added a note to the postinst script telling the user that he/she - needs to run smbpasswd manually after creating a new /etc/smbpasswd - from /etc/passwd. - - -- Eloy A. Paris Tue, 23 Dec 1997 23:44:37 -0400 - -samba (1.9.18alpha13-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Tue, 16 Dec 1997 13:02:32 -0400 - -samba (1.9.18alpha12-1) unstable; urgency=low - - * New upstream version. - * Conflicts with the sambades package because the new Samba 1.9.18 - series do not depend on the DES libraries to support encrypted - passwords. - * Added parameter "encrypt passwords = yes" to /etc/smb.conf. - * Compiled with support for quotas in disk_free(). - * Home directories are now exported read only by default. - * Re-worked debian/rules. - * Re-worked sample smb.conf. - - -- Eloy A. Paris Thu, 4 Dec 1997 22:50:34 -0400 - -samba (1.9.17p4-1) unstable; urgency=low - - * New upstream version. - * Made /etc/smb.conf readable by everybody because some Samba utilities - will fail otherwise when run by non-root users. - * Dropped PAM support while the PAM libraries are ported to libc6. - - -- Eloy A. Paris Tue, 21 Oct 1997 18:08:49 -0400 - -samba (1.9.17p3-1) unstable; urgency=low - - * New upstream version. - * Made /etc/smb.conf readable only by root as suggested by smbd's man page. - - -- Eloy A. Paris Wed, 15 Oct 1997 09:21:25 -0400 - -samba (1.9.17p2-2) unstable; urgency=low - - * Running Samba as daemons instead of from inetd. - * Removing netbios entries in /etc/inetd.conf. - - -- Eloy A. Paris Thu, 9 Oct 1997 23:37:25 -0400 - -samba (1.9.17p2-1) unstable; urgency=low - - * New upstream version that fixes a serious security hole. - * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because - these patches are now part of the upstream release. - - -- Eloy A. Paris Sun, 28 Sep 1997 22:54:33 -0400 - -samba (1.9.17p1-1) unstable; urgency=low - - * New upstream version. - * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up - compiler warnings. - * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. - * Included crypt.h to have function prototype for crypt(). - * Included netinet/tcp.h to have some socket options included. - * Included netinet/ip.h to have some socket options included. - * Linking with libcrypt (LIBM='... -lcrypt'). Without including this - library smbd generates a seg. fault when authenticating users (?). - - -- Eloy A. Paris Wed, 10 Sep 1997 22:09:18 -0400 - -samba (1.9.17-1) unstable; urgency=low - - * New upstream version (called the "Browse Fix Release") - * Added the option --oknodo to the start-stop-daemon invocation in prerm - script. This was because the prerm was failing because start-stop-daemon - was returning an error code if no nmbd or smbd daemons were found - to kill. - * The function yp_get_default_domain(), referenced in three source - files was part of libc5 but with libc6 (glibc2) it has been moved - to libnss_nis. Since the linker was unable to find the function - I had to add LIBSM='-lnss_nis' to debian/rules. - * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules - because compiling was failing because of conflicts with glibc2. - * Patched source/includes.h to include termios.h if GLIBC2 is defined. - - -- Eloy A. Paris Wed, 27 Aug 1997 08:39:32 -0400 - -samba (1.9.17alpha5-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Thu, 14 Aug 1997 18:05:02 -0400 - -samba (1.9.16p11-3) unstable; urgency=low - - * Fixed accidental omission of /etc/pam.d/samba. - - -- Klee Dienes Sat, 15 Mar 1997 22:31:26 -0500 - -samba (1.9.16p11-2) unstable; urgency=low - - * Recompiled against newer PAM libraries. - * Added /etc/pam.d/samba. - - -- Klee Dienes Sat, 8 Mar 1997 01:16:28 -0500 - -samba (1.9.16p11-1) unstable; urgency=low - - * New upstream release. - * Added PAM support. - - -- Klee Dienes Tue, 25 Feb 1997 18:00:12 -0500 - -samba (1.9.16p9-2) unstable; urgency=low - - * minor packaging changes - - -- Klee Dienes Sun, 3 Nov 1996 11:45:37 -0700 - -samba (1.9.16p9-1) unstable; urgency=low - - * upgraded to new upstream version - - -- Klee Dienes Sat, 26 Oct 1996 21:38:20 -0700 - -1.9.16alpha10-1: - 960714 - * Removed Package_Revision from control file. - * Removed -m486 compiler option. - * Added Architecture, Section and Priority fields to control file. - * Upgraded to latest upstream version. - * Uses update-inetd now. - * Added shadow passwords support. - * Fixed Bug#1946: nmbd won't browse - -1.9.15p4-1: - 951128 - * Upgraded to latest upstream version. - * Fixed many bugs. - * Adds Master Browsing support. - * Converted to ELF. - * Fixed bug #1825 - nmbd is now killed when removing samba. - -1.9.14-1: - 950926 Andrew Howell - * Upgraded to latest version. - * Fixed Bug #1139 - samba won't print - -1.9.14alpha5-1: - * Fixes killing of inetd problem in debian.postint and debian.postrm - -1.9.14alpha5-0: - 950704 Andrew Howell - * Taken over samba package from Bruce Perens. - * Upgraded to newest version of samba. - -1.9.02-1: - 9-January-1994 Bruce Perens - * Added Debian GNU/Linux package maintenance system files, and - configured for Debian systems. - -Local variables: -mode: debian-changelog -add-log-mailing-address: "peloy@debian.org" -End: diff --git a/packaging/Debian/unstable/config.cache b/packaging/Debian/unstable/config.cache deleted file mode 100644 index c0a70a5b19b..00000000000 --- a/packaging/Debian/unstable/config.cache +++ /dev/null @@ -1,231 +0,0 @@ -# -# 22 August 2001 Steve Langasek -# -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -# -# This config.cache file contains a list of acceptable autoconf -# values which can be used in compiling Samba for Debian woody/sid. -# -# Autoconf sorts options alphabetically in its output. This file -# groups options logically. - - -# Load any architecture-specific settings -if [ -n "$DEB_HOST_GNU_TYPE" \ - -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then - . ../debian/config.cache.${DEB_HOST_GNU_TYPE} -fi - - -# This is at the top because it's most in need of regular tweaking. -# These are options which are supported on 2.4 kernels, but not on 2.2 -# kernels. - -samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} -samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} -samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} - - -# These are present in 2.2 kernels, but not in 2.0... - -samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} -samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} - - -# POSIX ACL support not present in Linux 2.2; not allowed in the -# Debian packages, even if present on the build machine. - -ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} - - -# Various basic libc/compiler stuff that it's blindingly obvious that -# Linux supports (now watch me get bitten for saying that) - -ac_cv_c_const=${ac_cv_c_const=yes} -ac_cv_c_inline=${ac_cv_c_inline=inline} -samba_cv_volatile=${samba_cv_volatile=yes} -ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} -ac_cv_func_bzero=${ac_cv_func_bzero=yes} -ac_cv_func_chmod=${ac_cv_func_chmod=yes} -ac_cv_func_chown=${ac_cv_func_chown=yes} -ac_cv_func_chroot=${ac_cv_func_chroot=yes} -ac_cv_func_connect=${ac_cv_func_connect=yes} -ac_cv_func_dup2=${ac_cv_func_dup2=yes} -ac_cv_func_execl=${ac_cv_func_execl=yes} -ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} -ac_cv_func_fchown=${ac_cv_func_fchown=yes} -ac_cv_func_fstat=${ac_cv_func_fstat=yes} -ac_cv_func_fsync=${ac_cv_func_fsync=yes} -ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} -ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} -ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} -ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} -ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} -ac_cv_func_glob=${ac_cv_func_glob=yes} -ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} -ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} -ac_cv_func_llseek=${ac_cv_func_llseek=yes} -ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} -ac_cv_func_memmove=${ac_cv_func_memmove=yes} -ac_cv_func_memset=${ac_cv_func_memset=yes} -ac_cv_func_mktime=${ac_cv_func_mktime=yes} -ac_cv_func_pipe=${ac_cv_func_pipe=yes} -ac_cv_func_poll=${ac_cv_func_poll=yes} -ac_cv_func_pread=${ac_cv_func_pread=yes} -ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} -ac_cv_func_rand=${ac_cv_func_rand=yes} -ac_cv_func_random=${ac_cv_func_random=yes} -ac_cv_func_readlink=${ac_cv_func_readlink=yes} -ac_cv_func_rename=${ac_cv_func_rename=yes} -ac_cv_func_select=${ac_cv_func_select=yes} -ac_cv_func_setenv=${ac_cv_func_setenv=yes} -ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} -ac_cv_func_setsid=${ac_cv_func_setsid=yes} -ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} -ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} -ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} -ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} -ac_cv_func_srand=${ac_cv_func_srand=yes} -ac_cv_func_srandom=${ac_cv_func_srandom=yes} -ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} -ac_cv_func_strchr=${ac_cv_func_strchr=yes} -ac_cv_func_strdup=${ac_cv_func_strdup=yes} -ac_cv_func_strerror=${ac_cv_func_strerror=yes} -ac_cv_func_strftime=${ac_cv_func_strftime=yes} -ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} -ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} -ac_cv_func_symlink=${ac_cv_func_symlink=yes} -ac_cv_func_usleep=${ac_cv_func_usleep=yes} -ac_cv_func_utime=${ac_cv_func_utime=yes} -ac_cv_func_utimes=${ac_cv_func_utimes=yes} -ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} -ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} -ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} -ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} -ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} -ac_cv_type_size_t=${ac_cv_type_size_t=yes} -ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} -samba_cv_socklen_t=${samba_cv_socklen_t=yes} - -# Yes, we know Linux supports fcntl locking. Just ignore -# any errors caused by building on an NFS mount. -samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} - - -# smbwrapper doesn't work because the glibc maintainers don't want -# to support transparent userland VFS. We might as well preempt -# any checks for shadowed symbols that are only useful for smbwrapper. - -ac_cv_func___acl=${ac_cv_func___acl=no} -ac_cv_func__acl=${ac_cv_func__acl=no} -ac_cv_func___chdir=${ac_cv_func___chdir=no} -ac_cv_func__chdir=${ac_cv_func__chdir=no} -ac_cv_func___close=${ac_cv_func___close=no} -ac_cv_func__close=${ac_cv_func__close=no} -ac_cv_func___closedir=${ac_cv_func___closedir=no} -ac_cv_func__closedir=${ac_cv_func__closedir=no} -ac_cv_func___dup=${ac_cv_func___dup=no} -ac_cv_func__dup=${ac_cv_func__dup=no} -ac_cv_func___dup2=${ac_cv_func___dup2=no} -ac_cv_func__dup2=${ac_cv_func__dup2=no} -ac_cv_func___facl=${ac_cv_func___facl=no} -ac_cv_func__facl=${ac_cv_func__facl=no} -ac_cv_func___fchdir=${ac_cv_func___fchdir=no} -ac_cv_func__fchdir=${ac_cv_func__fchdir=no} -ac_cv_func___fcntl=${ac_cv_func___fcntl=no} -ac_cv_func__fcntl=${ac_cv_func__fcntl=no} -ac_cv_func___fork=${ac_cv_func___fork=no} -ac_cv_func__fork=${ac_cv_func__fork=no} -ac_cv_func___fstat=${ac_cv_func___fstat=no} -ac_cv_func__fstat=${ac_cv_func__fstat=no} -ac_cv_func___fstat64=${ac_cv_func___fstat64=no} -ac_cv_func__fstat64=${ac_cv_func__fstat64=no} -ac_cv_func___fxstat=${ac_cv_func___fxstat=no} -ac_cv_func___getcwd=${ac_cv_func___getcwd=no} -ac_cv_func__getcwd=${ac_cv_func__getcwd=no} -ac_cv_func___getdents=${ac_cv_func___getdents=no} -ac_cv_func__getdents=${ac_cv_func__getdents=no} -ac_cv_func___llseek=${ac_cv_func___llseek=no} -ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} -ac_cv_func__llseek=${ac_cv_func__llseek=no} -ac_cv_func___lseek=${ac_cv_func___lseek=no} -ac_cv_func__lseek=${ac_cv_func__lseek=no} -ac_cv_func___lstat=${ac_cv_func___lstat=no} -ac_cv_func__lstat=${ac_cv_func__lstat=no} -ac_cv_func___lstat64=${ac_cv_func___lstat64=no} -ac_cv_func__lstat64=${ac_cv_func__lstat64=no} -ac_cv_func___lxstat=${ac_cv_func___lxstat=no} -ac_cv_func___open=${ac_cv_func___open=no} -ac_cv_func__open=${ac_cv_func__open=no} -ac_cv_func___open64=${ac_cv_func___open64=no} -ac_cv_func__open64=${ac_cv_func__open64=no} -ac_cv_func___opendir=${ac_cv_func___opendir=no} -ac_cv_func__opendir=${ac_cv_func__opendir=no} -ac_cv_func___pread=${ac_cv_func___pread=no} -ac_cv_func__pread=${ac_cv_func__pread=no} -ac_cv_func___pread64=${ac_cv_func___pread64=no} -ac_cv_func__pread64=${ac_cv_func__pread64=no} -ac_cv_func___pwrite=${ac_cv_func___pwrite=no} -ac_cv_func__pwrite=${ac_cv_func__pwrite=no} -ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} -ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} -ac_cv_func___read=${ac_cv_func___read=no} -ac_cv_func__read=${ac_cv_func__read=no} -ac_cv_func___readdir=${ac_cv_func___readdir=no} -ac_cv_func__readdir=${ac_cv_func__readdir=no} -ac_cv_func___readdir64=${ac_cv_func___readdir64=no} -ac_cv_func__readdir64=${ac_cv_func__readdir64=no} -ac_cv_func___seekdir=${ac_cv_func___seekdir=no} -ac_cv_func__seekdir=${ac_cv_func__seekdir=no} -ac_cv_func___stat=${ac_cv_func___stat=no} -ac_cv_func__stat=${ac_cv_func__stat=no} -ac_cv_func___stat64=${ac_cv_func___stat64=no} -ac_cv_func__stat64=${ac_cv_func__stat64=no} -ac_cv_func___telldir=${ac_cv_func___telldir=no} -ac_cv_func__telldir=${ac_cv_func__telldir=no} -ac_cv_func___write=${ac_cv_func___write=no} -ac_cv_func__write=${ac_cv_func__write=no} -ac_cv_func___xstat=${ac_cv_func___xstat=no} - - - -# Miscellaneous stuff that isn't, and shouldn't be, available -# in Debian. Those interested in building debs for other systems may -# need to remove some of these defines. - -ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} -ac_cv_func_crypt16=${ac_cv_func_crypt16=no} -ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} -ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} -ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} -ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} -ac_cv_func_rdchk=${ac_cv_func_rdchk=no} -ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} -ac_cv_func_setgidx=${ac_cv_func_setgidx=no} -ac_cv_func_setluid=${ac_cv_func_setluid=no} -ac_cv_func_setpriv=${ac_cv_func_setpriv=no} -ac_cv_func_setuidx=${ac_cv_func_setuidx=no} -ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} -ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} -ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} -ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} -ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} -ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} -ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} -ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} -ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} -ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/unstable/config.cache.alpha-linux b/packaging/Debian/unstable/config.cache.alpha-linux deleted file mode 100644 index 6d171920263..00000000000 --- a/packaging/Debian/unstable/config.cache.alpha-linux +++ /dev/null @@ -1,12 +0,0 @@ -# 22 Aug 2001 Steve Langasek - -# This file contains autoconf settings specific to the alpha-linux -# platform that should be preloaded when building for this architecture. - - -# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but -# Linux 2.4 does. Ensure that packages compiled for woody remain -# compatible with 2.2 kernels, even if the build machine is running 2.4. -samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/config.cache.sparc-linux b/packaging/Debian/unstable/config.cache.sparc-linux deleted file mode 100644 index a2a21b1d3ad..00000000000 --- a/packaging/Debian/unstable/config.cache.sparc-linux +++ /dev/null @@ -1,13 +0,0 @@ -# 24 Spe 2001 Steve Langasek - -# This file contains autoconf settings specific to the sparc-linux -# platform that should be preloaded when building for this architecture. - - -# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but -# Linux 2.4 does. Ensure that packages compiled for woody remain -# compatible with 2.2 kernels, even if the build machine is running 2.4. -samba_cv_have_setresuid=${samba_cv_have_setresuid=no} -samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/control b/packaging/Debian/unstable/control deleted file mode 100644 index 24356161b1b..00000000000 --- a/packaging/Debian/unstable/control +++ /dev/null @@ -1,121 +0,0 @@ -Source: samba -Section: net -Priority: optional -Maintainer: Eloy A. Paris -Build-Depends: debhelper (>=2.0.103), libpam0g-dev, libreadline4-dev, libcupsys2-dev -Standards-Version: 3.1.1 - -Package: samba -Architecture: any -Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends} -Replaces: samba-common (<= 2.0.5a-2) -Suggests: samba-doc -Description: A LanManager like file and printer server for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the components necessary to turn your - Debian GNU/Linux box into a powerful file and printer server. - . - As of Samba 2.0.6-1, the Samba Debian packages consist of the following: - . - samba - A LanManager like file and printer server for Unix. - samba-common - Samba common files used by both the server and the client. - smbclient - A LanManager like simple client for Unix. - swat - Samba Web Administration Tool - samba-doc - Samba documentation. - smbfs - Mount and umount commands for the smbfs (kernels 2.0.x and above). - -Package: samba-common -Architecture: any -Depends: libpam-modules, ${shlibs:Depends} -Replaces: samba (<= 2.0.5a-2) -Description: Samba common files used by both the server and the client. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the common files that are used by both the server - (provided in the samba package) and the client (provided in the smbclient - package). - -Package: smbclient -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Provides: samba-client -Suggests: smbfs -Description: A LanManager like simple client for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains some client components of the Samba suite. In - particular it includes the command line utilities smbclient, smbtar, - and smbspool. If you want to mount shares exported from Microsoft - Windows machines or a Samba server you must install the smbfs package. - -Package: swat -Architecture: any -Depends: samba (= ${Source-Version}), ${shlibs:Depends} -Recommends: samba-doc -Description: Samba Web Administration Tool - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the components of the Samba suite that are needed - for Web administration of the Samba server. - -Package: samba-doc -Section: doc -Architecture: all -Description: Samba documentation. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the documentation that comes in the original - tarball. - -Package: smbfs -Section: otherosfs -Priority: optional -Architecture: any -Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} -Suggests: smbclient -Replaces: smbfsx -Conflicts: smbfsx, suidmanager (<< 0.50) -Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) - Smbfs is a filesystem which understands the SMB protocol. - This is the protocol Windows for Workgroups, Windows NT or - Lan Manager use to talk to each other. It was inspired by - samba, the program by Andrew Tridgell that turns any unix - site into a file server for DOS or Windows clients. - . - If you want to use command-line utilites like smbclient, smbtar - and/or smbspool just need to install the smbclient package. - . - Starting with the Debian Samba packages version 2.2.0-1, the old smbfs - utilities for 2.0.x have been removed. There are no wrapper scripts - that call a specific smbmount/smbmount depending on the kernel version. - If you are using a 2.0.x kernel please upgrade or use the latest Samba - 2.0.7 Debian package. - -Package: libpam-smbpass -Section: admin -Priority: extra -Architecture: any -Depends: ${shlibs:Depends} -Suggests: samba -Description: pluggable authentication module for SMB password database - This is a stackable PAM module that allows a system administrator to easily - migrate to using encrypted passwords for Samba and to keep smb passwords in - sync with unix passwords. Unlike other solutions, it does this without - requiring users to change their existing passwords or login to Samba using - cleartext passwords. diff --git a/packaging/Debian/unstable/control.smbwrapper b/packaging/Debian/unstable/control.smbwrapper deleted file mode 100644 index 70444ca5f58..00000000000 --- a/packaging/Debian/unstable/control.smbwrapper +++ /dev/null @@ -1,111 +0,0 @@ -Source: samba -Section: net -Priority: optional -Maintainer: Eloy A. Paris -Standards-Version: 2.4.0.0 - -Package: samba -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Replaces: samba-common (<= 2.0.5a-2) -Suggests: samba-doc -Description: A LanManager like file and printer server for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the components necessary to turn your - Debian GNU/Linux box into a powerful file and printer server. - . - As of Samba 2.0.0, the Samba Debian packages consist of the following: - . - samba - A LanManager like file and printer server for Unix. - samba-common - Samba common files used by both the server and the client. - smbclient - A LanManager like simple client for Unix. - swat - Samba Web Administration Tool - samba-doc - Samba documentation. - smbfsx - Mount and umount commands for the smbfs and kernels > 2.1.70. - smbwrapper - A shared library that provides SMB client services - -Package: samba-common -Architecture: any -Depends: ${shlibs:Depends} -Replaces: samba (<= 2.0.5a-2) -Description: Samba common files used by both the server and the client. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the common files that are used by both the server - (provided in the samba package) and the client (provided in the smbclient - package). - -Package: smbclient -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Description: A LanManager like simple client for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the client components of the Samba suite. - -Package: swat -Architecture: any -Depends: samba, ${shlibs:Depends} -Description: Samba Web Administration Tool - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the components of the Samba suite that are needed - for Web administration fo the Samba server. - -Package: samba-doc -Architecture: all -Description: Samba documentation. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the documentation that comes in the original - tarball. - -Package: smbfs -Section: otherosfs -Priority: optional -Architecture: any -Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} -Replaces: smbfsx -Conflicts: smbfsx -Description: Mount and umount commands for the smbfs (2.0.x and 2.1.x kernels) - Smbfs is a filesystem which understands the SMB protocol. - This is the protocol Windows for Workgroups, Windows NT or - Lan Manager use to talk to each other. It was inspired by - samba, the program by Andrew Tridgell that turns any unix - site into a file server for DOS or Windows clients. - . - Starting with the Debian Samba packages version 2.0.4b-2, the old smbfs - utilities for 2.0.x and the new smbfs utilities for 2.2.x kernels have been - merged in a single package called smbfs. A wrapper script called smbmount.sh - identifies the version of the kernel running and calls the correct binary. - -Package: smbwrapper -Section: otherosfs -Priority: optional -Architecture: any -Depends: ${shlibs:Depends} -Description: A shared library that provides SMB client services - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains prelodable shared library that provides SMB client - services for existing executables. Using this you can simulate a smb - filesystem. diff --git a/packaging/Debian/unstable/copyright b/packaging/Debian/unstable/copyright deleted file mode 100644 index 95bac89a540..00000000000 --- a/packaging/Debian/unstable/copyright +++ /dev/null @@ -1,36 +0,0 @@ -This is the Debian Linux prepackaged version of the Samba SMB -(LAN-Manager) server. Samba was written by Andrew Tridgell - and many others. - -This package was put together by Eloy Paris -based on previous work by Klee Dienes , -Andrew Howell and Bruce Perens -from sources found at . - -As of early in the samba-2.0.0alpha series, the Samba package for Debian -was split into the following packages: - -- samba (the Samba server) -- smbclient (a LAN Manager client - like the ftp program) -- swat (Samba Web Administration Tool) -- smbfs (smbfs userland utilities for kernels > 2.0.x) -- samba-doc (Samba documentation). - -Copyright: - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 dated June, 1991. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/unstable/cron.daily b/packaging/Debian/unstable/cron.daily deleted file mode 100644 index 42fc98d8f6d..00000000000 --- a/packaging/Debian/unstable/cron.daily +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. -# -# Written by Eloy A. Paris for the Debian project. -# - -BAK=/var/backups - -umask 022 -if cd $BAK; then - # Make sure /etc/samba/smbpasswd exists - if [ -f /etc/samba/smbpasswd ]; then - cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak - fi -fi diff --git a/packaging/Debian/unstable/docs b/packaging/Debian/unstable/docs deleted file mode 100644 index 187fdd34058..00000000000 --- a/packaging/Debian/unstable/docs +++ /dev/null @@ -1,3 +0,0 @@ -README -Roadmap -WHATSNEW.txt diff --git a/packaging/Debian/unstable/init.d b/packaging/Debian/unstable/init.d deleted file mode 100644 index 8ac2e97148f..00000000000 --- a/packaging/Debian/unstable/init.d +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# Start/stops the Samba daemons (nmbd and smbd). -# - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -# clear conflicting settings from the environment -unset TMPDIR - -# Sanity check: see if Samba has been configured on this system. -if [ ! -f $DEBIAN_CONFIG ]; then - echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" - echo "with the installation of Samba on this system. Please re-install" - echo "Samba. I can't continue!!!" - exit 1 -fi - -# Read current Samba configuration -. $DEBIAN_CONFIG - -# the Samba daemons. - -# If Samba is running from inetd then there is nothing to do -if [ "$run_mode" = "from_inetd" ]; then - # Commented out to close bug #26884 (startup message is rather long). I - # have yet to think how to let the user know that if he/she is running - # Samba from inetd, he can't just "/etc/init.d/samba stop" to stop - # the Samba daemons. -# echo "Warning: Samba is not running as daemons. Daemons not restarted/stopped." -# echo "Daemons will start automatically by inetd (if you wanted to start Samba)." -# echo "If you want to stop Samba, get the PID's of all nmbd and smbd processes" -# echo "and send them a SIGTERM signal but keep in mind that inetd could restart them." - exit 0 -fi - -# See if the daemons are there -test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 - -case "$1" in - start) - echo -n "Starting Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D - - echo -n " smbd" - start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D - - echo "." - ;; - stop) - echo -n "Stopping Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --stop --quiet --pidfile $NMBDPID - - echo -n " smbd" - start-stop-daemon --stop --quiet --pidfile $SMBDPID - - echo "." - ;; - reload) - echo -n "Reloading /etc/samba/smb.conf (smbd only)" - start-stop-daemon --stop --signal HUP --pidfile $SMBDPID - - echo "." - ;; - restart|force-reload) - echo -n "Restarting Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --stop --quiet --pidfile $NMBDPID - sleep 2 - start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D - - echo -n " smbd" - start-stop-daemon --stop --quiet --pidfile $SMBDPID - sleep 2 - start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D - - echo "." - ;; - *) - echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/packaging/Debian/unstable/libpam-smbpass.files b/packaging/Debian/unstable/libpam-smbpass.files deleted file mode 100644 index 4263df5c0f0..00000000000 --- a/packaging/Debian/unstable/libpam-smbpass.files +++ /dev/null @@ -1 +0,0 @@ -lib/security/pam_smbpass.so diff --git a/packaging/Debian/unstable/mksmbpasswd.8 b/packaging/Debian/unstable/mksmbpasswd.8 deleted file mode 100644 index 0a500102e8a..00000000000 --- a/packaging/Debian/unstable/mksmbpasswd.8 +++ /dev/null @@ -1,28 +0,0 @@ -.TH MKSMBPASSWD 8 12-Apr-1998 -.SH NAME -mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file -.SH SYNOPSIS -mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd -.SH DESCRIPTION -.B mksmbpasswd -should be used only once, the first time Samba is installed. The idea -is to ease accounts creation by transferring all user accounts from -/etc/passwd to /etc/samba/smbpasswd. -.PP -Please note that passwords are not transferred automatically from -/etc/passwd to the new /etc/samba/smbpasswd file. After running -.B mksmbpasswd -all accounts are disabled so the system administrator must run -smbpasswd for each account that needs to be enable. -.SH FILES -.TP -/etc/passwd -System wide accounts file -.TP -/etc/samba/smbpasswd -Encrypted passwords file for the Samba daemons -.SH SEE ALSO -samba(7), nmbd(8), smbd(8) -.SH AUTHOR -Eloy A. Paris (man page based on sendmailconfig's man page -by Robert Leslie ) diff --git a/packaging/Debian/unstable/mksmbpasswd.awk b/packaging/Debian/unstable/mksmbpasswd.awk deleted file mode 100644 index a7b41a725d3..00000000000 --- a/packaging/Debian/unstable/mksmbpasswd.awk +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/awk -f -BEGIN {FS=":" - printf("#\n# SMB password file.\n#\n") - } -{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/unstable/rules b/packaging/Debian/unstable/rules deleted file mode 100644 index a2c37510b32..00000000000 --- a/packaging/Debian/unstable/rules +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/make -f -# -# Important modifications (introduction of a saved config.cache to -# solve build problems) we introduced in Samba 2.2.1a-5. These -# modification were made by Steve Langasek . -# - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=2 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -# Set the host and build architectures for use with config.cache loading, -# cross-building, etc. -DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -export DEB_HOST_GNU_TYPE -export DEB_BUILD_GNU_TYPE - -BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb - -DESTDIR=`pwd`/debian/samba -SWATDIR=`pwd`/debian/swat -SAMBABOOK=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/state/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat \ - SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba \ - CODEPAGEDIR=$(DESTDIR)/usr/share/samba/codepages - -configure: configure-stamp -configure-stamp: - dh_testdir - - # Add here commands to configure the package. -# > -# > Does the --with-fhs option work in configure? I tried it with -# > alpha3, but everything was stored in /usr/local. Is that correct? -# > ... -# -# Yes - the default prefix is still /usr/local; --with-fhs just -# changes the default paths for the config, etc. files to match -# the GNU/FHS specs. To get a complete FHS directory spec, use: -# -# ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ -# --localstatedir=/var - - if [ -f debian/config.cache ]; then \ - cp -f debian/config.cache source/config.cache; \ - fi - -# [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) - [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first -# $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - $(MAKE) -C source all smbtorture - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean -# -$(MAKE) -C source clean - -$(MAKE) -C source distclean - rm -f source/bin/rpctorture - rm -f source/bin/smbtorture - rm -f source/bin/debug2html - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - install -m 0755 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ - - # Create the symlink that will allow us to do "mount -t smbfs ...". - # Create also a symlink that will allow "mount -t smb ..." to - # work too. The symlink is created in $(DESTDIR)/sbin/ but - # will be moved by dh_movefiles to the smbfs package later on. - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb - - # For CUPS to support printing to samba printers, it's necessary - # to make the following symlink (according to - # Erich Schubert in #109509): - ln -s /usr/bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb - - # To avoid duplication of a large number of files, the swat package - # does not contain the "Using Samba" book nor the HTML docs. - # Instead, these are provided by the samba-doc package and - # are accessed through symlinks provided in the swat package. - # Here we create the symlink for the book, and the symlinks - # for the HTML files are created by the script installswat.sh. - ln -s ../../../doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba - - # Install man pages for files without man pages in the upstream sources - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # The smbwrapper package is not being generated anymore, so we must - # delete the related man pages. - rm $(DESTDIR)/usr/share/man/man1/smbsh.1 - - # These files are not part of the main samba package, move to where they - # belong... - #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # Install samba-common's conffiles - they'll get moved later to their - # correct place by dh_movefiles. - cp debian/smb.conf $(DESTDIR)/etc/samba/ - cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba - - dh_movefiles --sourcedir=debian/samba/ - - # Remove empty directories that will never be used. - rmdir $(DESTDIR)/sbin - -# Build architecture-independent files here. -# Pass -i to all debhelper commands in this target to reduce clutter. -binary-indep: DH_OPTIONS=-i -binary-indep: build install - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build - dh_installexamples -# dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit -# dh_installcron -# dh_installmanpages -# dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_link - dh_compress - dh_fixperms - dh_installdeb -# dh_perl - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture-dependent files here. -# Pass -a to all debhelper commands in this target to reduce clutter. -binary-arch: DH_OPTIONS=-a -binary-arch: build install - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build - dh_installexamples -# dh_installmenu - dh_installlogrotate -# dh_installemacsen -# dh_installpam - dh_installinit - dh_installcron -# dh_installmanpages -# dh_installinfo - dh_undocumented - dh_installchangelogs - dh_strip - dh_link - dh_compress - dh_fixperms - - # You may want to make some executables suid here. - # The smbmnt, smbmount and smbumount binaries must be setuid-root. - chmod u+s debian/smbfs/usr/bin/smbmnt - chmod u+s debian/smbfs/usr/bin/smbmount - chmod u+s debian/smbfs/usr/bin/smbumount - - # Set some reasonable default perms for the samba logdir. - chmod 0750 $(DESTDIR)/var/log/samba/ - chown root.adm $(DESTDIR)/var/log/samba/ - - dh_installdeb -# dh_makeshlibs -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/unstable/rules.old b/packaging/Debian/unstable/rules.old deleted file mode 100644 index ac322185a9d..00000000000 --- a/packaging/Debian/unstable/rules.old +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/make -f -# Made with the iad of dh_make, by Craig Small -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Also some stuff taken from debmake scripts, by Cristopt Lameter. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -BVARS = BASEDIR=/usr \ - LIBDIR=/etc/samba \ - SMB_PASSWD_FILE=/etc/samba/smbpasswd \ - SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ - LOCKDIR=/var/samba \ - SWATDIR=/usr/share/samba/swat - -DESTDIR=`pwd`/debian/tmp -SWATDIR=`pwd`/debian/swat -SAMBABOOK=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat \ - SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba - -build: build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first - [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) - $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - - # Now compile the old smbfs package - $(MAKE) -C source/smbfs-2.0.x - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean - -$(MAKE) -C source distclean -# -$(MAKE) -C source clean - rm -f source/bin/{rpctorture,smbtorture,debug2html} - - # Now clean the old smbfs-2.0.x package - -$(MAKE) -C source/smbfs-2.0.x clean - - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - - # Create the symlink that will allow us to do "mount -t smbfs ...". - # Create also a symlink that will allow "mount -t smb ..." to - # work too. The symlink is created in $(DESTDIR)/sbin/ but - # will be moved by dh_movefiles to the smbfs package later on. - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb - - # To avoid duplication of a large number of files, the swat package - # does not contain the "Using Samba" book nor the HTML docs. - # Instead, these are provided by the samba-doc package and - # are accessed through symlinks provided in the swat package. - # Here we create the symlink for the book, and the symlinks - # for the HTML files are created by the script installswat.sh. - ln -s /usr/share/doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba - - # Install man pages for files without man pages in the upstream dist. - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # The smbwrapper package is not being generated anymore, so we must - # delete the related man pages. - rm $(DESTDIR)/usr/share/man/man1/smbsh.1 - - # We need to rename the SMB mount utilities so they don't have the same - # names as the files in the smbfs package. - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 - - # These files are not part of the main samba package, move to where they - # belong... - #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must - # be setuid-root. - chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x - - # Install samba-common's conffiles - cp debian/smb.conf $(DESTDIR)/etc/samba/ - cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba - - # OK, now it's time to install the smbfs-2.0.2 files - $(MAKE) -C source/smbfs-2.0.x install $(IVARS) - - # Rename the old smbfs utilities to more convenient names - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 - - # Now install the smbmount and smbumount wrappers and its man pages - install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount - install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount - install -m 0644 debian/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount.8 - install -m 0644 debian/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount.8 - - # Install some docs. that go in "unusual" places - cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ - cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ - - dh_movefiles - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# dh_testversion - dh_testdir -i - dh_testroot -i - dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -i -# dh_installmenu -i -# dh_installemacsen -i -# dh_installinit -i -# dh_installcron -i -# dh_installmanpages -i - dh_undocumented - dh_installchangelogs -i - dh_compress -i -# dh_suidregister -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion - dh_testdir -a - dh_testroot -a - dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt -A debian/README.linux - dh_installexamples -a -# dh_installmenu -a -# dh_installemacsen -a - dh_installinit -a - dh_installcron -a -# dh_installmanpages -a - dh_undocumented - dh_installchangelogs -a - dh_strip -a - dh_compress -a - dh_suidregister -a - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a -# dh_makeshlibs -a - dh_md5sums -a - dh_builddeb -a - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/rules.smbwrapper b/packaging/Debian/unstable/rules.smbwrapper deleted file mode 100644 index e3c72ee47c4..00000000000 --- a/packaging/Debian/unstable/rules.smbwrapper +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/make -f -# Made with the iad of dh_make, by Craig Small -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Also some stuff taken from debmake scripts, by Cristopt Lameter. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -BVARS = BASEDIR=/usr \ - LIBDIR=/etc/samba \ - SMB_PASSWD_FILE=/etc/samba/smbpasswd \ - SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ - LOCKDIR=/var/samba \ - SWATDIR=/usr/share/samba/swat - -DESTDIR=`pwd`/debian/tmp -SWATDIR=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat - -build: build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first - [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-smbwrapper) - $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - - # Now compile the old smbfs package - $(MAKE) -C source/smbfs-2.0.x - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean - -$(MAKE) -C source distclean -# -$(MAKE) -C source clean - rm -f source/bin/{rpctorture,smbtorture,debug2html} - - # Now clean the old smbfs-2.0.x package - -$(MAKE) -C source/smbfs-2.0.x clean - - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - install -m 0755 source/smbadduser $(DESTDIR)/usr/sbin/ - - # Install man pages for files without man pages in the upstream dist. - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # We need to rename the SMB mount utilities so they don't have the same - # names as the files in the smbfs package. - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 - - # These files are not part of the main samba package, move to where they - # belong... - mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must - # be setuid-root. - chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x - - # Install samba-common's conffiles - cp debian/smb.conf $(DESTDIR)/etc/samba/ - - - # OK, now it's time to install the smbfs-2.0.2 files - $(MAKE) -C source/smbfs-2.0.x install $(IVARS) - - # Rename the old smbfs utilities to more convenient names - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 - - # Now install the smbmount and smbumount wrappers - install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount - install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount - - # Install some docs. that go in "unusual" places - cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ - cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ - - dh_movefiles - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# dh_testversion - dh_testdir -i - dh_testroot -i - dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -i -# dh_installmenu -i -# dh_installemacsen -i -# dh_installinit -i -# dh_installcron -i -# dh_installmanpages -i - dh_undocumented - dh_installchangelogs -i - dh_compress -i -# dh_suidregister -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion - dh_testdir -a - dh_testroot -a - dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -a -# dh_installmenu -a -# dh_installemacsen -a - dh_installinit -a - dh_installcron -a -# dh_installmanpages -a - dh_undocumented - dh_installchangelogs -a - dh_strip -a - dh_compress -a - dh_suidregister -a - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a -# dh_makeshlibs -a - dh_md5sums -a - dh_builddeb -a - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/samba-common.conffiles b/packaging/Debian/unstable/samba-common.conffiles deleted file mode 100644 index b5703025dde..00000000000 --- a/packaging/Debian/unstable/samba-common.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/samba/smb.conf -/etc/pam.d/samba diff --git a/packaging/Debian/unstable/samba-common.files b/packaging/Debian/unstable/samba-common.files deleted file mode 100644 index 94f2e25f6a6..00000000000 --- a/packaging/Debian/unstable/samba-common.files +++ /dev/null @@ -1,7 +0,0 @@ -etc/samba/ -usr/bin/nmblookup -usr/bin/smbpasswd -etc/pam.d/ -usr/share/man/man1/nmblookup.1 -usr/share/man/man8/smbpasswd.8 -usr/share/samba/codepages/ diff --git a/packaging/Debian/unstable/samba-common.postrm b/packaging/Debian/unstable/samba-common.postrm deleted file mode 100644 index 2cd832b33d2..00000000000 --- a/packaging/Debian/unstable/samba-common.postrm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -if [ "$1" = purge ]; then - # Remove any files left in /etc/samba/ - rm -Rf /etc/samba/ -fi diff --git a/packaging/Debian/unstable/samba-doc.docs b/packaging/Debian/unstable/samba-doc.docs deleted file mode 100644 index 5ecd34993ee..00000000000 --- a/packaging/Debian/unstable/samba-doc.docs +++ /dev/null @@ -1,9 +0,0 @@ -README -docs/NT4_PlainPassword.reg -docs/THANKS -docs/Win95_PlainPassword.reg -docs/announce -docs/history -docs/textdocs/ -docs/faq/ -docs/htmldocs/ diff --git a/packaging/Debian/unstable/samba-doc.examples b/packaging/Debian/unstable/samba-doc.examples deleted file mode 100644 index 6a78432b28c..00000000000 --- a/packaging/Debian/unstable/samba-doc.examples +++ /dev/null @@ -1,3 +0,0 @@ -examples/ -debian/wins2dns.awk -source/smbadduser diff --git a/packaging/Debian/unstable/samba.conffiles b/packaging/Debian/unstable/samba.conffiles deleted file mode 100644 index 03f64414b06..00000000000 --- a/packaging/Debian/unstable/samba.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/cron.daily/samba -/etc/init.d/samba diff --git a/packaging/Debian/unstable/samba.dirs b/packaging/Debian/unstable/samba.dirs deleted file mode 100644 index 237603750a1..00000000000 --- a/packaging/Debian/unstable/samba.dirs +++ /dev/null @@ -1,11 +0,0 @@ -sbin -usr/bin -usr/sbin -var/log/samba -var/state/samba -etc/samba -etc/pam.d -usr/share -usr/share/samba -lib/security -usr/lib/cups/backend diff --git a/packaging/Debian/unstable/samba.logrotate b/packaging/Debian/unstable/samba.logrotate deleted file mode 100644 index 9e96312986c..00000000000 --- a/packaging/Debian/unstable/samba.logrotate +++ /dev/null @@ -1,15 +0,0 @@ -/var/log/samba/log.smbd { - weekly - missingok - rotate 7 - compress - notifempty -} - -/var/log/samba/log.nmbd { - weekly - missingok - rotate 7 - compress - notifempty -} diff --git a/packaging/Debian/unstable/samba.pamd b/packaging/Debian/unstable/samba.pamd deleted file mode 100644 index 1a5a14c7089..00000000000 --- a/packaging/Debian/unstable/samba.pamd +++ /dev/null @@ -1,5 +0,0 @@ -auth required pam_unix.so nullok -account required pam_unix.so -session required pam_unix.so -password required pam_unix.so - diff --git a/packaging/Debian/unstable/samba.postinst b/packaging/Debian/unstable/samba.postinst deleted file mode 100644 index 3d5dd0cf93b..00000000000 --- a/packaging/Debian/unstable/samba.postinst +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/sh -# -# Post-installation script for the Samba package for Debian GNU/Linux -# -# Written by Eloy A. Paris for the Debian project. -# -# The prerm script (run before the postinst) disables Samba in /etc/inetd.conf -# and stops both nmbd and smbd. So, when this script is run we -# know that neither nmbd nor smbd can start. -# - -case "$1" in - configure) - # continue below - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# Take care of the /usr/doc/ to /usr/shar/doc/ migration. -if [ -d /usr/doc -a ! -e /usr/doc/samba -a -d /usr/share/doc/samba ]; then - ln -sf ../share/doc/samba /usr/doc/samba -fi - -# Starting with Samba 2.0.7-4 the location of the WINS database, the browse -# database and other important run-time files are stored in -# /var/state/samba/ rather than in /var/samba/. The following -# code takes care of moving the files in the old directory to -# the new directory. -if [ -d /var/samba/ ]; then - mv /var/samba/* /var/state/samba/ - rmdir /var/samba/ -fi - -# Define some constants... -DEBIAN_CONFIG=/etc/samba/debian_config -CONFIG_VERSION=1 - -# Now some variables... -samba_configured=no - - -if [ -f $DEBIAN_CONFIG ]; then - . $DEBIAN_CONFIG - if [ "$config_version" -ge "$CONFIG_VERSION" ]; then - samba_configured=yes - fi -fi - -# If Samba is configured we don't want to pester the user with -# configuration questions, just tell him that he can reconfigure -# Samba at any time by running /usr/sbin/sambaconfig. -if [ "$samba_configured" = "no" ]; then - # Samba is not configured, go and ask the user the information needed - # to configure it, and configure it! - - # Create Debian specific configuration file - echo "config_version=$CONFIG_VERSION" > $DEBIAN_CONFIG - - # We always run /etc/init.d/samba, even if we run Samba from inetd. - # This script file takes care of handling the conflict of running - # from inetd or as daemons. - update-rc.d samba defaults >/dev/null - - # We want to add these entries to inetd.conf commented out. Otherwise - # UDP traffic could make inetd to start nmbd or smbd right during - # the configuration stage. - update-inetd --add "## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" - update-inetd --add "## netbios-ns dgram udp wait root /usr/sbin/tcpd /usr/sbin/nmbd -a" - - echo "" - echo Samba Configuration - echo ------------------- - echo "The Samba server may be run either as a daemon at startup, or it may be" - echo "run from the inetd meta-daemon upon request. If run as a daemon, the" - echo "server will always be ready, so starting sessions will be faster. If run" - echo "from the inetd meta-daemon some memory will be saved and utilities such" - echo "as the tcpd TCP-wrapper may be used for extra security. If you don't" - echo "know what to do, running from inetd is a safe choice." - echo "" - echo "Run Samba as daemons or from inetd?" - echo -n "Press 'D' to run as daemons or 'I' to run from inetd: [I] " - - read mode - test -n "$mode" || mode="I" - - case "$mode" in - [Dd]*) - echo "Samba will run as daemons. Run sambaconfig to reconfigure" - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - echo "run_mode=as_daemons" >> $DEBIAN_CONFIG - ;; - - *) - echo "Samba will run from inetd. Run sambaconfig to reconfigure" - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - echo "run_mode=from_inetd" >> $DEBIAN_CONFIG - ;; - esac - - if [ ! -f /etc/samba/smbpasswd ]; then - echo "" - echo "If you are going to use encrypted passwords you need to have a" - echo "separate password file for this (the format is different from " - echo "/etc/passwd). Right now you don't have an /etc/samba/smbpasswd file." - echo "Do you want to generate this new file from your existing" - echo -n "/etc/passwd file? [y/N] " - - read yn - test -n "$yn" || yn="N" - - if [ $yn = y -o $yn = Y ]; then - cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd - chmod 600 /etc/samba/smbpasswd - echo "" - echo "/etc/samba/smbpasswd now has the same user names as /etc/passwd. However," - echo "you need to run smbpasswd manually to set the password for each user." - echo "" - echo "smbpasswd_created=yes" >> $DEBIAN_CONFIG - else - echo "smbpasswd_created=no" >> $DEBIAN_CONFIG - fi - fi - - echo "" - - # Start Samba: nothing wrong will happen if Samba is running from inetd - # and /etc/init.d/samba is run. However, to simplify things, we - # do not run /etc/init.d/samba if we're running from inetd. - - if [ $mode = d -o $mode = D ]; then - echo -n "Samba will run as daemons - start Samba now? [Y/n] " - read yn - test -n "$yn" || yn="Y" - - case "$yn" in - [Nn]*) - echo "Not started; to start later, do: /etc/init.d/samba start" - echo -n "Press [ENTER] " - read line - ;; - - *) - /etc/init.d/samba start - ;; - esac - else - echo "Since you are running Samba from inetd, the daemons will start" - echo "automatically by inetd when there is traffic on the NetBIOS" - echo "ports." - echo -n "Press [ENTER] " - read line - fi -else # if (samba_configured) ... - # We are here because Samba was already configured... - - # At this point the NetBIOS daemons are disabled in /etc/inetd.conf. - # This is a consequence of what we did in the prerm. If Samba was - # configured to run from inetd we need to enable the entries in - # /etc/inetd.conf. - - # Read current Samba configuration - . $DEBIAN_CONFIG - - if [ "$run_mode" = "from_inetd" ]; then - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - fi - - echo "" - echo "Samba was already installed and configured so I skipped the " - echo "configuration questions. You can run the script /usr/sbin/sambaconfig" - echo "at any time to reconfigure Samba. See sambaconfig(8) for more" - echo "details. I will not even ask you if you want to restart Samba," - echo "I will just do it!" - echo "" - - /etc/init.d/samba start -fi # if (samba_configured) ... - -if test "$1" = configure && dpkg --compare-versions "$2" lt 2.0.0final-2 && [ -f /etc/samba/smbpasswd ]; then - - cat << EOF - -*** IMPORTANT *** - -The format of the smbpasswd file (which is used only if you are using -encrypted passwords) is different in Samba 2.0.0 and above. I will -covert it to the new format. - -EOF - - mv /etc/samba/smbpasswd /etc/samba/smbpasswd.old - cat /etc/samba/smbpasswd.old | /usr/bin/convert_smbpasswd \ - > /etc/samba/smbpasswd 2> /dev/null -fi - -# This check is a safety net: the /etc/samba/smbpasswd file must have -# permissions 600. -if [ -f /etc/samba/smbpasswd ]; then - chmod 600 /etc/samba/smbpasswd -fi - -# Do the same check for /var/backup/smbpasswd.bak, just in case. -if [ -f /var/backups/smbpasswd.bak ]; then - chmod 600 /var/backups/smbpasswd.bak -fi - -exit 0 diff --git a/packaging/Debian/unstable/samba.postrm b/packaging/Debian/unstable/samba.postrm deleted file mode 100644 index 73b2f0d0a1f..00000000000 --- a/packaging/Debian/unstable/samba.postrm +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -if [ "$1" = purge ]; then - update-rc.d samba remove >/dev/null - - # Remove WINS.DAT, BROWSE.DAT and lock information file - rm -Rf /var/samba/ - - # Remove any files in the old and obsolete /var/lock/samba directory - rm -Rf /var/lock/samba/ - - # Remove files left in /etc/samba/ - rm -Rf /etc/samba/debian_config - rm -Rf /etc/samba/MACHINE.SID - - # Remove log files - rm -f /var/log/[ns]mb* - - # Remove NetBIOS entries from /etc/inetd.conf - update-inetd --remove netbios-ssn - update-inetd --remove netbios-ns -else - # Not purging, do not remove NetBIOS entries from /etc/inetd.conf - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns -fi diff --git a/packaging/Debian/unstable/samba.preinst b/packaging/Debian/unstable/samba.preinst deleted file mode 100644 index 6ebefb8fb1b..00000000000 --- a/packaging/Debian/unstable/samba.preinst +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# The purpose of the preinst script for the samba package is to help -# the migration of the conffiles smb.conf and smbpasswd from their -# old location (/etc/) to their new location (/etc/samba/). -# -# Thanks to Ben Pfaff for sharing on debian-devel -# his ideas about how to move conffiles to new locations. -# - -# First see if a smb.conf file currently exists. -test -f /etc/smb.conf || exit 0 - -# Now see if a smb.conf file exists in the new location. -test -e /etc/samba/smb.conf && exit 0 - -# -# Move smb.conf conffile from its old location (/etc/) to its new one -# (/etc/samba). -# -# If conffile exists in old location AND conffile does not exist on new -# location then... -# -if [ -f /etc/smb.conf -a ! -e /etc/samba/smb.conf ]; then - # The new location for the conffile should not exist yet, so we create the - # dir. - mkdir -p /etc/samba - - # Finally, move the conffile to its new location. - mv /etc/smb.conf /etc/samba/smb.conf -fi - -# -# Move smbpasswd conffile from its old location (/etc/) to its new one -# (/etc/samba). -# -# If conffile exists in old location AND conffile does not exist on new -# location then... -# -if [ -f /etc/smbpasswd -a ! -e /etc/samba/smbpasswd ]; then - # The new location for the conffile should not exist yet, so we create the - # dir. - mkdir -p /etc/samba - - # Finally, move the conffile to its new location. - mv /etc/smbpasswd /etc/samba/smbpasswd -fi diff --git a/packaging/Debian/unstable/samba.prerm b/packaging/Debian/unstable/samba.prerm deleted file mode 100644 index acd6d087b5c..00000000000 --- a/packaging/Debian/unstable/samba.prerm +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# Pre-removal script for the Samba package for Debian GNU/Linux. -# -# Written by Eloy A. Paris for the Debian project. -# - -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -# The most important thing the prerm script must do is to stop the Samba -# daemons (nmbd and smbd). Note that this can be tricky since Samba -# can be running from the inetd meta-daemon or as daemons (it's a -# user choice). - -# Before we stop Samba we need to know how it is running (from inetd -# or as daemons). We could source in the debian_config file but it -# is safer to grep /etc/inetd.conf. -if grep -q '^netbios-ns' /etc/inetd.conf; then - # Samba is running from inetd. We need to disable the Samba daemons - # in /etc/inetd.conf before we stop the daemons. Otherwise traffic - # in the NetBIOS ports will make inetd start them again. - # - # Note: user preferences regarding the mode he/she wants Samba to - # be run (inetd or daemons) will be lost next. In the postinst - # we depend on the information present in the debian_config - # file to restore everything back to the way it was. - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - - # Now it is safe to stop the daemons... - - # I have just recalled that old versions of nmbd and smbd did not store - # their PID's in /var/samba/state/ (or whatever directory - # was used for this purpose in configure), so I can't use - # --pidfile in start-stop-daemon to stop nmbd or smbd. I - # will handle this by testing first whether the PID file exists. - if [ -f $NMBDPID ]; then - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID - else - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet - fi - - # nmbd must be dead by now, now it's smbd's turn - if [ -f $SMBDPID ]; then - start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID - else - start-stop-daemon --stop --oknodo --user root --name smbd --quiet - fi -elif [ -x /etc/init.d/samba ]; then # Old Samba packages didn't have a - # /etc/init.d/samba so we better - # check first. - # Samba is running as daemons. No problem here, just stop Samba... - /etc/init.d/samba stop -fi - -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/samba ]; then - rm -f /usr/doc/samba -fi - -# Make sure there are no nmbd or smbd daemons running (security check) -# (as you see this code is commented out - so far I haven't had the need -# to do this sanity check - peloy, Aug. 23, 1998) -#ps -ax | grep nmbd -#if [ $? ... ]; then -# killall -9 nmbd -#fi - -#ps -ax | grep smbd -#if [ $? ... ]; then -# killall -9 smbd -#fi diff --git a/packaging/Debian/unstable/sambaconfig b/packaging/Debian/unstable/sambaconfig deleted file mode 100644 index 0d35a519670..00000000000 --- a/packaging/Debian/unstable/sambaconfig +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# -# Written by Eloy A. Paris for Debian GNU/Linux. -# - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -if [ ! -f $DEBIAN_CONFIG ]; then - echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" - echo "with the installation of Samba on this system. Please re-install" - echo "Samba." - exit 1 -fi - -# Read current Samba configuration -. $DEBIAN_CONFIG - -reload=1 - -while [ $# -gt 0 ] -do - case "$1" in - --run-from-inetd) - run_from_inetd=1 - shift - ;; - - --run-as-daemons) - run_from_inetd=0 - shift - ;; - --no-reload) - reload=0 - shift - ;; - - *) - echo "Usage: $0 [--run-from-inetd|--run-as-daemons] [no-reload]" >&2 - exit 1 - ;; - esac -done - -# Make sure there are no Samba daemons (nmbd or smbd) running -# - -if [ "$run_mode" = "from_inetd" ]; then - # Samba is running from inetd - need to disable inetd before - # killing the daemons. - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID - start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID -else - # Samba is running as daemons - /etc/init.d/samba stop -fi - -if [ "x$run_from_inetd" = "x" ] -then - echo "Run Samba as daemons or from inetd?" - echo -n "Press 'D' for to run as daemons or 'I' to run from inetd: [I] " - - read mode - test -n "$mode" || mode="I" - - case "$mode" in - [Dd]*) - run_from_inetd=0 - ;; - - *) - run_from_inetd=1 - ;; - esac -fi - -if [ "$run_from_inetd" = 1 ]; then - echo "Samba will run from inetd. Run sambaconfig to reconfigure." - echo "" - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - run_mode="from_inetd" -else - echo "Samba will run as daemons. Run sambaconfig to reconfigure." - echo "" - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - run_mode="as_daemons" -fi - -# Rebuild Debian configuration file (only thing that could have -# changed so far is the variable called "run_mode". - -# Start the Samba daemons (take care of whether the user used the --no-reload -# option and how Samba is running: from inetd or as daemons) -echo "config_version=$config_version" > $DEBIAN_CONFIG -echo "run_mode=$run_mode" >> $DEBIAN_CONFIG -echo "smbpasswd_created=$smbpasswd_created" >> $DEBIAN_CONFIG - -if [ "$reload" = 0 ]; then - echo "Samba will not start (--no-reload parameter provided). Please note" - echo "that if you configured Samba to run from inetd, the Samba daemons" - echo "will start automatically when there is traffic in the NetBIOS ports" -elif [ "$run_from_inetd" = 1 ]; then - echo "The --no-reload parameter was not provided so I assume you want" - echo "to have the Samba daemons started. Since you are running from inetd" - echo "the Samba daemosn will start automatically when there is traffic" - echo "in the NetBIOS ports." -else - echo -n "The --no-reload parameter was not provided, start Samba now? [Y/n] " - read yn - test -n "$yn" || yn="Y" - - case "$yn" in - [Nn]*) - echo "Not started; to start later, do: /etc/init.d/samba start" - echo -n "Press [ENTER] " - read line - ;; - - *) - /etc/init.d/samba start - ;; - esac -fi diff --git a/packaging/Debian/unstable/sambaconfig.8 b/packaging/Debian/unstable/sambaconfig.8 deleted file mode 100644 index 2a0aaa9aa31..00000000000 --- a/packaging/Debian/unstable/sambaconfig.8 +++ /dev/null @@ -1,40 +0,0 @@ -.TH SAMBACONFIG 8 06-Apr-1998 -.SH NAME -sambaconfig \- configure Samba for Debian systems -.SH SYNOPSIS -sambaconfig [--run-from-inetd|--run-as-daemons] [--no-reload] -.SH DESCRIPTION -.B sambaconfig -is used to simplify the configuration of samba(8) for use on Debian -systems. -.PP -You may run this program to (re)configure samba for your Debian system -at any time. -.PP -Normally -.B sambaconfig -will ask if you want to reload the Samba daemons after making changes to its -configuration. The --no-reload option will avoid this question. Note -that if Samba is running from inetd and --no-reload is not supplied no -questions is asked because Samba will start automatically from inetd -when there is traffic on the NetBIOS ports. -.SH FILES -.TP -/etc/inetd.conf -If the lines that start the NetBIOS daemons nmbd and smbd are -commented out then Samba will start as daemons from /etc/init.d/start -.TP -/etc/init.d/samba -Script that will start/stop/restart Samba when running as daemons -.TP -/etc/samba/smbpasswd -Encrypted passwords file for the Samba daemons -.TP -/etc/samba/debian_config -Debian specific configuration information, it holds the mode in which -Samba is running (from inetd or as daemons). -.SH SEE ALSO -samba(7), nmbd(8), smbd(8) -.SH AUTHOR -Eloy A. Paris (man page based on sendmailconfig's man page -by Robert Leslie ) diff --git a/packaging/Debian/unstable/smb.conf b/packaging/Debian/unstable/smb.conf deleted file mode 100644 index 14cc20f49c4..00000000000 --- a/packaging/Debian/unstable/smb.conf +++ /dev/null @@ -1,147 +0,0 @@ -; -; /etc/samba/smb.conf -; -; Sample configuration file for the Samba suite for Debian GNU/Linux -; -; Please see the manual page for smb.conf for detailed description of -; every parameter. -; - -[global] - printing = bsd - printcap name = /etc/printcap - load printers = yes - guest account = nobody - invalid users = root - -; "security = user" is always a good idea. This will require a Unix account -; in this server for every user accessing the server. - security = user - -; Change this for the workgroup your Samba server will part of - workgroup = WORKGROUP - - server string = %h server (Samba %v) - -; If you want Samba to log though syslog only then set the following -; parameter to 'yes'. Please note that logging through syslog in -; Samba is still experimental. - syslog only = no - -; We want Samba to log a minimum amount of information to syslog. Everything -; should go to /var/log/{smb,nmb} instead. If you want to log through -; syslog you should set the following parameter to something higher. - syslog = 0; - -; This socket options really speed up Samba under Linux, according to my -; own tests. - socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 - -; Passwords are encrypted by default. This way the latest Windows 95 and NT -; clients can connect to the Samba server with no problems. - encrypt passwords = yes - -; It's always a good idea to use a WINS server. If you want this server -; to be the WINS server for your network change the following parameter -; to "yes". Otherwise leave it as "no" and specify your WINS server -; below (note: only one Samba server can be the WINS server). -; Read BROWSING.txt for more details. - wins support = no - -; If this server is not the WINS server then specify who is it and uncomment -; next line. -; wins server = 172.16.0.10 - -; Please read BROWSING.txt and set the next four parameters according -; to your network setup. There is no valid default so they are commented -; out. -; os level = 0 -; domain master = no -; local master = no -; preferred master = no - -; What naming service and in what order should we use to resolve host names -; to IP addresses - name resolve order = lmhosts host wins bcast - -; This will prevent nmbd to search for NetBIOS names through DNS. - dns proxy = no - -; Name mangling options - - preserve case = yes - short preserve case = yes - -; This boolean parameter controlls whether Samba attempts to sync. the Unix -; password with the SMB password when the encrypted SMB password in the -; /etc/samba/smbpasswd file is changed. - unix password sync = false - -; For Unix password sync. to work on a Debian GNU/Linux system, the following -; parameters must be set (thanks to Augustin Luton -; for sending the correct chat script for -; the passwd program in Debian Potato). - passwd program = /usr/bin/passwd %u - passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . - -; The following parameter is useful only if you have the linpopup package -; installed. The samba maintainer and the linpopup maintainer are -; working to ease installation and configuration of linpopup and samba. -; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & - -; The default maximum log file size is 5 MBytes. That's too big so this -; next parameter sets it to 1 MByte. Currently, Samba rotates log -; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes. -; A better solution would be to have Samba rotate the log file upon -; reception of a signal, but for now on, we have to live with this. - max log size = 1000 - - obey pam restrictions = yes - -[homes] - comment = Home Directories - browseable = no - -; By default, the home directories are exported read only. Change next -; parameter to "no" if you want to be able to write to them. - read only = yes - -; File creation mask is set to 0700 for security reasons. If you want to -; create files with group=rw permissions, set next parameter to 0775. - create mask = 0700 - -; Directory creation mask is set to 0700 for security reasons. If you want to -; create dirs. with group=rw permissions, set next parameter to 0775. - directory mask = 0700 - -[printers] - comment = All Printers - browseable = no - path = /tmp - printable = yes - public = no - writable = no - create mode = 0700 - -; A sample share for sharing your CD-ROM with others. -;[cdrom] -; comment = Samba server's CD-ROM -; writable = no -; locking = no -; path = /cdrom -; public = yes -; -; The next two parameters show how to auto-mount a CD-ROM when the -; cdrom share is accesed. For this to work /etc/fstab must contain -; an entry like this: -; -; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 -; -; The CD-ROM gets unmounted automatically after the connection to the -; -; If you don't want to use auto-mounting/unmounting make sure the CD -; is mounted on /cdrom -; -; preexec = /bin/mount /cdrom -; postexec = /bin/umount /cdrom - diff --git a/packaging/Debian/unstable/smbclient.files b/packaging/Debian/unstable/smbclient.files deleted file mode 100644 index f6ea8e14598..00000000000 --- a/packaging/Debian/unstable/smbclient.files +++ /dev/null @@ -1,9 +0,0 @@ -usr/bin/smbclient -usr/bin/smbtar -usr/bin/rpcclient -usr/bin/smbtorture -usr/bin/smbspool -usr/share/man/man1/smbclient.1 -usr/share/man/man1/smbtar.1 -usr/share/man/man8/smbspool.8 -usr/lib/cups/backend/smb diff --git a/packaging/Debian/unstable/smbfs.files b/packaging/Debian/unstable/smbfs.files deleted file mode 100644 index 77eb091880f..00000000000 --- a/packaging/Debian/unstable/smbfs.files +++ /dev/null @@ -1,8 +0,0 @@ -sbin/mount.smbfs -sbin/mount.smb -usr/bin/smbmount -usr/bin/smbumount -usr/bin/smbmnt -usr/share/man/man8/smbmount.8 -usr/share/man/man8/smbumount.8 -usr/share/man/man8/smbmnt.8 diff --git a/packaging/Debian/unstable/smbfs.suid b/packaging/Debian/unstable/smbfs.suid deleted file mode 100644 index 9569087fff3..00000000000 --- a/packaging/Debian/unstable/smbfs.suid +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin/smbmnt -usr/bin/smbmount-2.2.x -usr/bin/smbumount-2.2.x -usr/bin/smbmount-2.0.x -usr/bin/smbumount-2.0.x diff --git a/packaging/Debian/unstable/smbwrapper.dirs b/packaging/Debian/unstable/smbwrapper.dirs deleted file mode 100644 index fd727bddf05..00000000000 --- a/packaging/Debian/unstable/smbwrapper.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/share/samba diff --git a/packaging/Debian/unstable/smbwrapper.docs b/packaging/Debian/unstable/smbwrapper.docs deleted file mode 100644 index 2924e78734a..00000000000 --- a/packaging/Debian/unstable/smbwrapper.docs +++ /dev/null @@ -1,2 +0,0 @@ -source/smbwrapper/README -source/smbwrapper/PORTING diff --git a/packaging/Debian/unstable/smbwrapper.files b/packaging/Debian/unstable/smbwrapper.files deleted file mode 100644 index 08edbead6e6..00000000000 --- a/packaging/Debian/unstable/smbwrapper.files +++ /dev/null @@ -1 +0,0 @@ -usr/bin/smbsh diff --git a/packaging/Debian/unstable/smbwrapper.substvars b/packaging/Debian/unstable/smbwrapper.substvars deleted file mode 100644 index 2089e515d1b..00000000000 --- a/packaging/Debian/unstable/smbwrapper.substvars +++ /dev/null @@ -1 +0,0 @@ -shlibs:Depends=libc6 (>= 2.1) diff --git a/packaging/Debian/unstable/swat.dirs b/packaging/Debian/unstable/swat.dirs deleted file mode 100644 index d5df7df4b8e..00000000000 --- a/packaging/Debian/unstable/swat.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin -usr/share/samba/swat diff --git a/packaging/Debian/unstable/swat.docs b/packaging/Debian/unstable/swat.docs deleted file mode 100644 index afbfcf0c612..00000000000 --- a/packaging/Debian/unstable/swat.docs +++ /dev/null @@ -1 +0,0 @@ -swat/README diff --git a/packaging/Debian/unstable/swat.files b/packaging/Debian/unstable/swat.files deleted file mode 100644 index 6fed39111be..00000000000 --- a/packaging/Debian/unstable/swat.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin/swat -usr/share/man/man8/swat.8 diff --git a/packaging/Debian/unstable/swat.postinst b/packaging/Debian/unstable/swat.postinst deleted file mode 100644 index c5ab4890441..00000000000 --- a/packaging/Debian/unstable/swat.postinst +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -case "$1" in - configure) - ;; - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - *) - echo "$0: Unknown action \"$1\"" - exit 0 - ;; -esac - -# Set up swat, turned off by default. -update-inetd --group OTHER --add \ - '## swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' - -if [ -d /usr/doc -a ! -e /usr/doc/swat -a -d /usr/share/doc/swat ]; then - ln -sf ../share/doc/swat /usr/doc/swat -fi diff --git a/packaging/Debian/unstable/swat.postrm b/packaging/Debian/unstable/swat.postrm deleted file mode 100644 index e203d2855ff..00000000000 --- a/packaging/Debian/unstable/swat.postrm +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -case "$1" in - purge) - update-inetd --remove '/usr/sbin/swat$' - exit 0 - ;; - remove) - ;; - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - *) - echo "$0: unknown action \"$1\"" - exit 0 - ;; -esac - -exit 0 - diff --git a/packaging/Debian/unstable/wins2dns.awk b/packaging/Debian/unstable/wins2dns.awk deleted file mode 100644 index 176868a115d..00000000000 --- a/packaging/Debian/unstable/wins2dns.awk +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/awk -f -# -# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) -# From: Jason Gunthorpe -# To: samba@packages.debian.org -# Subject: Nifty samba script -# -# Here is a really nifty script I just wrote for samba, it takes the wins -# database in /var/samba/wins and writes out two dns files for it. In this -# way network wide wins clients can get into the dns for use by unix -# machines. -# -# Perhaps this could be included in /usr/doc/examples or somesuch. -# - -BEGIN { - FS="#|\""; -FORWARD="/tmp/wins.hosts" -REVERSE="/tmp/wins.rev" -DOMAIN="ven.ra.rockwell.com" -} -$3 == "00" { - split($4,a," " ); - split(a[2],b,"."); - while (sub(" ","-",$2)); - $2=tolower($2); - if (b[1] == "255") - next; - if (length($2) >= 8) - print $2"\ta\t"a[2] > FORWARD - else - print $2"\t\ta\t"a[2] > FORWARD - print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE -} -END { - system("echo killall -HUP named"); -} - -- cgit From 81777993f2f22452dc29e28cec5db51a098b181a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 19:32:54 +0000 Subject: Ensure winbindd is built for HPUX11, fix some SGI compiler warnings, fix the UNIX link path. Jeremy. --- source/configure | 20 ++++++++++---------- source/configure.in | 2 +- source/nsswitch/winbindd_group.c | 3 +-- source/smbd/reply.c | 4 +--- source/smbd/trans2.c | 14 +++++++++----- source/smbd/vfs-wrap.c | 2 +- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/source/configure b/source/configure index aea495dfeb4..52dc6ebc8c8 100755 --- a/source/configure +++ b/source/configure @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -12936,7 +12936,7 @@ echo "configure:12935: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*) + *linux*|*solaris*|*irix*|*hpux11*) HAVE_WINBIND=yes ;; *) diff --git a/source/configure.in b/source/configure.in index fe53556cef3..504989344cb 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2570,7 +2570,7 @@ AC_MSG_CHECKING(whether to build winbind) # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*) + *linux*|*solaris*|*irix*|*hpux11*) HAVE_WINBIND=yes ;; *) diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index ac5534780b7..ad1abfc1f61 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -581,7 +581,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) struct getent_state *ent; struct winbindd_gr *group_list = NULL; int num_groups, group_list_ndx = 0, i, gr_mem_list_len = 0; - char *sep, *new_extra_data, *gr_mem_list = NULL; + char *new_extra_data, *gr_mem_list = NULL; DEBUG(3, ("[%5d]: getgrent\n", state->pid)); @@ -599,7 +599,6 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) state->response.data.num_entries = 0; group_list = (struct winbindd_gr *)state->response.extra_data; - sep = lp_winbind_separator(); if (!(ent = state->getgrent_state)) return WINBINDD_ERROR; diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 0d89adf25b6..ae8d4b0ad47 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -603,8 +603,6 @@ static BOOL check_server_security(char *orig_user, char *domain, char *unix_user smb_ntpasswd, smb_ntpasslen); if(ret) { - struct passwd *pwd = NULL; - /* * User validated ok against Domain controller. * If the admin wants us to try and create a UNIX @@ -614,7 +612,7 @@ static BOOL check_server_security(char *orig_user, char *domain, char *unix_user * due to a bad password, or the user really doesn't exist. */ - if(lp_adduser_script() && !(pwd = smb_getpwnam(unix_user,True))) + if(lp_adduser_script() && !smb_getpwnam(unix_user,True)) smb_create_user(unix_user, NULL); } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 4c34603bff5..b90f7537ca1 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2188,6 +2188,7 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in #endif fstring last_component; pstring link_dest; + pstring link_test; char *p; BOOL bad_path = False; SMB_STRUCT_STAT sbuf; @@ -2195,6 +2196,9 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in pstrcpy(link_dest, link_dest_in); unix_convert(link_dest,conn,0,&bad_path,&sbuf); + /* Store the UNIX converted path. */ + pstrcpy(link_dest_out, link_dest); + p = strrchr(link_dest, '/'); if (p) { fstrcpy(last_component, p+1); @@ -2213,18 +2217,18 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in if (*link_dest != '/') { /* Relative path. */ - pstrcpy(link_dest_out, conn->connectpath); - pstrcat(link_dest_out, "/"); - pstrcat(link_dest_out, link_dest); + pstrcpy(link_test, conn->connectpath); + pstrcat(link_test, "/"); + pstrcat(link_test, link_dest); } else { - pstrcpy(link_dest_out, link_dest); + pstrcpy(link_test, link_dest); } /* * Check if the link is within the share. */ - if (strncmp(conn->connectpath, link_dest_out, strlen(conn->connectpath))) { + if (strncmp(conn->connectpath, link_test, strlen(conn->connectpath))) { errno = EACCES; return -1; } diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 7d84e8756eb..1fa9e72fcc3 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -570,7 +570,7 @@ static int strict_allocate_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) SMB_STRUCT_STAT st; SMB_OFF_T currpos = vfs_ops->lseek(fsp, fd, 0, SEEK_CUR); unsigned char zero_space[4096]; - SMB_OFF_T space_to_write = len - st.st_size; + SMB_OFF_T space_to_write; if (currpos == -1) return -1; -- cgit From c9bd70029c9fa10d39c0af18f6aab1593b8564bf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 20:42:20 +0000 Subject: Marge. Jeremy. --- packaging/Debian/unstable/README.build | 397 ++++++ packaging/Debian/unstable/README.debian | 67 + packaging/Debian/unstable/TODO | 4 + packaging/Debian/unstable/changelog | 1418 ++++++++++++++++++++ packaging/Debian/unstable/config.cache | 231 ++++ packaging/Debian/unstable/config.cache.alpha-linux | 12 + packaging/Debian/unstable/config.cache.sparc-linux | 13 + packaging/Debian/unstable/control | 121 ++ packaging/Debian/unstable/control.smbwrapper | 111 ++ packaging/Debian/unstable/copyright | 36 + packaging/Debian/unstable/cron.daily | 16 + packaging/Debian/unstable/docs | 3 + packaging/Debian/unstable/init.d | 94 ++ packaging/Debian/unstable/libpam-smbpass.files | 1 + packaging/Debian/unstable/mksmbpasswd.8 | 28 + packaging/Debian/unstable/mksmbpasswd.awk | 5 + packaging/Debian/unstable/rules | 229 ++++ packaging/Debian/unstable/rules.old | 194 +++ packaging/Debian/unstable/rules.smbwrapper | 172 +++ packaging/Debian/unstable/samba-common.conffiles | 2 + packaging/Debian/unstable/samba-common.files | 7 + packaging/Debian/unstable/samba-common.postrm | 6 + packaging/Debian/unstable/samba-doc.docs | 9 + packaging/Debian/unstable/samba-doc.examples | 3 + packaging/Debian/unstable/samba.conffiles | 2 + packaging/Debian/unstable/samba.dirs | 11 + packaging/Debian/unstable/samba.logrotate | 15 + packaging/Debian/unstable/samba.pamd | 5 + packaging/Debian/unstable/samba.postinst | 218 +++ packaging/Debian/unstable/samba.postrm | 26 + packaging/Debian/unstable/samba.preinst | 47 + packaging/Debian/unstable/samba.prerm | 74 + packaging/Debian/unstable/sambaconfig | 130 ++ packaging/Debian/unstable/sambaconfig.8 | 40 + packaging/Debian/unstable/smb.conf | 147 ++ packaging/Debian/unstable/smbclient.files | 9 + packaging/Debian/unstable/smbfs.files | 8 + packaging/Debian/unstable/smbfs.suid | 5 + packaging/Debian/unstable/smbwrapper.dirs | 2 + packaging/Debian/unstable/smbwrapper.docs | 2 + packaging/Debian/unstable/smbwrapper.files | 1 + packaging/Debian/unstable/smbwrapper.substvars | 1 + packaging/Debian/unstable/swat.dirs | 2 + packaging/Debian/unstable/swat.docs | 1 + packaging/Debian/unstable/swat.files | 2 + packaging/Debian/unstable/swat.postinst | 23 + packaging/Debian/unstable/swat.postrm | 19 + packaging/Debian/unstable/wins2dns.awk | 38 + 48 files changed, 4007 insertions(+) create mode 100644 packaging/Debian/unstable/README.build create mode 100644 packaging/Debian/unstable/README.debian create mode 100644 packaging/Debian/unstable/TODO create mode 100644 packaging/Debian/unstable/changelog create mode 100644 packaging/Debian/unstable/config.cache create mode 100644 packaging/Debian/unstable/config.cache.alpha-linux create mode 100644 packaging/Debian/unstable/config.cache.sparc-linux create mode 100644 packaging/Debian/unstable/control create mode 100644 packaging/Debian/unstable/control.smbwrapper create mode 100644 packaging/Debian/unstable/copyright create mode 100644 packaging/Debian/unstable/cron.daily create mode 100644 packaging/Debian/unstable/docs create mode 100644 packaging/Debian/unstable/init.d create mode 100644 packaging/Debian/unstable/libpam-smbpass.files create mode 100644 packaging/Debian/unstable/mksmbpasswd.8 create mode 100644 packaging/Debian/unstable/mksmbpasswd.awk create mode 100644 packaging/Debian/unstable/rules create mode 100644 packaging/Debian/unstable/rules.old create mode 100644 packaging/Debian/unstable/rules.smbwrapper create mode 100644 packaging/Debian/unstable/samba-common.conffiles create mode 100644 packaging/Debian/unstable/samba-common.files create mode 100644 packaging/Debian/unstable/samba-common.postrm create mode 100644 packaging/Debian/unstable/samba-doc.docs create mode 100644 packaging/Debian/unstable/samba-doc.examples create mode 100644 packaging/Debian/unstable/samba.conffiles create mode 100644 packaging/Debian/unstable/samba.dirs create mode 100644 packaging/Debian/unstable/samba.logrotate create mode 100644 packaging/Debian/unstable/samba.pamd create mode 100644 packaging/Debian/unstable/samba.postinst create mode 100644 packaging/Debian/unstable/samba.postrm create mode 100644 packaging/Debian/unstable/samba.preinst create mode 100644 packaging/Debian/unstable/samba.prerm create mode 100644 packaging/Debian/unstable/sambaconfig create mode 100644 packaging/Debian/unstable/sambaconfig.8 create mode 100644 packaging/Debian/unstable/smb.conf create mode 100644 packaging/Debian/unstable/smbclient.files create mode 100644 packaging/Debian/unstable/smbfs.files create mode 100644 packaging/Debian/unstable/smbfs.suid create mode 100644 packaging/Debian/unstable/smbwrapper.dirs create mode 100644 packaging/Debian/unstable/smbwrapper.docs create mode 100644 packaging/Debian/unstable/smbwrapper.files create mode 100644 packaging/Debian/unstable/smbwrapper.substvars create mode 100644 packaging/Debian/unstable/swat.dirs create mode 100644 packaging/Debian/unstable/swat.docs create mode 100644 packaging/Debian/unstable/swat.files create mode 100644 packaging/Debian/unstable/swat.postinst create mode 100644 packaging/Debian/unstable/swat.postrm create mode 100644 packaging/Debian/unstable/wins2dns.awk diff --git a/packaging/Debian/unstable/README.build b/packaging/Debian/unstable/README.build new file mode 100644 index 00000000000..0a11a1f6ea6 --- /dev/null +++ b/packaging/Debian/unstable/README.build @@ -0,0 +1,397 @@ +From: Steve Langasek +To: "Eloy A. Paris" +Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) +Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 +In-Reply-To: <20010823100906.A1092@antenas> +Message-ID: +MIME-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII + +On Thu, 23 Aug 2001, Eloy A. Paris wrote: + +> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: + +> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, +> > cache) support into the package. Issues like this are frequent enough with +> > Samba, and the configure tests add enough time to the build process, that I +> > think there'd be much benefit in being able to step past a lot of these. + +> Uhhmmm... I don't know, I guess I don't like much the idea of +> maintaining a config.cache. It looks like extra work plus a +> compilation process that is "synthetic" or atificial. What happens if +> the Samba Team adds a new test, or modifies the configure script, will +> the config.cache pick those up? + +> In any case, you are the expert, so if you think that's the way to go, +> and the burden far exceeds the problems we have right now I say let's +> go for it. I am not well versed on autoconf and the configure process, +> that's all... + +Well, I'll attach my work to the bottom of this message and let you judge it +for yourself. + +The config.cache I'm trying to generate here is not equivalent to what +a configure script outputs. The only values I'm including are those which 1) +are no-brainers on any glibc-based platform, 2) are questions we need to force +a particular value for regardless of the kernel being built against, or 3) are +questions about specific bizarre features of proprietary Unices that we'll +always get an answer of 'no' to. + +I've removed all of the config.cache variables related to headers, or to +checks for particular libraries; I think it's pretty safe to assert that glibc +provides basic C functions like select(), setenv(), and waitpid() on all our +build targets, but I think it's less safe to assert that they'll always be +provided by particular header files. + +So the config.cache won't automatically be updated with answers to new +configure tests, but it also doesn't need to in order to be useful. There's +really only a handful of variables in there that we /need/ in order to +guarantee correctly-built packages, and if you want to leave out everything +else, that's perfectly ok too. Everything from the fifth stanza on down is +just a build-time speed-up for some of the slower architectures. Well, it +also has the fringe benefit that the packages will FAIL to build if someone +tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I +see that as a plus :), you may disagree, but in any case my next trick would +be to add a global variable developers can set to bypass the provided +config.cache. + + +It is a little artificial, but the whole point of .debs is to be able to build +binaries in a controlled environment. Right now, we don't really have control +over what happens in the autobuilders. We have even /less/ control over what +happens in a stable release: it's been two weeks now since I built binaries +for bug #94380, and they haven't been uploaded to security.d.o yet. I'm +guessing they won't be uploaded until Wichert is back from vacation, either -- +which is fine, but it would be nice if we didn't have to worry about +mis-builds by the security team, or about putting the security team to extra +trouble after the fact to get packages fixed. + +With a pre-loaded config.cache, we can ensure that bugs of this kind don't +happen in woody. We can take the arm autobuilder problem into our own hands, +and not have to worry about quirkiness in the build environment. We can even +close bug #109773, since we no longer have to worry about detecting the +setuid() routines. + + +So to me, it definitely seems worth it. But you're the maintainer, and I +won't ask you to put anything in the package that you're not comfortable with. + + +> By the way, I think I remember someone was able to build 2.2.x succesfully on +> the ARM. If this is the case, could it be that there's something weird +> with Phillip's setup? + +It could be. There are arm packages for 2.2.1a-1, so at /some/ point the +autobuilder was able to pass the locking test. + + +> P.S. How did you know about the ARM build problems? I don't see any +> bugs about this... + +, follow the links for samba... The +exact reference for the arm autobuilder is at +. + +Regards, +Steve Langasek +postmodern programmer + + +diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog +--- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 +@@ -1,3 +1,12 @@ ++samba (2.2.1a-4.1) unstable; urgency=low ++ ++ * Fix up the build system to avoid needing to run configure as root to ++ answer questions we already know the answers to. ++ * In the process, make surprising progress towards being able to ++ cross-compile the samba packages. ++ ++ -- Steve Langasek Wed, 22 Aug 2001 23:35:00 -0500 ++ + samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. +diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache +--- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,231 @@ ++# ++# 22 August 2001 Steve Langasek ++# ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++# ++# This config.cache file contains a list of acceptable autoconf ++# values which can be used in compiling Samba for Debian woody/sid. ++# ++# Autoconf sorts options alphabetically in its output. This file ++# groups options logically. ++ ++ ++# Load any architecture-specific settings ++if [ -n "$DEB_HOST_GNU_TYPE" \ ++ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then ++ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} ++fi ++ ++ ++# This is at the top because it's most in need of regular tweaking. ++# These are options which are supported on 2.4 kernels, but not on 2.2 ++# kernels. ++ ++samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} ++samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} ++samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} ++ ++ ++# These are present in 2.2 kernels, but not in 2.0... ++ ++samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} ++samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} ++ ++ ++# POSIX ACL support not present in Linux 2.2; not allowed in the ++# Debian packages, even if present on the build machine. ++ ++ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} ++ ++ ++# Various basic libc/compiler stuff that it's blindingly obvious that ++# Linux supports (now watch me get bitten for saying that) ++ ++ac_cv_c_const=${ac_cv_c_const=yes} ++ac_cv_c_inline=${ac_cv_c_inline=inline} ++samba_cv_volatile=${samba_cv_volatile=yes} ++ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} ++ac_cv_func_bzero=${ac_cv_func_bzero=yes} ++ac_cv_func_chmod=${ac_cv_func_chmod=yes} ++ac_cv_func_chown=${ac_cv_func_chown=yes} ++ac_cv_func_chroot=${ac_cv_func_chroot=yes} ++ac_cv_func_connect=${ac_cv_func_connect=yes} ++ac_cv_func_dup2=${ac_cv_func_dup2=yes} ++ac_cv_func_execl=${ac_cv_func_execl=yes} ++ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} ++ac_cv_func_fchown=${ac_cv_func_fchown=yes} ++ac_cv_func_fstat=${ac_cv_func_fstat=yes} ++ac_cv_func_fsync=${ac_cv_func_fsync=yes} ++ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} ++ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} ++ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} ++ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} ++ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} ++ac_cv_func_glob=${ac_cv_func_glob=yes} ++ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} ++ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} ++ac_cv_func_llseek=${ac_cv_func_llseek=yes} ++ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} ++ac_cv_func_memmove=${ac_cv_func_memmove=yes} ++ac_cv_func_memset=${ac_cv_func_memset=yes} ++ac_cv_func_mktime=${ac_cv_func_mktime=yes} ++ac_cv_func_pipe=${ac_cv_func_pipe=yes} ++ac_cv_func_poll=${ac_cv_func_poll=yes} ++ac_cv_func_pread=${ac_cv_func_pread=yes} ++ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} ++ac_cv_func_rand=${ac_cv_func_rand=yes} ++ac_cv_func_random=${ac_cv_func_random=yes} ++ac_cv_func_readlink=${ac_cv_func_readlink=yes} ++ac_cv_func_rename=${ac_cv_func_rename=yes} ++ac_cv_func_select=${ac_cv_func_select=yes} ++ac_cv_func_setenv=${ac_cv_func_setenv=yes} ++ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} ++ac_cv_func_setsid=${ac_cv_func_setsid=yes} ++ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} ++ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} ++ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} ++ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} ++ac_cv_func_srand=${ac_cv_func_srand=yes} ++ac_cv_func_srandom=${ac_cv_func_srandom=yes} ++ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} ++ac_cv_func_strchr=${ac_cv_func_strchr=yes} ++ac_cv_func_strdup=${ac_cv_func_strdup=yes} ++ac_cv_func_strerror=${ac_cv_func_strerror=yes} ++ac_cv_func_strftime=${ac_cv_func_strftime=yes} ++ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} ++ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} ++ac_cv_func_symlink=${ac_cv_func_symlink=yes} ++ac_cv_func_usleep=${ac_cv_func_usleep=yes} ++ac_cv_func_utime=${ac_cv_func_utime=yes} ++ac_cv_func_utimes=${ac_cv_func_utimes=yes} ++ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} ++ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} ++ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} ++ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} ++ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} ++ac_cv_type_size_t=${ac_cv_type_size_t=yes} ++ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} ++samba_cv_socklen_t=${samba_cv_socklen_t=yes} ++ ++# Yes, we know Linux supports fcntl locking. Just ignore ++# any errors caused by building on an NFS mount. ++samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} ++ ++ ++# smbwrapper doesn't work because the glibc maintainers don't want ++# to support transparent userland VFS. We might as well preempt ++# any checks for shadowed symbols that are only useful for smbwrapper. ++ ++ac_cv_func___acl=${ac_cv_func___acl=no} ++ac_cv_func__acl=${ac_cv_func__acl=no} ++ac_cv_func___chdir=${ac_cv_func___chdir=no} ++ac_cv_func__chdir=${ac_cv_func__chdir=no} ++ac_cv_func___close=${ac_cv_func___close=no} ++ac_cv_func__close=${ac_cv_func__close=no} ++ac_cv_func___closedir=${ac_cv_func___closedir=no} ++ac_cv_func__closedir=${ac_cv_func__closedir=no} ++ac_cv_func___dup=${ac_cv_func___dup=no} ++ac_cv_func__dup=${ac_cv_func__dup=no} ++ac_cv_func___dup2=${ac_cv_func___dup2=no} ++ac_cv_func__dup2=${ac_cv_func__dup2=no} ++ac_cv_func___facl=${ac_cv_func___facl=no} ++ac_cv_func__facl=${ac_cv_func__facl=no} ++ac_cv_func___fchdir=${ac_cv_func___fchdir=no} ++ac_cv_func__fchdir=${ac_cv_func__fchdir=no} ++ac_cv_func___fcntl=${ac_cv_func___fcntl=no} ++ac_cv_func__fcntl=${ac_cv_func__fcntl=no} ++ac_cv_func___fork=${ac_cv_func___fork=no} ++ac_cv_func__fork=${ac_cv_func__fork=no} ++ac_cv_func___fstat=${ac_cv_func___fstat=no} ++ac_cv_func__fstat=${ac_cv_func__fstat=no} ++ac_cv_func___fstat64=${ac_cv_func___fstat64=no} ++ac_cv_func__fstat64=${ac_cv_func__fstat64=no} ++ac_cv_func___fxstat=${ac_cv_func___fxstat=no} ++ac_cv_func___getcwd=${ac_cv_func___getcwd=no} ++ac_cv_func__getcwd=${ac_cv_func__getcwd=no} ++ac_cv_func___getdents=${ac_cv_func___getdents=no} ++ac_cv_func__getdents=${ac_cv_func__getdents=no} ++ac_cv_func___llseek=${ac_cv_func___llseek=no} ++ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} ++ac_cv_func__llseek=${ac_cv_func__llseek=no} ++ac_cv_func___lseek=${ac_cv_func___lseek=no} ++ac_cv_func__lseek=${ac_cv_func__lseek=no} ++ac_cv_func___lstat=${ac_cv_func___lstat=no} ++ac_cv_func__lstat=${ac_cv_func__lstat=no} ++ac_cv_func___lstat64=${ac_cv_func___lstat64=no} ++ac_cv_func__lstat64=${ac_cv_func__lstat64=no} ++ac_cv_func___lxstat=${ac_cv_func___lxstat=no} ++ac_cv_func___open=${ac_cv_func___open=no} ++ac_cv_func__open=${ac_cv_func__open=no} ++ac_cv_func___open64=${ac_cv_func___open64=no} ++ac_cv_func__open64=${ac_cv_func__open64=no} ++ac_cv_func___opendir=${ac_cv_func___opendir=no} ++ac_cv_func__opendir=${ac_cv_func__opendir=no} ++ac_cv_func___pread=${ac_cv_func___pread=no} ++ac_cv_func__pread=${ac_cv_func__pread=no} ++ac_cv_func___pread64=${ac_cv_func___pread64=no} ++ac_cv_func__pread64=${ac_cv_func__pread64=no} ++ac_cv_func___pwrite=${ac_cv_func___pwrite=no} ++ac_cv_func__pwrite=${ac_cv_func__pwrite=no} ++ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} ++ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} ++ac_cv_func___read=${ac_cv_func___read=no} ++ac_cv_func__read=${ac_cv_func__read=no} ++ac_cv_func___readdir=${ac_cv_func___readdir=no} ++ac_cv_func__readdir=${ac_cv_func__readdir=no} ++ac_cv_func___readdir64=${ac_cv_func___readdir64=no} ++ac_cv_func__readdir64=${ac_cv_func__readdir64=no} ++ac_cv_func___seekdir=${ac_cv_func___seekdir=no} ++ac_cv_func__seekdir=${ac_cv_func__seekdir=no} ++ac_cv_func___stat=${ac_cv_func___stat=no} ++ac_cv_func__stat=${ac_cv_func__stat=no} ++ac_cv_func___stat64=${ac_cv_func___stat64=no} ++ac_cv_func__stat64=${ac_cv_func__stat64=no} ++ac_cv_func___telldir=${ac_cv_func___telldir=no} ++ac_cv_func__telldir=${ac_cv_func__telldir=no} ++ac_cv_func___write=${ac_cv_func___write=no} ++ac_cv_func__write=${ac_cv_func__write=no} ++ac_cv_func___xstat=${ac_cv_func___xstat=no} ++ ++ ++ ++# Miscellaneous stuff that isn't, and shouldn't be, available ++# in Debian. Those interested in building debs for other systems may ++# need to remove some of these defines. ++ ++ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} ++ac_cv_func_crypt16=${ac_cv_func_crypt16=no} ++ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} ++ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} ++ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} ++ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} ++ac_cv_func_rdchk=${ac_cv_func_rdchk=no} ++ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} ++ac_cv_func_setgidx=${ac_cv_func_setgidx=no} ++ac_cv_func_setluid=${ac_cv_func_setluid=no} ++ac_cv_func_setpriv=${ac_cv_func_setpriv=no} ++ac_cv_func_setuidx=${ac_cv_func_setuidx=no} ++ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} ++ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} ++ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} ++ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} ++ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} ++ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} ++ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} ++ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} ++ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} ++ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} +diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux +--- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,12 @@ ++# 22 Aug 2001 Steve Langasek ++ ++# This file contains autoconf settings specific to the alpha-linux ++# platform that should be preloaded when building for this architecture. ++ ++ ++# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but ++# Linux 2.4 does. Ensure that packages compiled for woody remain ++# compatible with 2.2 kernels, even if the build machine is running 2.4. ++samba_cv_have_setresgid=${samba_cv_have_setresgid=no} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} ++samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules +--- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 +@@ -15,6 +15,14 @@ + # This has to be exported to make some magic below work. + export DH_OPTIONS + ++# Set the host and build architectures for use with config.cache loading, ++# cross-building, etc. ++DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++export DEB_HOST_GNU_TYPE ++export DEB_BUILD_GNU_TYPE ++ + BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + + DESTDIR=`pwd`/debian/samba +@@ -48,8 +56,11 @@ + # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ + # --localstatedir=/var + ++ if [ -f debian/config.cache ]; then \ ++ cp -f debian/config.cache source/config.cache; \ ++ fi + # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) +- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) ++ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) + + touch configure-stamp + diff --git a/packaging/Debian/unstable/README.debian b/packaging/Debian/unstable/README.debian new file mode 100644 index 00000000000..b57e034ced9 --- /dev/null +++ b/packaging/Debian/unstable/README.debian @@ -0,0 +1,67 @@ +samba for DEBIAN +---------------- + +This package was built by me (Eloy Paris ) based on work +from Bruce Perens , Andrew Howell , +Klee Dienes and Michael Meskes , +all previous maintainers of the packages samba and sambades (now merged +together - see below). + +Password encryption is now supported in the standard samba package +(>= 1.9.18alpha12-1). This has been possible because Samba 1.9.18 +and later does not depend on the DES encryption libraries. This makes +package sambades (part of the non-us section) obsolete. + +Also, there are no more export restrictions with this version of Samba. + +As of Samba 2.0.6-1, the Debian version of Samba is compiled with +Pluggable Authentication Modules (PAM) support. PAM support was +discontinued during the libc5 -> libc6 migration process and I never +brought it back until 2.0.6-1. I don't use PAM myself so let me know +if you find any problems. + +Since Samba 2.0.5a-3, the smbfs utilities included in the smbfs package +can now handle kernels > 2.0.x so there is no need to have two smbfs +packages. + +As of Samba 2.0.5a-5, the Samba sources produce the following binary packages: + +samba: A LanManager like file and printer server for Unix. +samba-common: Samba common files used by both the server and the client. +smbclient: A LanManager like simple client for Unix. +swat: Samba Web Administration Tool +samba-doc: Samba documentation. +smbfs: Mount and umount commands for the smbfs (works with 2.2.x and + above kernels, not with 2.0.x kernels.) + +Please note that the package smbwrapper (a shared library that provides +SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 +does not exist any more. The reason is that starting with Samba 2.0.6-1, that +code does not even compile, and the upstream author (Andrew Tridgell) +recommended to disable the compilation of smbwrapper until some issues +with glibc2.1 get cleared out (the problem is with glibc, not with Samba +itself). + +Support for NT Domains +---------------------- + +Samba 2.2 includes preliminary support for NT domains. A Samba server +can now be part of a Windows NT domain whose Primary Domain Controller +is a Windows NT server. This feature is supposed to be stable although I +haven't tried it myself. Read the documentation in the samba-doc package +for help on how to do this (hint: "security = domain" in the smb.conf +file). + +Samba 2.2 has also experimental support for Primary Domain +Controller. This means that a Samba server can act now as a PDC. There +are no special flags needed to compile Samba with NT domain PDC +support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation +section). + +Please note that NT domain PDC support is far from complete and is still +experimental. + +Your comments are welcome. + + +Eloy A. Paris , Sunday March 18, 2001. diff --git a/packaging/Debian/unstable/TODO b/packaging/Debian/unstable/TODO new file mode 100644 index 00000000000..748f1edcd15 --- /dev/null +++ b/packaging/Debian/unstable/TODO @@ -0,0 +1,4 @@ +* Check in the smbmount wrapper script that the kernel has support +for smbfs, as suggested by Jeroen Schaap +. + diff --git a/packaging/Debian/unstable/changelog b/packaging/Debian/unstable/changelog new file mode 100644 index 00000000000..a26c219600c --- /dev/null +++ b/packaging/Debian/unstable/changelog @@ -0,0 +1,1418 @@ +samba (2.2.1a.cvs20011002-1) experimental; urgency=low + + * Building from CVS sources. This code will become Samba 2.2.2 RSN. + * Temporary fix for #113763 (Steve Langasek) + + -- Eloy A. Paris Thu, 4 Oct 2001 00:02:08 -0400 + +samba (2.2.1a-9.1) unstable; urgency=low + + * Quick hack to avoid smbmount reveal password length. Please note + that even with this hack there is a small window when password is + completely visible with 'ps aux'. There are other methods that should + be used to automate mounting of SMB shares. + Closes: #112195: smbmount-2.2.x reveals password length. + * Applied patch from Steve Langasek to prevent + forcing use of setresuid() in Sparc. + Closes: #112779: samba build forces use of setresuid, which causes + smbd to fail on Sparc. + + -- Eloy A. Paris Mon, 24 Sep 2001 19:52:07 -0400 + +samba (2.2.1a-9) unstable; urgency=low + + * Replaced $(LD) with $(CC) all the way through source/Makefile. + Closes: #111036: ld shouldn't be used to link shlibs. + * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and + sgml as well.) + Closes: #110963: smb.conf: mail should be /usr/bin/mail. + * Documented better smbclient's -W behavior. Patch from Steve + Langasek. + Closes: #53672: smbclient: -W flag is interpreted as domain, not + workgroup. + + -- Eloy A. Paris Tue, 4 Sep 2001 23:10:41 -0400 + +samba (2.2.1a-8) unstable; urgency=low + + * Set some reasonable default perms for the samba logdir (again, + thanks to vorlon :-) + Closes: #72529: insecure permissions on log files. + + -- Eloy A. Paris Sun, 26 Aug 2001 15:40:47 -0400 + +samba (2.2.1a-7) unstable; urgency=low + + * Another attempt at fixing #47493. Patch from Steve Langasek + . Let's keep our fingers crossed Steve! + + -- Eloy A. Paris Sun, 26 Aug 2001 13:37:06 -0400 + +samba (2.2.1a-6) unstable; urgency=low + + * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing + smbd to die with signal 11 under some unidentified situations. + Closes: #109774: Latest debian version breaks printer driver download. + Closes: #109946: not all files appear in samba-exported directories. + * Another patch from Steve Langasek. This one adds quotes around + printer names for print systems it's reasonable for Debian to + support. Together with the patch in #29957 (see changelog for + 2.2.1a-4), this should take care of the problems with multi-word + printer names in Samba. + + -- Eloy A. Paris Fri, 24 Aug 2001 21:12:27 -0400 + +samba (2.2.1a-5) unstable; urgency=low + + * Important changes that affect how Samba is built on Debian + machines are implemented in this release. All of this changes + were suggested by the energetic Steve Langasek , + and his arguments were so sound and reasonable that I decided + to implement them. Here's Steve's original changelog: + + * Fix up the build system to avoid needing to run configure + as root to answer questions we already know the answers to. + * In the process, make surprising progress towards being able to + cross-compile the samba packages. + + -- Eloy A. Paris Fri, 24 Aug 2001 01:08:06 -0400 + +samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. + Closes: #109317: smbfs: mistype in smbmount manpage. + * Included symlink to smbspool to better support CUPS printing. + Closes: #109509: include symlink for cups samba support. + * Applied patch from Steve Langasek to + fix bug #29957. + Closes: #29957: samba strips trailing " from strings in smb.conf. + * First attempt at fixing #47493. Another patch from Steve "I want + a bug-free Samba" Langasek. + Closes: #47493: Samba doesn't handle ':' in dir names right. + + -- Eloy A. Paris Tue, 21 Aug 2001 23:26:38 -0400 + +samba (2.2.1a-3) unstable; urgency=low + + * Steve Langasek has been hard at work in + the last few days looking at the long list of open bugs filed + against the Samba packages. I don't know how to thank him. It's been + a pleasure working with Steve, and all the fixes, patches, etc. in + this release come from him. The bug list is greatly reduced thanks + to Steve's efforts. + * Steve's additions/modifications/patches/etc. are: + - New package that (libpam-smbpass) provides pam_smbpass. Before, this + was provided in another package but now the sources are part of + the Samba sources so we can start providing it from here. + Closes: #107043 - pam_smbpass now present in Samba source, + should be built from there + - Patch to source/smbd/service.c that allows admins to call + /bin/umount from the root postexec of a Samba share. + Closes: #40561 - samba pre/postexec commands do not work. + - Clear TMPDIR before starting smbd in /etc/init.d/samba. + Closes: #51295 - Problems with Samba and TMPDIR. + - Correction to documentation of "guest only". + Closes #38282 - "guest only" share still requires a password. + * Applied patch from Santiago Vila to convert + /usr/sbin/mksmbpasswd from a shell script into a real awk script. + Sorry it took so long, Santiago; I hadn't realized you even + provided a patch :-) + Closes: #77891 - mksmbpasswd could be a real awk script. + * Updated description of the smbfs and smbclient packages. Also have + each package recommend the other. + Closes: #108650: Should suggest or recommend smbfs. + + -- Eloy A. Paris Mon, 13 Aug 2001 22:21:55 -0400 + +samba (2.2.1a-2) unstable; urgency=low + + * Build-depends: depend on debhelper (>=2.0.103). + Closes: #105795: Build-Depends are wrong. + * Run samba's preinst and postinst scripts without -e so failed commands + do not abort installation. + Closes: #106384: postinstall crashes abnormally. (And really closes + #104471.) + + -- Eloy A. Paris Thu, 26 Jul 2001 00:30:37 -0400 + +samba (2.2.1a-1) unstable; urgency=low + + * New upstream version. + * Make sure samba's postinst script exits with a zero status. + Closes: #104471: Samba postinst problem. + + -- Eloy A. Paris Thu, 12 Jul 2001 21:55:21 -0400 + +samba (2.2.1-1) unstable; urgency=low + + * New upstream version. + Closes: #103339: config.guess and config.sub update required. + Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to + incompatibility with PAM. + Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. + Closes: #95777: Samba 2.2 is unable to join or authenticate against + Samba 2.2 PDC domain. + Closes: #68842: samba should use PAM for password changing (I + haven't personally tried this one, but it's been + advertised this works.) + Closes: #102506: PAM account checking fails. + Closes: #102518: Complains about unknown paramter "obey pam + restrictions" + Closes: #94774: Build failure on PARISC machines. + * Moved away from /etc/cron.weekly/samba for log file rotation. + Now using logrotate. + Closes: #95548: typo in /etc/cron.weekly/samba. + Closes: #74951: nmbd does not rename its log file. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris Wed, 11 Jul 2001 00:44:14 -0400 + +samba (2.2.0.final.a-1) unstable; urgency=high + + * New upstream version (contains security fix from DSA-065-1.) + Closes: #97241: samba 2.2.0 fails to process hostnames in + "hosts allow" config line. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris Sun, 24 Jun 2001 11:11:59 -0400 + +samba (2.2.0.final-2) unstable; urgency=low + + * Added libcupsys2-dev to Build-Depends. + * Samba depends now (again) on netbase so update-inetd is always + available for the Samba maintainer scripts. + Closes: #86063: Fails to uninstall if inetd is not installed. + * Updated source/config.{sub,guess} so ARM built doesn't fail. + Closes: #94480: config.sub out of date; can't build on arm. + Closes: #85801: config.sub/guess out of date. + * Not using brace expansion, i.e. {foo,bar} in any of the maintainers + scripts nor in debian/rules. + Closes: #88007: samba postrm has is not POSIX sh compliant. + + -- Eloy A. Paris Sat, 21 Apr 2001 17:27:18 -0400 + +samba (2.2.0.final-1) unstable; urgency=low + + * New upstream release. Lots of new things. See WHATSNEW.txt. + * Goofy version number because of my stupidity when assigning version + numbers to the CVS packages I have been uploading to experimental. + Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release + will follow soon. + + -- Eloy A. Paris Tue, 17 Apr 2001 22:58:14 -0400 + +samba (2.2.0.cvs20010416-1) experimental; urgency=low + + * CVS update. + + -- Eloy A. Paris Mon, 16 Apr 2001 21:25:15 -0400 + +samba (2.2.0.cvs20010410-1) experimental; urgency=low + + * CVS update. + * Added libreadline4-dev to Build-Depends. + + -- Eloy A. Paris Tue, 10 Apr 2001 16:53:45 -0400 + +samba (2.2.0.cvs20010407-1) experimental; urgency=low + + * CVS update. Includes what is in 2.2.0alpha3. + + -- Eloy A. Paris Sat, 7 Apr 2001 16:00:33 -0400 + +samba (2.2.0.cvs20010316-1) experimental; urgency=low + + * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch + from Samba CVS. + * Not compiling rpctorture as it has compile errors. Change in + debian/rules. + * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now + the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is + needed to use smbfs. Updated debian/control, debian/rules and + README.Debian to reflect this change. + * Added to swat a versioned dependency on samba (so a user is forced to + install a new version of swat each time a new version of samba is + installed.) + + -- Eloy A. Paris Sun, 18 Mar 2001 14:21:14 -0500 + +samba (2.0.7-5) unstable; urgency=medium + + * Transition from suidmanager to dpkg-statoverride. + + -- Eloy A. Paris Thu, 18 Jan 2001 23:51:56 -0500 + +samba (2.0.7-4) unstable; urgency=medium + + * Applied Urban Widmark fixes to smbmount. Urban + is the maintainer of the smbfs in the kernel and of the userland + utilities. + * Links to HTML documents are correct now. + Closes: #69439: swat: Broken help file symlinks + Closes: #72615: samba-doc directory changed: removed htmldocs from path + Closes: #75847: swat: Wrong symlink + Closes: #66857: Wrong links to html documents. + Closes: #77912: misplaced documentation symlinks for swat + * Building Samba with CUPS support. For this I reverted the change to + source/configure.in that I did in 2.0.7-3 and re-ran autoconf. + Closes: #59038: samba: not compiled with cups support. + * Fix against previous known/unknown user time difference patch to swat + (make username / password lookups take the same time.) Remove CGI + logging code in Swat. + Closes: #76341 - Security holes in swat + * Updated Build-depends. + * Updated debian/copyright to refer to the correct location of the GPL. + * debian/rules: changed DESTDIR to `pwd`/debian/samba (was + `pwd`/debian/tmp.) + * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some + strange reason dh_installdirs is not creating debian/tmp/ so I needed + to tweak everything to install stuff in debian/samba rather than in + debian/tmp.) + * debian/control: changed section of samba-docs to 'doc' (was 'docs') + * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules + and source/scripts/installswat.sh.) + * Fixed (by tweaking debian/rules) + /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. + * Added "Provides: samba-client" to smbclient's section in control. + Closes: #71143: smbclient: Smbclient should provide samba-client. + * Fix for desired_access being zero in map_share_mode() (patch to + source/smbd/nttrans.c.) Thanks to Gary Wilson + for bringing this patch to my + attention. + * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and + 2.2.x kernels even when the build is done in a system running + a 2.2.x kernel. + Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but + doesnt depend on it. + Closes: #72758: README.Debian should comment on 2.0.x kernels. + Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. + Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. + Closes: #60580: samba: failed to set gid. + Closes: #64280: Samba panics, can't set gid. + Closes: #66816: Must deal with brokenness under 2.0.x. + Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. + Closes: #69735: PANIC: failed to set gid + Closes: #66122: "smbclient -L localhost -U%" returns with "tree + connect failed: code 0". + Closes: #57637: Samba says tree connect error. + Closes: #58015: potato samba wins support is broken. + * Fixed comments in sample smb.conf to point to the correct location. + Closes: #69578: comments in smb.conf points to wrong path. + * Move codepages from /etc/samba/codepages/ to + /usr/share/samba/codepages/. + Closes: #63813: samba; codepages should go in /usr/lib. + * Moved /var/samba/ to /var/state/samba/. + Closes: #49011: samba package not FHS compliant. + * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() + is found. + Closes: #44558: netgroup support missing in samba 2.0.5a-1. + * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and + --exec. Got rid of --exec so --pidfile works. + + -- Eloy A. Paris Thu, 11 Jan 2001 00:15:57 -0500 + +samba (2.0.7-3) frozen unstable; urgency=high + + * Release manager: this closes a RC bug. + * Commented out the section in source/configure.in that auto-detects + CUPS support and then ran autoconf to generate a new configure + script. This was done to prevent machines that have libcupsys-dev + installed from detecting CUPS support and adding an unwanted + dependency on libcupsys. This way the whole printing system + won't break on upgrades. CUPS support should be added after + Potato is released. + Closes: #65185: samba-common: Upgrading removes printing system. + Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. + * Updated README.debian. + Closes: #64594: Old README.Debian in /usr/share/doc/samba. + + -- Eloy A. Paris Tue, 20 Jun 2000 19:16:04 -0400 + +samba (2.0.7-2) frozen unstable; urgency=high + + * Release manager: this closes RC bug #63839 that prevents Samba + to be built from source. + * Fixed a stupid typo in debian/rules that was preventing Samba + to be built from source. + Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) + * I forgot to mention that O'Reilly's book "Using Samba" was donated + to the Open Source community. The book was included in Samba 2.0.7 + in HTML format and is part of the Debian Samba package since + Samba 2.0.7-1. + * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help + files were supposed to be provided in both the swat and the samba-doc + packages. This duplication was a waste of space. Starting with + Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML + files are included only in samba-doc, and are accessed via symlinks + from within swat. + Closes: #58810: superfluous files in swat? + * Added a 'echo "."' to /etc/init.d/samba in the reload) section. + Closes: #63394: "echo ." missing in reload section of init.d script + * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. + Closes: #64344: typo "encrypted passwords" + * Cleaned up samba's postrm script so important common files aren't + deleted when samba is purged. Created a samba-common.postrm script. + Closes: #62675: purging samba removes /etc/samba/smb.conf. + Closes: #63386: samba --purge removes /etc/samba dir even though + smbclient/smbfs/samba-common packages are still installed + + -- Eloy A. Paris Wed, 3 May 2000 02:42:07 -0400 + +samba (2.0.7-1) frozen unstable; urgency=low + + * New upstream version. Dear Release Manager: please allow this + package to go to frozen as it contains fixes to a _lot_ of problems. + You can take a look at all the problems fixed by this release in + the official upstream announcement at + http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. + * Added --with-utmp to add utmp support to smbd (this is new in Samba + 2.0.7) + * Closes: #62148 - samba not rotating filled logs. + * Closes: #56711: Samba doesn't manage well long share name (please note + that it's possible to connect to shares with names longer than + 14 characters but the share will be listed with a name truncated to + 13 characters.) + * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). + Closes: #50907 - logon path not working. + This is not a bug, it's just Samba doing the same thing an NT server + does. See WHATSNEW.txt and smb.conf's man page for details. + * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper + is not supported anymore.) + * Closes: #58994 swat: typo in swat description. + * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware + problems, person that reported the bug never came back.) + Closes: #54398 - smbadduser fails, looks for ypcat. + * Fixed swat's man page to include Debian specific installation + instructions. There's not necessary to edit /etc/services or + /etc/inetd.conf. + (Closes: #58616 - incomplete install config && incorrect installation + instructions.) + * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat + to look for smbd and nmbd in the wrong place when requested to start or + stop smbd or nmbd. + (Closes: #55028 - swat can't start samba servers.) + * Closes: #37274: smbclient does not honour pot. (Tested and seems to be + working now.) + * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, + #50479, #39818, #54383, #59411. + (please re-open any of this if the problem still exists - I was unable + to confirm any of this because I could never reproduce them.) + Closes: #56699 - Samba's nmbd causes random kernel oops several + times in a row. + Closes: #62185 - nmbd's forking until no more file descriptors are + available. + Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. + Closes: #52218 - Either wins proxy does not work, or I don't understand + it. + Closes: #43492 - intermittent problem changing password. + Closes: #50479 - Can't access windows 2000 shares with samba. + Closes: #39818 - samba-common: Upgrading Samba from the Slink version. + Closes: #54383 - samba-common: Missing /etc/smb.conf. + Closes: #59411 - smbclient: cannot browse Win2k shares. + + -- Eloy A. Paris Thu, 27 Apr 2000 16:07:45 -0400 + +samba (2.0.6-5) frozen unstable; urgency=low + + * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries + in this package are broken unless libcupsys1 is installed. + samba-common has a "grave" bug because of this. Instead of adding + libcupsys1 to the Depends: list of each package in debian/control + I investigated why dh_shlibs was not picking the dependency + automatically. It turns out that it's probably a bug in libcupsys1 + because the format of its shlibs file is not correct. I fixed that + file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are + picked correctly. I'll talk to the libcupsys1 maintainer. + + I think the addition of CUPS support to Samba is a big change that + should not go into Frozen. So, I decided to back up the addition + of CUPS support I did in 2.0.6-4 to minimize problems. I'll add + CUPS support again when I start working on Samba for Woody. + (Closes: #59337 - samba-common has a missing dependency) + + -- Eloy A. Paris Wed, 1 Mar 2000 08:40:02 -0500 + +samba (2.0.6-4) frozen unstable; urgency=low + + * It seems that sometimes nmbd or smbd are not killed when upgrading. + I think it is because in samba's prerm script I was calling + start-stop-daemon with the --pidfile switch and in old versions of + Samba the nmbd and smbd daemons did not store their PIDs in a file in + /var/samba/. I changed debian/samba.prerm so the existence of the + PID files is checked before calling "start-stop-daemon --pidfile ..." + If the PID files do not exist then start-stop-daemon is called + without the --pidfile parameter. + (Closes: #58058 - upgrade from slink went badly) + * Fixed typo in description of swat package in debian/control. + * Installed libcupsys1-dev so the configure script picks up CUPS + and Samba is compiled with CUPS support. Also added libcupsys1 to + the Depends: list of package samba in debian/control. + (Closes: #59038 - samba not compiled with cups support) + * Added a small paragraph to debian/README.debian warning about possible + problems with the WINS code in Samba 2.0.6. + + -- Eloy A. Paris Mon, 28 Feb 2000 14:00:42 -0500 + +samba (2.0.6-3) frozen unstable; urgency=low + + * Applied patch posted by Jeremy Allison to the samba mailing list + that should take care of the internal errors reported in bug #52698 + (release-critical). Wichert: please test as I never could reproduce + it here. + (Closes: #52698 - samba gets interbal errors) + * Moved samba-docs to the 'docs' section. + (Closes: #51077 - samba-doc: wrong section) + * Added reload capability to /etc/init.d/samba (only for smbd because + nmbd does not support reloading after receiving a signal). + (Closes: #50954 - patch to add reload support to /etc/init.d/samba) + * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so + Unix password syncronization works with the passwd program currently + in Potato. Thanks to Augustin Luton for + the correct chat script. + * Stole source/lib/util_sec.c from the CVS tree of what will become + Samba 2.0.7 or whatever so we can use the same binaries under + both 2.0.x and 2.2.x kernels. + (Closes: #51331 - PANIC: failed to set gid) + * smbadduser is now provided as an example and it's customized for Debian. + I am not providing this script in /usr/sbin/ because then I would need + a dependency on csh, something that I don't want to do. + (Closes: #51697, #54052) + * Fixed the short description of the smbfs package in debian/control. + (Closes: 53534 - one-line description out of date). + + -- Eloy A. Paris Tue, 23 Nov 1999 16:32:12 -0500 + +samba (2.0.6-2) unstable; urgency=low + + * samba-common now depends on libpam-modules (not on libpam-pwdb, which + I have been told is obsolete). I modified /etc/pam.d/samba accordingly + to reflect the change. + (Closes: Bug#50722: pam pwdb dependence?). + * The old /etc/pam.d/samba file which had references to pam_pwdb caused + smbd to die with a signal 11. The new /etc/pam.d/samba file fixes + this problem. + (Closes: #50876, #50838, #50698) + * Compiled with syslog support (use at your own risk: syslog support + is still experimental in Samba). I added the parameters "syslog = 0" + and "syslog only = no" to the sample smb.conf to avoid pestering + users that do not want Samba to log through syslog. + (Closes: Bug#50703 - syslog only option doesn't work) + * Removed the stupid code in the smbmount wrapper script that tries + to load the smbfs module if smbfs is not listed in /proc/filesystems. + (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled + as a module in the kernel) + * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so + 'mount -t smb ...' works just as 'mount -t smbfs ...'. + (Closes: Bug#50763 - 'mount -t smb' doesn't work) + + -- Eloy A. Paris Sat, 20 Nov 1999 18:53:35 -0500 + +samba (2.0.6-1) unstable; urgency=low + + * Samba 2.0.6 has been released. This is the first try of the Debian + Samba packages. I know for sure that smbd won't work properly on + 2.0.x kernels because the patch that Wichert sent me does not apply + to the new source/lib/util_sec.c in Samba 2.0.6. That file was + completely re-written by Tridge. + * Updated README.Debian. + * A new client utility called smbspool appeared in Samba 2.0.6. I added + this utility to the smbclient package, although I haven't tried it yet. + * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. + This is to be able to type "mouont -t smbfs ...". This symlink goes + in the smbfs package, of course. + * This new release should close the following bugs (some of these + are fixed for sure in this new upstream release, some others I could + not reproduce but I believe they are fixed if they were real bugs. + As always, please feel free to re-open the bugs if the problem is not + solved). + Closes: Bug#33240: icmp mask needs a bug workaround. + Closes: Bug#37692: samba: Has problems detecting interfaces. + Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. + Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast + properly. + Closes: Bug#44131: smbfs: no longer possible to set file and + directory-modes. + Closes: Bug#46992: smbmount-2.2.x manpage wrong. + Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. + Closes: Bug#46605: smbmnt segfaults. + Closes: Bug#48186: smbmount. + Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. + Closes: Bug#47332: smbmount: could -f and -P be added back? + * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM + module). To succesfully add PAM support, I created /etc/pam.d/samba and + added this file as a conffile for the samba-common package. I also made + samba-common depend on libpam-pwdb. + * Added simple man pages for the wrapper scripts smbmount and smbmount. + (Closes: Bug#44705 - Missing smbmount man page) + * Installed libreadlineg2-dev in my system so smbclient now has a + "history" command and libreadline support :-) + * This time I did add a check to the smbmount wrapper script to see if + the kernel has support for smbfs, as suggested by Jeroen Schaap + . I mentioned in the changelog + for samba-2.0.5a-3 that I did this but I forgot at the end. + + -- Eloy A. Paris Thu, 11 Nov 1999 12:08:15 -0500 + +samba (2.0.5a-5) unstable; urgency=low + + * I am sorry to report that the smbwrapper package is gone for the + moment. The reason for this is twofold: first of all, smbwrapper + is completely broken in Samba-2.0.5a (it compiles but it doesn't + run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, + when I asked Andrew Tridgell (father of Samba) about the state of + smbwrapper he told me that Ulrich Drepper (head of the glibc project) + broke on purpose the glibc stuff in which smbwrapper is based. + Consequently, Tridge recommended me to compile Samba without + support for smbwrapper. When, I have no idea. Sorry folks. Here is + the original message I received from Andrew: + + > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's + > smbwrapper doesn't even compile under glibc2.1. + + yep, Ulrich deliberately broke it. It won't get fixed till glibc + allows the sorts of games it plays to work again. I suggest you turn + it off in your build scripts until that gets sorted out. + + * Swat's file are now in /usr/share/samba/ instead of + /usr/lib/samba/ (bug #49011). + * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). + + -- Eloy A. Paris Tue, 2 Nov 1999 12:59:13 -0500 + +samba (2.0.5a-4) unstable; urgency=low + + * Applied patch from our fearless leader (Wichert) to fix the darn bug + that prevents Samba to work on 2.0.x kernels if it was compiled + in a system running a 2.2.x kernel. This closes #40645 (build uses + setresuid which doesn't work under 2.0.34 (does apparently under + 2.2.x) ). + * Fixed the entry that swat's postinst script adds to /etc/inetd.conf + so it is '## swat\t\tstream\ttcp\tnowait.400 ...' instead of + '##swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused + 'update-inetd --enable swat' to leave the entry for swat disabled. + Thanks to Dave Burchell for finding out + this problem. This closes #48762 (swat uses non-standard syntax to + comment out inetd.conf entry). + * /usr/sbin/swat does not think anymore that the smbd daemon lives + in /usr/local/samba/bin/. To fix this I am running now source/configure + with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba + 'swat' fails: incorrect hardwired path in the binary). + + -- Eloy A. Paris Sun, 31 Oct 1999 03:42:38 -0500 + +samba (2.0.5a-3) unstable; urgency=low + + * I am pretty darn busy with my MBA, I apologize for the long time it's + taking to squash bugs in the Samba packages. + * Built with debhelper v2 for FHS compliancy. Changed a couple of + things in debian/rules to accomodate for the new place for the docs. + I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} + to make sure that the symlink from /usr/doc/xxx exists and points to + /usr/share/doc/xxx (the reason for this is that I am not letting + debhelper to create these scripts for me automatically). + * Built with latest libc6. + * smbfs: finally, the nasty bug that causes smbmount to die after + a while is gone thanks to Ben Tilly . + The problem was just a typo in source/client/smbmount.c. + This closes grave bug #42764 (smbmount dies) and #43341 + (smbfs-2.2.x won't function after a while). + * Fixed the smbmount wrapper script to eliminate a bashism (closes + #45202 - "wrapper scripts use $* instead of "$@") and to recognize + 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize + kernel 2.3.x"). + * Added a check to the smbmount wrapper script to see if the + kernel has support for smbfs, as suggested by Jeroen Schaap + . + * swat's man page is now part of the swat package, not of the samba + package. This closes #44808 (Samba has a man page for swat, but + the binary is not included). + * The interface program smbrun is not longer needed by smbd because + of the availability of execl() under Linux. Because of this, the + smbrun is not even being compiled. Since there is no need for smbrun + now, the smbrun man page was taken out of the samba package. This + closes #45266 (/usr/bin/smbrun missing). + * smbpasswd is now part of the samba-common package, and not part of + the samba package. This is to let administrators that do not want + to install a full Samba server administer passwords in remote + machines. This closes bug #42624 (smbpasswd should be included in + smbclient). This bug report also suggests that swat becomes part of + the samba package, that smbfs becomes part of the smbclient package, + and that the binary smbpasswd becomes part of the smbclient package. + I moved smbpasswd to the samba-common package but I am reluctant to + do the other things the bug report suggests. + * In order to keep dpkg happy when moving smbpasswd from the samba + package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" + in the control section of the samba-common package and a + "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the + samba package (in debian.control). + * Samba is now being compiled with the "--with-netatalk" option. This + closes #47480 (Could samba be compiled with the --with-netatalk option). + * All packages that depend on samba-common have a versioned dependency + now. This was accomplished by adding "(= ${Source-Version})" to the + relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho + for the hint. This closes #42985 (samba should probably + have a versioned depends on samba-common). + * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all + the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). + * Added the smbadduser helper script to the samba package. This closes + #44480 (Samba doesn't come with the smbadduser program). + * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount + to leave an entry in /etc/mtab for a share that could not be mounted + because of invalid user of password. The patch also allows smbumount + to unmount the share in the event that something goes wrong with the + smbmount process. This closes bug #48613 (Mount/umount problems + + patch) as well as #44130 (failed mount is still mounted). + * smbmount-2.2.x is now setuid root. This is needed for the patch + applied above to be effective. If smbmount-2.2.x is not setuid root + then an entry will be left in /etc/mtab even when the mount + fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid + for this to work. + + -- Eloy A. Paris Wed, 27 Oct 1999 10:36:13 -0400 + +samba (2.0.5a-2) unstable; urgency=low + + * This version is basically the same as 2.0.5a-1 but it was compiled + on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 + for more information. + + -- Eloy A. Paris Tue, 27 Jul 1999 02:25:29 -0400 + +samba (2.0.5a-1) stable; urgency=high + + * I'm back from the Honey Moon. We are pretty busy because we are moving + to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still + have plenty of things to pack and to do. Samba 2.0.5 was released + while I was in the Honey Moon and it is just now (almost 3 AM) when + I have time to package it. + * Because of the security problems fixed in 2.0.5, this upload goes + to both stable and unstable (the Security Team asked for this). + * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will + be compiled on a Potato system. + * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common + section in debian/control (as suggested by Steve Haslam + ) to fix the problems that appear when upgrading + from the Samba package in Slink. Please test this as I am completely + unable to do so. This should fix bug #39818 (Upgrading Samba from the + Slink version). + * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in + order to have defined several socket options when compiling with + Linux 2.2.x kernel headers - the fix is now upstream. + * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command + line syntax similar to the one used by the old smbmount (for 2.0.x + kernels). This means that the wrapper script is no longer necessary + so I removed it. In its place there is a simple wrapper script that + calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is + running. + * Because of the wedding, the Honey Moon, and our move to Pittsburgh, + I can't work on fixing other bugs in this release. + + -- Eloy A. Paris Tue, 27 Jul 1999 02:18:51 -0400 + +samba (2.0.4b-3) unstable; urgency=low + + * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files + and because of this /usr/bin/smbumount was part of the samba package + instead of part of the smbfs package. + + -- Eloy A. Paris Thu, 1 Jul 1999 01:51:24 -0400 + +samba (2.0.4b-2) unstable; urgency=low + + * Dark (and archive maintainers): please remove from Potato the smbfsx + binary package and also the old source package for smbfs. smbfs and + smbfsx have been merged starting with this version. + * Merged the old smbfs package with Samba. Now there is only one package + for the smbfs utilities and is called "smbfs". The package smbfsx + does not exist any more and this new smbfs package must be used + for both 2.0.x and > 2.1.x kernels. + * A wrapper script was added to handle the syntax change in smbmount + in the new smbfs utilities (required for kernels > 2.1.70). The + home page for this script is http://www.wittsend.com/mhw/smbmount.html. + Please _note_ that this will change (for good) in Samba 2.0.5 :-) + * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x + or smbumount-2.0.x depending on the kernel currently running. + * Not using -t for savelog in cron.weekly script. + * Recompiled without libreadlineg-dev (Samba does not seem to be using + it so unnecessary dependencies are produced). + * glibc2.1 build. + * Removed smbpasswd.8 man page from the debian/ directory because it is + now being provided upstream. + * Got rid of the ugly hack I put in source/lib/util_sock.c to have + IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the + autoconf stuff to #include . I've sent the patch to + Jeremy Allison so we have this upstream. + + -- Eloy A. Paris Mon, 28 Jun 1999 17:47:19 -0400 + +samba (2.0.4b-1) unstable; urgency=low + + * New upstream release. This release fixes the following Debian bugs: + #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and + #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy + Allison released Samba 2.0.4 and found out that there were a couple + of minor bugs so he released 2.0.4a. Then he found out about more + serious bugs and released 2.0.4b. I have built this package several + times between yesterday and today because of this. Now I am releasing + the Debian packages for Samba with what I believe will be the latest + release the Samba Team will make at least in the next 4 days (Jeremy + is taking a short vacation). + * Still compiling against glibc2.0 (sorry about that :-) + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. It looks + now in /usr/lib/samba/ for this file. This fixes #32971, #32989, + #33278, #34911 and #36317. + * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf + and /etc/samba/codepages/. This fixes #33128 (smbmount complains about + missing /etc/smb.conf). + * Package swat does not depend on httpd anymore (there's no need to). + This fixes #35795 (swat requires httpd). + * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and + smbumount-2.2.x. Same applies to the man pages. + * Changed minor type in smbmount's man page (changed "\"" by "\'"). This + fixes #34070 (wrong quotes in manpage). + * Used Fabrizio Polacco's procedure to create the + Debian package for Samba. This closes #35781 (samba has no pristine + source). + * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only + if the size of either is different than 0. Also, added comments at the + beginning of this script to explain how rotation of log files works in + Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) + for the suggestions. This closes #37490 (cron.weekly script rotates not + used [sn]mb.old files). As I side effect, this should also close + #31462 (still trouble with /etc/cron.weekly/samba). + * Check for old /etc/pam.d/samba file which is not provided by this version + of the Debian Samba package but was provided in older versions. If this + file exists we delete it. We check for this in the postinst. This closes + #37356 (samba put stuff in pam.d that pam complains about) and #34312 + (libpam0g: questions during upgrade). + * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done + in the postinst script. This closes #35730 (Security problem with + /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). + * I have just checked and it looks like #28748 (smbfsx doesn't "return ") + has been fixed. This might have been fixed since a long time ago. + * Long long standing bug #18488 (smbclient: internal tar is broken) is + closed in this release of Samba. The bug might have been closed for a + long long time, but I did not check for this before. + * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" + message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), + #34148 (warnings from smbd) and #35333 (samba warnings). + + -- Eloy A. Paris Thu, 20 May 1999 00:35:57 -0400 + +samba (2.0.3-1) unstable; urgency=low + + * New upstream version. + * Removed the convert_smbpasswd.pl program I created and put in + /usr/doc/samba/ because there's a convert_smbpasswd script in the + upstream sources that does the same thing. I modified the postinst + script to use this script instead of the one I created. + + -- Eloy A. Paris Sun, 28 Feb 1999 01:35:37 -0400 + +samba (2.0.2-2) unstable; urgency=low + + * Updated the README.Debian file. + * Updated the description of the samba package in the control file. + * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now + installed setuid root as they should be. This was done by doing a + a "chmod u+s" for each binary in debian/rules and by creating the + file debian/smbfsx.suid. + * Minor patch to source/client/smbumount.c to allow normal users + to umount what they have mounted (problem was a kernel vs. libc6 + size mismatch). I sent the patch upstream. + * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is + created. + * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to + debian/smbwrapper/usr/lib/samba/. + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. + + -- Eloy A. Paris Thu, 11 Feb 1999 18:11:34 -0400 + +samba (2.0.2-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Thu, 11 Feb 1999 01:35:51 -0400 + +samba (2.0.1-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Sat, 6 Feb 1999 06:51:18 -0400 + +samba (2.0.0final-4) unstable; urgency=low + + * The samba postinst made an unwarranted assumption that the file + /etc/samba/smbpasswd exists. If the file did not exist (which is + perfectly valid) the postinst will fail. This fixes #32953. + + -- Eloy A. Paris Fri, 5 Feb 1999 23:32:46 -0400 + +samba (2.0.0final-3) unstable; urgency=low + + * Added to debian/control a "Depends: ${shlibs:Depends}" line for the + samba-common package so dependencies for this package are set + correctly (thanks to Dark for pointing this out). + + -- Eloy A. Paris Thu, 4 Feb 1999 09:45:21 -0400 + +samba (2.0.0final-2) unstable; urgency=low + + * Finally!!! The first upload to unstable. Sorry for the delay folks + but I have been quite busy lately :-) Another reason for the delay + is that I wanted to ease the migration from Samba 1.9.18p10 and + before to Samba 2.0.0. I changed the location of the config. files + from /etc/ to /etc/samba/ and this made things a little bit harder. + * This package needs 2.2 kernel headers to compile (well, this is + true for the smbfsx package, all others compile fine with 2.0 kernel + headers). + * Created a preinst script for the samba package to take care of the + location migration of smb.conf (from /etc/ to /etc/samba/). The + preinst script also takes care of moving /etc/smbpasswd to its new + location (/etc/samba/). + * Created postinst and postrm scripts to add/remove an entry for swat + in /etc/inetd.conf. + * I had forgotten to install the sambaconfig script so I changed + debian/rules to install this script. + * Added a postrm script for the samba package (I had forgotten to add + this script to the new Samba packages after the migration from 1.9.18 + to 2.0.0). + * Created a small Perl script that is called from the samba postinst + to convert the smbpasswd from the old format used in version prior + to 2.0.0 to the new one used in 2.0.0 and beyond. + * The upgrade process should be automatically now. Please let me know + of any problems you encounter. + + -- Eloy A. Paris Sat, 23 Jan 1999 09:34:10 -0400 + +samba (2.0.0final-1) experimental; urgency=low + + * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable + because I still have to work out the migration from the old + samba packages to the new ones. I also need to work more on the + new swat package. + + -- Eloy A. Paris Thu, 14 Jan 1999 22:40:02 -0400 + +samba (2.0.0beta5-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris Tue, 5 Jan 1999 00:37:57 -0400 + +samba (2.0.0beta4-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris Wed, 23 Dec 1998 18:37:45 -0400 + +samba (2.0.0beta3-1) experimental; urgency=low + + * New upstream version. + * I have just realized that the documentation patches (for man pages) + that I used for the 1.9.18 release are not longer necessary because + there was a major re-write of all the Samba documentation that added + the missing bits of information. So, I have just removed these minor + patches. + + -- Eloy A. Paris Tue, 8 Dec 1998 12:00:30 -0400 + +samba (2.0.0beta2-1) experimental; urgency=low + + * New upstream version. + * This new version fixes the potential security problem that + was posted to debian-private (using the "message command" parameter + to execute arbitrary commands from messages sent from LinPopUp). + * Changed /etc/init.d/samba to use one of the variables stored in + /etc/samba/debian_config to know how Samba is being run (from inetd or + as daemons) instead of grepping /etc/inetd.conf which may not exist + if the user is running xinetd (this fixes bug #29687 - assumes using + vanilla inetd) + + -- Eloy A. Paris Mon, 23 Nov 1998 23:32:03 -0400 + +samba (2.0.0beta1-1) experimental; urgency=low + + * First beta release of the samba-2.0.0 code. Before the beta I was + working with sources downloaded directly from the CVS server. This + package goes into experimental and I plan to release the new + samba to unstable as soon as it gets out of beta. + * Created several packages out of the Samba sources. They are: + samba (nmbd and smbd daemons + related programs), smbclient (FTP + like command line utility to retrieve files from SMB servers), + swat (Samba Web Administration Tool), samba-common (common files + used by samba, smbclient and swat), smbfsx (smbfs utilities for + kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). + * Refreshed debian/samba-doc.docs so recently added docs. are + installed in the samba-doc package. New additions include man + pages in the /usr/doc/samba-doc/htmldocs/ directory. + * Deleted Debian specific nmblookup(1) man page as it is now upstream. + * Added smbtorture to smbclient package. + * Moved rpcclient from the samba package to the smbclient package. + * The Samba daemons (nmbd and smbd) now create a PID file so I changed + all calls to start-stop-daemon to use the PID file. + * Fixed debian/rules to install mksmbpasswd (fixes #27655). + * Modified /etc/init.d/samba so nmbd is started without the -a (append + to the log file instead of overwrite) switch. The new behavior of + nmbd is to NOT overwrite log files, so the -a switch can be deleted + safely. + * Moved from debstd to debhelper. + + -- Eloy A. Paris Thu, 1 Oct 1998 08:37:41 -0400 + +samba (1.9.18p10-5) frozen unstable; urgency=high + + * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than + the one I was trying to fix: in /etc/init.d/samba I got rid of the test + that tells us whether the Samba daemons are running from inetd or as + standalone daemons. I corrected the problem by editing again + /etc/init.d/samba to uncomment the test. + * Wishlist bug #28298 (typos in samba) was fixed. + * Wishlist bug #28309 (typos in smb.conf) was fixed. + + -- Eloy A. Paris Wed, 28 Oct 1998 09:11:47 -0400 + +samba (1.9.18p10-4) unstable; urgency=low + + * Minor patch to debian/rules to delete *substvars instead of only + substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz + for this). + * Small patch to source/shmem_sysv.c that eases compilation under + glibc-2.1 (thanks to Daniel for this). + + -- Eloy A. Paris Thu, 17 Sep 1998 15:33:49 -0400 + +samba (1.9.18p10-3) unstable; urgency=low + + * Patched smbclient again to fix minor formatting problem introduced + by Magosanyi Arpad's smbclient patch. + + -- Eloy A. Paris Thu, 3 Sep 1998 11:03:23 -0400 + +samba (1.9.18p10-2) unstable; urgency=low + + * Sync'ed include files for the smbfs utilities with the ones in + kernel 2.1.119. + * Added to the /usr/doc/samba/examples/ directory a new script called + wins2dns (courtesy of Jason Gunthorpe ) that + generates BIND sonze files for hosts in the WINS database. + * Patched smbclient to include enhancements by Magosanyi Arpad + that make scripting easier. + + -- Eloy A. Paris Fri, 28 Aug 1998 13:34:54 -0400 + +samba (1.9.18p10-1) stable unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). I built a 1.9.18p9-1 but I + never released it because an obscure bug was found just a couple + of days before the official release, so the Samba Team stopped + the rollover of 1.9.18p9. + * Updated documentation (new files were added to the docs/ directory + that were not installed in /usr/doc/samba/). + * Fixed long standing bug #7695 (smb.conf's man page doesn't document + 'printing=lprng') - I made a couple of changes to the man page to + include references to lprng. + * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it + is necessary to make samba suggest psmisc just because the postinst + script mentions to call killall. So, I removed all references to + "killall" in the scripts. + * Fixes bug #25999 (Samba does not by default work with unix password + sync): I added the "passwd program" and "passwd chat" parameters to + the sample smb.conf to reflect the Debian environment. + + -- Eloy A. Paris Fri, 21 Aug 1998 08:59:18 -0400 + +samba (1.9.18p9-1) unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). + * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is + now part of the new upstream version. + * Corrected small typo in addtosmbpass' man page (fixes #25629). + + -- Eloy A. Paris Tue, 11 Aug 1998 08:53:08 -0400 + +samba (1.9.18p8-2) frozen unstable; urgency=medium + + * Applied patch received from Jeremy Allison (Samba Team) that fixes + "grave" bug #23903 (samba maps username before authenicating with + NT password server). + * Added a "sleep 2" between "start-stop-daemon --stop" and + "start-stop-daemon --start" in /etc/init.d/samba so when this script + is called with the "restart" parameter the Samba daemons are restarted + properly. This fixes bug #24211 (init.d script doesn't restart). + * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to + avoid annoying warning messages. + * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 + and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't + find who sent this suggestion to me. If you are listening, drop me a + note and I'll put your name here :-) + + -- Eloy A. Paris Mon, 29 Jun 1998 08:45:01 -0400 + +samba (1.9.18p8-1) frozen unstable; urgency=low + + * New upstream release that fixes _lots_ of "ugly" bugs. The list of + fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). + * Fixed postinst to quote arguments to if [ arg .. ] constructs + (fixes #22881). + * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing + list) that solves a problem with username maps (the Samba Team did + not catch this problem before final 1.9.18p8). + * Made /etc/init.d/samba to print out a warning when Samba is running + from inetd and the user runs /etc/init.d/samba to start|stop|restart + Samba (there's no point on doing this because inetd will start the + daemons again when there is traffic on UDP port 137-139). + + -- Eloy A. Paris Sat, 13 Jun 1998 00:18:25 -0400 + +samba (1.9.18p7-4) frozen unstable; urgency=medium + + * Fixes the serious problem of having the WINS name server + database getting deleted at boot time. That happened because the + WINS database was being stored under /var/lock/samba/ and all files + under /var/lock/ are deleted at boot time. The place where the WINS + database is stored was moved to /var/samba/. + + -- Eloy A. Paris Mon, 18 May 1998 20:24:29 -0400 + +samba (1.9.18p7-3) stable; urgency=high + + * Libc5 version for Bo (stable) that fixes the recently reported + security hole. + + -- Eloy A. Paris Mon, 18 May 1998 20:19:33 -0400 + +samba (1.9.18p7-2) frozen unstable; urgency=low + + * Added patches from the non-mantainer upload that make us able + to compile Samba on Alpha systems. This fixes bug #22379. + + -- Eloy A. Paris Wed, 13 May 1998 20:38:51 -0400 + +samba (1.9.18p7-1) frozen unstable; urgency=low + + * New upstream release (just bug fixes, no new functionality). + + -- Eloy A. Paris Wed, 13 May 1998 11:47:32 -0400 + +samba (1.9.18p6-2) frozen unstable; urgency=low + + * Uploaded to frozen (I forgot to upload last version to frozen + so it got installed only in unstable). + + -- Eloy A. Paris Tue, 12 May 1998 18:10:17 -0400 + +samba (1.9.18p6-1.1) unstable; urgency=low + + * non-maintainer upload for Alpha + * patch needed for source/quota.c (_syscall4() confusion) + + -- Paul Slootman Tue, 12 May 1998 20:39:13 +0200 + +samba (1.9.18p6-1) unstable; urgency=low + + * New upstream release that fixes a possible buffer overflow. + This security hole was reported on BugTraq by Drago. The + previous Debian version (1.9.18p5-1) was not released because + 1.9.18p5 and 1.9.18p6 were released very closely. + + -- Eloy A. Paris Mon, 11 May 1998 20:28:33 -0400 + +samba (1.9.18p5-1) unstable; urgency=low + + * New upstream release (no new funcionality, just bug fixes - see + /usr/doc/samba/WHATSNEW.txt.gz). + * Backed off Debian patches that were added upstream. + + -- Eloy A. Paris Mon, 11 May 1998 08:43:53 -0400 + +samba (1.9.18p4-2) frozen unstable; urgency=low + + * Patched smbclient(1) man page to not reference the unsopported + -A parameter (fixes #6863). + * Changes to start nmbd with the -a option (in /etc/init.d/samba + and in the entry added to /etc/inetd.conf). + * Fixed typo in sample smb.conf (fixes #21484). + * Fixed yet another typo in sample smb.conf (fixes #21447). + + -- Eloy A. Paris Fri, 17 Apr 1998 22:19:23 -0400 + +samba (1.9.18p4-1) frozen unstable; urgency=low + + * New upstream version that fixes several bugs. + * New scheme for keeping track of Debian specific configuration. + This new scheme fixes bug #18624 (Samba always asks the user about + configuration options). New scheme stores Debian specific + configuration information in /etc/samba/debian_config. + * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the + new configuration scheme. + * Moved required kernel 2.1.x include files inside the source tree + so I don't have to do very nasty things like creating crazy + symlinks in /usr/include to make this package compile. This + allows non-root users to build the package and fixes bug + #20104. + * Fixed address of the FSF in /usr/doc/samba/copyright (problem + reported by lintian). + * The /etc/init.d/samba script now supports the force-reload + argument, as required by the policy (problem reported by lintian). + * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. + * Now the samba package can be installed even if no nmbd or smbd processes + are running. This fixes the following bugs: #8917, #9334, #10268, + #10411, #11146 and #13387. + * Provides the original README in /usr/doc/samba. This fixes bug #9693. + * Added a --no-reload option to sambaconfig to not reload Samba + after configuration. + * Created man pages for sambaconfig(8), addtosmbpass(8), + mksmbpasswd(8) and nmblookup(1). + * Corrected small typo in sample /etc/smb.conf. + * Added two new parameters to /etc/smb.conf: "preserver case" and + "short preserve case". + * "rm -Rf /var/lock/samba" in postrm when package is being purged. + * Patched upstream source (nmbd.c) to not overwrite log files when + nmbd is called with the -a parameter (fixes #17704: nmbd ignores + -a option). + * /etc/init.d/samba now starts the nmbd daemon with the -a parameter + to not overwrite log files. + + -- Eloy A. Paris Mon, 23 Mar 1998 21:22:03 -0400 + +samba (1.9.18p3-1) unstable; urgency=low + + * New upstream version. + * Oppsss!!! I really screwed it up (actually, debstd did). + 1.9.18p2-2 still contained man pages (smbmount and smbumount) part + of other packages. This version does have this corrected. If not, + I no longer deserve to be a Debian developer! So, this version + fixes bug #18438 and some of the bugs I claimed to fix in + 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd + with -m in debian/rules (man pages are installed by "make install" + so it's a bad idea to re-install man pages with debstd). + + -- Eloy A. Paris Mon, 23 Feb 1998 17:32:42 -0400 + +samba (1.9.18p2-2) unstable; urgency=low + + * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided + a man page for smbmount, which conflicts with package smbfs. This + was solved by creating a multi-binary package that produces + package samba and new package smbfsx. + * Fixes bug #18000 (typo in postinst). + * Fixes bug #17958 (postinst asks obsolete question). Actually, + the question is still asked, but only if Samba is run as daemons. + * Created a multi-binary package from the Samba sources: package + samba and new package smbfsx which provides SMB mount utilities + for kernels > 2.1.70. + + -- Eloy A. Paris Mon, 9 Feb 1998 19:47:05 -0400 + +samba (1.9.18p2-1) unstable; urgency=low + + * New upstream version. + * Removed /etc/cron.weekly/samba because Samba does not handle well + rotation of log files (if the log file is rotated Samba will + continue to log to the rotated file, instead of the just created + one). In any case, Samba will rotate log files after an specific + file size. + + -- Eloy A. Paris Tue, 27 Jan 1998 22:34:27 -0400 + +samba (1.9.18p1-2) unstable; urgency=low + + * Created a multi-binary package out of the Samba sources to provide + packages samba and smbfsx (userland utilities to work with + smbfs with kernels > 2.1.x. + + -- Eloy A. Paris Sat, 17 Jan 1998 09:23:48 -0400 + +samba (1.9.18p1-1) unstable; urgency=low + + * New upstream version. + * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in + /var/backups/smbpasswd.bak. + + -- Eloy A. Paris Wed, 14 Jan 1998 13:40:56 -0400 + +samba (1.9.18alpha14-1) unstable; urgency=low + + * New upstream version. + * Added a note to the postinst script telling the user that he/she + needs to run smbpasswd manually after creating a new /etc/smbpasswd + from /etc/passwd. + + -- Eloy A. Paris Tue, 23 Dec 1997 23:44:37 -0400 + +samba (1.9.18alpha13-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Tue, 16 Dec 1997 13:02:32 -0400 + +samba (1.9.18alpha12-1) unstable; urgency=low + + * New upstream version. + * Conflicts with the sambades package because the new Samba 1.9.18 + series do not depend on the DES libraries to support encrypted + passwords. + * Added parameter "encrypt passwords = yes" to /etc/smb.conf. + * Compiled with support for quotas in disk_free(). + * Home directories are now exported read only by default. + * Re-worked debian/rules. + * Re-worked sample smb.conf. + + -- Eloy A. Paris Thu, 4 Dec 1997 22:50:34 -0400 + +samba (1.9.17p4-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable by everybody because some Samba utilities + will fail otherwise when run by non-root users. + * Dropped PAM support while the PAM libraries are ported to libc6. + + -- Eloy A. Paris Tue, 21 Oct 1997 18:08:49 -0400 + +samba (1.9.17p3-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable only by root as suggested by smbd's man page. + + -- Eloy A. Paris Wed, 15 Oct 1997 09:21:25 -0400 + +samba (1.9.17p2-2) unstable; urgency=low + + * Running Samba as daemons instead of from inetd. + * Removing netbios entries in /etc/inetd.conf. + + -- Eloy A. Paris Thu, 9 Oct 1997 23:37:25 -0400 + +samba (1.9.17p2-1) unstable; urgency=low + + * New upstream version that fixes a serious security hole. + * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because + these patches are now part of the upstream release. + + -- Eloy A. Paris Sun, 28 Sep 1997 22:54:33 -0400 + +samba (1.9.17p1-1) unstable; urgency=low + + * New upstream version. + * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up + compiler warnings. + * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. + * Included crypt.h to have function prototype for crypt(). + * Included netinet/tcp.h to have some socket options included. + * Included netinet/ip.h to have some socket options included. + * Linking with libcrypt (LIBM='... -lcrypt'). Without including this + library smbd generates a seg. fault when authenticating users (?). + + -- Eloy A. Paris Wed, 10 Sep 1997 22:09:18 -0400 + +samba (1.9.17-1) unstable; urgency=low + + * New upstream version (called the "Browse Fix Release") + * Added the option --oknodo to the start-stop-daemon invocation in prerm + script. This was because the prerm was failing because start-stop-daemon + was returning an error code if no nmbd or smbd daemons were found + to kill. + * The function yp_get_default_domain(), referenced in three source + files was part of libc5 but with libc6 (glibc2) it has been moved + to libnss_nis. Since the linker was unable to find the function + I had to add LIBSM='-lnss_nis' to debian/rules. + * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules + because compiling was failing because of conflicts with glibc2. + * Patched source/includes.h to include termios.h if GLIBC2 is defined. + + -- Eloy A. Paris Wed, 27 Aug 1997 08:39:32 -0400 + +samba (1.9.17alpha5-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris Thu, 14 Aug 1997 18:05:02 -0400 + +samba (1.9.16p11-3) unstable; urgency=low + + * Fixed accidental omission of /etc/pam.d/samba. + + -- Klee Dienes Sat, 15 Mar 1997 22:31:26 -0500 + +samba (1.9.16p11-2) unstable; urgency=low + + * Recompiled against newer PAM libraries. + * Added /etc/pam.d/samba. + + -- Klee Dienes Sat, 8 Mar 1997 01:16:28 -0500 + +samba (1.9.16p11-1) unstable; urgency=low + + * New upstream release. + * Added PAM support. + + -- Klee Dienes Tue, 25 Feb 1997 18:00:12 -0500 + +samba (1.9.16p9-2) unstable; urgency=low + + * minor packaging changes + + -- Klee Dienes Sun, 3 Nov 1996 11:45:37 -0700 + +samba (1.9.16p9-1) unstable; urgency=low + + * upgraded to new upstream version + + -- Klee Dienes Sat, 26 Oct 1996 21:38:20 -0700 + +1.9.16alpha10-1: + 960714 + * Removed Package_Revision from control file. + * Removed -m486 compiler option. + * Added Architecture, Section and Priority fields to control file. + * Upgraded to latest upstream version. + * Uses update-inetd now. + * Added shadow passwords support. + * Fixed Bug#1946: nmbd won't browse + +1.9.15p4-1: + 951128 + * Upgraded to latest upstream version. + * Fixed many bugs. + * Adds Master Browsing support. + * Converted to ELF. + * Fixed bug #1825 - nmbd is now killed when removing samba. + +1.9.14-1: + 950926 Andrew Howell + * Upgraded to latest version. + * Fixed Bug #1139 - samba won't print + +1.9.14alpha5-1: + * Fixes killing of inetd problem in debian.postint and debian.postrm + +1.9.14alpha5-0: + 950704 Andrew Howell + * Taken over samba package from Bruce Perens. + * Upgraded to newest version of samba. + +1.9.02-1: + 9-January-1994 Bruce Perens + * Added Debian GNU/Linux package maintenance system files, and + configured for Debian systems. + +Local variables: +mode: debian-changelog +add-log-mailing-address: "peloy@debian.org" +End: diff --git a/packaging/Debian/unstable/config.cache b/packaging/Debian/unstable/config.cache new file mode 100644 index 00000000000..c0a70a5b19b --- /dev/null +++ b/packaging/Debian/unstable/config.cache @@ -0,0 +1,231 @@ +# +# 22 August 2001 Steve Langasek +# +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +# +# This config.cache file contains a list of acceptable autoconf +# values which can be used in compiling Samba for Debian woody/sid. +# +# Autoconf sorts options alphabetically in its output. This file +# groups options logically. + + +# Load any architecture-specific settings +if [ -n "$DEB_HOST_GNU_TYPE" \ + -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then + . ../debian/config.cache.${DEB_HOST_GNU_TYPE} +fi + + +# This is at the top because it's most in need of regular tweaking. +# These are options which are supported on 2.4 kernels, but not on 2.2 +# kernels. + +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} + + +# These are present in 2.2 kernels, but not in 2.0... + +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} + + +# POSIX ACL support not present in Linux 2.2; not allowed in the +# Debian packages, even if present on the build machine. + +ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} + + +# Various basic libc/compiler stuff that it's blindingly obvious that +# Linux supports (now watch me get bitten for saying that) + +ac_cv_c_const=${ac_cv_c_const=yes} +ac_cv_c_inline=${ac_cv_c_inline=inline} +samba_cv_volatile=${samba_cv_volatile=yes} +ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} +ac_cv_func_bzero=${ac_cv_func_bzero=yes} +ac_cv_func_chmod=${ac_cv_func_chmod=yes} +ac_cv_func_chown=${ac_cv_func_chown=yes} +ac_cv_func_chroot=${ac_cv_func_chroot=yes} +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_dup2=${ac_cv_func_dup2=yes} +ac_cv_func_execl=${ac_cv_func_execl=yes} +ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} +ac_cv_func_fchown=${ac_cv_func_fchown=yes} +ac_cv_func_fstat=${ac_cv_func_fstat=yes} +ac_cv_func_fsync=${ac_cv_func_fsync=yes} +ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} +ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} +ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} +ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} +ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} +ac_cv_func_glob=${ac_cv_func_glob=yes} +ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} +ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} +ac_cv_func_llseek=${ac_cv_func_llseek=yes} +ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} +ac_cv_func_memmove=${ac_cv_func_memmove=yes} +ac_cv_func_memset=${ac_cv_func_memset=yes} +ac_cv_func_mktime=${ac_cv_func_mktime=yes} +ac_cv_func_pipe=${ac_cv_func_pipe=yes} +ac_cv_func_poll=${ac_cv_func_poll=yes} +ac_cv_func_pread=${ac_cv_func_pread=yes} +ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} +ac_cv_func_rand=${ac_cv_func_rand=yes} +ac_cv_func_random=${ac_cv_func_random=yes} +ac_cv_func_readlink=${ac_cv_func_readlink=yes} +ac_cv_func_rename=${ac_cv_func_rename=yes} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_func_setenv=${ac_cv_func_setenv=yes} +ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} +ac_cv_func_setsid=${ac_cv_func_setsid=yes} +ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} +ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} +ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} +ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} +ac_cv_func_srand=${ac_cv_func_srand=yes} +ac_cv_func_srandom=${ac_cv_func_srandom=yes} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} +ac_cv_func_strchr=${ac_cv_func_strchr=yes} +ac_cv_func_strdup=${ac_cv_func_strdup=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} +ac_cv_func_strftime=${ac_cv_func_strftime=yes} +ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} +ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} +ac_cv_func_symlink=${ac_cv_func_symlink=yes} +ac_cv_func_usleep=${ac_cv_func_usleep=yes} +ac_cv_func_utime=${ac_cv_func_utime=yes} +ac_cv_func_utimes=${ac_cv_func_utimes=yes} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} +ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} +ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} +ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} +ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} +samba_cv_socklen_t=${samba_cv_socklen_t=yes} + +# Yes, we know Linux supports fcntl locking. Just ignore +# any errors caused by building on an NFS mount. +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} + + +# smbwrapper doesn't work because the glibc maintainers don't want +# to support transparent userland VFS. We might as well preempt +# any checks for shadowed symbols that are only useful for smbwrapper. + +ac_cv_func___acl=${ac_cv_func___acl=no} +ac_cv_func__acl=${ac_cv_func__acl=no} +ac_cv_func___chdir=${ac_cv_func___chdir=no} +ac_cv_func__chdir=${ac_cv_func__chdir=no} +ac_cv_func___close=${ac_cv_func___close=no} +ac_cv_func__close=${ac_cv_func__close=no} +ac_cv_func___closedir=${ac_cv_func___closedir=no} +ac_cv_func__closedir=${ac_cv_func__closedir=no} +ac_cv_func___dup=${ac_cv_func___dup=no} +ac_cv_func__dup=${ac_cv_func__dup=no} +ac_cv_func___dup2=${ac_cv_func___dup2=no} +ac_cv_func__dup2=${ac_cv_func__dup2=no} +ac_cv_func___facl=${ac_cv_func___facl=no} +ac_cv_func__facl=${ac_cv_func__facl=no} +ac_cv_func___fchdir=${ac_cv_func___fchdir=no} +ac_cv_func__fchdir=${ac_cv_func__fchdir=no} +ac_cv_func___fcntl=${ac_cv_func___fcntl=no} +ac_cv_func__fcntl=${ac_cv_func__fcntl=no} +ac_cv_func___fork=${ac_cv_func___fork=no} +ac_cv_func__fork=${ac_cv_func__fork=no} +ac_cv_func___fstat=${ac_cv_func___fstat=no} +ac_cv_func__fstat=${ac_cv_func__fstat=no} +ac_cv_func___fstat64=${ac_cv_func___fstat64=no} +ac_cv_func__fstat64=${ac_cv_func__fstat64=no} +ac_cv_func___fxstat=${ac_cv_func___fxstat=no} +ac_cv_func___getcwd=${ac_cv_func___getcwd=no} +ac_cv_func__getcwd=${ac_cv_func__getcwd=no} +ac_cv_func___getdents=${ac_cv_func___getdents=no} +ac_cv_func__getdents=${ac_cv_func__getdents=no} +ac_cv_func___llseek=${ac_cv_func___llseek=no} +ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} +ac_cv_func__llseek=${ac_cv_func__llseek=no} +ac_cv_func___lseek=${ac_cv_func___lseek=no} +ac_cv_func__lseek=${ac_cv_func__lseek=no} +ac_cv_func___lstat=${ac_cv_func___lstat=no} +ac_cv_func__lstat=${ac_cv_func__lstat=no} +ac_cv_func___lstat64=${ac_cv_func___lstat64=no} +ac_cv_func__lstat64=${ac_cv_func__lstat64=no} +ac_cv_func___lxstat=${ac_cv_func___lxstat=no} +ac_cv_func___open=${ac_cv_func___open=no} +ac_cv_func__open=${ac_cv_func__open=no} +ac_cv_func___open64=${ac_cv_func___open64=no} +ac_cv_func__open64=${ac_cv_func__open64=no} +ac_cv_func___opendir=${ac_cv_func___opendir=no} +ac_cv_func__opendir=${ac_cv_func__opendir=no} +ac_cv_func___pread=${ac_cv_func___pread=no} +ac_cv_func__pread=${ac_cv_func__pread=no} +ac_cv_func___pread64=${ac_cv_func___pread64=no} +ac_cv_func__pread64=${ac_cv_func__pread64=no} +ac_cv_func___pwrite=${ac_cv_func___pwrite=no} +ac_cv_func__pwrite=${ac_cv_func__pwrite=no} +ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} +ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} +ac_cv_func___read=${ac_cv_func___read=no} +ac_cv_func__read=${ac_cv_func__read=no} +ac_cv_func___readdir=${ac_cv_func___readdir=no} +ac_cv_func__readdir=${ac_cv_func__readdir=no} +ac_cv_func___readdir64=${ac_cv_func___readdir64=no} +ac_cv_func__readdir64=${ac_cv_func__readdir64=no} +ac_cv_func___seekdir=${ac_cv_func___seekdir=no} +ac_cv_func__seekdir=${ac_cv_func__seekdir=no} +ac_cv_func___stat=${ac_cv_func___stat=no} +ac_cv_func__stat=${ac_cv_func__stat=no} +ac_cv_func___stat64=${ac_cv_func___stat64=no} +ac_cv_func__stat64=${ac_cv_func__stat64=no} +ac_cv_func___telldir=${ac_cv_func___telldir=no} +ac_cv_func__telldir=${ac_cv_func__telldir=no} +ac_cv_func___write=${ac_cv_func___write=no} +ac_cv_func__write=${ac_cv_func__write=no} +ac_cv_func___xstat=${ac_cv_func___xstat=no} + + + +# Miscellaneous stuff that isn't, and shouldn't be, available +# in Debian. Those interested in building debs for other systems may +# need to remove some of these defines. + +ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} +ac_cv_func_crypt16=${ac_cv_func_crypt16=no} +ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} +ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} +ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} +ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} +ac_cv_func_rdchk=${ac_cv_func_rdchk=no} +ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} +ac_cv_func_setgidx=${ac_cv_func_setgidx=no} +ac_cv_func_setluid=${ac_cv_func_setluid=no} +ac_cv_func_setpriv=${ac_cv_func_setpriv=no} +ac_cv_func_setuidx=${ac_cv_func_setuidx=no} +ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} +ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} +ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} +ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} +ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} +ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} +ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} +ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} +ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} +ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/unstable/config.cache.alpha-linux b/packaging/Debian/unstable/config.cache.alpha-linux new file mode 100644 index 00000000000..6d171920263 --- /dev/null +++ b/packaging/Debian/unstable/config.cache.alpha-linux @@ -0,0 +1,12 @@ +# 22 Aug 2001 Steve Langasek + +# This file contains autoconf settings specific to the alpha-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/config.cache.sparc-linux b/packaging/Debian/unstable/config.cache.sparc-linux new file mode 100644 index 00000000000..a2a21b1d3ad --- /dev/null +++ b/packaging/Debian/unstable/config.cache.sparc-linux @@ -0,0 +1,13 @@ +# 24 Spe 2001 Steve Langasek + +# This file contains autoconf settings specific to the sparc-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresuid=${samba_cv_have_setresuid=no} +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/control b/packaging/Debian/unstable/control new file mode 100644 index 00000000000..24356161b1b --- /dev/null +++ b/packaging/Debian/unstable/control @@ -0,0 +1,121 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Eloy A. Paris +Build-Depends: debhelper (>=2.0.103), libpam0g-dev, libreadline4-dev, libcupsys2-dev +Standards-Version: 3.1.1 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends} +Replaces: samba-common (<= 2.0.5a-2) +Suggests: samba-doc +Description: A LanManager like file and printer server for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + As of Samba 2.0.6-1, the Samba Debian packages consist of the following: + . + samba - A LanManager like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - A LanManager like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfs - Mount and umount commands for the smbfs (kernels 2.0.x and above). + +Package: samba-common +Architecture: any +Depends: libpam-modules, ${shlibs:Depends} +Replaces: samba (<= 2.0.5a-2) +Description: Samba common files used by both the server and the client. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Provides: samba-client +Suggests: smbfs +Description: A LanManager like simple client for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains some client components of the Samba suite. In + particular it includes the command line utilities smbclient, smbtar, + and smbspool. If you want to mount shares exported from Microsoft + Windows machines or a Samba server you must install the smbfs package. + +Package: swat +Architecture: any +Depends: samba (= ${Source-Version}), ${shlibs:Depends} +Recommends: samba-doc +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration of the Samba server. + +Package: samba-doc +Section: doc +Architecture: all +Description: Samba documentation. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Suggests: smbclient +Replaces: smbfsx +Conflicts: smbfsx, suidmanager (<< 0.50) +Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + Lan Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + If you want to use command-line utilites like smbclient, smbtar + and/or smbspool just need to install the smbclient package. + . + Starting with the Debian Samba packages version 2.2.0-1, the old smbfs + utilities for 2.0.x have been removed. There are no wrapper scripts + that call a specific smbmount/smbmount depending on the kernel version. + If you are using a 2.0.x kernel please upgrade or use the latest Samba + 2.0.7 Debian package. + +Package: libpam-smbpass +Section: admin +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Suggests: samba +Description: pluggable authentication module for SMB password database + This is a stackable PAM module that allows a system administrator to easily + migrate to using encrypted passwords for Samba and to keep smb passwords in + sync with unix passwords. Unlike other solutions, it does this without + requiring users to change their existing passwords or login to Samba using + cleartext passwords. diff --git a/packaging/Debian/unstable/control.smbwrapper b/packaging/Debian/unstable/control.smbwrapper new file mode 100644 index 00000000000..70444ca5f58 --- /dev/null +++ b/packaging/Debian/unstable/control.smbwrapper @@ -0,0 +1,111 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Eloy A. Paris +Standards-Version: 2.4.0.0 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: samba-common (<= 2.0.5a-2) +Suggests: samba-doc +Description: A LanManager like file and printer server for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + As of Samba 2.0.0, the Samba Debian packages consist of the following: + . + samba - A LanManager like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - A LanManager like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfsx - Mount and umount commands for the smbfs and kernels > 2.1.70. + smbwrapper - A shared library that provides SMB client services + +Package: samba-common +Architecture: any +Depends: ${shlibs:Depends} +Replaces: samba (<= 2.0.5a-2) +Description: Samba common files used by both the server and the client. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Description: A LanManager like simple client for Unix. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the client components of the Samba suite. + +Package: swat +Architecture: any +Depends: samba, ${shlibs:Depends} +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration fo the Samba server. + +Package: samba-doc +Architecture: all +Description: Samba documentation. + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: smbfsx +Conflicts: smbfsx +Description: Mount and umount commands for the smbfs (2.0.x and 2.1.x kernels) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + Lan Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + Starting with the Debian Samba packages version 2.0.4b-2, the old smbfs + utilities for 2.0.x and the new smbfs utilities for 2.2.x kernels have been + merged in a single package called smbfs. A wrapper script called smbmount.sh + identifies the version of the kernel running and calls the correct binary. + +Package: smbwrapper +Section: otherosfs +Priority: optional +Architecture: any +Depends: ${shlibs:Depends} +Description: A shared library that provides SMB client services + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or Netbios protocol. + . + This package contains prelodable shared library that provides SMB client + services for existing executables. Using this you can simulate a smb + filesystem. diff --git a/packaging/Debian/unstable/copyright b/packaging/Debian/unstable/copyright new file mode 100644 index 00000000000..95bac89a540 --- /dev/null +++ b/packaging/Debian/unstable/copyright @@ -0,0 +1,36 @@ +This is the Debian Linux prepackaged version of the Samba SMB +(LAN-Manager) server. Samba was written by Andrew Tridgell + and many others. + +This package was put together by Eloy Paris +based on previous work by Klee Dienes , +Andrew Howell and Bruce Perens +from sources found at . + +As of early in the samba-2.0.0alpha series, the Samba package for Debian +was split into the following packages: + +- samba (the Samba server) +- smbclient (a LAN Manager client - like the ftp program) +- swat (Samba Web Administration Tool) +- smbfs (smbfs userland utilities for kernels > 2.0.x) +- samba-doc (Samba documentation). + +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/unstable/cron.daily b/packaging/Debian/unstable/cron.daily new file mode 100644 index 00000000000..42fc98d8f6d --- /dev/null +++ b/packaging/Debian/unstable/cron.daily @@ -0,0 +1,16 @@ +#!/bin/sh +# +# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. +# +# Written by Eloy A. Paris for the Debian project. +# + +BAK=/var/backups + +umask 022 +if cd $BAK; then + # Make sure /etc/samba/smbpasswd exists + if [ -f /etc/samba/smbpasswd ]; then + cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak + fi +fi diff --git a/packaging/Debian/unstable/docs b/packaging/Debian/unstable/docs new file mode 100644 index 00000000000..187fdd34058 --- /dev/null +++ b/packaging/Debian/unstable/docs @@ -0,0 +1,3 @@ +README +Roadmap +WHATSNEW.txt diff --git a/packaging/Debian/unstable/init.d b/packaging/Debian/unstable/init.d new file mode 100644 index 00000000000..8ac2e97148f --- /dev/null +++ b/packaging/Debian/unstable/init.d @@ -0,0 +1,94 @@ +#!/bin/sh +# +# Start/stops the Samba daemons (nmbd and smbd). +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +# clear conflicting settings from the environment +unset TMPDIR + +# Sanity check: see if Samba has been configured on this system. +if [ ! -f $DEBIAN_CONFIG ]; then + echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" + echo "with the installation of Samba on this system. Please re-install" + echo "Samba. I can't continue!!!" + exit 1 +fi + +# Read current Samba configuration +. $DEBIAN_CONFIG + +# the Samba daemons. + +# If Samba is running from inetd then there is nothing to do +if [ "$run_mode" = "from_inetd" ]; then + # Commented out to close bug #26884 (startup message is rather long). I + # have yet to think how to let the user know that if he/she is running + # Samba from inetd, he can't just "/etc/init.d/samba stop" to stop + # the Samba daemons. +# echo "Warning: Samba is not running as daemons. Daemons not restarted/stopped." +# echo "Daemons will start automatically by inetd (if you wanted to start Samba)." +# echo "If you want to stop Samba, get the PID's of all nmbd and smbd processes" +# echo "and send them a SIGTERM signal but keep in mind that inetd could restart them." + exit 0 +fi + +# See if the daemons are there +test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 + +case "$1" in + start) + echo -n "Starting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + echo -n " smbd" + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + + echo "." + ;; + stop) + echo -n "Stopping Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --stop --quiet --pidfile $NMBDPID + + echo -n " smbd" + start-stop-daemon --stop --quiet --pidfile $SMBDPID + + echo "." + ;; + reload) + echo -n "Reloading /etc/samba/smb.conf (smbd only)" + start-stop-daemon --stop --signal HUP --pidfile $SMBDPID + + echo "." + ;; + restart|force-reload) + echo -n "Restarting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --stop --quiet --pidfile $NMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + echo -n " smbd" + start-stop-daemon --stop --quiet --pidfile $SMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + + echo "." + ;; + *) + echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/Debian/unstable/libpam-smbpass.files b/packaging/Debian/unstable/libpam-smbpass.files new file mode 100644 index 00000000000..4263df5c0f0 --- /dev/null +++ b/packaging/Debian/unstable/libpam-smbpass.files @@ -0,0 +1 @@ +lib/security/pam_smbpass.so diff --git a/packaging/Debian/unstable/mksmbpasswd.8 b/packaging/Debian/unstable/mksmbpasswd.8 new file mode 100644 index 00000000000..0a500102e8a --- /dev/null +++ b/packaging/Debian/unstable/mksmbpasswd.8 @@ -0,0 +1,28 @@ +.TH MKSMBPASSWD 8 12-Apr-1998 +.SH NAME +mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file +.SH SYNOPSIS +mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd +.SH DESCRIPTION +.B mksmbpasswd +should be used only once, the first time Samba is installed. The idea +is to ease accounts creation by transferring all user accounts from +/etc/passwd to /etc/samba/smbpasswd. +.PP +Please note that passwords are not transferred automatically from +/etc/passwd to the new /etc/samba/smbpasswd file. After running +.B mksmbpasswd +all accounts are disabled so the system administrator must run +smbpasswd for each account that needs to be enable. +.SH FILES +.TP +/etc/passwd +System wide accounts file +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris (man page based on sendmailconfig's man page +by Robert Leslie ) diff --git a/packaging/Debian/unstable/mksmbpasswd.awk b/packaging/Debian/unstable/mksmbpasswd.awk new file mode 100644 index 00000000000..a7b41a725d3 --- /dev/null +++ b/packaging/Debian/unstable/mksmbpasswd.awk @@ -0,0 +1,5 @@ +#!/usr/bin/awk -f +BEGIN {FS=":" + printf("#\n# SMB password file.\n#\n") + } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/unstable/rules b/packaging/Debian/unstable/rules new file mode 100644 index 00000000000..a2c37510b32 --- /dev/null +++ b/packaging/Debian/unstable/rules @@ -0,0 +1,229 @@ +#!/usr/bin/make -f +# +# Important modifications (introduction of a saved config.cache to +# solve build problems) we introduced in Samba 2.2.1a-5. These +# modification were made by Steve Langasek . +# + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=2 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Set the host and build architectures for use with config.cache loading, +# cross-building, etc. +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +export DEB_HOST_GNU_TYPE +export DEB_BUILD_GNU_TYPE + +BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + +DESTDIR=`pwd`/debian/samba +SWATDIR=`pwd`/debian/swat +SAMBABOOK=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/state/samba \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat \ + SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba \ + CODEPAGEDIR=$(DESTDIR)/usr/share/samba/codepages + +configure: configure-stamp +configure-stamp: + dh_testdir + + # Add here commands to configure the package. +# > +# > Does the --with-fhs option work in configure? I tried it with +# > alpha3, but everything was stored in /usr/local. Is that correct? +# > ... +# +# Yes - the default prefix is still /usr/local; --with-fhs just +# changes the default paths for the config, etc. files to match +# the GNU/FHS specs. To get a complete FHS directory spec, use: +# +# ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ +# --localstatedir=/var + + if [ -f debian/config.cache ]; then \ + cp -f debian/config.cache source/config.cache; \ + fi + +# [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) + [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first +# $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + $(MAKE) -C source all smbtorture + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean +# -$(MAKE) -C source clean + -$(MAKE) -C source distclean + rm -f source/bin/rpctorture + rm -f source/bin/smbtorture + rm -f source/bin/debug2html + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + install -m 0755 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + + # For CUPS to support printing to samba printers, it's necessary + # to make the following symlink (according to + # Erich Schubert in #109509): + ln -s /usr/bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb + + # To avoid duplication of a large number of files, the swat package + # does not contain the "Using Samba" book nor the HTML docs. + # Instead, these are provided by the samba-doc package and + # are accessed through symlinks provided in the swat package. + # Here we create the symlink for the book, and the symlinks + # for the HTML files are created by the script installswat.sh. + ln -s ../../../doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba + + # Install man pages for files without man pages in the upstream sources + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # smbrun is not longer needed by smbd, so delete its man page + rm $(DESTDIR)/usr/share/man/man1/smbrun.1 + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # These files are not part of the main samba package, move to where they + # belong... + #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ + + # Install samba-common's conffiles - they'll get moved later to their + # correct place by dh_movefiles. + cp debian/smb.conf $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + + dh_movefiles --sourcedir=debian/samba/ + + # Remove empty directories that will never be used. + rmdir $(DESTDIR)/sbin + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: DH_OPTIONS=-i +binary-indep: build install + # Need this version of debhelper for DH_OPTIONS to work. + dh_testversion 1.1.17 + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build + dh_installexamples +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + dh_installdeb +# dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +# Pass -a to all debhelper commands in this target to reduce clutter. +binary-arch: DH_OPTIONS=-a +binary-arch: build install + # Need this version of debhelper for DH_OPTIONS to work. + dh_testversion 1.1.17 + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build + dh_installexamples +# dh_installmenu + dh_installlogrotate +# dh_installemacsen +# dh_installpam + dh_installinit + dh_installcron +# dh_installmanpages +# dh_installinfo + dh_undocumented + dh_installchangelogs + dh_strip + dh_link + dh_compress + dh_fixperms + + # You may want to make some executables suid here. + # The smbmnt, smbmount and smbumount binaries must be setuid-root. + chmod u+s debian/smbfs/usr/bin/smbmnt + chmod u+s debian/smbfs/usr/bin/smbmount + chmod u+s debian/smbfs/usr/bin/smbumount + + # Set some reasonable default perms for the samba logdir. + chmod 0750 $(DESTDIR)/var/log/samba/ + chown root.adm $(DESTDIR)/var/log/samba/ + + dh_installdeb +# dh_makeshlibs +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/unstable/rules.old b/packaging/Debian/unstable/rules.old new file mode 100644 index 00000000000..ac322185a9d --- /dev/null +++ b/packaging/Debian/unstable/rules.old @@ -0,0 +1,194 @@ +#!/usr/bin/make -f +# Made with the iad of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BVARS = BASEDIR=/usr \ + LIBDIR=/etc/samba \ + SMB_PASSWD_FILE=/etc/samba/smbpasswd \ + SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ + LOCKDIR=/var/samba \ + SWATDIR=/usr/share/samba/swat + +DESTDIR=`pwd`/debian/tmp +SWATDIR=`pwd`/debian/swat +SAMBABOOK=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/samba \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat \ + SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba + +build: build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first + [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) + $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + + # Now compile the old smbfs package + $(MAKE) -C source/smbfs-2.0.x + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean + -$(MAKE) -C source distclean +# -$(MAKE) -C source clean + rm -f source/bin/{rpctorture,smbtorture,debug2html} + + # Now clean the old smbfs-2.0.x package + -$(MAKE) -C source/smbfs-2.0.x clean + + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + + # To avoid duplication of a large number of files, the swat package + # does not contain the "Using Samba" book nor the HTML docs. + # Instead, these are provided by the samba-doc package and + # are accessed through symlinks provided in the swat package. + # Here we create the symlink for the book, and the symlinks + # for the HTML files are created by the script installswat.sh. + ln -s /usr/share/doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba + + # Install man pages for files without man pages in the upstream dist. + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # smbrun is not longer needed by smbd, so delete its man page + rm $(DESTDIR)/usr/share/man/man1/smbrun.1 + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # We need to rename the SMB mount utilities so they don't have the same + # names as the files in the smbfs package. + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 + + # These files are not part of the main samba package, move to where they + # belong... + #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ + + # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must + # be setuid-root. + chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x + + # Install samba-common's conffiles + cp debian/smb.conf $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + + # OK, now it's time to install the smbfs-2.0.2 files + $(MAKE) -C source/smbfs-2.0.x install $(IVARS) + + # Rename the old smbfs utilities to more convenient names + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 + + # Now install the smbmount and smbumount wrappers and its man pages + install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount + install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount + install -m 0644 debian/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount.8 + install -m 0644 debian/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount.8 + + # Install some docs. that go in "unusual" places + cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ + cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ + + dh_movefiles + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# dh_testversion + dh_testdir -i + dh_testroot -i + dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -i +# dh_installmenu -i +# dh_installemacsen -i +# dh_installinit -i +# dh_installcron -i +# dh_installmanpages -i + dh_undocumented + dh_installchangelogs -i + dh_compress -i +# dh_suidregister -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir -a + dh_testroot -a + dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt -A debian/README.linux + dh_installexamples -a +# dh_installmenu -a +# dh_installemacsen -a + dh_installinit -a + dh_installcron -a +# dh_installmanpages -a + dh_undocumented + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_suidregister -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a +# dh_makeshlibs -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/rules.smbwrapper b/packaging/Debian/unstable/rules.smbwrapper new file mode 100644 index 00000000000..e3c72ee47c4 --- /dev/null +++ b/packaging/Debian/unstable/rules.smbwrapper @@ -0,0 +1,172 @@ +#!/usr/bin/make -f +# Made with the iad of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BVARS = BASEDIR=/usr \ + LIBDIR=/etc/samba \ + SMB_PASSWD_FILE=/etc/samba/smbpasswd \ + SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ + LOCKDIR=/var/samba \ + SWATDIR=/usr/share/samba/swat + +DESTDIR=`pwd`/debian/tmp +SWATDIR=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/etc/samba \ + VARDIR=$(DESTDIR)/var/samba \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat + +build: build-stamp +build-stamp: + dh_testdir + + # Compile the Samba package first + [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-smbwrapper) + $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html + + # Now compile the old smbfs package + $(MAKE) -C source/smbfs-2.0.x + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean + -$(MAKE) -C source distclean +# -$(MAKE) -C source clean + rm -f source/bin/{rpctorture,smbtorture,debug2html} + + # Now clean the old smbfs-2.0.x package + -$(MAKE) -C source/smbfs-2.0.x clean + + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # Install other stuff not installed by "make install" + install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd + install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ + install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ + install -m 0755 source/smbadduser $(DESTDIR)/usr/sbin/ + + # Install man pages for files without man pages in the upstream dist. + install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 + install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # smbrun is not longer needed by smbd, so delete its man page + rm $(DESTDIR)/usr/share/man/man1/smbrun.1 + + # We need to rename the SMB mount utilities so they don't have the same + # names as the files in the smbfs package. + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 + + # These files are not part of the main samba package, move to where they + # belong... + mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ + + # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must + # be setuid-root. + chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x + + # Install samba-common's conffiles + cp debian/smb.conf $(DESTDIR)/etc/samba/ + + + # OK, now it's time to install the smbfs-2.0.2 files + $(MAKE) -C source/smbfs-2.0.x install $(IVARS) + + # Rename the old smbfs utilities to more convenient names + mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x + mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x + mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 + mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 + + # Now install the smbmount and smbumount wrappers + install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount + install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount + + # Install some docs. that go in "unusual" places + cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ + cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ + + dh_movefiles + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# dh_testversion + dh_testdir -i + dh_testroot -i + dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -i +# dh_installmenu -i +# dh_installemacsen -i +# dh_installinit -i +# dh_installcron -i +# dh_installmanpages -i + dh_undocumented + dh_installchangelogs -i + dh_compress -i +# dh_suidregister -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir -a + dh_testroot -a + dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt + dh_installexamples -a +# dh_installmenu -a +# dh_installemacsen -a + dh_installinit -a + dh_installcron -a +# dh_installmanpages -a + dh_undocumented + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_suidregister -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a +# dh_makeshlibs -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/samba-common.conffiles b/packaging/Debian/unstable/samba-common.conffiles new file mode 100644 index 00000000000..b5703025dde --- /dev/null +++ b/packaging/Debian/unstable/samba-common.conffiles @@ -0,0 +1,2 @@ +/etc/samba/smb.conf +/etc/pam.d/samba diff --git a/packaging/Debian/unstable/samba-common.files b/packaging/Debian/unstable/samba-common.files new file mode 100644 index 00000000000..94f2e25f6a6 --- /dev/null +++ b/packaging/Debian/unstable/samba-common.files @@ -0,0 +1,7 @@ +etc/samba/ +usr/bin/nmblookup +usr/bin/smbpasswd +etc/pam.d/ +usr/share/man/man1/nmblookup.1 +usr/share/man/man8/smbpasswd.8 +usr/share/samba/codepages/ diff --git a/packaging/Debian/unstable/samba-common.postrm b/packaging/Debian/unstable/samba-common.postrm new file mode 100644 index 00000000000..2cd832b33d2 --- /dev/null +++ b/packaging/Debian/unstable/samba-common.postrm @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$1" = purge ]; then + # Remove any files left in /etc/samba/ + rm -Rf /etc/samba/ +fi diff --git a/packaging/Debian/unstable/samba-doc.docs b/packaging/Debian/unstable/samba-doc.docs new file mode 100644 index 00000000000..5ecd34993ee --- /dev/null +++ b/packaging/Debian/unstable/samba-doc.docs @@ -0,0 +1,9 @@ +README +docs/NT4_PlainPassword.reg +docs/THANKS +docs/Win95_PlainPassword.reg +docs/announce +docs/history +docs/textdocs/ +docs/faq/ +docs/htmldocs/ diff --git a/packaging/Debian/unstable/samba-doc.examples b/packaging/Debian/unstable/samba-doc.examples new file mode 100644 index 00000000000..6a78432b28c --- /dev/null +++ b/packaging/Debian/unstable/samba-doc.examples @@ -0,0 +1,3 @@ +examples/ +debian/wins2dns.awk +source/smbadduser diff --git a/packaging/Debian/unstable/samba.conffiles b/packaging/Debian/unstable/samba.conffiles new file mode 100644 index 00000000000..03f64414b06 --- /dev/null +++ b/packaging/Debian/unstable/samba.conffiles @@ -0,0 +1,2 @@ +/etc/cron.daily/samba +/etc/init.d/samba diff --git a/packaging/Debian/unstable/samba.dirs b/packaging/Debian/unstable/samba.dirs new file mode 100644 index 00000000000..237603750a1 --- /dev/null +++ b/packaging/Debian/unstable/samba.dirs @@ -0,0 +1,11 @@ +sbin +usr/bin +usr/sbin +var/log/samba +var/state/samba +etc/samba +etc/pam.d +usr/share +usr/share/samba +lib/security +usr/lib/cups/backend diff --git a/packaging/Debian/unstable/samba.logrotate b/packaging/Debian/unstable/samba.logrotate new file mode 100644 index 00000000000..9e96312986c --- /dev/null +++ b/packaging/Debian/unstable/samba.logrotate @@ -0,0 +1,15 @@ +/var/log/samba/log.smbd { + weekly + missingok + rotate 7 + compress + notifempty +} + +/var/log/samba/log.nmbd { + weekly + missingok + rotate 7 + compress + notifempty +} diff --git a/packaging/Debian/unstable/samba.pamd b/packaging/Debian/unstable/samba.pamd new file mode 100644 index 00000000000..1a5a14c7089 --- /dev/null +++ b/packaging/Debian/unstable/samba.pamd @@ -0,0 +1,5 @@ +auth required pam_unix.so nullok +account required pam_unix.so +session required pam_unix.so +password required pam_unix.so + diff --git a/packaging/Debian/unstable/samba.postinst b/packaging/Debian/unstable/samba.postinst new file mode 100644 index 00000000000..3d5dd0cf93b --- /dev/null +++ b/packaging/Debian/unstable/samba.postinst @@ -0,0 +1,218 @@ +#!/bin/sh +# +# Post-installation script for the Samba package for Debian GNU/Linux +# +# Written by Eloy A. Paris for the Debian project. +# +# The prerm script (run before the postinst) disables Samba in /etc/inetd.conf +# and stops both nmbd and smbd. So, when this script is run we +# know that neither nmbd nor smbd can start. +# + +case "$1" in + configure) + # continue below + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# Take care of the /usr/doc/ to /usr/shar/doc/ migration. +if [ -d /usr/doc -a ! -e /usr/doc/samba -a -d /usr/share/doc/samba ]; then + ln -sf ../share/doc/samba /usr/doc/samba +fi + +# Starting with Samba 2.0.7-4 the location of the WINS database, the browse +# database and other important run-time files are stored in +# /var/state/samba/ rather than in /var/samba/. The following +# code takes care of moving the files in the old directory to +# the new directory. +if [ -d /var/samba/ ]; then + mv /var/samba/* /var/state/samba/ + rmdir /var/samba/ +fi + +# Define some constants... +DEBIAN_CONFIG=/etc/samba/debian_config +CONFIG_VERSION=1 + +# Now some variables... +samba_configured=no + + +if [ -f $DEBIAN_CONFIG ]; then + . $DEBIAN_CONFIG + if [ "$config_version" -ge "$CONFIG_VERSION" ]; then + samba_configured=yes + fi +fi + +# If Samba is configured we don't want to pester the user with +# configuration questions, just tell him that he can reconfigure +# Samba at any time by running /usr/sbin/sambaconfig. +if [ "$samba_configured" = "no" ]; then + # Samba is not configured, go and ask the user the information needed + # to configure it, and configure it! + + # Create Debian specific configuration file + echo "config_version=$CONFIG_VERSION" > $DEBIAN_CONFIG + + # We always run /etc/init.d/samba, even if we run Samba from inetd. + # This script file takes care of handling the conflict of running + # from inetd or as daemons. + update-rc.d samba defaults >/dev/null + + # We want to add these entries to inetd.conf commented out. Otherwise + # UDP traffic could make inetd to start nmbd or smbd right during + # the configuration stage. + update-inetd --add "## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" + update-inetd --add "## netbios-ns dgram udp wait root /usr/sbin/tcpd /usr/sbin/nmbd -a" + + echo "" + echo Samba Configuration + echo ------------------- + echo "The Samba server may be run either as a daemon at startup, or it may be" + echo "run from the inetd meta-daemon upon request. If run as a daemon, the" + echo "server will always be ready, so starting sessions will be faster. If run" + echo "from the inetd meta-daemon some memory will be saved and utilities such" + echo "as the tcpd TCP-wrapper may be used for extra security. If you don't" + echo "know what to do, running from inetd is a safe choice." + echo "" + echo "Run Samba as daemons or from inetd?" + echo -n "Press 'D' to run as daemons or 'I' to run from inetd: [I] " + + read mode + test -n "$mode" || mode="I" + + case "$mode" in + [Dd]*) + echo "Samba will run as daemons. Run sambaconfig to reconfigure" + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + echo "run_mode=as_daemons" >> $DEBIAN_CONFIG + ;; + + *) + echo "Samba will run from inetd. Run sambaconfig to reconfigure" + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + echo "run_mode=from_inetd" >> $DEBIAN_CONFIG + ;; + esac + + if [ ! -f /etc/samba/smbpasswd ]; then + echo "" + echo "If you are going to use encrypted passwords you need to have a" + echo "separate password file for this (the format is different from " + echo "/etc/passwd). Right now you don't have an /etc/samba/smbpasswd file." + echo "Do you want to generate this new file from your existing" + echo -n "/etc/passwd file? [y/N] " + + read yn + test -n "$yn" || yn="N" + + if [ $yn = y -o $yn = Y ]; then + cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd + chmod 600 /etc/samba/smbpasswd + echo "" + echo "/etc/samba/smbpasswd now has the same user names as /etc/passwd. However," + echo "you need to run smbpasswd manually to set the password for each user." + echo "" + echo "smbpasswd_created=yes" >> $DEBIAN_CONFIG + else + echo "smbpasswd_created=no" >> $DEBIAN_CONFIG + fi + fi + + echo "" + + # Start Samba: nothing wrong will happen if Samba is running from inetd + # and /etc/init.d/samba is run. However, to simplify things, we + # do not run /etc/init.d/samba if we're running from inetd. + + if [ $mode = d -o $mode = D ]; then + echo -n "Samba will run as daemons - start Samba now? [Y/n] " + read yn + test -n "$yn" || yn="Y" + + case "$yn" in + [Nn]*) + echo "Not started; to start later, do: /etc/init.d/samba start" + echo -n "Press [ENTER] " + read line + ;; + + *) + /etc/init.d/samba start + ;; + esac + else + echo "Since you are running Samba from inetd, the daemons will start" + echo "automatically by inetd when there is traffic on the NetBIOS" + echo "ports." + echo -n "Press [ENTER] " + read line + fi +else # if (samba_configured) ... + # We are here because Samba was already configured... + + # At this point the NetBIOS daemons are disabled in /etc/inetd.conf. + # This is a consequence of what we did in the prerm. If Samba was + # configured to run from inetd we need to enable the entries in + # /etc/inetd.conf. + + # Read current Samba configuration + . $DEBIAN_CONFIG + + if [ "$run_mode" = "from_inetd" ]; then + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + fi + + echo "" + echo "Samba was already installed and configured so I skipped the " + echo "configuration questions. You can run the script /usr/sbin/sambaconfig" + echo "at any time to reconfigure Samba. See sambaconfig(8) for more" + echo "details. I will not even ask you if you want to restart Samba," + echo "I will just do it!" + echo "" + + /etc/init.d/samba start +fi # if (samba_configured) ... + +if test "$1" = configure && dpkg --compare-versions "$2" lt 2.0.0final-2 && [ -f /etc/samba/smbpasswd ]; then + + cat << EOF + +*** IMPORTANT *** + +The format of the smbpasswd file (which is used only if you are using +encrypted passwords) is different in Samba 2.0.0 and above. I will +covert it to the new format. + +EOF + + mv /etc/samba/smbpasswd /etc/samba/smbpasswd.old + cat /etc/samba/smbpasswd.old | /usr/bin/convert_smbpasswd \ + > /etc/samba/smbpasswd 2> /dev/null +fi + +# This check is a safety net: the /etc/samba/smbpasswd file must have +# permissions 600. +if [ -f /etc/samba/smbpasswd ]; then + chmod 600 /etc/samba/smbpasswd +fi + +# Do the same check for /var/backup/smbpasswd.bak, just in case. +if [ -f /var/backups/smbpasswd.bak ]; then + chmod 600 /var/backups/smbpasswd.bak +fi + +exit 0 diff --git a/packaging/Debian/unstable/samba.postrm b/packaging/Debian/unstable/samba.postrm new file mode 100644 index 00000000000..73b2f0d0a1f --- /dev/null +++ b/packaging/Debian/unstable/samba.postrm @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ "$1" = purge ]; then + update-rc.d samba remove >/dev/null + + # Remove WINS.DAT, BROWSE.DAT and lock information file + rm -Rf /var/samba/ + + # Remove any files in the old and obsolete /var/lock/samba directory + rm -Rf /var/lock/samba/ + + # Remove files left in /etc/samba/ + rm -Rf /etc/samba/debian_config + rm -Rf /etc/samba/MACHINE.SID + + # Remove log files + rm -f /var/log/[ns]mb* + + # Remove NetBIOS entries from /etc/inetd.conf + update-inetd --remove netbios-ssn + update-inetd --remove netbios-ns +else + # Not purging, do not remove NetBIOS entries from /etc/inetd.conf + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns +fi diff --git a/packaging/Debian/unstable/samba.preinst b/packaging/Debian/unstable/samba.preinst new file mode 100644 index 00000000000..6ebefb8fb1b --- /dev/null +++ b/packaging/Debian/unstable/samba.preinst @@ -0,0 +1,47 @@ +#!/bin/sh +# +# The purpose of the preinst script for the samba package is to help +# the migration of the conffiles smb.conf and smbpasswd from their +# old location (/etc/) to their new location (/etc/samba/). +# +# Thanks to Ben Pfaff for sharing on debian-devel +# his ideas about how to move conffiles to new locations. +# + +# First see if a smb.conf file currently exists. +test -f /etc/smb.conf || exit 0 + +# Now see if a smb.conf file exists in the new location. +test -e /etc/samba/smb.conf && exit 0 + +# +# Move smb.conf conffile from its old location (/etc/) to its new one +# (/etc/samba). +# +# If conffile exists in old location AND conffile does not exist on new +# location then... +# +if [ -f /etc/smb.conf -a ! -e /etc/samba/smb.conf ]; then + # The new location for the conffile should not exist yet, so we create the + # dir. + mkdir -p /etc/samba + + # Finally, move the conffile to its new location. + mv /etc/smb.conf /etc/samba/smb.conf +fi + +# +# Move smbpasswd conffile from its old location (/etc/) to its new one +# (/etc/samba). +# +# If conffile exists in old location AND conffile does not exist on new +# location then... +# +if [ -f /etc/smbpasswd -a ! -e /etc/samba/smbpasswd ]; then + # The new location for the conffile should not exist yet, so we create the + # dir. + mkdir -p /etc/samba + + # Finally, move the conffile to its new location. + mv /etc/smbpasswd /etc/samba/smbpasswd +fi diff --git a/packaging/Debian/unstable/samba.prerm b/packaging/Debian/unstable/samba.prerm new file mode 100644 index 00000000000..acd6d087b5c --- /dev/null +++ b/packaging/Debian/unstable/samba.prerm @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Pre-removal script for the Samba package for Debian GNU/Linux. +# +# Written by Eloy A. Paris for the Debian project. +# + +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +# The most important thing the prerm script must do is to stop the Samba +# daemons (nmbd and smbd). Note that this can be tricky since Samba +# can be running from the inetd meta-daemon or as daemons (it's a +# user choice). + +# Before we stop Samba we need to know how it is running (from inetd +# or as daemons). We could source in the debian_config file but it +# is safer to grep /etc/inetd.conf. +if grep -q '^netbios-ns' /etc/inetd.conf; then + # Samba is running from inetd. We need to disable the Samba daemons + # in /etc/inetd.conf before we stop the daemons. Otherwise traffic + # in the NetBIOS ports will make inetd start them again. + # + # Note: user preferences regarding the mode he/she wants Samba to + # be run (inetd or daemons) will be lost next. In the postinst + # we depend on the information present in the debian_config + # file to restore everything back to the way it was. + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + + # Now it is safe to stop the daemons... + + # I have just recalled that old versions of nmbd and smbd did not store + # their PID's in /var/samba/state/ (or whatever directory + # was used for this purpose in configure), so I can't use + # --pidfile in start-stop-daemon to stop nmbd or smbd. I + # will handle this by testing first whether the PID file exists. + if [ -f $NMBDPID ]; then + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID + else + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet + fi + + # nmbd must be dead by now, now it's smbd's turn + if [ -f $SMBDPID ]; then + start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID + else + start-stop-daemon --stop --oknodo --user root --name smbd --quiet + fi +elif [ -x /etc/init.d/samba ]; then # Old Samba packages didn't have a + # /etc/init.d/samba so we better + # check first. + # Samba is running as daemons. No problem here, just stop Samba... + /etc/init.d/samba stop +fi + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/samba ]; then + rm -f /usr/doc/samba +fi + +# Make sure there are no nmbd or smbd daemons running (security check) +# (as you see this code is commented out - so far I haven't had the need +# to do this sanity check - peloy, Aug. 23, 1998) +#ps -ax | grep nmbd +#if [ $? ... ]; then +# killall -9 nmbd +#fi + +#ps -ax | grep smbd +#if [ $? ... ]; then +# killall -9 smbd +#fi diff --git a/packaging/Debian/unstable/sambaconfig b/packaging/Debian/unstable/sambaconfig new file mode 100644 index 00000000000..0d35a519670 --- /dev/null +++ b/packaging/Debian/unstable/sambaconfig @@ -0,0 +1,130 @@ +#!/bin/sh +# +# Written by Eloy A. Paris for Debian GNU/Linux. +# + +PATH="/usr/sbin:/usr/bin:/sbin:/bin" +DEBIAN_CONFIG=/etc/samba/debian_config + +NMBDPID=/var/state/samba/nmbd.pid +SMBDPID=/var/state/samba/smbd.pid + +if [ ! -f $DEBIAN_CONFIG ]; then + echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" + echo "with the installation of Samba on this system. Please re-install" + echo "Samba." + exit 1 +fi + +# Read current Samba configuration +. $DEBIAN_CONFIG + +reload=1 + +while [ $# -gt 0 ] +do + case "$1" in + --run-from-inetd) + run_from_inetd=1 + shift + ;; + + --run-as-daemons) + run_from_inetd=0 + shift + ;; + --no-reload) + reload=0 + shift + ;; + + *) + echo "Usage: $0 [--run-from-inetd|--run-as-daemons] [no-reload]" >&2 + exit 1 + ;; + esac +done + +# Make sure there are no Samba daemons (nmbd or smbd) running +# + +if [ "$run_mode" = "from_inetd" ]; then + # Samba is running from inetd - need to disable inetd before + # killing the daemons. + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID + start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID +else + # Samba is running as daemons + /etc/init.d/samba stop +fi + +if [ "x$run_from_inetd" = "x" ] +then + echo "Run Samba as daemons or from inetd?" + echo -n "Press 'D' for to run as daemons or 'I' to run from inetd: [I] " + + read mode + test -n "$mode" || mode="I" + + case "$mode" in + [Dd]*) + run_from_inetd=0 + ;; + + *) + run_from_inetd=1 + ;; + esac +fi + +if [ "$run_from_inetd" = 1 ]; then + echo "Samba will run from inetd. Run sambaconfig to reconfigure." + echo "" + update-inetd --enable netbios-ssn + update-inetd --enable netbios-ns + run_mode="from_inetd" +else + echo "Samba will run as daemons. Run sambaconfig to reconfigure." + echo "" + update-inetd --disable netbios-ssn + update-inetd --disable netbios-ns + run_mode="as_daemons" +fi + +# Rebuild Debian configuration file (only thing that could have +# changed so far is the variable called "run_mode". + +# Start the Samba daemons (take care of whether the user used the --no-reload +# option and how Samba is running: from inetd or as daemons) +echo "config_version=$config_version" > $DEBIAN_CONFIG +echo "run_mode=$run_mode" >> $DEBIAN_CONFIG +echo "smbpasswd_created=$smbpasswd_created" >> $DEBIAN_CONFIG + +if [ "$reload" = 0 ]; then + echo "Samba will not start (--no-reload parameter provided). Please note" + echo "that if you configured Samba to run from inetd, the Samba daemons" + echo "will start automatically when there is traffic in the NetBIOS ports" +elif [ "$run_from_inetd" = 1 ]; then + echo "The --no-reload parameter was not provided so I assume you want" + echo "to have the Samba daemons started. Since you are running from inetd" + echo "the Samba daemosn will start automatically when there is traffic" + echo "in the NetBIOS ports." +else + echo -n "The --no-reload parameter was not provided, start Samba now? [Y/n] " + read yn + test -n "$yn" || yn="Y" + + case "$yn" in + [Nn]*) + echo "Not started; to start later, do: /etc/init.d/samba start" + echo -n "Press [ENTER] " + read line + ;; + + *) + /etc/init.d/samba start + ;; + esac +fi diff --git a/packaging/Debian/unstable/sambaconfig.8 b/packaging/Debian/unstable/sambaconfig.8 new file mode 100644 index 00000000000..2a0aaa9aa31 --- /dev/null +++ b/packaging/Debian/unstable/sambaconfig.8 @@ -0,0 +1,40 @@ +.TH SAMBACONFIG 8 06-Apr-1998 +.SH NAME +sambaconfig \- configure Samba for Debian systems +.SH SYNOPSIS +sambaconfig [--run-from-inetd|--run-as-daemons] [--no-reload] +.SH DESCRIPTION +.B sambaconfig +is used to simplify the configuration of samba(8) for use on Debian +systems. +.PP +You may run this program to (re)configure samba for your Debian system +at any time. +.PP +Normally +.B sambaconfig +will ask if you want to reload the Samba daemons after making changes to its +configuration. The --no-reload option will avoid this question. Note +that if Samba is running from inetd and --no-reload is not supplied no +questions is asked because Samba will start automatically from inetd +when there is traffic on the NetBIOS ports. +.SH FILES +.TP +/etc/inetd.conf +If the lines that start the NetBIOS daemons nmbd and smbd are +commented out then Samba will start as daemons from /etc/init.d/start +.TP +/etc/init.d/samba +Script that will start/stop/restart Samba when running as daemons +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.TP +/etc/samba/debian_config +Debian specific configuration information, it holds the mode in which +Samba is running (from inetd or as daemons). +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris (man page based on sendmailconfig's man page +by Robert Leslie ) diff --git a/packaging/Debian/unstable/smb.conf b/packaging/Debian/unstable/smb.conf new file mode 100644 index 00000000000..14cc20f49c4 --- /dev/null +++ b/packaging/Debian/unstable/smb.conf @@ -0,0 +1,147 @@ +; +; /etc/samba/smb.conf +; +; Sample configuration file for the Samba suite for Debian GNU/Linux +; +; Please see the manual page for smb.conf for detailed description of +; every parameter. +; + +[global] + printing = bsd + printcap name = /etc/printcap + load printers = yes + guest account = nobody + invalid users = root + +; "security = user" is always a good idea. This will require a Unix account +; in this server for every user accessing the server. + security = user + +; Change this for the workgroup your Samba server will part of + workgroup = WORKGROUP + + server string = %h server (Samba %v) + +; If you want Samba to log though syslog only then set the following +; parameter to 'yes'. Please note that logging through syslog in +; Samba is still experimental. + syslog only = no + +; We want Samba to log a minimum amount of information to syslog. Everything +; should go to /var/log/{smb,nmb} instead. If you want to log through +; syslog you should set the following parameter to something higher. + syslog = 0; + +; This socket options really speed up Samba under Linux, according to my +; own tests. + socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 + +; Passwords are encrypted by default. This way the latest Windows 95 and NT +; clients can connect to the Samba server with no problems. + encrypt passwords = yes + +; It's always a good idea to use a WINS server. If you want this server +; to be the WINS server for your network change the following parameter +; to "yes". Otherwise leave it as "no" and specify your WINS server +; below (note: only one Samba server can be the WINS server). +; Read BROWSING.txt for more details. + wins support = no + +; If this server is not the WINS server then specify who is it and uncomment +; next line. +; wins server = 172.16.0.10 + +; Please read BROWSING.txt and set the next four parameters according +; to your network setup. There is no valid default so they are commented +; out. +; os level = 0 +; domain master = no +; local master = no +; preferred master = no + +; What naming service and in what order should we use to resolve host names +; to IP addresses + name resolve order = lmhosts host wins bcast + +; This will prevent nmbd to search for NetBIOS names through DNS. + dns proxy = no + +; Name mangling options + + preserve case = yes + short preserve case = yes + +; This boolean parameter controlls whether Samba attempts to sync. the Unix +; password with the SMB password when the encrypted SMB password in the +; /etc/samba/smbpasswd file is changed. + unix password sync = false + +; For Unix password sync. to work on a Debian GNU/Linux system, the following +; parameters must be set (thanks to Augustin Luton +; for sending the correct chat script for +; the passwd program in Debian Potato). + passwd program = /usr/bin/passwd %u + passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . + +; The following parameter is useful only if you have the linpopup package +; installed. The samba maintainer and the linpopup maintainer are +; working to ease installation and configuration of linpopup and samba. +; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & + +; The default maximum log file size is 5 MBytes. That's too big so this +; next parameter sets it to 1 MByte. Currently, Samba rotates log +; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes. +; A better solution would be to have Samba rotate the log file upon +; reception of a signal, but for now on, we have to live with this. + max log size = 1000 + + obey pam restrictions = yes + +[homes] + comment = Home Directories + browseable = no + +; By default, the home directories are exported read only. Change next +; parameter to "no" if you want to be able to write to them. + read only = yes + +; File creation mask is set to 0700 for security reasons. If you want to +; create files with group=rw permissions, set next parameter to 0775. + create mask = 0700 + +; Directory creation mask is set to 0700 for security reasons. If you want to +; create dirs. with group=rw permissions, set next parameter to 0775. + directory mask = 0700 + +[printers] + comment = All Printers + browseable = no + path = /tmp + printable = yes + public = no + writable = no + create mode = 0700 + +; A sample share for sharing your CD-ROM with others. +;[cdrom] +; comment = Samba server's CD-ROM +; writable = no +; locking = no +; path = /cdrom +; public = yes +; +; The next two parameters show how to auto-mount a CD-ROM when the +; cdrom share is accesed. For this to work /etc/fstab must contain +; an entry like this: +; +; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 +; +; The CD-ROM gets unmounted automatically after the connection to the +; +; If you don't want to use auto-mounting/unmounting make sure the CD +; is mounted on /cdrom +; +; preexec = /bin/mount /cdrom +; postexec = /bin/umount /cdrom + diff --git a/packaging/Debian/unstable/smbclient.files b/packaging/Debian/unstable/smbclient.files new file mode 100644 index 00000000000..f6ea8e14598 --- /dev/null +++ b/packaging/Debian/unstable/smbclient.files @@ -0,0 +1,9 @@ +usr/bin/smbclient +usr/bin/smbtar +usr/bin/rpcclient +usr/bin/smbtorture +usr/bin/smbspool +usr/share/man/man1/smbclient.1 +usr/share/man/man1/smbtar.1 +usr/share/man/man8/smbspool.8 +usr/lib/cups/backend/smb diff --git a/packaging/Debian/unstable/smbfs.files b/packaging/Debian/unstable/smbfs.files new file mode 100644 index 00000000000..77eb091880f --- /dev/null +++ b/packaging/Debian/unstable/smbfs.files @@ -0,0 +1,8 @@ +sbin/mount.smbfs +sbin/mount.smb +usr/bin/smbmount +usr/bin/smbumount +usr/bin/smbmnt +usr/share/man/man8/smbmount.8 +usr/share/man/man8/smbumount.8 +usr/share/man/man8/smbmnt.8 diff --git a/packaging/Debian/unstable/smbfs.suid b/packaging/Debian/unstable/smbfs.suid new file mode 100644 index 00000000000..9569087fff3 --- /dev/null +++ b/packaging/Debian/unstable/smbfs.suid @@ -0,0 +1,5 @@ +usr/bin/smbmnt +usr/bin/smbmount-2.2.x +usr/bin/smbumount-2.2.x +usr/bin/smbmount-2.0.x +usr/bin/smbumount-2.0.x diff --git a/packaging/Debian/unstable/smbwrapper.dirs b/packaging/Debian/unstable/smbwrapper.dirs new file mode 100644 index 00000000000..fd727bddf05 --- /dev/null +++ b/packaging/Debian/unstable/smbwrapper.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/samba diff --git a/packaging/Debian/unstable/smbwrapper.docs b/packaging/Debian/unstable/smbwrapper.docs new file mode 100644 index 00000000000..2924e78734a --- /dev/null +++ b/packaging/Debian/unstable/smbwrapper.docs @@ -0,0 +1,2 @@ +source/smbwrapper/README +source/smbwrapper/PORTING diff --git a/packaging/Debian/unstable/smbwrapper.files b/packaging/Debian/unstable/smbwrapper.files new file mode 100644 index 00000000000..08edbead6e6 --- /dev/null +++ b/packaging/Debian/unstable/smbwrapper.files @@ -0,0 +1 @@ +usr/bin/smbsh diff --git a/packaging/Debian/unstable/smbwrapper.substvars b/packaging/Debian/unstable/smbwrapper.substvars new file mode 100644 index 00000000000..2089e515d1b --- /dev/null +++ b/packaging/Debian/unstable/smbwrapper.substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.1) diff --git a/packaging/Debian/unstable/swat.dirs b/packaging/Debian/unstable/swat.dirs new file mode 100644 index 00000000000..d5df7df4b8e --- /dev/null +++ b/packaging/Debian/unstable/swat.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/samba/swat diff --git a/packaging/Debian/unstable/swat.docs b/packaging/Debian/unstable/swat.docs new file mode 100644 index 00000000000..afbfcf0c612 --- /dev/null +++ b/packaging/Debian/unstable/swat.docs @@ -0,0 +1 @@ +swat/README diff --git a/packaging/Debian/unstable/swat.files b/packaging/Debian/unstable/swat.files new file mode 100644 index 00000000000..6fed39111be --- /dev/null +++ b/packaging/Debian/unstable/swat.files @@ -0,0 +1,2 @@ +usr/sbin/swat +usr/share/man/man8/swat.8 diff --git a/packaging/Debian/unstable/swat.postinst b/packaging/Debian/unstable/swat.postinst new file mode 100644 index 00000000000..c5ab4890441 --- /dev/null +++ b/packaging/Debian/unstable/swat.postinst @@ -0,0 +1,23 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + *) + echo "$0: Unknown action \"$1\"" + exit 0 + ;; +esac + +# Set up swat, turned off by default. +update-inetd --group OTHER --add \ + '## swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' + +if [ -d /usr/doc -a ! -e /usr/doc/swat -a -d /usr/share/doc/swat ]; then + ln -sf ../share/doc/swat /usr/doc/swat +fi diff --git a/packaging/Debian/unstable/swat.postrm b/packaging/Debian/unstable/swat.postrm new file mode 100644 index 00000000000..e203d2855ff --- /dev/null +++ b/packaging/Debian/unstable/swat.postrm @@ -0,0 +1,19 @@ +#!/bin/sh + +case "$1" in + purge) + update-inetd --remove '/usr/sbin/swat$' + exit 0 + ;; + remove) + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "$0: unknown action \"$1\"" + exit 0 + ;; +esac + +exit 0 + diff --git a/packaging/Debian/unstable/wins2dns.awk b/packaging/Debian/unstable/wins2dns.awk new file mode 100644 index 00000000000..176868a115d --- /dev/null +++ b/packaging/Debian/unstable/wins2dns.awk @@ -0,0 +1,38 @@ +#!/usr/bin/awk -f +# +# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) +# From: Jason Gunthorpe +# To: samba@packages.debian.org +# Subject: Nifty samba script +# +# Here is a really nifty script I just wrote for samba, it takes the wins +# database in /var/samba/wins and writes out two dns files for it. In this +# way network wide wins clients can get into the dns for use by unix +# machines. +# +# Perhaps this could be included in /usr/doc/examples or somesuch. +# + +BEGIN { + FS="#|\""; +FORWARD="/tmp/wins.hosts" +REVERSE="/tmp/wins.rev" +DOMAIN="ven.ra.rockwell.com" +} +$3 == "00" { + split($4,a," " ); + split(a[2],b,"."); + while (sub(" ","-",$2)); + $2=tolower($2); + if (b[1] == "255") + next; + if (length($2) >= 8) + print $2"\ta\t"a[2] > FORWARD + else + print $2"\t\ta\t"a[2] > FORWARD + print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE +} +END { + system("echo killall -HUP named"); +} + -- cgit From 4cc3ae335bb92bbd8f3d76871b17636080fb750a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 20:46:07 +0000 Subject: Removing - mistake in add. Jeremy. --- packaging/Debian/unstable/README | 3 - packaging/Debian/unstable/README.build | 397 ------ packaging/Debian/unstable/README.debian | 67 - packaging/Debian/unstable/TODO | 4 - packaging/Debian/unstable/changelog | 1418 -------------------- packaging/Debian/unstable/config.cache | 231 ---- packaging/Debian/unstable/config.cache.alpha-linux | 12 - packaging/Debian/unstable/config.cache.sparc-linux | 13 - packaging/Debian/unstable/control | 121 -- packaging/Debian/unstable/control.smbwrapper | 111 -- packaging/Debian/unstable/copyright | 36 - packaging/Debian/unstable/cron.daily | 16 - packaging/Debian/unstable/docs | 3 - packaging/Debian/unstable/init.d | 94 -- packaging/Debian/unstable/libpam-smbpass.files | 1 - packaging/Debian/unstable/mksmbpasswd.8 | 28 - packaging/Debian/unstable/mksmbpasswd.awk | 5 - packaging/Debian/unstable/rules | 229 ---- packaging/Debian/unstable/rules.old | 194 --- packaging/Debian/unstable/rules.smbwrapper | 172 --- packaging/Debian/unstable/samba-common.conffiles | 2 - packaging/Debian/unstable/samba-common.files | 7 - packaging/Debian/unstable/samba-common.postrm | 6 - packaging/Debian/unstable/samba-doc.docs | 9 - packaging/Debian/unstable/samba-doc.examples | 3 - packaging/Debian/unstable/samba.conffiles | 2 - packaging/Debian/unstable/samba.dirs | 11 - packaging/Debian/unstable/samba.logrotate | 15 - packaging/Debian/unstable/samba.pamd | 5 - packaging/Debian/unstable/samba.postinst | 218 --- packaging/Debian/unstable/samba.postrm | 26 - packaging/Debian/unstable/samba.preinst | 47 - packaging/Debian/unstable/samba.prerm | 74 - packaging/Debian/unstable/sambaconfig | 130 -- packaging/Debian/unstable/sambaconfig.8 | 40 - packaging/Debian/unstable/smb.conf | 147 -- packaging/Debian/unstable/smbclient.files | 9 - packaging/Debian/unstable/smbfs.files | 8 - packaging/Debian/unstable/smbfs.suid | 5 - packaging/Debian/unstable/smbwrapper.dirs | 2 - packaging/Debian/unstable/smbwrapper.docs | 2 - packaging/Debian/unstable/smbwrapper.files | 1 - packaging/Debian/unstable/smbwrapper.substvars | 1 - packaging/Debian/unstable/swat.dirs | 2 - packaging/Debian/unstable/swat.docs | 1 - packaging/Debian/unstable/swat.files | 2 - packaging/Debian/unstable/swat.postinst | 23 - packaging/Debian/unstable/swat.postrm | 19 - packaging/Debian/unstable/wins2dns.awk | 38 - 49 files changed, 4010 deletions(-) delete mode 100644 packaging/Debian/unstable/README delete mode 100644 packaging/Debian/unstable/README.build delete mode 100644 packaging/Debian/unstable/README.debian delete mode 100644 packaging/Debian/unstable/TODO delete mode 100644 packaging/Debian/unstable/changelog delete mode 100644 packaging/Debian/unstable/config.cache delete mode 100644 packaging/Debian/unstable/config.cache.alpha-linux delete mode 100644 packaging/Debian/unstable/config.cache.sparc-linux delete mode 100644 packaging/Debian/unstable/control delete mode 100644 packaging/Debian/unstable/control.smbwrapper delete mode 100644 packaging/Debian/unstable/copyright delete mode 100644 packaging/Debian/unstable/cron.daily delete mode 100644 packaging/Debian/unstable/docs delete mode 100644 packaging/Debian/unstable/init.d delete mode 100644 packaging/Debian/unstable/libpam-smbpass.files delete mode 100644 packaging/Debian/unstable/mksmbpasswd.8 delete mode 100644 packaging/Debian/unstable/mksmbpasswd.awk delete mode 100644 packaging/Debian/unstable/rules delete mode 100644 packaging/Debian/unstable/rules.old delete mode 100644 packaging/Debian/unstable/rules.smbwrapper delete mode 100644 packaging/Debian/unstable/samba-common.conffiles delete mode 100644 packaging/Debian/unstable/samba-common.files delete mode 100644 packaging/Debian/unstable/samba-common.postrm delete mode 100644 packaging/Debian/unstable/samba-doc.docs delete mode 100644 packaging/Debian/unstable/samba-doc.examples delete mode 100644 packaging/Debian/unstable/samba.conffiles delete mode 100644 packaging/Debian/unstable/samba.dirs delete mode 100644 packaging/Debian/unstable/samba.logrotate delete mode 100644 packaging/Debian/unstable/samba.pamd delete mode 100644 packaging/Debian/unstable/samba.postinst delete mode 100644 packaging/Debian/unstable/samba.postrm delete mode 100644 packaging/Debian/unstable/samba.preinst delete mode 100644 packaging/Debian/unstable/samba.prerm delete mode 100644 packaging/Debian/unstable/sambaconfig delete mode 100644 packaging/Debian/unstable/sambaconfig.8 delete mode 100644 packaging/Debian/unstable/smb.conf delete mode 100644 packaging/Debian/unstable/smbclient.files delete mode 100644 packaging/Debian/unstable/smbfs.files delete mode 100644 packaging/Debian/unstable/smbfs.suid delete mode 100644 packaging/Debian/unstable/smbwrapper.dirs delete mode 100644 packaging/Debian/unstable/smbwrapper.docs delete mode 100644 packaging/Debian/unstable/smbwrapper.files delete mode 100644 packaging/Debian/unstable/smbwrapper.substvars delete mode 100644 packaging/Debian/unstable/swat.dirs delete mode 100644 packaging/Debian/unstable/swat.docs delete mode 100644 packaging/Debian/unstable/swat.files delete mode 100644 packaging/Debian/unstable/swat.postinst delete mode 100644 packaging/Debian/unstable/swat.postrm delete mode 100644 packaging/Debian/unstable/wins2dns.awk diff --git a/packaging/Debian/unstable/README b/packaging/Debian/unstable/README deleted file mode 100644 index 18e9bb94e6e..00000000000 --- a/packaging/Debian/unstable/README +++ /dev/null @@ -1,3 +0,0 @@ -See new packaging notes in ../README - -Eloy A. Paris Sat Feb 2 08:46:04 CST 2002 diff --git a/packaging/Debian/unstable/README.build b/packaging/Debian/unstable/README.build deleted file mode 100644 index 0a11a1f6ea6..00000000000 --- a/packaging/Debian/unstable/README.build +++ /dev/null @@ -1,397 +0,0 @@ -From: Steve Langasek -To: "Eloy A. Paris" -Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) -Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 -In-Reply-To: <20010823100906.A1092@antenas> -Message-ID: -MIME-Version: 1.0 -Content-Type: TEXT/PLAIN; charset=US-ASCII - -On Thu, 23 Aug 2001, Eloy A. Paris wrote: - -> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: - -> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, -> > cache) support into the package. Issues like this are frequent enough with -> > Samba, and the configure tests add enough time to the build process, that I -> > think there'd be much benefit in being able to step past a lot of these. - -> Uhhmmm... I don't know, I guess I don't like much the idea of -> maintaining a config.cache. It looks like extra work plus a -> compilation process that is "synthetic" or atificial. What happens if -> the Samba Team adds a new test, or modifies the configure script, will -> the config.cache pick those up? - -> In any case, you are the expert, so if you think that's the way to go, -> and the burden far exceeds the problems we have right now I say let's -> go for it. I am not well versed on autoconf and the configure process, -> that's all... - -Well, I'll attach my work to the bottom of this message and let you judge it -for yourself. - -The config.cache I'm trying to generate here is not equivalent to what -a configure script outputs. The only values I'm including are those which 1) -are no-brainers on any glibc-based platform, 2) are questions we need to force -a particular value for regardless of the kernel being built against, or 3) are -questions about specific bizarre features of proprietary Unices that we'll -always get an answer of 'no' to. - -I've removed all of the config.cache variables related to headers, or to -checks for particular libraries; I think it's pretty safe to assert that glibc -provides basic C functions like select(), setenv(), and waitpid() on all our -build targets, but I think it's less safe to assert that they'll always be -provided by particular header files. - -So the config.cache won't automatically be updated with answers to new -configure tests, but it also doesn't need to in order to be useful. There's -really only a handful of variables in there that we /need/ in order to -guarantee correctly-built packages, and if you want to leave out everything -else, that's perfectly ok too. Everything from the fifth stanza on down is -just a build-time speed-up for some of the slower architectures. Well, it -also has the fringe benefit that the packages will FAIL to build if someone -tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I -see that as a plus :), you may disagree, but in any case my next trick would -be to add a global variable developers can set to bypass the provided -config.cache. - - -It is a little artificial, but the whole point of .debs is to be able to build -binaries in a controlled environment. Right now, we don't really have control -over what happens in the autobuilders. We have even /less/ control over what -happens in a stable release: it's been two weeks now since I built binaries -for bug #94380, and they haven't been uploaded to security.d.o yet. I'm -guessing they won't be uploaded until Wichert is back from vacation, either -- -which is fine, but it would be nice if we didn't have to worry about -mis-builds by the security team, or about putting the security team to extra -trouble after the fact to get packages fixed. - -With a pre-loaded config.cache, we can ensure that bugs of this kind don't -happen in woody. We can take the arm autobuilder problem into our own hands, -and not have to worry about quirkiness in the build environment. We can even -close bug #109773, since we no longer have to worry about detecting the -setuid() routines. - - -So to me, it definitely seems worth it. But you're the maintainer, and I -won't ask you to put anything in the package that you're not comfortable with. - - -> By the way, I think I remember someone was able to build 2.2.x succesfully on -> the ARM. If this is the case, could it be that there's something weird -> with Phillip's setup? - -It could be. There are arm packages for 2.2.1a-1, so at /some/ point the -autobuilder was able to pass the locking test. - - -> P.S. How did you know about the ARM build problems? I don't see any -> bugs about this... - -, follow the links for samba... The -exact reference for the arm autobuilder is at -. - -Regards, -Steve Langasek -postmodern programmer - - -diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog ---- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 -+++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 -@@ -1,3 +1,12 @@ -+samba (2.2.1a-4.1) unstable; urgency=low -+ -+ * Fix up the build system to avoid needing to run configure as root to -+ answer questions we already know the answers to. -+ * In the process, make surprising progress towards being able to -+ cross-compile the samba packages. -+ -+ -- Steve Langasek Wed, 22 Aug 2001 23:35:00 -0500 -+ - samba (2.2.1a-4) unstable; urgency=low - - * Fixed typo in smbmount's mount page. -diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache ---- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 -+++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 -@@ -0,0 +1,231 @@ -+# -+# 22 August 2001 Steve Langasek -+# -+# This file is a shell script that caches the results of configure -+# tests run on this system so they can be shared between configure -+# scripts and configure runs. It is not useful on other systems. -+# If it contains results you don't want to keep, you may remove or edit it. -+# -+# By default, configure uses ./config.cache as the cache file, -+# creating it if it does not exist already. You can give configure -+# the --cache-file=FILE option to use a different cache file; that is -+# what configure does when it calls configure scripts in -+# subdirectories, so they share the cache. -+# Giving --cache-file=/dev/null disables caching, for debugging configure. -+# config.status only pays attention to the cache file if you give it the -+# --recheck option to rerun configure. -+# -+# -+# This config.cache file contains a list of acceptable autoconf -+# values which can be used in compiling Samba for Debian woody/sid. -+# -+# Autoconf sorts options alphabetically in its output. This file -+# groups options logically. -+ -+ -+# Load any architecture-specific settings -+if [ -n "$DEB_HOST_GNU_TYPE" \ -+ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then -+ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} -+fi -+ -+ -+# This is at the top because it's most in need of regular tweaking. -+# These are options which are supported on 2.4 kernels, but not on 2.2 -+# kernels. -+ -+samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} -+samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} -+samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} -+ -+ -+# These are present in 2.2 kernels, but not in 2.0... -+ -+samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} -+samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} -+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} -+ -+ -+# POSIX ACL support not present in Linux 2.2; not allowed in the -+# Debian packages, even if present on the build machine. -+ -+ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} -+ -+ -+# Various basic libc/compiler stuff that it's blindingly obvious that -+# Linux supports (now watch me get bitten for saying that) -+ -+ac_cv_c_const=${ac_cv_c_const=yes} -+ac_cv_c_inline=${ac_cv_c_inline=inline} -+samba_cv_volatile=${samba_cv_volatile=yes} -+ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} -+ac_cv_func_bzero=${ac_cv_func_bzero=yes} -+ac_cv_func_chmod=${ac_cv_func_chmod=yes} -+ac_cv_func_chown=${ac_cv_func_chown=yes} -+ac_cv_func_chroot=${ac_cv_func_chroot=yes} -+ac_cv_func_connect=${ac_cv_func_connect=yes} -+ac_cv_func_dup2=${ac_cv_func_dup2=yes} -+ac_cv_func_execl=${ac_cv_func_execl=yes} -+ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} -+ac_cv_func_fchown=${ac_cv_func_fchown=yes} -+ac_cv_func_fstat=${ac_cv_func_fstat=yes} -+ac_cv_func_fsync=${ac_cv_func_fsync=yes} -+ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} -+ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} -+ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} -+ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} -+ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} -+ac_cv_func_glob=${ac_cv_func_glob=yes} -+ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} -+ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} -+ac_cv_func_llseek=${ac_cv_func_llseek=yes} -+ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} -+ac_cv_func_memmove=${ac_cv_func_memmove=yes} -+ac_cv_func_memset=${ac_cv_func_memset=yes} -+ac_cv_func_mktime=${ac_cv_func_mktime=yes} -+ac_cv_func_pipe=${ac_cv_func_pipe=yes} -+ac_cv_func_poll=${ac_cv_func_poll=yes} -+ac_cv_func_pread=${ac_cv_func_pread=yes} -+ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} -+ac_cv_func_rand=${ac_cv_func_rand=yes} -+ac_cv_func_random=${ac_cv_func_random=yes} -+ac_cv_func_readlink=${ac_cv_func_readlink=yes} -+ac_cv_func_rename=${ac_cv_func_rename=yes} -+ac_cv_func_select=${ac_cv_func_select=yes} -+ac_cv_func_setenv=${ac_cv_func_setenv=yes} -+ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} -+ac_cv_func_setsid=${ac_cv_func_setsid=yes} -+ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} -+ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} -+ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} -+ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} -+ac_cv_func_srand=${ac_cv_func_srand=yes} -+ac_cv_func_srandom=${ac_cv_func_srandom=yes} -+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} -+ac_cv_func_strchr=${ac_cv_func_strchr=yes} -+ac_cv_func_strdup=${ac_cv_func_strdup=yes} -+ac_cv_func_strerror=${ac_cv_func_strerror=yes} -+ac_cv_func_strftime=${ac_cv_func_strftime=yes} -+ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} -+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} -+ac_cv_func_symlink=${ac_cv_func_symlink=yes} -+ac_cv_func_usleep=${ac_cv_func_usleep=yes} -+ac_cv_func_utime=${ac_cv_func_utime=yes} -+ac_cv_func_utimes=${ac_cv_func_utimes=yes} -+ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} -+ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} -+ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} -+ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} -+ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} -+ac_cv_type_size_t=${ac_cv_type_size_t=yes} -+ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} -+samba_cv_socklen_t=${samba_cv_socklen_t=yes} -+ -+# Yes, we know Linux supports fcntl locking. Just ignore -+# any errors caused by building on an NFS mount. -+samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} -+ -+ -+# smbwrapper doesn't work because the glibc maintainers don't want -+# to support transparent userland VFS. We might as well preempt -+# any checks for shadowed symbols that are only useful for smbwrapper. -+ -+ac_cv_func___acl=${ac_cv_func___acl=no} -+ac_cv_func__acl=${ac_cv_func__acl=no} -+ac_cv_func___chdir=${ac_cv_func___chdir=no} -+ac_cv_func__chdir=${ac_cv_func__chdir=no} -+ac_cv_func___close=${ac_cv_func___close=no} -+ac_cv_func__close=${ac_cv_func__close=no} -+ac_cv_func___closedir=${ac_cv_func___closedir=no} -+ac_cv_func__closedir=${ac_cv_func__closedir=no} -+ac_cv_func___dup=${ac_cv_func___dup=no} -+ac_cv_func__dup=${ac_cv_func__dup=no} -+ac_cv_func___dup2=${ac_cv_func___dup2=no} -+ac_cv_func__dup2=${ac_cv_func__dup2=no} -+ac_cv_func___facl=${ac_cv_func___facl=no} -+ac_cv_func__facl=${ac_cv_func__facl=no} -+ac_cv_func___fchdir=${ac_cv_func___fchdir=no} -+ac_cv_func__fchdir=${ac_cv_func__fchdir=no} -+ac_cv_func___fcntl=${ac_cv_func___fcntl=no} -+ac_cv_func__fcntl=${ac_cv_func__fcntl=no} -+ac_cv_func___fork=${ac_cv_func___fork=no} -+ac_cv_func__fork=${ac_cv_func__fork=no} -+ac_cv_func___fstat=${ac_cv_func___fstat=no} -+ac_cv_func__fstat=${ac_cv_func__fstat=no} -+ac_cv_func___fstat64=${ac_cv_func___fstat64=no} -+ac_cv_func__fstat64=${ac_cv_func__fstat64=no} -+ac_cv_func___fxstat=${ac_cv_func___fxstat=no} -+ac_cv_func___getcwd=${ac_cv_func___getcwd=no} -+ac_cv_func__getcwd=${ac_cv_func__getcwd=no} -+ac_cv_func___getdents=${ac_cv_func___getdents=no} -+ac_cv_func__getdents=${ac_cv_func__getdents=no} -+ac_cv_func___llseek=${ac_cv_func___llseek=no} -+ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} -+ac_cv_func__llseek=${ac_cv_func__llseek=no} -+ac_cv_func___lseek=${ac_cv_func___lseek=no} -+ac_cv_func__lseek=${ac_cv_func__lseek=no} -+ac_cv_func___lstat=${ac_cv_func___lstat=no} -+ac_cv_func__lstat=${ac_cv_func__lstat=no} -+ac_cv_func___lstat64=${ac_cv_func___lstat64=no} -+ac_cv_func__lstat64=${ac_cv_func__lstat64=no} -+ac_cv_func___lxstat=${ac_cv_func___lxstat=no} -+ac_cv_func___open=${ac_cv_func___open=no} -+ac_cv_func__open=${ac_cv_func__open=no} -+ac_cv_func___open64=${ac_cv_func___open64=no} -+ac_cv_func__open64=${ac_cv_func__open64=no} -+ac_cv_func___opendir=${ac_cv_func___opendir=no} -+ac_cv_func__opendir=${ac_cv_func__opendir=no} -+ac_cv_func___pread=${ac_cv_func___pread=no} -+ac_cv_func__pread=${ac_cv_func__pread=no} -+ac_cv_func___pread64=${ac_cv_func___pread64=no} -+ac_cv_func__pread64=${ac_cv_func__pread64=no} -+ac_cv_func___pwrite=${ac_cv_func___pwrite=no} -+ac_cv_func__pwrite=${ac_cv_func__pwrite=no} -+ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} -+ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} -+ac_cv_func___read=${ac_cv_func___read=no} -+ac_cv_func__read=${ac_cv_func__read=no} -+ac_cv_func___readdir=${ac_cv_func___readdir=no} -+ac_cv_func__readdir=${ac_cv_func__readdir=no} -+ac_cv_func___readdir64=${ac_cv_func___readdir64=no} -+ac_cv_func__readdir64=${ac_cv_func__readdir64=no} -+ac_cv_func___seekdir=${ac_cv_func___seekdir=no} -+ac_cv_func__seekdir=${ac_cv_func__seekdir=no} -+ac_cv_func___stat=${ac_cv_func___stat=no} -+ac_cv_func__stat=${ac_cv_func__stat=no} -+ac_cv_func___stat64=${ac_cv_func___stat64=no} -+ac_cv_func__stat64=${ac_cv_func__stat64=no} -+ac_cv_func___telldir=${ac_cv_func___telldir=no} -+ac_cv_func__telldir=${ac_cv_func__telldir=no} -+ac_cv_func___write=${ac_cv_func___write=no} -+ac_cv_func__write=${ac_cv_func__write=no} -+ac_cv_func___xstat=${ac_cv_func___xstat=no} -+ -+ -+ -+# Miscellaneous stuff that isn't, and shouldn't be, available -+# in Debian. Those interested in building debs for other systems may -+# need to remove some of these defines. -+ -+ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} -+ac_cv_func_crypt16=${ac_cv_func_crypt16=no} -+ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} -+ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} -+ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} -+ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} -+ac_cv_func_rdchk=${ac_cv_func_rdchk=no} -+ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} -+ac_cv_func_setgidx=${ac_cv_func_setgidx=no} -+ac_cv_func_setluid=${ac_cv_func_setluid=no} -+ac_cv_func_setpriv=${ac_cv_func_setpriv=no} -+ac_cv_func_setuidx=${ac_cv_func_setuidx=no} -+ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} -+ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} -+ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} -+ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} -+ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} -+ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} -+ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} -+ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} -+ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} -+ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} -diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux ---- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 -+++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 -@@ -0,0 +1,12 @@ -+# 22 Aug 2001 Steve Langasek -+ -+# This file contains autoconf settings specific to the alpha-linux -+# platform that should be preloaded when building for this architecture. -+ -+ -+# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but -+# Linux 2.4 does. Ensure that packages compiled for woody remain -+# compatible with 2.2 kernels, even if the build machine is running 2.4. -+samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -+samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} -diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules ---- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 -+++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 -@@ -15,6 +15,14 @@ - # This has to be exported to make some magic below work. - export DH_OPTIONS - -+# Set the host and build architectures for use with config.cache loading, -+# cross-building, etc. -+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -+ -+export DEB_HOST_GNU_TYPE -+export DEB_BUILD_GNU_TYPE -+ - BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb - - DESTDIR=`pwd`/debian/samba -@@ -48,8 +56,11 @@ - # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ - # --localstatedir=/var - -+ if [ -f debian/config.cache ]; then \ -+ cp -f debian/config.cache source/config.cache; \ -+ fi - # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) -- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) -+ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) - - touch configure-stamp - diff --git a/packaging/Debian/unstable/README.debian b/packaging/Debian/unstable/README.debian deleted file mode 100644 index b57e034ced9..00000000000 --- a/packaging/Debian/unstable/README.debian +++ /dev/null @@ -1,67 +0,0 @@ -samba for DEBIAN ----------------- - -This package was built by me (Eloy Paris ) based on work -from Bruce Perens , Andrew Howell , -Klee Dienes and Michael Meskes , -all previous maintainers of the packages samba and sambades (now merged -together - see below). - -Password encryption is now supported in the standard samba package -(>= 1.9.18alpha12-1). This has been possible because Samba 1.9.18 -and later does not depend on the DES encryption libraries. This makes -package sambades (part of the non-us section) obsolete. - -Also, there are no more export restrictions with this version of Samba. - -As of Samba 2.0.6-1, the Debian version of Samba is compiled with -Pluggable Authentication Modules (PAM) support. PAM support was -discontinued during the libc5 -> libc6 migration process and I never -brought it back until 2.0.6-1. I don't use PAM myself so let me know -if you find any problems. - -Since Samba 2.0.5a-3, the smbfs utilities included in the smbfs package -can now handle kernels > 2.0.x so there is no need to have two smbfs -packages. - -As of Samba 2.0.5a-5, the Samba sources produce the following binary packages: - -samba: A LanManager like file and printer server for Unix. -samba-common: Samba common files used by both the server and the client. -smbclient: A LanManager like simple client for Unix. -swat: Samba Web Administration Tool -samba-doc: Samba documentation. -smbfs: Mount and umount commands for the smbfs (works with 2.2.x and - above kernels, not with 2.0.x kernels.) - -Please note that the package smbwrapper (a shared library that provides -SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 -does not exist any more. The reason is that starting with Samba 2.0.6-1, that -code does not even compile, and the upstream author (Andrew Tridgell) -recommended to disable the compilation of smbwrapper until some issues -with glibc2.1 get cleared out (the problem is with glibc, not with Samba -itself). - -Support for NT Domains ----------------------- - -Samba 2.2 includes preliminary support for NT domains. A Samba server -can now be part of a Windows NT domain whose Primary Domain Controller -is a Windows NT server. This feature is supposed to be stable although I -haven't tried it myself. Read the documentation in the samba-doc package -for help on how to do this (hint: "security = domain" in the smb.conf -file). - -Samba 2.2 has also experimental support for Primary Domain -Controller. This means that a Samba server can act now as a PDC. There -are no special flags needed to compile Samba with NT domain PDC -support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation -section). - -Please note that NT domain PDC support is far from complete and is still -experimental. - -Your comments are welcome. - - -Eloy A. Paris , Sunday March 18, 2001. diff --git a/packaging/Debian/unstable/TODO b/packaging/Debian/unstable/TODO deleted file mode 100644 index 748f1edcd15..00000000000 --- a/packaging/Debian/unstable/TODO +++ /dev/null @@ -1,4 +0,0 @@ -* Check in the smbmount wrapper script that the kernel has support -for smbfs, as suggested by Jeroen Schaap -. - diff --git a/packaging/Debian/unstable/changelog b/packaging/Debian/unstable/changelog deleted file mode 100644 index a26c219600c..00000000000 --- a/packaging/Debian/unstable/changelog +++ /dev/null @@ -1,1418 +0,0 @@ -samba (2.2.1a.cvs20011002-1) experimental; urgency=low - - * Building from CVS sources. This code will become Samba 2.2.2 RSN. - * Temporary fix for #113763 (Steve Langasek) - - -- Eloy A. Paris Thu, 4 Oct 2001 00:02:08 -0400 - -samba (2.2.1a-9.1) unstable; urgency=low - - * Quick hack to avoid smbmount reveal password length. Please note - that even with this hack there is a small window when password is - completely visible with 'ps aux'. There are other methods that should - be used to automate mounting of SMB shares. - Closes: #112195: smbmount-2.2.x reveals password length. - * Applied patch from Steve Langasek to prevent - forcing use of setresuid() in Sparc. - Closes: #112779: samba build forces use of setresuid, which causes - smbd to fail on Sparc. - - -- Eloy A. Paris Mon, 24 Sep 2001 19:52:07 -0400 - -samba (2.2.1a-9) unstable; urgency=low - - * Replaced $(LD) with $(CC) all the way through source/Makefile. - Closes: #111036: ld shouldn't be used to link shlibs. - * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and - sgml as well.) - Closes: #110963: smb.conf: mail should be /usr/bin/mail. - * Documented better smbclient's -W behavior. Patch from Steve - Langasek. - Closes: #53672: smbclient: -W flag is interpreted as domain, not - workgroup. - - -- Eloy A. Paris Tue, 4 Sep 2001 23:10:41 -0400 - -samba (2.2.1a-8) unstable; urgency=low - - * Set some reasonable default perms for the samba logdir (again, - thanks to vorlon :-) - Closes: #72529: insecure permissions on log files. - - -- Eloy A. Paris Sun, 26 Aug 2001 15:40:47 -0400 - -samba (2.2.1a-7) unstable; urgency=low - - * Another attempt at fixing #47493. Patch from Steve Langasek - . Let's keep our fingers crossed Steve! - - -- Eloy A. Paris Sun, 26 Aug 2001 13:37:06 -0400 - -samba (2.2.1a-6) unstable; urgency=low - - * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing - smbd to die with signal 11 under some unidentified situations. - Closes: #109774: Latest debian version breaks printer driver download. - Closes: #109946: not all files appear in samba-exported directories. - * Another patch from Steve Langasek. This one adds quotes around - printer names for print systems it's reasonable for Debian to - support. Together with the patch in #29957 (see changelog for - 2.2.1a-4), this should take care of the problems with multi-word - printer names in Samba. - - -- Eloy A. Paris Fri, 24 Aug 2001 21:12:27 -0400 - -samba (2.2.1a-5) unstable; urgency=low - - * Important changes that affect how Samba is built on Debian - machines are implemented in this release. All of this changes - were suggested by the energetic Steve Langasek , - and his arguments were so sound and reasonable that I decided - to implement them. Here's Steve's original changelog: - - * Fix up the build system to avoid needing to run configure - as root to answer questions we already know the answers to. - * In the process, make surprising progress towards being able to - cross-compile the samba packages. - - -- Eloy A. Paris Fri, 24 Aug 2001 01:08:06 -0400 - -samba (2.2.1a-4) unstable; urgency=low - - * Fixed typo in smbmount's mount page. - Closes: #109317: smbfs: mistype in smbmount manpage. - * Included symlink to smbspool to better support CUPS printing. - Closes: #109509: include symlink for cups samba support. - * Applied patch from Steve Langasek to - fix bug #29957. - Closes: #29957: samba strips trailing " from strings in smb.conf. - * First attempt at fixing #47493. Another patch from Steve "I want - a bug-free Samba" Langasek. - Closes: #47493: Samba doesn't handle ':' in dir names right. - - -- Eloy A. Paris Tue, 21 Aug 2001 23:26:38 -0400 - -samba (2.2.1a-3) unstable; urgency=low - - * Steve Langasek has been hard at work in - the last few days looking at the long list of open bugs filed - against the Samba packages. I don't know how to thank him. It's been - a pleasure working with Steve, and all the fixes, patches, etc. in - this release come from him. The bug list is greatly reduced thanks - to Steve's efforts. - * Steve's additions/modifications/patches/etc. are: - - New package that (libpam-smbpass) provides pam_smbpass. Before, this - was provided in another package but now the sources are part of - the Samba sources so we can start providing it from here. - Closes: #107043 - pam_smbpass now present in Samba source, - should be built from there - - Patch to source/smbd/service.c that allows admins to call - /bin/umount from the root postexec of a Samba share. - Closes: #40561 - samba pre/postexec commands do not work. - - Clear TMPDIR before starting smbd in /etc/init.d/samba. - Closes: #51295 - Problems with Samba and TMPDIR. - - Correction to documentation of "guest only". - Closes #38282 - "guest only" share still requires a password. - * Applied patch from Santiago Vila to convert - /usr/sbin/mksmbpasswd from a shell script into a real awk script. - Sorry it took so long, Santiago; I hadn't realized you even - provided a patch :-) - Closes: #77891 - mksmbpasswd could be a real awk script. - * Updated description of the smbfs and smbclient packages. Also have - each package recommend the other. - Closes: #108650: Should suggest or recommend smbfs. - - -- Eloy A. Paris Mon, 13 Aug 2001 22:21:55 -0400 - -samba (2.2.1a-2) unstable; urgency=low - - * Build-depends: depend on debhelper (>=2.0.103). - Closes: #105795: Build-Depends are wrong. - * Run samba's preinst and postinst scripts without -e so failed commands - do not abort installation. - Closes: #106384: postinstall crashes abnormally. (And really closes - #104471.) - - -- Eloy A. Paris Thu, 26 Jul 2001 00:30:37 -0400 - -samba (2.2.1a-1) unstable; urgency=low - - * New upstream version. - * Make sure samba's postinst script exits with a zero status. - Closes: #104471: Samba postinst problem. - - -- Eloy A. Paris Thu, 12 Jul 2001 21:55:21 -0400 - -samba (2.2.1-1) unstable; urgency=low - - * New upstream version. - Closes: #103339: config.guess and config.sub update required. - Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to - incompatibility with PAM. - Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. - Closes: #95777: Samba 2.2 is unable to join or authenticate against - Samba 2.2 PDC domain. - Closes: #68842: samba should use PAM for password changing (I - haven't personally tried this one, but it's been - advertised this works.) - Closes: #102506: PAM account checking fails. - Closes: #102518: Complains about unknown paramter "obey pam - restrictions" - Closes: #94774: Build failure on PARISC machines. - * Moved away from /etc/cron.weekly/samba for log file rotation. - Now using logrotate. - Closes: #95548: typo in /etc/cron.weekly/samba. - Closes: #74951: nmbd does not rename its log file. - * Removed Debian-specific addtosmbpass.8 man page since this script - is not longer provided upstream. Users should use the smbpasswd - program instead. - * Updated sample /etc/samba/smb.conf to reflect the recent changes - affecting handling of PAM authentication. Also updated - /etc/pam.d/samba. - - -- Eloy A. Paris Wed, 11 Jul 2001 00:44:14 -0400 - -samba (2.2.0.final.a-1) unstable; urgency=high - - * New upstream version (contains security fix from DSA-065-1.) - Closes: #97241: samba 2.2.0 fails to process hostnames in - "hosts allow" config line. - * Removed Debian-specific addtosmbpass.8 man page since this script - is not longer provided upstream. Users should use the smbpasswd - program instead. - Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. - * Updated sample /etc/samba/smb.conf to reflect the recent changes - affecting handling of PAM authentication. Also updated - /etc/pam.d/samba. - - -- Eloy A. Paris Sun, 24 Jun 2001 11:11:59 -0400 - -samba (2.2.0.final-2) unstable; urgency=low - - * Added libcupsys2-dev to Build-Depends. - * Samba depends now (again) on netbase so update-inetd is always - available for the Samba maintainer scripts. - Closes: #86063: Fails to uninstall if inetd is not installed. - * Updated source/config.{sub,guess} so ARM built doesn't fail. - Closes: #94480: config.sub out of date; can't build on arm. - Closes: #85801: config.sub/guess out of date. - * Not using brace expansion, i.e. {foo,bar} in any of the maintainers - scripts nor in debian/rules. - Closes: #88007: samba postrm has is not POSIX sh compliant. - - -- Eloy A. Paris Sat, 21 Apr 2001 17:27:18 -0400 - -samba (2.2.0.final-1) unstable; urgency=low - - * New upstream release. Lots of new things. See WHATSNEW.txt. - * Goofy version number because of my stupidity when assigning version - numbers to the CVS packages I have been uploading to experimental. - Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release - will follow soon. - - -- Eloy A. Paris Tue, 17 Apr 2001 22:58:14 -0400 - -samba (2.2.0.cvs20010416-1) experimental; urgency=low - - * CVS update. - - -- Eloy A. Paris Mon, 16 Apr 2001 21:25:15 -0400 - -samba (2.2.0.cvs20010410-1) experimental; urgency=low - - * CVS update. - * Added libreadline4-dev to Build-Depends. - - -- Eloy A. Paris Tue, 10 Apr 2001 16:53:45 -0400 - -samba (2.2.0.cvs20010407-1) experimental; urgency=low - - * CVS update. Includes what is in 2.2.0alpha3. - - -- Eloy A. Paris Sat, 7 Apr 2001 16:00:33 -0400 - -samba (2.2.0.cvs20010316-1) experimental; urgency=low - - * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch - from Samba CVS. - * Not compiling rpctorture as it has compile errors. Change in - debian/rules. - * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now - the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is - needed to use smbfs. Updated debian/control, debian/rules and - README.Debian to reflect this change. - * Added to swat a versioned dependency on samba (so a user is forced to - install a new version of swat each time a new version of samba is - installed.) - - -- Eloy A. Paris Sun, 18 Mar 2001 14:21:14 -0500 - -samba (2.0.7-5) unstable; urgency=medium - - * Transition from suidmanager to dpkg-statoverride. - - -- Eloy A. Paris Thu, 18 Jan 2001 23:51:56 -0500 - -samba (2.0.7-4) unstable; urgency=medium - - * Applied Urban Widmark fixes to smbmount. Urban - is the maintainer of the smbfs in the kernel and of the userland - utilities. - * Links to HTML documents are correct now. - Closes: #69439: swat: Broken help file symlinks - Closes: #72615: samba-doc directory changed: removed htmldocs from path - Closes: #75847: swat: Wrong symlink - Closes: #66857: Wrong links to html documents. - Closes: #77912: misplaced documentation symlinks for swat - * Building Samba with CUPS support. For this I reverted the change to - source/configure.in that I did in 2.0.7-3 and re-ran autoconf. - Closes: #59038: samba: not compiled with cups support. - * Fix against previous known/unknown user time difference patch to swat - (make username / password lookups take the same time.) Remove CGI - logging code in Swat. - Closes: #76341 - Security holes in swat - * Updated Build-depends. - * Updated debian/copyright to refer to the correct location of the GPL. - * debian/rules: changed DESTDIR to `pwd`/debian/samba (was - `pwd`/debian/tmp.) - * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some - strange reason dh_installdirs is not creating debian/tmp/ so I needed - to tweak everything to install stuff in debian/samba rather than in - debian/tmp.) - * debian/control: changed section of samba-docs to 'doc' (was 'docs') - * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules - and source/scripts/installswat.sh.) - * Fixed (by tweaking debian/rules) - /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. - * Added "Provides: samba-client" to smbclient's section in control. - Closes: #71143: smbclient: Smbclient should provide samba-client. - * Fix for desired_access being zero in map_share_mode() (patch to - source/smbd/nttrans.c.) Thanks to Gary Wilson - for bringing this patch to my - attention. - * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and - 2.2.x kernels even when the build is done in a system running - a 2.2.x kernel. - Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but - doesnt depend on it. - Closes: #72758: README.Debian should comment on 2.0.x kernels. - Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. - Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. - Closes: #60580: samba: failed to set gid. - Closes: #64280: Samba panics, can't set gid. - Closes: #66816: Must deal with brokenness under 2.0.x. - Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. - Closes: #69735: PANIC: failed to set gid - Closes: #66122: "smbclient -L localhost -U%" returns with "tree - connect failed: code 0". - Closes: #57637: Samba says tree connect error. - Closes: #58015: potato samba wins support is broken. - * Fixed comments in sample smb.conf to point to the correct location. - Closes: #69578: comments in smb.conf points to wrong path. - * Move codepages from /etc/samba/codepages/ to - /usr/share/samba/codepages/. - Closes: #63813: samba; codepages should go in /usr/lib. - * Moved /var/samba/ to /var/state/samba/. - Closes: #49011: samba package not FHS compliant. - * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() - is found. - Closes: #44558: netgroup support missing in samba 2.0.5a-1. - * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and - --exec. Got rid of --exec so --pidfile works. - - -- Eloy A. Paris Thu, 11 Jan 2001 00:15:57 -0500 - -samba (2.0.7-3) frozen unstable; urgency=high - - * Release manager: this closes a RC bug. - * Commented out the section in source/configure.in that auto-detects - CUPS support and then ran autoconf to generate a new configure - script. This was done to prevent machines that have libcupsys-dev - installed from detecting CUPS support and adding an unwanted - dependency on libcupsys. This way the whole printing system - won't break on upgrades. CUPS support should be added after - Potato is released. - Closes: #65185: samba-common: Upgrading removes printing system. - Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. - * Updated README.debian. - Closes: #64594: Old README.Debian in /usr/share/doc/samba. - - -- Eloy A. Paris Tue, 20 Jun 2000 19:16:04 -0400 - -samba (2.0.7-2) frozen unstable; urgency=high - - * Release manager: this closes RC bug #63839 that prevents Samba - to be built from source. - * Fixed a stupid typo in debian/rules that was preventing Samba - to be built from source. - Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) - * I forgot to mention that O'Reilly's book "Using Samba" was donated - to the Open Source community. The book was included in Samba 2.0.7 - in HTML format and is part of the Debian Samba package since - Samba 2.0.7-1. - * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help - files were supposed to be provided in both the swat and the samba-doc - packages. This duplication was a waste of space. Starting with - Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML - files are included only in samba-doc, and are accessed via symlinks - from within swat. - Closes: #58810: superfluous files in swat? - * Added a 'echo "."' to /etc/init.d/samba in the reload) section. - Closes: #63394: "echo ." missing in reload section of init.d script - * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. - Closes: #64344: typo "encrypted passwords" - * Cleaned up samba's postrm script so important common files aren't - deleted when samba is purged. Created a samba-common.postrm script. - Closes: #62675: purging samba removes /etc/samba/smb.conf. - Closes: #63386: samba --purge removes /etc/samba dir even though - smbclient/smbfs/samba-common packages are still installed - - -- Eloy A. Paris Wed, 3 May 2000 02:42:07 -0400 - -samba (2.0.7-1) frozen unstable; urgency=low - - * New upstream version. Dear Release Manager: please allow this - package to go to frozen as it contains fixes to a _lot_ of problems. - You can take a look at all the problems fixed by this release in - the official upstream announcement at - http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. - * Added --with-utmp to add utmp support to smbd (this is new in Samba - 2.0.7) - * Closes: #62148 - samba not rotating filled logs. - * Closes: #56711: Samba doesn't manage well long share name (please note - that it's possible to connect to shares with names longer than - 14 characters but the share will be listed with a name truncated to - 13 characters.) - * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). - Closes: #50907 - logon path not working. - This is not a bug, it's just Samba doing the same thing an NT server - does. See WHATSNEW.txt and smb.conf's man page for details. - * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper - is not supported anymore.) - * Closes: #58994 swat: typo in swat description. - * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware - problems, person that reported the bug never came back.) - Closes: #54398 - smbadduser fails, looks for ypcat. - * Fixed swat's man page to include Debian specific installation - instructions. There's not necessary to edit /etc/services or - /etc/inetd.conf. - (Closes: #58616 - incomplete install config && incorrect installation - instructions.) - * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat - to look for smbd and nmbd in the wrong place when requested to start or - stop smbd or nmbd. - (Closes: #55028 - swat can't start samba servers.) - * Closes: #37274: smbclient does not honour pot. (Tested and seems to be - working now.) - * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, - #50479, #39818, #54383, #59411. - (please re-open any of this if the problem still exists - I was unable - to confirm any of this because I could never reproduce them.) - Closes: #56699 - Samba's nmbd causes random kernel oops several - times in a row. - Closes: #62185 - nmbd's forking until no more file descriptors are - available. - Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. - Closes: #52218 - Either wins proxy does not work, or I don't understand - it. - Closes: #43492 - intermittent problem changing password. - Closes: #50479 - Can't access windows 2000 shares with samba. - Closes: #39818 - samba-common: Upgrading Samba from the Slink version. - Closes: #54383 - samba-common: Missing /etc/smb.conf. - Closes: #59411 - smbclient: cannot browse Win2k shares. - - -- Eloy A. Paris Thu, 27 Apr 2000 16:07:45 -0400 - -samba (2.0.6-5) frozen unstable; urgency=low - - * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries - in this package are broken unless libcupsys1 is installed. - samba-common has a "grave" bug because of this. Instead of adding - libcupsys1 to the Depends: list of each package in debian/control - I investigated why dh_shlibs was not picking the dependency - automatically. It turns out that it's probably a bug in libcupsys1 - because the format of its shlibs file is not correct. I fixed that - file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are - picked correctly. I'll talk to the libcupsys1 maintainer. - - I think the addition of CUPS support to Samba is a big change that - should not go into Frozen. So, I decided to back up the addition - of CUPS support I did in 2.0.6-4 to minimize problems. I'll add - CUPS support again when I start working on Samba for Woody. - (Closes: #59337 - samba-common has a missing dependency) - - -- Eloy A. Paris Wed, 1 Mar 2000 08:40:02 -0500 - -samba (2.0.6-4) frozen unstable; urgency=low - - * It seems that sometimes nmbd or smbd are not killed when upgrading. - I think it is because in samba's prerm script I was calling - start-stop-daemon with the --pidfile switch and in old versions of - Samba the nmbd and smbd daemons did not store their PIDs in a file in - /var/samba/. I changed debian/samba.prerm so the existence of the - PID files is checked before calling "start-stop-daemon --pidfile ..." - If the PID files do not exist then start-stop-daemon is called - without the --pidfile parameter. - (Closes: #58058 - upgrade from slink went badly) - * Fixed typo in description of swat package in debian/control. - * Installed libcupsys1-dev so the configure script picks up CUPS - and Samba is compiled with CUPS support. Also added libcupsys1 to - the Depends: list of package samba in debian/control. - (Closes: #59038 - samba not compiled with cups support) - * Added a small paragraph to debian/README.debian warning about possible - problems with the WINS code in Samba 2.0.6. - - -- Eloy A. Paris Mon, 28 Feb 2000 14:00:42 -0500 - -samba (2.0.6-3) frozen unstable; urgency=low - - * Applied patch posted by Jeremy Allison to the samba mailing list - that should take care of the internal errors reported in bug #52698 - (release-critical). Wichert: please test as I never could reproduce - it here. - (Closes: #52698 - samba gets interbal errors) - * Moved samba-docs to the 'docs' section. - (Closes: #51077 - samba-doc: wrong section) - * Added reload capability to /etc/init.d/samba (only for smbd because - nmbd does not support reloading after receiving a signal). - (Closes: #50954 - patch to add reload support to /etc/init.d/samba) - * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so - Unix password syncronization works with the passwd program currently - in Potato. Thanks to Augustin Luton for - the correct chat script. - * Stole source/lib/util_sec.c from the CVS tree of what will become - Samba 2.0.7 or whatever so we can use the same binaries under - both 2.0.x and 2.2.x kernels. - (Closes: #51331 - PANIC: failed to set gid) - * smbadduser is now provided as an example and it's customized for Debian. - I am not providing this script in /usr/sbin/ because then I would need - a dependency on csh, something that I don't want to do. - (Closes: #51697, #54052) - * Fixed the short description of the smbfs package in debian/control. - (Closes: 53534 - one-line description out of date). - - -- Eloy A. Paris Tue, 23 Nov 1999 16:32:12 -0500 - -samba (2.0.6-2) unstable; urgency=low - - * samba-common now depends on libpam-modules (not on libpam-pwdb, which - I have been told is obsolete). I modified /etc/pam.d/samba accordingly - to reflect the change. - (Closes: Bug#50722: pam pwdb dependence?). - * The old /etc/pam.d/samba file which had references to pam_pwdb caused - smbd to die with a signal 11. The new /etc/pam.d/samba file fixes - this problem. - (Closes: #50876, #50838, #50698) - * Compiled with syslog support (use at your own risk: syslog support - is still experimental in Samba). I added the parameters "syslog = 0" - and "syslog only = no" to the sample smb.conf to avoid pestering - users that do not want Samba to log through syslog. - (Closes: Bug#50703 - syslog only option doesn't work) - * Removed the stupid code in the smbmount wrapper script that tries - to load the smbfs module if smbfs is not listed in /proc/filesystems. - (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled - as a module in the kernel) - * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so - 'mount -t smb ...' works just as 'mount -t smbfs ...'. - (Closes: Bug#50763 - 'mount -t smb' doesn't work) - - -- Eloy A. Paris Sat, 20 Nov 1999 18:53:35 -0500 - -samba (2.0.6-1) unstable; urgency=low - - * Samba 2.0.6 has been released. This is the first try of the Debian - Samba packages. I know for sure that smbd won't work properly on - 2.0.x kernels because the patch that Wichert sent me does not apply - to the new source/lib/util_sec.c in Samba 2.0.6. That file was - completely re-written by Tridge. - * Updated README.Debian. - * A new client utility called smbspool appeared in Samba 2.0.6. I added - this utility to the smbclient package, although I haven't tried it yet. - * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. - This is to be able to type "mouont -t smbfs ...". This symlink goes - in the smbfs package, of course. - * This new release should close the following bugs (some of these - are fixed for sure in this new upstream release, some others I could - not reproduce but I believe they are fixed if they were real bugs. - As always, please feel free to re-open the bugs if the problem is not - solved). - Closes: Bug#33240: icmp mask needs a bug workaround. - Closes: Bug#37692: samba: Has problems detecting interfaces. - Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. - Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast - properly. - Closes: Bug#44131: smbfs: no longer possible to set file and - directory-modes. - Closes: Bug#46992: smbmount-2.2.x manpage wrong. - Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. - Closes: Bug#46605: smbmnt segfaults. - Closes: Bug#48186: smbmount. - Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. - Closes: Bug#47332: smbmount: could -f and -P be added back? - * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM - module). To succesfully add PAM support, I created /etc/pam.d/samba and - added this file as a conffile for the samba-common package. I also made - samba-common depend on libpam-pwdb. - * Added simple man pages for the wrapper scripts smbmount and smbmount. - (Closes: Bug#44705 - Missing smbmount man page) - * Installed libreadlineg2-dev in my system so smbclient now has a - "history" command and libreadline support :-) - * This time I did add a check to the smbmount wrapper script to see if - the kernel has support for smbfs, as suggested by Jeroen Schaap - . I mentioned in the changelog - for samba-2.0.5a-3 that I did this but I forgot at the end. - - -- Eloy A. Paris Thu, 11 Nov 1999 12:08:15 -0500 - -samba (2.0.5a-5) unstable; urgency=low - - * I am sorry to report that the smbwrapper package is gone for the - moment. The reason for this is twofold: first of all, smbwrapper - is completely broken in Samba-2.0.5a (it compiles but it doesn't - run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, - when I asked Andrew Tridgell (father of Samba) about the state of - smbwrapper he told me that Ulrich Drepper (head of the glibc project) - broke on purpose the glibc stuff in which smbwrapper is based. - Consequently, Tridge recommended me to compile Samba without - support for smbwrapper. When, I have no idea. Sorry folks. Here is - the original message I received from Andrew: - - > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's - > smbwrapper doesn't even compile under glibc2.1. - - yep, Ulrich deliberately broke it. It won't get fixed till glibc - allows the sorts of games it plays to work again. I suggest you turn - it off in your build scripts until that gets sorted out. - - * Swat's file are now in /usr/share/samba/ instead of - /usr/lib/samba/ (bug #49011). - * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). - - -- Eloy A. Paris Tue, 2 Nov 1999 12:59:13 -0500 - -samba (2.0.5a-4) unstable; urgency=low - - * Applied patch from our fearless leader (Wichert) to fix the darn bug - that prevents Samba to work on 2.0.x kernels if it was compiled - in a system running a 2.2.x kernel. This closes #40645 (build uses - setresuid which doesn't work under 2.0.34 (does apparently under - 2.2.x) ). - * Fixed the entry that swat's postinst script adds to /etc/inetd.conf - so it is '## swat\t\tstream\ttcp\tnowait.400 ...' instead of - '##swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused - 'update-inetd --enable swat' to leave the entry for swat disabled. - Thanks to Dave Burchell for finding out - this problem. This closes #48762 (swat uses non-standard syntax to - comment out inetd.conf entry). - * /usr/sbin/swat does not think anymore that the smbd daemon lives - in /usr/local/samba/bin/. To fix this I am running now source/configure - with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba - 'swat' fails: incorrect hardwired path in the binary). - - -- Eloy A. Paris Sun, 31 Oct 1999 03:42:38 -0500 - -samba (2.0.5a-3) unstable; urgency=low - - * I am pretty darn busy with my MBA, I apologize for the long time it's - taking to squash bugs in the Samba packages. - * Built with debhelper v2 for FHS compliancy. Changed a couple of - things in debian/rules to accomodate for the new place for the docs. - I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} - to make sure that the symlink from /usr/doc/xxx exists and points to - /usr/share/doc/xxx (the reason for this is that I am not letting - debhelper to create these scripts for me automatically). - * Built with latest libc6. - * smbfs: finally, the nasty bug that causes smbmount to die after - a while is gone thanks to Ben Tilly . - The problem was just a typo in source/client/smbmount.c. - This closes grave bug #42764 (smbmount dies) and #43341 - (smbfs-2.2.x won't function after a while). - * Fixed the smbmount wrapper script to eliminate a bashism (closes - #45202 - "wrapper scripts use $* instead of "$@") and to recognize - 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize - kernel 2.3.x"). - * Added a check to the smbmount wrapper script to see if the - kernel has support for smbfs, as suggested by Jeroen Schaap - . - * swat's man page is now part of the swat package, not of the samba - package. This closes #44808 (Samba has a man page for swat, but - the binary is not included). - * The interface program smbrun is not longer needed by smbd because - of the availability of execl() under Linux. Because of this, the - smbrun is not even being compiled. Since there is no need for smbrun - now, the smbrun man page was taken out of the samba package. This - closes #45266 (/usr/bin/smbrun missing). - * smbpasswd is now part of the samba-common package, and not part of - the samba package. This is to let administrators that do not want - to install a full Samba server administer passwords in remote - machines. This closes bug #42624 (smbpasswd should be included in - smbclient). This bug report also suggests that swat becomes part of - the samba package, that smbfs becomes part of the smbclient package, - and that the binary smbpasswd becomes part of the smbclient package. - I moved smbpasswd to the samba-common package but I am reluctant to - do the other things the bug report suggests. - * In order to keep dpkg happy when moving smbpasswd from the samba - package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" - in the control section of the samba-common package and a - "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the - samba package (in debian.control). - * Samba is now being compiled with the "--with-netatalk" option. This - closes #47480 (Could samba be compiled with the --with-netatalk option). - * All packages that depend on samba-common have a versioned dependency - now. This was accomplished by adding "(= ${Source-Version})" to the - relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho - for the hint. This closes #42985 (samba should probably - have a versioned depends on samba-common). - * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all - the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). - * Added the smbadduser helper script to the samba package. This closes - #44480 (Samba doesn't come with the smbadduser program). - * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount - to leave an entry in /etc/mtab for a share that could not be mounted - because of invalid user of password. The patch also allows smbumount - to unmount the share in the event that something goes wrong with the - smbmount process. This closes bug #48613 (Mount/umount problems + - patch) as well as #44130 (failed mount is still mounted). - * smbmount-2.2.x is now setuid root. This is needed for the patch - applied above to be effective. If smbmount-2.2.x is not setuid root - then an entry will be left in /etc/mtab even when the mount - fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid - for this to work. - - -- Eloy A. Paris Wed, 27 Oct 1999 10:36:13 -0400 - -samba (2.0.5a-2) unstable; urgency=low - - * This version is basically the same as 2.0.5a-1 but it was compiled - on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 - for more information. - - -- Eloy A. Paris Tue, 27 Jul 1999 02:25:29 -0400 - -samba (2.0.5a-1) stable; urgency=high - - * I'm back from the Honey Moon. We are pretty busy because we are moving - to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still - have plenty of things to pack and to do. Samba 2.0.5 was released - while I was in the Honey Moon and it is just now (almost 3 AM) when - I have time to package it. - * Because of the security problems fixed in 2.0.5, this upload goes - to both stable and unstable (the Security Team asked for this). - * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will - be compiled on a Potato system. - * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common - section in debian/control (as suggested by Steve Haslam - ) to fix the problems that appear when upgrading - from the Samba package in Slink. Please test this as I am completely - unable to do so. This should fix bug #39818 (Upgrading Samba from the - Slink version). - * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in - order to have defined several socket options when compiling with - Linux 2.2.x kernel headers - the fix is now upstream. - * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command - line syntax similar to the one used by the old smbmount (for 2.0.x - kernels). This means that the wrapper script is no longer necessary - so I removed it. In its place there is a simple wrapper script that - calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is - running. - * Because of the wedding, the Honey Moon, and our move to Pittsburgh, - I can't work on fixing other bugs in this release. - - -- Eloy A. Paris Tue, 27 Jul 1999 02:18:51 -0400 - -samba (2.0.4b-3) unstable; urgency=low - - * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files - and because of this /usr/bin/smbumount was part of the samba package - instead of part of the smbfs package. - - -- Eloy A. Paris Thu, 1 Jul 1999 01:51:24 -0400 - -samba (2.0.4b-2) unstable; urgency=low - - * Dark (and archive maintainers): please remove from Potato the smbfsx - binary package and also the old source package for smbfs. smbfs and - smbfsx have been merged starting with this version. - * Merged the old smbfs package with Samba. Now there is only one package - for the smbfs utilities and is called "smbfs". The package smbfsx - does not exist any more and this new smbfs package must be used - for both 2.0.x and > 2.1.x kernels. - * A wrapper script was added to handle the syntax change in smbmount - in the new smbfs utilities (required for kernels > 2.1.70). The - home page for this script is http://www.wittsend.com/mhw/smbmount.html. - Please _note_ that this will change (for good) in Samba 2.0.5 :-) - * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x - or smbumount-2.0.x depending on the kernel currently running. - * Not using -t for savelog in cron.weekly script. - * Recompiled without libreadlineg-dev (Samba does not seem to be using - it so unnecessary dependencies are produced). - * glibc2.1 build. - * Removed smbpasswd.8 man page from the debian/ directory because it is - now being provided upstream. - * Got rid of the ugly hack I put in source/lib/util_sock.c to have - IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the - autoconf stuff to #include . I've sent the patch to - Jeremy Allison so we have this upstream. - - -- Eloy A. Paris Mon, 28 Jun 1999 17:47:19 -0400 - -samba (2.0.4b-1) unstable; urgency=low - - * New upstream release. This release fixes the following Debian bugs: - #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and - #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy - Allison released Samba 2.0.4 and found out that there were a couple - of minor bugs so he released 2.0.4a. Then he found out about more - serious bugs and released 2.0.4b. I have built this package several - times between yesterday and today because of this. Now I am releasing - the Debian packages for Samba with what I believe will be the latest - release the Samba Team will make at least in the next 4 days (Jeremy - is taking a short vacation). - * Still compiling against glibc2.0 (sorry about that :-) - * Hacked source/smbwrapper/smbsh.c to fix the problem - of smbsh not finding the shared library smbwrapper.so. It looks - now in /usr/lib/samba/ for this file. This fixes #32971, #32989, - #33278, #34911 and #36317. - * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf - and /etc/samba/codepages/. This fixes #33128 (smbmount complains about - missing /etc/smb.conf). - * Package swat does not depend on httpd anymore (there's no need to). - This fixes #35795 (swat requires httpd). - * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and - smbumount-2.2.x. Same applies to the man pages. - * Changed minor type in smbmount's man page (changed "\"" by "\'"). This - fixes #34070 (wrong quotes in manpage). - * Used Fabrizio Polacco's procedure to create the - Debian package for Samba. This closes #35781 (samba has no pristine - source). - * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only - if the size of either is different than 0. Also, added comments at the - beginning of this script to explain how rotation of log files works in - Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) - for the suggestions. This closes #37490 (cron.weekly script rotates not - used [sn]mb.old files). As I side effect, this should also close - #31462 (still trouble with /etc/cron.weekly/samba). - * Check for old /etc/pam.d/samba file which is not provided by this version - of the Debian Samba package but was provided in older versions. If this - file exists we delete it. We check for this in the postinst. This closes - #37356 (samba put stuff in pam.d that pam complains about) and #34312 - (libpam0g: questions during upgrade). - * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done - in the postinst script. This closes #35730 (Security problem with - /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). - * I have just checked and it looks like #28748 (smbfsx doesn't "return ") - has been fixed. This might have been fixed since a long time ago. - * Long long standing bug #18488 (smbclient: internal tar is broken) is - closed in this release of Samba. The bug might have been closed for a - long long time, but I did not check for this before. - * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" - message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), - #34148 (warnings from smbd) and #35333 (samba warnings). - - -- Eloy A. Paris Thu, 20 May 1999 00:35:57 -0400 - -samba (2.0.3-1) unstable; urgency=low - - * New upstream version. - * Removed the convert_smbpasswd.pl program I created and put in - /usr/doc/samba/ because there's a convert_smbpasswd script in the - upstream sources that does the same thing. I modified the postinst - script to use this script instead of the one I created. - - -- Eloy A. Paris Sun, 28 Feb 1999 01:35:37 -0400 - -samba (2.0.2-2) unstable; urgency=low - - * Updated the README.Debian file. - * Updated the description of the samba package in the control file. - * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now - installed setuid root as they should be. This was done by doing a - a "chmod u+s" for each binary in debian/rules and by creating the - file debian/smbfsx.suid. - * Minor patch to source/client/smbumount.c to allow normal users - to umount what they have mounted (problem was a kernel vs. libc6 - size mismatch). I sent the patch upstream. - * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is - created. - * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to - debian/smbwrapper/usr/lib/samba/. - * Hacked source/smbwrapper/smbsh.c to fix the problem - of smbsh not finding the shared library smbwrapper.so. - - -- Eloy A. Paris Thu, 11 Feb 1999 18:11:34 -0400 - -samba (2.0.2-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Thu, 11 Feb 1999 01:35:51 -0400 - -samba (2.0.1-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Sat, 6 Feb 1999 06:51:18 -0400 - -samba (2.0.0final-4) unstable; urgency=low - - * The samba postinst made an unwarranted assumption that the file - /etc/samba/smbpasswd exists. If the file did not exist (which is - perfectly valid) the postinst will fail. This fixes #32953. - - -- Eloy A. Paris Fri, 5 Feb 1999 23:32:46 -0400 - -samba (2.0.0final-3) unstable; urgency=low - - * Added to debian/control a "Depends: ${shlibs:Depends}" line for the - samba-common package so dependencies for this package are set - correctly (thanks to Dark for pointing this out). - - -- Eloy A. Paris Thu, 4 Feb 1999 09:45:21 -0400 - -samba (2.0.0final-2) unstable; urgency=low - - * Finally!!! The first upload to unstable. Sorry for the delay folks - but I have been quite busy lately :-) Another reason for the delay - is that I wanted to ease the migration from Samba 1.9.18p10 and - before to Samba 2.0.0. I changed the location of the config. files - from /etc/ to /etc/samba/ and this made things a little bit harder. - * This package needs 2.2 kernel headers to compile (well, this is - true for the smbfsx package, all others compile fine with 2.0 kernel - headers). - * Created a preinst script for the samba package to take care of the - location migration of smb.conf (from /etc/ to /etc/samba/). The - preinst script also takes care of moving /etc/smbpasswd to its new - location (/etc/samba/). - * Created postinst and postrm scripts to add/remove an entry for swat - in /etc/inetd.conf. - * I had forgotten to install the sambaconfig script so I changed - debian/rules to install this script. - * Added a postrm script for the samba package (I had forgotten to add - this script to the new Samba packages after the migration from 1.9.18 - to 2.0.0). - * Created a small Perl script that is called from the samba postinst - to convert the smbpasswd from the old format used in version prior - to 2.0.0 to the new one used in 2.0.0 and beyond. - * The upgrade process should be automatically now. Please let me know - of any problems you encounter. - - -- Eloy A. Paris Sat, 23 Jan 1999 09:34:10 -0400 - -samba (2.0.0final-1) experimental; urgency=low - - * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable - because I still have to work out the migration from the old - samba packages to the new ones. I also need to work more on the - new swat package. - - -- Eloy A. Paris Thu, 14 Jan 1999 22:40:02 -0400 - -samba (2.0.0beta5-1) experimental; urgency=low - - * New upstream version. - - -- Eloy A. Paris Tue, 5 Jan 1999 00:37:57 -0400 - -samba (2.0.0beta4-1) experimental; urgency=low - - * New upstream version. - - -- Eloy A. Paris Wed, 23 Dec 1998 18:37:45 -0400 - -samba (2.0.0beta3-1) experimental; urgency=low - - * New upstream version. - * I have just realized that the documentation patches (for man pages) - that I used for the 1.9.18 release are not longer necessary because - there was a major re-write of all the Samba documentation that added - the missing bits of information. So, I have just removed these minor - patches. - - -- Eloy A. Paris Tue, 8 Dec 1998 12:00:30 -0400 - -samba (2.0.0beta2-1) experimental; urgency=low - - * New upstream version. - * This new version fixes the potential security problem that - was posted to debian-private (using the "message command" parameter - to execute arbitrary commands from messages sent from LinPopUp). - * Changed /etc/init.d/samba to use one of the variables stored in - /etc/samba/debian_config to know how Samba is being run (from inetd or - as daemons) instead of grepping /etc/inetd.conf which may not exist - if the user is running xinetd (this fixes bug #29687 - assumes using - vanilla inetd) - - -- Eloy A. Paris Mon, 23 Nov 1998 23:32:03 -0400 - -samba (2.0.0beta1-1) experimental; urgency=low - - * First beta release of the samba-2.0.0 code. Before the beta I was - working with sources downloaded directly from the CVS server. This - package goes into experimental and I plan to release the new - samba to unstable as soon as it gets out of beta. - * Created several packages out of the Samba sources. They are: - samba (nmbd and smbd daemons + related programs), smbclient (FTP - like command line utility to retrieve files from SMB servers), - swat (Samba Web Administration Tool), samba-common (common files - used by samba, smbclient and swat), smbfsx (smbfs utilities for - kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). - * Refreshed debian/samba-doc.docs so recently added docs. are - installed in the samba-doc package. New additions include man - pages in the /usr/doc/samba-doc/htmldocs/ directory. - * Deleted Debian specific nmblookup(1) man page as it is now upstream. - * Added smbtorture to smbclient package. - * Moved rpcclient from the samba package to the smbclient package. - * The Samba daemons (nmbd and smbd) now create a PID file so I changed - all calls to start-stop-daemon to use the PID file. - * Fixed debian/rules to install mksmbpasswd (fixes #27655). - * Modified /etc/init.d/samba so nmbd is started without the -a (append - to the log file instead of overwrite) switch. The new behavior of - nmbd is to NOT overwrite log files, so the -a switch can be deleted - safely. - * Moved from debstd to debhelper. - - -- Eloy A. Paris Thu, 1 Oct 1998 08:37:41 -0400 - -samba (1.9.18p10-5) frozen unstable; urgency=high - - * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than - the one I was trying to fix: in /etc/init.d/samba I got rid of the test - that tells us whether the Samba daemons are running from inetd or as - standalone daemons. I corrected the problem by editing again - /etc/init.d/samba to uncomment the test. - * Wishlist bug #28298 (typos in samba) was fixed. - * Wishlist bug #28309 (typos in smb.conf) was fixed. - - -- Eloy A. Paris Wed, 28 Oct 1998 09:11:47 -0400 - -samba (1.9.18p10-4) unstable; urgency=low - - * Minor patch to debian/rules to delete *substvars instead of only - substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz - for this). - * Small patch to source/shmem_sysv.c that eases compilation under - glibc-2.1 (thanks to Daniel for this). - - -- Eloy A. Paris Thu, 17 Sep 1998 15:33:49 -0400 - -samba (1.9.18p10-3) unstable; urgency=low - - * Patched smbclient again to fix minor formatting problem introduced - by Magosanyi Arpad's smbclient patch. - - -- Eloy A. Paris Thu, 3 Sep 1998 11:03:23 -0400 - -samba (1.9.18p10-2) unstable; urgency=low - - * Sync'ed include files for the smbfs utilities with the ones in - kernel 2.1.119. - * Added to the /usr/doc/samba/examples/ directory a new script called - wins2dns (courtesy of Jason Gunthorpe ) that - generates BIND sonze files for hosts in the WINS database. - * Patched smbclient to include enhancements by Magosanyi Arpad - that make scripting easier. - - -- Eloy A. Paris Fri, 28 Aug 1998 13:34:54 -0400 - -samba (1.9.18p10-1) stable unstable; urgency=low - - * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a - description of what has changed). I built a 1.9.18p9-1 but I - never released it because an obscure bug was found just a couple - of days before the official release, so the Samba Team stopped - the rollover of 1.9.18p9. - * Updated documentation (new files were added to the docs/ directory - that were not installed in /usr/doc/samba/). - * Fixed long standing bug #7695 (smb.conf's man page doesn't document - 'printing=lprng') - I made a couple of changes to the man page to - include references to lprng. - * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it - is necessary to make samba suggest psmisc just because the postinst - script mentions to call killall. So, I removed all references to - "killall" in the scripts. - * Fixes bug #25999 (Samba does not by default work with unix password - sync): I added the "passwd program" and "passwd chat" parameters to - the sample smb.conf to reflect the Debian environment. - - -- Eloy A. Paris Fri, 21 Aug 1998 08:59:18 -0400 - -samba (1.9.18p9-1) unstable; urgency=low - - * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a - description of what has changed). - * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is - now part of the new upstream version. - * Corrected small typo in addtosmbpass' man page (fixes #25629). - - -- Eloy A. Paris Tue, 11 Aug 1998 08:53:08 -0400 - -samba (1.9.18p8-2) frozen unstable; urgency=medium - - * Applied patch received from Jeremy Allison (Samba Team) that fixes - "grave" bug #23903 (samba maps username before authenicating with - NT password server). - * Added a "sleep 2" between "start-stop-daemon --stop" and - "start-stop-daemon --start" in /etc/init.d/samba so when this script - is called with the "restart" parameter the Samba daemons are restarted - properly. This fixes bug #24211 (init.d script doesn't restart). - * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to - avoid annoying warning messages. - * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 - and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't - find who sent this suggestion to me. If you are listening, drop me a - note and I'll put your name here :-) - - -- Eloy A. Paris Mon, 29 Jun 1998 08:45:01 -0400 - -samba (1.9.18p8-1) frozen unstable; urgency=low - - * New upstream release that fixes _lots_ of "ugly" bugs. The list of - fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). - * Fixed postinst to quote arguments to if [ arg .. ] constructs - (fixes #22881). - * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing - list) that solves a problem with username maps (the Samba Team did - not catch this problem before final 1.9.18p8). - * Made /etc/init.d/samba to print out a warning when Samba is running - from inetd and the user runs /etc/init.d/samba to start|stop|restart - Samba (there's no point on doing this because inetd will start the - daemons again when there is traffic on UDP port 137-139). - - -- Eloy A. Paris Sat, 13 Jun 1998 00:18:25 -0400 - -samba (1.9.18p7-4) frozen unstable; urgency=medium - - * Fixes the serious problem of having the WINS name server - database getting deleted at boot time. That happened because the - WINS database was being stored under /var/lock/samba/ and all files - under /var/lock/ are deleted at boot time. The place where the WINS - database is stored was moved to /var/samba/. - - -- Eloy A. Paris Mon, 18 May 1998 20:24:29 -0400 - -samba (1.9.18p7-3) stable; urgency=high - - * Libc5 version for Bo (stable) that fixes the recently reported - security hole. - - -- Eloy A. Paris Mon, 18 May 1998 20:19:33 -0400 - -samba (1.9.18p7-2) frozen unstable; urgency=low - - * Added patches from the non-mantainer upload that make us able - to compile Samba on Alpha systems. This fixes bug #22379. - - -- Eloy A. Paris Wed, 13 May 1998 20:38:51 -0400 - -samba (1.9.18p7-1) frozen unstable; urgency=low - - * New upstream release (just bug fixes, no new functionality). - - -- Eloy A. Paris Wed, 13 May 1998 11:47:32 -0400 - -samba (1.9.18p6-2) frozen unstable; urgency=low - - * Uploaded to frozen (I forgot to upload last version to frozen - so it got installed only in unstable). - - -- Eloy A. Paris Tue, 12 May 1998 18:10:17 -0400 - -samba (1.9.18p6-1.1) unstable; urgency=low - - * non-maintainer upload for Alpha - * patch needed for source/quota.c (_syscall4() confusion) - - -- Paul Slootman Tue, 12 May 1998 20:39:13 +0200 - -samba (1.9.18p6-1) unstable; urgency=low - - * New upstream release that fixes a possible buffer overflow. - This security hole was reported on BugTraq by Drago. The - previous Debian version (1.9.18p5-1) was not released because - 1.9.18p5 and 1.9.18p6 were released very closely. - - -- Eloy A. Paris Mon, 11 May 1998 20:28:33 -0400 - -samba (1.9.18p5-1) unstable; urgency=low - - * New upstream release (no new funcionality, just bug fixes - see - /usr/doc/samba/WHATSNEW.txt.gz). - * Backed off Debian patches that were added upstream. - - -- Eloy A. Paris Mon, 11 May 1998 08:43:53 -0400 - -samba (1.9.18p4-2) frozen unstable; urgency=low - - * Patched smbclient(1) man page to not reference the unsopported - -A parameter (fixes #6863). - * Changes to start nmbd with the -a option (in /etc/init.d/samba - and in the entry added to /etc/inetd.conf). - * Fixed typo in sample smb.conf (fixes #21484). - * Fixed yet another typo in sample smb.conf (fixes #21447). - - -- Eloy A. Paris Fri, 17 Apr 1998 22:19:23 -0400 - -samba (1.9.18p4-1) frozen unstable; urgency=low - - * New upstream version that fixes several bugs. - * New scheme for keeping track of Debian specific configuration. - This new scheme fixes bug #18624 (Samba always asks the user about - configuration options). New scheme stores Debian specific - configuration information in /etc/samba/debian_config. - * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the - new configuration scheme. - * Moved required kernel 2.1.x include files inside the source tree - so I don't have to do very nasty things like creating crazy - symlinks in /usr/include to make this package compile. This - allows non-root users to build the package and fixes bug - #20104. - * Fixed address of the FSF in /usr/doc/samba/copyright (problem - reported by lintian). - * The /etc/init.d/samba script now supports the force-reload - argument, as required by the policy (problem reported by lintian). - * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. - * Now the samba package can be installed even if no nmbd or smbd processes - are running. This fixes the following bugs: #8917, #9334, #10268, - #10411, #11146 and #13387. - * Provides the original README in /usr/doc/samba. This fixes bug #9693. - * Added a --no-reload option to sambaconfig to not reload Samba - after configuration. - * Created man pages for sambaconfig(8), addtosmbpass(8), - mksmbpasswd(8) and nmblookup(1). - * Corrected small typo in sample /etc/smb.conf. - * Added two new parameters to /etc/smb.conf: "preserver case" and - "short preserve case". - * "rm -Rf /var/lock/samba" in postrm when package is being purged. - * Patched upstream source (nmbd.c) to not overwrite log files when - nmbd is called with the -a parameter (fixes #17704: nmbd ignores - -a option). - * /etc/init.d/samba now starts the nmbd daemon with the -a parameter - to not overwrite log files. - - -- Eloy A. Paris Mon, 23 Mar 1998 21:22:03 -0400 - -samba (1.9.18p3-1) unstable; urgency=low - - * New upstream version. - * Oppsss!!! I really screwed it up (actually, debstd did). - 1.9.18p2-2 still contained man pages (smbmount and smbumount) part - of other packages. This version does have this corrected. If not, - I no longer deserve to be a Debian developer! So, this version - fixes bug #18438 and some of the bugs I claimed to fix in - 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd - with -m in debian/rules (man pages are installed by "make install" - so it's a bad idea to re-install man pages with debstd). - - -- Eloy A. Paris Mon, 23 Feb 1998 17:32:42 -0400 - -samba (1.9.18p2-2) unstable; urgency=low - - * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided - a man page for smbmount, which conflicts with package smbfs. This - was solved by creating a multi-binary package that produces - package samba and new package smbfsx. - * Fixes bug #18000 (typo in postinst). - * Fixes bug #17958 (postinst asks obsolete question). Actually, - the question is still asked, but only if Samba is run as daemons. - * Created a multi-binary package from the Samba sources: package - samba and new package smbfsx which provides SMB mount utilities - for kernels > 2.1.70. - - -- Eloy A. Paris Mon, 9 Feb 1998 19:47:05 -0400 - -samba (1.9.18p2-1) unstable; urgency=low - - * New upstream version. - * Removed /etc/cron.weekly/samba because Samba does not handle well - rotation of log files (if the log file is rotated Samba will - continue to log to the rotated file, instead of the just created - one). In any case, Samba will rotate log files after an specific - file size. - - -- Eloy A. Paris Tue, 27 Jan 1998 22:34:27 -0400 - -samba (1.9.18p1-2) unstable; urgency=low - - * Created a multi-binary package out of the Samba sources to provide - packages samba and smbfsx (userland utilities to work with - smbfs with kernels > 2.1.x. - - -- Eloy A. Paris Sat, 17 Jan 1998 09:23:48 -0400 - -samba (1.9.18p1-1) unstable; urgency=low - - * New upstream version. - * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in - /var/backups/smbpasswd.bak. - - -- Eloy A. Paris Wed, 14 Jan 1998 13:40:56 -0400 - -samba (1.9.18alpha14-1) unstable; urgency=low - - * New upstream version. - * Added a note to the postinst script telling the user that he/she - needs to run smbpasswd manually after creating a new /etc/smbpasswd - from /etc/passwd. - - -- Eloy A. Paris Tue, 23 Dec 1997 23:44:37 -0400 - -samba (1.9.18alpha13-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Tue, 16 Dec 1997 13:02:32 -0400 - -samba (1.9.18alpha12-1) unstable; urgency=low - - * New upstream version. - * Conflicts with the sambades package because the new Samba 1.9.18 - series do not depend on the DES libraries to support encrypted - passwords. - * Added parameter "encrypt passwords = yes" to /etc/smb.conf. - * Compiled with support for quotas in disk_free(). - * Home directories are now exported read only by default. - * Re-worked debian/rules. - * Re-worked sample smb.conf. - - -- Eloy A. Paris Thu, 4 Dec 1997 22:50:34 -0400 - -samba (1.9.17p4-1) unstable; urgency=low - - * New upstream version. - * Made /etc/smb.conf readable by everybody because some Samba utilities - will fail otherwise when run by non-root users. - * Dropped PAM support while the PAM libraries are ported to libc6. - - -- Eloy A. Paris Tue, 21 Oct 1997 18:08:49 -0400 - -samba (1.9.17p3-1) unstable; urgency=low - - * New upstream version. - * Made /etc/smb.conf readable only by root as suggested by smbd's man page. - - -- Eloy A. Paris Wed, 15 Oct 1997 09:21:25 -0400 - -samba (1.9.17p2-2) unstable; urgency=low - - * Running Samba as daemons instead of from inetd. - * Removing netbios entries in /etc/inetd.conf. - - -- Eloy A. Paris Thu, 9 Oct 1997 23:37:25 -0400 - -samba (1.9.17p2-1) unstable; urgency=low - - * New upstream version that fixes a serious security hole. - * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because - these patches are now part of the upstream release. - - -- Eloy A. Paris Sun, 28 Sep 1997 22:54:33 -0400 - -samba (1.9.17p1-1) unstable; urgency=low - - * New upstream version. - * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up - compiler warnings. - * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. - * Included crypt.h to have function prototype for crypt(). - * Included netinet/tcp.h to have some socket options included. - * Included netinet/ip.h to have some socket options included. - * Linking with libcrypt (LIBM='... -lcrypt'). Without including this - library smbd generates a seg. fault when authenticating users (?). - - -- Eloy A. Paris Wed, 10 Sep 1997 22:09:18 -0400 - -samba (1.9.17-1) unstable; urgency=low - - * New upstream version (called the "Browse Fix Release") - * Added the option --oknodo to the start-stop-daemon invocation in prerm - script. This was because the prerm was failing because start-stop-daemon - was returning an error code if no nmbd or smbd daemons were found - to kill. - * The function yp_get_default_domain(), referenced in three source - files was part of libc5 but with libc6 (glibc2) it has been moved - to libnss_nis. Since the linker was unable to find the function - I had to add LIBSM='-lnss_nis' to debian/rules. - * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules - because compiling was failing because of conflicts with glibc2. - * Patched source/includes.h to include termios.h if GLIBC2 is defined. - - -- Eloy A. Paris Wed, 27 Aug 1997 08:39:32 -0400 - -samba (1.9.17alpha5-1) unstable; urgency=low - - * New upstream version. - - -- Eloy A. Paris Thu, 14 Aug 1997 18:05:02 -0400 - -samba (1.9.16p11-3) unstable; urgency=low - - * Fixed accidental omission of /etc/pam.d/samba. - - -- Klee Dienes Sat, 15 Mar 1997 22:31:26 -0500 - -samba (1.9.16p11-2) unstable; urgency=low - - * Recompiled against newer PAM libraries. - * Added /etc/pam.d/samba. - - -- Klee Dienes Sat, 8 Mar 1997 01:16:28 -0500 - -samba (1.9.16p11-1) unstable; urgency=low - - * New upstream release. - * Added PAM support. - - -- Klee Dienes Tue, 25 Feb 1997 18:00:12 -0500 - -samba (1.9.16p9-2) unstable; urgency=low - - * minor packaging changes - - -- Klee Dienes Sun, 3 Nov 1996 11:45:37 -0700 - -samba (1.9.16p9-1) unstable; urgency=low - - * upgraded to new upstream version - - -- Klee Dienes Sat, 26 Oct 1996 21:38:20 -0700 - -1.9.16alpha10-1: - 960714 - * Removed Package_Revision from control file. - * Removed -m486 compiler option. - * Added Architecture, Section and Priority fields to control file. - * Upgraded to latest upstream version. - * Uses update-inetd now. - * Added shadow passwords support. - * Fixed Bug#1946: nmbd won't browse - -1.9.15p4-1: - 951128 - * Upgraded to latest upstream version. - * Fixed many bugs. - * Adds Master Browsing support. - * Converted to ELF. - * Fixed bug #1825 - nmbd is now killed when removing samba. - -1.9.14-1: - 950926 Andrew Howell - * Upgraded to latest version. - * Fixed Bug #1139 - samba won't print - -1.9.14alpha5-1: - * Fixes killing of inetd problem in debian.postint and debian.postrm - -1.9.14alpha5-0: - 950704 Andrew Howell - * Taken over samba package from Bruce Perens. - * Upgraded to newest version of samba. - -1.9.02-1: - 9-January-1994 Bruce Perens - * Added Debian GNU/Linux package maintenance system files, and - configured for Debian systems. - -Local variables: -mode: debian-changelog -add-log-mailing-address: "peloy@debian.org" -End: diff --git a/packaging/Debian/unstable/config.cache b/packaging/Debian/unstable/config.cache deleted file mode 100644 index c0a70a5b19b..00000000000 --- a/packaging/Debian/unstable/config.cache +++ /dev/null @@ -1,231 +0,0 @@ -# -# 22 August 2001 Steve Langasek -# -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -# -# This config.cache file contains a list of acceptable autoconf -# values which can be used in compiling Samba for Debian woody/sid. -# -# Autoconf sorts options alphabetically in its output. This file -# groups options logically. - - -# Load any architecture-specific settings -if [ -n "$DEB_HOST_GNU_TYPE" \ - -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then - . ../debian/config.cache.${DEB_HOST_GNU_TYPE} -fi - - -# This is at the top because it's most in need of regular tweaking. -# These are options which are supported on 2.4 kernels, but not on 2.2 -# kernels. - -samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} -samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} -samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} - - -# These are present in 2.2 kernels, but not in 2.0... - -samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} -samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} - - -# POSIX ACL support not present in Linux 2.2; not allowed in the -# Debian packages, even if present on the build machine. - -ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} - - -# Various basic libc/compiler stuff that it's blindingly obvious that -# Linux supports (now watch me get bitten for saying that) - -ac_cv_c_const=${ac_cv_c_const=yes} -ac_cv_c_inline=${ac_cv_c_inline=inline} -samba_cv_volatile=${samba_cv_volatile=yes} -ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} -ac_cv_func_bzero=${ac_cv_func_bzero=yes} -ac_cv_func_chmod=${ac_cv_func_chmod=yes} -ac_cv_func_chown=${ac_cv_func_chown=yes} -ac_cv_func_chroot=${ac_cv_func_chroot=yes} -ac_cv_func_connect=${ac_cv_func_connect=yes} -ac_cv_func_dup2=${ac_cv_func_dup2=yes} -ac_cv_func_execl=${ac_cv_func_execl=yes} -ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} -ac_cv_func_fchown=${ac_cv_func_fchown=yes} -ac_cv_func_fstat=${ac_cv_func_fstat=yes} -ac_cv_func_fsync=${ac_cv_func_fsync=yes} -ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} -ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} -ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} -ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} -ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} -ac_cv_func_glob=${ac_cv_func_glob=yes} -ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} -ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} -ac_cv_func_llseek=${ac_cv_func_llseek=yes} -ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} -ac_cv_func_memmove=${ac_cv_func_memmove=yes} -ac_cv_func_memset=${ac_cv_func_memset=yes} -ac_cv_func_mktime=${ac_cv_func_mktime=yes} -ac_cv_func_pipe=${ac_cv_func_pipe=yes} -ac_cv_func_poll=${ac_cv_func_poll=yes} -ac_cv_func_pread=${ac_cv_func_pread=yes} -ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} -ac_cv_func_rand=${ac_cv_func_rand=yes} -ac_cv_func_random=${ac_cv_func_random=yes} -ac_cv_func_readlink=${ac_cv_func_readlink=yes} -ac_cv_func_rename=${ac_cv_func_rename=yes} -ac_cv_func_select=${ac_cv_func_select=yes} -ac_cv_func_setenv=${ac_cv_func_setenv=yes} -ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} -ac_cv_func_setsid=${ac_cv_func_setsid=yes} -ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} -ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} -ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} -ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} -ac_cv_func_srand=${ac_cv_func_srand=yes} -ac_cv_func_srandom=${ac_cv_func_srandom=yes} -ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} -ac_cv_func_strchr=${ac_cv_func_strchr=yes} -ac_cv_func_strdup=${ac_cv_func_strdup=yes} -ac_cv_func_strerror=${ac_cv_func_strerror=yes} -ac_cv_func_strftime=${ac_cv_func_strftime=yes} -ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} -ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} -ac_cv_func_symlink=${ac_cv_func_symlink=yes} -ac_cv_func_usleep=${ac_cv_func_usleep=yes} -ac_cv_func_utime=${ac_cv_func_utime=yes} -ac_cv_func_utimes=${ac_cv_func_utimes=yes} -ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} -ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} -ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} -ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} -ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} -ac_cv_type_size_t=${ac_cv_type_size_t=yes} -ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} -samba_cv_socklen_t=${samba_cv_socklen_t=yes} - -# Yes, we know Linux supports fcntl locking. Just ignore -# any errors caused by building on an NFS mount. -samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} - - -# smbwrapper doesn't work because the glibc maintainers don't want -# to support transparent userland VFS. We might as well preempt -# any checks for shadowed symbols that are only useful for smbwrapper. - -ac_cv_func___acl=${ac_cv_func___acl=no} -ac_cv_func__acl=${ac_cv_func__acl=no} -ac_cv_func___chdir=${ac_cv_func___chdir=no} -ac_cv_func__chdir=${ac_cv_func__chdir=no} -ac_cv_func___close=${ac_cv_func___close=no} -ac_cv_func__close=${ac_cv_func__close=no} -ac_cv_func___closedir=${ac_cv_func___closedir=no} -ac_cv_func__closedir=${ac_cv_func__closedir=no} -ac_cv_func___dup=${ac_cv_func___dup=no} -ac_cv_func__dup=${ac_cv_func__dup=no} -ac_cv_func___dup2=${ac_cv_func___dup2=no} -ac_cv_func__dup2=${ac_cv_func__dup2=no} -ac_cv_func___facl=${ac_cv_func___facl=no} -ac_cv_func__facl=${ac_cv_func__facl=no} -ac_cv_func___fchdir=${ac_cv_func___fchdir=no} -ac_cv_func__fchdir=${ac_cv_func__fchdir=no} -ac_cv_func___fcntl=${ac_cv_func___fcntl=no} -ac_cv_func__fcntl=${ac_cv_func__fcntl=no} -ac_cv_func___fork=${ac_cv_func___fork=no} -ac_cv_func__fork=${ac_cv_func__fork=no} -ac_cv_func___fstat=${ac_cv_func___fstat=no} -ac_cv_func__fstat=${ac_cv_func__fstat=no} -ac_cv_func___fstat64=${ac_cv_func___fstat64=no} -ac_cv_func__fstat64=${ac_cv_func__fstat64=no} -ac_cv_func___fxstat=${ac_cv_func___fxstat=no} -ac_cv_func___getcwd=${ac_cv_func___getcwd=no} -ac_cv_func__getcwd=${ac_cv_func__getcwd=no} -ac_cv_func___getdents=${ac_cv_func___getdents=no} -ac_cv_func__getdents=${ac_cv_func__getdents=no} -ac_cv_func___llseek=${ac_cv_func___llseek=no} -ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} -ac_cv_func__llseek=${ac_cv_func__llseek=no} -ac_cv_func___lseek=${ac_cv_func___lseek=no} -ac_cv_func__lseek=${ac_cv_func__lseek=no} -ac_cv_func___lstat=${ac_cv_func___lstat=no} -ac_cv_func__lstat=${ac_cv_func__lstat=no} -ac_cv_func___lstat64=${ac_cv_func___lstat64=no} -ac_cv_func__lstat64=${ac_cv_func__lstat64=no} -ac_cv_func___lxstat=${ac_cv_func___lxstat=no} -ac_cv_func___open=${ac_cv_func___open=no} -ac_cv_func__open=${ac_cv_func__open=no} -ac_cv_func___open64=${ac_cv_func___open64=no} -ac_cv_func__open64=${ac_cv_func__open64=no} -ac_cv_func___opendir=${ac_cv_func___opendir=no} -ac_cv_func__opendir=${ac_cv_func__opendir=no} -ac_cv_func___pread=${ac_cv_func___pread=no} -ac_cv_func__pread=${ac_cv_func__pread=no} -ac_cv_func___pread64=${ac_cv_func___pread64=no} -ac_cv_func__pread64=${ac_cv_func__pread64=no} -ac_cv_func___pwrite=${ac_cv_func___pwrite=no} -ac_cv_func__pwrite=${ac_cv_func__pwrite=no} -ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} -ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} -ac_cv_func___read=${ac_cv_func___read=no} -ac_cv_func__read=${ac_cv_func__read=no} -ac_cv_func___readdir=${ac_cv_func___readdir=no} -ac_cv_func__readdir=${ac_cv_func__readdir=no} -ac_cv_func___readdir64=${ac_cv_func___readdir64=no} -ac_cv_func__readdir64=${ac_cv_func__readdir64=no} -ac_cv_func___seekdir=${ac_cv_func___seekdir=no} -ac_cv_func__seekdir=${ac_cv_func__seekdir=no} -ac_cv_func___stat=${ac_cv_func___stat=no} -ac_cv_func__stat=${ac_cv_func__stat=no} -ac_cv_func___stat64=${ac_cv_func___stat64=no} -ac_cv_func__stat64=${ac_cv_func__stat64=no} -ac_cv_func___telldir=${ac_cv_func___telldir=no} -ac_cv_func__telldir=${ac_cv_func__telldir=no} -ac_cv_func___write=${ac_cv_func___write=no} -ac_cv_func__write=${ac_cv_func__write=no} -ac_cv_func___xstat=${ac_cv_func___xstat=no} - - - -# Miscellaneous stuff that isn't, and shouldn't be, available -# in Debian. Those interested in building debs for other systems may -# need to remove some of these defines. - -ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} -ac_cv_func_crypt16=${ac_cv_func_crypt16=no} -ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} -ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} -ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} -ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} -ac_cv_func_rdchk=${ac_cv_func_rdchk=no} -ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} -ac_cv_func_setgidx=${ac_cv_func_setgidx=no} -ac_cv_func_setluid=${ac_cv_func_setluid=no} -ac_cv_func_setpriv=${ac_cv_func_setpriv=no} -ac_cv_func_setuidx=${ac_cv_func_setuidx=no} -ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} -ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} -ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} -ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} -ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} -ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} -ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} -ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} -ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} -ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/unstable/config.cache.alpha-linux b/packaging/Debian/unstable/config.cache.alpha-linux deleted file mode 100644 index 6d171920263..00000000000 --- a/packaging/Debian/unstable/config.cache.alpha-linux +++ /dev/null @@ -1,12 +0,0 @@ -# 22 Aug 2001 Steve Langasek - -# This file contains autoconf settings specific to the alpha-linux -# platform that should be preloaded when building for this architecture. - - -# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but -# Linux 2.4 does. Ensure that packages compiled for woody remain -# compatible with 2.2 kernels, even if the build machine is running 2.4. -samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/config.cache.sparc-linux b/packaging/Debian/unstable/config.cache.sparc-linux deleted file mode 100644 index a2a21b1d3ad..00000000000 --- a/packaging/Debian/unstable/config.cache.sparc-linux +++ /dev/null @@ -1,13 +0,0 @@ -# 24 Spe 2001 Steve Langasek - -# This file contains autoconf settings specific to the sparc-linux -# platform that should be preloaded when building for this architecture. - - -# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but -# Linux 2.4 does. Ensure that packages compiled for woody remain -# compatible with 2.2 kernels, even if the build machine is running 2.4. -samba_cv_have_setresuid=${samba_cv_have_setresuid=no} -samba_cv_have_setresgid=${samba_cv_have_setresgid=no} -samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} -samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/unstable/control b/packaging/Debian/unstable/control deleted file mode 100644 index 24356161b1b..00000000000 --- a/packaging/Debian/unstable/control +++ /dev/null @@ -1,121 +0,0 @@ -Source: samba -Section: net -Priority: optional -Maintainer: Eloy A. Paris -Build-Depends: debhelper (>=2.0.103), libpam0g-dev, libreadline4-dev, libcupsys2-dev -Standards-Version: 3.1.1 - -Package: samba -Architecture: any -Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends} -Replaces: samba-common (<= 2.0.5a-2) -Suggests: samba-doc -Description: A LanManager like file and printer server for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the components necessary to turn your - Debian GNU/Linux box into a powerful file and printer server. - . - As of Samba 2.0.6-1, the Samba Debian packages consist of the following: - . - samba - A LanManager like file and printer server for Unix. - samba-common - Samba common files used by both the server and the client. - smbclient - A LanManager like simple client for Unix. - swat - Samba Web Administration Tool - samba-doc - Samba documentation. - smbfs - Mount and umount commands for the smbfs (kernels 2.0.x and above). - -Package: samba-common -Architecture: any -Depends: libpam-modules, ${shlibs:Depends} -Replaces: samba (<= 2.0.5a-2) -Description: Samba common files used by both the server and the client. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the common files that are used by both the server - (provided in the samba package) and the client (provided in the smbclient - package). - -Package: smbclient -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Provides: samba-client -Suggests: smbfs -Description: A LanManager like simple client for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains some client components of the Samba suite. In - particular it includes the command line utilities smbclient, smbtar, - and smbspool. If you want to mount shares exported from Microsoft - Windows machines or a Samba server you must install the smbfs package. - -Package: swat -Architecture: any -Depends: samba (= ${Source-Version}), ${shlibs:Depends} -Recommends: samba-doc -Description: Samba Web Administration Tool - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the components of the Samba suite that are needed - for Web administration of the Samba server. - -Package: samba-doc -Section: doc -Architecture: all -Description: Samba documentation. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the documentation that comes in the original - tarball. - -Package: smbfs -Section: otherosfs -Priority: optional -Architecture: any -Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} -Suggests: smbclient -Replaces: smbfsx -Conflicts: smbfsx, suidmanager (<< 0.50) -Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) - Smbfs is a filesystem which understands the SMB protocol. - This is the protocol Windows for Workgroups, Windows NT or - Lan Manager use to talk to each other. It was inspired by - samba, the program by Andrew Tridgell that turns any unix - site into a file server for DOS or Windows clients. - . - If you want to use command-line utilites like smbclient, smbtar - and/or smbspool just need to install the smbclient package. - . - Starting with the Debian Samba packages version 2.2.0-1, the old smbfs - utilities for 2.0.x have been removed. There are no wrapper scripts - that call a specific smbmount/smbmount depending on the kernel version. - If you are using a 2.0.x kernel please upgrade or use the latest Samba - 2.0.7 Debian package. - -Package: libpam-smbpass -Section: admin -Priority: extra -Architecture: any -Depends: ${shlibs:Depends} -Suggests: samba -Description: pluggable authentication module for SMB password database - This is a stackable PAM module that allows a system administrator to easily - migrate to using encrypted passwords for Samba and to keep smb passwords in - sync with unix passwords. Unlike other solutions, it does this without - requiring users to change their existing passwords or login to Samba using - cleartext passwords. diff --git a/packaging/Debian/unstable/control.smbwrapper b/packaging/Debian/unstable/control.smbwrapper deleted file mode 100644 index 70444ca5f58..00000000000 --- a/packaging/Debian/unstable/control.smbwrapper +++ /dev/null @@ -1,111 +0,0 @@ -Source: samba -Section: net -Priority: optional -Maintainer: Eloy A. Paris -Standards-Version: 2.4.0.0 - -Package: samba -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Replaces: samba-common (<= 2.0.5a-2) -Suggests: samba-doc -Description: A LanManager like file and printer server for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the components necessary to turn your - Debian GNU/Linux box into a powerful file and printer server. - . - As of Samba 2.0.0, the Samba Debian packages consist of the following: - . - samba - A LanManager like file and printer server for Unix. - samba-common - Samba common files used by both the server and the client. - smbclient - A LanManager like simple client for Unix. - swat - Samba Web Administration Tool - samba-doc - Samba documentation. - smbfsx - Mount and umount commands for the smbfs and kernels > 2.1.70. - smbwrapper - A shared library that provides SMB client services - -Package: samba-common -Architecture: any -Depends: ${shlibs:Depends} -Replaces: samba (<= 2.0.5a-2) -Description: Samba common files used by both the server and the client. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the common files that are used by both the server - (provided in the samba package) and the client (provided in the smbclient - package). - -Package: smbclient -Architecture: any -Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} -Description: A LanManager like simple client for Unix. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the client components of the Samba suite. - -Package: swat -Architecture: any -Depends: samba, ${shlibs:Depends} -Description: Samba Web Administration Tool - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains the components of the Samba suite that are needed - for Web administration fo the Samba server. - -Package: samba-doc -Architecture: all -Description: Samba documentation. - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains all the documentation that comes in the original - tarball. - -Package: smbfs -Section: otherosfs -Priority: optional -Architecture: any -Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} -Replaces: smbfsx -Conflicts: smbfsx -Description: Mount and umount commands for the smbfs (2.0.x and 2.1.x kernels) - Smbfs is a filesystem which understands the SMB protocol. - This is the protocol Windows for Workgroups, Windows NT or - Lan Manager use to talk to each other. It was inspired by - samba, the program by Andrew Tridgell that turns any unix - site into a file server for DOS or Windows clients. - . - Starting with the Debian Samba packages version 2.0.4b-2, the old smbfs - utilities for 2.0.x and the new smbfs utilities for 2.2.x kernels have been - merged in a single package called smbfs. A wrapper script called smbmount.sh - identifies the version of the kernel running and calls the correct binary. - -Package: smbwrapper -Section: otherosfs -Priority: optional -Architecture: any -Depends: ${shlibs:Depends} -Description: A shared library that provides SMB client services - The Samba software suite is a collection of programs that - implements the SMB protocol for unix systems, allowing you to serve - files and printers to Windows, NT, OS/2 and DOS clients. This protocol - is sometimes also referred to as the LanManager or Netbios protocol. - . - This package contains prelodable shared library that provides SMB client - services for existing executables. Using this you can simulate a smb - filesystem. diff --git a/packaging/Debian/unstable/copyright b/packaging/Debian/unstable/copyright deleted file mode 100644 index 95bac89a540..00000000000 --- a/packaging/Debian/unstable/copyright +++ /dev/null @@ -1,36 +0,0 @@ -This is the Debian Linux prepackaged version of the Samba SMB -(LAN-Manager) server. Samba was written by Andrew Tridgell - and many others. - -This package was put together by Eloy Paris -based on previous work by Klee Dienes , -Andrew Howell and Bruce Perens -from sources found at . - -As of early in the samba-2.0.0alpha series, the Samba package for Debian -was split into the following packages: - -- samba (the Samba server) -- smbclient (a LAN Manager client - like the ftp program) -- swat (Samba Web Administration Tool) -- smbfs (smbfs userland utilities for kernels > 2.0.x) -- samba-doc (Samba documentation). - -Copyright: - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 dated June, 1991. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/unstable/cron.daily b/packaging/Debian/unstable/cron.daily deleted file mode 100644 index 42fc98d8f6d..00000000000 --- a/packaging/Debian/unstable/cron.daily +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. -# -# Written by Eloy A. Paris for the Debian project. -# - -BAK=/var/backups - -umask 022 -if cd $BAK; then - # Make sure /etc/samba/smbpasswd exists - if [ -f /etc/samba/smbpasswd ]; then - cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak - fi -fi diff --git a/packaging/Debian/unstable/docs b/packaging/Debian/unstable/docs deleted file mode 100644 index 187fdd34058..00000000000 --- a/packaging/Debian/unstable/docs +++ /dev/null @@ -1,3 +0,0 @@ -README -Roadmap -WHATSNEW.txt diff --git a/packaging/Debian/unstable/init.d b/packaging/Debian/unstable/init.d deleted file mode 100644 index 8ac2e97148f..00000000000 --- a/packaging/Debian/unstable/init.d +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# Start/stops the Samba daemons (nmbd and smbd). -# - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -# clear conflicting settings from the environment -unset TMPDIR - -# Sanity check: see if Samba has been configured on this system. -if [ ! -f $DEBIAN_CONFIG ]; then - echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" - echo "with the installation of Samba on this system. Please re-install" - echo "Samba. I can't continue!!!" - exit 1 -fi - -# Read current Samba configuration -. $DEBIAN_CONFIG - -# the Samba daemons. - -# If Samba is running from inetd then there is nothing to do -if [ "$run_mode" = "from_inetd" ]; then - # Commented out to close bug #26884 (startup message is rather long). I - # have yet to think how to let the user know that if he/she is running - # Samba from inetd, he can't just "/etc/init.d/samba stop" to stop - # the Samba daemons. -# echo "Warning: Samba is not running as daemons. Daemons not restarted/stopped." -# echo "Daemons will start automatically by inetd (if you wanted to start Samba)." -# echo "If you want to stop Samba, get the PID's of all nmbd and smbd processes" -# echo "and send them a SIGTERM signal but keep in mind that inetd could restart them." - exit 0 -fi - -# See if the daemons are there -test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 - -case "$1" in - start) - echo -n "Starting Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D - - echo -n " smbd" - start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D - - echo "." - ;; - stop) - echo -n "Stopping Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --stop --quiet --pidfile $NMBDPID - - echo -n " smbd" - start-stop-daemon --stop --quiet --pidfile $SMBDPID - - echo "." - ;; - reload) - echo -n "Reloading /etc/samba/smb.conf (smbd only)" - start-stop-daemon --stop --signal HUP --pidfile $SMBDPID - - echo "." - ;; - restart|force-reload) - echo -n "Restarting Samba daemons:" - - echo -n " nmbd" - start-stop-daemon --stop --quiet --pidfile $NMBDPID - sleep 2 - start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D - - echo -n " smbd" - start-stop-daemon --stop --quiet --pidfile $SMBDPID - sleep 2 - start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D - - echo "." - ;; - *) - echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/packaging/Debian/unstable/libpam-smbpass.files b/packaging/Debian/unstable/libpam-smbpass.files deleted file mode 100644 index 4263df5c0f0..00000000000 --- a/packaging/Debian/unstable/libpam-smbpass.files +++ /dev/null @@ -1 +0,0 @@ -lib/security/pam_smbpass.so diff --git a/packaging/Debian/unstable/mksmbpasswd.8 b/packaging/Debian/unstable/mksmbpasswd.8 deleted file mode 100644 index 0a500102e8a..00000000000 --- a/packaging/Debian/unstable/mksmbpasswd.8 +++ /dev/null @@ -1,28 +0,0 @@ -.TH MKSMBPASSWD 8 12-Apr-1998 -.SH NAME -mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file -.SH SYNOPSIS -mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd -.SH DESCRIPTION -.B mksmbpasswd -should be used only once, the first time Samba is installed. The idea -is to ease accounts creation by transferring all user accounts from -/etc/passwd to /etc/samba/smbpasswd. -.PP -Please note that passwords are not transferred automatically from -/etc/passwd to the new /etc/samba/smbpasswd file. After running -.B mksmbpasswd -all accounts are disabled so the system administrator must run -smbpasswd for each account that needs to be enable. -.SH FILES -.TP -/etc/passwd -System wide accounts file -.TP -/etc/samba/smbpasswd -Encrypted passwords file for the Samba daemons -.SH SEE ALSO -samba(7), nmbd(8), smbd(8) -.SH AUTHOR -Eloy A. Paris (man page based on sendmailconfig's man page -by Robert Leslie ) diff --git a/packaging/Debian/unstable/mksmbpasswd.awk b/packaging/Debian/unstable/mksmbpasswd.awk deleted file mode 100644 index a7b41a725d3..00000000000 --- a/packaging/Debian/unstable/mksmbpasswd.awk +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/awk -f -BEGIN {FS=":" - printf("#\n# SMB password file.\n#\n") - } -{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/unstable/rules b/packaging/Debian/unstable/rules deleted file mode 100644 index a2c37510b32..00000000000 --- a/packaging/Debian/unstable/rules +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/make -f -# -# Important modifications (introduction of a saved config.cache to -# solve build problems) we introduced in Samba 2.2.1a-5. These -# modification were made by Steve Langasek . -# - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=2 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -# Set the host and build architectures for use with config.cache loading, -# cross-building, etc. -DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -export DEB_HOST_GNU_TYPE -export DEB_BUILD_GNU_TYPE - -BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb - -DESTDIR=`pwd`/debian/samba -SWATDIR=`pwd`/debian/swat -SAMBABOOK=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/state/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat \ - SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba \ - CODEPAGEDIR=$(DESTDIR)/usr/share/samba/codepages - -configure: configure-stamp -configure-stamp: - dh_testdir - - # Add here commands to configure the package. -# > -# > Does the --with-fhs option work in configure? I tried it with -# > alpha3, but everything was stored in /usr/local. Is that correct? -# > ... -# -# Yes - the default prefix is still /usr/local; --with-fhs just -# changes the default paths for the config, etc. files to match -# the GNU/FHS specs. To get a complete FHS directory spec, use: -# -# ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ -# --localstatedir=/var - - if [ -f debian/config.cache ]; then \ - cp -f debian/config.cache source/config.cache; \ - fi - -# [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) - [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first -# $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - $(MAKE) -C source all smbtorture - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean -# -$(MAKE) -C source clean - -$(MAKE) -C source distclean - rm -f source/bin/rpctorture - rm -f source/bin/smbtorture - rm -f source/bin/debug2html - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - install -m 0755 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ - - # Create the symlink that will allow us to do "mount -t smbfs ...". - # Create also a symlink that will allow "mount -t smb ..." to - # work too. The symlink is created in $(DESTDIR)/sbin/ but - # will be moved by dh_movefiles to the smbfs package later on. - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb - - # For CUPS to support printing to samba printers, it's necessary - # to make the following symlink (according to - # Erich Schubert in #109509): - ln -s /usr/bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb - - # To avoid duplication of a large number of files, the swat package - # does not contain the "Using Samba" book nor the HTML docs. - # Instead, these are provided by the samba-doc package and - # are accessed through symlinks provided in the swat package. - # Here we create the symlink for the book, and the symlinks - # for the HTML files are created by the script installswat.sh. - ln -s ../../../doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba - - # Install man pages for files without man pages in the upstream sources - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # The smbwrapper package is not being generated anymore, so we must - # delete the related man pages. - rm $(DESTDIR)/usr/share/man/man1/smbsh.1 - - # These files are not part of the main samba package, move to where they - # belong... - #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # Install samba-common's conffiles - they'll get moved later to their - # correct place by dh_movefiles. - cp debian/smb.conf $(DESTDIR)/etc/samba/ - cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba - - dh_movefiles --sourcedir=debian/samba/ - - # Remove empty directories that will never be used. - rmdir $(DESTDIR)/sbin - -# Build architecture-independent files here. -# Pass -i to all debhelper commands in this target to reduce clutter. -binary-indep: DH_OPTIONS=-i -binary-indep: build install - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build - dh_installexamples -# dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit -# dh_installcron -# dh_installmanpages -# dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_link - dh_compress - dh_fixperms - dh_installdeb -# dh_perl - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture-dependent files here. -# Pass -a to all debhelper commands in this target to reduce clutter. -binary-arch: DH_OPTIONS=-a -binary-arch: build install - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -A docs/textdocs/DIAGNOSIS.txt debian/README.build - dh_installexamples -# dh_installmenu - dh_installlogrotate -# dh_installemacsen -# dh_installpam - dh_installinit - dh_installcron -# dh_installmanpages -# dh_installinfo - dh_undocumented - dh_installchangelogs - dh_strip - dh_link - dh_compress - dh_fixperms - - # You may want to make some executables suid here. - # The smbmnt, smbmount and smbumount binaries must be setuid-root. - chmod u+s debian/smbfs/usr/bin/smbmnt - chmod u+s debian/smbfs/usr/bin/smbmount - chmod u+s debian/smbfs/usr/bin/smbumount - - # Set some reasonable default perms for the samba logdir. - chmod 0750 $(DESTDIR)/var/log/samba/ - chown root.adm $(DESTDIR)/var/log/samba/ - - dh_installdeb -# dh_makeshlibs -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/unstable/rules.old b/packaging/Debian/unstable/rules.old deleted file mode 100644 index ac322185a9d..00000000000 --- a/packaging/Debian/unstable/rules.old +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/make -f -# Made with the iad of dh_make, by Craig Small -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Also some stuff taken from debmake scripts, by Cristopt Lameter. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -BVARS = BASEDIR=/usr \ - LIBDIR=/etc/samba \ - SMB_PASSWD_FILE=/etc/samba/smbpasswd \ - SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ - LOCKDIR=/var/samba \ - SWATDIR=/usr/share/samba/swat - -DESTDIR=`pwd`/debian/tmp -SWATDIR=`pwd`/debian/swat -SAMBABOOK=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat \ - SAMBABOOK=$(SAMBABOOK)/usr/share/samba/swat/using_samba - -build: build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first - [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) - $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - - # Now compile the old smbfs package - $(MAKE) -C source/smbfs-2.0.x - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean - -$(MAKE) -C source distclean -# -$(MAKE) -C source clean - rm -f source/bin/{rpctorture,smbtorture,debug2html} - - # Now clean the old smbfs-2.0.x package - -$(MAKE) -C source/smbfs-2.0.x clean - - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - - # Create the symlink that will allow us to do "mount -t smbfs ...". - # Create also a symlink that will allow "mount -t smb ..." to - # work too. The symlink is created in $(DESTDIR)/sbin/ but - # will be moved by dh_movefiles to the smbfs package later on. - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs - ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb - - # To avoid duplication of a large number of files, the swat package - # does not contain the "Using Samba" book nor the HTML docs. - # Instead, these are provided by the samba-doc package and - # are accessed through symlinks provided in the swat package. - # Here we create the symlink for the book, and the symlinks - # for the HTML files are created by the script installswat.sh. - ln -s /usr/share/doc/samba-doc/htmldocs/using_samba $(SAMBABOOK)/usr/share/samba/swat/using_samba - - # Install man pages for files without man pages in the upstream dist. - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # The smbwrapper package is not being generated anymore, so we must - # delete the related man pages. - rm $(DESTDIR)/usr/share/man/man1/smbsh.1 - - # We need to rename the SMB mount utilities so they don't have the same - # names as the files in the smbfs package. - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 - - # These files are not part of the main samba package, move to where they - # belong... - #mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must - # be setuid-root. - chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x - - # Install samba-common's conffiles - cp debian/smb.conf $(DESTDIR)/etc/samba/ - cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba - - # OK, now it's time to install the smbfs-2.0.2 files - $(MAKE) -C source/smbfs-2.0.x install $(IVARS) - - # Rename the old smbfs utilities to more convenient names - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 - - # Now install the smbmount and smbumount wrappers and its man pages - install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount - install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount - install -m 0644 debian/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount.8 - install -m 0644 debian/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount.8 - - # Install some docs. that go in "unusual" places - cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ - cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ - - dh_movefiles - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# dh_testversion - dh_testdir -i - dh_testroot -i - dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -i -# dh_installmenu -i -# dh_installemacsen -i -# dh_installinit -i -# dh_installcron -i -# dh_installmanpages -i - dh_undocumented - dh_installchangelogs -i - dh_compress -i -# dh_suidregister -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion - dh_testdir -a - dh_testroot -a - dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt -A debian/README.linux - dh_installexamples -a -# dh_installmenu -a -# dh_installemacsen -a - dh_installinit -a - dh_installcron -a -# dh_installmanpages -a - dh_undocumented - dh_installchangelogs -a - dh_strip -a - dh_compress -a - dh_suidregister -a - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a -# dh_makeshlibs -a - dh_md5sums -a - dh_builddeb -a - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/rules.smbwrapper b/packaging/Debian/unstable/rules.smbwrapper deleted file mode 100644 index e3c72ee47c4..00000000000 --- a/packaging/Debian/unstable/rules.smbwrapper +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/make -f -# Made with the iad of dh_make, by Craig Small -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Also some stuff taken from debmake scripts, by Cristopt Lameter. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -BVARS = BASEDIR=/usr \ - LIBDIR=/etc/samba \ - SMB_PASSWD_FILE=/etc/samba/smbpasswd \ - SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb \ - LOCKDIR=/var/samba \ - SWATDIR=/usr/share/samba/swat - -DESTDIR=`pwd`/debian/tmp -SWATDIR=`pwd`/debian/swat - -IVARS = BASEDIR=$(DESTDIR)/usr \ - BINDIR=$(DESTDIR)/usr/bin \ - SBINDIR=$(DESTDIR)/usr/sbin \ - MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ - VARDIR=$(DESTDIR)/var/samba \ - SWATDIR=$(SWATDIR)/usr/share/samba/swat - -build: build-stamp -build-stamp: - dh_testdir - - # Compile the Samba package first - [ -f source/Makefile ] || (cd source && ./configure --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-smbwrapper) - $(MAKE) -C source $(BVARS) all smbtorture rpctorture debug2html - - # Now compile the old smbfs package - $(MAKE) -C source/smbfs-2.0.x - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Clean first the Samba package -# -$(MAKE) -C source realclean - -$(MAKE) -C source distclean -# -$(MAKE) -C source clean - rm -f source/bin/{rpctorture,smbtorture,debug2html} - - # Now clean the old smbfs-2.0.x package - -$(MAKE) -C source/smbfs-2.0.x clean - - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - $(MAKE) -C source install $(IVARS) - - # Install other stuff not installed by "make install" - install -m 0755 source/script/mksmbpasswd.sh $(DESTDIR)/usr/sbin/mksmbpasswd - install -m 0755 source/bin/smbtorture $(DESTDIR)/usr/bin/ - install -m 0755 debian/sambaconfig $(DESTDIR)/usr/sbin/ - install -m 0755 source/smbadduser $(DESTDIR)/usr/sbin/ - - # Install man pages for files without man pages in the upstream dist. - install -m 0644 debian/sambaconfig.8 $(DESTDIR)/usr/share/man/man8/sambaconfig.8 - install -m 0644 debian/addtosmbpass.8 $(DESTDIR)/usr/share/man/man8/addtosmbpass.8 - install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 - - # Delete unwanted stuff leftover from "make install" - - # smbrun is not longer needed by smbd, so delete its man page - rm $(DESTDIR)/usr/share/man/man1/smbrun.1 - - # We need to rename the SMB mount utilities so they don't have the same - # names as the files in the smbfs package. - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.2.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.2.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.2.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.2.x.8 - - # These files are not part of the main samba package, move to where they - # belong... - mv $(DESTDIR)/usr/bin/smbwrapper.so debian/smbwrapper/usr/share/samba/ - - # The smbmnt, smbmount-2.2.x and smbumount-2.2.x binaries must - # be setuid-root. - chmod u+s $(DESTDIR)/usr/bin/smbmnt $(DESTDIR)/usr/bin/smbmount-2.2.x $(DESTDIR)/usr/bin/smbumount-2.2.x - - # Install samba-common's conffiles - cp debian/smb.conf $(DESTDIR)/etc/samba/ - - - # OK, now it's time to install the smbfs-2.0.2 files - $(MAKE) -C source/smbfs-2.0.x install $(IVARS) - - # Rename the old smbfs utilities to more convenient names - mv $(DESTDIR)/usr/bin/smbmount $(DESTDIR)/usr/bin/smbmount-2.0.x - mv $(DESTDIR)/usr/bin/smbumount $(DESTDIR)/usr/bin/smbumount-2.0.x - mv $(DESTDIR)/usr/share/man/man8/smbmount.8 $(DESTDIR)/usr/share/man/man8/smbmount-2.0.x.8 - mv $(DESTDIR)/usr/share/man/man8/smbumount.8 $(DESTDIR)/usr/share/man/man8/smbumount-2.0.x.8 - - # Now install the smbmount and smbumount wrappers - install debian/smbmount.sh $(DESTDIR)/usr/bin/smbmount - install debian/smbumount.sh $(DESTDIR)/usr/bin/smbumount - - # Install some docs. that go in "unusual" places - cp README-smbmount debian/smbfs/usr/share/doc/smbfs/2.2.x/ - cp source/smbfs-2.0.x/{FAQ,README,smbfs-2.0.2.lsm,Changes} debian/smbfs/usr/share/doc/smbfs/2.0.x/ - - dh_movefiles - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# dh_testversion - dh_testdir -i - dh_testroot -i - dh_installdocs -i -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -i -# dh_installmenu -i -# dh_installemacsen -i -# dh_installinit -i -# dh_installcron -i -# dh_installmanpages -i - dh_undocumented - dh_installchangelogs -i - dh_compress -i -# dh_suidregister -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion - dh_testdir -a - dh_testroot -a - dh_installdocs -a -A docs/textdocs/DIAGNOSIS.txt - dh_installexamples -a -# dh_installmenu -a -# dh_installemacsen -a - dh_installinit -a - dh_installcron -a -# dh_installmanpages -a - dh_undocumented - dh_installchangelogs -a - dh_strip -a - dh_compress -a - dh_suidregister -a - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a -# dh_makeshlibs -a - dh_md5sums -a - dh_builddeb -a - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff --git a/packaging/Debian/unstable/samba-common.conffiles b/packaging/Debian/unstable/samba-common.conffiles deleted file mode 100644 index b5703025dde..00000000000 --- a/packaging/Debian/unstable/samba-common.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/samba/smb.conf -/etc/pam.d/samba diff --git a/packaging/Debian/unstable/samba-common.files b/packaging/Debian/unstable/samba-common.files deleted file mode 100644 index 94f2e25f6a6..00000000000 --- a/packaging/Debian/unstable/samba-common.files +++ /dev/null @@ -1,7 +0,0 @@ -etc/samba/ -usr/bin/nmblookup -usr/bin/smbpasswd -etc/pam.d/ -usr/share/man/man1/nmblookup.1 -usr/share/man/man8/smbpasswd.8 -usr/share/samba/codepages/ diff --git a/packaging/Debian/unstable/samba-common.postrm b/packaging/Debian/unstable/samba-common.postrm deleted file mode 100644 index 2cd832b33d2..00000000000 --- a/packaging/Debian/unstable/samba-common.postrm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -if [ "$1" = purge ]; then - # Remove any files left in /etc/samba/ - rm -Rf /etc/samba/ -fi diff --git a/packaging/Debian/unstable/samba-doc.docs b/packaging/Debian/unstable/samba-doc.docs deleted file mode 100644 index 5ecd34993ee..00000000000 --- a/packaging/Debian/unstable/samba-doc.docs +++ /dev/null @@ -1,9 +0,0 @@ -README -docs/NT4_PlainPassword.reg -docs/THANKS -docs/Win95_PlainPassword.reg -docs/announce -docs/history -docs/textdocs/ -docs/faq/ -docs/htmldocs/ diff --git a/packaging/Debian/unstable/samba-doc.examples b/packaging/Debian/unstable/samba-doc.examples deleted file mode 100644 index 6a78432b28c..00000000000 --- a/packaging/Debian/unstable/samba-doc.examples +++ /dev/null @@ -1,3 +0,0 @@ -examples/ -debian/wins2dns.awk -source/smbadduser diff --git a/packaging/Debian/unstable/samba.conffiles b/packaging/Debian/unstable/samba.conffiles deleted file mode 100644 index 03f64414b06..00000000000 --- a/packaging/Debian/unstable/samba.conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/cron.daily/samba -/etc/init.d/samba diff --git a/packaging/Debian/unstable/samba.dirs b/packaging/Debian/unstable/samba.dirs deleted file mode 100644 index 237603750a1..00000000000 --- a/packaging/Debian/unstable/samba.dirs +++ /dev/null @@ -1,11 +0,0 @@ -sbin -usr/bin -usr/sbin -var/log/samba -var/state/samba -etc/samba -etc/pam.d -usr/share -usr/share/samba -lib/security -usr/lib/cups/backend diff --git a/packaging/Debian/unstable/samba.logrotate b/packaging/Debian/unstable/samba.logrotate deleted file mode 100644 index 9e96312986c..00000000000 --- a/packaging/Debian/unstable/samba.logrotate +++ /dev/null @@ -1,15 +0,0 @@ -/var/log/samba/log.smbd { - weekly - missingok - rotate 7 - compress - notifempty -} - -/var/log/samba/log.nmbd { - weekly - missingok - rotate 7 - compress - notifempty -} diff --git a/packaging/Debian/unstable/samba.pamd b/packaging/Debian/unstable/samba.pamd deleted file mode 100644 index 1a5a14c7089..00000000000 --- a/packaging/Debian/unstable/samba.pamd +++ /dev/null @@ -1,5 +0,0 @@ -auth required pam_unix.so nullok -account required pam_unix.so -session required pam_unix.so -password required pam_unix.so - diff --git a/packaging/Debian/unstable/samba.postinst b/packaging/Debian/unstable/samba.postinst deleted file mode 100644 index 3d5dd0cf93b..00000000000 --- a/packaging/Debian/unstable/samba.postinst +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/sh -# -# Post-installation script for the Samba package for Debian GNU/Linux -# -# Written by Eloy A. Paris for the Debian project. -# -# The prerm script (run before the postinst) disables Samba in /etc/inetd.conf -# and stops both nmbd and smbd. So, when this script is run we -# know that neither nmbd nor smbd can start. -# - -case "$1" in - configure) - # continue below - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# Take care of the /usr/doc/ to /usr/shar/doc/ migration. -if [ -d /usr/doc -a ! -e /usr/doc/samba -a -d /usr/share/doc/samba ]; then - ln -sf ../share/doc/samba /usr/doc/samba -fi - -# Starting with Samba 2.0.7-4 the location of the WINS database, the browse -# database and other important run-time files are stored in -# /var/state/samba/ rather than in /var/samba/. The following -# code takes care of moving the files in the old directory to -# the new directory. -if [ -d /var/samba/ ]; then - mv /var/samba/* /var/state/samba/ - rmdir /var/samba/ -fi - -# Define some constants... -DEBIAN_CONFIG=/etc/samba/debian_config -CONFIG_VERSION=1 - -# Now some variables... -samba_configured=no - - -if [ -f $DEBIAN_CONFIG ]; then - . $DEBIAN_CONFIG - if [ "$config_version" -ge "$CONFIG_VERSION" ]; then - samba_configured=yes - fi -fi - -# If Samba is configured we don't want to pester the user with -# configuration questions, just tell him that he can reconfigure -# Samba at any time by running /usr/sbin/sambaconfig. -if [ "$samba_configured" = "no" ]; then - # Samba is not configured, go and ask the user the information needed - # to configure it, and configure it! - - # Create Debian specific configuration file - echo "config_version=$CONFIG_VERSION" > $DEBIAN_CONFIG - - # We always run /etc/init.d/samba, even if we run Samba from inetd. - # This script file takes care of handling the conflict of running - # from inetd or as daemons. - update-rc.d samba defaults >/dev/null - - # We want to add these entries to inetd.conf commented out. Otherwise - # UDP traffic could make inetd to start nmbd or smbd right during - # the configuration stage. - update-inetd --add "## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" - update-inetd --add "## netbios-ns dgram udp wait root /usr/sbin/tcpd /usr/sbin/nmbd -a" - - echo "" - echo Samba Configuration - echo ------------------- - echo "The Samba server may be run either as a daemon at startup, or it may be" - echo "run from the inetd meta-daemon upon request. If run as a daemon, the" - echo "server will always be ready, so starting sessions will be faster. If run" - echo "from the inetd meta-daemon some memory will be saved and utilities such" - echo "as the tcpd TCP-wrapper may be used for extra security. If you don't" - echo "know what to do, running from inetd is a safe choice." - echo "" - echo "Run Samba as daemons or from inetd?" - echo -n "Press 'D' to run as daemons or 'I' to run from inetd: [I] " - - read mode - test -n "$mode" || mode="I" - - case "$mode" in - [Dd]*) - echo "Samba will run as daemons. Run sambaconfig to reconfigure" - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - echo "run_mode=as_daemons" >> $DEBIAN_CONFIG - ;; - - *) - echo "Samba will run from inetd. Run sambaconfig to reconfigure" - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - echo "run_mode=from_inetd" >> $DEBIAN_CONFIG - ;; - esac - - if [ ! -f /etc/samba/smbpasswd ]; then - echo "" - echo "If you are going to use encrypted passwords you need to have a" - echo "separate password file for this (the format is different from " - echo "/etc/passwd). Right now you don't have an /etc/samba/smbpasswd file." - echo "Do you want to generate this new file from your existing" - echo -n "/etc/passwd file? [y/N] " - - read yn - test -n "$yn" || yn="N" - - if [ $yn = y -o $yn = Y ]; then - cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd - chmod 600 /etc/samba/smbpasswd - echo "" - echo "/etc/samba/smbpasswd now has the same user names as /etc/passwd. However," - echo "you need to run smbpasswd manually to set the password for each user." - echo "" - echo "smbpasswd_created=yes" >> $DEBIAN_CONFIG - else - echo "smbpasswd_created=no" >> $DEBIAN_CONFIG - fi - fi - - echo "" - - # Start Samba: nothing wrong will happen if Samba is running from inetd - # and /etc/init.d/samba is run. However, to simplify things, we - # do not run /etc/init.d/samba if we're running from inetd. - - if [ $mode = d -o $mode = D ]; then - echo -n "Samba will run as daemons - start Samba now? [Y/n] " - read yn - test -n "$yn" || yn="Y" - - case "$yn" in - [Nn]*) - echo "Not started; to start later, do: /etc/init.d/samba start" - echo -n "Press [ENTER] " - read line - ;; - - *) - /etc/init.d/samba start - ;; - esac - else - echo "Since you are running Samba from inetd, the daemons will start" - echo "automatically by inetd when there is traffic on the NetBIOS" - echo "ports." - echo -n "Press [ENTER] " - read line - fi -else # if (samba_configured) ... - # We are here because Samba was already configured... - - # At this point the NetBIOS daemons are disabled in /etc/inetd.conf. - # This is a consequence of what we did in the prerm. If Samba was - # configured to run from inetd we need to enable the entries in - # /etc/inetd.conf. - - # Read current Samba configuration - . $DEBIAN_CONFIG - - if [ "$run_mode" = "from_inetd" ]; then - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - fi - - echo "" - echo "Samba was already installed and configured so I skipped the " - echo "configuration questions. You can run the script /usr/sbin/sambaconfig" - echo "at any time to reconfigure Samba. See sambaconfig(8) for more" - echo "details. I will not even ask you if you want to restart Samba," - echo "I will just do it!" - echo "" - - /etc/init.d/samba start -fi # if (samba_configured) ... - -if test "$1" = configure && dpkg --compare-versions "$2" lt 2.0.0final-2 && [ -f /etc/samba/smbpasswd ]; then - - cat << EOF - -*** IMPORTANT *** - -The format of the smbpasswd file (which is used only if you are using -encrypted passwords) is different in Samba 2.0.0 and above. I will -covert it to the new format. - -EOF - - mv /etc/samba/smbpasswd /etc/samba/smbpasswd.old - cat /etc/samba/smbpasswd.old | /usr/bin/convert_smbpasswd \ - > /etc/samba/smbpasswd 2> /dev/null -fi - -# This check is a safety net: the /etc/samba/smbpasswd file must have -# permissions 600. -if [ -f /etc/samba/smbpasswd ]; then - chmod 600 /etc/samba/smbpasswd -fi - -# Do the same check for /var/backup/smbpasswd.bak, just in case. -if [ -f /var/backups/smbpasswd.bak ]; then - chmod 600 /var/backups/smbpasswd.bak -fi - -exit 0 diff --git a/packaging/Debian/unstable/samba.postrm b/packaging/Debian/unstable/samba.postrm deleted file mode 100644 index 73b2f0d0a1f..00000000000 --- a/packaging/Debian/unstable/samba.postrm +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -if [ "$1" = purge ]; then - update-rc.d samba remove >/dev/null - - # Remove WINS.DAT, BROWSE.DAT and lock information file - rm -Rf /var/samba/ - - # Remove any files in the old and obsolete /var/lock/samba directory - rm -Rf /var/lock/samba/ - - # Remove files left in /etc/samba/ - rm -Rf /etc/samba/debian_config - rm -Rf /etc/samba/MACHINE.SID - - # Remove log files - rm -f /var/log/[ns]mb* - - # Remove NetBIOS entries from /etc/inetd.conf - update-inetd --remove netbios-ssn - update-inetd --remove netbios-ns -else - # Not purging, do not remove NetBIOS entries from /etc/inetd.conf - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns -fi diff --git a/packaging/Debian/unstable/samba.preinst b/packaging/Debian/unstable/samba.preinst deleted file mode 100644 index 6ebefb8fb1b..00000000000 --- a/packaging/Debian/unstable/samba.preinst +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# The purpose of the preinst script for the samba package is to help -# the migration of the conffiles smb.conf and smbpasswd from their -# old location (/etc/) to their new location (/etc/samba/). -# -# Thanks to Ben Pfaff for sharing on debian-devel -# his ideas about how to move conffiles to new locations. -# - -# First see if a smb.conf file currently exists. -test -f /etc/smb.conf || exit 0 - -# Now see if a smb.conf file exists in the new location. -test -e /etc/samba/smb.conf && exit 0 - -# -# Move smb.conf conffile from its old location (/etc/) to its new one -# (/etc/samba). -# -# If conffile exists in old location AND conffile does not exist on new -# location then... -# -if [ -f /etc/smb.conf -a ! -e /etc/samba/smb.conf ]; then - # The new location for the conffile should not exist yet, so we create the - # dir. - mkdir -p /etc/samba - - # Finally, move the conffile to its new location. - mv /etc/smb.conf /etc/samba/smb.conf -fi - -# -# Move smbpasswd conffile from its old location (/etc/) to its new one -# (/etc/samba). -# -# If conffile exists in old location AND conffile does not exist on new -# location then... -# -if [ -f /etc/smbpasswd -a ! -e /etc/samba/smbpasswd ]; then - # The new location for the conffile should not exist yet, so we create the - # dir. - mkdir -p /etc/samba - - # Finally, move the conffile to its new location. - mv /etc/smbpasswd /etc/samba/smbpasswd -fi diff --git a/packaging/Debian/unstable/samba.prerm b/packaging/Debian/unstable/samba.prerm deleted file mode 100644 index acd6d087b5c..00000000000 --- a/packaging/Debian/unstable/samba.prerm +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# Pre-removal script for the Samba package for Debian GNU/Linux. -# -# Written by Eloy A. Paris for the Debian project. -# - -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -# The most important thing the prerm script must do is to stop the Samba -# daemons (nmbd and smbd). Note that this can be tricky since Samba -# can be running from the inetd meta-daemon or as daemons (it's a -# user choice). - -# Before we stop Samba we need to know how it is running (from inetd -# or as daemons). We could source in the debian_config file but it -# is safer to grep /etc/inetd.conf. -if grep -q '^netbios-ns' /etc/inetd.conf; then - # Samba is running from inetd. We need to disable the Samba daemons - # in /etc/inetd.conf before we stop the daemons. Otherwise traffic - # in the NetBIOS ports will make inetd start them again. - # - # Note: user preferences regarding the mode he/she wants Samba to - # be run (inetd or daemons) will be lost next. In the postinst - # we depend on the information present in the debian_config - # file to restore everything back to the way it was. - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - - # Now it is safe to stop the daemons... - - # I have just recalled that old versions of nmbd and smbd did not store - # their PID's in /var/samba/state/ (or whatever directory - # was used for this purpose in configure), so I can't use - # --pidfile in start-stop-daemon to stop nmbd or smbd. I - # will handle this by testing first whether the PID file exists. - if [ -f $NMBDPID ]; then - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID - else - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet - fi - - # nmbd must be dead by now, now it's smbd's turn - if [ -f $SMBDPID ]; then - start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID - else - start-stop-daemon --stop --oknodo --user root --name smbd --quiet - fi -elif [ -x /etc/init.d/samba ]; then # Old Samba packages didn't have a - # /etc/init.d/samba so we better - # check first. - # Samba is running as daemons. No problem here, just stop Samba... - /etc/init.d/samba stop -fi - -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/samba ]; then - rm -f /usr/doc/samba -fi - -# Make sure there are no nmbd or smbd daemons running (security check) -# (as you see this code is commented out - so far I haven't had the need -# to do this sanity check - peloy, Aug. 23, 1998) -#ps -ax | grep nmbd -#if [ $? ... ]; then -# killall -9 nmbd -#fi - -#ps -ax | grep smbd -#if [ $? ... ]; then -# killall -9 smbd -#fi diff --git a/packaging/Debian/unstable/sambaconfig b/packaging/Debian/unstable/sambaconfig deleted file mode 100644 index 0d35a519670..00000000000 --- a/packaging/Debian/unstable/sambaconfig +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# -# Written by Eloy A. Paris for Debian GNU/Linux. -# - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -DEBIAN_CONFIG=/etc/samba/debian_config - -NMBDPID=/var/state/samba/nmbd.pid -SMBDPID=/var/state/samba/smbd.pid - -if [ ! -f $DEBIAN_CONFIG ]; then - echo "The file $DEBIAN_CONFIG does not exist! There is something wrong" - echo "with the installation of Samba on this system. Please re-install" - echo "Samba." - exit 1 -fi - -# Read current Samba configuration -. $DEBIAN_CONFIG - -reload=1 - -while [ $# -gt 0 ] -do - case "$1" in - --run-from-inetd) - run_from_inetd=1 - shift - ;; - - --run-as-daemons) - run_from_inetd=0 - shift - ;; - --no-reload) - reload=0 - shift - ;; - - *) - echo "Usage: $0 [--run-from-inetd|--run-as-daemons] [no-reload]" >&2 - exit 1 - ;; - esac -done - -# Make sure there are no Samba daemons (nmbd or smbd) running -# - -if [ "$run_mode" = "from_inetd" ]; then - # Samba is running from inetd - need to disable inetd before - # killing the daemons. - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - start-stop-daemon --stop --oknodo --user root --name nmbd --quiet --pidfile $NMBDPID - start-stop-daemon --stop --oknodo --user root --name smbd --quiet --pidfile $SMBDPID -else - # Samba is running as daemons - /etc/init.d/samba stop -fi - -if [ "x$run_from_inetd" = "x" ] -then - echo "Run Samba as daemons or from inetd?" - echo -n "Press 'D' for to run as daemons or 'I' to run from inetd: [I] " - - read mode - test -n "$mode" || mode="I" - - case "$mode" in - [Dd]*) - run_from_inetd=0 - ;; - - *) - run_from_inetd=1 - ;; - esac -fi - -if [ "$run_from_inetd" = 1 ]; then - echo "Samba will run from inetd. Run sambaconfig to reconfigure." - echo "" - update-inetd --enable netbios-ssn - update-inetd --enable netbios-ns - run_mode="from_inetd" -else - echo "Samba will run as daemons. Run sambaconfig to reconfigure." - echo "" - update-inetd --disable netbios-ssn - update-inetd --disable netbios-ns - run_mode="as_daemons" -fi - -# Rebuild Debian configuration file (only thing that could have -# changed so far is the variable called "run_mode". - -# Start the Samba daemons (take care of whether the user used the --no-reload -# option and how Samba is running: from inetd or as daemons) -echo "config_version=$config_version" > $DEBIAN_CONFIG -echo "run_mode=$run_mode" >> $DEBIAN_CONFIG -echo "smbpasswd_created=$smbpasswd_created" >> $DEBIAN_CONFIG - -if [ "$reload" = 0 ]; then - echo "Samba will not start (--no-reload parameter provided). Please note" - echo "that if you configured Samba to run from inetd, the Samba daemons" - echo "will start automatically when there is traffic in the NetBIOS ports" -elif [ "$run_from_inetd" = 1 ]; then - echo "The --no-reload parameter was not provided so I assume you want" - echo "to have the Samba daemons started. Since you are running from inetd" - echo "the Samba daemosn will start automatically when there is traffic" - echo "in the NetBIOS ports." -else - echo -n "The --no-reload parameter was not provided, start Samba now? [Y/n] " - read yn - test -n "$yn" || yn="Y" - - case "$yn" in - [Nn]*) - echo "Not started; to start later, do: /etc/init.d/samba start" - echo -n "Press [ENTER] " - read line - ;; - - *) - /etc/init.d/samba start - ;; - esac -fi diff --git a/packaging/Debian/unstable/sambaconfig.8 b/packaging/Debian/unstable/sambaconfig.8 deleted file mode 100644 index 2a0aaa9aa31..00000000000 --- a/packaging/Debian/unstable/sambaconfig.8 +++ /dev/null @@ -1,40 +0,0 @@ -.TH SAMBACONFIG 8 06-Apr-1998 -.SH NAME -sambaconfig \- configure Samba for Debian systems -.SH SYNOPSIS -sambaconfig [--run-from-inetd|--run-as-daemons] [--no-reload] -.SH DESCRIPTION -.B sambaconfig -is used to simplify the configuration of samba(8) for use on Debian -systems. -.PP -You may run this program to (re)configure samba for your Debian system -at any time. -.PP -Normally -.B sambaconfig -will ask if you want to reload the Samba daemons after making changes to its -configuration. The --no-reload option will avoid this question. Note -that if Samba is running from inetd and --no-reload is not supplied no -questions is asked because Samba will start automatically from inetd -when there is traffic on the NetBIOS ports. -.SH FILES -.TP -/etc/inetd.conf -If the lines that start the NetBIOS daemons nmbd and smbd are -commented out then Samba will start as daemons from /etc/init.d/start -.TP -/etc/init.d/samba -Script that will start/stop/restart Samba when running as daemons -.TP -/etc/samba/smbpasswd -Encrypted passwords file for the Samba daemons -.TP -/etc/samba/debian_config -Debian specific configuration information, it holds the mode in which -Samba is running (from inetd or as daemons). -.SH SEE ALSO -samba(7), nmbd(8), smbd(8) -.SH AUTHOR -Eloy A. Paris (man page based on sendmailconfig's man page -by Robert Leslie ) diff --git a/packaging/Debian/unstable/smb.conf b/packaging/Debian/unstable/smb.conf deleted file mode 100644 index 14cc20f49c4..00000000000 --- a/packaging/Debian/unstable/smb.conf +++ /dev/null @@ -1,147 +0,0 @@ -; -; /etc/samba/smb.conf -; -; Sample configuration file for the Samba suite for Debian GNU/Linux -; -; Please see the manual page for smb.conf for detailed description of -; every parameter. -; - -[global] - printing = bsd - printcap name = /etc/printcap - load printers = yes - guest account = nobody - invalid users = root - -; "security = user" is always a good idea. This will require a Unix account -; in this server for every user accessing the server. - security = user - -; Change this for the workgroup your Samba server will part of - workgroup = WORKGROUP - - server string = %h server (Samba %v) - -; If you want Samba to log though syslog only then set the following -; parameter to 'yes'. Please note that logging through syslog in -; Samba is still experimental. - syslog only = no - -; We want Samba to log a minimum amount of information to syslog. Everything -; should go to /var/log/{smb,nmb} instead. If you want to log through -; syslog you should set the following parameter to something higher. - syslog = 0; - -; This socket options really speed up Samba under Linux, according to my -; own tests. - socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 - -; Passwords are encrypted by default. This way the latest Windows 95 and NT -; clients can connect to the Samba server with no problems. - encrypt passwords = yes - -; It's always a good idea to use a WINS server. If you want this server -; to be the WINS server for your network change the following parameter -; to "yes". Otherwise leave it as "no" and specify your WINS server -; below (note: only one Samba server can be the WINS server). -; Read BROWSING.txt for more details. - wins support = no - -; If this server is not the WINS server then specify who is it and uncomment -; next line. -; wins server = 172.16.0.10 - -; Please read BROWSING.txt and set the next four parameters according -; to your network setup. There is no valid default so they are commented -; out. -; os level = 0 -; domain master = no -; local master = no -; preferred master = no - -; What naming service and in what order should we use to resolve host names -; to IP addresses - name resolve order = lmhosts host wins bcast - -; This will prevent nmbd to search for NetBIOS names through DNS. - dns proxy = no - -; Name mangling options - - preserve case = yes - short preserve case = yes - -; This boolean parameter controlls whether Samba attempts to sync. the Unix -; password with the SMB password when the encrypted SMB password in the -; /etc/samba/smbpasswd file is changed. - unix password sync = false - -; For Unix password sync. to work on a Debian GNU/Linux system, the following -; parameters must be set (thanks to Augustin Luton -; for sending the correct chat script for -; the passwd program in Debian Potato). - passwd program = /usr/bin/passwd %u - passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . - -; The following parameter is useful only if you have the linpopup package -; installed. The samba maintainer and the linpopup maintainer are -; working to ease installation and configuration of linpopup and samba. -; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & - -; The default maximum log file size is 5 MBytes. That's too big so this -; next parameter sets it to 1 MByte. Currently, Samba rotates log -; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes. -; A better solution would be to have Samba rotate the log file upon -; reception of a signal, but for now on, we have to live with this. - max log size = 1000 - - obey pam restrictions = yes - -[homes] - comment = Home Directories - browseable = no - -; By default, the home directories are exported read only. Change next -; parameter to "no" if you want to be able to write to them. - read only = yes - -; File creation mask is set to 0700 for security reasons. If you want to -; create files with group=rw permissions, set next parameter to 0775. - create mask = 0700 - -; Directory creation mask is set to 0700 for security reasons. If you want to -; create dirs. with group=rw permissions, set next parameter to 0775. - directory mask = 0700 - -[printers] - comment = All Printers - browseable = no - path = /tmp - printable = yes - public = no - writable = no - create mode = 0700 - -; A sample share for sharing your CD-ROM with others. -;[cdrom] -; comment = Samba server's CD-ROM -; writable = no -; locking = no -; path = /cdrom -; public = yes -; -; The next two parameters show how to auto-mount a CD-ROM when the -; cdrom share is accesed. For this to work /etc/fstab must contain -; an entry like this: -; -; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 -; -; The CD-ROM gets unmounted automatically after the connection to the -; -; If you don't want to use auto-mounting/unmounting make sure the CD -; is mounted on /cdrom -; -; preexec = /bin/mount /cdrom -; postexec = /bin/umount /cdrom - diff --git a/packaging/Debian/unstable/smbclient.files b/packaging/Debian/unstable/smbclient.files deleted file mode 100644 index f6ea8e14598..00000000000 --- a/packaging/Debian/unstable/smbclient.files +++ /dev/null @@ -1,9 +0,0 @@ -usr/bin/smbclient -usr/bin/smbtar -usr/bin/rpcclient -usr/bin/smbtorture -usr/bin/smbspool -usr/share/man/man1/smbclient.1 -usr/share/man/man1/smbtar.1 -usr/share/man/man8/smbspool.8 -usr/lib/cups/backend/smb diff --git a/packaging/Debian/unstable/smbfs.files b/packaging/Debian/unstable/smbfs.files deleted file mode 100644 index 77eb091880f..00000000000 --- a/packaging/Debian/unstable/smbfs.files +++ /dev/null @@ -1,8 +0,0 @@ -sbin/mount.smbfs -sbin/mount.smb -usr/bin/smbmount -usr/bin/smbumount -usr/bin/smbmnt -usr/share/man/man8/smbmount.8 -usr/share/man/man8/smbumount.8 -usr/share/man/man8/smbmnt.8 diff --git a/packaging/Debian/unstable/smbfs.suid b/packaging/Debian/unstable/smbfs.suid deleted file mode 100644 index 9569087fff3..00000000000 --- a/packaging/Debian/unstable/smbfs.suid +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin/smbmnt -usr/bin/smbmount-2.2.x -usr/bin/smbumount-2.2.x -usr/bin/smbmount-2.0.x -usr/bin/smbumount-2.0.x diff --git a/packaging/Debian/unstable/smbwrapper.dirs b/packaging/Debian/unstable/smbwrapper.dirs deleted file mode 100644 index fd727bddf05..00000000000 --- a/packaging/Debian/unstable/smbwrapper.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/share/samba diff --git a/packaging/Debian/unstable/smbwrapper.docs b/packaging/Debian/unstable/smbwrapper.docs deleted file mode 100644 index 2924e78734a..00000000000 --- a/packaging/Debian/unstable/smbwrapper.docs +++ /dev/null @@ -1,2 +0,0 @@ -source/smbwrapper/README -source/smbwrapper/PORTING diff --git a/packaging/Debian/unstable/smbwrapper.files b/packaging/Debian/unstable/smbwrapper.files deleted file mode 100644 index 08edbead6e6..00000000000 --- a/packaging/Debian/unstable/smbwrapper.files +++ /dev/null @@ -1 +0,0 @@ -usr/bin/smbsh diff --git a/packaging/Debian/unstable/smbwrapper.substvars b/packaging/Debian/unstable/smbwrapper.substvars deleted file mode 100644 index 2089e515d1b..00000000000 --- a/packaging/Debian/unstable/smbwrapper.substvars +++ /dev/null @@ -1 +0,0 @@ -shlibs:Depends=libc6 (>= 2.1) diff --git a/packaging/Debian/unstable/swat.dirs b/packaging/Debian/unstable/swat.dirs deleted file mode 100644 index d5df7df4b8e..00000000000 --- a/packaging/Debian/unstable/swat.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin -usr/share/samba/swat diff --git a/packaging/Debian/unstable/swat.docs b/packaging/Debian/unstable/swat.docs deleted file mode 100644 index afbfcf0c612..00000000000 --- a/packaging/Debian/unstable/swat.docs +++ /dev/null @@ -1 +0,0 @@ -swat/README diff --git a/packaging/Debian/unstable/swat.files b/packaging/Debian/unstable/swat.files deleted file mode 100644 index 6fed39111be..00000000000 --- a/packaging/Debian/unstable/swat.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin/swat -usr/share/man/man8/swat.8 diff --git a/packaging/Debian/unstable/swat.postinst b/packaging/Debian/unstable/swat.postinst deleted file mode 100644 index c5ab4890441..00000000000 --- a/packaging/Debian/unstable/swat.postinst +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -case "$1" in - configure) - ;; - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - *) - echo "$0: Unknown action \"$1\"" - exit 0 - ;; -esac - -# Set up swat, turned off by default. -update-inetd --group OTHER --add \ - '## swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' - -if [ -d /usr/doc -a ! -e /usr/doc/swat -a -d /usr/share/doc/swat ]; then - ln -sf ../share/doc/swat /usr/doc/swat -fi diff --git a/packaging/Debian/unstable/swat.postrm b/packaging/Debian/unstable/swat.postrm deleted file mode 100644 index e203d2855ff..00000000000 --- a/packaging/Debian/unstable/swat.postrm +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -case "$1" in - purge) - update-inetd --remove '/usr/sbin/swat$' - exit 0 - ;; - remove) - ;; - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - *) - echo "$0: unknown action \"$1\"" - exit 0 - ;; -esac - -exit 0 - diff --git a/packaging/Debian/unstable/wins2dns.awk b/packaging/Debian/unstable/wins2dns.awk deleted file mode 100644 index 176868a115d..00000000000 --- a/packaging/Debian/unstable/wins2dns.awk +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/awk -f -# -# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) -# From: Jason Gunthorpe -# To: samba@packages.debian.org -# Subject: Nifty samba script -# -# Here is a really nifty script I just wrote for samba, it takes the wins -# database in /var/samba/wins and writes out two dns files for it. In this -# way network wide wins clients can get into the dns for use by unix -# machines. -# -# Perhaps this could be included in /usr/doc/examples or somesuch. -# - -BEGIN { - FS="#|\""; -FORWARD="/tmp/wins.hosts" -REVERSE="/tmp/wins.rev" -DOMAIN="ven.ra.rockwell.com" -} -$3 == "00" { - split($4,a," " ); - split(a[2],b,"."); - while (sub(" ","-",$2)); - $2=tolower($2); - if (b[1] == "255") - next; - if (length($2) >= 8) - print $2"\ta\t"a[2] > FORWARD - else - print $2"\t\ta\t"a[2] > FORWARD - print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE -} -END { - system("echo killall -HUP named"); -} - -- cgit From 1f47f71abc393d599de56a82bd084d9d62503c55 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 20:48:02 +0000 Subject: Not used now. Jeremy. --- packaging/Debian/stable/README | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packaging/Debian/stable/README diff --git a/packaging/Debian/stable/README b/packaging/Debian/stable/README deleted file mode 100644 index 18e9bb94e6e..00000000000 --- a/packaging/Debian/stable/README +++ /dev/null @@ -1,3 +0,0 @@ -See new packaging notes in ../README - -Eloy A. Paris Sat Feb 2 08:46:04 CST 2002 -- cgit From 2cc8398e7f7925c6159a022224ec6b466fc54d20 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:11:03 +0000 Subject: Adding Mandrake patches from 8.1 --- packaging/Mandrake/samba-2.2.0-buildroot.patch.bz2 | Bin 0 -> 314 bytes packaging/Mandrake/samba-2.2.0-gawk.patch.bz2 | Bin 0 -> 295 bytes packaging/Mandrake/smbmount-sbin.patch.bz2 | Bin 0 -> 367 bytes packaging/Mandrake/swat_16.xpm.bz2 | Bin 0 -> 1003 bytes packaging/Mandrake/swat_32.xpm.bz2 | Bin 0 -> 2727 bytes packaging/Mandrake/swat_48.xpm.bz2 | Bin 0 -> 3051 bytes packaging/Mandrake/system-auth | 14 ++++++++++++++ 7 files changed, 14 insertions(+) create mode 100644 packaging/Mandrake/samba-2.2.0-buildroot.patch.bz2 create mode 100644 packaging/Mandrake/samba-2.2.0-gawk.patch.bz2 create mode 100644 packaging/Mandrake/smbmount-sbin.patch.bz2 create mode 100644 packaging/Mandrake/swat_16.xpm.bz2 create mode 100644 packaging/Mandrake/swat_32.xpm.bz2 create mode 100644 packaging/Mandrake/swat_48.xpm.bz2 create mode 100644 packaging/Mandrake/system-auth diff --git a/packaging/Mandrake/samba-2.2.0-buildroot.patch.bz2 b/packaging/Mandrake/samba-2.2.0-buildroot.patch.bz2 new file mode 100644 index 00000000000..08f6401a5d0 Binary files /dev/null and b/packaging/Mandrake/samba-2.2.0-buildroot.patch.bz2 differ diff --git a/packaging/Mandrake/samba-2.2.0-gawk.patch.bz2 b/packaging/Mandrake/samba-2.2.0-gawk.patch.bz2 new file mode 100644 index 00000000000..c1272fbcb44 Binary files /dev/null and b/packaging/Mandrake/samba-2.2.0-gawk.patch.bz2 differ diff --git a/packaging/Mandrake/smbmount-sbin.patch.bz2 b/packaging/Mandrake/smbmount-sbin.patch.bz2 new file mode 100644 index 00000000000..667e2af363a Binary files /dev/null and b/packaging/Mandrake/smbmount-sbin.patch.bz2 differ diff --git a/packaging/Mandrake/swat_16.xpm.bz2 b/packaging/Mandrake/swat_16.xpm.bz2 new file mode 100644 index 00000000000..c17430c5890 Binary files /dev/null and b/packaging/Mandrake/swat_16.xpm.bz2 differ diff --git a/packaging/Mandrake/swat_32.xpm.bz2 b/packaging/Mandrake/swat_32.xpm.bz2 new file mode 100644 index 00000000000..c8e4df6bff7 Binary files /dev/null and b/packaging/Mandrake/swat_32.xpm.bz2 differ diff --git a/packaging/Mandrake/swat_48.xpm.bz2 b/packaging/Mandrake/swat_48.xpm.bz2 new file mode 100644 index 00000000000..812b737b4f4 Binary files /dev/null and b/packaging/Mandrake/swat_48.xpm.bz2 differ diff --git a/packaging/Mandrake/system-auth b/packaging/Mandrake/system-auth new file mode 100644 index 00000000000..6b415e012c4 --- /dev/null +++ b/packaging/Mandrake/system-auth @@ -0,0 +1,14 @@ +#%PAM-1.0 + +auth required /lib/security/pam_env.so +auth sufficient /lib/security/pam_unix.so likeauth nullok +auth required /lib/security/pam_deny.so + +account required /lib/security/pam_unix.so + +password required /lib/security/pam_cracklib.so retry=3 +password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow +password required /lib/security/pam_deny.so + +session required /lib/security/pam_limits.so +session required /lib/security/pam_unix.so -- cgit From 52afae0f07e6d460039e8bebcba99217947e223b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 22:11:33 +0000 Subject: Mandrake codepage patch. Make version officially 2.2.3 Jeremy. --- source/codepages/CP932.TXT | 1880 ++++++++++++++++++++++++++++++++++++++++++++ source/include/version.h | 2 +- 2 files changed, 1881 insertions(+), 1 deletion(-) diff --git a/source/codepages/CP932.TXT b/source/codepages/CP932.TXT index 670ffc46b08..aeea43fc689 100644 --- a/source/codepages/CP932.TXT +++ b/source/codepages/CP932.TXT @@ -7613,6 +7613,1886 @@ 0xEEFA 0xFFE4 #FULLWIDTH BROKEN BAR 0xEEFB 0xFF07 #FULLWIDTH APOSTROPHE 0xEEFC 0xFF02 #FULLWIDTH QUOTATION MARK +0xF040 0xE000 #USER DEFINED CHAR +0xF041 0xE001 #USER DEFINED CHAR +0xF042 0xE002 #USER DEFINED CHAR +0xF043 0xE003 #USER DEFINED CHAR +0xF044 0xE004 #USER DEFINED CHAR +0xF045 0xE005 #USER DEFINED CHAR +0xF046 0xE006 #USER DEFINED CHAR +0xF047 0xE007 #USER DEFINED CHAR +0xF048 0xE008 #USER DEFINED CHAR +0xF049 0xE009 #USER DEFINED CHAR +0xF04A 0xE00A #USER DEFINED CHAR +0xF04B 0xE00B #USER DEFINED CHAR +0xF04C 0xE00C #USER DEFINED CHAR +0xF04D 0xE00D #USER DEFINED CHAR +0xF04E 0xE00E #USER DEFINED CHAR +0xF04F 0xE00F #USER DEFINED CHAR +0xF050 0xE010 #USER DEFINED CHAR +0xF051 0xE011 #USER DEFINED CHAR +0xF052 0xE012 #USER DEFINED CHAR +0xF053 0xE013 #USER DEFINED CHAR +0xF054 0xE014 #USER DEFINED CHAR +0xF055 0xE015 #USER DEFINED CHAR +0xF056 0xE016 #USER DEFINED CHAR +0xF057 0xE017 #USER DEFINED CHAR +0xF058 0xE018 #USER DEFINED CHAR +0xF059 0xE019 #USER DEFINED CHAR +0xF05A 0xE01A #USER DEFINED CHAR +0xF05B 0xE01B #USER DEFINED CHAR +0xF05C 0xE01C #USER DEFINED CHAR +0xF05D 0xE01D #USER DEFINED CHAR +0xF05E 0xE01E #USER DEFINED CHAR +0xF05F 0xE01F #USER DEFINED CHAR +0xF060 0xE020 #USER DEFINED CHAR +0xF061 0xE021 #USER DEFINED CHAR +0xF062 0xE022 #USER DEFINED CHAR +0xF063 0xE023 #USER DEFINED CHAR +0xF064 0xE024 #USER DEFINED CHAR +0xF065 0xE025 #USER DEFINED CHAR +0xF066 0xE026 #USER DEFINED CHAR +0xF067 0xE027 #USER DEFINED CHAR +0xF068 0xE028 #USER DEFINED CHAR +0xF069 0xE029 #USER DEFINED CHAR +0xF06A 0xE02A #USER DEFINED CHAR +0xF06B 0xE02B #USER DEFINED CHAR +0xF06C 0xE02C #USER DEFINED CHAR +0xF06D 0xE02D #USER DEFINED CHAR +0xF06E 0xE02E #USER DEFINED CHAR +0xF06F 0xE02F #USER DEFINED CHAR +0xF070 0xE030 #USER DEFINED CHAR +0xF071 0xE031 #USER DEFINED CHAR +0xF072 0xE032 #USER DEFINED CHAR +0xF073 0xE033 #USER DEFINED CHAR +0xF074 0xE034 #USER DEFINED CHAR +0xF075 0xE035 #USER DEFINED CHAR +0xF076 0xE036 #USER DEFINED CHAR +0xF077 0xE037 #USER DEFINED CHAR +0xF078 0xE038 #USER DEFINED CHAR +0xF079 0xE039 #USER DEFINED CHAR +0xF07A 0xE03A #USER DEFINED CHAR +0xF07B 0xE03B #USER DEFINED CHAR +0xF07C 0xE03C #USER DEFINED CHAR +0xF07D 0xE03D #USER DEFINED CHAR +0xF07E 0xE03E #USER DEFINED CHAR +0xF080 0xE03F #USER DEFINED CHAR +0xF081 0xE040 #USER DEFINED CHAR +0xF082 0xE041 #USER DEFINED CHAR +0xF083 0xE042 #USER DEFINED CHAR +0xF084 0xE043 #USER DEFINED CHAR +0xF085 0xE044 #USER DEFINED CHAR +0xF086 0xE045 #USER DEFINED CHAR +0xF087 0xE046 #USER DEFINED CHAR +0xF088 0xE047 #USER DEFINED CHAR +0xF089 0xE048 #USER DEFINED CHAR +0xF08A 0xE049 #USER DEFINED CHAR +0xF08B 0xE04A #USER DEFINED CHAR +0xF08C 0xE04B #USER DEFINED CHAR +0xF08D 0xE04C #USER DEFINED CHAR +0xF08E 0xE04D #USER DEFINED CHAR +0xF08F 0xE04E #USER DEFINED CHAR +0xF090 0xE04F #USER DEFINED CHAR +0xF091 0xE050 #USER DEFINED CHAR +0xF092 0xE051 #USER DEFINED CHAR +0xF093 0xE052 #USER DEFINED CHAR +0xF094 0xE053 #USER DEFINED CHAR +0xF095 0xE054 #USER DEFINED CHAR +0xF096 0xE055 #USER DEFINED CHAR +0xF097 0xE056 #USER DEFINED CHAR +0xF098 0xE057 #USER DEFINED CHAR +0xF099 0xE058 #USER DEFINED CHAR +0xF09A 0xE059 #USER DEFINED CHAR +0xF09B 0xE05A #USER DEFINED CHAR +0xF09C 0xE05B #USER DEFINED CHAR +0xF09D 0xE05C #USER DEFINED CHAR +0xF09E 0xE05D #USER DEFINED CHAR +0xF09F 0xE05E #USER DEFINED CHAR +0xF0A0 0xE05F #USER DEFINED CHAR +0xF0A1 0xE060 #USER DEFINED CHAR +0xF0A2 0xE061 #USER DEFINED CHAR +0xF0A3 0xE062 #USER DEFINED CHAR +0xF0A4 0xE063 #USER DEFINED CHAR +0xF0A5 0xE064 #USER DEFINED CHAR +0xF0A6 0xE065 #USER DEFINED CHAR +0xF0A7 0xE066 #USER DEFINED CHAR +0xF0A8 0xE067 #USER DEFINED CHAR +0xF0A9 0xE068 #USER DEFINED CHAR +0xF0AA 0xE069 #USER DEFINED CHAR +0xF0AB 0xE06A #USER DEFINED CHAR +0xF0AC 0xE06B #USER DEFINED CHAR +0xF0AD 0xE06C #USER DEFINED CHAR +0xF0AE 0xE06D #USER DEFINED CHAR +0xF0AF 0xE06E #USER DEFINED CHAR +0xF0B0 0xE06F #USER DEFINED CHAR +0xF0B1 0xE070 #USER DEFINED CHAR +0xF0B2 0xE071 #USER DEFINED CHAR +0xF0B3 0xE072 #USER DEFINED CHAR +0xF0B4 0xE073 #USER DEFINED CHAR +0xF0B5 0xE074 #USER DEFINED CHAR +0xF0B6 0xE075 #USER DEFINED CHAR +0xF0B7 0xE076 #USER DEFINED CHAR +0xF0B8 0xE077 #USER DEFINED CHAR +0xF0B9 0xE078 #USER DEFINED CHAR +0xF0BA 0xE079 #USER DEFINED CHAR +0xF0BB 0xE07A #USER DEFINED CHAR +0xF0BC 0xE07B #USER DEFINED CHAR +0xF0BD 0xE07C #USER DEFINED CHAR +0xF0BE 0xE07D #USER DEFINED CHAR +0xF0BF 0xE07E #USER DEFINED CHAR +0xF0C0 0xE07F #USER DEFINED CHAR +0xF0C1 0xE080 #USER DEFINED CHAR +0xF0C2 0xE081 #USER DEFINED CHAR +0xF0C3 0xE082 #USER DEFINED CHAR +0xF0C4 0xE083 #USER DEFINED CHAR +0xF0C5 0xE084 #USER DEFINED CHAR +0xF0C6 0xE085 #USER DEFINED CHAR +0xF0C7 0xE086 #USER DEFINED CHAR +0xF0C8 0xE087 #USER DEFINED CHAR +0xF0C9 0xE088 #USER DEFINED CHAR +0xF0CA 0xE089 #USER DEFINED CHAR +0xF0CB 0xE08A #USER DEFINED CHAR +0xF0CC 0xE08B #USER DEFINED CHAR +0xF0CD 0xE08C #USER DEFINED CHAR +0xF0CE 0xE08D #USER DEFINED CHAR +0xF0CF 0xE08E #USER DEFINED CHAR +0xF0D0 0xE08F #USER DEFINED CHAR +0xF0D1 0xE090 #USER DEFINED CHAR +0xF0D2 0xE091 #USER DEFINED CHAR +0xF0D3 0xE092 #USER DEFINED CHAR +0xF0D4 0xE093 #USER DEFINED CHAR +0xF0D5 0xE094 #USER DEFINED CHAR +0xF0D6 0xE095 #USER DEFINED CHAR +0xF0D7 0xE096 #USER DEFINED CHAR +0xF0D8 0xE097 #USER DEFINED CHAR +0xF0D9 0xE098 #USER DEFINED CHAR +0xF0DA 0xE099 #USER DEFINED CHAR +0xF0DB 0xE09A #USER DEFINED CHAR +0xF0DC 0xE09B #USER DEFINED CHAR +0xF0DD 0xE09C #USER DEFINED CHAR +0xF0DE 0xE09D #USER DEFINED CHAR +0xF0DF 0xE09E #USER DEFINED CHAR +0xF0E0 0xE09F #USER DEFINED CHAR +0xF0E1 0xE0A0 #USER DEFINED CHAR +0xF0E2 0xE0A1 #USER DEFINED CHAR +0xF0E3 0xE0A2 #USER DEFINED CHAR +0xF0E4 0xE0A3 #USER DEFINED CHAR +0xF0E5 0xE0A4 #USER DEFINED CHAR +0xF0E6 0xE0A5 #USER DEFINED CHAR +0xF0E7 0xE0A6 #USER DEFINED CHAR +0xF0E8 0xE0A7 #USER DEFINED CHAR +0xF0E9 0xE0A8 #USER DEFINED CHAR +0xF0EA 0xE0A9 #USER DEFINED CHAR +0xF0EB 0xE0AA #USER DEFINED CHAR +0xF0EC 0xE0AB #USER DEFINED CHAR +0xF0ED 0xE0AC #USER DEFINED CHAR +0xF0EE 0xE0AD #USER DEFINED CHAR +0xF0EF 0xE0AE #USER DEFINED CHAR +0xF0F0 0xE0AF #USER DEFINED CHAR +0xF0F1 0xE0B0 #USER DEFINED CHAR +0xF0F2 0xE0B1 #USER DEFINED CHAR +0xF0F3 0xE0B2 #USER DEFINED CHAR +0xF0F4 0xE0B3 #USER DEFINED CHAR +0xF0F5 0xE0B4 #USER DEFINED CHAR +0xF0F6 0xE0B5 #USER DEFINED CHAR +0xF0F7 0xE0B6 #USER DEFINED CHAR +0xF0F8 0xE0B7 #USER DEFINED CHAR +0xF0F9 0xE0B8 #USER DEFINED CHAR +0xF0FA 0xE0B9 #USER DEFINED CHAR +0xF0FB 0xE0BA #USER DEFINED CHAR +0xF0FC 0xE0BB #USER DEFINED CHAR +0xF140 0xE0BC #USER DEFINED CHAR +0xF141 0xE0BD #USER DEFINED CHAR +0xF142 0xE0BE #USER DEFINED CHAR +0xF143 0xE0BF #USER DEFINED CHAR +0xF144 0xE0C0 #USER DEFINED CHAR +0xF145 0xE0C1 #USER DEFINED CHAR +0xF146 0xE0C2 #USER DEFINED CHAR +0xF147 0xE0C3 #USER DEFINED CHAR +0xF148 0xE0C4 #USER DEFINED CHAR +0xF149 0xE0C5 #USER DEFINED CHAR +0xF14A 0xE0C6 #USER DEFINED CHAR +0xF14B 0xE0C7 #USER DEFINED CHAR +0xF14C 0xE0C8 #USER DEFINED CHAR +0xF14D 0xE0C9 #USER DEFINED CHAR +0xF14E 0xE0CA #USER DEFINED CHAR +0xF14F 0xE0CB #USER DEFINED CHAR +0xF150 0xE0CC #USER DEFINED CHAR +0xF151 0xE0CD #USER DEFINED CHAR +0xF152 0xE0CE #USER DEFINED CHAR +0xF153 0xE0CF #USER DEFINED CHAR +0xF154 0xE0D0 #USER DEFINED CHAR +0xF155 0xE0D1 #USER DEFINED CHAR +0xF156 0xE0D2 #USER DEFINED CHAR +0xF157 0xE0D3 #USER DEFINED CHAR +0xF158 0xE0D4 #USER DEFINED CHAR +0xF159 0xE0D5 #USER DEFINED CHAR +0xF15A 0xE0D6 #USER DEFINED CHAR +0xF15B 0xE0D7 #USER DEFINED CHAR +0xF15C 0xE0D8 #USER DEFINED CHAR +0xF15D 0xE0D9 #USER DEFINED CHAR +0xF15E 0xE0DA #USER DEFINED CHAR +0xF15F 0xE0DB #USER DEFINED CHAR +0xF160 0xE0DC #USER DEFINED CHAR +0xF161 0xE0DD #USER DEFINED CHAR +0xF162 0xE0DE #USER DEFINED CHAR +0xF163 0xE0DF #USER DEFINED CHAR +0xF164 0xE0E0 #USER DEFINED CHAR +0xF165 0xE0E1 #USER DEFINED CHAR +0xF166 0xE0E2 #USER DEFINED CHAR +0xF167 0xE0E3 #USER DEFINED CHAR +0xF168 0xE0E4 #USER DEFINED CHAR +0xF169 0xE0E5 #USER DEFINED CHAR +0xF16A 0xE0E6 #USER DEFINED CHAR +0xF16B 0xE0E7 #USER DEFINED CHAR +0xF16C 0xE0E8 #USER DEFINED CHAR +0xF16D 0xE0E9 #USER DEFINED CHAR +0xF16E 0xE0EA #USER DEFINED CHAR +0xF16F 0xE0EB #USER DEFINED CHAR +0xF170 0xE0EC #USER DEFINED CHAR +0xF171 0xE0ED #USER DEFINED CHAR +0xF172 0xE0EE #USER DEFINED CHAR +0xF173 0xE0EF #USER DEFINED CHAR +0xF174 0xE0F0 #USER DEFINED CHAR +0xF175 0xE0F1 #USER DEFINED CHAR +0xF176 0xE0F2 #USER DEFINED CHAR +0xF177 0xE0F3 #USER DEFINED CHAR +0xF178 0xE0F4 #USER DEFINED CHAR +0xF179 0xE0F5 #USER DEFINED CHAR +0xF17A 0xE0F6 #USER DEFINED CHAR +0xF17B 0xE0F7 #USER DEFINED CHAR +0xF17C 0xE0F8 #USER DEFINED CHAR +0xF17D 0xE0F9 #USER DEFINED CHAR +0xF17E 0xE0FA #USER DEFINED CHAR +0xF180 0xE0FB #USER DEFINED CHAR +0xF181 0xE0FC #USER DEFINED CHAR +0xF182 0xE0FD #USER DEFINED CHAR +0xF183 0xE0FE #USER DEFINED CHAR +0xF184 0xE0FF #USER DEFINED CHAR +0xF185 0xE100 #USER DEFINED CHAR +0xF186 0xE101 #USER DEFINED CHAR +0xF187 0xE102 #USER DEFINED CHAR +0xF188 0xE103 #USER DEFINED CHAR +0xF189 0xE104 #USER DEFINED CHAR +0xF18A 0xE105 #USER DEFINED CHAR +0xF18B 0xE106 #USER DEFINED CHAR +0xF18C 0xE107 #USER DEFINED CHAR +0xF18D 0xE108 #USER DEFINED CHAR +0xF18E 0xE109 #USER DEFINED CHAR +0xF18F 0xE10A #USER DEFINED CHAR +0xF190 0xE10B #USER DEFINED CHAR +0xF191 0xE10C #USER DEFINED CHAR +0xF192 0xE10D #USER DEFINED CHAR +0xF193 0xE10E #USER DEFINED CHAR +0xF194 0xE10F #USER DEFINED CHAR +0xF195 0xE110 #USER DEFINED CHAR +0xF196 0xE111 #USER DEFINED CHAR +0xF197 0xE112 #USER DEFINED CHAR +0xF198 0xE113 #USER DEFINED CHAR +0xF199 0xE114 #USER DEFINED CHAR +0xF19A 0xE115 #USER DEFINED CHAR +0xF19B 0xE116 #USER DEFINED CHAR +0xF19C 0xE117 #USER DEFINED CHAR +0xF19D 0xE118 #USER DEFINED CHAR +0xF19E 0xE119 #USER DEFINED CHAR +0xF19F 0xE11A #USER DEFINED CHAR +0xF1A0 0xE11B #USER DEFINED CHAR +0xF1A1 0xE11C #USER DEFINED CHAR +0xF1A2 0xE11D #USER DEFINED CHAR +0xF1A3 0xE11E #USER DEFINED CHAR +0xF1A4 0xE11F #USER DEFINED CHAR +0xF1A5 0xE120 #USER DEFINED CHAR +0xF1A6 0xE121 #USER DEFINED CHAR +0xF1A7 0xE122 #USER DEFINED CHAR +0xF1A8 0xE123 #USER DEFINED CHAR +0xF1A9 0xE124 #USER DEFINED CHAR +0xF1AA 0xE125 #USER DEFINED CHAR +0xF1AB 0xE126 #USER DEFINED CHAR +0xF1AC 0xE127 #USER DEFINED CHAR +0xF1AD 0xE128 #USER DEFINED CHAR +0xF1AE 0xE129 #USER DEFINED CHAR +0xF1AF 0xE12A #USER DEFINED CHAR +0xF1B0 0xE12B #USER DEFINED CHAR +0xF1B1 0xE12C #USER DEFINED CHAR +0xF1B2 0xE12D #USER DEFINED CHAR +0xF1B3 0xE12E #USER DEFINED CHAR +0xF1B4 0xE12F #USER DEFINED CHAR +0xF1B5 0xE130 #USER DEFINED CHAR +0xF1B6 0xE131 #USER DEFINED CHAR +0xF1B7 0xE132 #USER DEFINED CHAR +0xF1B8 0xE133 #USER DEFINED CHAR +0xF1B9 0xE134 #USER DEFINED CHAR +0xF1BA 0xE135 #USER DEFINED CHAR +0xF1BB 0xE136 #USER DEFINED CHAR +0xF1BC 0xE137 #USER DEFINED CHAR +0xF1BD 0xE138 #USER DEFINED CHAR +0xF1BE 0xE139 #USER DEFINED CHAR +0xF1BF 0xE13A #USER DEFINED CHAR +0xF1C0 0xE13B #USER DEFINED CHAR +0xF1C1 0xE13C #USER DEFINED CHAR +0xF1C2 0xE13D #USER DEFINED CHAR +0xF1C3 0xE13E #USER DEFINED CHAR +0xF1C4 0xE13F #USER DEFINED CHAR +0xF1C5 0xE140 #USER DEFINED CHAR +0xF1C6 0xE141 #USER DEFINED CHAR +0xF1C7 0xE142 #USER DEFINED CHAR +0xF1C8 0xE143 #USER DEFINED CHAR +0xF1C9 0xE144 #USER DEFINED CHAR +0xF1CA 0xE145 #USER DEFINED CHAR +0xF1CB 0xE146 #USER DEFINED CHAR +0xF1CC 0xE147 #USER DEFINED CHAR +0xF1CD 0xE148 #USER DEFINED CHAR +0xF1CE 0xE149 #USER DEFINED CHAR +0xF1CF 0xE14A #USER DEFINED CHAR +0xF1D0 0xE14B #USER DEFINED CHAR +0xF1D1 0xE14C #USER DEFINED CHAR +0xF1D2 0xE14D #USER DEFINED CHAR +0xF1D3 0xE14E #USER DEFINED CHAR +0xF1D4 0xE14F #USER DEFINED CHAR +0xF1D5 0xE150 #USER DEFINED CHAR +0xF1D6 0xE151 #USER DEFINED CHAR +0xF1D7 0xE152 #USER DEFINED CHAR +0xF1D8 0xE153 #USER DEFINED CHAR +0xF1D9 0xE154 #USER DEFINED CHAR +0xF1DA 0xE155 #USER DEFINED CHAR +0xF1DB 0xE156 #USER DEFINED CHAR +0xF1DC 0xE157 #USER DEFINED CHAR +0xF1DD 0xE158 #USER DEFINED CHAR +0xF1DE 0xE159 #USER DEFINED CHAR +0xF1DF 0xE15A #USER DEFINED CHAR +0xF1E0 0xE15B #USER DEFINED CHAR +0xF1E1 0xE15C #USER DEFINED CHAR +0xF1E2 0xE15D #USER DEFINED CHAR +0xF1E3 0xE15E #USER DEFINED CHAR +0xF1E4 0xE15F #USER DEFINED CHAR +0xF1E5 0xE160 #USER DEFINED CHAR +0xF1E6 0xE161 #USER DEFINED CHAR +0xF1E7 0xE162 #USER DEFINED CHAR +0xF1E8 0xE163 #USER DEFINED CHAR +0xF1E9 0xE164 #USER DEFINED CHAR +0xF1EA 0xE165 #USER DEFINED CHAR +0xF1EB 0xE166 #USER DEFINED CHAR +0xF1EC 0xE167 #USER DEFINED CHAR +0xF1ED 0xE168 #USER DEFINED CHAR +0xF1EE 0xE169 #USER DEFINED CHAR +0xF1EF 0xE16A #USER DEFINED CHAR +0xF1F0 0xE16B #USER DEFINED CHAR +0xF1F1 0xE16C #USER DEFINED CHAR +0xF1F2 0xE16D #USER DEFINED CHAR +0xF1F3 0xE16E #USER DEFINED CHAR +0xF1F4 0xE16F #USER DEFINED CHAR +0xF1F5 0xE170 #USER DEFINED CHAR +0xF1F6 0xE171 #USER DEFINED CHAR +0xF1F7 0xE172 #USER DEFINED CHAR +0xF1F8 0xE173 #USER DEFINED CHAR +0xF1F9 0xE174 #USER DEFINED CHAR +0xF1FA 0xE175 #USER DEFINED CHAR +0xF1FB 0xE176 #USER DEFINED CHAR +0xF1FC 0xE177 #USER DEFINED CHAR +0xF240 0xE178 #USER DEFINED CHAR +0xF241 0xE179 #USER DEFINED CHAR +0xF242 0xE17A #USER DEFINED CHAR +0xF243 0xE17B #USER DEFINED CHAR +0xF244 0xE17C #USER DEFINED CHAR +0xF245 0xE17D #USER DEFINED CHAR +0xF246 0xE17E #USER DEFINED CHAR +0xF247 0xE17F #USER DEFINED CHAR +0xF248 0xE180 #USER DEFINED CHAR +0xF249 0xE181 #USER DEFINED CHAR +0xF24A 0xE182 #USER DEFINED CHAR +0xF24B 0xE183 #USER DEFINED CHAR +0xF24C 0xE184 #USER DEFINED CHAR +0xF24D 0xE185 #USER DEFINED CHAR +0xF24E 0xE186 #USER DEFINED CHAR +0xF24F 0xE187 #USER DEFINED CHAR +0xF250 0xE188 #USER DEFINED CHAR +0xF251 0xE189 #USER DEFINED CHAR +0xF252 0xE18A #USER DEFINED CHAR +0xF253 0xE18B #USER DEFINED CHAR +0xF254 0xE18C #USER DEFINED CHAR +0xF255 0xE18D #USER DEFINED CHAR +0xF256 0xE18E #USER DEFINED CHAR +0xF257 0xE18F #USER DEFINED CHAR +0xF258 0xE190 #USER DEFINED CHAR +0xF259 0xE191 #USER DEFINED CHAR +0xF25A 0xE192 #USER DEFINED CHAR +0xF25B 0xE193 #USER DEFINED CHAR +0xF25C 0xE194 #USER DEFINED CHAR +0xF25D 0xE195 #USER DEFINED CHAR +0xF25E 0xE196 #USER DEFINED CHAR +0xF25F 0xE197 #USER DEFINED CHAR +0xF260 0xE198 #USER DEFINED CHAR +0xF261 0xE199 #USER DEFINED CHAR +0xF262 0xE19A #USER DEFINED CHAR +0xF263 0xE19B #USER DEFINED CHAR +0xF264 0xE19C #USER DEFINED CHAR +0xF265 0xE19D #USER DEFINED CHAR +0xF266 0xE19E #USER DEFINED CHAR +0xF267 0xE19F #USER DEFINED CHAR +0xF268 0xE1A0 #USER DEFINED CHAR +0xF269 0xE1A1 #USER DEFINED CHAR +0xF26A 0xE1A2 #USER DEFINED CHAR +0xF26B 0xE1A3 #USER DEFINED CHAR +0xF26C 0xE1A4 #USER DEFINED CHAR +0xF26D 0xE1A5 #USER DEFINED CHAR +0xF26E 0xE1A6 #USER DEFINED CHAR +0xF26F 0xE1A7 #USER DEFINED CHAR +0xF270 0xE1A8 #USER DEFINED CHAR +0xF271 0xE1A9 #USER DEFINED CHAR +0xF272 0xE1AA #USER DEFINED CHAR +0xF273 0xE1AB #USER DEFINED CHAR +0xF274 0xE1AC #USER DEFINED CHAR +0xF275 0xE1AD #USER DEFINED CHAR +0xF276 0xE1AE #USER DEFINED CHAR +0xF277 0xE1AF #USER DEFINED CHAR +0xF278 0xE1B0 #USER DEFINED CHAR +0xF279 0xE1B1 #USER DEFINED CHAR +0xF27A 0xE1B2 #USER DEFINED CHAR +0xF27B 0xE1B3 #USER DEFINED CHAR +0xF27C 0xE1B4 #USER DEFINED CHAR +0xF27D 0xE1B5 #USER DEFINED CHAR +0xF27E 0xE1B6 #USER DEFINED CHAR +0xF280 0xE1B7 #USER DEFINED CHAR +0xF281 0xE1B8 #USER DEFINED CHAR +0xF282 0xE1B9 #USER DEFINED CHAR +0xF283 0xE1BA #USER DEFINED CHAR +0xF284 0xE1BB #USER DEFINED CHAR +0xF285 0xE1BC #USER DEFINED CHAR +0xF286 0xE1BD #USER DEFINED CHAR +0xF287 0xE1BE #USER DEFINED CHAR +0xF288 0xE1BF #USER DEFINED CHAR +0xF289 0xE1C0 #USER DEFINED CHAR +0xF28A 0xE1C1 #USER DEFINED CHAR +0xF28B 0xE1C2 #USER DEFINED CHAR +0xF28C 0xE1C3 #USER DEFINED CHAR +0xF28D 0xE1C4 #USER DEFINED CHAR +0xF28E 0xE1C5 #USER DEFINED CHAR +0xF28F 0xE1C6 #USER DEFINED CHAR +0xF290 0xE1C7 #USER DEFINED CHAR +0xF291 0xE1C8 #USER DEFINED CHAR +0xF292 0xE1C9 #USER DEFINED CHAR +0xF293 0xE1CA #USER DEFINED CHAR +0xF294 0xE1CB #USER DEFINED CHAR +0xF295 0xE1CC #USER DEFINED CHAR +0xF296 0xE1CD #USER DEFINED CHAR +0xF297 0xE1CE #USER DEFINED CHAR +0xF298 0xE1CF #USER DEFINED CHAR +0xF299 0xE1D0 #USER DEFINED CHAR +0xF29A 0xE1D1 #USER DEFINED CHAR +0xF29B 0xE1D2 #USER DEFINED CHAR +0xF29C 0xE1D3 #USER DEFINED CHAR +0xF29D 0xE1D4 #USER DEFINED CHAR +0xF29E 0xE1D5 #USER DEFINED CHAR +0xF29F 0xE1D6 #USER DEFINED CHAR +0xF2A0 0xE1D7 #USER DEFINED CHAR +0xF2A1 0xE1D8 #USER DEFINED CHAR +0xF2A2 0xE1D9 #USER DEFINED CHAR +0xF2A3 0xE1DA #USER DEFINED CHAR +0xF2A4 0xE1DB #USER DEFINED CHAR +0xF2A5 0xE1DC #USER DEFINED CHAR +0xF2A6 0xE1DD #USER DEFINED CHAR +0xF2A7 0xE1DE #USER DEFINED CHAR +0xF2A8 0xE1DF #USER DEFINED CHAR +0xF2A9 0xE1E0 #USER DEFINED CHAR +0xF2AA 0xE1E1 #USER DEFINED CHAR +0xF2AB 0xE1E2 #USER DEFINED CHAR +0xF2AC 0xE1E3 #USER DEFINED CHAR +0xF2AD 0xE1E4 #USER DEFINED CHAR +0xF2AE 0xE1E5 #USER DEFINED CHAR +0xF2AF 0xE1E6 #USER DEFINED CHAR +0xF2B0 0xE1E7 #USER DEFINED CHAR +0xF2B1 0xE1E8 #USER DEFINED CHAR +0xF2B2 0xE1E9 #USER DEFINED CHAR +0xF2B3 0xE1EA #USER DEFINED CHAR +0xF2B4 0xE1EB #USER DEFINED CHAR +0xF2B5 0xE1EC #USER DEFINED CHAR +0xF2B6 0xE1ED #USER DEFINED CHAR +0xF2B7 0xE1EE #USER DEFINED CHAR +0xF2B8 0xE1EF #USER DEFINED CHAR +0xF2B9 0xE1F0 #USER DEFINED CHAR +0xF2BA 0xE1F1 #USER DEFINED CHAR +0xF2BB 0xE1F2 #USER DEFINED CHAR +0xF2BC 0xE1F3 #USER DEFINED CHAR +0xF2BD 0xE1F4 #USER DEFINED CHAR +0xF2BE 0xE1F5 #USER DEFINED CHAR +0xF2BF 0xE1F6 #USER DEFINED CHAR +0xF2C0 0xE1F7 #USER DEFINED CHAR +0xF2C1 0xE1F8 #USER DEFINED CHAR +0xF2C2 0xE1F9 #USER DEFINED CHAR +0xF2C3 0xE1FA #USER DEFINED CHAR +0xF2C4 0xE1FB #USER DEFINED CHAR +0xF2C5 0xE1FC #USER DEFINED CHAR +0xF2C6 0xE1FD #USER DEFINED CHAR +0xF2C7 0xE1FE #USER DEFINED CHAR +0xF2C8 0xE1FF #USER DEFINED CHAR +0xF2C9 0xE200 #USER DEFINED CHAR +0xF2CA 0xE201 #USER DEFINED CHAR +0xF2CB 0xE202 #USER DEFINED CHAR +0xF2CC 0xE203 #USER DEFINED CHAR +0xF2CD 0xE204 #USER DEFINED CHAR +0xF2CE 0xE205 #USER DEFINED CHAR +0xF2CF 0xE206 #USER DEFINED CHAR +0xF2D0 0xE207 #USER DEFINED CHAR +0xF2D1 0xE208 #USER DEFINED CHAR +0xF2D2 0xE209 #USER DEFINED CHAR +0xF2D3 0xE20A #USER DEFINED CHAR +0xF2D4 0xE20B #USER DEFINED CHAR +0xF2D5 0xE20C #USER DEFINED CHAR +0xF2D6 0xE20D #USER DEFINED CHAR +0xF2D7 0xE20E #USER DEFINED CHAR +0xF2D8 0xE20F #USER DEFINED CHAR +0xF2D9 0xE210 #USER DEFINED CHAR +0xF2DA 0xE211 #USER DEFINED CHAR +0xF2DB 0xE212 #USER DEFINED CHAR +0xF2DC 0xE213 #USER DEFINED CHAR +0xF2DD 0xE214 #USER DEFINED CHAR +0xF2DE 0xE215 #USER DEFINED CHAR +0xF2DF 0xE216 #USER DEFINED CHAR +0xF2E0 0xE217 #USER DEFINED CHAR +0xF2E1 0xE218 #USER DEFINED CHAR +0xF2E2 0xE219 #USER DEFINED CHAR +0xF2E3 0xE21A #USER DEFINED CHAR +0xF2E4 0xE21B #USER DEFINED CHAR +0xF2E5 0xE21C #USER DEFINED CHAR +0xF2E6 0xE21D #USER DEFINED CHAR +0xF2E7 0xE21E #USER DEFINED CHAR +0xF2E8 0xE21F #USER DEFINED CHAR +0xF2E9 0xE220 #USER DEFINED CHAR +0xF2EA 0xE221 #USER DEFINED CHAR +0xF2EB 0xE222 #USER DEFINED CHAR +0xF2EC 0xE223 #USER DEFINED CHAR +0xF2ED 0xE224 #USER DEFINED CHAR +0xF2EE 0xE225 #USER DEFINED CHAR +0xF2EF 0xE226 #USER DEFINED CHAR +0xF2F0 0xE227 #USER DEFINED CHAR +0xF2F1 0xE228 #USER DEFINED CHAR +0xF2F2 0xE229 #USER DEFINED CHAR +0xF2F3 0xE22A #USER DEFINED CHAR +0xF2F4 0xE22B #USER DEFINED CHAR +0xF2F5 0xE22C #USER DEFINED CHAR +0xF2F6 0xE22D #USER DEFINED CHAR +0xF2F7 0xE22E #USER DEFINED CHAR +0xF2F8 0xE22F #USER DEFINED CHAR +0xF2F9 0xE230 #USER DEFINED CHAR +0xF2FA 0xE231 #USER DEFINED CHAR +0xF2FB 0xE232 #USER DEFINED CHAR +0xF2FC 0xE233 #USER DEFINED CHAR +0xF340 0xE234 #USER DEFINED CHAR +0xF341 0xE235 #USER DEFINED CHAR +0xF342 0xE236 #USER DEFINED CHAR +0xF343 0xE237 #USER DEFINED CHAR +0xF344 0xE238 #USER DEFINED CHAR +0xF345 0xE239 #USER DEFINED CHAR +0xF346 0xE23A #USER DEFINED CHAR +0xF347 0xE23B #USER DEFINED CHAR +0xF348 0xE23C #USER DEFINED CHAR +0xF349 0xE23D #USER DEFINED CHAR +0xF34A 0xE23E #USER DEFINED CHAR +0xF34B 0xE23F #USER DEFINED CHAR +0xF34C 0xE240 #USER DEFINED CHAR +0xF34D 0xE241 #USER DEFINED CHAR +0xF34E 0xE242 #USER DEFINED CHAR +0xF34F 0xE243 #USER DEFINED CHAR +0xF350 0xE244 #USER DEFINED CHAR +0xF351 0xE245 #USER DEFINED CHAR +0xF352 0xE246 #USER DEFINED CHAR +0xF353 0xE247 #USER DEFINED CHAR +0xF354 0xE248 #USER DEFINED CHAR +0xF355 0xE249 #USER DEFINED CHAR +0xF356 0xE24A #USER DEFINED CHAR +0xF357 0xE24B #USER DEFINED CHAR +0xF358 0xE24C #USER DEFINED CHAR +0xF359 0xE24D #USER DEFINED CHAR +0xF35A 0xE24E #USER DEFINED CHAR +0xF35B 0xE24F #USER DEFINED CHAR +0xF35C 0xE250 #USER DEFINED CHAR +0xF35D 0xE251 #USER DEFINED CHAR +0xF35E 0xE252 #USER DEFINED CHAR +0xF35F 0xE253 #USER DEFINED CHAR +0xF360 0xE254 #USER DEFINED CHAR +0xF361 0xE255 #USER DEFINED CHAR +0xF362 0xE256 #USER DEFINED CHAR +0xF363 0xE257 #USER DEFINED CHAR +0xF364 0xE258 #USER DEFINED CHAR +0xF365 0xE259 #USER DEFINED CHAR +0xF366 0xE25A #USER DEFINED CHAR +0xF367 0xE25B #USER DEFINED CHAR +0xF368 0xE25C #USER DEFINED CHAR +0xF369 0xE25D #USER DEFINED CHAR +0xF36A 0xE25E #USER DEFINED CHAR +0xF36B 0xE25F #USER DEFINED CHAR +0xF36C 0xE260 #USER DEFINED CHAR +0xF36D 0xE261 #USER DEFINED CHAR +0xF36E 0xE262 #USER DEFINED CHAR +0xF36F 0xE263 #USER DEFINED CHAR +0xF370 0xE264 #USER DEFINED CHAR +0xF371 0xE265 #USER DEFINED CHAR +0xF372 0xE266 #USER DEFINED CHAR +0xF373 0xE267 #USER DEFINED CHAR +0xF374 0xE268 #USER DEFINED CHAR +0xF375 0xE269 #USER DEFINED CHAR +0xF376 0xE26A #USER DEFINED CHAR +0xF377 0xE26B #USER DEFINED CHAR +0xF378 0xE26C #USER DEFINED CHAR +0xF379 0xE26D #USER DEFINED CHAR +0xF37A 0xE26E #USER DEFINED CHAR +0xF37B 0xE26F #USER DEFINED CHAR +0xF37C 0xE270 #USER DEFINED CHAR +0xF37D 0xE271 #USER DEFINED CHAR +0xF37E 0xE272 #USER DEFINED CHAR +0xF380 0xE273 #USER DEFINED CHAR +0xF381 0xE274 #USER DEFINED CHAR +0xF382 0xE275 #USER DEFINED CHAR +0xF383 0xE276 #USER DEFINED CHAR +0xF384 0xE277 #USER DEFINED CHAR +0xF385 0xE278 #USER DEFINED CHAR +0xF386 0xE279 #USER DEFINED CHAR +0xF387 0xE27A #USER DEFINED CHAR +0xF388 0xE27B #USER DEFINED CHAR +0xF389 0xE27C #USER DEFINED CHAR +0xF38A 0xE27D #USER DEFINED CHAR +0xF38B 0xE27E #USER DEFINED CHAR +0xF38C 0xE27F #USER DEFINED CHAR +0xF38D 0xE280 #USER DEFINED CHAR +0xF38E 0xE281 #USER DEFINED CHAR +0xF38F 0xE282 #USER DEFINED CHAR +0xF390 0xE283 #USER DEFINED CHAR +0xF391 0xE284 #USER DEFINED CHAR +0xF392 0xE285 #USER DEFINED CHAR +0xF393 0xE286 #USER DEFINED CHAR +0xF394 0xE287 #USER DEFINED CHAR +0xF395 0xE288 #USER DEFINED CHAR +0xF396 0xE289 #USER DEFINED CHAR +0xF397 0xE28A #USER DEFINED CHAR +0xF398 0xE28B #USER DEFINED CHAR +0xF399 0xE28C #USER DEFINED CHAR +0xF39A 0xE28D #USER DEFINED CHAR +0xF39B 0xE28E #USER DEFINED CHAR +0xF39C 0xE28F #USER DEFINED CHAR +0xF39D 0xE290 #USER DEFINED CHAR +0xF39E 0xE291 #USER DEFINED CHAR +0xF39F 0xE292 #USER DEFINED CHAR +0xF3A0 0xE293 #USER DEFINED CHAR +0xF3A1 0xE294 #USER DEFINED CHAR +0xF3A2 0xE295 #USER DEFINED CHAR +0xF3A3 0xE296 #USER DEFINED CHAR +0xF3A4 0xE297 #USER DEFINED CHAR +0xF3A5 0xE298 #USER DEFINED CHAR +0xF3A6 0xE299 #USER DEFINED CHAR +0xF3A7 0xE29A #USER DEFINED CHAR +0xF3A8 0xE29B #USER DEFINED CHAR +0xF3A9 0xE29C #USER DEFINED CHAR +0xF3AA 0xE29D #USER DEFINED CHAR +0xF3AB 0xE29E #USER DEFINED CHAR +0xF3AC 0xE29F #USER DEFINED CHAR +0xF3AD 0xE2A0 #USER DEFINED CHAR +0xF3AE 0xE2A1 #USER DEFINED CHAR +0xF3AF 0xE2A2 #USER DEFINED CHAR +0xF3B0 0xE2A3 #USER DEFINED CHAR +0xF3B1 0xE2A4 #USER DEFINED CHAR +0xF3B2 0xE2A5 #USER DEFINED CHAR +0xF3B3 0xE2A6 #USER DEFINED CHAR +0xF3B4 0xE2A7 #USER DEFINED CHAR +0xF3B5 0xE2A8 #USER DEFINED CHAR +0xF3B6 0xE2A9 #USER DEFINED CHAR +0xF3B7 0xE2AA #USER DEFINED CHAR +0xF3B8 0xE2AB #USER DEFINED CHAR +0xF3B9 0xE2AC #USER DEFINED CHAR +0xF3BA 0xE2AD #USER DEFINED CHAR +0xF3BB 0xE2AE #USER DEFINED CHAR +0xF3BC 0xE2AF #USER DEFINED CHAR +0xF3BD 0xE2B0 #USER DEFINED CHAR +0xF3BE 0xE2B1 #USER DEFINED CHAR +0xF3BF 0xE2B2 #USER DEFINED CHAR +0xF3C0 0xE2B3 #USER DEFINED CHAR +0xF3C1 0xE2B4 #USER DEFINED CHAR +0xF3C2 0xE2B5 #USER DEFINED CHAR +0xF3C3 0xE2B6 #USER DEFINED CHAR +0xF3C4 0xE2B7 #USER DEFINED CHAR +0xF3C5 0xE2B8 #USER DEFINED CHAR +0xF3C6 0xE2B9 #USER DEFINED CHAR +0xF3C7 0xE2BA #USER DEFINED CHAR +0xF3C8 0xE2BB #USER DEFINED CHAR +0xF3C9 0xE2BC #USER DEFINED CHAR +0xF3CA 0xE2BD #USER DEFINED CHAR +0xF3CB 0xE2BE #USER DEFINED CHAR +0xF3CC 0xE2BF #USER DEFINED CHAR +0xF3CD 0xE2C0 #USER DEFINED CHAR +0xF3CE 0xE2C1 #USER DEFINED CHAR +0xF3CF 0xE2C2 #USER DEFINED CHAR +0xF3D0 0xE2C3 #USER DEFINED CHAR +0xF3D1 0xE2C4 #USER DEFINED CHAR +0xF3D2 0xE2C5 #USER DEFINED CHAR +0xF3D3 0xE2C6 #USER DEFINED CHAR +0xF3D4 0xE2C7 #USER DEFINED CHAR +0xF3D5 0xE2C8 #USER DEFINED CHAR +0xF3D6 0xE2C9 #USER DEFINED CHAR +0xF3D7 0xE2CA #USER DEFINED CHAR +0xF3D8 0xE2CB #USER DEFINED CHAR +0xF3D9 0xE2CC #USER DEFINED CHAR +0xF3DA 0xE2CD #USER DEFINED CHAR +0xF3DB 0xE2CE #USER DEFINED CHAR +0xF3DC 0xE2CF #USER DEFINED CHAR +0xF3DD 0xE2D0 #USER DEFINED CHAR +0xF3DE 0xE2D1 #USER DEFINED CHAR +0xF3DF 0xE2D2 #USER DEFINED CHAR +0xF3E0 0xE2D3 #USER DEFINED CHAR +0xF3E1 0xE2D4 #USER DEFINED CHAR +0xF3E2 0xE2D5 #USER DEFINED CHAR +0xF3E3 0xE2D6 #USER DEFINED CHAR +0xF3E4 0xE2D7 #USER DEFINED CHAR +0xF3E5 0xE2D8 #USER DEFINED CHAR +0xF3E6 0xE2D9 #USER DEFINED CHAR +0xF3E7 0xE2DA #USER DEFINED CHAR +0xF3E8 0xE2DB #USER DEFINED CHAR +0xF3E9 0xE2DC #USER DEFINED CHAR +0xF3EA 0xE2DD #USER DEFINED CHAR +0xF3EB 0xE2DE #USER DEFINED CHAR +0xF3EC 0xE2DF #USER DEFINED CHAR +0xF3ED 0xE2E0 #USER DEFINED CHAR +0xF3EE 0xE2E1 #USER DEFINED CHAR +0xF3EF 0xE2E2 #USER DEFINED CHAR +0xF3F0 0xE2E3 #USER DEFINED CHAR +0xF3F1 0xE2E4 #USER DEFINED CHAR +0xF3F2 0xE2E5 #USER DEFINED CHAR +0xF3F3 0xE2E6 #USER DEFINED CHAR +0xF3F4 0xE2E7 #USER DEFINED CHAR +0xF3F5 0xE2E8 #USER DEFINED CHAR +0xF3F6 0xE2E9 #USER DEFINED CHAR +0xF3F7 0xE2EA #USER DEFINED CHAR +0xF3F8 0xE2EB #USER DEFINED CHAR +0xF3F9 0xE2EC #USER DEFINED CHAR +0xF3FA 0xE2ED #USER DEFINED CHAR +0xF3FB 0xE2EE #USER DEFINED CHAR +0xF3FC 0xE2EF #USER DEFINED CHAR +0xF440 0xE2F0 #USER DEFINED CHAR +0xF441 0xE2F1 #USER DEFINED CHAR +0xF442 0xE2F2 #USER DEFINED CHAR +0xF443 0xE2F3 #USER DEFINED CHAR +0xF444 0xE2F4 #USER DEFINED CHAR +0xF445 0xE2F5 #USER DEFINED CHAR +0xF446 0xE2F6 #USER DEFINED CHAR +0xF447 0xE2F7 #USER DEFINED CHAR +0xF448 0xE2F8 #USER DEFINED CHAR +0xF449 0xE2F9 #USER DEFINED CHAR +0xF44A 0xE2FA #USER DEFINED CHAR +0xF44B 0xE2FB #USER DEFINED CHAR +0xF44C 0xE2FC #USER DEFINED CHAR +0xF44D 0xE2FD #USER DEFINED CHAR +0xF44E 0xE2FE #USER DEFINED CHAR +0xF44F 0xE2FF #USER DEFINED CHAR +0xF450 0xE300 #USER DEFINED CHAR +0xF451 0xE301 #USER DEFINED CHAR +0xF452 0xE302 #USER DEFINED CHAR +0xF453 0xE303 #USER DEFINED CHAR +0xF454 0xE304 #USER DEFINED CHAR +0xF455 0xE305 #USER DEFINED CHAR +0xF456 0xE306 #USER DEFINED CHAR +0xF457 0xE307 #USER DEFINED CHAR +0xF458 0xE308 #USER DEFINED CHAR +0xF459 0xE309 #USER DEFINED CHAR +0xF45A 0xE30A #USER DEFINED CHAR +0xF45B 0xE30B #USER DEFINED CHAR +0xF45C 0xE30C #USER DEFINED CHAR +0xF45D 0xE30D #USER DEFINED CHAR +0xF45E 0xE30E #USER DEFINED CHAR +0xF45F 0xE30F #USER DEFINED CHAR +0xF460 0xE310 #USER DEFINED CHAR +0xF461 0xE311 #USER DEFINED CHAR +0xF462 0xE312 #USER DEFINED CHAR +0xF463 0xE313 #USER DEFINED CHAR +0xF464 0xE314 #USER DEFINED CHAR +0xF465 0xE315 #USER DEFINED CHAR +0xF466 0xE316 #USER DEFINED CHAR +0xF467 0xE317 #USER DEFINED CHAR +0xF468 0xE318 #USER DEFINED CHAR +0xF469 0xE319 #USER DEFINED CHAR +0xF46A 0xE31A #USER DEFINED CHAR +0xF46B 0xE31B #USER DEFINED CHAR +0xF46C 0xE31C #USER DEFINED CHAR +0xF46D 0xE31D #USER DEFINED CHAR +0xF46E 0xE31E #USER DEFINED CHAR +0xF46F 0xE31F #USER DEFINED CHAR +0xF470 0xE320 #USER DEFINED CHAR +0xF471 0xE321 #USER DEFINED CHAR +0xF472 0xE322 #USER DEFINED CHAR +0xF473 0xE323 #USER DEFINED CHAR +0xF474 0xE324 #USER DEFINED CHAR +0xF475 0xE325 #USER DEFINED CHAR +0xF476 0xE326 #USER DEFINED CHAR +0xF477 0xE327 #USER DEFINED CHAR +0xF478 0xE328 #USER DEFINED CHAR +0xF479 0xE329 #USER DEFINED CHAR +0xF47A 0xE32A #USER DEFINED CHAR +0xF47B 0xE32B #USER DEFINED CHAR +0xF47C 0xE32C #USER DEFINED CHAR +0xF47D 0xE32D #USER DEFINED CHAR +0xF47E 0xE32E #USER DEFINED CHAR +0xF480 0xE32F #USER DEFINED CHAR +0xF481 0xE330 #USER DEFINED CHAR +0xF482 0xE331 #USER DEFINED CHAR +0xF483 0xE332 #USER DEFINED CHAR +0xF484 0xE333 #USER DEFINED CHAR +0xF485 0xE334 #USER DEFINED CHAR +0xF486 0xE335 #USER DEFINED CHAR +0xF487 0xE336 #USER DEFINED CHAR +0xF488 0xE337 #USER DEFINED CHAR +0xF489 0xE338 #USER DEFINED CHAR +0xF48A 0xE339 #USER DEFINED CHAR +0xF48B 0xE33A #USER DEFINED CHAR +0xF48C 0xE33B #USER DEFINED CHAR +0xF48D 0xE33C #USER DEFINED CHAR +0xF48E 0xE33D #USER DEFINED CHAR +0xF48F 0xE33E #USER DEFINED CHAR +0xF490 0xE33F #USER DEFINED CHAR +0xF491 0xE340 #USER DEFINED CHAR +0xF492 0xE341 #USER DEFINED CHAR +0xF493 0xE342 #USER DEFINED CHAR +0xF494 0xE343 #USER DEFINED CHAR +0xF495 0xE344 #USER DEFINED CHAR +0xF496 0xE345 #USER DEFINED CHAR +0xF497 0xE346 #USER DEFINED CHAR +0xF498 0xE347 #USER DEFINED CHAR +0xF499 0xE348 #USER DEFINED CHAR +0xF49A 0xE349 #USER DEFINED CHAR +0xF49B 0xE34A #USER DEFINED CHAR +0xF49C 0xE34B #USER DEFINED CHAR +0xF49D 0xE34C #USER DEFINED CHAR +0xF49E 0xE34D #USER DEFINED CHAR +0xF49F 0xE34E #USER DEFINED CHAR +0xF4A0 0xE34F #USER DEFINED CHAR +0xF4A1 0xE350 #USER DEFINED CHAR +0xF4A2 0xE351 #USER DEFINED CHAR +0xF4A3 0xE352 #USER DEFINED CHAR +0xF4A4 0xE353 #USER DEFINED CHAR +0xF4A5 0xE354 #USER DEFINED CHAR +0xF4A6 0xE355 #USER DEFINED CHAR +0xF4A7 0xE356 #USER DEFINED CHAR +0xF4A8 0xE357 #USER DEFINED CHAR +0xF4A9 0xE358 #USER DEFINED CHAR +0xF4AA 0xE359 #USER DEFINED CHAR +0xF4AB 0xE35A #USER DEFINED CHAR +0xF4AC 0xE35B #USER DEFINED CHAR +0xF4AD 0xE35C #USER DEFINED CHAR +0xF4AE 0xE35D #USER DEFINED CHAR +0xF4AF 0xE35E #USER DEFINED CHAR +0xF4B0 0xE35F #USER DEFINED CHAR +0xF4B1 0xE360 #USER DEFINED CHAR +0xF4B2 0xE361 #USER DEFINED CHAR +0xF4B3 0xE362 #USER DEFINED CHAR +0xF4B4 0xE363 #USER DEFINED CHAR +0xF4B5 0xE364 #USER DEFINED CHAR +0xF4B6 0xE365 #USER DEFINED CHAR +0xF4B7 0xE366 #USER DEFINED CHAR +0xF4B8 0xE367 #USER DEFINED CHAR +0xF4B9 0xE368 #USER DEFINED CHAR +0xF4BA 0xE369 #USER DEFINED CHAR +0xF4BB 0xE36A #USER DEFINED CHAR +0xF4BC 0xE36B #USER DEFINED CHAR +0xF4BD 0xE36C #USER DEFINED CHAR +0xF4BE 0xE36D #USER DEFINED CHAR +0xF4BF 0xE36E #USER DEFINED CHAR +0xF4C0 0xE36F #USER DEFINED CHAR +0xF4C1 0xE370 #USER DEFINED CHAR +0xF4C2 0xE371 #USER DEFINED CHAR +0xF4C3 0xE372 #USER DEFINED CHAR +0xF4C4 0xE373 #USER DEFINED CHAR +0xF4C5 0xE374 #USER DEFINED CHAR +0xF4C6 0xE375 #USER DEFINED CHAR +0xF4C7 0xE376 #USER DEFINED CHAR +0xF4C8 0xE377 #USER DEFINED CHAR +0xF4C9 0xE378 #USER DEFINED CHAR +0xF4CA 0xE379 #USER DEFINED CHAR +0xF4CB 0xE37A #USER DEFINED CHAR +0xF4CC 0xE37B #USER DEFINED CHAR +0xF4CD 0xE37C #USER DEFINED CHAR +0xF4CE 0xE37D #USER DEFINED CHAR +0xF4CF 0xE37E #USER DEFINED CHAR +0xF4D0 0xE37F #USER DEFINED CHAR +0xF4D1 0xE380 #USER DEFINED CHAR +0xF4D2 0xE381 #USER DEFINED CHAR +0xF4D3 0xE382 #USER DEFINED CHAR +0xF4D4 0xE383 #USER DEFINED CHAR +0xF4D5 0xE384 #USER DEFINED CHAR +0xF4D6 0xE385 #USER DEFINED CHAR +0xF4D7 0xE386 #USER DEFINED CHAR +0xF4D8 0xE387 #USER DEFINED CHAR +0xF4D9 0xE388 #USER DEFINED CHAR +0xF4DA 0xE389 #USER DEFINED CHAR +0xF4DB 0xE38A #USER DEFINED CHAR +0xF4DC 0xE38B #USER DEFINED CHAR +0xF4DD 0xE38C #USER DEFINED CHAR +0xF4DE 0xE38D #USER DEFINED CHAR +0xF4DF 0xE38E #USER DEFINED CHAR +0xF4E0 0xE38F #USER DEFINED CHAR +0xF4E1 0xE390 #USER DEFINED CHAR +0xF4E2 0xE391 #USER DEFINED CHAR +0xF4E3 0xE392 #USER DEFINED CHAR +0xF4E4 0xE393 #USER DEFINED CHAR +0xF4E5 0xE394 #USER DEFINED CHAR +0xF4E6 0xE395 #USER DEFINED CHAR +0xF4E7 0xE396 #USER DEFINED CHAR +0xF4E8 0xE397 #USER DEFINED CHAR +0xF4E9 0xE398 #USER DEFINED CHAR +0xF4EA 0xE399 #USER DEFINED CHAR +0xF4EB 0xE39A #USER DEFINED CHAR +0xF4EC 0xE39B #USER DEFINED CHAR +0xF4ED 0xE39C #USER DEFINED CHAR +0xF4EE 0xE39D #USER DEFINED CHAR +0xF4EF 0xE39E #USER DEFINED CHAR +0xF4F0 0xE39F #USER DEFINED CHAR +0xF4F1 0xE3A0 #USER DEFINED CHAR +0xF4F2 0xE3A1 #USER DEFINED CHAR +0xF4F3 0xE3A2 #USER DEFINED CHAR +0xF4F4 0xE3A3 #USER DEFINED CHAR +0xF4F5 0xE3A4 #USER DEFINED CHAR +0xF4F6 0xE3A5 #USER DEFINED CHAR +0xF4F7 0xE3A6 #USER DEFINED CHAR +0xF4F8 0xE3A7 #USER DEFINED CHAR +0xF4F9 0xE3A8 #USER DEFINED CHAR +0xF4FA 0xE3A9 #USER DEFINED CHAR +0xF4FB 0xE3AA #USER DEFINED CHAR +0xF4FC 0xE3AB #USER DEFINED CHAR +0xF540 0xE3AC #USER DEFINED CHAR +0xF541 0xE3AD #USER DEFINED CHAR +0xF542 0xE3AE #USER DEFINED CHAR +0xF543 0xE3AF #USER DEFINED CHAR +0xF544 0xE3B0 #USER DEFINED CHAR +0xF545 0xE3B1 #USER DEFINED CHAR +0xF546 0xE3B2 #USER DEFINED CHAR +0xF547 0xE3B3 #USER DEFINED CHAR +0xF548 0xE3B4 #USER DEFINED CHAR +0xF549 0xE3B5 #USER DEFINED CHAR +0xF54A 0xE3B6 #USER DEFINED CHAR +0xF54B 0xE3B7 #USER DEFINED CHAR +0xF54C 0xE3B8 #USER DEFINED CHAR +0xF54D 0xE3B9 #USER DEFINED CHAR +0xF54E 0xE3BA #USER DEFINED CHAR +0xF54F 0xE3BB #USER DEFINED CHAR +0xF550 0xE3BC #USER DEFINED CHAR +0xF551 0xE3BD #USER DEFINED CHAR +0xF552 0xE3BE #USER DEFINED CHAR +0xF553 0xE3BF #USER DEFINED CHAR +0xF554 0xE3C0 #USER DEFINED CHAR +0xF555 0xE3C1 #USER DEFINED CHAR +0xF556 0xE3C2 #USER DEFINED CHAR +0xF557 0xE3C3 #USER DEFINED CHAR +0xF558 0xE3C4 #USER DEFINED CHAR +0xF559 0xE3C5 #USER DEFINED CHAR +0xF55A 0xE3C6 #USER DEFINED CHAR +0xF55B 0xE3C7 #USER DEFINED CHAR +0xF55C 0xE3C8 #USER DEFINED CHAR +0xF55D 0xE3C9 #USER DEFINED CHAR +0xF55E 0xE3CA #USER DEFINED CHAR +0xF55F 0xE3CB #USER DEFINED CHAR +0xF560 0xE3CC #USER DEFINED CHAR +0xF561 0xE3CD #USER DEFINED CHAR +0xF562 0xE3CE #USER DEFINED CHAR +0xF563 0xE3CF #USER DEFINED CHAR +0xF564 0xE3D0 #USER DEFINED CHAR +0xF565 0xE3D1 #USER DEFINED CHAR +0xF566 0xE3D2 #USER DEFINED CHAR +0xF567 0xE3D3 #USER DEFINED CHAR +0xF568 0xE3D4 #USER DEFINED CHAR +0xF569 0xE3D5 #USER DEFINED CHAR +0xF56A 0xE3D6 #USER DEFINED CHAR +0xF56B 0xE3D7 #USER DEFINED CHAR +0xF56C 0xE3D8 #USER DEFINED CHAR +0xF56D 0xE3D9 #USER DEFINED CHAR +0xF56E 0xE3DA #USER DEFINED CHAR +0xF56F 0xE3DB #USER DEFINED CHAR +0xF570 0xE3DC #USER DEFINED CHAR +0xF571 0xE3DD #USER DEFINED CHAR +0xF572 0xE3DE #USER DEFINED CHAR +0xF573 0xE3DF #USER DEFINED CHAR +0xF574 0xE3E0 #USER DEFINED CHAR +0xF575 0xE3E1 #USER DEFINED CHAR +0xF576 0xE3E2 #USER DEFINED CHAR +0xF577 0xE3E3 #USER DEFINED CHAR +0xF578 0xE3E4 #USER DEFINED CHAR +0xF579 0xE3E5 #USER DEFINED CHAR +0xF57A 0xE3E6 #USER DEFINED CHAR +0xF57B 0xE3E7 #USER DEFINED CHAR +0xF57C 0xE3E8 #USER DEFINED CHAR +0xF57D 0xE3E9 #USER DEFINED CHAR +0xF57E 0xE3EA #USER DEFINED CHAR +0xF580 0xE3EB #USER DEFINED CHAR +0xF581 0xE3EC #USER DEFINED CHAR +0xF582 0xE3ED #USER DEFINED CHAR +0xF583 0xE3EE #USER DEFINED CHAR +0xF584 0xE3EF #USER DEFINED CHAR +0xF585 0xE3F0 #USER DEFINED CHAR +0xF586 0xE3F1 #USER DEFINED CHAR +0xF587 0xE3F2 #USER DEFINED CHAR +0xF588 0xE3F3 #USER DEFINED CHAR +0xF589 0xE3F4 #USER DEFINED CHAR +0xF58A 0xE3F5 #USER DEFINED CHAR +0xF58B 0xE3F6 #USER DEFINED CHAR +0xF58C 0xE3F7 #USER DEFINED CHAR +0xF58D 0xE3F8 #USER DEFINED CHAR +0xF58E 0xE3F9 #USER DEFINED CHAR +0xF58F 0xE3FA #USER DEFINED CHAR +0xF590 0xE3FB #USER DEFINED CHAR +0xF591 0xE3FC #USER DEFINED CHAR +0xF592 0xE3FD #USER DEFINED CHAR +0xF593 0xE3FE #USER DEFINED CHAR +0xF594 0xE3FF #USER DEFINED CHAR +0xF595 0xE400 #USER DEFINED CHAR +0xF596 0xE401 #USER DEFINED CHAR +0xF597 0xE402 #USER DEFINED CHAR +0xF598 0xE403 #USER DEFINED CHAR +0xF599 0xE404 #USER DEFINED CHAR +0xF59A 0xE405 #USER DEFINED CHAR +0xF59B 0xE406 #USER DEFINED CHAR +0xF59C 0xE407 #USER DEFINED CHAR +0xF59D 0xE408 #USER DEFINED CHAR +0xF59E 0xE409 #USER DEFINED CHAR +0xF59F 0xE40A #USER DEFINED CHAR +0xF5A0 0xE40B #USER DEFINED CHAR +0xF5A1 0xE40C #USER DEFINED CHAR +0xF5A2 0xE40D #USER DEFINED CHAR +0xF5A3 0xE40E #USER DEFINED CHAR +0xF5A4 0xE40F #USER DEFINED CHAR +0xF5A5 0xE410 #USER DEFINED CHAR +0xF5A6 0xE411 #USER DEFINED CHAR +0xF5A7 0xE412 #USER DEFINED CHAR +0xF5A8 0xE413 #USER DEFINED CHAR +0xF5A9 0xE414 #USER DEFINED CHAR +0xF5AA 0xE415 #USER DEFINED CHAR +0xF5AB 0xE416 #USER DEFINED CHAR +0xF5AC 0xE417 #USER DEFINED CHAR +0xF5AD 0xE418 #USER DEFINED CHAR +0xF5AE 0xE419 #USER DEFINED CHAR +0xF5AF 0xE41A #USER DEFINED CHAR +0xF5B0 0xE41B #USER DEFINED CHAR +0xF5B1 0xE41C #USER DEFINED CHAR +0xF5B2 0xE41D #USER DEFINED CHAR +0xF5B3 0xE41E #USER DEFINED CHAR +0xF5B4 0xE41F #USER DEFINED CHAR +0xF5B5 0xE420 #USER DEFINED CHAR +0xF5B6 0xE421 #USER DEFINED CHAR +0xF5B7 0xE422 #USER DEFINED CHAR +0xF5B8 0xE423 #USER DEFINED CHAR +0xF5B9 0xE424 #USER DEFINED CHAR +0xF5BA 0xE425 #USER DEFINED CHAR +0xF5BB 0xE426 #USER DEFINED CHAR +0xF5BC 0xE427 #USER DEFINED CHAR +0xF5BD 0xE428 #USER DEFINED CHAR +0xF5BE 0xE429 #USER DEFINED CHAR +0xF5BF 0xE42A #USER DEFINED CHAR +0xF5C0 0xE42B #USER DEFINED CHAR +0xF5C1 0xE42C #USER DEFINED CHAR +0xF5C2 0xE42D #USER DEFINED CHAR +0xF5C3 0xE42E #USER DEFINED CHAR +0xF5C4 0xE42F #USER DEFINED CHAR +0xF5C5 0xE430 #USER DEFINED CHAR +0xF5C6 0xE431 #USER DEFINED CHAR +0xF5C7 0xE432 #USER DEFINED CHAR +0xF5C8 0xE433 #USER DEFINED CHAR +0xF5C9 0xE434 #USER DEFINED CHAR +0xF5CA 0xE435 #USER DEFINED CHAR +0xF5CB 0xE436 #USER DEFINED CHAR +0xF5CC 0xE437 #USER DEFINED CHAR +0xF5CD 0xE438 #USER DEFINED CHAR +0xF5CE 0xE439 #USER DEFINED CHAR +0xF5CF 0xE43A #USER DEFINED CHAR +0xF5D0 0xE43B #USER DEFINED CHAR +0xF5D1 0xE43C #USER DEFINED CHAR +0xF5D2 0xE43D #USER DEFINED CHAR +0xF5D3 0xE43E #USER DEFINED CHAR +0xF5D4 0xE43F #USER DEFINED CHAR +0xF5D5 0xE440 #USER DEFINED CHAR +0xF5D6 0xE441 #USER DEFINED CHAR +0xF5D7 0xE442 #USER DEFINED CHAR +0xF5D8 0xE443 #USER DEFINED CHAR +0xF5D9 0xE444 #USER DEFINED CHAR +0xF5DA 0xE445 #USER DEFINED CHAR +0xF5DB 0xE446 #USER DEFINED CHAR +0xF5DC 0xE447 #USER DEFINED CHAR +0xF5DD 0xE448 #USER DEFINED CHAR +0xF5DE 0xE449 #USER DEFINED CHAR +0xF5DF 0xE44A #USER DEFINED CHAR +0xF5E0 0xE44B #USER DEFINED CHAR +0xF5E1 0xE44C #USER DEFINED CHAR +0xF5E2 0xE44D #USER DEFINED CHAR +0xF5E3 0xE44E #USER DEFINED CHAR +0xF5E4 0xE44F #USER DEFINED CHAR +0xF5E5 0xE450 #USER DEFINED CHAR +0xF5E6 0xE451 #USER DEFINED CHAR +0xF5E7 0xE452 #USER DEFINED CHAR +0xF5E8 0xE453 #USER DEFINED CHAR +0xF5E9 0xE454 #USER DEFINED CHAR +0xF5EA 0xE455 #USER DEFINED CHAR +0xF5EB 0xE456 #USER DEFINED CHAR +0xF5EC 0xE457 #USER DEFINED CHAR +0xF5ED 0xE458 #USER DEFINED CHAR +0xF5EE 0xE459 #USER DEFINED CHAR +0xF5EF 0xE45A #USER DEFINED CHAR +0xF5F0 0xE45B #USER DEFINED CHAR +0xF5F1 0xE45C #USER DEFINED CHAR +0xF5F2 0xE45D #USER DEFINED CHAR +0xF5F3 0xE45E #USER DEFINED CHAR +0xF5F4 0xE45F #USER DEFINED CHAR +0xF5F5 0xE460 #USER DEFINED CHAR +0xF5F6 0xE461 #USER DEFINED CHAR +0xF5F7 0xE462 #USER DEFINED CHAR +0xF5F8 0xE463 #USER DEFINED CHAR +0xF5F9 0xE464 #USER DEFINED CHAR +0xF5FA 0xE465 #USER DEFINED CHAR +0xF5FB 0xE466 #USER DEFINED CHAR +0xF5FC 0xE467 #USER DEFINED CHAR +0xF640 0xE468 #USER DEFINED CHAR +0xF641 0xE469 #USER DEFINED CHAR +0xF642 0xE46A #USER DEFINED CHAR +0xF643 0xE46B #USER DEFINED CHAR +0xF644 0xE46C #USER DEFINED CHAR +0xF645 0xE46D #USER DEFINED CHAR +0xF646 0xE46E #USER DEFINED CHAR +0xF647 0xE46F #USER DEFINED CHAR +0xF648 0xE470 #USER DEFINED CHAR +0xF649 0xE471 #USER DEFINED CHAR +0xF64A 0xE472 #USER DEFINED CHAR +0xF64B 0xE473 #USER DEFINED CHAR +0xF64C 0xE474 #USER DEFINED CHAR +0xF64D 0xE475 #USER DEFINED CHAR +0xF64E 0xE476 #USER DEFINED CHAR +0xF64F 0xE477 #USER DEFINED CHAR +0xF650 0xE478 #USER DEFINED CHAR +0xF651 0xE479 #USER DEFINED CHAR +0xF652 0xE47A #USER DEFINED CHAR +0xF653 0xE47B #USER DEFINED CHAR +0xF654 0xE47C #USER DEFINED CHAR +0xF655 0xE47D #USER DEFINED CHAR +0xF656 0xE47E #USER DEFINED CHAR +0xF657 0xE47F #USER DEFINED CHAR +0xF658 0xE480 #USER DEFINED CHAR +0xF659 0xE481 #USER DEFINED CHAR +0xF65A 0xE482 #USER DEFINED CHAR +0xF65B 0xE483 #USER DEFINED CHAR +0xF65C 0xE484 #USER DEFINED CHAR +0xF65D 0xE485 #USER DEFINED CHAR +0xF65E 0xE486 #USER DEFINED CHAR +0xF65F 0xE487 #USER DEFINED CHAR +0xF660 0xE488 #USER DEFINED CHAR +0xF661 0xE489 #USER DEFINED CHAR +0xF662 0xE48A #USER DEFINED CHAR +0xF663 0xE48B #USER DEFINED CHAR +0xF664 0xE48C #USER DEFINED CHAR +0xF665 0xE48D #USER DEFINED CHAR +0xF666 0xE48E #USER DEFINED CHAR +0xF667 0xE48F #USER DEFINED CHAR +0xF668 0xE490 #USER DEFINED CHAR +0xF669 0xE491 #USER DEFINED CHAR +0xF66A 0xE492 #USER DEFINED CHAR +0xF66B 0xE493 #USER DEFINED CHAR +0xF66C 0xE494 #USER DEFINED CHAR +0xF66D 0xE495 #USER DEFINED CHAR +0xF66E 0xE496 #USER DEFINED CHAR +0xF66F 0xE497 #USER DEFINED CHAR +0xF670 0xE498 #USER DEFINED CHAR +0xF671 0xE499 #USER DEFINED CHAR +0xF672 0xE49A #USER DEFINED CHAR +0xF673 0xE49B #USER DEFINED CHAR +0xF674 0xE49C #USER DEFINED CHAR +0xF675 0xE49D #USER DEFINED CHAR +0xF676 0xE49E #USER DEFINED CHAR +0xF677 0xE49F #USER DEFINED CHAR +0xF678 0xE4A0 #USER DEFINED CHAR +0xF679 0xE4A1 #USER DEFINED CHAR +0xF67A 0xE4A2 #USER DEFINED CHAR +0xF67B 0xE4A3 #USER DEFINED CHAR +0xF67C 0xE4A4 #USER DEFINED CHAR +0xF67D 0xE4A5 #USER DEFINED CHAR +0xF67E 0xE4A6 #USER DEFINED CHAR +0xF680 0xE4A7 #USER DEFINED CHAR +0xF681 0xE4A8 #USER DEFINED CHAR +0xF682 0xE4A9 #USER DEFINED CHAR +0xF683 0xE4AA #USER DEFINED CHAR +0xF684 0xE4AB #USER DEFINED CHAR +0xF685 0xE4AC #USER DEFINED CHAR +0xF686 0xE4AD #USER DEFINED CHAR +0xF687 0xE4AE #USER DEFINED CHAR +0xF688 0xE4AF #USER DEFINED CHAR +0xF689 0xE4B0 #USER DEFINED CHAR +0xF68A 0xE4B1 #USER DEFINED CHAR +0xF68B 0xE4B2 #USER DEFINED CHAR +0xF68C 0xE4B3 #USER DEFINED CHAR +0xF68D 0xE4B4 #USER DEFINED CHAR +0xF68E 0xE4B5 #USER DEFINED CHAR +0xF68F 0xE4B6 #USER DEFINED CHAR +0xF690 0xE4B7 #USER DEFINED CHAR +0xF691 0xE4B8 #USER DEFINED CHAR +0xF692 0xE4B9 #USER DEFINED CHAR +0xF693 0xE4BA #USER DEFINED CHAR +0xF694 0xE4BB #USER DEFINED CHAR +0xF695 0xE4BC #USER DEFINED CHAR +0xF696 0xE4BD #USER DEFINED CHAR +0xF697 0xE4BE #USER DEFINED CHAR +0xF698 0xE4BF #USER DEFINED CHAR +0xF699 0xE4C0 #USER DEFINED CHAR +0xF69A 0xE4C1 #USER DEFINED CHAR +0xF69B 0xE4C2 #USER DEFINED CHAR +0xF69C 0xE4C3 #USER DEFINED CHAR +0xF69D 0xE4C4 #USER DEFINED CHAR +0xF69E 0xE4C5 #USER DEFINED CHAR +0xF69F 0xE4C6 #USER DEFINED CHAR +0xF6A0 0xE4C7 #USER DEFINED CHAR +0xF6A1 0xE4C8 #USER DEFINED CHAR +0xF6A2 0xE4C9 #USER DEFINED CHAR +0xF6A3 0xE4CA #USER DEFINED CHAR +0xF6A4 0xE4CB #USER DEFINED CHAR +0xF6A5 0xE4CC #USER DEFINED CHAR +0xF6A6 0xE4CD #USER DEFINED CHAR +0xF6A7 0xE4CE #USER DEFINED CHAR +0xF6A8 0xE4CF #USER DEFINED CHAR +0xF6A9 0xE4D0 #USER DEFINED CHAR +0xF6AA 0xE4D1 #USER DEFINED CHAR +0xF6AB 0xE4D2 #USER DEFINED CHAR +0xF6AC 0xE4D3 #USER DEFINED CHAR +0xF6AD 0xE4D4 #USER DEFINED CHAR +0xF6AE 0xE4D5 #USER DEFINED CHAR +0xF6AF 0xE4D6 #USER DEFINED CHAR +0xF6B0 0xE4D7 #USER DEFINED CHAR +0xF6B1 0xE4D8 #USER DEFINED CHAR +0xF6B2 0xE4D9 #USER DEFINED CHAR +0xF6B3 0xE4DA #USER DEFINED CHAR +0xF6B4 0xE4DB #USER DEFINED CHAR +0xF6B5 0xE4DC #USER DEFINED CHAR +0xF6B6 0xE4DD #USER DEFINED CHAR +0xF6B7 0xE4DE #USER DEFINED CHAR +0xF6B8 0xE4DF #USER DEFINED CHAR +0xF6B9 0xE4E0 #USER DEFINED CHAR +0xF6BA 0xE4E1 #USER DEFINED CHAR +0xF6BB 0xE4E2 #USER DEFINED CHAR +0xF6BC 0xE4E3 #USER DEFINED CHAR +0xF6BD 0xE4E4 #USER DEFINED CHAR +0xF6BE 0xE4E5 #USER DEFINED CHAR +0xF6BF 0xE4E6 #USER DEFINED CHAR +0xF6C0 0xE4E7 #USER DEFINED CHAR +0xF6C1 0xE4E8 #USER DEFINED CHAR +0xF6C2 0xE4E9 #USER DEFINED CHAR +0xF6C3 0xE4EA #USER DEFINED CHAR +0xF6C4 0xE4EB #USER DEFINED CHAR +0xF6C5 0xE4EC #USER DEFINED CHAR +0xF6C6 0xE4ED #USER DEFINED CHAR +0xF6C7 0xE4EE #USER DEFINED CHAR +0xF6C8 0xE4EF #USER DEFINED CHAR +0xF6C9 0xE4F0 #USER DEFINED CHAR +0xF6CA 0xE4F1 #USER DEFINED CHAR +0xF6CB 0xE4F2 #USER DEFINED CHAR +0xF6CC 0xE4F3 #USER DEFINED CHAR +0xF6CD 0xE4F4 #USER DEFINED CHAR +0xF6CE 0xE4F5 #USER DEFINED CHAR +0xF6CF 0xE4F6 #USER DEFINED CHAR +0xF6D0 0xE4F7 #USER DEFINED CHAR +0xF6D1 0xE4F8 #USER DEFINED CHAR +0xF6D2 0xE4F9 #USER DEFINED CHAR +0xF6D3 0xE4FA #USER DEFINED CHAR +0xF6D4 0xE4FB #USER DEFINED CHAR +0xF6D5 0xE4FC #USER DEFINED CHAR +0xF6D6 0xE4FD #USER DEFINED CHAR +0xF6D7 0xE4FE #USER DEFINED CHAR +0xF6D8 0xE4FF #USER DEFINED CHAR +0xF6D9 0xE500 #USER DEFINED CHAR +0xF6DA 0xE501 #USER DEFINED CHAR +0xF6DB 0xE502 #USER DEFINED CHAR +0xF6DC 0xE503 #USER DEFINED CHAR +0xF6DD 0xE504 #USER DEFINED CHAR +0xF6DE 0xE505 #USER DEFINED CHAR +0xF6DF 0xE506 #USER DEFINED CHAR +0xF6E0 0xE507 #USER DEFINED CHAR +0xF6E1 0xE508 #USER DEFINED CHAR +0xF6E2 0xE509 #USER DEFINED CHAR +0xF6E3 0xE50A #USER DEFINED CHAR +0xF6E4 0xE50B #USER DEFINED CHAR +0xF6E5 0xE50C #USER DEFINED CHAR +0xF6E6 0xE50D #USER DEFINED CHAR +0xF6E7 0xE50E #USER DEFINED CHAR +0xF6E8 0xE50F #USER DEFINED CHAR +0xF6E9 0xE510 #USER DEFINED CHAR +0xF6EA 0xE511 #USER DEFINED CHAR +0xF6EB 0xE512 #USER DEFINED CHAR +0xF6EC 0xE513 #USER DEFINED CHAR +0xF6ED 0xE514 #USER DEFINED CHAR +0xF6EE 0xE515 #USER DEFINED CHAR +0xF6EF 0xE516 #USER DEFINED CHAR +0xF6F0 0xE517 #USER DEFINED CHAR +0xF6F1 0xE518 #USER DEFINED CHAR +0xF6F2 0xE519 #USER DEFINED CHAR +0xF6F3 0xE51A #USER DEFINED CHAR +0xF6F4 0xE51B #USER DEFINED CHAR +0xF6F5 0xE51C #USER DEFINED CHAR +0xF6F6 0xE51D #USER DEFINED CHAR +0xF6F7 0xE51E #USER DEFINED CHAR +0xF6F8 0xE51F #USER DEFINED CHAR +0xF6F9 0xE520 #USER DEFINED CHAR +0xF6FA 0xE521 #USER DEFINED CHAR +0xF6FB 0xE522 #USER DEFINED CHAR +0xF6FC 0xE523 #USER DEFINED CHAR +0xF740 0xE524 #USER DEFINED CHAR +0xF741 0xE525 #USER DEFINED CHAR +0xF742 0xE526 #USER DEFINED CHAR +0xF743 0xE527 #USER DEFINED CHAR +0xF744 0xE528 #USER DEFINED CHAR +0xF745 0xE529 #USER DEFINED CHAR +0xF746 0xE52A #USER DEFINED CHAR +0xF747 0xE52B #USER DEFINED CHAR +0xF748 0xE52C #USER DEFINED CHAR +0xF749 0xE52D #USER DEFINED CHAR +0xF74A 0xE52E #USER DEFINED CHAR +0xF74B 0xE52F #USER DEFINED CHAR +0xF74C 0xE530 #USER DEFINED CHAR +0xF74D 0xE531 #USER DEFINED CHAR +0xF74E 0xE532 #USER DEFINED CHAR +0xF74F 0xE533 #USER DEFINED CHAR +0xF750 0xE534 #USER DEFINED CHAR +0xF751 0xE535 #USER DEFINED CHAR +0xF752 0xE536 #USER DEFINED CHAR +0xF753 0xE537 #USER DEFINED CHAR +0xF754 0xE538 #USER DEFINED CHAR +0xF755 0xE539 #USER DEFINED CHAR +0xF756 0xE53A #USER DEFINED CHAR +0xF757 0xE53B #USER DEFINED CHAR +0xF758 0xE53C #USER DEFINED CHAR +0xF759 0xE53D #USER DEFINED CHAR +0xF75A 0xE53E #USER DEFINED CHAR +0xF75B 0xE53F #USER DEFINED CHAR +0xF75C 0xE540 #USER DEFINED CHAR +0xF75D 0xE541 #USER DEFINED CHAR +0xF75E 0xE542 #USER DEFINED CHAR +0xF75F 0xE543 #USER DEFINED CHAR +0xF760 0xE544 #USER DEFINED CHAR +0xF761 0xE545 #USER DEFINED CHAR +0xF762 0xE546 #USER DEFINED CHAR +0xF763 0xE547 #USER DEFINED CHAR +0xF764 0xE548 #USER DEFINED CHAR +0xF765 0xE549 #USER DEFINED CHAR +0xF766 0xE54A #USER DEFINED CHAR +0xF767 0xE54B #USER DEFINED CHAR +0xF768 0xE54C #USER DEFINED CHAR +0xF769 0xE54D #USER DEFINED CHAR +0xF76A 0xE54E #USER DEFINED CHAR +0xF76B 0xE54F #USER DEFINED CHAR +0xF76C 0xE550 #USER DEFINED CHAR +0xF76D 0xE551 #USER DEFINED CHAR +0xF76E 0xE552 #USER DEFINED CHAR +0xF76F 0xE553 #USER DEFINED CHAR +0xF770 0xE554 #USER DEFINED CHAR +0xF771 0xE555 #USER DEFINED CHAR +0xF772 0xE556 #USER DEFINED CHAR +0xF773 0xE557 #USER DEFINED CHAR +0xF774 0xE558 #USER DEFINED CHAR +0xF775 0xE559 #USER DEFINED CHAR +0xF776 0xE55A #USER DEFINED CHAR +0xF777 0xE55B #USER DEFINED CHAR +0xF778 0xE55C #USER DEFINED CHAR +0xF779 0xE55D #USER DEFINED CHAR +0xF77A 0xE55E #USER DEFINED CHAR +0xF77B 0xE55F #USER DEFINED CHAR +0xF77C 0xE560 #USER DEFINED CHAR +0xF77D 0xE561 #USER DEFINED CHAR +0xF77E 0xE562 #USER DEFINED CHAR +0xF780 0xE563 #USER DEFINED CHAR +0xF781 0xE564 #USER DEFINED CHAR +0xF782 0xE565 #USER DEFINED CHAR +0xF783 0xE566 #USER DEFINED CHAR +0xF784 0xE567 #USER DEFINED CHAR +0xF785 0xE568 #USER DEFINED CHAR +0xF786 0xE569 #USER DEFINED CHAR +0xF787 0xE56A #USER DEFINED CHAR +0xF788 0xE56B #USER DEFINED CHAR +0xF789 0xE56C #USER DEFINED CHAR +0xF78A 0xE56D #USER DEFINED CHAR +0xF78B 0xE56E #USER DEFINED CHAR +0xF78C 0xE56F #USER DEFINED CHAR +0xF78D 0xE570 #USER DEFINED CHAR +0xF78E 0xE571 #USER DEFINED CHAR +0xF78F 0xE572 #USER DEFINED CHAR +0xF790 0xE573 #USER DEFINED CHAR +0xF791 0xE574 #USER DEFINED CHAR +0xF792 0xE575 #USER DEFINED CHAR +0xF793 0xE576 #USER DEFINED CHAR +0xF794 0xE577 #USER DEFINED CHAR +0xF795 0xE578 #USER DEFINED CHAR +0xF796 0xE579 #USER DEFINED CHAR +0xF797 0xE57A #USER DEFINED CHAR +0xF798 0xE57B #USER DEFINED CHAR +0xF799 0xE57C #USER DEFINED CHAR +0xF79A 0xE57D #USER DEFINED CHAR +0xF79B 0xE57E #USER DEFINED CHAR +0xF79C 0xE57F #USER DEFINED CHAR +0xF79D 0xE580 #USER DEFINED CHAR +0xF79E 0xE581 #USER DEFINED CHAR +0xF79F 0xE582 #USER DEFINED CHAR +0xF7A0 0xE583 #USER DEFINED CHAR +0xF7A1 0xE584 #USER DEFINED CHAR +0xF7A2 0xE585 #USER DEFINED CHAR +0xF7A3 0xE586 #USER DEFINED CHAR +0xF7A4 0xE587 #USER DEFINED CHAR +0xF7A5 0xE588 #USER DEFINED CHAR +0xF7A6 0xE589 #USER DEFINED CHAR +0xF7A7 0xE58A #USER DEFINED CHAR +0xF7A8 0xE58B #USER DEFINED CHAR +0xF7A9 0xE58C #USER DEFINED CHAR +0xF7AA 0xE58D #USER DEFINED CHAR +0xF7AB 0xE58E #USER DEFINED CHAR +0xF7AC 0xE58F #USER DEFINED CHAR +0xF7AD 0xE590 #USER DEFINED CHAR +0xF7AE 0xE591 #USER DEFINED CHAR +0xF7AF 0xE592 #USER DEFINED CHAR +0xF7B0 0xE593 #USER DEFINED CHAR +0xF7B1 0xE594 #USER DEFINED CHAR +0xF7B2 0xE595 #USER DEFINED CHAR +0xF7B3 0xE596 #USER DEFINED CHAR +0xF7B4 0xE597 #USER DEFINED CHAR +0xF7B5 0xE598 #USER DEFINED CHAR +0xF7B6 0xE599 #USER DEFINED CHAR +0xF7B7 0xE59A #USER DEFINED CHAR +0xF7B8 0xE59B #USER DEFINED CHAR +0xF7B9 0xE59C #USER DEFINED CHAR +0xF7BA 0xE59D #USER DEFINED CHAR +0xF7BB 0xE59E #USER DEFINED CHAR +0xF7BC 0xE59F #USER DEFINED CHAR +0xF7BD 0xE5A0 #USER DEFINED CHAR +0xF7BE 0xE5A1 #USER DEFINED CHAR +0xF7BF 0xE5A2 #USER DEFINED CHAR +0xF7C0 0xE5A3 #USER DEFINED CHAR +0xF7C1 0xE5A4 #USER DEFINED CHAR +0xF7C2 0xE5A5 #USER DEFINED CHAR +0xF7C3 0xE5A6 #USER DEFINED CHAR +0xF7C4 0xE5A7 #USER DEFINED CHAR +0xF7C5 0xE5A8 #USER DEFINED CHAR +0xF7C6 0xE5A9 #USER DEFINED CHAR +0xF7C7 0xE5AA #USER DEFINED CHAR +0xF7C8 0xE5AB #USER DEFINED CHAR +0xF7C9 0xE5AC #USER DEFINED CHAR +0xF7CA 0xE5AD #USER DEFINED CHAR +0xF7CB 0xE5AE #USER DEFINED CHAR +0xF7CC 0xE5AF #USER DEFINED CHAR +0xF7CD 0xE5B0 #USER DEFINED CHAR +0xF7CE 0xE5B1 #USER DEFINED CHAR +0xF7CF 0xE5B2 #USER DEFINED CHAR +0xF7D0 0xE5B3 #USER DEFINED CHAR +0xF7D1 0xE5B4 #USER DEFINED CHAR +0xF7D2 0xE5B5 #USER DEFINED CHAR +0xF7D3 0xE5B6 #USER DEFINED CHAR +0xF7D4 0xE5B7 #USER DEFINED CHAR +0xF7D5 0xE5B8 #USER DEFINED CHAR +0xF7D6 0xE5B9 #USER DEFINED CHAR +0xF7D7 0xE5BA #USER DEFINED CHAR +0xF7D8 0xE5BB #USER DEFINED CHAR +0xF7D9 0xE5BC #USER DEFINED CHAR +0xF7DA 0xE5BD #USER DEFINED CHAR +0xF7DB 0xE5BE #USER DEFINED CHAR +0xF7DC 0xE5BF #USER DEFINED CHAR +0xF7DD 0xE5C0 #USER DEFINED CHAR +0xF7DE 0xE5C1 #USER DEFINED CHAR +0xF7DF 0xE5C2 #USER DEFINED CHAR +0xF7E0 0xE5C3 #USER DEFINED CHAR +0xF7E1 0xE5C4 #USER DEFINED CHAR +0xF7E2 0xE5C5 #USER DEFINED CHAR +0xF7E3 0xE5C6 #USER DEFINED CHAR +0xF7E4 0xE5C7 #USER DEFINED CHAR +0xF7E5 0xE5C8 #USER DEFINED CHAR +0xF7E6 0xE5C9 #USER DEFINED CHAR +0xF7E7 0xE5CA #USER DEFINED CHAR +0xF7E8 0xE5CB #USER DEFINED CHAR +0xF7E9 0xE5CC #USER DEFINED CHAR +0xF7EA 0xE5CD #USER DEFINED CHAR +0xF7EB 0xE5CE #USER DEFINED CHAR +0xF7EC 0xE5CF #USER DEFINED CHAR +0xF7ED 0xE5D0 #USER DEFINED CHAR +0xF7EE 0xE5D1 #USER DEFINED CHAR +0xF7EF 0xE5D2 #USER DEFINED CHAR +0xF7F0 0xE5D3 #USER DEFINED CHAR +0xF7F1 0xE5D4 #USER DEFINED CHAR +0xF7F2 0xE5D5 #USER DEFINED CHAR +0xF7F3 0xE5D6 #USER DEFINED CHAR +0xF7F4 0xE5D7 #USER DEFINED CHAR +0xF7F5 0xE5D8 #USER DEFINED CHAR +0xF7F6 0xE5D9 #USER DEFINED CHAR +0xF7F7 0xE5DA #USER DEFINED CHAR +0xF7F8 0xE5DB #USER DEFINED CHAR +0xF7F9 0xE5DC #USER DEFINED CHAR +0xF7FA 0xE5DD #USER DEFINED CHAR +0xF7FB 0xE5DE #USER DEFINED CHAR +0xF7FC 0xE5DF #USER DEFINED CHAR +0xF840 0xE5E0 #USER DEFINED CHAR +0xF841 0xE5E1 #USER DEFINED CHAR +0xF842 0xE5E2 #USER DEFINED CHAR +0xF843 0xE5E3 #USER DEFINED CHAR +0xF844 0xE5E4 #USER DEFINED CHAR +0xF845 0xE5E5 #USER DEFINED CHAR +0xF846 0xE5E6 #USER DEFINED CHAR +0xF847 0xE5E7 #USER DEFINED CHAR +0xF848 0xE5E8 #USER DEFINED CHAR +0xF849 0xE5E9 #USER DEFINED CHAR +0xF84A 0xE5EA #USER DEFINED CHAR +0xF84B 0xE5EB #USER DEFINED CHAR +0xF84C 0xE5EC #USER DEFINED CHAR +0xF84D 0xE5ED #USER DEFINED CHAR +0xF84E 0xE5EE #USER DEFINED CHAR +0xF84F 0xE5EF #USER DEFINED CHAR +0xF850 0xE5F0 #USER DEFINED CHAR +0xF851 0xE5F1 #USER DEFINED CHAR +0xF852 0xE5F2 #USER DEFINED CHAR +0xF853 0xE5F3 #USER DEFINED CHAR +0xF854 0xE5F4 #USER DEFINED CHAR +0xF855 0xE5F5 #USER DEFINED CHAR +0xF856 0xE5F6 #USER DEFINED CHAR +0xF857 0xE5F7 #USER DEFINED CHAR +0xF858 0xE5F8 #USER DEFINED CHAR +0xF859 0xE5F9 #USER DEFINED CHAR +0xF85A 0xE5FA #USER DEFINED CHAR +0xF85B 0xE5FB #USER DEFINED CHAR +0xF85C 0xE5FC #USER DEFINED CHAR +0xF85D 0xE5FD #USER DEFINED CHAR +0xF85E 0xE5FE #USER DEFINED CHAR +0xF85F 0xE5FF #USER DEFINED CHAR +0xF860 0xE600 #USER DEFINED CHAR +0xF861 0xE601 #USER DEFINED CHAR +0xF862 0xE602 #USER DEFINED CHAR +0xF863 0xE603 #USER DEFINED CHAR +0xF864 0xE604 #USER DEFINED CHAR +0xF865 0xE605 #USER DEFINED CHAR +0xF866 0xE606 #USER DEFINED CHAR +0xF867 0xE607 #USER DEFINED CHAR +0xF868 0xE608 #USER DEFINED CHAR +0xF869 0xE609 #USER DEFINED CHAR +0xF86A 0xE60A #USER DEFINED CHAR +0xF86B 0xE60B #USER DEFINED CHAR +0xF86C 0xE60C #USER DEFINED CHAR +0xF86D 0xE60D #USER DEFINED CHAR +0xF86E 0xE60E #USER DEFINED CHAR +0xF86F 0xE60F #USER DEFINED CHAR +0xF870 0xE610 #USER DEFINED CHAR +0xF871 0xE611 #USER DEFINED CHAR +0xF872 0xE612 #USER DEFINED CHAR +0xF873 0xE613 #USER DEFINED CHAR +0xF874 0xE614 #USER DEFINED CHAR +0xF875 0xE615 #USER DEFINED CHAR +0xF876 0xE616 #USER DEFINED CHAR +0xF877 0xE617 #USER DEFINED CHAR +0xF878 0xE618 #USER DEFINED CHAR +0xF879 0xE619 #USER DEFINED CHAR +0xF87A 0xE61A #USER DEFINED CHAR +0xF87B 0xE61B #USER DEFINED CHAR +0xF87C 0xE61C #USER DEFINED CHAR +0xF87D 0xE61D #USER DEFINED CHAR +0xF87E 0xE61E #USER DEFINED CHAR +0xF880 0xE61F #USER DEFINED CHAR +0xF881 0xE620 #USER DEFINED CHAR +0xF882 0xE621 #USER DEFINED CHAR +0xF883 0xE622 #USER DEFINED CHAR +0xF884 0xE623 #USER DEFINED CHAR +0xF885 0xE624 #USER DEFINED CHAR +0xF886 0xE625 #USER DEFINED CHAR +0xF887 0xE626 #USER DEFINED CHAR +0xF888 0xE627 #USER DEFINED CHAR +0xF889 0xE628 #USER DEFINED CHAR +0xF88A 0xE629 #USER DEFINED CHAR +0xF88B 0xE62A #USER DEFINED CHAR +0xF88C 0xE62B #USER DEFINED CHAR +0xF88D 0xE62C #USER DEFINED CHAR +0xF88E 0xE62D #USER DEFINED CHAR +0xF88F 0xE62E #USER DEFINED CHAR +0xF890 0xE62F #USER DEFINED CHAR +0xF891 0xE630 #USER DEFINED CHAR +0xF892 0xE631 #USER DEFINED CHAR +0xF893 0xE632 #USER DEFINED CHAR +0xF894 0xE633 #USER DEFINED CHAR +0xF895 0xE634 #USER DEFINED CHAR +0xF896 0xE635 #USER DEFINED CHAR +0xF897 0xE636 #USER DEFINED CHAR +0xF898 0xE637 #USER DEFINED CHAR +0xF899 0xE638 #USER DEFINED CHAR +0xF89A 0xE639 #USER DEFINED CHAR +0xF89B 0xE63A #USER DEFINED CHAR +0xF89C 0xE63B #USER DEFINED CHAR +0xF89D 0xE63C #USER DEFINED CHAR +0xF89E 0xE63D #USER DEFINED CHAR +0xF89F 0xE63E #USER DEFINED CHAR +0xF8A0 0xE63F #USER DEFINED CHAR +0xF8A1 0xE640 #USER DEFINED CHAR +0xF8A2 0xE641 #USER DEFINED CHAR +0xF8A3 0xE642 #USER DEFINED CHAR +0xF8A4 0xE643 #USER DEFINED CHAR +0xF8A5 0xE644 #USER DEFINED CHAR +0xF8A6 0xE645 #USER DEFINED CHAR +0xF8A7 0xE646 #USER DEFINED CHAR +0xF8A8 0xE647 #USER DEFINED CHAR +0xF8A9 0xE648 #USER DEFINED CHAR +0xF8AA 0xE649 #USER DEFINED CHAR +0xF8AB 0xE64A #USER DEFINED CHAR +0xF8AC 0xE64B #USER DEFINED CHAR +0xF8AD 0xE64C #USER DEFINED CHAR +0xF8AE 0xE64D #USER DEFINED CHAR +0xF8AF 0xE64E #USER DEFINED CHAR +0xF8B0 0xE64F #USER DEFINED CHAR +0xF8B1 0xE650 #USER DEFINED CHAR +0xF8B2 0xE651 #USER DEFINED CHAR +0xF8B3 0xE652 #USER DEFINED CHAR +0xF8B4 0xE653 #USER DEFINED CHAR +0xF8B5 0xE654 #USER DEFINED CHAR +0xF8B6 0xE655 #USER DEFINED CHAR +0xF8B7 0xE656 #USER DEFINED CHAR +0xF8B8 0xE657 #USER DEFINED CHAR +0xF8B9 0xE658 #USER DEFINED CHAR +0xF8BA 0xE659 #USER DEFINED CHAR +0xF8BB 0xE65A #USER DEFINED CHAR +0xF8BC 0xE65B #USER DEFINED CHAR +0xF8BD 0xE65C #USER DEFINED CHAR +0xF8BE 0xE65D #USER DEFINED CHAR +0xF8BF 0xE65E #USER DEFINED CHAR +0xF8C0 0xE65F #USER DEFINED CHAR +0xF8C1 0xE660 #USER DEFINED CHAR +0xF8C2 0xE661 #USER DEFINED CHAR +0xF8C3 0xE662 #USER DEFINED CHAR +0xF8C4 0xE663 #USER DEFINED CHAR +0xF8C5 0xE664 #USER DEFINED CHAR +0xF8C6 0xE665 #USER DEFINED CHAR +0xF8C7 0xE666 #USER DEFINED CHAR +0xF8C8 0xE667 #USER DEFINED CHAR +0xF8C9 0xE668 #USER DEFINED CHAR +0xF8CA 0xE669 #USER DEFINED CHAR +0xF8CB 0xE66A #USER DEFINED CHAR +0xF8CC 0xE66B #USER DEFINED CHAR +0xF8CD 0xE66C #USER DEFINED CHAR +0xF8CE 0xE66D #USER DEFINED CHAR +0xF8CF 0xE66E #USER DEFINED CHAR +0xF8D0 0xE66F #USER DEFINED CHAR +0xF8D1 0xE670 #USER DEFINED CHAR +0xF8D2 0xE671 #USER DEFINED CHAR +0xF8D3 0xE672 #USER DEFINED CHAR +0xF8D4 0xE673 #USER DEFINED CHAR +0xF8D5 0xE674 #USER DEFINED CHAR +0xF8D6 0xE675 #USER DEFINED CHAR +0xF8D7 0xE676 #USER DEFINED CHAR +0xF8D8 0xE677 #USER DEFINED CHAR +0xF8D9 0xE678 #USER DEFINED CHAR +0xF8DA 0xE679 #USER DEFINED CHAR +0xF8DB 0xE67A #USER DEFINED CHAR +0xF8DC 0xE67B #USER DEFINED CHAR +0xF8DD 0xE67C #USER DEFINED CHAR +0xF8DE 0xE67D #USER DEFINED CHAR +0xF8DF 0xE67E #USER DEFINED CHAR +0xF8E0 0xE67F #USER DEFINED CHAR +0xF8E1 0xE680 #USER DEFINED CHAR +0xF8E2 0xE681 #USER DEFINED CHAR +0xF8E3 0xE682 #USER DEFINED CHAR +0xF8E4 0xE683 #USER DEFINED CHAR +0xF8E5 0xE684 #USER DEFINED CHAR +0xF8E6 0xE685 #USER DEFINED CHAR +0xF8E7 0xE686 #USER DEFINED CHAR +0xF8E8 0xE687 #USER DEFINED CHAR +0xF8E9 0xE688 #USER DEFINED CHAR +0xF8EA 0xE689 #USER DEFINED CHAR +0xF8EB 0xE68A #USER DEFINED CHAR +0xF8EC 0xE68B #USER DEFINED CHAR +0xF8ED 0xE68C #USER DEFINED CHAR +0xF8EE 0xE68D #USER DEFINED CHAR +0xF8EF 0xE68E #USER DEFINED CHAR +0xF8F0 0xE68F #USER DEFINED CHAR +0xF8F1 0xE690 #USER DEFINED CHAR +0xF8F2 0xE691 #USER DEFINED CHAR +0xF8F3 0xE692 #USER DEFINED CHAR +0xF8F4 0xE693 #USER DEFINED CHAR +0xF8F5 0xE694 #USER DEFINED CHAR +0xF8F6 0xE695 #USER DEFINED CHAR +0xF8F7 0xE696 #USER DEFINED CHAR +0xF8F8 0xE697 #USER DEFINED CHAR +0xF8F9 0xE698 #USER DEFINED CHAR +0xF8FA 0xE699 #USER DEFINED CHAR +0xF8FB 0xE69A #USER DEFINED CHAR +0xF8FC 0xE69B #USER DEFINED CHAR +0xF940 0xE69C #USER DEFINED CHAR +0xF941 0xE69D #USER DEFINED CHAR +0xF942 0xE69E #USER DEFINED CHAR +0xF943 0xE69F #USER DEFINED CHAR +0xF944 0xE6A0 #USER DEFINED CHAR +0xF945 0xE6A1 #USER DEFINED CHAR +0xF946 0xE6A2 #USER DEFINED CHAR +0xF947 0xE6A3 #USER DEFINED CHAR +0xF948 0xE6A4 #USER DEFINED CHAR +0xF949 0xE6A5 #USER DEFINED CHAR +0xF94A 0xE6A6 #USER DEFINED CHAR +0xF94B 0xE6A7 #USER DEFINED CHAR +0xF94C 0xE6A8 #USER DEFINED CHAR +0xF94D 0xE6A9 #USER DEFINED CHAR +0xF94E 0xE6AA #USER DEFINED CHAR +0xF94F 0xE6AB #USER DEFINED CHAR +0xF950 0xE6AC #USER DEFINED CHAR +0xF951 0xE6AD #USER DEFINED CHAR +0xF952 0xE6AE #USER DEFINED CHAR +0xF953 0xE6AF #USER DEFINED CHAR +0xF954 0xE6B0 #USER DEFINED CHAR +0xF955 0xE6B1 #USER DEFINED CHAR +0xF956 0xE6B2 #USER DEFINED CHAR +0xF957 0xE6B3 #USER DEFINED CHAR +0xF958 0xE6B4 #USER DEFINED CHAR +0xF959 0xE6B5 #USER DEFINED CHAR +0xF95A 0xE6B6 #USER DEFINED CHAR +0xF95B 0xE6B7 #USER DEFINED CHAR +0xF95C 0xE6B8 #USER DEFINED CHAR +0xF95D 0xE6B9 #USER DEFINED CHAR +0xF95E 0xE6BA #USER DEFINED CHAR +0xF95F 0xE6BB #USER DEFINED CHAR +0xF960 0xE6BC #USER DEFINED CHAR +0xF961 0xE6BD #USER DEFINED CHAR +0xF962 0xE6BE #USER DEFINED CHAR +0xF963 0xE6BF #USER DEFINED CHAR +0xF964 0xE6C0 #USER DEFINED CHAR +0xF965 0xE6C1 #USER DEFINED CHAR +0xF966 0xE6C2 #USER DEFINED CHAR +0xF967 0xE6C3 #USER DEFINED CHAR +0xF968 0xE6C4 #USER DEFINED CHAR +0xF969 0xE6C5 #USER DEFINED CHAR +0xF96A 0xE6C6 #USER DEFINED CHAR +0xF96B 0xE6C7 #USER DEFINED CHAR +0xF96C 0xE6C8 #USER DEFINED CHAR +0xF96D 0xE6C9 #USER DEFINED CHAR +0xF96E 0xE6CA #USER DEFINED CHAR +0xF96F 0xE6CB #USER DEFINED CHAR +0xF970 0xE6CC #USER DEFINED CHAR +0xF971 0xE6CD #USER DEFINED CHAR +0xF972 0xE6CE #USER DEFINED CHAR +0xF973 0xE6CF #USER DEFINED CHAR +0xF974 0xE6D0 #USER DEFINED CHAR +0xF975 0xE6D1 #USER DEFINED CHAR +0xF976 0xE6D2 #USER DEFINED CHAR +0xF977 0xE6D3 #USER DEFINED CHAR +0xF978 0xE6D4 #USER DEFINED CHAR +0xF979 0xE6D5 #USER DEFINED CHAR +0xF97A 0xE6D6 #USER DEFINED CHAR +0xF97B 0xE6D7 #USER DEFINED CHAR +0xF97C 0xE6D8 #USER DEFINED CHAR +0xF97D 0xE6D9 #USER DEFINED CHAR +0xF97E 0xE6DA #USER DEFINED CHAR +0xF980 0xE6DB #USER DEFINED CHAR +0xF981 0xE6DC #USER DEFINED CHAR +0xF982 0xE6DD #USER DEFINED CHAR +0xF983 0xE6DE #USER DEFINED CHAR +0xF984 0xE6DF #USER DEFINED CHAR +0xF985 0xE6E0 #USER DEFINED CHAR +0xF986 0xE6E1 #USER DEFINED CHAR +0xF987 0xE6E2 #USER DEFINED CHAR +0xF988 0xE6E3 #USER DEFINED CHAR +0xF989 0xE6E4 #USER DEFINED CHAR +0xF98A 0xE6E5 #USER DEFINED CHAR +0xF98B 0xE6E6 #USER DEFINED CHAR +0xF98C 0xE6E7 #USER DEFINED CHAR +0xF98D 0xE6E8 #USER DEFINED CHAR +0xF98E 0xE6E9 #USER DEFINED CHAR +0xF98F 0xE6EA #USER DEFINED CHAR +0xF990 0xE6EB #USER DEFINED CHAR +0xF991 0xE6EC #USER DEFINED CHAR +0xF992 0xE6ED #USER DEFINED CHAR +0xF993 0xE6EE #USER DEFINED CHAR +0xF994 0xE6EF #USER DEFINED CHAR +0xF995 0xE6F0 #USER DEFINED CHAR +0xF996 0xE6F1 #USER DEFINED CHAR +0xF997 0xE6F2 #USER DEFINED CHAR +0xF998 0xE6F3 #USER DEFINED CHAR +0xF999 0xE6F4 #USER DEFINED CHAR +0xF99A 0xE6F5 #USER DEFINED CHAR +0xF99B 0xE6F6 #USER DEFINED CHAR +0xF99C 0xE6F7 #USER DEFINED CHAR +0xF99D 0xE6F8 #USER DEFINED CHAR +0xF99E 0xE6F9 #USER DEFINED CHAR +0xF99F 0xE6FA #USER DEFINED CHAR +0xF9A0 0xE6FB #USER DEFINED CHAR +0xF9A1 0xE6FC #USER DEFINED CHAR +0xF9A2 0xE6FD #USER DEFINED CHAR +0xF9A3 0xE6FE #USER DEFINED CHAR +0xF9A4 0xE6FF #USER DEFINED CHAR +0xF9A5 0xE700 #USER DEFINED CHAR +0xF9A6 0xE701 #USER DEFINED CHAR +0xF9A7 0xE702 #USER DEFINED CHAR +0xF9A8 0xE703 #USER DEFINED CHAR +0xF9A9 0xE704 #USER DEFINED CHAR +0xF9AA 0xE705 #USER DEFINED CHAR +0xF9AB 0xE706 #USER DEFINED CHAR +0xF9AC 0xE707 #USER DEFINED CHAR +0xF9AD 0xE708 #USER DEFINED CHAR +0xF9AE 0xE709 #USER DEFINED CHAR +0xF9AF 0xE70A #USER DEFINED CHAR +0xF9B0 0xE70B #USER DEFINED CHAR +0xF9B1 0xE70C #USER DEFINED CHAR +0xF9B2 0xE70D #USER DEFINED CHAR +0xF9B3 0xE70E #USER DEFINED CHAR +0xF9B4 0xE70F #USER DEFINED CHAR +0xF9B5 0xE710 #USER DEFINED CHAR +0xF9B6 0xE711 #USER DEFINED CHAR +0xF9B7 0xE712 #USER DEFINED CHAR +0xF9B8 0xE713 #USER DEFINED CHAR +0xF9B9 0xE714 #USER DEFINED CHAR +0xF9BA 0xE715 #USER DEFINED CHAR +0xF9BB 0xE716 #USER DEFINED CHAR +0xF9BC 0xE717 #USER DEFINED CHAR +0xF9BD 0xE718 #USER DEFINED CHAR +0xF9BE 0xE719 #USER DEFINED CHAR +0xF9BF 0xE71A #USER DEFINED CHAR +0xF9C0 0xE71B #USER DEFINED CHAR +0xF9C1 0xE71C #USER DEFINED CHAR +0xF9C2 0xE71D #USER DEFINED CHAR +0xF9C3 0xE71E #USER DEFINED CHAR +0xF9C4 0xE71F #USER DEFINED CHAR +0xF9C5 0xE720 #USER DEFINED CHAR +0xF9C6 0xE721 #USER DEFINED CHAR +0xF9C7 0xE722 #USER DEFINED CHAR +0xF9C8 0xE723 #USER DEFINED CHAR +0xF9C9 0xE724 #USER DEFINED CHAR +0xF9CA 0xE725 #USER DEFINED CHAR +0xF9CB 0xE726 #USER DEFINED CHAR +0xF9CC 0xE727 #USER DEFINED CHAR +0xF9CD 0xE728 #USER DEFINED CHAR +0xF9CE 0xE729 #USER DEFINED CHAR +0xF9CF 0xE72A #USER DEFINED CHAR +0xF9D0 0xE72B #USER DEFINED CHAR +0xF9D1 0xE72C #USER DEFINED CHAR +0xF9D2 0xE72D #USER DEFINED CHAR +0xF9D3 0xE72E #USER DEFINED CHAR +0xF9D4 0xE72F #USER DEFINED CHAR +0xF9D5 0xE730 #USER DEFINED CHAR +0xF9D6 0xE731 #USER DEFINED CHAR +0xF9D7 0xE732 #USER DEFINED CHAR +0xF9D8 0xE733 #USER DEFINED CHAR +0xF9D9 0xE734 #USER DEFINED CHAR +0xF9DA 0xE735 #USER DEFINED CHAR +0xF9DB 0xE736 #USER DEFINED CHAR +0xF9DC 0xE737 #USER DEFINED CHAR +0xF9DD 0xE738 #USER DEFINED CHAR +0xF9DE 0xE739 #USER DEFINED CHAR +0xF9DF 0xE73A #USER DEFINED CHAR +0xF9E0 0xE73B #USER DEFINED CHAR +0xF9E1 0xE73C #USER DEFINED CHAR +0xF9E2 0xE73D #USER DEFINED CHAR +0xF9E3 0xE73E #USER DEFINED CHAR +0xF9E4 0xE73F #USER DEFINED CHAR +0xF9E5 0xE740 #USER DEFINED CHAR +0xF9E6 0xE741 #USER DEFINED CHAR +0xF9E7 0xE742 #USER DEFINED CHAR +0xF9E8 0xE743 #USER DEFINED CHAR +0xF9E9 0xE744 #USER DEFINED CHAR +0xF9EA 0xE745 #USER DEFINED CHAR +0xF9EB 0xE746 #USER DEFINED CHAR +0xF9EC 0xE747 #USER DEFINED CHAR +0xF9ED 0xE748 #USER DEFINED CHAR +0xF9EE 0xE749 #USER DEFINED CHAR +0xF9EF 0xE74A #USER DEFINED CHAR +0xF9F0 0xE74B #USER DEFINED CHAR +0xF9F1 0xE74C #USER DEFINED CHAR +0xF9F2 0xE74D #USER DEFINED CHAR +0xF9F3 0xE74E #USER DEFINED CHAR +0xF9F4 0xE74F #USER DEFINED CHAR +0xF9F5 0xE750 #USER DEFINED CHAR +0xF9F6 0xE751 #USER DEFINED CHAR +0xF9F7 0xE752 #USER DEFINED CHAR +0xF9F8 0xE753 #USER DEFINED CHAR +0xF9F9 0xE754 #USER DEFINED CHAR +0xF9FA 0xE755 #USER DEFINED CHAR +0xF9FB 0xE756 #USER DEFINED CHAR +0xF9FC 0xE757 #USER DEFINED CHAR 0xFA40 0x2170 #SMALL ROMAN NUMERAL ONE 0xFA41 0x2171 #SMALL ROMAN NUMERAL TWO 0xFA42 0x2172 #SMALL ROMAN NUMERAL THREE diff --git a/source/include/version.h b/source/include/version.h index 2a79661b62c..dcc2e48d17a 100644 --- a/source/include/version.h +++ b/source/include/version.h @@ -1 +1 @@ -#define VERSION "2.2.3-pre" +#define VERSION "2.2.3" -- cgit From 04859cccc6663a90af406ba45281c89c4c45089f Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:12:23 +0000 Subject: One more from 8.1 --- packaging/Mandrake/smbw.patch.bz2 | Bin 0 -> 278 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packaging/Mandrake/smbw.patch.bz2 diff --git a/packaging/Mandrake/smbw.patch.bz2 b/packaging/Mandrake/smbw.patch.bz2 new file mode 100644 index 00000000000..5cb7361d17d Binary files /dev/null and b/packaging/Mandrake/smbw.patch.bz2 differ -- cgit From 24b25a72ff64b3134c3980bf3fdec7f095480b80 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:16:11 +0000 Subject: Fixes so 2.2.3 should build on MDK8.1 --- packaging/Mandrake/samba2.spec.tmpl | 1059 +++++++++++++++++++++++++---------- 1 file changed, 749 insertions(+), 310 deletions(-) diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl index ad23af0f639..363b40fe2b3 100644 --- a/packaging/Mandrake/samba2.spec.tmpl +++ b/packaging/Mandrake/samba2.spec.tmpl @@ -1,14 +1,29 @@ -Summary: Samba SMB client and server +Summary: Samba SMB server. Name: samba Version: PVERSION Release: PRELEASE -Copyright: GNU GPL version 2 -Group: Networking -Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz -Packager: Gerald (Jerry) Carter [Samba-Team] -Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2 -Prereq: chkconfig fileutils -BuildRoot: /var/tmp/samba +License: GNU GPL version 2 +Group: System/Servers +Packager: John H Terpstra [samba-team] + +Source: ftp://samba.org/pub/samba/samba-%{version}.tar.bz2 +Source1: samba.log +Source2: mount.smb +Source3: samba.xinetd +Source4: swat_48.xpm.bz2 +Source5: swat_32.xpm.bz2 +Source6: swat_16.xpm.bz2 + +Patch: smbw.patch.bz2 +Patch1: samba-2.2.0-gawk.patch.bz2 +Patch2: samba-2.2.0-buildroot.patch.bz2 +Patch3: smbmount-sbin.patch.bz2 + +Requires: samba-common = %{version} pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2 +Prereq: xinetd chkconfig fileutils sed /bin/grep +Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall +BuildRequires: libcups-devel pam-devel +BuildRoot: %{_tmppath}/%{name}-root Prefix: /usr %description @@ -21,11 +36,11 @@ in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) protocol. -Samba-2.2 features working NT Domain Control capability and -includes the SWAT (Samba Web Administration Tool) that -allows samba's smb.conf file to be remotely managed using your +Samba-2.2 features working NT Domain Control capability and +includes the SWAT (Samba Web Administration Tool) that +allows samba's smb.conf file to be remotely managed using your favourite web browser. For the time being this is being -enabled on TCP port 901 via inetd. +enabled on TCP port 901 via xinetd. Users are advised to use Samba-2.2 as a Windows NT4 Domain Controller only on networks that do NOT have a Windows @@ -38,226 +53,243 @@ This binary release includes encrypted password support. Please read the smb.conf file and ENCRYPTION.txt in the docs directory for implementation details. -%changelog -* Mon May 21 2001 Gerald (Jerry) Carter - - removed docs/htmldocs and docs/manpages from /usr/share/docs - These het installed in /usr/share/swat already - - Fix for codepages and src not getting installed in the RPM - - Fixed minor typos +%package client +Summary: Samba (SMB) client programs. +Group: Networking/Other +Requires: samba-common = %{version} +Obsoletes: smbfs + +%description client +Samba-client provides some SMB clients, which complement the built-in +SMB filesystem in Linux. These allow the accessing of SMB shares, and +printing to SMB printers. + +%package common +Summary: Files used by both Samba servers and clients. +Group: System/Servers -* Mon Apr 23 2001 Gerald (Jerry) Carter - - Added a few bug fixes to release the first Mandrake RPMS +%description common +Samba-common provides files necessary for both the server and client +packages of Samba. -* Sat Apr 14 2001 John H Terpstra - - Added official samba-team support for Mandrakesoft - - We get a lot of requests for this! +%package doc +Summary: Documentation for Samba servers and clients. +Group: System/Servers +Requires: samba-common = %{version} + +%description doc +Samba-doc provides documentation files for both the server and client +packages of Samba. %prep -%setup +%setup -q +%patch -p1 -b .smbw +%patch1 -p1 -b .gawk +%patch2 -p1 -b .buildroot +%patch3 -p1 %build cd source - -%ifarch ia64 -libtoolize --copy --force # get it to recognize IA-64 autoconf -autoheader -EXTRA="-D_LARGEFILE64_SOURCE" -%endif NUMCPU=`grep processor /proc/cpuinfo | wc -l` -CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \ - --prefix=%{prefix} \ - --with-fhs \ - --libdir=/etc/samba \ - --localstatedir=/var \ - --with-codepagedir=%{prefix}/share/samba/codepages \ - --with-configdir=/etc/samba \ - --with-swatdir=%{prefix}/share/swat \ - --with-quotas \ - --with-smbmount \ - --with-pam \ - --with-pam_smbpass \ - --with-syslog \ - --with-utmp \ - --with-sambabook=%{prefix}/share/swat/using_samba +CFLAGS="$RPM_OPT_FLAGS" +%configure --prefix=%{prefix} \ + --libdir=/etc/samba \ + --localstatedir=/var \ + --sysconfdir=/etc/samba \ + --with-acl-support \ + --with-automount \ + --with-codepagedir=/var/lib/samba/codepages \ + --with-configdir=/etc/samba \ + --with-fhs \ + --with-mmap \ + --with-netatalk \ + --with-pam \ + --with-pam_smbpass \ + --with-privatedir=/etc/samba \ + --with-quotas \ + --with-sambabook=%{prefix}/share/swat/using_samba \ + --with-smbmount \ + --with-smbwrapper \ + --with-swatdir=%{prefix}/share/swat \ + --with-syslog \ + --with-utmp make -j${NUMCPU} proto -make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so debug2html +make -j${NUMCPU} CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,samba} -mkdir -p $RPM_BUILD_ROOT/etc/samba/security -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -mkdir -p $RPM_BUILD_ROOT/lib/security -mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin} -mkdir -p $RPM_BUILD_ROOT/home/samba mkdir -p $RPM_BUILD_ROOT/sbin -mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include} -mkdir -p $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src -mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs} -mkdir -p $RPM_BUILD_ROOT%{prefix}/share/man/{man1,man5,man7,man8} +mkdir -p $RPM_BUILD_ROOT/etc/samba +mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,xinetd.d} +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +mkdir -p $RPM_BUILD_ROOT/%{prefix}/{bin,sbin} +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/swat/{images,help,include,using_samba} +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/swat/using_samba/{figs,gifs} +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man1,man5,man7,man8} mkdir -p $RPM_BUILD_ROOT/var/cache/samba mkdir -p $RPM_BUILD_ROOT/var/log/samba mkdir -p $RPM_BUILD_ROOT/var/spool/samba +mkdir -p $RPM_BUILD_ROOT/var/lib/samba/{netlogon,profiles,printers} +mkdir -p $RPM_BUILD_ROOT/var/lib/samba/codepages/src +mkdir -p $RPM_BUILD_ROOT/lib/security +mkdir -p $RPM_BUILD_ROOT%prefix/lib # Install standard binary files + for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ - make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \ - smbmount smbumount smbmnt + make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \ + smbcacls smbclient smbmount smbumount smbsh do - install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin + install -m755 source/bin/$i $RPM_BUILD_ROOT/%{prefix}/bin done -for i in smbtar + +install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%prefix/lib/smbwrapper.so +install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/pam_smbpass.so + +#for i in addtosmbpass mksmbpasswd.sh smbtar convert_smbpasswd + +for i in mksmbpasswd.sh smbtar convert_smbpasswd do - install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin + install -m755 source/script/$i $RPM_BUILD_ROOT/%{prefix}/bin done # Install secure binary files -for i in smbd nmbd swat debug2html smbfilter + +for i in smbd nmbd swat smbfilter debug2html smbmnt smbcontrol do - install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin + install -m755 source/bin/$i $RPM_BUILD_ROOT/%{prefix}/sbin done -# we need a symlink for mount to recognise the smb and smbfs filesystem types -ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs -ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb +# Install level 1,5,7,8 man pages + +for mpl in 1 5 7 8;do + mp=$(ls docs/manpages/*.$mpl) + for i in $mp;do + install -m644 $i $RPM_BUILD_ROOT/%{_mandir}/man$mpl + done +done # Install codepage source files + +for i in 437 737 775 850 852 861 866 932 936 949 950 1251 +do + install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/src +done + +for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R +do + install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/src +done + +# Build codepage load files for i in 437 737 775 850 852 861 866 932 936 949 950 1251; do - install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src + $RPM_BUILD_ROOT/%{prefix}/bin/make_smbcodepage c $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/codepage.$i done + +# Build unicode load files for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R; do - install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src + $RPM_BUILD_ROOT/%{prefix}/bin/make_unicodemap $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/unicode_map.$i done +rm -rf $RPM_BUILD_ROOT/var/lib/samba/codepages/src -# Install the nsswitch library extenstion file +# Install the nsswitch library extension file install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib # Make link for wins resolver ( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; ) -# PAM Authentication file -install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security - # Install SWAT helper files -for i in swat/help/*.html docs/htmldocs/*.html; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help -done -for i in swat/images/*.gif; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images -done -for i in swat/include/*.html; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include -done + for i in swat/help/*.html docs/htmldocs/*.html; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/help + done -# This is the O'Reily Samba Book - on-line -for i in docs/htmldocs/using_samba/*.html; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba -done -for i in docs/htmldocs/using_samba/figs/*.gif; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs -done -for i in docs/htmldocs/using_samba/gifs/*.gif; do - install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/gifs -done + for i in swat/images/*.gif; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/images + done -# Install the miscellany -install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat -# Install level 1 man pages -for i in *.1; do - install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/share/man/man1 -done -install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5 -install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5 -install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5 - -install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT%{prefix}/share/man/man7 - -install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/smbmount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/smbmnt.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/smbumount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 -install -m644 docs/manpages/smbspool.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8 - -install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat - -install -m644 packaging/Mandrake/smb.con* $RPM_BUILD_ROOT/etc/samba/ -install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers -install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT%{prefix}/bin -install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT%{prefix}/bin -install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb -install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba -install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/samba/samba.pamd -install -m644 packaging/Mandrake/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba -install -m644 packaging/Mandrake/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd -echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts - -## -## remove these directories so they don't get installed twice -## -/bin/rm -rf docs/htmldocs -/bin/rm -rf docs/manpages + for i in swat/include/*.html; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/include + done + +# Install the O'Reilly "Using Samba" book + + for i in docs/htmldocs/using_samba/*.html; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/using_samba + done + + for i in docs/htmldocs/using_samba/gifs/*.gif; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/using_samba/gifs + done + + for i in docs/htmldocs/using_samba/figs/*.gif; do + install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/using_samba/figs + done + +# Install other stuff + + install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf + install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers + install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT/usr/bin + #install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT/usr/bin + install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT/usr/bin + install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb + install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/usr/sbin/samba + install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba + install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba + +# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs + ln -s /%{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb + ln -s /%{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs + echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts + +# Link smbspool to CUPS (does not require installed CUPS) + + mkdir -p $RPM_BUILD_ROOT/usr/lib/cups/backend + ln -s /usr/bin/smbspool $RPM_BUILD_ROOT/usr/lib/cups/backend/smb + +# xinetd support + + mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d + install -m644 %{SOURCE3} $RPM_BUILD_ROOT/etc/xinetd.d/swat + +# menu support + +mkdir -p $RPM_BUILD_ROOT%{_menudir} +cat > $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF +?package(%{name}):command="gnome-moz-remote http://localhost:901/" needs="gnome" \ +icon="swat.xpm" section="Configuration/Networking" title="Samba Configuration" \ +longtitle="The Swat Samba Administration Tool" +?package(%{name}):command="sh -c '\$BROWSER http://localhost:901/'" needs="x11" \ +icon="swat.xpm" section="Configuration/Networking" title="Samba Configuration" \ +longtitle="The Swat Samba Administration Tool" +EOF + +mkdir -p $RPM_BUILD_ROOT%{_liconsdir} $RPM_BUILD_ROOT%{_iconsdir} $RPM_BUILD_ROOT%{_miconsdir} + +bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_liconsdir}/swat.xpm +bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_iconsdir}/swat.xpm +bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat.xpm %clean rm -rf $RPM_BUILD_ROOT %post -/sbin/chkconfig --add smb -/sbin/chkconfig smb off -# Build codepage load files -cd %{prefix}/share/samba/codepages -for i in 437 737 775 850 852 861 866 932 936 949 950 1251 -do -%{prefix}/bin/make_smbcodepage c $i %{prefix}/share/samba/codepages/src/codepage_def.$i %{prefix}/share/samba/codepages/codepage.$i -done -for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R -do -%{prefix}/bin/make_unicodemap $i %{prefix}/share/samba/codepages/src/CP$i.TXT %{prefix}/share/samba/codepages/unicode_map.$i -done +/sbin/chkconfig --level 35 smb on -echo "Looking for old /etc/smb.conf..." -if [ -f /etc/smb.conf ]; then - echo "Moving old /etc/smb.conf to /etc/samba/smb.conf" - mv /etc/smb.conf /etc/samba/smb.conf -fi - -echo "Looking for old /etc/smbusers..." -if [ -f /etc/smbusers ]; then - echo "Moving old /etc/smbusers to /etc/samba/smbusers" - mv /etc/smbusers /etc/samba/smbusers -fi - -echo "Looking for old /etc/lmhosts..." -if [ -f /etc/lmhosts ]; then - echo "Moving old /etc/lmhosts to /etc/samba/lmhosts" - mv /etc/lmhosts /etc/samba/lmhosts -fi - -echo "Looking for old /etc/MACHINE.SID..." -if [ -f /etc/MACHINE.SID ]; then - echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID" - mv /etc/MACHINE.SID /etc/samba/MACHINE.SID -fi - -echo "Looking for old /etc/smbpasswd..." -if [ -f /etc/smbpasswd ]; then - echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd" - mv /etc/smbpasswd /etc/samba/smbpasswd +if [ -f /var/lock/subsys/xinetd ]; then + service xinetd reload >/dev/null 2>&1 || : fi -# -# For 2.2.1 we move the tdb files from /var/lock/samba to /var/cache/samba -# to preserve across reboots. -# -echo "Moving tdb files in /var/lock/samba/*.tdb to /var/cache/samba/*.tdb" +# Add a unix group for samba machine accounts +groupadd -frg 421 machines + +# Migrate tdb's from /var/lock/samba (taken from official samba spec file): for i in /var/lock/samba/*.tdb do if [ -f $i ]; then @@ -266,164 +298,571 @@ if [ -f $i ]; then mv $i $newname fi done - -# Remove the transient tdb files. -if [ -e /var/cache/samba/brlock.tdb ]; then - rm -f /var/cache/samba/brlock.tdb -fi - -if [ -e /var/cache/samba/unexpected.tdb ]; then - rm -f /var/cache/samba/unexpected.tdb -fi - -if [ -e /var/cache/samba/connections.tdb ]; then - rm -f /var/cache/samba/connections.tdb -fi - -if [ -e /var/cache/samba/locking.tdb ]; then - rm -f /var/cache/samba/locking.tdb -fi - -if [ -e /var/cache/samba/messages.tdb ]; then - rm -f /var/cache/samba/messages.tdb -fi - + +# Remove the transient tdb files (modified from version in off. samba spec: +for TDB in brlock unexpected locking messages; do + if [ -e /var/cache/samba/$TDB.tdb ]; then + rm -f /var/cache/samba/$TDB.tdb; + fi; +done + if [ -d /var/lock/samba ]; then - rm -rf /var/lock/samba + rm -rf /var/lock/samba fi -# Add swat entry to /etc/services if not already there -if !( grep ^[:space:]*swat /etc/services > /dev/null ) then - echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services -fi +%post common +# Basic migration script for pre-2.2.1 users, +# since smb config moved from /etc to /etc/samba -# Add swat entry to /etc/inetd.conf if needed. -if [ -f /etc/inetd.conf ]; then - if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then - echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf - killall -1 inetd || : - fi -fi - -# Add swat entry to xinetd.d if needed. -if [ -d $RPM_BUILD_ROOT/etc/xinetd.d ]; then - mv /etc/samba/samba.xinetd /etc/xinetd.d/swat -else - rm -f /etc/samba/samba.xinetd -fi - -# Install the correct version of the samba pam file, depending on pam version. -if [ -f /lib/security/pam_stack.so ]; then - echo "Installing stack version of /etc/pam.d/samba..." - mv /etc/samba/samba.stack /etc/pam.d/samba -else - echo "Installing non-stack version of /etc/pam.d/samba..." - rm -f /etc/samba/samba.stack +mkdir -p /etc/samba +for s in smb.conf smbusers smbpasswd printers.def secrets.tdb lmhosts; do +[ -f /etc/$s ] && { + cp -f /etc/$s /etc/$s.OLD + mv -f /etc/$s /etc/samba/ +} +done + +# Let's create a proper /etc/samba/smbpasswd file +touch /etc/samba/smbpasswd + +# Let's define the proper paths for config files +perl -pi -e 's/(\/etc\/)(smb)/\1samba\/\2/' /etc/samba/smb.conf + +# Fix the logrotate.d file from smb and nmb to smbd and nmbd +if [ -f /etc/logrotate.d/samba ]; then + perl -pi -e 's/smb /smbd /' /etc/logrotate.d/samba + perl -pi -e 's/nmb /nmbd /' /etc/logrotate.d/samba fi +# And not loose our machine account SIDs +[ -f /etc/*.SID ] && cp -f /etc/*.SID /etc/samba/ + +%update_menus + %preun + +/sbin/chkconfig --level 35 smb reset + if [ $1 = 0 ] ; then - /sbin/chkconfig --del smb - - # We want to remove the browse.dat file - if [ -e /var/cache/samba/browse.dat ]; then - rm -f /var/cache/samba/browse.dat - fi - - if [ -e /var/cache/samba/wins.dat ]; then - rm -f /var/cache/samba/wins.dat - fi - - # Remove the transient tdb files. - if [ -e /var/cache/samba/brlock.tdb ]; then - rm -f /var/cache/samba/brlock.tdb - fi - - if [ -e /var/cache/samba/unexpected.tdb ]; then - rm -f /var/cache/samba/unexpected.tdb - fi - - if [ -e /var/cache/samba/connections.tdb ]; then - rm -f /var/cache/samba/connections.tdb - fi - - if [ -e /var/cache/samba/locking.tdb ]; then - rm -f /var/cache/samba/locking.tdb - fi - - if [ -e /var/cache/samba/messages.tdb ]; then - rm -f /var/cache/samba/messages.tdb - fi + + for i in browse.dat wins.dat brlock.tdb unexpected.tdb connections.tdb \ +locking.tdb messages.tdb;do + if [ -e /var/cache/samba/$i ]; then + rm -f /var/cache/samba/$i + fi; + done + if [ -d /var/log/samba ]; then + rm -rf /var/log/samba/* + fi + if [ -d /var/cache/samba ]; then + rm -rf /var/cache/samba/* + fi fi -%postun -# Only delete remnants of samba if this is the final deletion. +%preun common + if [ $1 = 0 ] ; then - if [ -x /etc/pam.d/samba ]; then - rm -f /etc/pam.d/samba - fi - if [ -e /var/log/samba ]; then - rm -rf /var/log/samba - fi - if [ -e /var/cache/samba ]; then - rm -rf /var/cache/samba - fi - - # Remove swat entries from /etc/inetd.conf and /etc/services - cd /etc - tmpfile=/etc/tmp.$$ - if [ -f /etc/inetd.conf ]; then - # preserve inetd.conf permissions. - cp -p /etc/inetd.conf $tmpfile - sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile - mv $tmpfile inetd.conf - fi - # preserve services permissions. - cp -p /etc/services $tmpfile - sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile - mv $tmpfile /etc/services - - # Remove swat entry from /etc/xinetd.d - if [ -f /etc/xinetd.d/swat ]; then - rm -r /etc/xinetd.d/swat - fi + for n in /etc/samba/codepages/*; do + if [ "$n" != "/etc/samba/codepages/src" ]; then + rm -rf $n + fi + done fi -%triggerpostun -- samba < samba-2.0.0 -if [ $0 != 0 ]; then - /sbin/chkconfig --add smb +%postun + +# Remove swat entry from xinetd +if [ $1 = 0 -a -f /etc/xinetd.conf ] ; then +rm -f /etc/xinetd.d/swat +service xinetd reload &>/dev/null || : +fi + +if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi + +%clean_menus + +%triggerpostun -- samba < 1.9.18p7 + +if [ $1 != 0 ]; then + /sbin/chkconfig --level 35 smb on +fi + +%triggerpostun -- samba < 2.0.5a-3, samba >= 2.0.0 + +if [ $1 != 0 ]; then + [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba ||: + [ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba ||: + [ -f /etc/inetd.conf ] && chmod 644 /etc/services /etc/inetd.conf ||: fi %files -%doc README COPYING Manifest Read-Manifest-Now -%doc WHATSNEW.txt Roadmap -%doc docs -%doc swat/README -%doc examples -%attr(-,root,root) %{prefix}/sbin/* +%defattr(-,root,root) +%config(noreplace) /etc/xinetd.d/swat +%{_menudir}/%{name} +%{_miconsdir}/*.xpm +%{_liconsdir}/*.xpm +%{_iconsdir}/*.xpm +#%attr(-,root,root) %{prefix}/sbin/* %attr(-,root,root) /sbin/* -%attr(-,root,root) %{prefix}/bin/* -%attr(755,root,root) /lib/* +#%attr(-,root,root) %{prefix}/bin/* +#%attr(755,root,root) /lib/* +%{prefix}/sbin/samba +%{prefix}/sbin/smbd +%{prefix}/sbin/nmbd +%{prefix}/sbin/swat +%{prefix}/sbin/smbcontrol +#%{prefix}/bin/addtosmbpass +%{prefix}/bin/mksmbpasswd.sh +%{prefix}/bin/smbstatus +%{prefix}/bin/smbpasswd +%{prefix}/bin/convert_smbpasswd +#/usr/share/swat %attr(-,root,root) %{prefix}/share/swat/help/* %attr(-,root,root) %{prefix}/share/swat/images/* %attr(-,root,root) %{prefix}/share/swat/include/* -%attr(-,root,root) %{prefix}/share/swat/using_samba/* -%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts -%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf %attr(-,root,root) %config(noreplace) /etc/samba/smbusers -%attr(-,root,root) /etc/rc.d/init.d/smb -%attr(-,root,root) /etc/logrotate.d/samba +%attr(-,root,root) %config /etc/rc.d/init.d/smb +%attr(-,root,root) %config(noreplace) /etc/logrotate.d/samba %attr(-,root,root) %config(noreplace) /etc/pam.d/samba -%attr(-,root,root) %{prefix}/share/man/man1/* -%attr(-,root,root) %{prefix}/share/man/man5/* -%attr(-,root,root) %{prefix}/share/man/man7/* -%attr(-,root,root) %{prefix}/share/man/man8/* -%attr(-,root,root) %dir /etc/samba/ -%attr(-,root,root) %dir /usr/share/samba/codepages/* -%attr(-,root,root) %dir /usr/share/samba/codepages/src/* -%attr(-,root,root) %dir /var/cache/samba -%attr(-,root,root) %dir /var/log/samba +%{_mandir}/man1/smbstatus.1* +%{_mandir}/man5/smbpasswd.5* +%{_mandir}/man7/samba.7* +%{_mandir}/man8/smbd.8* +%{_mandir}/man8/nmbd.8* +%{_mandir}/man1/smbcontrol.1* +%{_mandir}/man8/smbpasswd.8* +%{_mandir}/man8/swat.8* +#%{_mandir}/man1/lmhosts.1* +%{_mandir}/man5/smb.conf.5* +%attr(775,root,root) %dir /var/lib/samba/netlogon +%attr(775,root,root) %dir /var/lib/samba/profiles +%attr(775,root,root) %dir /var/lib/samba/printers +%dir /var/cache/samba +%dir /var/log/samba %attr(1777,root,root) %dir /var/spool/samba +%files doc +%defattr(-,root,root) +%doc README COPYING Manifest Read-Manifest-Now +%doc WHATSNEW.txt Roadmap +%doc docs +%doc examples +%doc swat/README +%attr(-,root,root) %{prefix}/share/swat/using_samba/* +%files client +%defattr(-,root,root) +%ifnarch alpha +/sbin/mount.smb +/sbin/mount.smbfs +%attr(4775,root,root) %{prefix}/bin/smbmount +%attr(4775,root,root) %{prefix}/bin/smbumount +%{prefix}/sbin/smbmnt +%{_mandir}/man8/smbmnt.8* +%{_mandir}/man8/smbmount.8* +%{_mandir}/man8/smbumount.8* +%endif +%{prefix}/bin/nmblookup +%{prefix}/bin/findsmb +%{prefix}/bin/smbclient +%{prefix}/bin/smbprint +%{prefix}/bin/smbtar +%{prefix}/bin/smbcacls +%{prefix}/bin/smbspool +# Link of smbspool to CUPS +/%{prefix}/lib/cups/backend/smb +/%{_mandir}/man1/nmblookup.1* +/%{_mandir}/man1/findsmb.1* +/%{_mandir}/man1/smbclient.1* +/%{_mandir}/man1/smbtar.1* +/%{_mandir}/man1/smbcacls.1* + +%files common +%defattr(-,root,root) +/%{prefix}/bin/make_smbcodepage +/%{prefix}/bin/make_unicodemap +/%{prefix}/bin/testparm +/%{prefix}/bin/testprns +/%{prefix}/bin/make_printerdef +/%{prefix}/bin/rpcclient +/%{prefix}/bin/smbsh +%prefix/lib/smbwrapper.so +/lib/security/* +%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf +%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts +%attr(-,root,root) /var/lib/samba/codepages +%{_mandir}/man1/make_smbcodepage.1* +%{_mandir}/man1/make_unicodemap.1* +%{_mandir}/man1/testparm.1* +%{_mandir}/man1/smbsh.1* +%{_mandir}/man1/testprns.1* +%{_mandir}/man5/smb.conf.5* +%{_mandir}/man5/lmhosts.5* +%attr(755,root,root) /lib/*.so +%attr(755,root,root) /lib/*.so.* + +%changelog +* Sat Jan 05 2002 John H Terpstra +- Updated from Mandrake 8.1 SRPM to bring building up to date +- Note: I disposed of all patches that would not apply to the CVS sources + no time to check if really needed - hope someone else will validate this. + +* Mon Sep 10 2001 Sylvestre Taburet 2.2.1a-15mdk +- Enabled acl support (XFS acls now supported by kernel-2.4.8-21mdk thx Chmou) + Added smbd patch to support XFS quota (Nathan Scott) + +* Mon Sep 10 2001 Sylvestre Taburet 2.2.1a-14mdk +- Oops! smbpasswd created in wrong directory... + +* Tue Sep 06 2001 Sylvestre Taburet 2.2.1a-13mdk +- Removed a wrong comment in smb.conf. + Added creation of smbpasswd during install. + +* Mon Aug 27 2001 Pixel 2.2.1a-12mdk +- really less verbose %%post + +* Sat Aug 25 2001 Geoffrey Lee 2.2.1a-11mdk +- Fix shared libs in /usr/bin silliness. + +* Thu Aug 23 2001 Pixel 2.2.1a-10mdk +- less verbose %%post + +* Wed Aug 22 2001 Buchan Milne 2.2.1a-9mdk +- Added smbcacls (missing in %files), modification to smb.conf: ([printers] + is still needed, even with point-and-print!, user add script should + use name and not gid, since we may not get the gid . New script for + putting manpages in place (still need to be added in %files!). Moved + smbcontrol to sbin and added it and its man page to %files. + +* Wed Aug 22 2001 Pixel 2.2.1a-8mdk +- cleanup /var/lib/samba/codepage/src + +* Tue Aug 21 2001 Sylvestre Taburet 2.2.1a-7mdk +- moved codepage generation to %install and codepage dir to /var/lib/samba + +* Tue Aug 21 2001 Sylvestre Taburet 2.2.1a-6mdk +- /lib/* was in both samba and samba-common + Introducing samba-doc: "alas, for the sake of thy modem, shalt thou remember + when Samba was under the Megabyte..." + +* Fri Aug 03 2001 Sylvestre Taburet 2.2.1a-5mdk +- Added "the gc touch" to smbinit through the use of killall -0 instead of + grep cupsd | grep -v grep (too many greps :o) + +* Wed Jul 18 2001 Stefan van der Eijk 2.2.1a-4mdk +- BuildRequires: libcups-devel +- Removed BuildRequires: openssl-devel + +* Fri Jul 13 2001 Sylvestre Taburet 2.2.1a-3mdk +- replace chkconfig --add/del with --level 35 on/reset. + +* Fri Jul 13 2001 Geoffrey Lee 2.2.1a-2mdk +- Replace discription s/inetd/xinetd/, we all love xinetd, blah. + +* Thu Jul 12 2001 Buchan Milne 2.2.1a-1mdk +- Bugfix release. Fixed add user script, added print$ share and printer admin + We need to test interaction of new print support with CUPS, but printer + driver uploads should work. + +* Wed Jul 11 2001 Sylvestre Taburet 2.2.1-17mdk +- fixed smb.conf a bit, rebuilt on cooker. + +* Tue Jul 10 2001 Buchan Milne 2.2.1-16mdk +- Finally, samba 2.2.1 has actually been release. At least we were ready! + Cleaned up smb.conf, and added some useful entries for domain controlling. + Migrated changes made in samba's samba2.spec for 2.2.1 to this file. + Added groupadd command in post to create a group for samba machine accounts. + (We should still check the postun, samba removes pam, logs and cache) + +* Tue Jun 26 2001 Sylvestre Taburet 2.2.1-15mdk +- fixed smbwrapper compile options. + +* Tue Jun 26 2001 Sylvestre Taburet 2.2.1-14mdk +- added LFS support. + added smbwrapper support (smbsh) + +* Wed Jun 20 2001 Sylvestre Taburet 2.2.1-13mdk +- /sbin/mount.smb and /sbin/mount.smbfs now point to the correct location + of smbmount (/usr/bin/smbmount) + +* Tue Jun 19 2001 Sylvestre Taburet 2.2.1-12mdk +- smbmount and smbumount are now in /usr/bin and SUID. + added ||: to triggerpostun son you don't get error 1 anymore when rpm -e + Checked the .bz2 sources with file *: everything is OK now (I'm so stupid ;o)! + +* Tue Jun 19 2001 Geoffrey Lee 2.2.1-11mdk +- s/Copyright/License/; +- Stop Sylvester from pretending .gz source to be .bz2 source via filename + aka really bzip2 the source. + +* Mon Jun 18 2001 Sylvestre Taburet 2.2.1-10mdk +- changed Till's startup script modifications: now samba is being reloaded + automatically 1 minute after it has started (same reasons as below in 9mdk) + added _post_ and _preun_ for service smb + fixed creation of /var/lib/samba/{netlogon,profiles} (%dir was missing) + +* Thu Jun 14 2001 Till Kamppeter 2.2.1-9mdk +- Modified the Samba startup script so that in case of CUPS being used as + printing system Samba only starts when the CUPS daemon is ready to accept + requests. Otherwise the CUPS queues would not appear as Samba shares. + +* Mon Jun 11 2001 Sylvestre Taburet 2.2.1-8mdk +- patched smbmount.c to have it call smbmnt in sbin (thanks Seb). + +* Wed May 30 2001 Sylvestre Taburet 2.2.1-7mdk +- put SWAT menu icons back in place. + +* Mon May 28 2001 Sylvestre Taburet 2.2.1-6mdk +- OOPS! fixed smbmount symlinks + +* Mon May 28 2001 Sylvestre Taburet 2.2.1-5mdk +- removed inetd postun script, replaced with xinetd. + updated binary list (smbcacls...) + cleaned samba.spec + +* Mon May 28 2001 Buchan Milne 2.2.1-4mdk +- Changed configure options to point to correct log and codepage directories, + added crude script to fix logrotate file for new log file names, updated + patches to work with current CVS. + +* Thu May 24 2001 Sylvestre Taburet 2.2.1-3mdk +- Cleaned and updated the %files section. + +* Sat May 19 2001 Sylvestre Taburet 2.2.1-2mdk +- Moved all samba files from /etc to /etc/samba (Thanks DomS!). + Fixed fixinit patch (/etc/samba/smb.conf) + +* Fri May 18 2001 Buchan Milne 2.2.1-1mdk +- Now use packaging/Mandrake/smb.conf, removed unused and obsolete + patches, moved netlogon and profile shares to /var/lib/samba in the + smb.conf to match the spec file. Added configuration for ntlogon to + smb.conf. Removed pam-foo, fixinit and makefilepath patches. Removed + symlink I introduced in 2.2.0-1mdk + +* Thu May 3 2001 Sylvestre Taburet 2.2.0-5mdk +- Added more configure options. Changed Description field (thx John T). + +* Wed Apr 25 2001 Sylvestre Taburet 2.2.0-4mdk +- moved netlogon and profiles to /var/lib/samba by popular demand ;o) + +* Tue Apr 24 2001 Sylvestre Taburet 2.2.0-3mdk +- moved netlogon and profiles back to /home. + +* Fri Apr 20 2001 Sylvestre Taburet 2.2.0-2mdk +- fixed post inetd/xinetd script& + +* Thu Apr 19 2001 Buchan Milne 2.2.0-1mdk +- Upgrade to 2.2.0. Merged most of 2.0.7-25mdk's patches (beware + nasty "ln -sf samba-%{ver} ../samba-2.0.7" hack to force some patches + to take. smbadduser and addtosmbpass seem to have disappeared. Moved + all Mandrake-specific files to packaging/Mandrake and made patches + from those shipped with samba. Moved netlogon to /home/samba and added + /home/samba/profiles. Added winbind,smbfilter and debug2html to make command. + +* Thu Apr 12 2001 Frederic Crozat 2.0.7-25mdk +- Fix menu entry and provide separate menu entry for GNOME + (nautilus doesn't support HTTP authentication yet) +- Add icons in package + +* Fri Mar 30 2001 Frederic Lepied 2.0.7-24mdk +- use new server macros + +* Wed Mar 21 2001 Sylvestre Taburet 2.0.7-23mdk +- check whether /etc/inetd.conf exists (upgrade) or not (fresh install). + +* Thu Mar 15 2001 Sylvestre Taburet 2.0.7-22mdk +- spec cosmetics, added '-r' option to lpr-cups command line so files are + removed from /var/spool/samba after printing. + +* Tue Mar 06 2001 Sylvestre Taburet 2.0.7-21mdk +- merged last rh patches. + +* Thu Nov 23 2000 Sylvestre Taburet 2.0.7-20mdk +- removed dependencies on cups and cups-devel so one can install samba without using cups +- added /home/netlogon + +* Mon Nov 20 2000 Till Kamppeter 2.0.7-19mdk +- Changed default print command in /etc/smb.conf, so that the Windows + driver of the printer has to be used on the client. +- Fixed bug in smbspool which prevented from printing from a + Linux-Samba-CUPS client to a Windows server through the guest account. + +* Mon Oct 16 2000 Till Kamppeter 2.0.7-18mdk +- Moved "smbspool" (Samba client of CUPS) to the samba-client package + +* Sat Oct 7 2000 Stefan van der Eijk 2.0.7-17mdk +- Added RedHat's "quota" patch to samba-glibc21.patch.bz2, this fixes + quota related compile problems on the alpha. + +* Wed Oct 4 2000 Sylvestre Taburet 2.0.7-16mdk +- Fixed 'guest ok = ok' flag in smb.conf + +* Tue Oct 3 2000 Sylvestre Taburet 2.0.7-15mdk +- Allowed guest account to print in smb.conf +- added swat icon in menu + +* Tue Oct 3 2000 Sylvestre Taburet 2.0.7-14mdk +- Removed rh ssl patch and --with-ssl flag: not appropriate for 7.2 + +* Tue Oct 3 2000 Sylvestre Taburet 2.0.7-13mdk +- Changed fixinit patch. +- Changed smb.conf for better CUPS configuration. +- Thanks Fred for doing this ---vvv. + +* Tue Oct 3 2000 Frederic Lepied 2.0.7-12mdk +- menu entry for web configuration tool. +- merge with rh: xinetd + ssl + pam_stack. +- Added smbadduser rh-bugfix w/o relocation of config-files. + +* Mon Oct 2 2000 Frederic Lepied 2.0.7-11mdk +- added build requires on cups-devel and pam-devel. + +* Mon Oct 2 2000 Till Kamppeter 2.0.7-10mdk +- Fixed smb.conf entry for CUPS: "printcap name = lpstat", "lpstats" was + wrong. + +* Mon Sep 25 2000 Sylvestre Taburet 2.0.7-9mdk +- Cosmetic changes to make rpmlint more happy + +* Wed Sep 11 2000 Sylvestre Taburet 2.0.7-8mdk +- added linkage to the using_samba book in swat + +* Fri Sep 01 2000 Sylvestre Taburet 2.0.7-7mdk +- Added CUPS support to smb.conf +- Added internationalization options to smb.conf [Global] + +* Wed Aug 30 2000 Till Kamppeter 2.0.7-6mdk +- Put "smbspool" to the files to install + +* Wed Aug 30 2000 Sylvestre Taburet 2.0.7-5mdk +- Did some cleaning in the patches + +* Fri Jul 28 2000 Sylvestre Taburet 2.0.7-4mdk +- relocated man pages from /usr/man to /usr/share/man for compatibility reasons + +* Fri Jul 28 2000 Sylvestre Taburet 2.0.7-3mdk +- added make_unicodemap and build of unicode_map.$i in the spec file + +* Fri Jul 28 2000 Sylvestre Taburet 2.0.7-2mdk +- renamed /etc/codepage/codepage.$i into /etc/codepage/unicode_map.$i to fix smbmount bug. + +* Fri Jul 07 2000 Sylvestre Taburet 2.0.7-1mdk +- 2.0.7 + +* Wed Apr 05 2000 Francis Galiegue 2.0.6-4mdk + +- Titi sucks, does not put versions in changelog +- Fixed groups for -common and -client +- /usr/sbin/samba is no config file + +* Thu Mar 23 2000 Thierry Vignaud +- fix buggy post install script (pixel) + +* Fri Mar 17 2000 Francis Galiegue 2.0.6-2mdk + +- Changed group according to 7.1 specs +- Some spec file changes +- Let spec-helper do its job + +* Thu Nov 25 1999 Chmouel Boudjnah +- 2.0.6. + +* Tue Nov 2 1999 Chmouel Boudjnah +- Merge with rh changes. +- Split in 3 packages. + +* Fri Aug 13 1999 Pablo Saratxaga +- corrected a bug with %post (the $1 parameter is "1" in case of + a first install, not "0". That parameter is the number of packages + of the same name that will exist after running all the steps if nothing + is removed; so it is "1" after first isntall, "2" for a second install + or an upgrade, and "0" for a removal) + +* Wed Jul 28 1999 Pablo Saratxaga +- made smbmnt and smbumount suid root, and only executable by group 'smb' + add to 'smb' group any user that should be allowed to mount/unmount + SMB shared directories + +* Fri Jul 23 1999 Chmouel Boudjnah +- 2.0.5a (bug security fix). + +* Wed Jul 21 1999 Axalon Bloodstone +- 2.0.5 +- cs/da/de/fi/fr/it/tr descriptions/summaries + +* Sun Jun 13 1999 Bernhard Rosenkränzer +- 2.0.4b +- recompile on a system that works ;) + +* Wed Apr 21 1999 Chmouel Boudjnah +- Mandrake adaptations. +- Bzip2 man-pages. + +* Fri Mar 26 1999 Bill Nottingham +- add a mount.smb to make smb mounting a little easier. +- smb filesystems apparently do not work on alpha. Oops. + +* Thu Mar 25 1999 Bill Nottingham +- always create codepages + +* Tue Mar 23 1999 Bill Nottingham +- logrotate changes + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 3) + +* Fri Mar 19 1999 Preston Brown +- updated init script to use graceful restart (not stop/start) + +* Tue Mar 9 1999 Bill Nottingham +- update to 2.0.3 + +* Thu Feb 18 1999 Bill Nottingham +- update to 2.0.2 + +* Mon Feb 15 1999 Bill Nottingham +- swat swat + +* Tue Feb 9 1999 Bill Nottingham +- fix bash2 breakage in post script + +* Fri Feb 5 1999 Bill Nottingham +- update to 2.0.0 + +* Mon Oct 12 1998 Cristian Gafton +- make sure all binaries are stripped + +* Thu Sep 17 1998 Jeff Johnson +- update to 1.9.18p10. +- fix %triggerpostun. +* Tue Jul 07 1998 Erik Troan +- updated postun triggerscript to check $0 +- clear /etc/codepages from %preun instead of %postun +* Mon Jun 08 1998 Erik Troan +- made the %postun script a tad less agressive; no reason to remove + the logs or lock file (after all, if the lock file is still there, + samba is still running) +- the %postun and %preun should only exectute if this is the final + removal +- migrated %triggerpostun from Red Hat's samba package to work around + packaging problems in some Red Hat samba releases +* Sun Apr 26 1998 John H Terpstra +- minor tidy up in preparation for release of 1.9.18p5 +- added findsmb utility from SGI package + +* Wed Mar 18 1998 John H Terpstra +- Updated version and codepage info. +- Release to test name resolve order + +* Sat Jan 24 1998 John H Terpstra +- Many optimisations (some suggested by Manoj Kasichainula +- Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb +- Compounded make line +- Updated smb.init restart mechanism +- Use compound mkdir -p line instead of individual calls to mkdir +- Fixed smb.conf file path for log files +- Fixed smb.conf file path for incoming smb print spool directory +- Added a number of options to smb.conf file +- Added smbadduser command (missed from all previous RPMs) - Doooh! +- Added smbuser file and smb.conf file updates for username map -- cgit From e14fb2de48d350f291b471b94b62a1c3b3aeb0f9 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:23:33 +0000 Subject: Updated for build of release version of samba only. --- packaging/Mandrake/makerpms.sh.tmpl | 69 ++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl index ea27915c6cc..dd7923039c2 100644 --- a/packaging/Mandrake/makerpms.sh.tmpl +++ b/packaging/Mandrake/makerpms.sh.tmpl @@ -1,17 +1,68 @@ #!/bin/sh -# Copyright (C) 1998 John H Terpstra, 1999 K Spoon +#!/bin/sh +# Copyright (C) John H Terpstra 1998-2002 +# Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de +# Changed for a generic tar file rebuild by abartlet@pcug.org.au +# Taken from Red Hat build area by JHT +# Changed by John H Terpstra to build on RH8.1 - should also work for earlier versions jht@samba.org + +# The following allows environment variables to override the target directories +# the alternative is to have a file in your home directory calles .rpmmacros +# containing the following: +# %_topdir /home/mylogin/RPM +# +# Note: Under this directory rpm expects to find the same directories that are under the +# /usr/src/redhat directory # -SPECDIR=/usr/src/RPM/SPECS -SRCDIR=/usr/src/RPM/SOURCES +if [ -x ~/.rpmmacros ]; then + TOPDIR=`awk '/topdir/ {print $2}' < ~/.rpmmacros` + if [ z$TOPDIR <> "z" ]; then + SPECDIR=${TOPDIR}/SPECS + SRCDIR=${TOPDIR}/SOURCES + fi +fi + +SPECDIR=${SPECDIR:-/usr/src/RPM/SPECS} +SRCDIR=${SRCDIR:-/usr/src/RPM/SOURCES} + +# At this point the SPECDIR and SRCDIR vaiables must have a value! + USERID=`id -u` GRPID=`id -g` VERSION='PVERSION' -( cd ../../.. ; mv samba samba-$VERSION; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-$VERSION ) -( cd ../../.. ; tar --exclude=CVS -cvf ${SRCDIR}/samba-$VERSION.tar samba-$VERSION ) +RPMVER=`rpm --version | awk '{print $3}'` +echo The RPM Version on this machine is: $RPMVER + +case $RPMVER in + 2*) + echo Building for RPM v2.x + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec + ;; + 3*) + echo Building for RPM v3.x + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec + ;; + 4*) + echo Building for RPM v4.x + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba.spec + ;; + *) + echo "Unknown RPM version: `rpm --version`" + exit 1 + ;; +esac + +( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) +( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) +( cd ../../.. ; tar --exclude=CVS -cvf ${SRCDIR}/samba-${VERSION}.tar.gz samba-${VERSION} ) ( cd ${SRCDIR}; bzip2 samba-$VERSION.tar ) -( cd ../../.. ; mv samba-$VERSION samba ) -cp -a *.spec $SPECDIR + +cp -av samba.spec ${SPECDIR} cp -a *.patch smb.* samba.log $SRCDIR -cd $SPECDIR -rpm -ba -v samba2.spec + +echo Getting Ready to build release package +cd ${SPECDIR} +rpm -ba -v --clean --rmsource samba.spec + +echo Done. -- cgit From a468ccf2b2a8f0b86a2c57e7b3036ee58949d50c Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:29:17 +0000 Subject: Updating patches and adding smbadduser back to build. --- packaging/Caldera/OpenLinux/kanji-makefile.patch | 11 + packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl | 2 +- packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl | 519 +++++++++++++++++++++ packaging/Caldera/OpenLinux/samba2.spec-team.tmpl | 520 ++++++++++++++++++++++ packaging/Caldera/OpenLinux/samba2.spec.tmpl | 2 +- packaging/Caldera/OpenLinux/smbadduser | 76 ++++ 6 files changed, 1128 insertions(+), 2 deletions(-) create mode 100644 packaging/Caldera/OpenLinux/kanji-makefile.patch create mode 100644 packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl create mode 100644 packaging/Caldera/OpenLinux/samba2.spec-team.tmpl create mode 100755 packaging/Caldera/OpenLinux/smbadduser diff --git a/packaging/Caldera/OpenLinux/kanji-makefile.patch b/packaging/Caldera/OpenLinux/kanji-makefile.patch new file mode 100644 index 00000000000..b0b39777c92 --- /dev/null +++ b/packaging/Caldera/OpenLinux/kanji-makefile.patch @@ -0,0 +1,11 @@ +--- source/Makefile.orig Tue Jan 15 23:14:29 2002 ++++ source/Makefile Tue Jan 15 23:12:13 2002 +@@ -12,7 +12,7 @@ + LIBS=-lcups -ldl -lnsl -lpam + CC=gcc + SHLD=${CC} +-CFLAGS=-O -O2 -m486 -fno-strength-reduce ++CFLAGS=-O -O2 -m486 -fno-strength-reduce -DKANJI=\"sjis\" + CPPFLAGS=-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + LDFLAGS=-s + AWK=mawk diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl index 13c432882cf..737f91aefcd 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl @@ -343,7 +343,7 @@ cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf cp -p $VVS/smbusers $DESTDIR%{EtcSamba} cp -p $VVS/smbprint $DESTDIR/usr/bin -cp -p $VVS/smbadduser.perl $DESTDIR/usr/bin/smbadduser +cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser #cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/bin/make_smbpasswd #cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd #cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd diff --git a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl new file mode 100644 index 00000000000..756633e9310 --- /dev/null +++ b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl @@ -0,0 +1,519 @@ +%define Version PVERSION +%define date PRELEASE +%define Vendor Caldera +%define Dist OpenLinux +%define EtcSamba /etc/samba.d +%define LSBservedir /srv/samba + +Name : samba +Version : %{Version} +Release : %{date} +Group : Server/Network + +Summary : Samba SMB client and server. +Summary(de) : Samba SMB Client und Server. +Summary(es) : Cliente y servidor SMB Samba. +Summary(fr) : Client et serveur SMB Samba. +Summary(it) : Client e server SMB. +Summary(pt) : Cliente e servidor SMB Samba. + +Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2 +Packager : Klaus Singvogel +#Icon : Caldera-daemon.gif +URL : http://samba.org/samba + +Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6 + + +BuildRoot : /tmp/%{Name}-%{Version} + +Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz +#Patch0: %{Name}-%{Version}-smbmount.patch +#Patch1: %{Name}-%{Version}-install.patch +#Patch2: %{Name}-%{Version}-smbconf.patch +#Patch6: %{Name}-2.2.2-libsmbclient.patch + +%Package doc +Group : Server/Network + +Summary : Documentation on SAMBA. +Summary(de) : Die Dokumentation für Samba. +Summary(es) : Documentation de SAMBA. +Summary(fr) : Documentation pour Samba. +Summary(it) : Documentazione su SAMBA. +Summary(pt) : Documentação sobre o SAMBA. + +%Package -n smbfs +Group : System/Network + +Summary : Mount and unmount commands for SMB filesystems (smbfs). +Summary(de) : Mount und unmount für SMB-Dateisysteme (smbfs). +Summary(es) : Comandos de montaje y desmontaje de sistemas de ficheros SMB (smbfs). +Summary(fr) : Commandes pour le montage et le démontage des systèmes de fichiers SMB (smbfs). +Summary(it) : Comandi per montare e smontare i file system SMB (smbfs). +Summary(pt) : Comandos mount e unmount para o sistema de ficheiros SMB (smbfs). + +%Package -n swat +Group : Administration/Network +Requires : setup >= 2.0-2, tcp_wrappers, netkit-base >= 0.17-5 + +Summary : Samba Web Administration Tool. +Summary(de) : Das Samba Web Administrationstool. +Summary(es) : Utilidad de administración Samba. +Summary(fr) : Outil d'administration Internet pour Samba. +Summary(it) : Strumento per l'amministrazione di Samba via Web. +Summary(pt) : Ferramenta Web de administração de Samba (Samba Web Administration Tool). + +%Package -n libsmbclient +Group : System/Network + +Summary : SMB Client Library + +%Description +Samba provides an SMB server which can be used to provide network +services to SMB (sometimes called "Lan Manager") clients, including +various versions of MS Windows, OS/2, and other Linux machines. + +%Description -l de +Samba stellt einen SMB Server zur Verfügung, mit dem Netzwerkdienste für SMB +(auch "Lan Manager" genannt) Clients bereitgestellt werden können. Dies +schließt verschiedene Versionen von MS Windows, OS/2 und andere Linux +Maschinen ein. + +%Description -l es +Samba dispone de un servidor SMB que puede utilizarse para proporcionar +servicios de red a clientes SMB (a veces conocido como "Lan Manager"), +incluyendo varias versiones de MS Windows, OS/2 y otras máquinas Linux. + +%Description -l fr +Samba fournit un serveur SMB qui peut être utilisé pour fournir des services +de réseau aux clients SMB (parfois appelés "Lan Manager"), comportant +diverses versions de MS Windows, OS/2 et d'autres machines Linux. + +%Description -l it +Samba fornisce un server SMB che può essere usato per fornire servizi +di rete a client SMB (talvolta chiamato "Lan Manager"), comprese varie +versioni di MS Windows, OS/2 e altre macchine Linux. + +%Description -l pt +O Samba fornece um servidor de SMB que pode ser usado para fornecer serviços de +rede aos clientes de SMB (denominado por vezes como "Lan Manager"), incluindo +várias versões do Windows, OS/2 e outras máquinas Linux. + +%Description doc +This package contains extensive SAMBA documentation, including a FAQ, +comprehensive usage documentation, and a number of examples. + +%Description -l de doc +Dieses Paket enthält eine ausführliche SAMBA Dokumentation, inklusive +einer FAQ, umfassender Gebrauchsdokumentation und einer Reihe von +Beispielen. + +%Description -l es doc +Este paquete contiene una extensa documentación sobre SAMBA, incluyendo +FAQ (Preguntas de Uso Frecuente), documentación sobre el uso y algunos +ejemplos. + +%Description -l fr doc +Ce paquetage contient une documentation complète sur Samba, y compris +une FAQ détaillée de son utilisation et un certain nombre d'exemples. + +%Description -l it doc +Questo pacchetto contiene la documentazione su SAMBA tra cui una FAQ +una esaustiva documentazione d'uso e un certo numero di esempi. + +%Description -l pt doc +Este pacote contém alguma documentação extensa sobre o SAMBA, incluindo a FAQ, +alguma documentação compreensiva sobre a utilização e alguns exemplos. + +%Description -n smbfs +This package includes the tools necessary to mount filesystems from +SMB servers. + +%Description -l de -n smbfs +Dieses Paket enthält die nötigen Tools, um Dateisysteme von SMB-Servern +zu mounten. + +%Description -l es -n smbfs +este paqeute incluye las herramientas necesarias para montar sistemas de +ficheros de servidores SMB. + +%Description -l fr -n smbfs +Ce paquetage contient les outils nécessaires pour monter des systèmes +de fichiers sur des serveurs SMB. + +%Description -l it -n smbfs +Questo pacchetto contiene gli strumenti necessari per montare filesystem +da server SMB. + +%Description -l pt -n smbfs +Este pacote contém as ferramentas necessárias para montar sistema de +ficheiros de servidores SMB. + +%Description -n swat +SWAT allows a Samba administrator to configure the complex smb.conf +file via a Web browser. It also provides links to all the configurable +options in the smb.conf file allowing an administrator to easily look +up the effects of any change. + +%Description -l de -n swat +Mit SWAT kann ein Samba-Administrator die komplexe smb.conf +Datei mit Hilfe eines Web-Browsers konfigurieren. Es stellt auch Links zu +allen konfigurierbaren Optionen in der smb.conf Datei bereit, wodurch ein +Administrator die Auswirkungen einer Änderung leicht nachvollziehen kann. + +%Description -l es -n swat +SWAT permite a un administrador de Samba configurar el complejo fichero +smb.conf mediante una navegador web. También proporciona enlaces a todas las +opciones configurables en el fichero smb.conf, permitiendo al administrador +comprobar fácilmente los efectos de cualquier cambio. + +%Description -l fr -n swat +SWAT permet à un administrateur Samba de configurer le fichier smb.conf +complexe via un navigateur Web. Il fournit également des liens d'aide pour +toutes les options configurables dans le fichier smb.conf permettant à un +administrateur de consulter aisément les effets d'une modification. + +%Description -l it -n swat +SWAT permette ad un amministratore Samba di configurare il complesso file +smb.conf attraverso un browser Web. SWAT ha anche dei link di aiuto per +tutte le opzioni di configurazione del file smb.conf. + +%Description -l pt -n swat +O SWAT permite a um administrador de Samba configurar o complexo ficheiro +smb.conf através de uma interface Web. Fornece também referências para +todas as opções configuraveis no smb.conf, permitindo a um admnistrador +verificar rapidamente o efeite de qualquer alteração. + +%Description -n libsmbclient +SMB Client Library allows for POSIX like SMB client calls providing developers +a clean and stable API for SMB client application development. + +%Prep +%setup +#%patch0 -p1 +#%patch1 -p1 +#%patch2 -p1 + +# instead of patch (to help configuration) ... ;^) +%{fixUP} -vbT source/Makefile.in -e ' + s:we don.t use sbindir because we want:if you want : + + s:(the previous releases of Samba):$1, please use: + + s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: + + s:/log\.(\S+):/log/samba.d/${1}d: + + s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2: +' +for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done + +mv swat/help/welcome.html docs +%{fixUP} -vT docs -e ' + s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g + + s:/usr/local/samba/bin/((s|n)mbd|swat|smbstatus):/usr/sbin/$1:g + + s:/usr/local/samba/var/locks:/var/lock/samba.d: + + s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: + + s:/usr/local/samba/swat:/usr/share/samba/swat:g + + s:/usr/local/samba/lib:%{EtcSamba}:g + + s:/usr/local/samba/printers:/var/spool/samba:g + + s:/usr/local/samba/private/smbpasswd:/usr/bin/smbpasswd:g + + s:/usr/local/samba/netlogon:%{LSBservedir}/netlogon:g; +' +mv docs/welcome.html swat/help +for i in docs/*/smb.conf.5*; do + %{fixUP} -vT $i -e ' + s:users\.map:smbusers:g + + s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: + + s:None \(set in compile\)\.:(see above).: + + s:/usr/local/:/usr/:g; + ' +done +%{fixUP} -vT docs/textdocs/Faxing.txt -e ' + s:/usr/local/etc/:/etc/: + + s:/usr/local/:/usr/:; +' +# ENCRYPTION.txt is gone. +%{fixUP} -vT docs/docbook/projdoc/ENCRYPTION.sgml -e ' + s:/usr/local/samba/private:%{EtcSamba}:g + + s:mksmbpasswd.sh:mksmbpasswd:g + + s:the Samba source directory:/usr/bin:; +' + +%{fixUP} -vT docs/htmldocs/make_smbcodepage.1.html -e ' + s:/usr/local/samba:/usr/bin/:g; +' +for i in htmldocs/DOMAIN_MEMBER.html htmldocs/Samba-HOWTO-Collection.html \ + htmldocs/smbclient.1.html htmldocs/smbd.8.html \ + docbook/projdoc/DOMAIN_MEMBER.sgml docbook/projdoc/DOMAIN_MEMBER.sgml \ + docbook/manpages/smbclient.1.sgml docbook/manpages/smbd.8.sgml \ + docbook/projdoc/ENCRYPTION.sgml manpages/smbclient.1 manpages/smbd.8 ; do +%{fixUP} -vT docs/$i -e ' + s:/usr/local/samba/private/FOREST.SLEEPY.SID:/var/lock/samba.d/FOREST.SLEEPY.SID: + + s:/usr/local/samba/private:/usr/bin:g + + s:/usr/local/samba/bin:/usr/bin:g + + s:/usr/local/sbin:/usr/sbin:g + + s:/usr/local/src/samba:/usr/src/samba:g ;' +done +%{fixUP} -vT docs/docbook/manpages/make_smbcodepage.1.sgml -e ' + s:/usr/local/samba:/usr/bin:g ; +' +# End of DirtyHack(TM) + + +%Build +cd source +rm -f configure +autoconf + +CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ + --with-fhs \ + --prefix='$(DESTDIR)/usr' \ + --localstatedir='$(DESTDIR)/var' \ + --libdir='$(DESTDIR)%{EtcSamba}' \ + --with-privatedir='$(LIBDIR)' \ + --with-lockdir='$(DESTDIR)/var/lock/samba.d' \ + --with-swatdir='$(DESTDIR)/usr/share/swat' \ + --with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \ + --with-configdir='$(DESTDIR)'%{EtcSamba} \ + --with-codepagedir='$(DESTDIR)'/usr/share/samba/codepages \ + --with-smbwrapper \ + --with-libsmbclient \ + --with-smbmount \ + --with-automount \ + --with-pam \ + --with-pam_smbpass \ + --with-quotas \ + --with-utmp \ + --with-winbind \ + --with-syslog \ + --with-vfs \ + --with-msdfs \ + --with-tdbsam + +make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so + + +%Install +%{mkDESTDIR} +VVS=packaging/%{Vendor}/%{Dist} + +mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons} +mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba} +mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs} +mkdir -p $DESTDIR/lib/security +mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public} +mkdir -p $DESTDIR/etc/skel/Samba +mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin +mkdir -p $DESTDIR/%{SVIdir} +mkdir -p $DESTDIR/usr/{include,lib} + +make LOGFILEBASE=/var/log/samba.d -C source install + +strip $DESTDIR/usr/bin/smb{mnt,umount} +#mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/bin + +cp -p source/codepages/codepage_def.??? $DESTDIR/usr/share/samba/codepages/src + +# Install the nsswitch library extension file +install -m 755 source/nsswitch/libnss_wins.so $DESTDIR/lib/libnss_wins.so.2.0 +# Make link for wins resolver +ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so.2 +ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so + +# Add PAM smbpass and winbind facilities +install -m 755 source/bin/pam_smbpass.so $DESTDIR/lib/security +install -m 755 source/nsswitch/libnss_winbind.so $DESTDIR/lib/libnss_winbind.so.2.0 + +# Make link for winbind resolver +ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2 +ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so + +install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security +install -m 755 source/bin/wbinfo $DESTDIR/usr/bin +install -m 755 source/bin/debug2html $DESTDIR/usr/sbin/debug2html + +install -m 755 source/bin/libsmbclient.so $DESTDIR/usr/lib +install -m 755 source/bin/libsmbclient.a $DESTDIR/usr/lib +ln -s libsmbclient.so $DESTDIR/usr/lib/libsmbclient.so.0 +ln -s libsmbclient.so $DESTDIR/usr/lib/libsmbclient.so.0.1 +install -m 644 source/include/libsmbclient.h $DESTDIR/usr/include + +# Adding extra stuff +install -m 755 source/bin/smbfilter $DESTDIR/usr/bin +install -m 755 source/bin/smbsh $DESTDIR/usr/bin +install -m 755 source/bin/smbwrapper.so $DESTDIR/usr/bin +install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin + +cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample +cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf +cp -p $VVS/smbusers $DESTDIR%{EtcSamba} +cp -p $VVS/smbprint $DESTDIR/usr/bin +cp -p $VVS/findsmb $DESTDIR/usr/bin +cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba +cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba +cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt +cp -p $VVS/README.Public $DESTDIR/%{LSBservedir}/Public/README.txt +cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt + + +install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name} +#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba +ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin + + +for f in testparm testprns; do + ln -s $f $DESTDIR/usr/bin/smb$f + ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1 +done + +ln -s ../usr/bin/smbmount $DESTDIR/sbin/mount.smbfs + +cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts + 127.0.0.1 localhost +EoH + +# lsb has new way of inetd configuration +mkdir -p $DESTDIR%{NKinetdir} +cat <$DESTDIR%{NKinetdir}/swat +swat stream tcp nowait.400 root /usr/sbin/tcpd swat +EoI + +pushd $DESTDIR/usr/sbin +rm -f *.so +popd + +# -------------------- Documentation ------------------------------- +DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD +ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING + +cp -p README Manifest Read-Manifest-Now $DOCD +cp -p WHATSNEW.txt Roadmap $DOCD +cp -a docs examples $DOCD + +mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html + +rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs} +rm -rf $DOCD/examples/{svr4-startup,printing} +rm -rf $DOCD/CVS $DOCD/*/CVS $DOCD/*/*/CVS $DOCD/*/*/*/CVS + +cp -p swat/README $DOCD/README.swat + +# This is the O'Reily Samba Book - on-line +for i in docs/htmldocs/using_samba/*.html +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba +done +for i in docs/htmldocs/using_samba/figs/*.gif +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba/figs +done +for i in docs/htmldocs/using_samba/gifs/*.gif +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba/gifs +done + +# -------------------- Fixing final pathes ------------------------------- + +%{fixUP} -T $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}:' +%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;' +%{fixUP} -vT $DESTDIR/%{EtcSamba} -e 's:\@samba_home\@:%{LSBservedir}:' + +%{fixManPages} + +%{mkLists} -c samba +cat << 'EOF' | %{mkLists} -d samba +Samba base +/lib/$ base +%{LSBservedir} config-IGNORED +^/(etc|var|home|tmp) config-IGNORED +swat swat +%{_defaultdocdir}/samba-[^/]+/$ base +%{_defaultdocdir}/samba- doc +tmp IGNORED +man IGNORED +/src/$ IGNORED +/usr/private/$ IGNORED +@default@ +EOF +cat << 'EOF' | %{mkLists} -f -a samba +\.old$ IGNORED +Samba/README.txt base +^/etc config-IGNORED +%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base +libnss_* base +pam_* base +%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base +%{_defaultdocdir}/samba- doc +smb(mount|mnt|umount) smbfs +mount.smbfs smbfs +swat swat +libsmbclient libsmbclient +@default@ +EOF + +%Clean + +%Post +/usr/lib/LSB/init-install %{Name} + +%Post -n swat +%{NKinetdReload} +perl -pi -e '$s=1 if /^swat/; + print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny + +%PostUn +test "$1" = "0" || exit 0 +/usr/lib/LSB/init-remove %{Name} +# We want to remove the browse.dat and wins.dat files so they can not +# interfer with a new version of samba! +rm -f /var/lock/samba/browse.dat +rm -f /var/lock/samba/{brlock,connections,locking,messages}.tdb +if [ -e /var/lock/samba.d/namelist.debug ]; then + rm -f /var/lock/samba.d/namelist.debug +fi +rm -f /var/lock/samba/unexpected.tdb +rm -f /var/lock/samba/{smbd,nmbd}.pid + +# Note: We MUST keep: +# winbindd_*, sshare_info*, printing*, ntdrivers* + +%PostUn -n swat +#$no lsb: lisa --inetd disable swat $1 +test "$1" = "0" || exit 0 +%{SVIdir}/inet reload +[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny + + +%Files -f files-samba-base +%defattr(-,root,root) +%config %attr(0755,root,root) %{SVIdir}/samba +%config %attr(644,root,root) /etc/sysconfig/daemons/samba +%config %attr(644,root,root) /etc/pam.d/samba +%config %attr(644,root,root) /etc/logrotate.d/samba +%config %attr(-,root,root) %{EtcSamba} +%dir %attr(755,root,root) /var/lock/samba.d +%dir %attr(755,root,root) /var/log/samba.d +%dir %attr(1777,root,root) /var/spool/samba +%dir %attr(755,root,root) %{LSBservedir} +%dir %attr(755,root,root) %{LSBservedir}/netlogon +%dir %attr(755,root,root) %{LSBservedir}/profiles +%dir %attr(755,root,root) %{LSBservedir}/Public + + +%Files doc -f files-samba-doc +%defattr(-,root,root) + + +%Files -n smbfs -f files-samba-smbfs +%defattr(-,root,root) + + +%Files -n swat -f files-samba-swat +%defattr(-,root,root) +%config %attr(644,root,root) %{NKinetdir}/swat + +%Files -n libsmbclient -f files-samba-libsmbclient +%defattr(-,root,root) + +%ChangeLog +* Mon Jan 01 1997 ... + - nothing here for now diff --git a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl new file mode 100644 index 00000000000..ef9564ceef2 --- /dev/null +++ b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl @@ -0,0 +1,520 @@ +%define Version PVERSION +%define date PRELEASE +%define Vendor Caldera +%define Dist OpenLinux +%define EtcSamba /etc/samba.d +%define LSBservedir /srv/samba + +Name : samba +Version : %{Version} +Release : %{date} +Group : Server/Network + +Summary : Samba SMB client and server. +Summary(de) : Samba SMB Client und Server. +Summary(es) : Cliente y servidor SMB Samba. +Summary(fr) : Client et serveur SMB Samba. +Summary(it) : Client e server SMB. +Summary(pt) : Cliente e servidor SMB Samba. + +Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2 +Packager : Klaus Singvogel +#Icon : Caldera-daemon.gif +URL : http://samba.org/samba + +Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6 + + +BuildRoot : /tmp/%{Name}-%{Version} + +Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz +#Patch0: %{Name}-%{Version}-smbmount.patch +#Patch1: %{Name}-%{Version}-install.patch +#Patch2: %{Name}-%{Version}-smbconf.patch +#Patch6: %{Name}-2.2.2-libsmbclient.patch +Patch7: kanji-makefile.patch + +%Package doc +Group : Server/Network + +Summary : Documentation on SAMBA. +Summary(de) : Die Dokumentation für Samba. +Summary(es) : Documentation de SAMBA. +Summary(fr) : Documentation pour Samba. +Summary(it) : Documentazione su SAMBA. +Summary(pt) : Documentação sobre o SAMBA. + +%Package -n smbfs +Group : System/Network + +Summary : Mount and unmount commands for SMB filesystems (smbfs). +Summary(de) : Mount und unmount für SMB-Dateisysteme (smbfs). +Summary(es) : Comandos de montaje y desmontaje de sistemas de ficheros SMB (smbfs). +Summary(fr) : Commandes pour le montage et le démontage des systèmes de fichiers SMB (smbfs). +Summary(it) : Comandi per montare e smontare i file system SMB (smbfs). +Summary(pt) : Comandos mount e unmount para o sistema de ficheiros SMB (smbfs). + +%Package -n swat +Group : Administration/Network +Requires : setup >= 2.0-2, tcp_wrappers, netkit-base >= 0.17-5 + +Summary : Samba Web Administration Tool. +Summary(de) : Das Samba Web Administrationstool. +Summary(es) : Utilidad de administración Samba. +Summary(fr) : Outil d'administration Internet pour Samba. +Summary(it) : Strumento per l'amministrazione di Samba via Web. +Summary(pt) : Ferramenta Web de administração de Samba (Samba Web Administration Tool). + +%Package -n libsmbclient +Group : System/Network + +Summary : SMB Client Library + +%Description +Samba provides an SMB server which can be used to provide network +services to SMB (sometimes called "Lan Manager") clients, including +various versions of MS Windows, OS/2, and other Linux machines. + +%Description -l de +Samba stellt einen SMB Server zur Verfügung, mit dem Netzwerkdienste für SMB +(auch "Lan Manager" genannt) Clients bereitgestellt werden können. Dies +schließt verschiedene Versionen von MS Windows, OS/2 und andere Linux +Maschinen ein. + +%Description -l es +Samba dispone de un servidor SMB que puede utilizarse para proporcionar +servicios de red a clientes SMB (a veces conocido como "Lan Manager"), +incluyendo varias versiones de MS Windows, OS/2 y otras máquinas Linux. + +%Description -l fr +Samba fournit un serveur SMB qui peut être utilisé pour fournir des services +de réseau aux clients SMB (parfois appelés "Lan Manager"), comportant +diverses versions de MS Windows, OS/2 et d'autres machines Linux. + +%Description -l it +Samba fornisce un server SMB che può essere usato per fornire servizi +di rete a client SMB (talvolta chiamato "Lan Manager"), comprese varie +versioni di MS Windows, OS/2 e altre macchine Linux. + +%Description -l pt +O Samba fornece um servidor de SMB que pode ser usado para fornecer serviços de +rede aos clientes de SMB (denominado por vezes como "Lan Manager"), incluindo +várias versões do Windows, OS/2 e outras máquinas Linux. + +%Description doc +This package contains extensive SAMBA documentation, including a FAQ, +comprehensive usage documentation, and a number of examples. + +%Description -l de doc +Dieses Paket enthält eine ausführliche SAMBA Dokumentation, inklusive +einer FAQ, umfassender Gebrauchsdokumentation und einer Reihe von +Beispielen. + +%Description -l es doc +Este paquete contiene una extensa documentación sobre SAMBA, incluyendo +FAQ (Preguntas de Uso Frecuente), documentación sobre el uso y algunos +ejemplos. + +%Description -l fr doc +Ce paquetage contient une documentation complète sur Samba, y compris +une FAQ détaillée de son utilisation et un certain nombre d'exemples. + +%Description -l it doc +Questo pacchetto contiene la documentazione su SAMBA tra cui una FAQ +una esaustiva documentazione d'uso e un certo numero di esempi. + +%Description -l pt doc +Este pacote contém alguma documentação extensa sobre o SAMBA, incluindo a FAQ, +alguma documentação compreensiva sobre a utilização e alguns exemplos. + +%Description -n smbfs +This package includes the tools necessary to mount filesystems from +SMB servers. + +%Description -l de -n smbfs +Dieses Paket enthält die nötigen Tools, um Dateisysteme von SMB-Servern +zu mounten. + +%Description -l es -n smbfs +este paqeute incluye las herramientas necesarias para montar sistemas de +ficheros de servidores SMB. + +%Description -l fr -n smbfs +Ce paquetage contient les outils nécessaires pour monter des systèmes +de fichiers sur des serveurs SMB. + +%Description -l it -n smbfs +Questo pacchetto contiene gli strumenti necessari per montare filesystem +da server SMB. + +%Description -l pt -n smbfs +Este pacote contém as ferramentas necessárias para montar sistema de +ficheiros de servidores SMB. + +%Description -n swat +SWAT allows a Samba administrator to configure the complex smb.conf +file via a Web browser. It also provides links to all the configurable +options in the smb.conf file allowing an administrator to easily look +up the effects of any change. + +%Description -l de -n swat +Mit SWAT kann ein Samba-Administrator die komplexe smb.conf +Datei mit Hilfe eines Web-Browsers konfigurieren. Es stellt auch Links zu +allen konfigurierbaren Optionen in der smb.conf Datei bereit, wodurch ein +Administrator die Auswirkungen einer Änderung leicht nachvollziehen kann. + +%Description -l es -n swat +SWAT permite a un administrador de Samba configurar el complejo fichero +smb.conf mediante una navegador web. También proporciona enlaces a todas las +opciones configurables en el fichero smb.conf, permitiendo al administrador +comprobar fácilmente los efectos de cualquier cambio. + +%Description -l fr -n swat +SWAT permet à un administrateur Samba de configurer le fichier smb.conf +complexe via un navigateur Web. Il fournit également des liens d'aide pour +toutes les options configurables dans le fichier smb.conf permettant à un +administrateur de consulter aisément les effets d'une modification. + +%Description -l it -n swat +SWAT permette ad un amministratore Samba di configurare il complesso file +smb.conf attraverso un browser Web. SWAT ha anche dei link di aiuto per +tutte le opzioni di configurazione del file smb.conf. + +%Description -l pt -n swat +O SWAT permite a um administrador de Samba configurar o complexo ficheiro +smb.conf através de uma interface Web. Fornece também referências para +todas as opções configuraveis no smb.conf, permitindo a um admnistrador +verificar rapidamente o efeite de qualquer alteração. + +%Description -n libsmbclient +SMB Client Library allows for POSIX like SMB client calls providing developers +a clean and stable API for SMB client application development. + +%Prep +%setup +#%patch0 -p1 +#%patch1 -p1 +#%patch2 -p1 + +# instead of patch (to help configuration) ... ;^) +%{fixUP} -vbT source/Makefile.in -e ' + s:we don.t use sbindir because we want:if you want : + + s:(the previous releases of Samba):$1, please use: + + s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: + + s:/log\.(\S+):/log/samba.d/${1}d: + + s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2: +' +for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done + +mv swat/help/welcome.html docs +%{fixUP} -vT docs -e ' + s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g + + s:/usr/local/samba/bin/((s|n)mbd|swat|smbstatus):/usr/sbin/$1:g + + s:/usr/local/samba/var/locks:/var/lock/samba.d: + + s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: + + s:/usr/local/samba/swat:/usr/share/samba/swat:g + + s:/usr/local/samba/lib:%{EtcSamba}:g + + s:/usr/local/samba/printers:/var/spool/samba:g + + s:/usr/local/samba/private/smbpasswd:/usr/bin/smbpasswd:g + + s:/usr/local/samba/netlogon:%{LSBservedir}/netlogon:g; +' +mv docs/welcome.html swat/help +for i in docs/*/smb.conf.5*; do + %{fixUP} -vT $i -e ' + s:users\.map:smbusers:g + + s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: + + s:None \(set in compile\)\.:(see above).: + + s:/usr/local/:/usr/:g; + ' +done +%{fixUP} -vT docs/textdocs/Faxing.txt -e ' + s:/usr/local/etc/:/etc/: + + s:/usr/local/:/usr/:; +' +# ENCRYPTION.txt is gone. +%{fixUP} -vT docs/docbook/projdoc/ENCRYPTION.sgml -e ' + s:/usr/local/samba/private:%{EtcSamba}:g + + s:mksmbpasswd.sh:mksmbpasswd:g + + s:the Samba source directory:/usr/bin:; +' + +%{fixUP} -vT docs/htmldocs/make_smbcodepage.1.html -e ' + s:/usr/local/samba:/usr/bin/:g; +' +for i in htmldocs/DOMAIN_MEMBER.html htmldocs/Samba-HOWTO-Collection.html \ + htmldocs/smbclient.1.html htmldocs/smbd.8.html \ + docbook/projdoc/DOMAIN_MEMBER.sgml docbook/projdoc/DOMAIN_MEMBER.sgml \ + docbook/manpages/smbclient.1.sgml docbook/manpages/smbd.8.sgml \ + docbook/projdoc/ENCRYPTION.sgml manpages/smbclient.1 manpages/smbd.8 ; do +%{fixUP} -vT docs/$i -e ' + s:/usr/local/samba/private/FOREST.SLEEPY.SID:/var/lock/samba.d/FOREST.SLEEPY.SID: + + s:/usr/local/samba/private:/usr/bin:g + + s:/usr/local/samba/bin:/usr/bin:g + + s:/usr/local/sbin:/usr/sbin:g + + s:/usr/local/src/samba:/usr/src/samba:g ;' +done +%{fixUP} -vT docs/docbook/manpages/make_smbcodepage.1.sgml -e ' + s:/usr/local/samba:/usr/bin:g ; +' +# End of DirtyHack(TM) + + +%Build +cd source +rm -f configure +autoconf + +CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ + --with-fhs \ + --prefix='$(DESTDIR)/usr' \ + --localstatedir='$(DESTDIR)/var' \ + --libdir='$(DESTDIR)%{EtcSamba}' \ + --with-privatedir='$(LIBDIR)' \ + --with-lockdir='$(DESTDIR)/var/lock/samba.d' \ + --with-swatdir='$(DESTDIR)/usr/share/swat' \ + --with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \ + --with-configdir='$(DESTDIR)'%{EtcSamba} \ + --with-codepagedir='$(DESTDIR)'/usr/share/samba/codepages \ + --with-smbwrapper \ + --with-libsmbclient \ + --with-smbmount \ + --with-pam \ + --with-pam_smbpass \ + --with-quotas \ + --with-utmp \ + --with-winbind \ + --with-syslog +# --with-tdbsam + +#%patch7 -p1 + +make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so + + +%Install +%{mkDESTDIR} +VVS=packaging/%{Vendor}/%{Dist} + +mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons} +mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba} +mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs} +mkdir -p $DESTDIR/lib/security +mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public} +mkdir -p $DESTDIR/etc/skel/Samba +mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin +mkdir -p $DESTDIR/%{SVIdir} +mkdir -p $DESTDIR/usr/{include,lib} + +make LOGFILEBASE=/var/log/samba.d -C source install + +strip $DESTDIR/usr/bin/smb{mnt,umount} +#mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/bin + +cp -p source/codepages/codepage_def.??? $DESTDIR/usr/share/samba/codepages/src + +# Install the nsswitch library extension file +install -m 755 source/nsswitch/libnss_wins.so $DESTDIR/lib/libnss_wins.so.2.0 +# Make link for wins resolver +ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so.2 +ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so + +# Add PAM smbpass and winbind facilities +install -m 755 source/bin/pam_smbpass.so $DESTDIR/lib/security +install -m 755 source/nsswitch/libnss_winbind.so $DESTDIR/lib/libnss_winbind.so.2.0 + +# Make link for winbind resolver +ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2 +ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so + +install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security +install -m 755 source/bin/wbinfo $DESTDIR/usr/bin +install -m 755 source/bin/debug2html $DESTDIR/usr/sbin/debug2html + +install -m 755 source/bin/libsmbclient.so $DESTDIR/usr/lib +install -m 755 source/bin/libsmbclient.a $DESTDIR/usr/lib +ln -s libsmbclient.so $DESTDIR/usr/lib/libsmbclient.so.0 +ln -s libsmbclient.so $DESTDIR/usr/lib/libsmbclient.so.0.1 +install -m 644 source/include/libsmbclient.h $DESTDIR/usr/include + +# Adding extra stuff +install -m 755 source/bin/smbfilter $DESTDIR/usr/bin +install -m 755 source/bin/smbsh $DESTDIR/usr/bin +install -m 755 source/bin/smbwrapper.so $DESTDIR/usr/bin +install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin +install -m 755 $VVS/smbadduser $DESTDIR/usr/bin + +cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample +cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf +cp -p $VVS/smbusers $DESTDIR%{EtcSamba} +cp -p $VVS/smbprint $DESTDIR/usr/bin +cp -p $VVS/findsmb $DESTDIR/usr/bin +cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba +cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba +cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt +cp -p $VVS/README.Public $DESTDIR/%{LSBservedir}/Public/README.txt +cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt + + +install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name} +#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba +ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin + + +for f in testparm testprns; do + ln -s $f $DESTDIR/usr/bin/smb$f + ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1 +done + +ln -s ../usr/bin/smbmount $DESTDIR/sbin/mount.smbfs + +cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts + 127.0.0.1 localhost +EoH + +# lsb has new way of inetd configuration +mkdir -p $DESTDIR%{NKinetdir} +cat <$DESTDIR%{NKinetdir}/swat +swat stream tcp nowait.400 root /usr/sbin/tcpd swat +EoI + +pushd $DESTDIR/usr/sbin +rm -f *.so +popd + +# -------------------- Documentation ------------------------------- +DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD +ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING + +cp -p README Manifest Read-Manifest-Now $DOCD +cp -p WHATSNEW.txt Roadmap $DOCD +cp -a docs examples $DOCD + +mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html + +rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs} +rm -rf $DOCD/examples/{svr4-startup,printing} +rm -rf $DOCD/CVS $DOCD/*/CVS $DOCD/*/*/CVS $DOCD/*/*/*/CVS + +cp -p swat/README $DOCD/README.swat + +# This is the O'Reily Samba Book - on-line +for i in docs/htmldocs/using_samba/*.html +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba +done +for i in docs/htmldocs/using_samba/figs/*.gif +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba/figs +done +for i in docs/htmldocs/using_samba/gifs/*.gif +do +install -m644 $i $DESTDIR/usr/share/swat/using_samba/gifs +done + +# -------------------- Fixing final pathes ------------------------------- + +%{fixUP} -T $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}:' +%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;' +%{fixUP} -vT $DESTDIR/%{EtcSamba} -e 's:\@samba_home\@:%{LSBservedir}:' + +%{fixManPages} + +%{mkLists} -c samba +cat << 'EOF' | %{mkLists} -d samba +Samba base +/lib/$ base +%{LSBservedir} config-IGNORED +^/(etc|var|home|tmp) config-IGNORED +swat swat +%{_defaultdocdir}/samba-[^/]+/$ base +%{_defaultdocdir}/samba- doc +tmp IGNORED +man IGNORED +/src/$ IGNORED +/usr/private/$ IGNORED +@default@ +EOF +cat << 'EOF' | %{mkLists} -f -a samba +\.old$ IGNORED +Samba/README.txt base +^/etc config-IGNORED +%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base +libnss_* base +pam_* base +%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base +%{_defaultdocdir}/samba- doc +smb(mount|mnt|umount) smbfs +mount.smbfs smbfs +swat swat +libsmbclient libsmbclient +@default@ +EOF + +%Clean + +%Post +/usr/lib/LSB/init-install %{Name} + +%Post -n swat +%{NKinetdReload} +perl -pi -e '$s=1 if /^swat/; + print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny + +%PostUn +test "$1" = "0" || exit 0 +/usr/lib/LSB/init-remove %{Name} +# We want to remove the browse.dat and wins.dat files so they can not +# interfer with a new version of samba! +rm -f /var/lock/samba/browse.dat +rm -f /var/lock/samba/{brlock,connections,locking,messages}.tdb +if [ -e /var/lock/samba.d/namelist.debug ]; then + rm -f /var/lock/samba.d/namelist.debug +fi +rm -f /var/lock/samba/unexpected.tdb +rm -f /var/lock/samba/{smbd,nmbd}.pid + +# Note: We MUST keep: +# winbindd_*, sshare_info*, printing*, ntdrivers* + +%PostUn -n swat +#$no lsb: lisa --inetd disable swat $1 +test "$1" = "0" || exit 0 +%{SVIdir}/inet reload +[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny + + +%Files -f files-samba-base +%defattr(-,root,root) +%config %attr(0755,root,root) %{SVIdir}/samba +%config %attr(644,root,root) /etc/sysconfig/daemons/samba +%config %attr(644,root,root) /etc/pam.d/samba +%config %attr(644,root,root) /etc/logrotate.d/samba +%config %attr(-,root,root) %{EtcSamba} +%dir %attr(755,root,root) /var/lock/samba.d +%dir %attr(755,root,root) /var/log/samba.d +%dir %attr(1777,root,root) /var/spool/samba +%dir %attr(755,root,root) %{LSBservedir} +%dir %attr(755,root,root) %{LSBservedir}/netlogon +%dir %attr(755,root,root) %{LSBservedir}/profiles +%dir %attr(755,root,root) %{LSBservedir}/Public + + +%Files doc -f files-samba-doc +%defattr(-,root,root) + + +%Files -n smbfs -f files-samba-smbfs +%defattr(-,root,root) + + +%Files -n swat -f files-samba-swat +%defattr(-,root,root) +%config %attr(644,root,root) %{NKinetdir}/swat + +%Files -n libsmbclient -f files-samba-libsmbclient +%defattr(-,root,root) + +%ChangeLog +* Mon Jan 01 1997 ... + - nothing here for now diff --git a/packaging/Caldera/OpenLinux/samba2.spec.tmpl b/packaging/Caldera/OpenLinux/samba2.spec.tmpl index a570112c3c8..58dad3e9b0b 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec.tmpl @@ -328,7 +328,7 @@ cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf cp -p $VVS/smbusers $DESTDIR%{EtcSamba} cp -p $VVS/smbprint $DESTDIR/usr/bin -cp -p $VVS/smbadduser.perl $DESTDIR/usr/bin/smbadduser +cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser #cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/bin/make_smbpasswd #cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd #cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd diff --git a/packaging/Caldera/OpenLinux/smbadduser b/packaging/Caldera/OpenLinux/smbadduser new file mode 100755 index 00000000000..9eb23bf8dbd --- /dev/null +++ b/packaging/Caldera/OpenLinux/smbadduser @@ -0,0 +1,76 @@ +#!/bin/csh +# +# smbadduser - Written by Mike Zakharoff +# +unalias * +set path = ($path /usr/local/samba/bin) + +#set smbpasswd = /usr/local/samba/private/smbpasswd +set smbpasswd = /etc/samba.d/smbpasswd +#set user_map = /usr/local/samba/lib/users.map +set user_map = /etc/samba.d/smbusers +# +# Set to site specific passwd command +# +set passwd = "cat /etc/passwd" +#set passwd = "niscat passwd.org_dir" +#set passwd = "ypcat passwd" + +set line = "----------------------------------------------------------" +if ($#argv == 0) then + echo $line + echo "Written: Mike Zakharoff email: michael.j.zakharoff@boeing.com" + echo "" + echo " 1) Updates $smbpasswd" + echo " 2) Updates $user_map" + echo " 3) Executes smbpasswd for each new user" + echo "" + echo "smbadduser unixid:ntid unixid:ntid ..." + echo "" + echo "Example: smbadduser zak:zakharoffm johns:smithj" + echo $line + exit 1 +endif + +touch $smbpasswd $user_map +set new = () +foreach one ($argv) + echo $one | grep ':' >& /dev/null + if ($status != 0) then + echo "ERROR: Must use unixid:ntid like -> zak:zakharoffm" + continue + endif + set unix = `echo $one | awk -F: '{print $1}'` + set ntid = `echo $one | awk -F: '{print $2}'` + + set usr = `eval $passwd | awk -F: '$1==USR {print $1}' USR=$unix` + if ($#usr != 1) then + echo "ERROR: $unix Not in passwd database SKIPPING..." + continue + endif + set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix` + if ($#tmp != 0) then + echo "ERROR: $unix is already in $smbpasswd SKIPPING..." + continue + endif + + echo "Adding: $unix to $smbpasswd" +# eval $passwd | \ +# awk -F: '$1==USR { \ +# printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd + /usr/bin/smbpasswd -a -n $unix + if ($unix != $ntid) then + echo "Adding: {$unix = $ntid} to $user_map" + echo "$unix = $ntid" >> $user_map + endif + set new = ($new $unix) +end + +# +# Enter password for new users +# +foreach one ($new) + echo $line + echo "ENTER password for $one" + smbpasswd $one +end -- cgit From f296ba5dc89e786d42f1d2dc1d18d58cf3991cfd Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:30:57 +0000 Subject: Adding final pkg format control files for 2.2.3 --- .../OpenServer/pkg/cntl/packages/SambaDOC/ccs | 33 ++++++++++++++++++++++ .../OpenServer/pkg/cntl/packages/SambaSWAT/ccs | 32 +++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100755 packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs create mode 100755 packaging/Caldera/OpenServer/pkg/cntl/packages/SambaSWAT/ccs diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs new file mode 100755 index 00000000000..4b4ef6de517 --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs @@ -0,0 +1,33 @@ +#!/bin/sh + +scriptname="$0" +step="$1" +keywords="$2" +pkglist="$3" + +# Source in the standard functions library, ccsSetup.sh +. ccsSetup.sh + +ccs_return_value=0 + +PostExport() +{ + if [ -x /usr/bin/doctool ]; then + /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop + fi +} + +PreUnexport() +{ + if [ -x /usr/bin/doctool ]; then + /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop + fi +} + +case "$step" in + POST_EXPORT) PostExport ;; + PRE_UNEXPORT) PreUnexport ;; +esac + +exit $ccs_return_value + diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaSWAT/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaSWAT/ccs new file mode 100755 index 00000000000..a7260bc80ab --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaSWAT/ccs @@ -0,0 +1,32 @@ +#!/bin/sh + +scriptname="$0" +step="$1" +keywords="$2" +pkglist="$3" + +# Source in the standard functions library, ccsSetup.sh +. ccsSetup.sh + +ccs_return_value=0 + +SERVICE="swat 598/tcp Samba Web Administration Tool" +INETD="swat stream tcp nowait root /usr/lib/samba/sbin/swat swat" + +PostConfigure() +{ + grep -q "^swat[ ]" /etc/services || + echo $SERVICE >> /etc/services + + grep -q "^swat[ ]" /etc/inetd.conf || + echo $INETD >> /etc/inetd.conf + + kill -HUP `cat /etc/inetd.pid` +} + +case "$step" in + POST_CONFIGURE) PostConfigure ;; +esac + +exit $ccs_return_value + -- cgit From 8246e2d3796c00255555c30399334d64b9f8735c Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 2 Feb 2002 22:32:50 +0000 Subject: Removed duplicate line. --- packaging/Mandrake/makerpms.sh.tmpl | 1 - 1 file changed, 1 deletion(-) diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl index dd7923039c2..dd0e6d32f0d 100644 --- a/packaging/Mandrake/makerpms.sh.tmpl +++ b/packaging/Mandrake/makerpms.sh.tmpl @@ -1,5 +1,4 @@ #!/bin/sh -#!/bin/sh # Copyright (C) John H Terpstra 1998-2002 # Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de # Changed for a generic tar file rebuild by abartlet@pcug.org.au -- cgit From ed521a6b53dc4555bc7e87d73d7fd1d0f6fb69e9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Feb 2002 23:12:46 +0000 Subject: Updated WHATSNEW for release. Jeremy. --- WHATSNEW.txt | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 126 insertions(+), 10 deletions(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 18a08706748..3ee6bda2ac8 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,20 +1,136 @@ - WHATS NEW IN Samba 2.2.2: 13th October 2001 - =========================================== + WHATS NEW IN Samba 2.2.3 - 2nd February 2002 + ============================================= This is the latest stable release of Samba. This is the version that all production Samba servers should be running for all current bug-fixes. -There are several important oplock logic bugs that have been fixed in -this release, so an upgrade is recommended. +There are several important scaling bugs that have been fixed in this release +for large server systems so an upgrade is recommended. + +LDAP update +----------- + +Much work has been done on the LDAP backend code. The configure +option --with-ldapsam is now considered to be stable. The schema +used has changed, see the file examples/LDAP/samba.schema for the +new schema. + +New documentation explaining how to set up a Samba only PDC/BDC +setup has been added in the files Samba-LDAP-HOWTO and Samba-BDC-HOWTO +in the documentation tree. + +winbindd daemon extended +------------------------ + +Samba 2.2.2 was the first release to include the winbind daemon. +This code allows UNIX systems that implement the name service +switch (nss) to be entered into a Windows NT/2000 domain and +use the Domain controller for all user and group enumeration. + +Samba 2.2.3 fixes the known memory leaks in winbindd and has +been extended to work with SGI IRIX and HPUX (11.x) in addition +to the earlier targets of Linux and Solaris. + +For more information on using winbind, see the man pages for +winbindd and wbinfo. + +Note that winbindd is not installed by default. + +New/Changed parameters in 2.2.3 +------------------------------- + +For more information on these parameters, see the man pages for +smb.conf. + +Added/changed parameters. +------------------------- + +unix extensions + +Enables the experimental UNIX CIFS extensions in smbd. See the manpage +for more details. + +default devmode + +Some printer drivers will crash the Windows NT/2000 spooler service +if they are given a default devmode, some require it. This parameter +allows the administrator a choice of whether smbd returns such a +default devmode for a driver. + +share modes + +This parameter has been restored to allow people who wish smbd to ignore +client share modes. This is *very dangerous* and should not be set without +full knowledge of what this is designed for. + +Changes in 2.2.3 +----------------- + +1). Fixed shared library compile for Solaris with native compiler. +2). UNIX CIFS extensions code added (donated by HP). +3). Changed to using NT status codes on the wire if the client can support +this. +4). altname command to show 8.3 name added to smbclient. +5). const-safe endian macros now used. +6). client code now uses UNICODE on the wire. +7). Correctly return fault PDU's on bad handle. +8). Improved NT error code mapping table. +9). Many new point and print RPC calls added. +10). Win9x clients can now see full user list. +11). fileid added to identify simultaneous open files (no longer +use dev/inode/time as unique value). +12). HPUX ACL code added (donated by HP). +13). vfs interfaces updated (again !). +14). MSDOS Code Page 866 -> 1251 mapping added. +15). winbindd now processes quit/hup signals correctly. +16). No tdb traversal done on startup/shutdown - ensures scalability. +17). Fix bug with paths for homes share. +18). Fixed copyfile for OS/2. +19). Fix group membership when groups are on more than one line. +20). Fixed core dumps in posix ACL mapping code. +21). Tidyup of UNICODE functions (put/get). +22). Move rpcclient to the new libsmb code. +23). Add missing Windows 2000 passthough trans2 calls. +24). Return check all tdb calls. +25). Make local name lookup work even if wins server is down. +26). pam session code added to winbind. +27). Added winbindd cache to all lookups. +28). Fix allocate bugs that caused file sizes to be incorrect. +29). Fixed write cache code - now safe to use. +30). Fixed winbindd memory leaks. +31). winbindd will now do name lookups (to allow non Open Source +systems to do the nsswitch WINS lookup). Fixed by SGI. +32). passdb memory leaks fixed. +33). LDAP code updates and now properly maintained. +34). Finally figured out how changeid is meant to work. +35). Downlevel printing now looks as NT does in print monitor window. +36). Many fixups in spoolss printing RPC parsing. +37). Speed up password enumeration as a PDC. +38). Fix printer changed notify messages (work from HP). +39). Fix modify timestamp on close code. +40). Fix long standing mangled names bug. +41). Fix delete on close semantics. +42). Stop opening all files with O_NONBLOCK ! +43). Use O_NOFOLLOW for systems that have it and don't want symlinks. +44). Ensure NT suplementary groups get added to user token. +45). Try and mitigate effects of DNS timeout (do less lookups). +46). Added current user connection context stack. +47). Fixes to utmp code. +48). smbw code tidyups. +49). Added tdb open log code. Several tdb fixes. + +Older release notes for Samba 2.2.x follow. + +----------------------------------------------------------------------------- New daemon included - winbindd ------------------------------ - + Samba 2.2.2 is the first release to include the winbind daemon. This code allows UNIX systems that implement the name service switch (nss) to be entered into a Windows NT/2000 domain and use the Domain controller for all user and group enumeration. - + This allows a Samba server added to a Windows domain to serve file and print services with *NO* local users needed in /etc/passwd and /etc/group - all users and groups are read directly from the @@ -22,7 +138,7 @@ Windows domain controller. In addition with pam_winbind which allows a PAM enabled UNIX system to use a Windows domain for authentication service this allows single sign on and account control across UNIX and Windows systems. - + The current version of winbindd shipped in 2.2.2 does have some memory leaks, which will be addressed for the next Samba release, so it is advisable to monitor the winbind process. This code is @@ -32,10 +148,10 @@ correctly against a Samba PDC, due to some missing calls on the PDC side. These problems are being addressed for the next Samba release, but it was thought better to release the code now rather than delay the main Samba code to match the winbind release schedule. - -For more information on using winbind, see the man pages for + +For more information on using winbind, see the man pages for winbindd and wbinfo. - + Note that winbindd is not installed by default. New/Changed parameters in 2.2.2 -- cgit From bff073669c9f9e6cc11541a644ad1181c123f78d Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 4 Feb 2002 02:16:30 +0000 Subject: smbprint-new.sh was borken ... Fixed and tested ... I will change it to the real one soon. --- examples/printing/smbprint-new.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/printing/smbprint-new.sh b/examples/printing/smbprint-new.sh index 3281b1cf7c1..68bd66a13fe 100644 --- a/examples/printing/smbprint-new.sh +++ b/examples/printing/smbprint-new.sh @@ -75,9 +75,9 @@ config_file=$spool_dir/.config # debug (optional) # debugsmb (optional) # debugfile (optional) - $config_file +. $config_file -if [ "x$password" = "x"] ; then +if [ "x$password" = "x" ] ; then password="-N" fi @@ -103,12 +103,16 @@ if [ $TRANS -eq 1 ]; then fi debugfile="/tmp/smb-print.log" -if [ "x$debug" = "x" -o $debug -eq 0 ] ; then - debugfile=/dev/null debugargs= +if [ "x$debug" = "x" ] ; then + debugfile=/dev/null debugargs= else - set -x; exec >>$debugfile 2>&1 - debugargs="$debugfile." - #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" + if [ $debug -eq 0 ] ; then + debugfile=/dev/null debugargs= + else + set -x; exec >>$debugfile 2>&1 + debugargs="$debugfile." + #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" + fi fi if [ "x$smbconf" != "x" ]; then -- cgit From 17ac76bafc704626b2440d46c363332ba902d018 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 4 Feb 2002 14:06:58 +0000 Subject: fix for compiling --- source/passdb/pdb_nisplus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/passdb/pdb_nisplus.c b/source/passdb/pdb_nisplus.c index 3648fb0341a..e168e487f75 100644 --- a/source/passdb/pdb_nisplus.c +++ b/source/passdb/pdb_nisplus.c @@ -343,7 +343,7 @@ static BOOL make_sam_from_nisp_object(SAM_ACCOUNT *pw_buf, nis_object *obj) get_single_attribute(obj, NPF_LOGON_SCRIPT, logon_script, sizeof(pstring)); if( !(logon_script && *logon_script) ) { - pstrcpy(logon_script, lp_logon_script(), False); + pstrcpy(logon_script, lp_logon_script()); } else pdb_set_logon_script(pw_buf, logon_script, True); -- cgit From 534878fac1c88ef0cdb68131fabc05eae7c9ee61 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Feb 2002 02:36:45 +0000 Subject: Stupid errormap typo fix ! Jeremy. --- source/lib/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/error.c b/source/lib/error.c index df177bcea0a..ec7efd11f4c 100644 --- a/source/lib/error.c +++ b/source/lib/error.c @@ -31,7 +31,7 @@ struct unix_error_map unix_dos_nt_errmap[] = { { EIO, ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR }, { EBADF, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, { EINVAL, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, - { EEXIST, ERRDOS, ERRfilexists, NT_STATUS_ACCESS_DENIED}, + { EEXIST, ERRDOS, ERRfilexists, NT_STATUS_OBJECT_NAME_COLLISION}, { ENFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, { EMFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, -- cgit From 72f6efe38808b8c7205607031134e6bef2294cf8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Feb 2002 03:10:23 +0000 Subject: Check for NULL params (from HEAD). --- source/smbd/trans2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index b90f7537ca1..4168edf7705 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1545,6 +1545,9 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * BOOL delete_pending = False; time_t c_time; + if (!params) + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + if (tran_call == TRANSACT2_QFILEINFO) { files_struct *fsp; -- cgit From 81d6afa76bf948e245f3ba42733e26fd74b0cccc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Feb 2002 03:33:42 +0000 Subject: Fix HPUX build (less than 11.x). --- source/configure | 2 +- source/configure.in | 2 +- source/include/config.h.in | 3 +++ source/nsswitch/nss.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/configure b/source/configure index 52dc6ebc8c8..3f3422cff45 100755 --- a/source/configure +++ b/source/configure @@ -2292,7 +2292,7 @@ else fi done -for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h +for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h nsswitch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/source/configure.in b/source/configure.in index 504989344cb..b22d33e89a5 100644 --- a/source/configure.in +++ b/source/configure.in @@ -381,7 +381,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) -AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h synch.h pthread.h) +AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h synch.h pthread.h nsswitch.h) # # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. diff --git a/source/include/config.h.in b/source/include/config.h.in index 803c2a6ca0e..bc956315e6b 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -858,6 +858,9 @@ /* Define if you have the header file. */ #undef HAVE_NSS_COMMON_H +/* Define if you have the header file. */ +#undef HAVE_NSSWITCH_H + /* Define if you have the header file. */ #undef HAVE_POLL_H diff --git a/source/nsswitch/nss.h b/source/nsswitch/nss.h index 6165e0b24a5..f30f9ca1348 100644 --- a/source/nsswitch/nss.h +++ b/source/nsswitch/nss.h @@ -73,7 +73,7 @@ typedef enum #define NSD_MEM_VOLATILE 1 #define NSD_MEM_DYNAMIC 2 -#elif defined(HPUX) +#elif defined(HPUX) && defined(HAVE_NSSWITCH_H) /* HP-UX 11 */ #include "nsswitch/hp_nss_common.h" -- cgit From dbf08ac9a403a4b12826deaaa0988ba15bc3e56b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 5 Feb 2002 15:58:40 +0000 Subject: removed unused variable --- source/passdb/pdb_ldap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 3b7b8123eb6..0fcda53adb5 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -580,7 +580,6 @@ Initialize SAM_ACCOUNT from an LDAP query static BOOL init_ldap_from_sam (LDAPMod *** mods, int ldap_state, SAM_ACCOUNT * sampass) { pstring temp; - uint32 i; *mods = NULL; -- cgit From b8d23b7a636d2dfe8739db11d7fd57b977319a88 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 6 Feb 2002 00:23:52 +0000 Subject: fix for IRIX toolroot builds --- source/configure | 569 ++++++++++++++++++++++++++-------------------------- source/configure.in | 3 +- 2 files changed, 287 insertions(+), 285 deletions(-) diff --git a/source/configure b/source/configure index 3f3422cff45..ec2b28c18e9 100755 --- a/source/configure +++ b/source/configure @@ -1077,7 +1077,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -8501,7 +8501,8 @@ EOF esac ATTEMPT_WRAP32_BUILD=yes BLDSHARED="true" - LDSHFLAGS="-Wl,-soname,\$@ -shared" + LDSHFLAGS="-soname \$@ -shared" + SHLD="\${LD}" if test "${ac_cv_prog_CC}" = "gcc"; then PICFLAG="-fPIC" else @@ -8572,7 +8573,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:8576: checking for $ac_word" >&5 +echo "configure:8577: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8626,15 +8627,15 @@ EOF esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8630: checking linker flags for shared libraries" >&5 +echo "configure:8631: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8633: checking compiler flags for position-independent code" >&5 +echo "configure:8634: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8638: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8639: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8654,7 +8655,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:8658: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8659: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8675,7 +8676,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:8679: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8680: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8698,7 +8699,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8702: checking for long long" >&5 +echo "configure:8703: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8707,12 +8708,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8717: \"$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 @@ -8739,20 +8740,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8743: checking for LL suffix on long long integers" >&5 +echo "configure:8744: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8774,7 +8775,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8778: checking for 64 bit off_t" >&5 +echo "configure:8779: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8783,13 +8784,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8794: \"$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 @@ -8812,7 +8813,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8816: checking for off64_t" >&5 +echo "configure:8817: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8821,7 +8822,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8836: \"$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 @@ -8854,7 +8855,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8858: checking for 64 bit ino_t" >&5 +echo "configure:8859: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8863,13 +8864,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8874: \"$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 @@ -8892,7 +8893,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8896: checking for ino64_t" >&5 +echo "configure:8897: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8901,7 +8902,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8916: \"$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 @@ -8934,7 +8935,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8938: checking for dev64_t" >&5 +echo "configure:8939: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8943,7 +8944,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8976,13 +8977,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8980: checking for struct dirent64" >&5 +echo "configure:8981: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9015,7 +9016,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9019: checking for major macro" >&5 +echo "configure:9020: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9024,7 +9025,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9056,7 +9057,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9060: checking for minor macro" >&5 +echo "configure:9061: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9065,7 +9066,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9097,7 +9098,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9101: checking for makedev macro" >&5 +echo "configure:9102: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9106,7 +9107,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9138,7 +9139,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9142: checking for unsigned char" >&5 +echo "configure:9143: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9147,12 +9148,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9157: \"$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 @@ -9175,13 +9176,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9179: checking for sin_len in sock" >&5 +echo "configure:9180: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9190,7 +9191,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9211,13 +9212,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9215: checking whether seekdir returns void" >&5 +echo "configure:9216: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9226,7 +9227,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9247,20 +9248,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9251: checking for __FILE__ macro" >&5 +echo "configure:9252: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9281,20 +9282,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9285: checking for __FUNCTION__ macro" >&5 +echo "configure:9286: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9315,7 +9316,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9319: checking if gettimeofday takes tz argument" >&5 +echo "configure:9320: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9324,14 +9325,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9336: \"$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 @@ -9354,7 +9355,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9358: checking for C99 vsnprintf" >&5 +echo "configure:9359: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9363,7 +9364,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9385,7 +9386,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9408,7 +9409,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9412: checking for broken readdir" >&5 +echo "configure:9413: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9417,7 +9418,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9425,7 +9426,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:9429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9430: \"$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 @@ -9448,13 +9449,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9452: checking for utimbuf" >&5 +echo "configure:9453: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9462,7 +9463,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9486,12 +9487,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9490: checking for $ac_func" >&5 +echo "configure:9491: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9519: \"$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 @@ -9540,13 +9541,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9544: checking for ut_name in utmp" >&5 +echo "configure:9545: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9554,7 +9555,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9575,13 +9576,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9579: checking for ut_user in utmp" >&5 +echo "configure:9580: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9589,7 +9590,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9610,13 +9611,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9614: checking for ut_id in utmp" >&5 +echo "configure:9615: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9624,7 +9625,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9645,13 +9646,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9649: checking for ut_host in utmp" >&5 +echo "configure:9650: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9659,7 +9660,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9680,13 +9681,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9684: checking for ut_time in utmp" >&5 +echo "configure:9685: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9694,7 +9695,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9715,13 +9716,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9719: checking for ut_tv in utmp" >&5 +echo "configure:9720: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9729,7 +9730,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9750,13 +9751,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9754: checking for ut_type in utmp" >&5 +echo "configure:9755: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9764,7 +9765,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9785,13 +9786,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9789: checking for ut_pid in utmp" >&5 +echo "configure:9790: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9799,7 +9800,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9820,13 +9821,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9824: checking for ut_exit in utmp" >&5 +echo "configure:9825: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9834,7 +9835,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9855,13 +9856,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9859: checking for ut_addr in utmp" >&5 +echo "configure:9860: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9869,7 +9870,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9891,13 +9892,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9895: checking whether pututline returns pointer" >&5 +echo "configure:9896: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9905,7 +9906,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9927,13 +9928,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9931: checking for ut_syslen in utmpx" >&5 +echo "configure:9932: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9941,7 +9942,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9962,7 +9963,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9966: checking for Linux kernel oplocks" >&5 +echo "configure:9967: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9971,7 +9972,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -9985,7 +9986,7 @@ main() { } EOF -if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10008,7 +10009,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10012: checking for kernel change notify support" >&5 +echo "configure:10013: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10017,7 +10018,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10031,7 +10032,7 @@ main() { } 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 +if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10054,7 +10055,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10058: checking for kernel share modes" >&5 +echo "configure:10059: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10063,7 +10064,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10079,7 +10080,7 @@ main() { } EOF -if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10105,13 +10106,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10109: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10110: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10119,7 +10120,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:10123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10140,7 +10141,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10144: checking for irix specific capabilities" >&5 +echo "configure:10145: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10149,7 +10150,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10164,7 +10165,7 @@ main() { } 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 +if { (eval echo configure:10169: \"$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 @@ -10192,13 +10193,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10196: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10197: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10208,7 +10209,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10229,13 +10230,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10233: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10234: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10245,7 +10246,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10266,13 +10267,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10270: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10271: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10282,7 +10283,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10303,13 +10304,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10307: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10308: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10319,7 +10320,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10341,13 +10342,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10345: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10346: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10361,7 +10362,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10382,16 +10383,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10386: checking for test routines" >&5 +echo "configure:10387: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10396: \"$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 @@ -10405,7 +10406,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10409: checking for ftruncate extend" >&5 +echo "configure:10410: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10414,11 +10415,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10423: \"$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 @@ -10441,7 +10442,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10445: checking for broken getgroups" >&5 +echo "configure:10446: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10450,11 +10451,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10459: \"$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 @@ -10477,7 +10478,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10481: checking whether getpass should be replaced" >&5 +echo "configure:10482: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10485,7 +10486,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10521,7 +10522,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10525: checking for broken inet_ntoa" >&5 +echo "configure:10526: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10530,7 +10531,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10544,7 +10545,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:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10549: \"$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 @@ -10567,7 +10568,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10571: checking for secure mkstemp" >&5 +echo "configure:10572: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10576,7 +10577,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10593,7 +10594,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10616,7 +10617,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10620: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10621: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10625,12 +10626,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10653,7 +10654,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10657: checking for root" >&5 +echo "configure:10658: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10662,11 +10663,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10671: \"$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 @@ -10694,7 +10695,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10698: checking for iface AIX" >&5 +echo "configure:10699: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10703,7 +10704,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10735,7 +10736,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10739: checking for iface ifconf" >&5 +echo "configure:10740: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10744,7 +10745,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10777,7 +10778,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10781: checking for iface ifreq" >&5 +echo "configure:10782: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10786,7 +10787,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10823,7 +10824,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10827: checking for setresuid" >&5 +echo "configure:10828: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10832,7 +10833,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10845: \"$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 @@ -10866,7 +10867,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10870: checking for setreuid" >&5 +echo "configure:10871: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10875,7 +10876,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10888: \"$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 @@ -10908,7 +10909,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10912: checking for seteuid" >&5 +echo "configure:10913: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10917,7 +10918,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10930: \"$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 @@ -10950,7 +10951,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10954: checking for setuidx" >&5 +echo "configure:10955: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10959,7 +10960,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10972: \"$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 @@ -10992,7 +10993,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:10996: checking for working mmap" >&5 +echo "configure:10997: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11001,11 +11002,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11028,7 +11029,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11032: checking for ftruncate needs root" >&5 +echo "configure:11033: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11037,11 +11038,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11064,7 +11065,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11068: checking for fcntl locking" >&5 +echo "configure:11069: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11073,11 +11074,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11082: \"$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 @@ -11100,7 +11101,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11104: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11105: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11109,11 +11110,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11138,7 +11139,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11142: checking for 64 bit fcntl locking" >&5 +echo "configure:11143: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11147,7 +11148,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11176: \"$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 @@ -11196,13 +11197,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11200: checking for st_blocks in struct stat" >&5 +echo "configure:11201: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11211,7 +11212,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11234,13 +11235,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11238: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11239: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11277,13 +11278,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11281: checking for broken nisplus include files" >&5 +echo "configure:11282: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11293,7 +11294,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11317,7 +11318,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11321: checking whether to use smbwrapper" >&5 +echo "configure:11322: 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" @@ -11361,7 +11362,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11365: checking whether to use AFS" >&5 +echo "configure:11366: 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" @@ -11387,7 +11388,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11391: checking whether to use DCE/DFS auth" >&5 +echo "configure:11392: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11412,7 +11413,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11416: checking whether to use Kerberos IV" >&5 +echo "configure:11417: 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" @@ -11424,7 +11425,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11428: checking for dn_expand in -lresolv" >&5 +echo "configure:11429: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11432,7 +11433,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11448: \"$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 @@ -11487,7 +11488,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11491: checking whether to use Kerberos 5" >&5 +echo "configure:11492: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11515,7 +11516,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11519: checking whether to use AUTOMOUNT" >&5 +echo "configure:11520: 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" @@ -11540,7 +11541,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11544: checking whether to use SMBMOUNT" >&5 +echo "configure:11545: 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" @@ -11577,7 +11578,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11581: checking whether to use PAM password database" >&5 +echo "configure:11582: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11603,7 +11604,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11607: checking for pam_get_data in -lpam" >&5 +echo "configure:11608: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11611,7 +11612,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11627: \"$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 @@ -11649,7 +11650,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11653: checking whether to use pam_smbpass" >&5 +echo "configure:11654: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11691,12 +11692,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11695: checking for $ac_func" >&5 +echo "configure:11696: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11724: \"$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 @@ -11745,7 +11746,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:11749: checking for crypt in -lcrypt" >&5 +echo "configure:11750: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11753,7 +11754,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11769: \"$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 @@ -11799,7 +11800,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11803: checking for a crypt that needs truncated salt" >&5 +echo "configure:11804: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11808,11 +11809,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11850,7 +11851,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11854: checking whether to use TDB SAM database" >&5 +echo "configure:11855: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11876,7 +11877,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11880: checking whether to use LDAP SAM database" >&5 +echo "configure:11881: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11903,7 +11904,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11907: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11908: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11931,7 +11932,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11935: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11936: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11953,7 +11954,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11957: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11958: 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" @@ -11978,7 +11979,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:11982: checking whether to use SSL" >&5 +echo "configure:11983: 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" @@ -12052,7 +12053,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12056: checking whether to use syslog logging" >&5 +echo "configure:12057: 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" @@ -12077,7 +12078,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12081: checking whether to use profiling" >&5 +echo "configure:12082: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12105,7 +12106,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12109: checking whether to support disk-quotas" >&5 +echo "configure:12110: 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" @@ -12117,13 +12118,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12121: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12122: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12135,7 +12136,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12179,7 +12180,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12183: checking whether to support utmp accounting" >&5 +echo "configure:12184: 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" @@ -12205,7 +12206,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12209: checking whether to support Microsoft Dfs" >&5 +echo "configure:12210: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12231,7 +12232,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12235: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12236: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12260,7 +12261,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12264: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12265: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12287,14 +12288,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12291: checking how to get filesystem space usage" >&5 +echo "configure:12292: 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:12298: checking statvfs64 function (SVR4)" >&5 +echo "configure:12299: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12302,7 +12303,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12321: \"$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 @@ -12349,12 +12350,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12353: checking statvfs function (SVR4)" >&5 +echo "configure:12354: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12362,7 +12363,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12367: \"$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 @@ -12387,7 +12388,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:12391: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12392: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12395,7 +12396,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12408,7 +12409,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12413: \"$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 @@ -12435,7 +12436,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:12439: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12440: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12443,7 +12444,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12467: \"$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 @@ -12489,7 +12490,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:12493: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12494: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12497,7 +12498,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12507,7 +12508,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12512: \"$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 @@ -12534,7 +12535,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:12538: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12539: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12542,7 +12543,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12558,7 +12559,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12563: \"$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 @@ -12585,7 +12586,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:12589: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12590: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12593,7 +12594,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12613,7 +12614,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12618: \"$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 @@ -12646,9 +12647,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12650: checking if large file support can be enabled" >&5 +echo "configure:12651: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12728,7 +12729,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12732: checking whether to support ACLs" >&5 +echo "configure:12733: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12781,7 +12782,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12785: checking for acl_get_file in -lacl" >&5 +echo "configure:12786: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12789,7 +12790,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12805: \"$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 @@ -12828,13 +12829,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12832: checking for ACL support" >&5 +echo "configure:12833: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12842,7 +12843,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12862,13 +12863,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12866: checking for acl_get_perm_np" >&5 +echo "configure:12867: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12876,7 +12877,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12931,7 +12932,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12935: checking whether to build winbind" >&5 +echo "configure:12936: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13010,11 +13011,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else diff --git a/source/configure.in b/source/configure.in index b22d33e89a5..d0bb8d463d7 100644 --- a/source/configure.in +++ b/source/configure.in @@ -822,7 +822,8 @@ case "$host_os" in esac ATTEMPT_WRAP32_BUILD=yes BLDSHARED="true" - LDSHFLAGS="-Wl,-soname,\$@ -shared" + LDSHFLAGS="-soname \$@ -shared" + SHLD="\${LD}" if test "${ac_cv_prog_CC}" = "gcc"; then PICFLAG="-fPIC" else -- cgit From 84cb9a78b565c88a8289f2266ee947d6f1d14ccc Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 6 Feb 2002 00:25:16 +0000 Subject: no longer need separate build of o32 smbwrapper --- packaging/SGI/mkrelease.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh index ed5d93dcc93..546a89068c5 100755 --- a/packaging/SGI/mkrelease.sh +++ b/packaging/SGI/mkrelease.sh @@ -85,19 +85,6 @@ if [ $errstat -ne 0 ]; then fi mv bin/smbd bin/smbd.noquota -echo "===================== Making smbwrapper.32.so =======================" -# cannot use -mips3 with 32 bit shared libraries so reset the ISA variable -# just for this object -ISA= -export ISA -make -P "CFLAGS=-O -g3 -woff 1188" bin/smbwrapper.32.so -errstat=$? -if [ $errstat -ne 0 ]; then - echo "Error $errstat building sources\n"; - exit $errstat; -fi -ISA=-mips3 -export ISA echo "===================== Making Regular versions =======================" make -P "CFLAGS=-O -g3 -woff 1188" all errstat=$? -- cgit From 626598cb1c0f2ba9a216b40d20b892218ec1759d Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 6 Feb 2002 22:27:43 +0000 Subject: re-added definition of share modes someone needs to regenerate docs --- docs/docbook/manpages/smb.conf.5.sgml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 44ff2205c90..ddb8a7ec9b4 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -877,6 +877,7 @@ root preexec close security mask set directory + share modes short preserve case status strict allocate @@ -6711,6 +6712,33 @@ + + share modes (S) + This enables or disables the honoring of + the share modes during a file open. These + modes are used by clients to gain exclusive read or write access + to a file. + + These open modes are not directly supported by UNIX, so + they are simulated using shared memory, or lock files if your + UNIX doesn't support shared memory (almost all do). + + The share modes that are enabled by this option are + DENY_DOS, DENY_ALL, + DENY_READ, DENY_WRITE, + DENY_NONE and DENY_FCB. + + + This option gives full share compatibility and enabled + by default. + + You should NEVER turn this parameter + off as many Windows applications will break if you do so. + + Default: share modes = yes + + + -- cgit From 6a9657dbd74b491bf3047834b6438662b19e1f95 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 7 Feb 2002 23:27:20 +0000 Subject: Add -c option to specify smb.conf file (-s was already used). This will allow you to use smbpasswd if your smb.conf file is not in the compiled location. Move all the command line agrument processing to one place. Process args before calling lp_load services so it gets correct smb.conf file I'm not sure of the intent of the -L option (it no longer needs to be first). The usage message shows only root can use it, but there is no check in the original code to see if you were root before processing the arg. I left it so you can specify the arg as non-root but doesn't seem correct. Also this arg is not documented in smb.conf man page. Could people test the various forms of using smbpasswd to make sure I didn't break anything. I tried the ones I can think of and it seems OK. --- source/utils/smbpasswd.c | 331 +++++++++++++++++++++++------------------------ 1 file changed, 159 insertions(+), 172 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 24185114f13..b37777c577c 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -33,6 +33,151 @@ extern int optind; /* forced running in root-mode */ static BOOL local_mode; +static BOOL joining_domain = False, got_pass = False, got_username = False; +static int local_flags = 0; +static BOOL stdin_passwd_get = False; +static fstring user_name, user_password; +static char *new_domain = NULL; +static char *new_passwd = NULL; +static char *old_passwd = NULL; +static char *remote_machine = NULL; +static pstring servicesf = CONFIGFILE; + +#ifdef WITH_LDAP_SAM +static fstring ldap_secret; +#endif + + +/******************************************************************* + Process command line options + ******************************************************************/ +static void process_options(int argc, char **argv, BOOL amroot) +{ + int ch; + + user_name[0] = '\0'; + + while ((ch = getopt(argc, argv, "c:axdehmnj:r:sw:R:D:U:L")) != EOF) { + switch(ch) { + case 'L': + local_mode = True; + break; + case 'c': + pstrcpy(servicesf,optarg); + break; + case 'a': + if (!amroot) goto bad_args; + local_flags |= LOCAL_ADD_USER; + break; + case 'x': + if (!amroot) goto bad_args; + local_flags |= LOCAL_DELETE_USER; + new_passwd = strdup_x("XXXXXX"); + break; + case 'd': + if (!amroot) goto bad_args; + local_flags |= LOCAL_DISABLE_USER; + new_passwd = strdup_x("XXXXXX"); + break; + case 'e': + if (!amroot) goto bad_args; + local_flags |= LOCAL_ENABLE_USER; + break; + case 'm': + if (!amroot) goto bad_args; + local_flags |= LOCAL_TRUST_ACCOUNT; + break; + case 'n': + if (!amroot) goto bad_args; + local_flags |= LOCAL_SET_NO_PASSWORD; + new_passwd = strdup_x("NO PASSWORD"); + break; + case 'j': + if (!amroot) goto bad_args; + new_domain = optarg; + strupper(new_domain); + joining_domain = True; + break; + case 'r': + remote_machine = optarg; + break; + case 's': + set_line_buffering(stdin); + set_line_buffering(stdout); + set_line_buffering(stderr); + stdin_passwd_get = True; + break; + case 'w': + if (!amroot) goto bad_args; +#ifdef WITH_LDAP_SAM + local_flags |= LOCAL_SET_LDAP_ADMIN_PW; + fstrcpy(ldap_secret, optarg); + break; +#else + printf("-w not available unless configured --with-ldap\n"); + goto bad_args; +#endif + case 'R': + if (!amroot) goto bad_args; + lp_set_name_resolve_order(optarg); + break; + case 'D': + DEBUGLEVEL = atoi(optarg); + break; + case 'U': { + char *lp; + + got_username = True; + fstrcpy(user_name, optarg); + + if ((lp = strchr(user_name, '%'))) { + *lp = 0; + fstrcpy(user_password, lp + 1); + got_pass = True; + memset(strchr(optarg, '%') + 1, 'X', + strlen(user_password)); + } + + break; + } + case 'h': + default: +bad_args: + usage(); + } + } + + argc -= optind; + argv += optind; + + if (joining_domain && (argc != 0)) + usage(); + + switch(argc) { + case 0: + if (!got_username) + fstrcpy(user_name, ""); + break; + case 1: + if (!amroot == 1) { + new_passwd = argv[0]; + break; + } + if (got_username) + usage(); + fstrcpy(user_name, argv[0]); + break; + case 2: + if (!amroot || got_username || got_pass) + usage(); + fstrcpy(user_name, argv[0]); + new_passwd = strdup_x(argv[1]); + break; + default: + usage(); + } + +} /********************************************************* A strdup with exit @@ -60,13 +205,14 @@ static void usage(void) printf("smbpasswd [options] [password]\n"); } printf("options:\n"); + printf(" -c smb.conf file Use the given path to the smb.conf file\n"); printf(" -s use stdin for password prompt\n"); printf(" -D LEVEL debug level\n"); printf(" -U USER remote username\n"); printf(" -r MACHINE remote machine\n"); if (getuid() == 0 || local_mode) { - printf(" -L local mode (must be first option)\n"); + printf(" -L local mode\n"); printf(" -R ORDER name resolve order\n"); printf(" -j DOMAIN join domain name\n"); printf(" -a add user\n"); @@ -570,107 +716,15 @@ static BOOL store_ldap_admin_pw (char* pw) } #endif + /************************************************************* Handle password changing for root. *************************************************************/ -static int process_root(int argc, char *argv[]) +static int process_root() { struct passwd *pwd; - int result = 0, ch; - BOOL joining_domain = False, got_pass = False, got_username = False; - int local_flags = 0; - BOOL stdin_passwd_get = False; - fstring user_name, user_password; -#ifdef WITH_LDAP_SAM - fstring ldap_secret; -#endif - char *new_domain = NULL; - char *new_passwd = NULL; - char *old_passwd = NULL; - char *remote_machine = NULL; - - user_name[0] = '\0'; - - while ((ch = getopt(argc, argv, "axdehmnj:r:sw:R:D:U:L")) != EOF) { - switch(ch) { - case 'L': - local_mode = True; - break; - case 'a': - local_flags |= LOCAL_ADD_USER; - break; - case 'x': - local_flags |= LOCAL_DELETE_USER; - new_passwd = strdup_x("XXXXXX"); - break; - case 'd': - local_flags |= LOCAL_DISABLE_USER; - new_passwd = strdup_x("XXXXXX"); - break; - case 'e': - local_flags |= LOCAL_ENABLE_USER; - break; - case 'm': - local_flags |= LOCAL_TRUST_ACCOUNT; - break; - case 'n': - local_flags |= LOCAL_SET_NO_PASSWORD; - new_passwd = strdup_x("NO PASSWORD"); - break; - case 'j': - new_domain = optarg; - strupper(new_domain); - joining_domain = True; - break; - case 'r': - remote_machine = optarg; - break; - case 's': - set_line_buffering(stdin); - set_line_buffering(stdout); - set_line_buffering(stderr); - stdin_passwd_get = True; - break; - case 'w': -#ifdef WITH_LDAP_SAM - local_flags |= LOCAL_SET_LDAP_ADMIN_PW; - fstrcpy(ldap_secret, optarg); - break; -#else - printf("-w not available unless configured --with-ldap\n"); - goto done; -#endif - case 'R': - lp_set_name_resolve_order(optarg); - break; - case 'D': - DEBUGLEVEL = atoi(optarg); - break; - case 'U': { - char *lp; - - got_username = True; - fstrcpy(user_name, optarg); - - if ((lp = strchr(user_name, '%'))) { - *lp = 0; - fstrcpy(user_password, lp + 1); - got_pass = True; - memset(strchr(optarg, '%') + 1, 'X', - strlen(user_password)); - } - - break; - } - case 'h': - default: - usage(); - } - } - - argc -= optind; - argv += optind; + int result = 0; #ifdef WITH_LDAP_SAM if (local_flags & LOCAL_SET_LDAP_ADMIN_PW) @@ -704,9 +758,6 @@ static int process_root(int argc, char *argv[]) if (joining_domain) { - if (argc != 0) - usage(); - /* Are we joining by specifing an admin username and password? */ @@ -735,26 +786,6 @@ static int process_root(int argc, char *argv[]) * Deal with root - can add a user, but only locally. */ - switch(argc) { - case 0: - if (!got_username) - fstrcpy(user_name, ""); - break; - case 1: - if (got_username) - usage(); - fstrcpy(user_name, argv[0]); - break; - case 2: - if (got_username || got_pass) - usage(); - fstrcpy(user_name, argv[0]); - new_passwd = strdup_x(argv[1]); - break; - default: - usage(); - } - if (!user_name[0] && (pwd = sys_getpwuid(0))) { fstrcpy(user_name, pwd->pw_name); } @@ -873,53 +904,15 @@ static int process_root(int argc, char *argv[]) /************************************************************* handle password changing for non-root *************************************************************/ -static int process_nonroot(int argc, char *argv[]) +static int process_nonroot() { struct passwd *pwd = NULL; - int result = 0, ch; - BOOL stdin_passwd_get = False; - char *old_passwd = NULL; - char *remote_machine = NULL; - char *user_name = NULL; - char *new_passwd = NULL; - - while ((ch = getopt(argc, argv, "hD:r:sU:")) != EOF) { - switch(ch) { - case 'D': - DEBUGLEVEL = atoi(optarg); - break; - case 'r': - remote_machine = optarg; - break; - case 's': - set_line_buffering(stdin); - set_line_buffering(stdout); - set_line_buffering(stderr); - stdin_passwd_get = True; - break; - case 'U': - user_name = optarg; - break; - default: - usage(); - } - } - - argc -= optind; - argv += optind; + int result = 0; - if(argc > 1) { - usage(); - } - - if (argc == 1) { - new_passwd = argv[0]; - } - - if (!user_name) { + if (!user_name[0]) { pwd = sys_getpwuid(getuid()); if (pwd) { - user_name = strdup_x(pwd->pw_name); + fstrcpy(user_name,pwd->pw_name); } else { fprintf(stderr,"you don't exist - go away\n"); exit(1); @@ -973,7 +966,7 @@ static int process_nonroot(int argc, char *argv[]) **********************************************************/ int main(int argc, char **argv) { - static pstring servicesf = CONFIGFILE; + BOOL amroot = getuid() == 0; AllowDebugChange = False; @@ -981,6 +974,7 @@ int main(int argc, char **argv) set_auth_parameters(argc, argv); #endif /* HAVE_SET_AUTH_PARAMETERS */ + process_options(argc, argv, amroot); TimeInit(); setup_logging("smbpasswd", True); @@ -1019,17 +1013,10 @@ int main(int argc, char **argv) exit(1); } - /* pre-check for local mode option as first option. We can't - do this via normal getopt as getopt can't be called - twice. */ - if (argc > 1 && strcmp(argv[1], "-L") == 0) { - local_mode = True; - } - - if (local_mode || getuid() == 0) { + if (local_mode || amroot) { secrets_init(); - return process_root(argc, argv); + return process_root(); } - return process_nonroot(argc, argv); + return process_nonroot(); } -- cgit From 60bb11d32221c31e641dead9f0d00daea9ceaa71 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Feb 2002 21:50:57 +0000 Subject: merge from APPLIANCE_HEAD --- source/rpc_server/srv_pipe_hnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 65725bc2baa..f3c6fcd9b52 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -497,13 +497,13 @@ authentication failed. Denying the request.\n", p->name)); } /* - * Check the data length doesn't go over the 10Mb limit. + * Check the data length doesn't go over the 15Mb limit. * increased after observing a bug in the Windows NT 4.0 SP6a * spoolsv.exe when the response to a GETPRINTERDRIVER2 RPC * will not fit in the initial buffer of size 0x1068 --jerry 22/01/2002 */ - if(prs_data_size(&p->in_data.data) + data_len > 15*1024*1024) { + if(prs_offset(&p->in_data.data) + data_len > 15*1024*1024) { DEBUG(0,("process_request_pdu: rpc data buffer too large (%u) + (%u)\n", (unsigned int)prs_data_size(&p->in_data.data), (unsigned int)data_len )); set_incoming_fault(p); -- cgit From 8921f4abbd4fcfbab31ea27daf1a4ff579593e03 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 9 Feb 2002 02:59:31 +0000 Subject: Merge JohnR's stop form set spinning change. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 521fbbe306e..c0371ab0fb0 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6587,6 +6587,16 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE return WERR_BADFID; } + if (!get_printer_snum(p, handle, &snum)) + return ERROR_INVALID_HANDLE; + + if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { + DEBUG(3, ("security descriptor change denied by existing " + "security descriptor\n")); + result = ERROR_ACCESS_DENIED; + goto done; + } + /* can't delete if builtin */ if (get_a_builtin_ntform(form_name,&tmpForm)) { return WERR_INVALID_PARAM; @@ -6642,6 +6652,17 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * DEBUG(2,("_spoolss_setform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return WERR_BADFID; } + + if (!get_printer_snum(p, handle, &snum)) + return ERROR_INVALID_HANDLE; + + if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { + DEBUG(3, ("security descriptor change denied by existing " + "security descriptor\n")); + result = ERROR_ACCESS_DENIED; + goto done; + } + /* can't set if builtin */ if (get_a_builtin_ntform(&form->name,&tmpForm)) { return WERR_INVALID_PARAM; -- cgit From 8872c971682a2d1395cb13ee6d2da91ef34239f2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 9 Feb 2002 03:44:54 +0000 Subject: Fix changes between app-head and 2.2.x. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index c0371ab0fb0..bb516575f1b 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6588,13 +6588,12 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE } if (!get_printer_snum(p, handle, &snum)) - return ERROR_INVALID_HANDLE; + return WERR_BADFID; if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { DEBUG(3, ("security descriptor change denied by existing " "security descriptor\n")); - result = ERROR_ACCESS_DENIED; - goto done; + return WERR_ACCESS_DENIED; } /* can't delete if builtin */ @@ -6654,13 +6653,12 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * } if (!get_printer_snum(p, handle, &snum)) - return ERROR_INVALID_HANDLE; + return WERR_BADFID; if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { DEBUG(3, ("security descriptor change denied by existing " "security descriptor\n")); - result = ERROR_ACCESS_DENIED; - goto done; + return WERR_ACCESS_DENIED; } /* can't set if builtin */ -- cgit From b02786342aebb36f8cd2676e8cb372e89435058f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 9 Feb 2002 14:04:52 +0000 Subject: allocate an arc to JF --- docs/OID/allocated-arcs.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/OID/allocated-arcs.txt b/docs/OID/allocated-arcs.txt index 4666be4cd79..cb7c04c74fe 100644 --- a/docs/OID/allocated-arcs.txt +++ b/docs/OID/allocated-arcs.txt @@ -15,3 +15,5 @@ ARC Owner Contact Purpose .1 Plainjoe.org Jerry Carter Use for Plainjoe.org domain and examples in O'Reilly LDAP book .2 Samba 2.2. Release jerry@samba.org schema for representing smbpasswd +.3 Jean-Francois.Micouleau@dalalu.fr Experiemental SNMP fun + -- cgit From cba20f50264ae2846c4093ab937e41d1c8c32b2a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 11 Feb 2002 09:30:13 +0000 Subject: pdb_tdb was not working properly in 2.2 (yes also 2.2.3a), it was my fault, I'm so sorry :( addedd the missing line... --- source/passdb/pdb_tdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index 2af118d4061..58143977e08 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -549,6 +549,7 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname) strlower(name); get_private_directory(tdbfile); + pstrcat(tdbfile, "/"); pstrcat(tdbfile, PASSDB_FILE_NAME); /* set search key */ -- cgit From b8ae08de1b3dfdb83e2e89590bf47b478de439e2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Feb 2002 13:42:27 +0000 Subject: fix small typo in OID --- docs/OID/allocated-arcs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/OID/allocated-arcs.txt b/docs/OID/allocated-arcs.txt index cb7c04c74fe..acef4930eae 100644 --- a/docs/OID/allocated-arcs.txt +++ b/docs/OID/allocated-arcs.txt @@ -1,7 +1,7 @@ !=========================================================================================== !== !== Allocated Arcs from the Samba Team Private Enterprise Number -!== ISO(1) org(3) dod(6) internet(1) experimental(3) private(4) enterprise(1) Samba(7165) +!== ISO(1) org(3) dod(6) internet(1) private(4) enterprise(1) Samba(7165) !== !== Arc allocation is maintained by jerry carter . Please notify !== me if you need an OID and update this file. -- cgit From 0b5be86b40ae2c27082d0aca347aa34607834d0b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Feb 2002 13:46:42 +0000 Subject: fix stupid typo in OID :-( --- examples/LDAP/samba.schema | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema index 28828f4f940..0f9ec5faa44 100644 --- a/examples/LDAP/samba.schema +++ b/examples/LDAP/samba.schema @@ -114,12 +114,12 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID' ## The smbPasswordEntry objectclass has been depreciated in favor of the ## sambaAccount objectclass ## -#objectclass ( 1.3.1.5.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY +#objectclass ( 1.3.6.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY # DESC 'Samba smbpasswd entry' # MUST ( uid $ uidNumber ) # MAY ( lmPassword $ ntPassword $ pwdLastSet $ acctFlags )) -objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL +objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL DESC 'Samba Account' MUST ( uid $ rid ) MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ @@ -130,11 +130,11 @@ objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL ## ## Used for Winbind experimentation ## -objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY +objectclass ( 1.3.6.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY DESC 'Pool for allocating UNIX uids' MUST ( uidNumber $ cn ) ) -objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY +objectclass ( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY DESC 'Pool for allocating UNIX gids' MUST ( gidNumber $ cn ) ) -- cgit From ae90bf465728a8a328b0fa42c9d4301e1253effd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Feb 2002 13:57:19 +0000 Subject: fixed typo in comments --- examples/LDAP/samba.schema | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema index 0f9ec5faa44..be088c74033 100644 --- a/examples/LDAP/samba.schema +++ b/examples/LDAP/samba.schema @@ -6,8 +6,8 @@ ## Prerequisite schemas - uid (cosine.schema) ## - displayName (inetorgperson.schema) ## -## 1.3.1.5.1.4.1.7165.2.1.x - attributetypes -## 1.3.1.5.1.4.1.7165.2.2.x - objectclasses +## 1.3.6.1.4.1.7165.2.1.x - attributetypes +## 1.3.6.1.4.1.7165.2.2.x - objectclasses ## ## -- cgit From f6695610eec45bb30c371108f50e7cb156e56fc8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Feb 2002 19:22:42 +0000 Subject: add missing print_access_check() for _spoolss_addform() --- source/rpc_server/srv_spoolss_nt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index bb516575f1b..1c6fbd17410 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6523,14 +6523,15 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM return WERR_BADFID; } - /* - * FIXME!! Feels like there should be an access check here, but haven't - * had time to verify. --jerry - */ - - if (!get_printer_snum(p,handle, &snum)) return WERR_BADFID; + + if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { + DEBUG(3, ("security descriptor change denied by existing " + "security descriptor\n")); + result = ERROR_ACCESS_DENIED; + goto done; + } /* can't add if builtin */ if (get_a_builtin_ntform(&form->name,&tmpForm)) { -- cgit From 5db1d5f335e49e14df8297d95546bb26b7d3efdc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Feb 2002 19:26:46 +0000 Subject: regenerated docs that didn't get checked in for 2.2.3a :-( Mostly just typos.... --- docs/Samba-HOWTO-Collection.pdf | 10 ++-- docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml | 2 +- docs/htmldocs/Samba-HOWTO-Collection.html | 2 +- docs/htmldocs/Samba-LDAP-HOWTO.html | 2 +- docs/htmldocs/smb.conf.5.html | 80 ++++++++++++++++++++++++++++-- docs/manpages/smb.conf.5 | 34 +++++++++++-- 6 files changed, 112 insertions(+), 18 deletions(-) diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf index 06fd459fc26..24b4a205c94 100644 --- a/docs/Samba-HOWTO-Collection.pdf +++ b/docs/Samba-HOWTO-Collection.pdf @@ -1,6 +1,6 @@ %PDF-1.2 %âãÏÓ -1 0 obj<>endobj +1 0 obj<>endobj 2 0 obj<>endobj 3 0 obj<>endobj 4 0 obj<>endobj @@ -1810,10 +1810,8 @@ x †d$­a; Ñp‚O¿4ããÜÿòn¦óTÆCl.½ nÿùÂ1-ÖÈh:™SZÄåî-¢n8&}ÒÙZm £² ½‰t%h§Ü–þøüøånñ½3 ÞÖqeôW.3^¤ÈoNéŒMûÏc Ã*Zo8ãM M*‹’"–d‹<ׯÑZr[|s¬Ç(ÒEæH¯¾ËÈÁ–DvŠ+ƒ_µ9•æ?iîi­Œuˆœ؇Ï/dà¬ôØh+SËD’Ód‘Ç·ö<[:zªÄÿ1ñ) „7£µ»¡jyâ—»Q^å]GéKõ5Ib‘÷«ÐýXx—¯rïî€0çÑÏ*8÷Ò­ -@í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ uO£¸Ç -›Vò–ÅQ%ÎĹ­peÊ)²:eÑÇ*’–ÐôåwÕ”jôDaåºH’S»Û{ÿ/oâv¨+ò3y­“Dïøl‘{‘扼/É¡ Ìua 3K©ÀÁá>ž -Q"¬…ɲËÓ!×ÖªUràÔÞŸ­ ÞNí7A„¥L’åÝõÖ£_1X«¡¨z‚›f[Aœ·-K '÷þH+“G‡ÉwoÔhžZùêÛF:Tžï2‘.»Z•bÈžZ•r#íýÑkÝ%<¼èò¸v»ùΨøªc¬5}62mj‡£×¹À´°Lo“ã-LXiQ1‚®1 -”V’9Æ5U6W×"]áâç˜è©øÊlócfQÖ¨úº·Trį£*hyŸîm—o]s_§³€o‚|:Ý»Þÿ|z¤/F—wžÏ:*xŒ¯Q½jW¯Úöc·´ñlŒ©^ÞÓ¦CFþÝù{ áendstream +@í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ u<¡:ÒkŽn%¥d¶’5Wq ›•„Š!¯Ÿgð¨·î“zhóRn77ÔÓ± f–ýÛ…e“Zv#$S+Øù^ sbZ˜Q$nyWW€Äê®»’NO+|ÙFý†kï¡‘F&eŒ0ÜÑÍnþåP-a°2Ýk„ÿ‚«æ4ùXz‘E:M%F—ÛòI­é  Ú þ“ÇúldÚÔ:G¯s h1^™Þ&<Ä[˜ ±Ò¢b]c(­$s:‹kª>l® ¯EºÂÄÏ1ÑSñ•ÙæÇÌ¢¬Qõuo©äˆ_=FUÐò67 ÜÚ.ß¹æþ¶Ngßùútºu½=þùôH_Œ.o<ŸuTð9^¢zÕ®^µíÇîhãÙS½¼¥M‡Œ2ü»ó? +endstream endobj 822 0 obj 1030 @@ -3347,7 +3345,7 @@ xref 0000233531 00000 n 0000233626 00000 n trailer -<]>> +<]>> startxref 233841 %%EOF diff --git a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml index 13a038cf375..c6c04ccab83 100644 --- a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml +++ b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml @@ -224,7 +224,7 @@ Next, include the samba.schema file in slapd.conf The sambaAccount object contains two attributes which depend upon other schema files. The 'uid' attribute is defined in cosine.schema and the 'displayName' attribute is defined in the inetorgperson.schema -file. Bother of these must be included before the samba.schema file. +file. Both of these must be included before the samba.schema file. diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index 8009bb8b86f..c641050a39b 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -8530,7 +8530,7 @@ the 'displayName' attribute is defined in the inetorgperson.schema -file. Bother of these must be included before the samba.schema file.

    inetorgperson.schema
    -file. Bother of these must be included before the samba.schema file.

  • share modes

  • EXPLANATION OF EACH PARAMETER

  • share modes (S)

    This enables or disables the honoring of + the share modes during a file open. These + modes are used by clients to gain exclusive read or write access + to a file.

    These open modes are not directly supported by UNIX, so + they are simulated using shared memory, or lock files if your + UNIX doesn't support shared memory (almost all do).

    The share modes that are enabled by this option are + DENY_DOS, DENY_ALL, + DENY_READ, DENY_WRITE, + DENY_NONE and DENY_FCB. +

    This option gives full share compatibility and enabled + by default.

    You should NEVER turn this parameter + off as many Windows applications will break if you do so.

    Default: share modes = yes

    short preserve case (S)

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "01 February 2002" "" "" +.TH "SMB.CONF" "5" "06 February 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -1335,6 +1335,9 @@ each parameter for details. Note that some are synonyms. \fIset directory\fR .TP 0.2i \(bu +\fIshare modes\fR +.TP 0.2i +\(bu \fIshort preserve case\fR .TP 0.2i \(bu @@ -2879,7 +2882,7 @@ would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'. .TP -\fBforce directory\fR +\fBforce directory security mode (S)\fR This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box. @@ -6007,6 +6010,29 @@ for details. Default: \fBset directory = no\fR .TP +\fBshare modes (S)\fR +This enables or disables the honoring of +the \fIshare modes\fR during a file open. These +modes are used by clients to gain exclusive read or write access +to a file. + +These open modes are not directly supported by UNIX, so +they are simulated using shared memory, or lock files if your +UNIX doesn't support shared memory (almost all do). + +The share modes that are enabled by this option are +DENY_DOS, DENY_ALL, +DENY_READ, DENY_WRITE, +DENY_NONE and DENY_FCB. + +This option gives full share compatibility and enabled +by default. + +You should \fBNEVER\fR turn this parameter +off as many Windows applications will break if you do so. + +Default: \fBshare modes = yes\fR +.TP \fBshort preserve case (S)\fR This boolean parameter controls if new files which conform to 8.3 syntax, that is all in upper case and of @@ -7143,7 +7169,7 @@ again. Default: \fBwinbind cache type = 15\fR .TP -\fBwinbind enum\fR +\fBwinbind enum users\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of users through the @@ -7162,7 +7188,7 @@ usernames. Default: \fBwinbind enum users = yes \fR .TP -\fBwinbind enum\fR +\fBwinbind enum groups\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of groups through the -- cgit From 88e9757b4063a458438d74f8138936e99869ec7d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Feb 2002 15:21:04 +0000 Subject: fixed compile error --- source/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 1c6fbd17410..4314ef3bc09 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6529,7 +6529,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { DEBUG(3, ("security descriptor change denied by existing " "security descriptor\n")); - result = ERROR_ACCESS_DENIED; + status = WERR_ACCESS_DENIED; goto done; } -- cgit From 38ba97400e4640b2720db0d1d6a379aea708bbe8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Feb 2002 15:39:11 +0000 Subject: reorder some functions to remove compiler warnings --- source/utils/smbpasswd.c | 109 ++++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index b37777c577c..39a15a37867 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -48,6 +48,61 @@ static fstring ldap_secret; #endif + +/********************************************************* + A strdup with exit +**********************************************************/ + +static char *strdup_x(const char *s) +{ + char *new_s = strdup(s); + if (!new_s) { + fprintf(stderr,"out of memory\n"); + exit(1); + } + return new_s; +} + + +/********************************************************* + Print command usage on stderr and die. +**********************************************************/ +static void usage(void) +{ + if (getuid() == 0) { + printf("smbpasswd [options] [username] [password]\n"); + } else { + printf("smbpasswd [options] [password]\n"); + } + printf("options:\n"); + printf(" -c smb.conf file Use the given path to the smb.conf file\n"); + printf(" -s use stdin for password prompt\n"); + printf(" -D LEVEL debug level\n"); + printf(" -U USER remote username\n"); + printf(" -r MACHINE remote machine\n"); + + if (getuid() == 0 || local_mode) { + printf(" -L local mode\n"); + printf(" -R ORDER name resolve order\n"); + printf(" -j DOMAIN join domain name\n"); + printf(" -a add user\n"); + printf(" -x delete user\n"); + printf(" -d disable user\n"); + printf(" -e enable user\n"); + printf(" -n set no password\n"); + printf(" -m machine trust account\n"); +#ifdef WITH_LDAP_SAM + printf(" -w ldap admin password\n"); +#endif + } + exit(1); +} + +static void set_line_buffering(FILE *f) +{ + setvbuf(f, NULL, _IOLBF, 0); +} + /******************************************************************* Process command line options ******************************************************************/ @@ -179,55 +234,6 @@ bad_args: } -/********************************************************* - A strdup with exit -**********************************************************/ - -static char *strdup_x(const char *s) -{ - char *new_s = strdup(s); - if (!new_s) { - fprintf(stderr,"out of memory\n"); - exit(1); - } - return new_s; -} - - -/********************************************************* - Print command usage on stderr and die. -**********************************************************/ -static void usage(void) -{ - if (getuid() == 0) { - printf("smbpasswd [options] [username] [password]\n"); - } else { - printf("smbpasswd [options] [password]\n"); - } - printf("options:\n"); - printf(" -c smb.conf file Use the given path to the smb.conf file\n"); - printf(" -s use stdin for password prompt\n"); - printf(" -D LEVEL debug level\n"); - printf(" -U USER remote username\n"); - printf(" -r MACHINE remote machine\n"); - - if (getuid() == 0 || local_mode) { - printf(" -L local mode\n"); - printf(" -R ORDER name resolve order\n"); - printf(" -j DOMAIN join domain name\n"); - printf(" -a add user\n"); - printf(" -x delete user\n"); - printf(" -d disable user\n"); - printf(" -e enable user\n"); - printf(" -n set no password\n"); - printf(" -m machine trust account\n"); -#ifdef WITH_LDAP_SAM - printf(" -w ldap admin password\n"); -#endif - } - exit(1); -} - /* Initialise client credentials for authenticated pipe access */ void init_rpcclient_creds(struct ntuser_creds *creds, char* username, @@ -590,11 +596,6 @@ unable to join domain.\n"); return 0; } -static void set_line_buffering(FILE *f) -{ - setvbuf(f, NULL, _IOLBF, 0); -} - /************************************************************* Utility function to prompt for passwords from stdin. Each password entered must end with a newline. -- cgit From 2daa024b20d83b89bb1f5e890e1b196fb1c84319 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 12 Feb 2002 15:41:25 +0000 Subject: sync with 2.2 release --- WHATSNEW.txt | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 3ee6bda2ac8..24019eeb504 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,5 +1,5 @@ - WHATS NEW IN Samba 2.2.3 - 2nd February 2002 - ============================================= + WHATS NEW IN Samba 2.2.3a - 6th February 2002 + ============================================== This is the latest stable release of Samba. This is the version that all production Samba servers should be running for all current bug-fixes. @@ -7,6 +7,25 @@ production Samba servers should be running for all current bug-fixes. There are several important scaling bugs that have been fixed in this release for large server systems so an upgrade is recommended. +Change from 2.2.3 +----------------- + +This is a minor bugfix release for the 2.2.3 release. The 2.2.3 +release had a problem that was visible to Windows 2000 Explorer +users in that copying files into a share that already existed +failed with "Access Denied" rather than asking the user if an +overwrite was required. This was due to an incorrect error mapping +between the UNIX EEXIST error code and the NT status error. + +As Windows Explorer is a highly visible end user application a quick +bugfix release was required, hence 2.2.3a. + +Compilation on HPUX versions earlier than HPUX 11 has also been +corrected. + +The cvs.log file is no longer included with this release, as it adds +13Mb to the size of the release, and is easily available on the Web. + LDAP update ----------- @@ -36,8 +55,8 @@ winbindd and wbinfo. Note that winbindd is not installed by default. -New/Changed parameters in 2.2.3 -------------------------------- +New/Changed parameters in 2.2.3a +-------------------------------- For more information on these parameters, see the man pages for smb.conf. -- cgit From f667096ad397cd8c3e81ddebceaed9fc433ebaa5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Feb 2002 15:56:20 +0000 Subject: fixes for some compile warnings in psm_smbpass --- source/Makefile.in | 2 +- source/pam_smbpass/pam_smb_acct.c | 1 - source/pam_smbpass/pam_smb_auth.c | 3 +++ source/pam_smbpass/pam_smb_passwd.c | 3 +-- source/pam_smbpass/support.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 067b223008f..2370121d191 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -363,7 +363,7 @@ PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ lib/util_unistr.o lib/signal.o lib/talloc.o lib/ms_fnmatch.o \ lib/util_sock.o lib/smbrun.o lib/util_sec.o lib/snprintf.o \ ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \ - $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) + lib/interfaces.o $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0:.o=.po) LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po) diff --git a/source/pam_smbpass/pam_smb_acct.c b/source/pam_smbpass/pam_smb_acct.c index 8d91c456bf4..22f8e756581 100644 --- a/source/pam_smbpass/pam_smb_acct.c +++ b/source/pam_smbpass/pam_smb_acct.c @@ -45,7 +45,6 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags, int retval; const char *name; - const char *p; SAM_ACCOUNT *sampass = NULL; extern BOOL in_client; diff --git a/source/pam_smbpass/pam_smb_auth.c b/source/pam_smbpass/pam_smb_auth.c index a4f784701c3..6a3e6e56598 100644 --- a/source/pam_smbpass/pam_smb_auth.c +++ b/source/pam_smbpass/pam_smb_auth.c @@ -47,6 +47,9 @@ do { \ static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl, const char *name, SAM_ACCOUNT *sampass, BOOL exist); +int make_remark(pam_handle_t *, unsigned int, int, const char *); + + /* * pam_sm_authenticate() authenticates users against the samba password file. * diff --git a/source/pam_smbpass/pam_smb_passwd.c b/source/pam_smbpass/pam_smb_passwd.c index da96f375d5a..4cdf5c3e9b0 100644 --- a/source/pam_smbpass/pam_smb_passwd.c +++ b/source/pam_smbpass/pam_smb_passwd.c @@ -35,8 +35,7 @@ int smb_update_db( pam_handle_t *pamh, int ctrl, const char *user, char *pass_new ) { - char c; - int retval, i; + int retval; pstring err_str; pstring msg_str; diff --git a/source/pam_smbpass/support.c b/source/pam_smbpass/support.c index 3f5d52cdef2..5a245ec5575 100644 --- a/source/pam_smbpass/support.c +++ b/source/pam_smbpass/support.c @@ -303,7 +303,7 @@ int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass, uchar hash_pass[16]; uchar lm_pw[16]; uchar nt_pw[16]; - int retval; + int retval = PAM_AUTH_ERR; char *data_name; const char *name; -- cgit From 3762d6b1e0b8c152a720a0be7ad252d2b5e69bf1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Feb 2002 19:14:12 +0000 Subject: fix to make device mode changes be saved again --- source/rpc_server/srv_spoolss_nt.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 4314ef3bc09..c9ba7023b5a 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4438,6 +4438,8 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) return True; } +#if 0 /* JERRY */ + /* Return true if two devicemodes are equal */ #define DEVMODE_CHECK_INT(field) \ @@ -4447,6 +4449,10 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) return False; \ } +/************************************************************************ + Handy, but currently unused functions + ***********************************************************************/ + static BOOL nt_devicemode_equal(NT_DEVICEMODE *d1, NT_DEVICEMODE *d2) { if (!d1 && !d2) goto equal; /* if both are NULL they are equal */ @@ -4678,6 +4684,8 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1, return True; } +#endif + /******************************************************************** * Called by spoolss_api_setprinter * when updating a printer description. @@ -4751,9 +4759,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, goto done; } - /* NT likes to call this function even though nothing has actually - changed. Check this so the user doesn't end up with an - annoying permission denied dialog box. */ +#if 0 /* JERRY */ + + /* + * Another one of those historical misunderstandings... + * This is reminisent of a similar call we had in _spoolss_setprinterdata() + * I'm leaving it here as a reminder. --jerry + */ if (nt_printer_info_level_equal(printer, old_printer)) { DEBUG(3, ("update_printer: printer info has not changed\n")); @@ -4761,6 +4773,8 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, goto done; } +#endif + /* Check calling user has permission to update printer description */ if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { @@ -4800,7 +4814,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, * lookup previously saved driver initialization info, which is then * bound to the printer, simulating what happens in the Windows arch. */ - if (strequal(printer->info_2->drivername, old_printer->info_2->drivername)) + if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)) set_driver_init(printer, 2); } -- cgit From 53a5c019b818359424e54ec164ae9d86b965a250 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Feb 2002 22:19:37 +0000 Subject: removed extra get_printer_snum() calls --- source/rpc_server/srv_spoolss_nt.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index c9ba7023b5a..52ca96bf69e 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6561,9 +6561,6 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM * ChangeID must always be set */ - if (!get_printer_snum(p,handle, &snum)) - return WERR_BADFID; - status = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(status)) goto done; @@ -6624,9 +6621,6 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE * ChangeID must always be set */ - if (!get_printer_snum(p,handle, &snum)) - return WERR_BADFID; - status = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(status)) goto done; @@ -6689,9 +6683,6 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * * ChangeID must always be set */ - if (!get_printer_snum(p,handle, &snum)) - return WERR_BADFID; - status = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(status)) goto done; -- cgit From 045b231ca5e38e6d0633ce44b2e9749681e24c58 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 13 Feb 2002 16:05:13 +0000 Subject: reformat --- source/libsmb/cliconnect.c | 75 +++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index 16da673e73c..751bac6e6ba 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -932,53 +932,54 @@ BOOL cli_establish_connection(struct cli_state *cli, BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, struct in_addr *pdest_ip) { - struct nmb_name calling, called; + struct nmb_name calling, called; - make_nmb_name(&calling, srchost, 0x0); + make_nmb_name(&calling, srchost, 0x0); - /* - * If the called name is an IP address - * then use *SMBSERVER immediately. - */ + /* + * If the called name is an IP address + * then use *SMBSERVER immediately. + */ - if(is_ipaddress(desthost)) - make_nmb_name(&called, "*SMBSERVER", 0x20); - else - make_nmb_name(&called, desthost, 0x20); + if(is_ipaddress(desthost)) + make_nmb_name(&called, "*SMBSERVER", 0x20); + else + make_nmb_name(&called, desthost, 0x20); - if (!cli_session_request(cli, &calling, &called)) { - struct nmb_name smbservername; + if (!cli_session_request(cli, &calling, &called)) { + + struct nmb_name smbservername; - make_nmb_name(&smbservername , "*SMBSERVER", 0x20); + make_nmb_name(&smbservername , "*SMBSERVER", 0x20); - /* - * If the name wasn't *SMBSERVER then - * try with *SMBSERVER if the first name fails. - */ + /* + * If the name wasn't *SMBSERVER then + * try with *SMBSERVER if the first name fails. + */ - if (nmb_name_equal(&called, &smbservername)) { + if (nmb_name_equal(&called, &smbservername)) { - /* - * The name used was *SMBSERVER, don't bother with another name. - */ + /* + * The name used was *SMBSERVER, don't bother with another name. + */ - DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER \ -with error %s.\n", desthost, cli_errstr(cli) )); - cli_shutdown(cli); - return False; - } + DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s.\n", + desthost, cli_errstr(cli) )); + cli_shutdown(cli); + return False; + } - cli_shutdown(cli); + cli_shutdown(cli); - if (!cli_initialise(cli) || - !cli_connect(cli, desthost, pdest_ip) || - !cli_session_request(cli, &calling, &smbservername)) { - DEBUG(0,("attempt_netbios_session_request: %s rejected the session for \ -name *SMBSERVER with error %s\n", desthost, cli_errstr(cli) )); - cli_shutdown(cli); - return False; - } - } + if (!cli_initialise(cli) || !cli_connect(cli, desthost, pdest_ip) || + !cli_session_request(cli, &calling, &smbservername)) + { + DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s\n", + desthost, cli_errstr(cli) )); + cli_shutdown(cli); + return False; + } + } - return True; + return True; } -- cgit From 67501864d765f17ba3195f728e495ecbab968eea Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 13 Feb 2002 16:36:24 +0000 Subject: * fix smbd crash when netbios session request fails from spoolss_connect_to_client(). * Added check against running cli_errstr() against an uninitialised cli_state struct --- source/libsmb/cli_lsarpc.c | 4 ++-- source/libsmb/clierror.c | 6 ++++++ source/libsmb/domain_client_validate.c | 3 +-- source/rpc_client/cli_spoolss_notify.c | 4 ++-- source/rpc_client/cli_trust.c | 5 ++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c index 992c5c0439c..c7bcc1490ba 100644 --- a/source/libsmb/cli_lsarpc.c +++ b/source/libsmb/cli_lsarpc.c @@ -839,8 +839,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) )); } if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) { - DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS \ -session request. Error was %s\n", remote_machine, cli_errstr(&cli) )); + DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n", + remote_machine)); goto done; } diff --git a/source/libsmb/clierror.c b/source/libsmb/clierror.c index 6957c2cec29..33c359fc2d3 100644 --- a/source/libsmb/clierror.c +++ b/source/libsmb/clierror.c @@ -75,6 +75,12 @@ char *cli_errstr(struct cli_state *cli) uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), errnum; uint8 errclass; int i; + + if (!cli->initialised) { + fstrcpy(cli_error_message, "[Programmer's error] cli_errstr called on unitialized cli_stat struct!\n"); + return cli_error_message; + } + /* Case #1: RAP error */ if (cli->rap_error) { diff --git a/source/libsmb/domain_client_validate.c b/source/libsmb/domain_client_validate.c index 04ce90895ae..b76f462dc9e 100644 --- a/source/libsmb/domain_client_validate.c +++ b/source/libsmb/domain_client_validate.c @@ -86,8 +86,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); } if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) { - DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \ -session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); + DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS session request.\n", remote_machine)); return False; } diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index a96fd8e0dde..7b5ba84dbb6 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -70,8 +70,8 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine) } if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) { - DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request. Error was %s\n", remote_machine, cli_errstr(cli) )); - cli_shutdown(cli); + DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", + remote_machine)); return False; } diff --git a/source/rpc_client/cli_trust.c b/source/rpc_client/cli_trust.c index c910e2f334a..21eb878deb3 100644 --- a/source/rpc_client/cli_trust.c +++ b/source/rpc_client/cli_trust.c @@ -74,9 +74,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) )); } if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) { - DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS \ -session request. Error was %s\n", remote_machine, cli_errstr(&cli) )); - cli_shutdown(&cli); + DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS session request.\n", + remote_machine )); return False; } -- cgit From f3b38c491fd07612dfba062aca13a82b5614334c Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 13 Feb 2002 17:20:22 +0000 Subject: get rid of compiler warning --- source/smbd/password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index 4ccade52cec..29c0cc7197c 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -670,7 +670,7 @@ static char *validate_group(const char *group,char *password,int pwlen,int snum) #ifdef HAVE_NETGROUP { char *host, *user, *domain; - setnetgrent(group); + setnetgrent((char *)group); while (getnetgrent(&host, &user, &domain)) { if (user) { if (user_ok(user, snum) && -- cgit From b394b3303fdb69ffd2cbb84d2bbd9a4dc05a4118 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 13 Feb 2002 17:29:30 +0000 Subject: get rid of compiler warnings --- source/nsswitch/winbindd_util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index c0c7b6ae0dd..e3441624647 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -428,11 +428,11 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty /* Return name type */ if ((type != NULL) && (types != NULL)) - *type = types[0]; + *type = (enum SID_NAME_USE)types[0]; /* Store the forward and reverse map of this lookup in the cache. */ - store_sid_by_name_in_cache(name, &sids[0], types[0]); - store_name_by_sid_in_cache(&sids[0], name, types[0]); + store_sid_by_name_in_cache(name, &sids[0], (enum SID_NAME_USE)types[0]); + store_name_by_sid_in_cache(&sids[0], name, (enum SID_NAME_USE)types[0]); } else { /* JRA. Here's where we add the -ve cache store with a name type of SID_NAME_USE_NONE. */ DOM_SID nullsid; @@ -509,10 +509,10 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, /* Return name type */ if ((type != NULL) && (types != NULL)) - *type = types[0]; + *type = (enum SID_NAME_USE)types[0]; - store_sid_by_name_in_cache(names[0], sid, types[0]); - store_name_by_sid_in_cache(sid, names[0], types[0]); + store_sid_by_name_in_cache(names[0], sid, (enum SID_NAME_USE)types[0]); + store_name_by_sid_in_cache(sid, names[0], (enum SID_NAME_USE)types[0]); } else { /* OK, so we tried to look up a name in this sid, and * didn't find it. Therefore add a negative cache -- cgit From 897f463dad2698bd4490fa1e15e97f54a3533ab4 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 02:02:55 +0000 Subject: fix joining domain on big endian machine when using -U to smbpasswd --- source/utils/smbpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 39a15a37867..f82e4d58b7d 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -453,7 +453,7 @@ static int join_domain_byuser(char *domain, char *remote_machine, encode_pw_buffer((char *)pwbuf, machine_pwd, plen, False); - nt_owf_genW(&upw, ntpw); + mdfour( ntpw, (char *)upw.buffer, plen); } /* Set password on machine account */ -- cgit From 2ff50ba28a7b893ad565e0abd97d4e4cc4e2c0c7 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 22:11:07 +0000 Subject: allow command line arg to override smb.conf log level --- source/nmbd/nmbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index fa4e1c4cfd9..de955b79fe4 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -662,6 +662,7 @@ static void usage(char *pname) extern FILE *dbf; extern char *optarg; extern BOOL append_log; + extern BOOL AllowDebugChange; BOOL opt_interactive = False; pstring logfile; @@ -754,6 +755,7 @@ static void usage(char *pname) break; case 'd': DEBUGLEVEL = atoi(optarg); + AllowDebugChange = False; break; case 'p': global_nmb_port = atoi(optarg); -- cgit From 63ab6d54429bd7a8f7d167902032a1915c083d90 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 22:32:41 +0000 Subject: print out debug level even when we don't allow it to be changed. --- source/lib/debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/lib/debug.c b/source/lib/debug.c index d3ba8f9c370..6c61d45d224 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -214,8 +214,12 @@ BOOL debug_parse_levels(char *params_str) char *params[DBGC_LAST]; int debuglevel_class[DBGC_LAST]; - if (AllowDebugChange == False) + if (AllowDebugChange == False) { + DEBUG(1,("INFO: Debug class %s level = %d\n", + classname_table[DBGC_ALL], + DEBUGLEVEL_CLASS[DBGC_ALL])); return True; + } ZERO_ARRAY(params); ZERO_ARRAY(debuglevel_class); -- cgit From 35c66d3fca308e2f1640ca4a84e5e83574c82bba Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 23:23:00 +0000 Subject: allow nmbd to register 1b name with wins server if there is an old IP there. This causes the become_domain_master_query_success function to try to continue to become a dmb even if we got a response to the 1b name query. If the machine is still alive, and defending the name, we will get an error and fail to become dmb (as we should). If there is no machine defending, we will register the name. This was tested with broadcast as well and I could see no problems with this. If the name query is not tried again in broadcast mode you can get an old IP from your browse cache and not register even though the machine is gone. --- source/nmbd/nmbd_become_dmb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/nmbd/nmbd_become_dmb.c b/source/nmbd/nmbd_become_dmb.c index 6825643c85a..59edbbc9d7b 100644 --- a/source/nmbd/nmbd_become_dmb.c +++ b/source/nmbd/nmbd_become_dmb.c @@ -231,12 +231,13 @@ static void become_domain_master_query_success(struct subnet_record *subrec, else { if( DEBUGLVL( 0 ) ) - { + { dbgtext( "become_domain_master_query_success:\n" ); dbgtext( "There is already a domain master browser at " ); dbgtext( "IP %s for workgroup %s ", inet_ntoa(ip), nmbname->name ); dbgtext( "registered on subnet %s.\n", subrec->subnet_name ); - } + } + become_domain_master_stage1(subrec, nmbname->name); } } -- cgit From dee2a8fb4b81f24ce2906d7b130952c8e3419615 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 23:35:47 +0000 Subject: get rid of compiler warning --- source/libsmb/clistr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/clistr.c b/source/libsmb/clistr.c index 8a76855c7f4..126cc05e010 100644 --- a/source/libsmb/clistr.c +++ b/source/libsmb/clistr.c @@ -73,7 +73,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len /* the server likes unicode. give it the works */ if (flags & STR_CONVERT) - dos_PutUniCode(dest, unix_to_dos(src,False), dest_len, flags & STR_TERMINATE); + dos_PutUniCode(dest, (char *)unix_to_dos(src,False), dest_len, flags & STR_TERMINATE); else unix_PutUniCode(dest, src, dest_len, flags & STR_TERMINATE); -- cgit From 995755fc30c23db34074f48483b563481eff4b44 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 23:54:48 +0000 Subject: really get rid of compiler warning this time :-) --- source/libsmb/clistr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/clistr.c b/source/libsmb/clistr.c index 126cc05e010..aa3575571d2 100644 --- a/source/libsmb/clistr.c +++ b/source/libsmb/clistr.c @@ -73,7 +73,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len /* the server likes unicode. give it the works */ if (flags & STR_CONVERT) - dos_PutUniCode(dest, (char *)unix_to_dos(src,False), dest_len, flags & STR_TERMINATE); + dos_PutUniCode(dest, unix_to_dos((char *)src,False), dest_len, flags & STR_TERMINATE); else unix_PutUniCode(dest, src, dest_len, flags & STR_TERMINATE); -- cgit From a1f99767e203e0fe3646d8d342afe7d049f37c55 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 14 Feb 2002 23:58:06 +0000 Subject: another compiler warning --- source/rpc_server/srv_srvsvc_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index d1fa83ce437..6d8d8459aae 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -1597,7 +1597,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE BOOL bad_path; int access_mode; int action; - uint32 ecode; + int ecode; struct current_user user; fstring user_name; connection_struct *conn = NULL; -- cgit From a75ce2d1e658b25fc158960436b0e4af89bfe739 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 15 Feb 2002 00:31:27 +0000 Subject: one more compiler warning. I introduced this one myself :-) --- source/utils/smbpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index f82e4d58b7d..fe084e9eaba 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -453,7 +453,7 @@ static int join_domain_byuser(char *domain, char *remote_machine, encode_pw_buffer((char *)pwbuf, machine_pwd, plen, False); - mdfour( ntpw, (char *)upw.buffer, plen); + mdfour( ntpw, (unsigned char *)upw.buffer, plen); } /* Set password on machine account */ -- cgit From c9399a90e27f47ac85f8fdb07a1073b6ca47f81a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 15 Feb 2002 02:46:54 +0000 Subject: More merge of smbclient print crash bug fix. --- source/smbd/open.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/smbd/open.c b/source/smbd/open.c index 9cefcc9b45e..4b659305473 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -637,8 +637,10 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S if (conn->printer) { /* printers are handled completely differently. Most of the passed parameters are ignored */ - *Access = DOS_OPEN_WRONLY; - *action = FILE_WAS_CREATED; + if (Access) + *Access = DOS_OPEN_WRONLY; + if (action) + *action = FILE_WAS_CREATED; return print_fsp_open(conn, fname); } -- cgit From 94edc28cbfbbf53ed63f62d3a06f7bc6bfac28b4 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 15 Feb 2002 18:50:28 +0000 Subject: move charset initialize to before processing options. Spotted by Michael Steffens --- source/utils/smbpasswd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index fe084e9eaba..48200812b05 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -975,13 +975,13 @@ int main(int argc, char **argv) set_auth_parameters(argc, argv); #endif /* HAVE_SET_AUTH_PARAMETERS */ + charset_initialise(); + process_options(argc, argv, amroot); TimeInit(); setup_logging("smbpasswd", True); - charset_initialise(); - if(!initialize_password_db(False)) { fprintf(stderr, "Can't setup password database vectors.\n"); exit(1); -- cgit From f2ec1dcfc7edf7bc6f81c3ba6ae14ed72aff1762 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 15 Feb 2002 18:59:14 +0000 Subject: merge from APPLIANCE_HEAD --- source/rpc_server/srv_spoolss_nt.c | 93 ++++++++------------------------------ 1 file changed, 18 insertions(+), 75 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 52ca96bf69e..de7b5b70844 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -402,10 +402,10 @@ static BOOL set_printer_hnd_printertype(Printer_entry *Printer, char *handlename static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) { - NT_PRINTER_INFO_LEVEL *printer = NULL; int snum; int n_services=lp_numservices(); char *aprinter; + fstring sname; BOOL found=False; DEBUG(4,("Setting printer name=%s (len=%d)\n", handlename, strlen(handlename))); @@ -430,97 +430,40 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) DEBUGADD(5,("searching for [%s] (len=%d)\n", aprinter, strlen(aprinter))); /* - * store the Samba share name in it - * in back we have the long printer name - * need to iterate all the snum and do a - * get_a_printer each time to find the printer - * faster to do it here than later. + * The original code allowed smbd to store a printer name that + * was different from the share name. This is not possible + * anymore, so I've simplified this loop greatly. Here + * we are just verifying that the printer name is a valid + * printer service defined in smb.conf + * --jerry [Fri Feb 15 11:17:46 CST 2002] */ - for (snum=0;snuminfo_2->printername+2, '\\'); - printername++; - - DEBUG(10,("set_printer_hnd_name: name [%s], aprinter [%s]\n", - printer->info_2->printername, aprinter )); + fstrcpy(sname, lp_servicename(snum)); - if ( strlen(printername) != strlen(aprinter) ) { - free_a_printer(&printer, 2); - continue; - } + DEBUGADD(5,("share:%s\n",sname)); - if ( strncasecmp(printername, aprinter, strlen(aprinter))) { - free_a_printer(&printer, 2); - continue; + if (! StrCaseCmp(sname, aprinter)) { + found = True; + break; } - - found=True; - } - - /* - * if we haven't found a printer with the given handlename - * then it can be a share name as you can open both \\server\printer and - * \\server\share - */ - - /* - * we still check if the printer description file exists as NT won't be happy - * if we reply OK in the openprinter call and can't reply in the subsequent RPC calls - */ - - if (found==False) { - DEBUGADD(5,("Printer not found, checking for share now\n")); - - for (snum=0;snuminfo_2->printername, aprinter )); - - if ( strlen(lp_servicename(snum)) != strlen(aprinter) ) { - free_a_printer(&printer, 2); - continue; - } - - if ( strncasecmp(lp_servicename(snum), aprinter, strlen(aprinter))) { - free_a_printer(&printer, 2); - continue; - } - - found=True; - } } + - if (found==False) { + if (!found) { DEBUGADD(4,("Printer not found\n")); return False; } - snum--; - DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s[%x]\n", - printer->info_2->printername, lp_servicename(snum),snum)); + DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s\n", aprinter, sname)); ZERO_STRUCT(Printer->dev.handlename); - strncpy(Printer->dev.handlename, lp_servicename(snum), strlen(lp_servicename(snum))); - - free_a_printer(&printer, 2); + fstrcpy(Printer->dev.handlename, sname); return True; } -- cgit From 49ebd50efd11bfea950e904d28eadf42b08ad74d Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 15 Feb 2002 22:18:06 +0000 Subject: merge from head --- source/lib/util_sock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index c3eb78109c2..efc2e218ee6 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -609,7 +609,10 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) len = read_smb_length_return_keepalive(fd,buffer,timeout); if (len < 0) { DEBUG(10,("receive_smb: length < 0!\n")); - smb_read_error = READ_ERROR; + /* XXX: You might think that we ought to set + * smb_read_error here, but apparently that breaks the + * recursive main loop in oplock.c. Global variables + * suck. */ return(False); } -- cgit From 7e1e517b625f3c737391470ec614cbaea3047eae Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Sat, 16 Feb 2002 00:10:51 +0000 Subject: merge from head Try not to malloc -1 bytes (apx 4GB) when the data is already in error. --- source/libsmb/clispnego.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c index 784463566f3..512a2f60332 100644 --- a/source/libsmb/clispnego.c +++ b/source/libsmb/clispnego.c @@ -248,13 +248,22 @@ BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket) { BOOL ret; ASN1_DATA data; + int ata_remaining; asn1_load(&data, blob); asn1_start_tag(&data, ASN1_APPLICATION(0)); asn1_check_OID(&data, OID_KERBEROS5); asn1_check_BOOLEAN(&data, 0); - *ticket = data_blob(data.data, asn1_tag_remaining(&data)); - asn1_read(&data, ticket->data, ticket->length); + + data_remaining = asn1_tag_remaining(&data); + + if (data_remaining < 1) { + data.has_error = True; + } else { + *ticket = data_blob(data.data, data_remaining); + asn1_read(&data, ticket->data, ticket->length); + } + asn1_end_tag(&data); ret = !data.has_error; -- cgit From 92ec2cafca84eb586b75fc2ea6b1d26bd535ec27 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 18 Feb 2002 19:42:52 +0000 Subject: changed version to 2.2.4-pre --- source/include/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/version.h b/source/include/version.h index dcc2e48d17a..e4eea05944e 100644 --- a/source/include/version.h +++ b/source/include/version.h @@ -1 +1 @@ -#define VERSION "2.2.3" +#define VERSION "2.2.4-pre" -- cgit From bef84ace8ae288a849ff51b09bb48b61744f9ea1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Feb 2002 02:08:53 +0000 Subject: 9x pnp fix from APPLIANCE_HEAD --- source/printing/nt_printing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index dc04a2fb6eb..cc55488564f 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -1817,8 +1817,8 @@ uint32 get_a_printer_driver_9x_compatible(pstring line, fstring model) DEBUGADD(10,("info3->configfile [%s]\n", info3->configfile)); /*pstrcat(line, info3->name); pstrcat(line, ":");*/ - trim_string(info3->configfile, "\\print$\\WIN40\\0\\", 0); - pstrcat(line, info3->configfile); + trim_string(info3->driverpath, "\\print$\\WIN40\\0\\", 0); + pstrcat(line, info3->driverpath); pstrcat(line, ":"); trim_string(info3->datafile, "\\print$\\WIN40\\0\\", 0); pstrcat(line, info3->datafile); -- cgit From bb13a0654e83fd4c97e05ebbcec56ca61cb5f37d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Feb 2002 16:46:59 +0000 Subject: clarify the [add|delete] user script parameters. --- docs/docbook/manpages/smb.conf.5.sgml | 22 ++++------- docs/htmldocs/smb.conf.5.html | 71 +++++++++++------------------------ docs/manpages/smb.conf.5 | 22 ++++------- 3 files changed, 36 insertions(+), 79 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index ddb8a7ec9b4..f1aca54df7b 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -1071,8 +1071,8 @@ ON DEMAND when a user accesses the Samba server. In order to use this option, smbd - must be set to security = server or - security = domain and add user script + must NOT be set to security = share + and add user script must be set to a full pathname for a script that will create a UNIX user given one argument of %u, which expands into the UNIX user name to create. @@ -2049,19 +2049,11 @@ Windows NT user no longer exists. In order to use this option, smbd must be - set to security = domain and delete - user script must be set to a full pathname for a script - that will delete a UNIX user given one argument of %u - , which expands into the UNIX user name to delete. - NOTE that this is different to the add user script - which will work with the security = server option - as well as security = domain. The reason for this - is only when Samba is a domain member does it get the information - on an attempted user logon that a user no longer exists. In the - security = server mode a missing user - is treated the same as an invalid password logon attempt. Deleting - the user in this circumstance would not be a good idea. + set to security = domain or security = + user and delete user script + must be set to a full pathname for a script + that will delete a UNIX user given one argument of %u, + which expands into the UNIX user name to delete. When the Windows user attempts to access the Samba server, at login (session setup in the SMB protocol) diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html index 9efb92963c0..d7d8fcbd842 100644 --- a/docs/htmldocs/smb.conf.5.html +++ b/docs/htmldocs/smb.conf.5.html @@ -4889,17 +4889,15 @@ HREF="smbd.8.html" TARGET="_top" >smbd - must be set to security = server or NOT be set to security = domainsecurity = share
    and + and add user scriptsecurity = domain and delete - user script must be set to a full pathname for a script - that will delete a UNIX user given one argument of %u - , which expands into the UNIX user name to delete. - NOTE that this is different to the add user script - which will work with the or security = serversecurity = + user
    option - as well as and security = domaindelete user script. The reason for this - is only when Samba is a domain member does it get the information - on an attempted user logon that a user no longer exists. In the - + must be set to a full pathname for a script + that will delete a UNIX user given one argument of security = server%u mode a missing user - is treated the same as an invalid password logon attempt. Deleting - the user in this circumstance would not be a good idea.

    , + which expands into the UNIX user name to delete.

    When the Windows user attempts to access the Samba server, at

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "06 February 2002" "" "" +.TH "SMB.CONF" "5" "19 February 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -1554,7 +1554,8 @@ Windows NT PDC is an onerous task. This option allows smbdto create the required \fBON DEMAND\fR when a user accesses the Samba server. In order to use this option, smbd -must be set to \fIsecurity = server\fR or \fI security = domain\fR and \fIadd user script\fR +must \fBNOT\fR be set to \fIsecurity = share\fR +and \fIadd user script\fR must be set to a full pathname for a script that will create a UNIX user given one argument of \fI%u\fR, which expands into the UNIX user name to create. @@ -2332,18 +2333,11 @@ DEMAND\fR when a user accesses the Samba server and the Windows NT user no longer exists. In order to use this option, \fBsmbd\fR must be -set to \fIsecurity = domain\fR and \fIdelete -user script\fR must be set to a full pathname for a script -that will delete a UNIX user given one argument of \fI%u -\fR, which expands into the UNIX user name to delete. -\fBNOTE\fR that this is different to the \fIadd user script\fR -which will work with the \fIsecurity = server\fR option -as well as \fIsecurity = domain\fR. The reason for this -is only when Samba is a domain member does it get the information -on an attempted user logon that a user no longer exists. In the -\fIsecurity = server\fR mode a missing user -is treated the same as an invalid password logon attempt. Deleting -the user in this circumstance would not be a good idea. +set to \fIsecurity = domain\fR or \fIsecurity = +user\fR and \fIdelete user script\fR +must be set to a full pathname for a script +that will delete a UNIX user given one argument of \fI%u\fR, +which expands into the UNIX user name to delete. When the Windows user attempts to access the Samba server, at \fBlogin\fR (session setup in the SMB protocol) -- cgit From 16806d749fb0b0a39eb871e764ff439c8944f150 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Feb 2002 19:42:00 +0000 Subject: print out entire log level information not just DBG_ALL --- source/param/loadparm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index db7c5140799..a916bf2c896 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -2830,6 +2830,13 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *( case P_INTEGER: fprintf(f, "%d", *(int *)ptr); + if (strequal(p->label,"log level")) { + int i; + for (i = 1; i < DBGC_LAST; i ++) { + if (((int *)ptr)[i]) + fprintf(f, ",%s:%d",debug_classname_from_index(i),((int *)ptr)[i]); + } + } break; case P_CHAR: -- cgit From e5d29514364f5b1772791d30ceb6c8c17d2c1232 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Feb 2002 19:56:04 +0000 Subject: this is a hack to get testparm to print the correct value for log level --- source/lib/debug.c | 25 +++++++++++++++---------- source/utils/testparm.c | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/source/lib/debug.c b/source/lib/debug.c index 6c61d45d224..3731b3656fa 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -86,7 +86,7 @@ BOOL append_log = False; int DEBUGLEVEL_CLASS[DBGC_LAST]; int DEBUGLEVEL = DEBUGLEVEL_CLASS; BOOL AllowDebugChange = True; - +int parsed_debuglevel_class[DBGC_LAST]; /* -------------------------------------------------------------------------- ** * Internal variables. @@ -214,12 +214,6 @@ BOOL debug_parse_levels(char *params_str) char *params[DBGC_LAST]; int debuglevel_class[DBGC_LAST]; - if (AllowDebugChange == False) { - DEBUG(1,("INFO: Debug class %s level = %d\n", - classname_table[DBGC_ALL], - DEBUGLEVEL_CLASS[DBGC_ALL])); - return True; - } ZERO_ARRAY(params); ZERO_ARRAY(debuglevel_class); @@ -232,8 +226,19 @@ BOOL debug_parse_levels(char *params_str) else return False; + if (AllowDebugChange == False) { + int old_debuglevel_class[DBGC_LAST]; + + /* save current debug level */ + memcpy(old_debuglevel_class, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS)); + if (debug_parse_params(params, debuglevel_class)) + debug_message(0, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class)); + memcpy(parsed_debuglevel_class, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS)); + memcpy(DEBUGLEVEL_CLASS, old_debuglevel_class, sizeof(old_debuglevel_class)); + return True; + } if (debug_parse_params(params, debuglevel_class)) { - debug_message(0, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class)); + debug_message(DEBUGLEVEL, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class)); return True; } else return False; @@ -242,14 +247,14 @@ BOOL debug_parse_levels(char *params_str) /**************************************************************************** receive a "set debug level" message ****************************************************************************/ -void debug_message(int msg_type, pid_t src, void *buf, size_t len) +void debug_message(int msg_level, pid_t src, void *buf, size_t len) { int i; /* Set the new DEBUGLEVEL_CLASS array from the pased array */ memcpy(DEBUGLEVEL_CLASS, buf, sizeof(DEBUGLEVEL_CLASS)); - DEBUG(1,("INFO: Debug class %s level = %d (pid %u from pid %u)\n", + DEBUG(msg_level,("INFO: Debug class %s level = %d (pid %u from pid %u)\n", classname_table[DBGC_ALL], DEBUGLEVEL_CLASS[DBGC_ALL], (unsigned int)getpid(), (unsigned int)src)); diff --git a/source/utils/testparm.c b/source/utils/testparm.c index 9502ec9669d..a433bb11e1d 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -36,6 +36,7 @@ #include "smb.h" extern BOOL AllowDebugChange; +extern int parsed_debuglevel_class[DBGC_LAST]; /* these live in util.c */ extern FILE *dbf; @@ -281,6 +282,7 @@ Level II oplocks can only be set if oplocks are also set.\n", fflush(stdout); getc(stdin); } + memcpy(DEBUGLEVEL_CLASS,parsed_debuglevel_class,sizeof(parsed_debuglevel_class)); lp_dump(stdout,True, lp_numservices(), _dos_to_unix); } -- cgit From 111f807b45f0c8691ba0ac94b367db45db4078d1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Feb 2002 20:06:51 +0000 Subject: logic merge from APPLIANCE_HEAD. --- source/smbd/reply.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index ae8d4b0ad47..47f200ecedb 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -992,13 +992,30 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_USER) { - if (smb_getpwnam(user,True)) + SAM_ACCOUNT *sampass = NULL; + + pdb_init_sam(&sampass); + + /* + * This is really bad form. We know that password_ok() failed, + * but the return value can't distinguish between a non-existent user + * and a bad password. So we try to look the user up again here + * to see if he or she exists. We must look up the user in the + * "smb passwd file" and not /etc/passwd so that we don't + * get confused when the two don't have a one-to-one correspondence. + * e.g. a standard UNIX account such as "operator" --jerry + */ + + if (pdb_getsampwnam(sampass, user)) { delete_nt_token(&ptok); DEBUG(1,("Rejecting user '%s': bad password\n", user)); - END_PROFILE(SMBsesssetupX); + END_PROFILE(SMBsesssetupX); + pdb_free_sam(sampass); return ERROR_BOTH(NT_STATUS_LOGON_FAILURE,ERRSRV,ERRbadpw); } + + pdb_free_sam(sampass); } /* -- cgit From d8100fe91873f81b8df6f30d70a53515b8f2ef94 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Feb 2002 20:30:45 +0000 Subject: fix swat to show full log level info --- source/web/swat.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/web/swat.c b/source/web/swat.c index d09034671ee..7fea3c72420 100644 --- a/source/web/swat.c +++ b/source/web/swat.c @@ -215,7 +215,20 @@ static void show_parameter(int snum, struct parm_struct *parm) break; case P_INTEGER: - printf("", make_parm_name(parm->label), *(int *)ptr); + if (strequal(parm->label,"log level")) { + int i; + + printf("label),*(int *)ptr); + for (i = 1; i < DBGC_LAST; i ++) { + if (((int *)ptr)[i]) + printf(",%s:%d",debug_classname_from_index(i),((int *)ptr)[i]); + } + printf(">"); + } else { + printf("", + make_parm_name(parm->label), *(int *)ptr); + } printf("", make_parm_name(parm->label),(int)(parm->def.ivalue)); break; @@ -296,6 +309,8 @@ static void show_parameters(int snum, int allparameters, int advanced, int print case P_INTEGER: case P_OCTAL: + if (strequal(parm->label,"log level")) + break; if (*(int *)ptr == (int)(parm->def.ivalue)) continue; break; -- cgit From d376263bb17c4af8b801974cccdd98f268bfce98 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Feb 2002 20:51:09 +0000 Subject: drop debug level to 0 --- source/nsswitch/wins.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c index a645172e53d..3dce245335c 100644 --- a/source/nsswitch/wins.c +++ b/source/nsswitch/wins.c @@ -35,7 +35,6 @@ static int initialised; - /* Use our own create socket code so we don't recurse.... */ static int wins_lookup_open_socket_in(void) @@ -77,7 +76,7 @@ static int wins_lookup_open_socket_in(void) static void nss_wins_init(void) { initialised = 1; - DEBUGLEVEL = 10; + DEBUGLEVEL = 0; /* needed for lp_xx() functions */ charset_initialise(); -- cgit From f5aaab4e8c7de59abbc4f7093f3a98713c922afa Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Feb 2002 22:27:31 +0000 Subject: merge from appliance_head --- source/printing/nt_printing.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index cc55488564f..ac37d594d5d 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3639,7 +3639,8 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx) DOM_SID owner_sid; size_t sd_size; enum SID_NAME_USE name_type; - + fstring dos_domain; + /* Create an ACE where Everyone is allowed to print */ init_sec_access(&sa, PRINTER_ACE_PRINT); @@ -3649,7 +3650,14 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx) /* Make the security descriptor owned by the Administrators group on the PDC of the domain. */ - if (winbind_lookup_name(lp_workgroup(), &owner_sid, &name_type)) { + /* Note that for hysterical raisins, the argument to + secrets_fetch_domain_sid() must be in dos codepage format. + Aargh! */ + + fstrcpy(dos_domain, lp_workgroup()); + unix_to_dos(dos_domain, True); + + if (secrets_fetch_domain_sid(dos_domain, &owner_sid)) { sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN); } else { -- cgit From 6e6b8a2e29157d7f4e4136fab5b54bf9aeae4f94 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Feb 2002 23:35:47 +0000 Subject: fix server GetPrinterData() fields to be more sensible --- source/rpc_server/srv_spoolss_nt.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index de7b5b70844..fe21d272637 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1106,7 +1106,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) return False; - SIVAL(*data, 0, 0x01); + SIVAL(*data, 0, 0x00); *needed = 0x4; return True; } @@ -1115,7 +1115,8 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) return False; - SIVAL(*data, 0, 0x1B); + /* formally was 0x1b */ + SIVAL(*data, 0, 0x0); *needed = 0x4; return True; } @@ -1124,7 +1125,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) return False; - SIVAL(*data, 0, 0x01); + SIVAL(*data, 0, 0x00); *needed = 0x4; return True; } @@ -1138,8 +1139,10 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 return True; } - if (!strcmp(value, "DefaultSpoolDirectory")) { - pstring string="You are using a Samba server"; + if (!strcmp(value, "DefaultSpoolDirectory")) { + fstring string; + + fstrcpy(string, string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH)); *type = 0x1; *needed = 2*(strlen(string)+1); if((*data = (uint8 *)talloc(ctx, ((*needed > in_size) ? *needed:in_size) *sizeof(uint8))) == NULL) -- cgit From 1aa893c9a6db8d90f60d4efe4e0eddb309bde331 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 21 Feb 2002 00:54:36 +0000 Subject: comment out bad assumption about REG_SZ in EnumPrinterDataEx() --- source/rpc_server/srv_spoolss_nt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index fe21d272637..20b72e7258b 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -7296,6 +7296,10 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ enum_values[num_entries].value_len = (strlen(value)+1) * 2; enum_values[num_entries].type = type; +#if 0 /* JERRY - I think think was a bad assumption based on bad + offset values when I first implemented it. Commented out. + We should not be adding an extra NULL to the end of a string + just send what the client set in the first place. */ /* * NULL terminate REG_SZ * FIXME!!! We should not be correctly problems in the way @@ -7311,6 +7315,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ else add_len = data_len % 2; } +#endif if (!(enum_values[num_entries].data=talloc_zero(p->mem_ctx, data_len+add_len))) { DEBUG(0,("talloc_realloc failed to allocate more memory for data!\n")); -- cgit From d66ca48e70e582b288bebac0912f9eb85a1faad6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 21 Feb 2002 17:30:30 +0000 Subject: logic error in SetPrinterDataEx() --- source/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 20b72e7258b..50d5624101a 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -7129,7 +7129,7 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1); - if (strcmp(key, "PrinterDriverData") == 0) + if (strcmp(key, "PrinterDriverData") != 0) return WERR_INVALID_PARAM; ZERO_STRUCT(q_u_local); -- cgit From 6447ba5fe4fb4582f4a065002ad5d1cacf1aec77 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Feb 2002 21:03:19 +0000 Subject: Only set smb_read_error if not already set. Jeremy. --- source/lib/util_sock.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index efc2e218ee6..fefcdb0cfb2 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -609,10 +609,15 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) len = read_smb_length_return_keepalive(fd,buffer,timeout); if (len < 0) { DEBUG(10,("receive_smb: length < 0!\n")); - /* XXX: You might think that we ought to set - * smb_read_error here, but apparently that breaks the - * recursive main loop in oplock.c. Global variables - * suck. */ + + /* + * Correct fix. smb_read_error may have already been + * set. Only set it here if not already set. Global + * variables still suck :-). JRA. + */ + + if (smb_read_error == 0) + smb_read_error = READ_ERROR; return(False); } @@ -624,7 +629,15 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { DEBUG(0,("Invalid packet length! (%d bytes).\n",len)); if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) { - smb_read_error = READ_ERROR; + + /* + * Correct fix. smb_read_error may have already been + * set. Only set it here if not already set. Global + * variables still suck :-). JRA. + */ + + if (smb_read_error == 0) + smb_read_error = READ_ERROR; return False; } } @@ -632,7 +645,8 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) if(len > 0) { ret = read_data(fd,buffer+4,len); if (ret != len) { - smb_read_error = READ_ERROR; + if (smb_read_error == 0) + smb_read_error = READ_ERROR; return False; } } -- cgit From c9cfb1c7dd283709d7d77c6026226191c1b6b8fd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 25 Feb 2002 20:18:59 +0000 Subject: removed unnecessary code (was already commented out a long time ago) --- source/smbd/password.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index 29c0cc7197c..b404868c6d3 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -531,24 +531,6 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal, if (!lm_pwd || !nt_pwd) return(False); -#if 0 /* JERRY */ - /* FIXME! this code looks to be unnecessary now that the passdb - validates that the username exists and has a valid uid */ - if (pwd != NULL && user == NULL) { - pass = (struct passwd *) pwd; - user = pass->pw_name; - } else { - /* I don't get this call here. I think it should be moved. - Need to check on it. --jerry */ - pass = smb_getpwnam(user,True); - } - - if (pass == NULL) { - DEBUG(1,("Couldn't find user '%s' in UNIX password database.\n",user)); - return(False); - } -#endif - /* get the account information */ pdb_init_sam(&sampass); if (!pdb_getsampwnam(sampass, user)) { -- cgit From e0adfbf9572fc7931c445f5660706200b803eacf Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 25 Feb 2002 21:32:29 +0000 Subject: add required flags to "nt acl support" so it will show up in SWAT --- source/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index a916bf2c896..e732037ee90 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -821,7 +821,7 @@ static struct parm_struct parm_table[] = { {"nt smb support", P_BOOL, P_GLOBAL, &Globals.bNTSmbSupport, NULL, NULL, 0}, {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, - {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, 0}, + {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE }, {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, {"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, -- cgit From 9d3cd70144c34498350b92e349fb33362a41b7ad Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 25 Feb 2002 22:21:06 +0000 Subject: Merge in \\ fixes from HEAD. Jeremy. --- source/smbd/trans2.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 4168edf7705..58a81b53b8c 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1537,6 +1537,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * SMB_STRUCT_STAT sbuf; pstring fname1; char *fname; + pstring dos_fname; char *fullpathname; char *p; int l; @@ -1690,6 +1691,12 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * sbuf.st_mtime &= ~1; } + /* NT expects the name to be in an exact form */ + if (strequal(fname,".")) + pstrcpy(dos_fname, "\\"); + else + snprintf(dos_fname, sizeof(dos_fname), "\\%s", fname); + switch (info_level) { case SMB_INFO_STANDARD: case SMB_INFO_QUERY_EA_SIZE: @@ -1719,7 +1726,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * break; case 6: - return ERROR_DOS(ERRDOS,ERRbadfunc); /* os/2 needs this */ + return ERROR_DOS(ERRDOS,ERRbadfunc); /* os/2 needs this */ case SMB_FILE_BASIC_INFORMATION: case SMB_QUERY_FILE_BASIC_INFO: @@ -1797,9 +1804,9 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * if(strequal(".", fname) && (global_client_caps & CAP_UNICODE)) { l = l*2; SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); - dos_PutUniCode(pdata + 4, "\\",sizeof(pstring), False); + dos_PutUniCode(pdata + 4, dos_fname,sizeof(pstring), False); } else { - pstrcpy(pdata+4,fname); + pstrcpy(pdata+4,dos_fname); } data_size = 4 + l; SIVAL(pdata,0,l); @@ -1844,7 +1851,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * pdata += 4; pdata += 4; /* alignment */ SIVAL(pdata,0,l); - pstrcpy(pdata+4,fname); + pstrcpy(pdata+4,dos_fname); pdata += 4 + l; data_size = PTR_DIFF(pdata,(*ppdata)); break; @@ -1864,12 +1871,9 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * case SMB_FILE_NAME_INFORMATION: /* Pathname with leading '\'. */ { - pstring new_fname; size_t byte_len; - pstrcpy(new_fname, "\\"); - pstrcat(new_fname, fname); - byte_len = dos_PutUniCode(pdata+4,new_fname,max_data_bytes,False); + byte_len = dos_PutUniCode(pdata+4,dos_fname,max_data_bytes,False); SIVAL(pdata,0,byte_len); data_size = 4 + byte_len; break; @@ -1899,7 +1903,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * /* Not yet finished... JRA */ case 1018: { - pstring new_fname; size_t byte_len; put_long_date(pdata,c_time); @@ -1923,7 +1926,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * case SMB_FILE_ALTERNATE_NAME_INFORMATION: /* Last component of pathname. */ { - size_t byte_len = dos_PutUniCode(pdata+4,fname,max_data_bytes,False); + size_t byte_len = dos_PutUniCode(pdata+4,dos_fname,max_data_bytes,False); SIVAL(pdata,0,byte_len); data_size = 4 + byte_len; break; -- cgit From 3637c0f409d31259316778e7334a53c2db5de1bf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 25 Feb 2002 23:01:40 +0000 Subject: Fix string returns that require unicode. Jeremy. --- source/include/proto.h | 2 +- source/smbd/trans2.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 4d52cf9d370..1a254a89f31 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -54,7 +54,7 @@ char* debug_classname_from_index(int ndx); int debug_lookup_classname(char* classname); BOOL debug_parse_params(char **params, int *debuglevel_class); BOOL debug_parse_levels(char *params_str); -void debug_message(int msg_type, pid_t src, void *buf, size_t len); +void debug_message(int msg_level, pid_t src, void *buf, size_t len); void debug_message_send(pid_t pid, int level); void setup_logging(char *pname, BOOL interactive); BOOL reopen_logs( void ); diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 58a81b53b8c..d40ac1ff47c 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1787,6 +1787,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * *short_name = '\0'; } strupper(short_name); + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); l = dos_PutUniCode(pdata + 4, short_name, sizeof(pstring), False); data_size = 4 + l; SIVAL(pdata,0,l); @@ -1801,13 +1802,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * * you like hearing about me suffering.... :-). JRA. */ - if(strequal(".", fname) && (global_client_caps & CAP_UNICODE)) { - l = l*2; - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); - dos_PutUniCode(pdata + 4, dos_fname,sizeof(pstring), False); - } else { - pstrcpy(pdata+4,dos_fname); - } + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); + l = dos_PutUniCode(pdata + 4, dos_fname,sizeof(pstring), False); data_size = 4 + l; SIVAL(pdata,0,l); break; @@ -1873,6 +1869,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * { size_t byte_len; + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); byte_len = dos_PutUniCode(pdata+4,dos_fname,max_data_bytes,False); SIVAL(pdata,0,byte_len); data_size = 4 + byte_len; -- cgit From 98a377aacbb5fc7c8b3ae62828b02f7cae5ad845 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 25 Feb 2002 23:42:22 +0000 Subject: Merge of printing performance fixes from appliance. --- source/include/printing.h | 2 +- source/printing/printing.c | 12 ++++----- source/rpc_server/srv_spoolss_nt.c | 50 ++++++++++++++++++++++++-------------- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/source/include/printing.h b/source/include/printing.h index ee0b25d63fd..40fe964a193 100644 --- a/source/include/printing.h +++ b/source/include/printing.h @@ -39,7 +39,7 @@ struct printjob { fstring filename; /* the filename used to spool the file */ fstring jobname; /* the job name given to us by the client */ fstring user; /* the user who started the job */ - fstring qname; /* name of the print queue the job was sent to */ + int snum; /* service number of printer for this job */ }; /* Information for print interfaces */ diff --git a/source/printing/printing.c b/source/printing/printing.c index a1aa2ce76ed..7e4bd539f62 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -168,7 +168,7 @@ static void print_unix_job(int snum, print_queue_struct *q) fstrcpy(pj.filename, ""); fstrcpy(pj.jobname, q->file); fstrcpy(pj.user, q->user); - fstrcpy(pj.qname, lp_servicename(snum)); + pj.snum = snum; print_job_store(jobid, &pj); } @@ -190,7 +190,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); - if (strcmp(lp_servicename(ts->snum), pjob.qname)) { + if (ts->snum != pjob.snum) { /* this isn't for the queue we are looking at */ ts->total_jobs++; return 0; @@ -497,7 +497,7 @@ int print_job_snum(int jobid) struct printjob *pjob = print_job_find(jobid); if (!pjob) return -1; - return lp_servicenumber(pjob->qname); + return pjob->snum; } /**************************************************************************** @@ -918,7 +918,7 @@ int print_job_start(struct current_user *user, int snum, char *jobname) fstrcpy(pjob.user, unix_to_dos(uidtoname(user->uid),False)); } - fstrcpy(pjob.qname, lp_servicename(snum)); + pjob.snum = snum; /* lock the database */ tdb_lock_bystring(tdb, "INFO/nextjob"); @@ -1072,7 +1072,7 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void * memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != print_queue_snum(pjob.qname)) return 0; + if (ts->snum != pjob.snum) return 0; if (ts->qcount >= ts->maxcount) return 0; @@ -1107,7 +1107,7 @@ static int traverse_count_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != print_queue_snum(pjob.qname)) return 0; + if (ts->snum != pjob.snum) return 0; ts->count++; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 50d5624101a..24b43f2ffb4 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4884,7 +4884,8 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, ****************************************************************************/ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, int position, int snum, - NT_PRINTER_INFO_LEVEL *ntprinter) + NT_PRINTER_INFO_LEVEL *ntprinter, + DEVICEMODE *devmode) { pstring temp_name; pstring chaine; @@ -4922,9 +4923,7 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, job_info->timeelapsed=0; job_info->pagesprinted=0; - if((job_info->devmode = construct_dev_mode(snum)) == NULL) { - return False; - } + job_info->devmode = devmode; return (True); } @@ -4983,24 +4982,33 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum, uint32 *needed, uint32 *returned) { NT_PRINTER_INFO_LEVEL *ntprinter = NULL; - JOB_INFO_2 *info; + JOB_INFO_2 *info = NULL; int i; WERROR result; + DEVICEMODE *devmode = NULL; info=(JOB_INFO_2 *)malloc(*returned*sizeof(JOB_INFO_2)); if (info==NULL) { *returned=0; - return WERR_NOMEM; + result = WERR_NOMEM; + goto done; } result = get_a_printer(&ntprinter, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(result)) { *returned = 0; - return result; + goto done; } + if (!(devmode = construct_dev_mode(snum))) { + *returned = 0; + result = WERR_NOMEM; + goto done; + } + for (i=0; i<*returned; i++) - fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter); + fill_job_info_2( + &info[i], &queue[i], i, snum, ntprinter, devmode); free_a_printer(&ntprinter, 2); SAFE_FREE(queue); @@ -5009,27 +5017,32 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum, for (i=0; i<*returned; i++) (*needed) += spoolss_size_job_info_2(&info[i]); + if (*needed > offered) { + *returned=0; + result = WERR_INSUFFICIENT_BUFFER; + goto done; + } + if (!alloc_buffer_size(buffer, *needed)) { SAFE_FREE(info); - return WERR_INSUFFICIENT_BUFFER; + result = WERR_INSUFFICIENT_BUFFER; + goto done; } /* fill the buffer with the structures */ for (i=0; i<*returned; i++) smb_io_job_info_2("", buffer, &info[i], 0); - /* clear memory */ - for (i = 0; i < *returned; i++) - free_job_info_2(&info[i]); + result = WERR_OK; + done: + free_a_printer(&ntprinter, 2); + free_devmode(devmode); + SAFE_FREE(queue); SAFE_FREE(info); - if (*needed > offered) { - *returned=0; - return WERR_INSUFFICIENT_BUFFER; - } + return result; - return WERR_OK; } /**************************************************************************** @@ -6934,6 +6947,7 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin JOB_INFO_2 *info_2; NT_PRINTER_INFO_LEVEL *ntprinter = NULL; WERROR ret; + DEVICEMODE *devmode = NULL; info_2=(JOB_INFO_2 *)malloc(sizeof(JOB_INFO_2)); @@ -6962,7 +6976,7 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin return ret; } - fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter); + fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter, devmode); free_a_printer(&ntprinter, 2); SAFE_FREE(queue); -- cgit From 35d5c8de8d241e70ea71a4b8f75a1d2c159df6e9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 02:58:10 +0000 Subject: Tidyup of safe_strXXX fns. Jeremy. --- source/lib/util_str.c | 73 ++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/source/lib/util_str.c b/source/lib/util_str.c index f5f9cc1fe44..df0242ff3be 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -857,29 +857,29 @@ include the terminating zero. char *safe_strcpy(char *dest,const char *src, size_t maxlength) { - size_t len; + size_t len; - if (!dest) { - DEBUG(0,("ERROR: NULL dest in safe_strcpy\n")); - return NULL; - } + if (!dest) { + DEBUG(0,("ERROR: NULL dest in safe_strcpy\n")); + return NULL; + } - if (!src) { - *dest = 0; - return dest; - } + if (!src) { + *dest = 0; + return dest; + } - len = strlen(src); + len = strlen(src); - if (len > maxlength) { - DEBUG(0,("ERROR: string overflow by %d in safe_strcpy [%.50s]\n", - (int)(len-maxlength), src)); - len = maxlength; - } + if (len > maxlength) { + DEBUG(0,("ERROR: string overflow by %d in safe_strcpy [%.50s]\n", + (int)(len-maxlength), src)); + len = maxlength; + } - memcpy(dest, src, len); - dest[len] = 0; - return dest; + memcpy(dest, src, len); + dest[len] = 0; + return dest; } /******************************************************************* @@ -889,29 +889,30 @@ include the terminating zero. char *safe_strcat(char *dest, const char *src, size_t maxlength) { - size_t src_len, dest_len; + size_t src_len, dest_len; - if (!dest) { - DEBUG(0,("ERROR: NULL dest in safe_strcat\n")); - return NULL; - } + if (!dest) { + DEBUG(0,("ERROR: NULL dest in safe_strcat\n")); + return NULL; + } - if (!src) { - return dest; - } + if (!src) + return dest; - src_len = strlen(src); - dest_len = strlen(dest); + src_len = strlen(src); + dest_len = strlen(dest); - if (src_len + dest_len > maxlength) { - DEBUG(0,("ERROR: string overflow by %d in safe_strcat [%.50s]\n", - (int)(src_len + dest_len - maxlength), src)); - src_len = maxlength - dest_len; - } + if (src_len + dest_len > maxlength) { + DEBUG(0,("ERROR: string overflow by %d in safe_strcat [%.50s]\n", + (int)(src_len + dest_len - maxlength), src)); + if (dest_len >= maxlength) + return dest; + src_len = maxlength - dest_len; + } - memcpy(&dest[dest_len], src, src_len); - dest[dest_len + src_len] = 0; - return dest; + memcpy(&dest[dest_len], src, src_len); + dest[dest_len + src_len] = 0; + return dest; } /******************************************************************* -- cgit From ae33d801c3fc4c20442f82a0d5c29b6df7437946 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 02:59:07 +0000 Subject: Removed shadow variables. Jeremy. --- source/param/loadparm.c | 1 - source/web/swat.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index e732037ee90..58b05d33b4b 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -2831,7 +2831,6 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *( case P_INTEGER: fprintf(f, "%d", *(int *)ptr); if (strequal(p->label,"log level")) { - int i; for (i = 1; i < DBGC_LAST; i ++) { if (((int *)ptr)[i]) fprintf(f, ",%s:%d",debug_classname_from_index(i),((int *)ptr)[i]); diff --git a/source/web/swat.c b/source/web/swat.c index 7fea3c72420..71dc8630fff 100644 --- a/source/web/swat.c +++ b/source/web/swat.c @@ -216,8 +216,6 @@ static void show_parameter(int snum, struct parm_struct *parm) case P_INTEGER: if (strequal(parm->label,"log level")) { - int i; - printf("label),*(int *)ptr); for (i = 1; i < DBGC_LAST; i ++) { -- cgit From feae69794362c801c172dbee1efd928970a17784 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 26 Feb 2002 03:09:11 +0000 Subject: [merge from APPLIANCE_HEAD] "constants aren't, safe_strcat isn't." This patch tries to fix a bug in the lpq parsing code that causes a crash in lprng and BSD parsers when there are long lines in the output. A too-short length parameter was passed to safe_strcat, which provoked a signedness bug. It also makes the lpq parser consistently use fstring routines, rather than its own hand-crafted strlen/sizeof guff. Some variables were renamed to make this obvious. Finally safe_strcat is changed so that it actually does handle the situation where strlen(dest)>maxlen, rather than crying for help by clobbering -1 bytes of memory. (HP CR #430) --- source/include/safe_string.h | 3 ++ source/include/smb.h | 4 +- source/printing/lpq_parse.c | 85 +++++++++++++++++--------------------- source/printing/printing.c | 12 +++--- source/rpc_server/srv_spoolss_nt.c | 14 +++---- source/smbd/lanman.c | 8 ++-- source/smbd/reply.c | 2 +- 7 files changed, 62 insertions(+), 66 deletions(-) diff --git a/source/include/safe_string.h b/source/include/safe_string.h index 2c3d2eda01f..7af84c56116 100644 --- a/source/include/safe_string.h +++ b/source/include/safe_string.h @@ -42,6 +42,9 @@ #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1) +#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0') +#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0') + #define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring)) #define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring)) #define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring)) diff --git a/source/include/smb.h b/source/include/smb.h index c701d460df1..3ea08a4c559 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -518,8 +518,8 @@ typedef struct _print_queue_struct int status; int priority; time_t time; - fstring user; - fstring file; + fstring fs_user; + fstring fs_file; } print_queue_struct; enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR}; diff --git a/source/printing/lpq_parse.c b/source/printing/lpq_parse.c index edb56f49be4..26f84572c67 100644 --- a/source/printing/lpq_parse.c +++ b/source/printing/lpq_parse.c @@ -3,6 +3,7 @@ Version 3.0 lpq parsing routines Copyright (C) Andrew Tridgell 2000 + Copyright (C) 2002 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -146,25 +147,21 @@ static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first) buf->size = atoi(tok[TOTALTOK]); buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED; buf->time = time(NULL); - StrnCpy(buf->user,tok[USERTOK],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[FILETOK],sizeof(buf->file)-1); + fstrcpy(buf->fs_user,tok[USERTOK]); + fstrcpy(buf->fs_file,tok[FILETOK]); if ((FILETOK + 1) != TOTALTOK) { - int bufsize; int i; - bufsize = sizeof(buf->file) - strlen(buf->file) - 1; - for (i = (FILETOK + 1); i < TOTALTOK; i++) { - safe_strcat(buf->file," ",bufsize); - safe_strcat(buf->file,tok[i],bufsize - 1); - bufsize = sizeof(buf->file) - strlen(buf->file) - 1; - if (bufsize <= 0) { - break; - } + /* FIXME: Using fstrcat rather than other means is a bit + * inefficient; this might be a problem for enormous queues with + * many fields. */ + fstrcat(buf->fs_file, " "); + fstrcat(buf->fs_file, tok[i]); } /* Ensure null termination. */ - buf->file[sizeof(buf->file)-1] = '\0'; + fstrterminate(buf->fs_file); } #ifdef PRIOTOK @@ -270,34 +267,30 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first) buf->time = LPRng_time(tokarr[LPRNG_TIMETOK]); - StrnCpy(buf->user,tokarr[LPRNG_USERTOK],sizeof(buf->user)-1); + fstrcpy(buf->fs_user,tokarr[LPRNG_USERTOK]); /* The '@hostname' prevents windows from displaying the printing icon * for the current user on the taskbar. Plop in a null. */ - if ((cptr = strchr(buf->user,'@')) != NULL) { + if ((cptr = strchr(buf->fs_user,'@')) != NULL) { *cptr = '\0'; } - StrnCpy(buf->file,tokarr[LPRNG_FILETOK],sizeof(buf->file)-1); + fstrcpy(buf->fs_file,tokarr[LPRNG_FILETOK]); if ((LPRNG_FILETOK + 1) != LPRNG_TOTALTOK) { - int bufsize; int i; - bufsize = sizeof(buf->file) - strlen(buf->file) - 1; - for (i = (LPRNG_FILETOK + 1); i < LPRNG_TOTALTOK; i++) { - safe_strcat(buf->file," ",bufsize); - safe_strcat(buf->file,tokarr[i],bufsize - 1); - bufsize = sizeof(buf->file) - strlen(buf->file) - 1; - if (bufsize <= 0) { - break; - } + /* FIXME: Using fstrcat rather than other means is a bit + * inefficient; this might be a problem for enormous queues with + * many fields. */ + fstrcat(buf->fs_file, " "); + fstrcat(buf->fs_file, tokarr[i]); } /* Ensure null termination. */ - buf->file[sizeof(buf->file)-1] = '\0'; + fstrterminate(buf->fs_file); } return(True); @@ -360,8 +353,8 @@ static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first) buf->status = strequal(tok[0],"HELD")?LPQ_PAUSED:LPQ_QUEUED; buf->priority = 0; buf->time = time(NULL); - StrnCpy(buf->user,tok[3],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[2],sizeof(buf->file)-1); + fstrcpy(buf->fs_user, tok[3]); + fstrcpy(buf->fs_file, tok[2]); } else { @@ -394,8 +387,8 @@ static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first) buf->status = strequal(tok[2],"RUNNING")?LPQ_PRINTING:LPQ_QUEUED; buf->priority = 0; buf->time = time(NULL); - StrnCpy(buf->user,tok[5],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[4],sizeof(buf->file)-1); + fstrcpy(buf->fs_user, tok[5]); + fstrcpy(buf->fs_file, tok[4]); } @@ -456,14 +449,14 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first) fstrcpy(tok[0],"STDIN"); buf->size = atoi(tok[1]); - StrnCpy(buf->file,tok[0],sizeof(buf->file)-1); + fstrcpy(buf->fs_file,tok[0]); /* fill things from header line */ buf->time = jobtime; buf->job = jobid; buf->status = jobstat; buf->priority = jobprio; - StrnCpy(buf->user,jobuser,sizeof(buf->user)-1); + fstrcpy(buf->fs_user, jobuser); return(True); } @@ -489,7 +482,7 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first) /* the 2nd, 5th & 7th column must be integer */ if (!isdigit((int)*tok[1]) || !isdigit((int)*tok[4]) || !isdigit((int)*tok[6])) return(False); jobid = atoi(tok[1]); - StrnCpy(jobuser,tok[2],sizeof(buf->user)-1); + fstrcpy(jobuser, tok[2]); jobprio = atoi(tok[4]); /* process time */ @@ -579,8 +572,8 @@ static BOOL parse_lpq_sysv(char *line,print_queue_struct *buf,BOOL first) buf->status = LPQ_QUEUED; buf->priority = 0; buf->time = EntryTime(tok, 4, count, 7); - StrnCpy(buf->user,tok[2],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[2],sizeof(buf->file)-1); + fstrcpy(buf->fs_user, tok[2]); + fstrcpy(buf->fs_file, tok[2]); return(True); } @@ -640,8 +633,8 @@ static BOOL parse_lpq_qnx(char *line,print_queue_struct *buf,BOOL first) buf->status = strequal(tok[3],"active")?LPQ_PRINTING:LPQ_QUEUED; buf->priority = 0; buf->time = time(NULL); - StrnCpy(buf->user,tok[1],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[6],sizeof(buf->file)-1); + fstrcpy(buf->fs_user,tok[1]); + fstrcpy(buf->fs_file,tok[6]); return(True); } @@ -710,8 +703,8 @@ static BOOL parse_lpq_plp(char *line,print_queue_struct *buf,BOOL first) buf->status = strequal(tok[0],"active")?LPQ_PRINTING:LPQ_QUEUED; buf->priority = 0; buf->time = time(NULL); - StrnCpy(buf->user,tok[1],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[6],sizeof(buf->file)-1); + fstrcpy(buf->fs_user,tok[1]); + fstrcpy(buf->fs_file,tok[6]); return(True); } @@ -767,8 +760,8 @@ static BOOL parse_lpq_softq(char *line,print_queue_struct *buf,BOOL first) buf->job = atoi(tok[0]); buf->size = atoi(tok[count+6]); buf->priority = atoi(tok[count+5]); - StrnCpy(buf->user,tok[count+7],sizeof(buf->user)-1); - StrnCpy(buf->file,tok[count+8],sizeof(buf->file)-1); + fstrcpy(buf->fs_user,tok[count+7]); + fstrcpy(buf->fs_file,tok[count+8]); buf->time = time(NULL); /* default case: take current time */ { time_t jobtime; @@ -864,8 +857,8 @@ static BOOL parse_lpq_nt(char *line,print_queue_struct *buf,BOOL first) buf->priority = 0; buf->size = atoi(parse_line.size); buf->time = time(NULL); - StrnCpy(buf->user, parse_line.owner, sizeof(buf->user)-1); - StrnCpy(buf->file, parse_line.jobname, sizeof(buf->file)-1); + fstrcpy(buf->fs_user, parse_line.owner); + fstrcpy(buf->fs_file, parse_line.jobname); if (strequal(parse_line.status, LPRNT_PRINTING)) buf->status = LPQ_PRINTING; else if (strequal(parse_line.status, LPRNT_PAUSED)) @@ -923,7 +916,7 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first) /* Get the job name */ parse_line.space2[0] = '\0'; trim_string(parse_line.jobname, NULL, " "); - StrnCpy(buf->file, parse_line.jobname, sizeof(buf->file)-1); + fstrcpy(buf->fs_file, parse_line.jobname); buf->priority = 0; buf->size = atoi(parse_line.size); @@ -941,7 +934,7 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first) !strequal(parse_line.status, LPROS2_WAITING)) return(False); - StrnCpy(buf->user, parse_line.owner, sizeof(buf->user)-1); + fstrcpy(buf->fs_user, parse_line.owner); if (strequal(parse_line.status, LPROS2_PRINTING)) buf->status = LPQ_PRINTING; else if (strequal(parse_line.status, LPROS2_PAUSED)) @@ -987,10 +980,10 @@ static BOOL parse_lpq_vlp(char *line,print_queue_struct *buf,BOOL first) buf->time = atoi(tok); break; case 4: - fstrcpy(buf->user, tok); + fstrcpy(buf->fs_user, tok); break; case 5: - fstrcpy(buf->file, tok); + fstrcpy(buf->fs_file, tok); break; } toknum++; diff --git a/source/printing/printing.c b/source/printing/printing.c index 7e4bd539f62..f8b35074079 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -166,8 +166,8 @@ static void print_unix_job(int snum, print_queue_struct *q) pj.spooled = True; pj.smbjob = False; fstrcpy(pj.filename, ""); - fstrcpy(pj.jobname, q->file); - fstrcpy(pj.user, q->user); + fstrcpy(pj.jobname, q->fs_file); + fstrcpy(pj.user, q->fs_user); pj.snum = snum; print_job_store(jobid, &pj); @@ -222,7 +222,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void } for (i=0;iqcount;i++) { - int qid = print_parse_jobid(ts->queue[i].file); + int qid = print_parse_jobid(ts->queue[i].fs_file); if (jobid == qid) break; } @@ -406,7 +406,7 @@ static void print_queue_update(int snum) fill in any system job numbers as we go */ for (i=0; iqueue[i].status = pjob.status; ts->queue[i].priority = 1; ts->queue[i].time = pjob.starttime; - fstrcpy(ts->queue[i].user, pjob.user); - fstrcpy(ts->queue[i].file, pjob.jobname); + fstrcpy(ts->queue[i].fs_user, pjob.user); + fstrcpy(ts->queue[i].fs_file, pjob.jobname); ts->qcount++; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 24b43f2ffb4..c159e9e0890 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1837,7 +1837,7 @@ static void spoolss_notify_username(int snum, pstring temp; uint32 len; - len = (uint32)dos_PutUniCode(temp, queue->user, + len = (uint32)dos_PutUniCode(temp, queue->fs_user, sizeof(temp) - 2, True); data->notify_data.data.length = len / 2 - 1; @@ -1876,7 +1876,7 @@ static void spoolss_notify_job_name(int snum, pstring temp; uint32 len; - len = (uint32)dos_PutUniCode(temp, queue->file, sizeof(temp) - 2, + len = (uint32)dos_PutUniCode(temp, queue->fs_file, sizeof(temp) - 2, True); data->notify_data.data.length = len / 2 - 1; @@ -4867,8 +4867,8 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, job_info->jobid=queue->job; init_unistr(&job_info->printername, lp_servicename(snum)); init_unistr(&job_info->machinename, temp_name); - init_unistr(&job_info->username, queue->user); - init_unistr(&job_info->document, queue->file); + init_unistr(&job_info->username, queue->fs_user); + init_unistr(&job_info->document, queue->fs_file); init_unistr(&job_info->datatype, "RAW"); init_unistr(&job_info->text_status, ""); job_info->status=nt_printj_status(queue->status); @@ -4901,9 +4901,9 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, init_unistr(&job_info->printername, chaine); init_unistr(&job_info->machinename, temp_name); - init_unistr(&job_info->username, queue->user); - init_unistr(&job_info->document, queue->file); - init_unistr(&job_info->notifyname, queue->user); + init_unistr(&job_info->username, queue->fs_user); + init_unistr(&job_info->document, queue->fs_file); + init_unistr(&job_info->notifyname, queue->fs_user); init_unistr(&job_info->datatype, "RAW"); init_unistr(&job_info->printprocessor, "winprint"); init_unistr(&job_info->parameters, ""); diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index 70d79a5f566..1724ba85b53 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -460,7 +460,7 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, PACKI(desc,"W",queue->job); /* uJobId */ if (uLevel == 1) { - PACKS(desc,"B21",dos_to_unix(queue->user,False)); /* szUserName */ + PACKS(desc,"B21",dos_to_unix(queue->fs_user,False)); /* szUserName */ PACKS(desc,"B",""); /* pad */ PACKS(desc,"B16",""); /* szNotifyName */ PACKS(desc,"B10","PM_Q_RAW"); /* szDataType */ @@ -470,17 +470,17 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, PACKS(desc,"z",""); /* pszStatus */ PACKI(desc,"D",t); /* ulSubmitted */ PACKI(desc,"D",queue->size); /* ulSize */ - PACKS(desc,"z",dos_to_unix(queue->file,False)); /* pszComment */ + PACKS(desc,"z",dos_to_unix(queue->fs_file,False)); /* pszComment */ } if (uLevel == 2 || uLevel == 3 || uLevel == 4) { PACKI(desc,"W",queue->priority); /* uPriority */ - PACKS(desc,"z",dos_to_unix(queue->user,False)); /* pszUserName */ + PACKS(desc,"z",dos_to_unix(queue->fs_user,False)); /* pszUserName */ PACKI(desc,"W",n+1); /* uPosition */ PACKI(desc,"W",printj_status(queue->status)); /* fsStatus */ PACKI(desc,"D",t); /* ulSubmitted */ PACKI(desc,"D",queue->size); /* ulSize */ PACKS(desc,"z","Samba"); /* pszComment */ - PACKS(desc,"z",dos_to_unix(queue->file,False)); /* pszDocument */ + PACKS(desc,"z",dos_to_unix(queue->fs_file,False)); /* pszDocument */ if (uLevel == 3) { PACKS(desc,"z",""); /* pszNotifyName */ PACKS(desc,"z","PM_Q_RAW"); /* pszDataType */ diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 47f200ecedb..40190b550e6 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3291,7 +3291,7 @@ int reply_printqueue(connection_struct *conn, SSVAL(p,5, queue[i].job); SIVAL(p,7,queue[i].size); SCVAL(p,11,0); - StrnCpy(p+12,queue[i].user,16); + StrnCpy(p+12,queue[i].fs_user,16); p += 28; } -- cgit From 9e81166ca6494c63ae736a8da268883a04223185 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 03:13:36 +0000 Subject: Fix up sending of JOB change messages. Jeremy. --- source/printing/printing.c | 28 +++++++++++++++++++++------- source/rpc_server/srv_spoolss_nt.c | 25 ++++++++++++++++--------- source/utils/smbcontrol.c | 10 ++++++++-- 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/source/printing/printing.c b/source/printing/printing.c index f8b35074079..50051c495b5 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -317,6 +317,20 @@ static void set_updating_pid(fstring printer_name, BOOL delete) tdb_store(tdb, key, data, TDB_REPLACE); } +/**************************************************************************** + Send a message saying the queue changed. +****************************************************************************/ + +static void send_queue_message(const char *printer_name, uint32 high, uint32 low) +{ + char msg[8 + sizeof(fstring)]; + SIVAL(msg,0,low); + SIVAL(msg,4,high); + fstrcpy(&msg[8], printer_name); + + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, False); +} + /**************************************************************************** update the internal database from the system print queue for a queue ****************************************************************************/ @@ -452,7 +466,7 @@ static void print_queue_update(int snum) if( qcount != get_queue_status(snum, &old_status)) { DEBUG(10,("print_queue_update: queue status change %d jobs -> %d jobs for printer %s\n", old_status.qcount, qcount, printer_name )); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); } /* store the new queue status structure */ @@ -648,7 +662,7 @@ BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); return !print_job_exists(jobid); } @@ -691,7 +705,7 @@ BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); /* how do we tell if this succeeded? */ @@ -735,7 +749,7 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); return True; } @@ -1243,7 +1257,7 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); return True; } @@ -1276,7 +1290,7 @@ BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); return True; } @@ -1313,7 +1327,7 @@ BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode) printer_name = PRINTERNAME(snum); - message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False); + send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB); return True; } diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index c159e9e0890..e543bf5f9e5 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -567,33 +567,39 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size { Printer_entry *find_printer; WERROR status; + fstring printer_name; char msg[8]; + char *buf_ptr = (char *)buf; uint32 low, high; - if (len != sizeof(msg)) { + if (len < sizeof(msg) + 2) { DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); return; } - memcpy(msg, buf, len); + memcpy(msg, buf_ptr, sizeof(msg)); low = IVAL(msg,0); high = IVAL(msg,4); + fstrcpy(printer_name, buf_ptr + sizeof(msg)); - DEBUG(10,("srv_spoolss_receive_message: Got message printer change low=0x%x high=0x%x\n", (unsigned int)low, - (unsigned int)high )); - - find_printer = printers_list; + DEBUG(10,("srv_spoolss_receive_message: Got message printer change name [%s] low=0x%x high=0x%x\n", + printer_name, (unsigned int)low, (unsigned int)high )); /* Iterate the printer list */ - for(; find_printer; find_printer = find_printer->next) { + for(find_printer = printers_list; find_printer; find_printer = find_printer->next) { /* * If the entry has a connected client we send the message. */ - if (find_printer->notify.client_connected==True) { DEBUG(10,("srv_spoolss_receive_message: printerserver [%s]\n", find_printer->dev.printerservername )); + if (*printer_name && !strequal(printer_name, find_printer->dev.handlename)) { + DEBUG(10,("srv_spoolss_receive_message: ignoring message sent to %s [%s]\n", + printer_name, find_printer->dev.handlename )); + continue; + } + if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, low, high, &status)) DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n", (unsigned int)W_ERROR_V(status))); @@ -609,8 +615,9 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size static BOOL srv_spoolss_sendnotify(uint32 high, uint32 low) { - char msg[8]; + char msg[10]; + ZERO_STRUCT(msg); SIVAL(msg,0,low); SIVAL(msg,4,high); DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x\n", low, high)); diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index 3b4781bb742..f1c56040dcb 100644 --- a/source/utils/smbcontrol.c +++ b/source/utils/smbcontrol.c @@ -281,8 +281,14 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) fprintf(stderr, "printer-notify needs a printer name\n"); return (False); } - retval = send_message(dest, MSG_PRINTER_NOTIFY, params[0], - strlen(params[0]) + 1, False); + { + char msg[8 + sizeof(fstring)]; + SIVAL(msg,0,PRINTER_CHANGE_ALL); + SIVAL(msg,4,0); + fstrcpy(&msg[8], params[0]); + + retval = send_message(dest, MSG_PRINTER_NOTIFY, msg, 8 + strlen(params[0]) + 1, False); + } break; case MSG_SMB_FORCE_TDIS: -- cgit From 1716c915dfa609890e0bbb4122e6ab683362cae6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 17:37:32 +0000 Subject: bcopy must DIE ! Stop people creeping use of bcopy back into the code (and yes I know who you are..... :-). Jeremy. --- source/include/safe_string.h | 5 +++++ source/libsmb/clidgram.c | 2 +- source/libsmb/libsmbclient.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/include/safe_string.h b/source/include/safe_string.h index 7af84c56116..4517d824a58 100644 --- a/source/include/safe_string.h +++ b/source/include/safe_string.h @@ -22,6 +22,11 @@ #ifndef _SAFE_STRING_H #define _SAFE_STRING_H +#ifdef bcopy +#undef bcopy +#endif /* bcopy */ +#define bcopy(src,dest,size) __ERROR__XX__NEVER_USE_BCOPY___; + #ifdef strcpy #undef strcpy #endif /* strcpy */ diff --git a/source/libsmb/clidgram.c b/source/libsmb/clidgram.c index ded47b7d068..c21c4263f5a 100644 --- a/source/libsmb/clidgram.c +++ b/source/libsmb/clidgram.c @@ -122,7 +122,7 @@ int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int /* Copy the data to buffer, respecting sizes ... */ - bcopy(&dgram->data[92], buf, MIN(bufsiz, (dgram->datasize - 92))); + memcpy(buf, &dgram->data[92], MIN(bufsiz, (dgram->datasize - 92))); } else diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 55f17b2b34e..ce6d477c1a4 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -1912,7 +1912,7 @@ struct smbc_dirent *smbc_readdir(unsigned int fd) /* Hmmm, do I even need to copy it? */ - bcopy(dirent, smbc_local_dirent, dirent->dirlen); /* Copy the dirent */ + memcpy(smbc_local_dirent, dirent, dirent->dirlen); /* Copy the dirent */ dirp = (struct smbc_dirent *)smbc_local_dirent; dirp->comment = (char *)(&dirp->name + dirent->namelen + 1); fe->dir_next = fe->dir_next->next; @@ -2001,7 +2001,7 @@ int smbc_getdents(unsigned int fd, struct smbc_dirent *dirp, int count) dirent = dir->dirent; - bcopy(dirent, ndir, reqd); /* Copy the data in ... */ + memcpy(ndir, dirent, reqd); /* Copy the data in ... */ ((struct smbc_dirent *)ndir)->comment = (char *)(&((struct smbc_dirent *)ndir)->name + dirent->namelen + 1); -- cgit From e085782dfacd077e3616887b758c5a4e822ea9a9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 17:58:17 +0000 Subject: Back port tridge's xcopy /o fix. Jeremy. --- source/include/proto.h | 6 ++++- source/smbd/nttrans.c | 9 +++++--- source/smbd/open.c | 61 +++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 59 insertions(+), 17 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 1a254a89f31..789cf69d819 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4290,7 +4290,11 @@ int reply_nttrans(connection_struct *conn, int fd_close(struct connection_struct *conn, files_struct *fsp); files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, - int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); + int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); +files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, + int share_mode,int ofun, mode_t mode,int oplock_request, + int *Access,int *action); files_struct *open_file_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf, int smb_ofun, int *action); files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf); diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 110d7ed7d26..1af57462d42 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -808,8 +808,11 @@ int reply_ntcreate_and_X(connection_struct *conn, * before issuing an oplock break request to * our client. JRA. */ - fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode, - smb_ofun,unixmode, oplock_request,&rmode,&smb_action); + fsp = open_file_shared1(conn,fname,&sbuf, + desired_access, + smb_open_mode, + smb_ofun, unixmode, oplock_request, + &rmode,&smb_action); if (!fsp) { /* We cheat here. There are two cases we @@ -1311,7 +1314,7 @@ static int call_nt_transact_create(connection_struct *conn, * Ordinary file case. */ - fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode,smb_ofun,unixmode, + fsp = open_file_shared1(conn,fname,&sbuf,desired_access,smb_open_mode,smb_ofun,unixmode, oplock_request,&rmode,&smb_action); if (!fsp) { diff --git a/source/smbd/open.c b/source/smbd/open.c index 4b659305473..e12317f4313 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -447,8 +447,10 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i ****************************************************************************/ static int open_mode_check(connection_struct *conn, const char *fname, SMB_DEV_T dev, - SMB_INO_T inode, int share_mode, int *p_flags, int *p_oplock_request, - BOOL *p_all_current_opens_are_level_II) + SMB_INO_T inode, + uint32 desired_access, + int share_mode, int *p_flags, int *p_oplock_request, + BOOL *p_all_current_opens_are_level_II) { int i; int num_share_modes; @@ -520,13 +522,28 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou *p_all_current_opens_are_level_II = False; } - /* someone else has a share lock on it, check to see - if we can too */ - if(check_share_mode(conn, share_entry, share_mode, fname, fcbopen, p_flags) == False) { - SAFE_FREE(old_shares); - errno = EACCES; - return -1; + /* this is a nasty hack, but necessary until we rewrite our open + handling to use a NTCreateX call as the basic call. + NT may open a file with neither read nor write access, and in + this case it expects the open not to conflict with any + existing deny modes. This happens (for example) during a + "xcopy /o" where the second file descriptor is used for + ACL sets + This code should be removed once we have a propoer ntcreateX + open functions + (tridge) + */ + if (desired_access == 0 || + (desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE))) { + /* someone else has a share lock on it, check to see + if we can too */ + if (!check_share_mode(conn, share_entry, share_mode, + fname, fcbopen, p_flags)) { + SAFE_FREE(old_shares); + errno = EACCES; + return -1; + } } } /* end for */ @@ -614,8 +631,23 @@ static void kernel_flock(files_struct *fsp, int deny_mode) Open a file with a share mode. On output from this open we are guarenteeing that ****************************************************************************/ + files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, - int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action) + int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action) +{ + return open_file_shared1(conn, fname, psbuf, 0, share_mode, ofun, mode, + oplock_request, Access, action); +} + +/**************************************************************************** + Open a file with a share mode. On output from this open we are guarenteeing + that +****************************************************************************/ + +files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, + int share_mode,int ofun, mode_t mode,int oplock_request, + int *Access,int *action) { int flags=0; int flags2=0; @@ -744,8 +776,10 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S lock_share_entry(conn, dev, inode); - num_share_modes = open_mode_check(conn, fname, dev, inode, share_mode, - &flags, &oplock_request, &all_current_opens_are_level_II); + num_share_modes = open_mode_check(conn, fname, dev, inode, + desired_access, share_mode, + &flags, &oplock_request, &all_current_opens_are_level_II); + if(num_share_modes == -1) { /* @@ -809,8 +843,9 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", lock_share_entry_fsp(fsp); - num_share_modes = open_mode_check(conn, fname, dev, inode, share_mode, - &flags, &oplock_request, &all_current_opens_are_level_II); + num_share_modes = open_mode_check(conn, fname, dev, inode, + desired_access, share_mode, + &flags, &oplock_request, &all_current_opens_are_level_II); if(num_share_modes == -1) { unlock_share_entry_fsp(fsp); -- cgit From 69daf795673dfc23be87e5dbd5ab96594ad4929b Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 26 Feb 2002 18:54:10 +0000 Subject: make syntax work on non-linux systems - parse server parameter before calling getopt for options. --- source/rpcclient/rpcclient.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index c78fae43183..4907372c8a6 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -636,10 +636,26 @@ static void usage(void) server; pstring logfile; struct cmd_set **cmd_set; + extern BOOL AllowDebugChange; setlinebuf(stdout); DEBUGLEVEL = 1; + AllowDebugChange = False; + + /* Parse options */ + if (argc == 0) { + usage(); + return 0; + } + + if (strncmp("//", argv[1], 2) == 0 || strncmp("\\\\", argv[1], 2) == 0) + argv[1] += 2; + + pstrcpy(server, argv[1]); + + argv++; + argc--; while ((opt = getopt(argc, argv, "A:s:Nd:U:W:c:l:h")) != EOF) { switch (opt) { @@ -695,19 +711,6 @@ static void usage(void) } } - argv += optind; - argc -= optind; - - /* Parse options */ - if (argc == 0) { - usage(); - return 0; - } - - if (strncmp("//", argv[0], 2) == 0 || strncmp("\\\\", argv[0], 2) == 0) - argv[0] += 2; - - pstrcpy(server, argv[0]); /* the following functions are part of the Samba debugging facilities. See lib/debug.c */ -- cgit From 50cfb990c5a77f8679fb60573cbb003a8d72779c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 27 Feb 2002 00:10:03 +0000 Subject: fix a few error defines --- source/include/nterr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/include/nterr.h b/source/include/nterr.h index 69b5d7981de..cf1aa12be83 100644 --- a/source/include/nterr.h +++ b/source/include/nterr.h @@ -30,10 +30,12 @@ #define STATUS_BUFFER_OVERFLOW NT_STATUS(0x80000005) #define NT_STATUS_NO_MORE_ENTRIES NT_STATUS(0x8000001a) -#define STATUS_MORE_ENTRIES NT_STATUS(0x0105) #define ERROR_INVALID_PARAMETER NT_STATUS(0x0057) #define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a) -#define STATUS_1804 NT_STATUS(0x070c) +#define STATUS_MORE_ENTRIES NT_STATUS(0x0105) +#define ERROR_INVALID_DATATYPE NT_STATUS(0x070c) + +#define STATUS_MORE_ENTRIES NT_STATUS(0x0105) #define STATUS_NOTIFY_ENUM_DIR NT_STATUS(0x010c) /* Win32 Error codes extracted using a loop in smbclient then printing a -- cgit From fe0c5bf5121152c1493000482feaa1e031116eb6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 27 Feb 2002 00:13:56 +0000 Subject: * Fix the printer change notify code to fill in the SPOOL_NOTIFY_INFO correctly on driver changes. * modify srv_spoolss_sendnotify() to pass in the printer name as well * do not reset the devmode when we change the driver for a printer (observed behavior on both NT and 2k) * removed some old commented out code we need to fix the cli_spoolss_notify code to use talloc for better maintainability.... --- source/include/proto.h | 12 +++- source/include/rpc_spoolss.h | 1 - source/printing/nt_printing.c | 14 +++- source/rpc_client/cli_spoolss_notify.c | 121 ++++++++++++++++++++++++++++----- source/rpc_parse/parse_spoolss.c | 85 ++++++++++++++++++++++- source/rpc_server/srv_spoolss_nt.c | 92 +++++++++++++------------ 6 files changed, 256 insertions(+), 69 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 789cf69d819..4159b570d47 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2428,7 +2428,8 @@ BOOL spoolss_disconnect_from_client( struct cli_state *cli); BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle); BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle, - uint32 change_low, uint32 change_high, WERROR *status); + char* printername, uint32 change_low, uint32 change_high, + WERROR *status); BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, WERROR *status); @@ -3692,7 +3693,8 @@ BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HN BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, - uint32 change_low, uint32 change_high); + uint32 change_low, uint32 change_high, + SPOOL_NOTIFY_INFO *info); BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth); @@ -3992,6 +3994,12 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER SPOOL_R_DELETEPRINTERDRIVER *r_u); WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u); WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u); +void spoolss_notify_driver_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id); WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u); WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u); WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 9ed83b18d8a..17bc651f566 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -55,7 +55,6 @@ #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e #define SPOOLSS_SPOOLERINIT 0x3f #define SPOOLSS_RESETPRINTEREX 0x40 -#define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42 #define SPOOLSS_DELETEPRINTERDATAEX 0x51 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59 diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index ac37d594d5d..ed5af053481 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2868,7 +2868,7 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) kbuf.dsize = strlen(key)+1; dbuf = tdb_fetch(tdb_drivers, kbuf); - if (!dbuf.dptr) { + if (!dbuf.dptr) { /* * When changing to a driver that has no init info in the tdb, remove * the previous drivers init info and leave the new on blank. @@ -2889,11 +2889,23 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) ZERO_STRUCT(info.devmode->devicename); fstrcpy(info.devmode->devicename, info_ptr->printername); +#if 0 /* JERRY */ + /* + * NT/2k does not change the Device Mode of a printer + * when changing the driver. This makes no sense to me + * but it just the way it goes. However, printer data + * should be deleted and reset so I'm leaving that in. + * --jerry + */ + /* * Bind the saved DEVMODE to the new the printer. */ free_nt_devicemode(&info_ptr->devmode); info_ptr->devmode = info.devmode; +#else + free_nt_devicemode(&info.devmode); +#endif DEBUG(10,("set_driver_init_2: Set printer [%s] init DEVMODE for driver [%s]\n", info_ptr->printername, info_ptr->drivername)); diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 7b5ba84dbb6..3d37caefd29 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -182,59 +182,144 @@ BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 return True; } +/********************************************************************** + Release the memory held by a SPOOL_NOTIFY_INFO_DATA + *********************************************************************/ + +static void free_notify_data(SPOOL_NOTIFY_INFO_DATA *data, uint32 len) +{ + uint32 i; + + if (!data) + return; + + for (i=0; imem_ctx, MARSHALL); prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); + + ZERO_STRUCT(notify_info); + + /* lookup the printer if we have a name */ + + if (*printername) { + result = get_a_printer(&printer, 2, printername); + if (! W_ERROR_IS_OK(result)) { + *status = result; + goto done; + } + } - /* create and send a MSRPC command with api */ -/* + /* + * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX + * events. --jerry + */ + + /* Did the driver change? */ + + if (change_low & PRINTER_CHANGE_SET_PRINTER_DRIVER) { + change_low &= ~PRINTER_CHANGE_SET_PRINTER_DRIVER; + DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_CHANGE_SET_PRINTER_DRIVER set on [%s][%d]\n", + printername, idx)); + if ((data=Realloc(notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", + (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); + *status = WERR_NOMEM; + goto done; + } + notify_data = data; + + memset(notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + * See PRINTER_NOTIFY_INFO_DATA entries in MSDN + * --jerry + */ + construct_info_data(notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); + + spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, cli->mem_ctx); + idx++; + } + + +#if 0 /* JERRY -- do not delete */ DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname, credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); -*/ +#endif + + /* create and send a MSRPC command with api */ + /* store the parameters */ - make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high); + + notify_info.flags = 0x00000200; + notify_info.count = idx; + notify_info.data = notify_data; + + make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high, ¬ify_info); /* turn parameters into data stream */ if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + *status = WERR_BADFUNC; + goto done; } /* send the data on \PIPE\ */ if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + DEBUG(0,("cli_spoolss_reply_rrpcn: SPOOLSS_RRPCN failed!\n")); + *status = WERR_BADFUNC; + goto done; } - prs_mem_free(&buf); /* turn data stream into parameters*/ if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; + DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); + *status = WERR_BADFUNC; + goto done; } - - prs_mem_free(&rbuf); - *status=r_s.status; + *status = r_s.status; - return True; +done: + prs_mem_free(&buf); + prs_mem_free(&rbuf); + free_a_printer(&printer, 2); + free_notify_data(notify_data, idx); + + return W_ERROR_IS_OK(*status); } /*************************************************************************** diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 94bf6f906b7..4c38f4d4303 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -6154,12 +6154,79 @@ BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, return True; } +#if 0 /* JERRY - not currently used but could be :-) */ + +/******************************************************************* + Deep copy a SPOOL_NOTIFY_INFO_DATA structure + ******************************************************************/ +static BOOL copy_spool_notify_info_data(SPOOL_NOTIFY_INFO_DATA *dst, + SPOOL_NOTIFY_INFO_DATA *src, int n) +{ + int i; + + memcpy(dst, src, sizeof(SPOOL_NOTIFY_INFO_DATA)*n); + + for (i=0; isize != POINTER) + continue; + len = src->notify_data.data.length; + s = malloc(sizeof(uint16)*len); + if (s == NULL) { + DEBUG(0,("copy_spool_notify_info_data: malloc() failed!\n")); + return False; + } + + memcpy(s, src->notify_data.data.string, len*2); + dst->notify_data.data.string = s; + } + + return True; +} + +/******************************************************************* + Deep copy a SPOOL_NOTIFY_INFO structure + ******************************************************************/ +static BOOL copy_spool_notify_info(SPOOL_NOTIFY_INFO *dst, SPOOL_NOTIFY_INFO *src) +{ + if (!dst) { + DEBUG(0,("copy_spool_notify_info: NULL destination pointer!\n")); + return False; + } + + dst->version = src->version; + dst->flags = src->flags; + dst->count = src->count; + + if (dst->count) + { + dst->data = malloc(dst->count * sizeof(SPOOL_NOTIFY_INFO_DATA)); + + DEBUG(10,("copy_spool_notify_info: allocating space for [%d] PRINTER_NOTIFY_INFO_DATA entries\n", + dst->count)); + + if (dst->data == NULL) { + DEBUG(0,("copy_spool_notify_info: malloc() failed for [%d] entries!\n", + dst->count)); + return False; + } + + return (copy_spool_notify_info_data(dst->data, src->data, src->count)); + } + + return True; +} +#endif /* JERRY */ + /******************************************************************* * init a structure. ********************************************************************/ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, - uint32 change_low, uint32 change_high) + uint32 change_low, uint32 change_high, + SPOOL_NOTIFY_INFO *info) { if (q_u == NULL) return False; @@ -6175,8 +6242,20 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, q_u->info_ptr=1; q_u->info.version=2; - q_u->info.flags=PRINTER_NOTIFY_INFO_DISCARDED; - q_u->info.count=0; + + if (info->count) { + DEBUG(10,("make_spoolss_q_reply_rrpcn: [%d] PRINTER_NOTIFY_INFO_DATA\n", + info->count)); + q_u->info.version = info->version; + q_u->info.flags = info->flags; + q_u->info.count = info->count; + /* pointer field - be careful! */ + q_u->info.data = info->data; + } + else { + q_u->info.flags=PRINTER_NOTIFY_INFO_DISCARDED; + q_u->info.count=0; + } return True; } diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index e543bf5f9e5..613d516971f 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -435,7 +435,7 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) * anymore, so I've simplified this loop greatly. Here * we are just verifying that the printer name is a valid * printer service defined in smb.conf - * --jerry [Fri Feb 15 11:17:46 CST 2002] + * --jerry [Fri Feb 15 11:17:46 CST 2002] */ for (snum=0; snumnotify.client_connected==True) { - DEBUG(10,("srv_spoolss_receive_message: printerserver [%s]\n", find_printer->dev.printerservername )); - if (*printer_name && !strequal(printer_name, find_printer->dev.handlename)) { + + if (find_printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) + DEBUG(10,("srv_spoolss_receive_message: printserver [%s]\n", find_printer->dev.printerservername )); + else + DEBUG(10,("srv_spoolss_receive_message: printer [%s]\n", find_printer->dev.handlename)); + + /* + * if handle is a printer, only send if the printer_name matches. + * ...else if handle is a printerserver, send to all + */ + + if (*printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) + && !strequal(printer_name, find_printer->dev.handlename)) + { DEBUG(10,("srv_spoolss_receive_message: ignoring message sent to %s [%s]\n", printer_name, find_printer->dev.handlename )); continue; } - if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, low, high, &status)) + /* issue the client call */ + + if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, printer_name, low, high, &status)) DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n", (unsigned int)W_ERROR_V(status))); else @@ -613,16 +627,22 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size Send a notify event. ****************************************************************************/ -static BOOL srv_spoolss_sendnotify(uint32 high, uint32 low) +static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low) { - char msg[10]; + char msg[8 + sizeof(fstring)]; ZERO_STRUCT(msg); + SIVAL(msg,0,low); SIVAL(msg,4,high); - DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x\n", low, high)); + fstrcpy(&msg[8], printer_name); + + DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x [%s]\n", + low, high, printer_name)); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(msg), False); + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, + False); + return True; } @@ -1013,7 +1033,7 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL update_c_setprinter(FALSE); if (W_ERROR_IS_OK(result)) { - srv_spoolss_sendnotify(0, PRINTER_CHANGE_DELETE_PRINTER); + srv_spoolss_sendnotify(Printer->dev.handlename, 0, PRINTER_CHANGE_DELETE_PRINTER); } return result; @@ -1502,10 +1522,9 @@ static void spoolss_notify_port_name(int snum, /******************************************************************* * fill a notify_info_data with the printername - * jfmxxxx: it's incorrect, should be lp_printerdrivername() * but it doesn't exist, have to see what to do ********************************************************************/ -static void spoolss_notify_driver_name(int snum, +void spoolss_notify_driver_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1560,7 +1579,6 @@ static void spoolss_notify_comment(int snum, /******************************************************************* * fill a notify_info_data with the comment - * jfm:xxxx incorrect, have to create a new smb.conf option * location = "Room 1, floor 2, building 3" ********************************************************************/ static void spoolss_notify_location(int snum, @@ -1600,8 +1618,6 @@ static void spoolss_notify_devmode(int snum, /******************************************************************* * fill a notify_info_data with the separator file name - * jfm:xxxx just return no file could add an option to smb.conf - * separator file = "separator.txt" ********************************************************************/ static void spoolss_notify_sepfile(int snum, SPOOL_NOTIFY_INFO_DATA *data, @@ -2167,7 +2183,7 @@ static int search_notify(uint16 type, uint16 field, int *value) /**************************************************************************** ****************************************************************************/ -static void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id) +void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id) { info_data->type = type; info_data->field = field; @@ -2220,7 +2236,7 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int current_data=&info->data[info->count]; - construct_info_data(current_data, type, field, id); + construct_info_data(current_data, type, field, id); DEBUG(10,("construct_notify_printer_info: calling [%s] snum=%d printername=[%s])\n", notify_info_data_table[j].name, snum, printer->info_2->printername )); @@ -4652,6 +4668,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, NT_PRINTER_INFO_LEVEL *printer = NULL, *old_printer = NULL; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); WERROR result; + uint32 notify_flag = PRINTER_CHANGE_SET_PRINTER; DEBUG(8,("update_printer\n")); @@ -4767,18 +4784,27 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, * lookup previously saved driver initialization info, which is then * bound to the printer, simulating what happens in the Windows arch. */ - if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)) + if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)){ set_driver_init(printer, 2); + notify_flag |= PRINTER_CHANGE_SET_PRINTER_DRIVER; + } } /* Update printer info */ result = mod_a_printer(*printer, 2); - done: +done: + /* + * It appears that if the PrinterName had changed, we should + * set this to PRINTER_CHANGE_ADD_PRINTER. This was observed + * between 2k -> 2k. Otherwise a PRINTER_CHANGE_SET_PRINTER + * event is ok. --jerry + */ + srv_spoolss_sendnotify(printer->info_2->printername, 0, notify_flag); + free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); - srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); return result; } @@ -5987,11 +6013,12 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_ACCESS_DENIED; } + srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER); + free_a_printer(&printer,2); update_c_setprinter(False); - srv_spoolss_sendnotify(0, PRINTER_CHANGE_ADD_PRINTER); return WERR_OK; } @@ -6383,24 +6410,6 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP convert_specific_param(¶m, value , type, data, real_len); -#if 0 - /* JRA. W2K always changes changeid. */ - - if (get_specific_param(*printer, 2, param->value, &old_param.data, - &old_param.type, (uint32 *)&old_param.data_len)) { - - if (param->type == old_param.type && - param->data_len == old_param.data_len && - memcmp(param->data, old_param.data, - old_param.data_len) == 0) { - - DEBUG(3, ("setprinterdata hasn't changed\n")); - status = WERR_OK; - goto done; - } - } -#endif - unlink_specific_param_if_exist(printer->info_2, param); /* @@ -6425,11 +6434,6 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP free_nt_printer_param(¶m); SAFE_FREE(old_param.data); -#if 0 - /* Is this correct. JRA ? */ - srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER); -#endif - return status; } -- cgit From d7b756438086c03f829fef0030dc3eb2731a976c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 00:18:02 +0000 Subject: Immediate structure and vsnprintf fixes from Andrew from HEAD. Jeremy. --- source/configure | 1169 ++++++++++++++++++++++++++------------------------- source/configure.in | 41 +- 2 files changed, 616 insertions(+), 594 deletions(-) diff --git a/source/configure b/source/configure index ec2b28c18e9..edfb7f83800 100755 --- a/source/configure +++ b/source/configure @@ -1077,7 +1077,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3688,13 +3688,19 @@ else #include int main() { - #define X_FOOBAR(x) ((FOOBAR) { x }) - typedef struct {unsigned x;} FOOBAR; - FOOBAR f = X_FOOBAR(1); + typedef struct {unsigned x;} FOOBAR; +#define X_FOOBAR(x) ((FOOBAR) { x }) +#define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; ; return 0; } EOF -if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3717,13 +3723,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3721: checking for unix domain sockets" >&5 +echo "configure:3727: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3738,7 +3744,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3759,13 +3765,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3763: checking for socklen_t type" >&5 +echo "configure:3769: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3778,7 +3784,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3799,13 +3805,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3803: checking for sig_atomic_t type" >&5 +echo "configure:3809: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3818,7 +3824,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +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 @@ -3841,20 +3847,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3845: checking for errno declaration" >&5 +echo "configure:3851: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3876,20 +3882,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3880: checking for setresuid declaration" >&5 +echo "configure:3886: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3911,20 +3917,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3915: checking for setresgid declaration" >&5 +echo "configure:3921: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3946,20 +3952,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3950: checking for asprintf declaration" >&5 +echo "configure:3956: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3981,20 +3987,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:3985: checking for vasprintf declaration" >&5 +echo "configure:3991: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:3998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4016,20 +4022,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4020: checking for vsnprintf declaration" >&5 +echo "configure:4026: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4051,20 +4057,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4055: checking for snprintf declaration" >&5 +echo "configure:4061: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4088,7 +4094,7 @@ EOF # 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:4092: checking for real setresuid" >&5 +echo "configure:4098: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4097,12 +4103,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4112: \"$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 @@ -4127,7 +4133,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4131: checking for real setresgid" >&5 +echo "configure:4137: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4136,13 +4142,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4152: \"$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 @@ -4165,7 +4171,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4169: checking for 8-bit clean memcmp" >&5 +echo "configure:4175: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4173,7 +4179,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4193: \"$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 @@ -4207,7 +4213,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4211: checking whether to use readline" >&5 +echo "configure:4217: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4219,17 +4225,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4223: checking for $ac_hdr" >&5 +echo "configure:4229: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4239: \"$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* @@ -4259,17 +4265,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4263: checking for $ac_hdr" >&5 +echo "configure:4269: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4279: \"$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* @@ -4300,17 +4306,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4304: checking for $ac_hdr" >&5 +echo "configure:4310: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4320: \"$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* @@ -4333,7 +4339,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4337: checking for tgetent in -l${termlib}" >&5 +echo "configure:4343: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4341,7 +4347,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4362: \"$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 @@ -4374,7 +4380,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4378: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4384: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4382,7 +4388,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4403: \"$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 @@ -4444,17 +4450,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4448: checking for $ac_hdr" >&5 +echo "configure:4454: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4464: \"$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* @@ -4484,17 +4490,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4488: checking for $ac_hdr" >&5 +echo "configure:4494: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4504: \"$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* @@ -4525,17 +4531,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4529: checking for $ac_hdr" >&5 +echo "configure:4535: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4545: \"$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* @@ -4558,7 +4564,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4562: checking for tgetent in -l${termlib}" >&5 +echo "configure:4568: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4566,7 +4572,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4587: \"$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 @@ -4599,7 +4605,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4603: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4609: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4607,7 +4613,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4628: \"$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 @@ -4673,12 +4679,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4677: checking for $ac_func" >&5 +echo "configure:4683: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4711: \"$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 @@ -4729,7 +4735,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:4733: checking for printf in -lnsl_s" >&5 +echo "configure:4739: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4737,7 +4743,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4758: \"$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 @@ -4779,7 +4785,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4783: checking for printf in -lnsl" >&5 +echo "configure:4789: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4787,7 +4793,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4808: \"$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 @@ -4829,7 +4835,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4833: checking for connect in -lsocket" >&5 +echo "configure:4839: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4837,7 +4843,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4858: \"$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 @@ -4879,7 +4885,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4883: checking for connect in -linet" >&5 +echo "configure:4889: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4887,7 +4893,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4908: \"$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 @@ -4942,12 +4948,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4946: checking for $ac_func" >&5 +echo "configure:4952: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4980: \"$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 @@ -4996,7 +5002,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5000: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5006: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5004,7 +5010,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5025: \"$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 @@ -5045,12 +5051,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5049: checking for $ac_func" >&5 +echo "configure:5055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5083: \"$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 @@ -5106,12 +5112,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5110: checking for $ac_func" >&5 +echo "configure:5116: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5144: \"$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 @@ -5161,12 +5167,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5165: checking for $ac_func" >&5 +echo "configure:5171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5199: \"$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 @@ -5216,12 +5222,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5220: checking for $ac_func" >&5 +echo "configure:5226: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5254: \"$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 @@ -5271,12 +5277,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5275: checking for $ac_func" >&5 +echo "configure:5281: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5309: \"$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 @@ -5326,12 +5332,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5330: checking for $ac_func" >&5 +echo "configure:5336: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5381,12 +5387,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5385: checking for $ac_func" >&5 +echo "configure:5391: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5419: \"$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 @@ -5436,12 +5442,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5440: checking for $ac_func" >&5 +echo "configure:5446: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5474: \"$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 @@ -5491,12 +5497,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5495: checking for $ac_func" >&5 +echo "configure:5501: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5529: \"$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 @@ -5546,12 +5552,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5550: checking for $ac_func" >&5 +echo "configure:5556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5584: \"$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 @@ -5601,12 +5607,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5605: checking for $ac_func" >&5 +echo "configure:5611: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5639: \"$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 @@ -5658,12 +5664,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5662: checking for $ac_func" >&5 +echo "configure:5668: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5696: \"$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 @@ -5714,12 +5720,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:5718: checking for $ac_func" >&5 +echo "configure:5724: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5752: \"$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 @@ -5769,12 +5775,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:5773: checking for $ac_func" >&5 +echo "configure:5779: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5807: \"$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 @@ -5824,12 +5830,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5828: checking for $ac_func" >&5 +echo "configure:5834: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5862: \"$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 @@ -5879,12 +5885,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5883: checking for $ac_func" >&5 +echo "configure:5889: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5917: \"$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 @@ -5934,12 +5940,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:5938: checking for $ac_func" >&5 +echo "configure:5944: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5972: \"$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 @@ -5989,12 +5995,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:5993: checking for $ac_func" >&5 +echo "configure:5999: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6027: \"$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 +6050,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:6048: checking for $ac_func" >&5 +echo "configure:6054: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6082: \"$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 @@ -6099,12 +6105,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:6103: checking for $ac_func" >&5 +echo "configure:6109: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6137: \"$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 @@ -6154,12 +6160,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6158: checking for $ac_func" >&5 +echo "configure:6164: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6192: \"$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 @@ -6209,12 +6215,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:6213: checking for $ac_func" >&5 +echo "configure:6219: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6247: \"$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 @@ -6264,12 +6270,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:6268: checking for $ac_func" >&5 +echo "configure:6274: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6302: \"$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 @@ -6319,12 +6325,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:6323: checking for $ac_func" >&5 +echo "configure:6329: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6357: \"$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 @@ -6374,12 +6380,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:6378: checking for $ac_func" >&5 +echo "configure:6384: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6412: \"$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 @@ -6429,12 +6435,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6433: checking for $ac_func" >&5 +echo "configure:6439: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6467: \"$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 @@ -6488,9 +6494,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6492: checking for stat64 in " >&5 +echo "configure:6498: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6521,9 +6527,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6525: checking for lstat64 in " >&5 +echo "configure:6531: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6554,9 +6560,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6558: checking for fstat64 in " >&5 +echo "configure:6564: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6593,7 +6599,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6597: checking for strcasecmp in -lresolv" >&5 +echo "configure:6603: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6601,7 +6607,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6622: \"$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 @@ -6648,12 +6654,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6652: checking for $ac_func" >&5 +echo "configure:6658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6686: \"$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 @@ -6701,7 +6707,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6705: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6711: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6709,7 +6715,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6730: \"$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 @@ -6750,12 +6756,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6754: checking for $ac_func" >&5 +echo "configure:6760: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6788: \"$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 @@ -6809,12 +6815,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6813: checking for $ac_func" >&5 +echo "configure:6819: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6847: \"$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 @@ -6862,7 +6868,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6866: checking for putprpwnam in -lsec" >&5 +echo "configure:6872: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6870,7 +6876,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6891: \"$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 @@ -6911,12 +6917,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6915: checking for $ac_func" >&5 +echo "configure:6921: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6949: \"$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 @@ -6971,12 +6977,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:6975: checking for $ac_func" >&5 +echo "configure:6981: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7009: \"$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 @@ -7024,7 +7030,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7028: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7034: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7032,7 +7038,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7053: \"$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 @@ -7073,12 +7079,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7077: checking for $ac_func" >&5 +echo "configure:7083: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7111: \"$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 @@ -7132,12 +7138,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:7136: checking for $ac_func" >&5 +echo "configure:7142: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7170: \"$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 @@ -7185,7 +7191,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7189: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7195: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7193,7 +7199,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7214: \"$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 @@ -7234,12 +7240,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7238: checking for $ac_func" >&5 +echo "configure:7244: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7272: \"$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 @@ -7295,12 +7301,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7299: checking for $ac_func" >&5 +echo "configure:7305: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7333: \"$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 @@ -7348,7 +7354,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7352: checking for getspnam in -lgen" >&5 +echo "configure:7358: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7356,7 +7362,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7377: \"$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 @@ -7397,12 +7403,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7401: checking for $ac_func" >&5 +echo "configure:7407: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7435: \"$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 @@ -7457,12 +7463,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7461: checking for $ac_func" >&5 +echo "configure:7467: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7495: \"$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 @@ -7510,7 +7516,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7514: checking for getspnam in -lsecurity" >&5 +echo "configure:7520: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7518,7 +7524,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7539: \"$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 @@ -7559,12 +7565,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7563: checking for $ac_func" >&5 +echo "configure:7569: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7597: \"$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 @@ -7618,12 +7624,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7622: checking for $ac_func" >&5 +echo "configure:7628: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7656: \"$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 @@ -7671,7 +7677,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7675: checking for getspnam in -lsec" >&5 +echo "configure:7681: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7679,7 +7685,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7700: \"$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 @@ -7720,12 +7726,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7724: checking for $ac_func" >&5 +echo "configure:7730: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7758: \"$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 @@ -7780,12 +7786,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7784: checking for $ac_func" >&5 +echo "configure:7790: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7818: \"$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 @@ -7833,7 +7839,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7837: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7843: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7841,7 +7847,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7862: \"$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 @@ -7882,12 +7888,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7886: checking for $ac_func" >&5 +echo "configure:7892: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7920: \"$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 @@ -7941,12 +7947,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7945: checking for $ac_func" >&5 +echo "configure:7951: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7979: \"$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 @@ -7994,7 +8000,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:7998: checking for bigcrypt in -lsec" >&5 +echo "configure:8004: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8002,7 +8008,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8023: \"$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 @@ -8043,12 +8049,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8047: checking for $ac_func" >&5 +echo "configure:8053: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8081: \"$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 @@ -8103,12 +8109,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8107: checking for $ac_func" >&5 +echo "configure:8113: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8141: \"$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 @@ -8156,7 +8162,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8160: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8166: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8164,7 +8170,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8185: \"$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 @@ -8205,12 +8211,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8209: checking for $ac_func" >&5 +echo "configure:8215: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8243: \"$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 @@ -8264,12 +8270,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8268: checking for $ac_func" >&5 +echo "configure:8274: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8302: \"$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 @@ -8317,7 +8323,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8321: checking for getprpwnam in -lsec" >&5 +echo "configure:8327: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8325,7 +8331,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8346: \"$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 @@ -8366,12 +8372,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8370: checking for $ac_func" >&5 +echo "configure:8376: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8404: \"$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 @@ -8437,7 +8443,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8441: checking ability to build shared libraries" >&5 +echo "configure:8447: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8573,7 +8579,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:8577: checking for $ac_word" >&5 +echo "configure:8583: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8627,15 +8633,15 @@ EOF esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8631: checking linker flags for shared libraries" >&5 +echo "configure:8637: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8634: checking compiler flags for position-independent code" >&5 +echo "configure:8640: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8639: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8645: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8655,7 +8661,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:8659: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8665: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8676,7 +8682,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:8680: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8686: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8699,7 +8705,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8703: checking for long long" >&5 +echo "configure:8709: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8708,12 +8714,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8723: \"$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 @@ -8740,20 +8746,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8744: checking for LL suffix on long long integers" >&5 +echo "configure:8750: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8775,7 +8781,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8779: checking for 64 bit off_t" >&5 +echo "configure:8785: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8784,13 +8790,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8800: \"$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 @@ -8813,7 +8819,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8817: checking for off64_t" >&5 +echo "configure:8823: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8822,7 +8828,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8842: \"$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 @@ -8855,7 +8861,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8859: checking for 64 bit ino_t" >&5 +echo "configure:8865: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8864,13 +8870,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8880: \"$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 @@ -8893,7 +8899,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8897: checking for ino64_t" >&5 +echo "configure:8903: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8902,7 +8908,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8922: \"$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 @@ -8935,7 +8941,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8939: checking for dev64_t" >&5 +echo "configure:8945: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8944,7 +8950,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8977,13 +8983,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8981: checking for struct dirent64" >&5 +echo "configure:8987: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9016,7 +9022,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9020: checking for major macro" >&5 +echo "configure:9026: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9025,7 +9031,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9057,7 +9063,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9061: checking for minor macro" >&5 +echo "configure:9067: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9066,7 +9072,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9098,7 +9104,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9102: checking for makedev macro" >&5 +echo "configure:9108: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9107,7 +9113,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9139,7 +9145,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9143: checking for unsigned char" >&5 +echo "configure:9149: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9148,12 +9154,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9163: \"$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 @@ -9176,13 +9182,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9180: checking for sin_len in sock" >&5 +echo "configure:9186: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9191,7 +9197,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9212,13 +9218,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9216: checking whether seekdir returns void" >&5 +echo "configure:9222: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9227,7 +9233,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9248,20 +9254,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9252: checking for __FILE__ macro" >&5 +echo "configure:9258: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9282,20 +9288,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9286: checking for __FUNCTION__ macro" >&5 +echo "configure:9292: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9316,7 +9322,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9320: checking if gettimeofday takes tz argument" >&5 +echo "configure:9326: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9325,14 +9331,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9336: \"$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_GETTIMEOFDAY_TZ=yes else @@ -9355,7 +9361,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9359: checking for C99 vsnprintf" >&5 +echo "configure:9365: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9364,29 +9370,34 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < #include -void foo(const char *format, ...) { - va_list ap; - int len; - char buf[5]; +void foo(const char *format, ...) { + va_list ap; + int len; + char buf[5]; - va_start(ap, format); - len = vsnprintf(0, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); + va_start(ap, format); + len = vsnprintf(buf, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + va_start(ap, format); + len = vsnprintf(0, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); - exit(0); + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); } main() { foo("hello"); } EOF -if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9402,14 +9413,14 @@ fi echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define HAVE_C99_VSNPRINTF 1 EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9413: checking for broken readdir" >&5 +echo "configure:9424: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9418,7 +9429,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9426,7 +9437,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:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9441: \"$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 @@ -9449,13 +9460,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9453: checking for utimbuf" >&5 +echo "configure:9464: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9463,7 +9474,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9487,12 +9498,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9491: checking for $ac_func" >&5 +echo "configure:9502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9530: \"$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 @@ -9541,13 +9552,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9545: checking for ut_name in utmp" >&5 +echo "configure:9556: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9555,7 +9566,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9576,13 +9587,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9580: checking for ut_user in utmp" >&5 +echo "configure:9591: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9590,7 +9601,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9611,13 +9622,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9615: checking for ut_id in utmp" >&5 +echo "configure:9626: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9625,7 +9636,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9646,13 +9657,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9650: checking for ut_host in utmp" >&5 +echo "configure:9661: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9660,7 +9671,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9681,13 +9692,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9685: checking for ut_time in utmp" >&5 +echo "configure:9696: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9695,7 +9706,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9716,13 +9727,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9720: checking for ut_tv in utmp" >&5 +echo "configure:9731: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9730,7 +9741,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9751,13 +9762,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9755: checking for ut_type in utmp" >&5 +echo "configure:9766: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9765,7 +9776,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9786,13 +9797,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9790: checking for ut_pid in utmp" >&5 +echo "configure:9801: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9800,7 +9811,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9821,13 +9832,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9825: checking for ut_exit in utmp" >&5 +echo "configure:9836: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9835,7 +9846,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9856,13 +9867,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9860: checking for ut_addr in utmp" >&5 +echo "configure:9871: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9870,7 +9881,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9892,13 +9903,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9896: checking whether pututline returns pointer" >&5 +echo "configure:9907: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9906,7 +9917,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9928,13 +9939,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9932: checking for ut_syslen in utmpx" >&5 +echo "configure:9943: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9942,7 +9953,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9963,7 +9974,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9967: checking for Linux kernel oplocks" >&5 +echo "configure:9978: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9972,7 +9983,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -9986,7 +9997,7 @@ main() { } EOF -if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10009,7 +10020,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10013: checking for kernel change notify support" >&5 +echo "configure:10024: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10018,7 +10029,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10032,7 +10043,7 @@ main() { } EOF -if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10055,7 +10066,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10059: checking for kernel share modes" >&5 +echo "configure:10070: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10064,7 +10075,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10080,7 +10091,7 @@ main() { } EOF -if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10106,13 +10117,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10110: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10121: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10120,7 +10131,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:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10141,7 +10152,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10145: checking for irix specific capabilities" >&5 +echo "configure:10156: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10150,7 +10161,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10165,7 +10176,7 @@ main() { } EOF -if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10180: \"$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 @@ -10193,13 +10204,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10197: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10208: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10209,7 +10220,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10230,13 +10241,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10234: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10245: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10246,7 +10257,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10267,13 +10278,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10271: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10282: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10283,7 +10294,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10304,13 +10315,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10308: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10319: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10320,7 +10331,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10342,13 +10353,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10346: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10357: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10362,7 +10373,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10383,16 +10394,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10387: checking for test routines" >&5 +echo "configure:10398: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10407: \"$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 @@ -10406,7 +10417,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10410: checking for ftruncate extend" >&5 +echo "configure:10421: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10415,11 +10426,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10434: \"$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 @@ -10442,7 +10453,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10446: checking for broken getgroups" >&5 +echo "configure:10457: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10451,11 +10462,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10470: \"$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 @@ -10478,7 +10489,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10482: checking whether getpass should be replaced" >&5 +echo "configure:10493: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10486,7 +10497,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10522,7 +10533,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10526: checking for broken inet_ntoa" >&5 +echo "configure:10537: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10531,7 +10542,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10545,7 +10556,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:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10560: \"$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 @@ -10568,7 +10579,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10572: checking for secure mkstemp" >&5 +echo "configure:10583: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10577,7 +10588,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10594,7 +10605,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10617,7 +10628,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10621: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10632: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10626,12 +10637,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10654,7 +10665,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10658: checking for root" >&5 +echo "configure:10669: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10663,11 +10674,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10682: \"$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 @@ -10695,7 +10706,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10699: checking for iface AIX" >&5 +echo "configure:10710: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10704,7 +10715,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10736,7 +10747,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10740: checking for iface ifconf" >&5 +echo "configure:10751: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10745,7 +10756,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10778,7 +10789,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10782: checking for iface ifreq" >&5 +echo "configure:10793: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10787,7 +10798,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10824,7 +10835,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10828: checking for setresuid" >&5 +echo "configure:10839: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10833,7 +10844,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10856: \"$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 @@ -10867,7 +10878,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10871: checking for setreuid" >&5 +echo "configure:10882: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10876,7 +10887,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10899: \"$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 @@ -10909,7 +10920,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10913: checking for seteuid" >&5 +echo "configure:10924: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10918,7 +10929,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10941: \"$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 @@ -10951,7 +10962,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10955: checking for setuidx" >&5 +echo "configure:10966: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10960,7 +10971,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10983: \"$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 @@ -10993,7 +11004,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:10997: checking for working mmap" >&5 +echo "configure:11008: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11002,11 +11013,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11029,7 +11040,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11033: checking for ftruncate needs root" >&5 +echo "configure:11044: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11038,11 +11049,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11065,7 +11076,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11069: checking for fcntl locking" >&5 +echo "configure:11080: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11074,11 +11085,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11093: \"$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 @@ -11101,7 +11112,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11105: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11116: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11110,11 +11121,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11139,7 +11150,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11143: checking for 64 bit fcntl locking" >&5 +echo "configure:11154: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11148,7 +11159,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11187: \"$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 @@ -11197,13 +11208,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11201: checking for st_blocks in struct stat" >&5 +echo "configure:11212: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11212,7 +11223,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11235,13 +11246,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11239: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11250: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11278,13 +11289,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11282: checking for broken nisplus include files" >&5 +echo "configure:11293: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11294,7 +11305,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11318,7 +11329,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11322: checking whether to use smbwrapper" >&5 +echo "configure:11333: 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" @@ -11362,7 +11373,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11366: checking whether to use AFS" >&5 +echo "configure:11377: 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" @@ -11388,7 +11399,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11392: checking whether to use DCE/DFS auth" >&5 +echo "configure:11403: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11413,7 +11424,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11417: checking whether to use Kerberos IV" >&5 +echo "configure:11428: 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" @@ -11425,7 +11436,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11429: checking for dn_expand in -lresolv" >&5 +echo "configure:11440: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11433,7 +11444,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11459: \"$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 @@ -11488,7 +11499,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11492: checking whether to use Kerberos 5" >&5 +echo "configure:11503: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11516,7 +11527,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11520: checking whether to use AUTOMOUNT" >&5 +echo "configure:11531: 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" @@ -11541,7 +11552,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11545: checking whether to use SMBMOUNT" >&5 +echo "configure:11556: 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" @@ -11578,7 +11589,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11582: checking whether to use PAM password database" >&5 +echo "configure:11593: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11604,7 +11615,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11608: checking for pam_get_data in -lpam" >&5 +echo "configure:11619: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11612,7 +11623,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11638: \"$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 @@ -11650,7 +11661,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11654: checking whether to use pam_smbpass" >&5 +echo "configure:11665: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11692,12 +11703,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11696: checking for $ac_func" >&5 +echo "configure:11707: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11735: \"$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 @@ -11746,7 +11757,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:11750: checking for crypt in -lcrypt" >&5 +echo "configure:11761: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11754,7 +11765,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11780: \"$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 @@ -11800,7 +11811,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11804: checking for a crypt that needs truncated salt" >&5 +echo "configure:11815: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11809,11 +11820,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11851,7 +11862,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11855: checking whether to use TDB SAM database" >&5 +echo "configure:11866: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11877,7 +11888,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11881: checking whether to use LDAP SAM database" >&5 +echo "configure:11892: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11904,7 +11915,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11908: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11919: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11932,7 +11943,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11936: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11947: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11954,7 +11965,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11958: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11969: 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" @@ -11979,7 +11990,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:11983: checking whether to use SSL" >&5 +echo "configure:11994: 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" @@ -12053,7 +12064,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12057: checking whether to use syslog logging" >&5 +echo "configure:12068: 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" @@ -12078,7 +12089,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12082: checking whether to use profiling" >&5 +echo "configure:12093: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12106,7 +12117,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12110: checking whether to support disk-quotas" >&5 +echo "configure:12121: 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" @@ -12118,13 +12129,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12122: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12133: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12136,7 +12147,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12180,7 +12191,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12184: checking whether to support utmp accounting" >&5 +echo "configure:12195: 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" @@ -12206,7 +12217,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12210: checking whether to support Microsoft Dfs" >&5 +echo "configure:12221: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12232,7 +12243,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12236: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12247: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12261,7 +12272,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12265: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12276: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12288,14 +12299,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12292: checking how to get filesystem space usage" >&5 +echo "configure:12303: 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:12299: checking statvfs64 function (SVR4)" >&5 +echo "configure:12310: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12303,7 +12314,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12332: \"$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 @@ -12350,12 +12361,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12354: checking statvfs function (SVR4)" >&5 +echo "configure:12365: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12363,7 +12374,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12378: \"$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 @@ -12388,7 +12399,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:12392: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12403: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12396,7 +12407,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12409,7 +12420,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12424: \"$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 @@ -12436,7 +12447,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:12440: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12451: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12444,7 +12455,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12478: \"$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 @@ -12490,7 +12501,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:12494: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12505: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12498,7 +12509,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12508,7 +12519,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12523: \"$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 @@ -12535,7 +12546,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:12539: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12550: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12543,7 +12554,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12559,7 +12570,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12574: \"$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 @@ -12586,7 +12597,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:12590: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12601: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12594,7 +12605,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12614,7 +12625,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12629: \"$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 @@ -12647,9 +12658,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12651: checking if large file support can be enabled" >&5 +echo "configure:12662: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12729,7 +12740,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12733: checking whether to support ACLs" >&5 +echo "configure:12744: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12782,7 +12793,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12786: checking for acl_get_file in -lacl" >&5 +echo "configure:12797: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12790,7 +12801,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12816: \"$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 @@ -12829,13 +12840,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12833: checking for ACL support" >&5 +echo "configure:12844: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12843,7 +12854,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12863,13 +12874,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12867: checking for acl_get_perm_np" >&5 +echo "configure:12878: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12877,7 +12888,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12932,7 +12943,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12936: checking whether to build winbind" >&5 +echo "configure:12947: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13011,11 +13022,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else diff --git a/source/configure.in b/source/configure.in index d0bb8d463d7..994abdb20a3 100644 --- a/source/configure.in +++ b/source/configure.in @@ -461,11 +461,17 @@ AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [ AC_TRY_COMPILE([ #include ], [ - #define X_FOOBAR(x) ((FOOBAR) { x }) - typedef struct {unsigned x;} FOOBAR; - FOOBAR f = X_FOOBAR(1); + typedef struct {unsigned x;} FOOBAR; +#define X_FOOBAR(x) ((FOOBAR) { x }) +#define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; ], - samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)]) + samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)]) if test x"$samba_cv_immediate_structures" = x"yes"; then AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES) fi @@ -1086,25 +1092,30 @@ AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ #include #include -void foo(const char *format, ...) { - va_list ap; - int len; - char buf[5]; +void foo(const char *format, ...) { + va_list ap; + int len; + char buf[5]; - va_start(ap, format); - len = vsnprintf(0, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); + va_start(ap, format); + len = vsnprintf(buf, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + va_start(ap, format); + len = vsnprintf(0, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); - exit(0); + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); } main() { foo("hello"); } ], samba_cv_HAVE_C99_VSNPRINTF=yes,samba_cv_HAVE_C99_VSNPRINTF=no,samba_cv_HAVE_C99_VSNPRINTF=cross)]) if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - AC_DEFINE(HAVE_C99_VSNPRINTF) + AC_DEFINE(HAVE_C99_VSNPRINTF) fi AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[ -- cgit From 97a56b542797de18e5f6afd0f8760ab9be442144 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Wed, 27 Feb 2002 09:10:13 +0000 Subject: Added Provides parameter to get around problems users have when updating a Red Hat system. --- packaging/RedHat/samba2.spec.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl index d6fbb4c59a6..bf1650ce7d8 100644 --- a/packaging/RedHat/samba2.spec.tmpl +++ b/packaging/RedHat/samba2.spec.tmpl @@ -8,6 +8,7 @@ Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz Packager: John H Terpstra [Samba-Team] Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2 Prereq: chkconfig fileutils +Provides: samba = %{version}, samba-common = %{version}, samba-client = %{version}, samba-swat = %{version} BuildRoot: /var/tmp/samba Prefix: /usr -- cgit From 1e49153fba20bb2cbce1e8fe9c6e7bdab2be0d95 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 17:49:05 +0000 Subject: Memory leak on error condition fixed by Kian Win . Jeremy. --- source/tdb/tdb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 5a871e7fcc6..ad67e9393e2 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba database functions Copyright (C) Andrew Tridgell 1999-2000 Copyright (C) Luke Kenneth Casson Leighton 2000 @@ -1379,7 +1378,7 @@ int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag) static int tdb_already_open(dev_t device, ino_t ino) { - TDB_CONTEXT *i = NULL; + TDB_CONTEXT *i; for (i = tdbs; i; i = i->next) { if (i->device == device && i->inode == ino) { @@ -1411,7 +1410,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode, tdb_log_func log_fn) { - TDB_CONTEXT *tdb = NULL; + TDB_CONTEXT *tdb; struct stat st; int rev = 0, locked; @@ -1453,7 +1452,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, } if ((tdb->fd = open(name, open_flags, mode)) == -1) { - TDB_LOG((tdb, 0, "tdb_open_ex: could not open file %s: %s\n", + TDB_LOG((tdb, 5, "tdb_open_ex: could not open file %s: %s\n", name, strerror(errno))); goto fail; /* errno set by open(2) */ } @@ -1572,7 +1571,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, /* close a database */ int tdb_close(TDB_CONTEXT *tdb) { - TDB_CONTEXT **i = NULL; + TDB_CONTEXT **i; int ret = 0; if (tdb->map_ptr) { @@ -1729,7 +1728,7 @@ fail: /* reopen all tdb's */ int tdb_reopen_all(void) { - TDB_CONTEXT *tdb = NULL; + TDB_CONTEXT *tdb; for (tdb=tdbs; tdb; tdb = tdb->next) { if (tdb_reopen(tdb) != 0) return -1; -- cgit From 710224576d9407eb257bf188f44b539651d1e23a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 20:26:03 +0000 Subject: Added "nt status support" to enable NT status codes to be turned off (I though I'd done that for 2.2.3, oh well). Docs added soon. Removed another "magic" define. Fixed the offline folder synchronisation bug. Jeremy. --- source/include/proto.h | 1 + source/include/smb.h | 1 + source/param/loadparm.c | 4 ++++ source/smbd/error.c | 16 +++++++++++----- source/smbd/negprot.c | 18 ++++++------------ source/smbd/nttrans.c | 9 ++++----- source/smbd/reply.c | 10 ++++------ source/smbd/trans2.c | 40 ++++++++++++++-------------------------- 8 files changed, 45 insertions(+), 54 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 4159b570d47..21de7dd2b9b 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1911,6 +1911,7 @@ BOOL lp_unix_password_sync(void); BOOL lp_passwd_chat_debug(void); BOOL lp_nt_smb_support(void); BOOL lp_nt_pipe_support(void); +BOOL lp_nt_status_support(void); BOOL lp_stat_cache(void); BOOL lp_allow_trusted_domains(void); BOOL lp_restrict_anonymous(void); diff --git a/source/include/smb.h b/source/include/smb.h index 3ea08a4c559..0e5deaf2aa4 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -1274,6 +1274,7 @@ char *strdup(char *s); #define FLAGS2_LONG_PATH_COMPONENTS 0x0001 #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002 +#define FLAGS2_IS_LONG_NAME 0x0040 #define FLAGS2_DFS_PATHNAMES 0x1000 #define FLAGS2_READ_PERMIT_NO_EXECUTE 0x2000 #define FLAGS2_32_BIT_ERROR_CODES 0x4000 diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 58b05d33b4b..8457243feac 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -267,6 +267,7 @@ typedef struct BOOL bTimestampLogs; BOOL bNTSmbSupport; BOOL bNTPipeSupport; + BOOL bNTStatusSupport; BOOL bStatCache; BOOL bKernelOplocks; BOOL bAllowTrustedDomains; @@ -822,6 +823,7 @@ static struct parm_struct parm_table[] = { {"nt smb support", P_BOOL, P_GLOBAL, &Globals.bNTSmbSupport, NULL, NULL, 0}, {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE }, + {"nt status support", P_BOOL, P_GLOBAL, &Globals.bNTStatusSupport, NULL, NULL, 0 }, {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, {"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0}, {"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0}, @@ -1315,6 +1317,7 @@ static void init_globals(void) Globals.bNTSmbSupport = True; /* Do NT SMB's by default. */ Globals.bNTPipeSupport = True; /* Do NT pipes by default. */ Globals.bStatCache = True; /* use stat cache by default */ + Globals.bNTStatusSupport = True; /* Use NT status by default. */ Globals.bRestrictAnonymous = False; Globals.bLanmanAuth = True; /* Do use the LanMan hash if it is available */ Globals.map_to_guest = 0; /* By Default, "Never" */ @@ -1591,6 +1594,7 @@ FN_GLOBAL_BOOL(lp_unix_password_sync, &Globals.bUnixPasswdSync) FN_GLOBAL_BOOL(lp_passwd_chat_debug, &Globals.bPasswdChatDebug) FN_GLOBAL_BOOL(lp_nt_smb_support, &Globals.bNTSmbSupport) FN_GLOBAL_BOOL(lp_nt_pipe_support, &Globals.bNTPipeSupport) +FN_GLOBAL_BOOL(lp_nt_status_support, &Globals.bNTStatusSupport) FN_GLOBAL_BOOL(lp_stat_cache, &Globals.bStatCache) FN_GLOBAL_BOOL(lp_allow_trusted_domains, &Globals.bAllowTrustedDomains) FN_GLOBAL_BOOL(lp_restrict_anonymous, &Globals.bRestrictAnonymous) diff --git a/source/smbd/error.c b/source/smbd/error.c index 0a63d520ee6..6de16f1d5b9 100644 --- a/source/smbd/error.c +++ b/source/smbd/error.c @@ -90,10 +90,17 @@ int error_packet(char *outbuf,NTSTATUS ntstatus, if (errno != 0) DEBUG(3,("error string = %s\n",strerror(errno))); - if (global_client_caps & CAP_STATUS32) { - if (NT_STATUS_V(ntstatus) == 0 && eclass) { + /* + * We can explicitly force 32 bit error codes even when the + * parameter "nt status" is set to no by pre-setting the + * FLAGS2_32_BIT_ERROR_CODES bit in the smb_flg2 outbuf. + * This is to allow work arounds for client bugs that are needed + * when talking with clients that normally expect nt status codes. JRA. + */ + + if ((lp_nt_status_support() || (SVAL(outbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) && (global_client_caps & CAP_STATUS32)) { + if (NT_STATUS_V(ntstatus) == 0 && eclass) ntstatus = dos_to_ntstatus(eclass, ecode); - } SIVAL(outbuf,smb_rcls,NT_STATUS_V(ntstatus)); SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)|FLAGS2_32_BIT_ERROR_CODES); DEBUG(3,("error packet at %s(%d) cmd=%d (%s) %s\n", @@ -104,9 +111,8 @@ int error_packet(char *outbuf,NTSTATUS ntstatus, return outsize; } - if (eclass == 0 && NT_STATUS_V(ntstatus)) { + if (eclass == 0 && NT_STATUS_V(ntstatus)) ntstatus_to_dos(ntstatus, &eclass, &ecode); - } SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)&~FLAGS2_32_BIT_ERROR_CODES); SSVAL(outbuf,smb_rcls,eclass); diff --git a/source/smbd/negprot.c b/source/smbd/negprot.c index 1f5de570c66..21f1cbd1b45 100644 --- a/source/smbd/negprot.c +++ b/source/smbd/negprot.c @@ -157,18 +157,12 @@ reply for the nt protocol static int reply_nt1(char *outbuf) { /* dual names + lock_and_read + nt SMBs + remote API calls */ - int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|CAP_LEVEL_II_OPLOCKS|CAP_STATUS32| (lp_unix_extensions() ? CAP_UNIX : 0) | - (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) | - ((lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) ? - CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS : 0) | - (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0); - - -/* - other valid capabilities which we may support at some time... - CAP_LARGE_READX|CAP_STATUS32|CAP_LEVEL_II_OPLOCKS; - */ - + int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|CAP_LEVEL_II_OPLOCKS| + (lp_nt_status_support() ? CAP_STATUS32 : 0)| + (lp_unix_extensions() ? CAP_UNIX : 0) | + (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) | + ((lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) ? CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS : 0) | + (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0); int secword=0; BOOL doencrypt = SMBENCRYPT(); time_t t = time(NULL); diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 1af57462d42..61737ea756e 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -912,8 +912,8 @@ int reply_ntcreate_and_X(connection_struct *conn, if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) smb_action |= EXTENDED_OPLOCK_GRANTED; -#if 1 /* JRATEST */ - /* W2K sends back 42 words here ! */ +#if 0 + /* W2K sends back 42 words here ! If we do the same it breaks offline sync. Go figure... ? JRA. */ set_message(outbuf,42,0,True); #else set_message(outbuf,34,0,True); @@ -1902,9 +1902,8 @@ due to being in oplock break state.\n" )); } } - if (Protocol >= PROTOCOL_NT1) { - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | 0x40); /* IS_LONG_NAME */ - } + if (Protocol >= PROTOCOL_NT1) + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME); /* Now we must call the relevant NT_TRANS function */ switch(function_code) { diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 40190b550e6..adddf7e4f82 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1215,9 +1215,8 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size put_dos_date3(outbuf,smb_vwv1,mtime); SIVAL(outbuf,smb_vwv3,(uint32)size); - if (Protocol >= PROTOCOL_NT1) { - SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | 0x40); /* IS_LONG_NAME */ - } + if (Protocol >= PROTOCOL_NT1) + SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME); DEBUG( 3, ( "getatr name=%s mode=%d size=%d\n", fname, mode, (uint32)size ) ); @@ -1479,9 +1478,8 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size SCVAL(smb_buf(outbuf),0,5); SSVAL(smb_buf(outbuf),1,numentries*DIR_STRUCT_SIZE); - if (Protocol >= PROTOCOL_NT1) { - SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | 0x40); /* IS_LONG_NAME */ - } + if (Protocol >= PROTOCOL_NT1) + SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME); outsize += DIR_STRUCT_SIZE*numentries; smb_setlen(outbuf,outsize - 4); diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index d40ac1ff47c..aad5bf5de56 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1929,16 +1929,24 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * break; } +#if 0 + /* + * NT4 server just returns "invalid query" to this - if we try to answer + * it then NTws gets a BSOD! (tridge). + * W2K seems to want this. JRA. + */ + case SMB_QUERY_FILE_STREAM_INFO: +#endif case SMB_FILE_STREAM_INFORMATION: if (mode & aDIR) { data_size = 0; } else { - size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 0xE, False); - SIVAL(pdata,0,0); /* ??? */ + size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 14, False); + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); + SIVAL(pdata,0,0); /* Next stream (none). */ SIVAL(pdata,4,byte_len); /* Byte length of unicode string ::$DATA */ SOFF_T(pdata,8,size); - SIVAL(pdata,16,allocation_size); - SIVAL(pdata,20,0); /* ??? */ + SOFF_T(pdata,16,allocation_size); data_size = 24 + byte_len; } break; @@ -1968,25 +1976,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * data_size = 8; break; -#if 0 - /* - * NT4 server just returns "invalid query" to this - if we try to answer - * it then NTws gets a BSOD! (tridge). - * W2K seems to want this. JRA. - */ - - case SMB_QUERY_FILE_STREAM_INFO: - if (get_remote_arch() != RA_WIN2K) - return ERROR_DOS(ERRDOS,ERRunknownlevel); - data_size = 24 + l; - SIVAL(pdata,0,pos); - SIVAL(pdata,4,size); - SIVAL(pdata,12,allocation_size); - SIVAL(pdata,20,l); - pstrcpy(pdata+24,fname); - break; -#endif - /* * CIFS UNIX Extensions. */ @@ -3232,9 +3221,8 @@ int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf,int length,in } } - if (Protocol >= PROTOCOL_NT1) { - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | 0x40); /* IS_LONG_NAME */ - } + if (Protocol >= PROTOCOL_NT1) + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME); /* Now we must call the relevant TRANS2 function */ switch(tran_call) { -- cgit From bc6659b1e0e8a7fced50752b095e0a5a72789ac7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 22:01:54 +0000 Subject: Patch for Domain users not showing up from "Ivan Zhakov" . Jeremy. --- source/rpc_parse/parse_samr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c index f207d32e55c..ad8adcdabb4 100644 --- a/source/rpc_parse/parse_samr.c +++ b/source/rpc_parse/parse_samr.c @@ -1645,7 +1645,6 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en uint32 len_sam_name, len_sam_desc; uint32 i; - DOMAIN_GRP *grp; ZERO_STRUCTP(sam); DEBUG(5, ("init_sam_dispinfo_3: num_entries: %d\n", num_entries)); @@ -1663,16 +1662,17 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en ZERO_STRUCTP(sam->str); for (i = 0; i < num_entries; i++) { + DOMAIN_GRP *grp = disp_group_info[i+start_idx].grp; + DEBUG(11, ("init_sam_dispinfo_3: entry: %d\n",i)); - grp=disp_group_info[i+start_idx].grp; - len_sam_name = strlen(grp[i].name); - len_sam_desc = strlen(grp[i].comment); + len_sam_name = strlen(grp->name); + len_sam_desc = strlen(grp->comment); - init_sam_entry3(&sam->sam[i], start_idx + i + 1, len_sam_name, len_sam_desc, grp[i].rid); + init_sam_entry3(&sam->sam[i], start_idx + i + 1, len_sam_name, len_sam_desc, grp->rid); - init_unistr2(&sam->str[i].uni_grp_name, grp[i].name, len_sam_name); - init_unistr2(&sam->str[i].uni_grp_desc, grp[i].comment, len_sam_desc); + init_unistr2(&sam->str[i].uni_grp_name, grp->name, len_sam_name); + init_unistr2(&sam->str[i].uni_grp_desc, grp->comment, len_sam_desc); } return NT_STATUS_OK; @@ -1830,7 +1830,6 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en uint32 len_sam_name; uint32 i; - DOMAIN_GRP *grp; ZERO_STRUCTP(sam); DEBUG(5, ("init_sam_dispinfo_5: num_entries: %d\n", num_entries)); @@ -1848,13 +1847,14 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en ZERO_STRUCTP(sam->str); for (i = 0; i < num_entries; i++) { + DOMAIN_GRP *grp = disp_group_info[i+start_idx].grp; + DEBUG(11, ("init_sam_dispinfo_5: entry: %d\n",i)); - grp=disp_group_info[i+start_idx].grp; - len_sam_name = strlen(grp[i].name); + len_sam_name = strlen(grp->name); init_sam_entry5(&sam->sam[i], start_idx + i + 1, len_sam_name); - init_string2(&sam->str[i].grp_name, grp[i].name, len_sam_name+1, len_sam_name); + init_string2(&sam->str[i].grp_name, grp->name, len_sam_name+1, len_sam_name); } return NT_STATUS_OK; -- cgit From 259d38790d95b47aab30b95677584c5fbce568c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 22:20:28 +0000 Subject: Fix the build by moving the client notify code into srv_spoolss_nt.c Jeremy. --- source/include/proto.h | 3 - source/rpc_client/cli_spoolss_notify.c | 140 --------------------------------- source/rpc_server/srv_spoolss_nt.c | 138 ++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 143 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 21de7dd2b9b..9f992c17087 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2428,9 +2428,6 @@ void cli_nt_session_close(struct cli_state *cli); BOOL spoolss_disconnect_from_client( struct cli_state *cli); BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle); -BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle, - char* printername, uint32 change_low, uint32 change_high, - WERROR *status); BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, WERROR *status); diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 3d37caefd29..9562e6fe5dc 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -182,146 +182,6 @@ BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 return True; } -/********************************************************************** - Release the memory held by a SPOOL_NOTIFY_INFO_DATA - *********************************************************************/ - -static void free_notify_data(SPOOL_NOTIFY_INFO_DATA *data, uint32 len) -{ - uint32 i; - - if (!data) - return; - - for (i=0; imem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); - - ZERO_STRUCT(notify_info); - - /* lookup the printer if we have a name */ - - if (*printername) { - result = get_a_printer(&printer, 2, printername); - if (! W_ERROR_IS_OK(result)) { - *status = result; - goto done; - } - } - - /* - * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX - * events. --jerry - */ - - /* Did the driver change? */ - - if (change_low & PRINTER_CHANGE_SET_PRINTER_DRIVER) { - change_low &= ~PRINTER_CHANGE_SET_PRINTER_DRIVER; - DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_CHANGE_SET_PRINTER_DRIVER set on [%s][%d]\n", - printername, idx)); - if ((data=Realloc(notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", - (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); - *status = WERR_NOMEM; - goto done; - } - notify_data = data; - - memset(notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); - - /* - * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE - * See PRINTER_NOTIFY_INFO_DATA entries in MSDN - * --jerry - */ - construct_info_data(notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); - - spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, cli->mem_ctx); - idx++; - } - - -#if 0 /* JERRY -- do not delete */ - DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", - cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname, - credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); -#endif - - /* create and send a MSRPC command with api */ - - /* store the parameters */ - - notify_info.flags = 0x00000200; - notify_info.count = idx; - notify_info.data = notify_data; - - make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high, ¬ify_info); - - /* turn parameters into data stream */ - if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); - *status = WERR_BADFUNC; - goto done; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: SPOOLSS_RRPCN failed!\n")); - *status = WERR_BADFUNC; - goto done; - } - - - /* turn data stream into parameters*/ - if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); - *status = WERR_BADFUNC; - goto done; - } - - *status = r_s.status; - -done: - prs_mem_free(&buf); - prs_mem_free(&rbuf); - free_a_printer(&printer, 2); - free_notify_data(notify_data, idx); - - return W_ERROR_IS_OK(*status); -} - /*************************************************************************** do a reply open printer ****************************************************************************/ diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 613d516971f..582c74942a1 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -559,6 +559,144 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) return True; } +/********************************************************************** + Release the memory held by a SPOOL_NOTIFY_INFO_DATA + *********************************************************************/ + +static void free_notify_data(SPOOL_NOTIFY_INFO_DATA *data, uint32 len) +{ + uint32 i; + + if (!data) + return; + + for (i=0; imem_ctx, MARSHALL); + prs_init(&rbuf, 0, pcli->mem_ctx, UNMARSHALL ); + + ZERO_STRUCT(notify_info); + + /* lookup the printer if we have a name */ + + if (*printername) { + result = get_a_printer(&printer, 2, printername); + if (! W_ERROR_IS_OK(result)) { + *status = result; + goto done; + } + } + + /* + * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX + * events. --jerry + */ + + /* Did the driver change? */ + + if (change_low & PRINTER_CHANGE_SET_PRINTER_DRIVER) { + change_low &= ~PRINTER_CHANGE_SET_PRINTER_DRIVER; + DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_CHANGE_SET_PRINTER_DRIVER set on [%s][%d]\n", + printername, idx)); + if ((data=Realloc(notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", + (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); + *status = WERR_NOMEM; + goto done; + } + notify_data = data; + + memset(notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + * See PRINTER_NOTIFY_INFO_DATA entries in MSDN + * --jerry + */ + construct_info_data(notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); + + spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, pcli->mem_ctx); + idx++; + } + + +#if 0 /* JERRY -- do not delete */ + DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", + pcli->srv_name_slash, pcli->mach_acct, sec_chan_type, global_myname, + credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); +#endif + + /* create and send a MSRPC command with api */ + + /* store the parameters */ + + notify_info.flags = 0x00000200; + notify_info.count = idx; + notify_info.data = notify_data; + + make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high, ¬ify_info); + + /* turn parameters into data stream */ + if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); + *status = WERR_BADFUNC; + goto done; + } + + /* send the data on \PIPE\ */ + if (!rpc_api_pipe_req(pcli, SPOOLSS_RRPCN, &buf, &rbuf)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: SPOOLSS_RRPCN failed!\n")); + *status = WERR_BADFUNC; + goto done; + } + + + /* turn data stream into parameters*/ + if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); + *status = WERR_BADFUNC; + goto done; + } + + *status = r_s.status; + +done: + prs_mem_free(&buf); + prs_mem_free(&rbuf); + free_a_printer(&printer, 2); + free_notify_data(notify_data, idx); + + return W_ERROR_IS_OK(*status); +} + /*************************************************************************** Receive the notify message. ****************************************************************************/ -- cgit From e00a2c87fdcc7b32c108f320147693a22e627316 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Feb 2002 22:40:07 +0000 Subject: Fix from JohnR - Fixed SetPrinterData(magic key) to support zero length DEVMODE as is the case with the Okidata Okipage 20 PCLXL Advanced printer driver. --- source/printing/nt_printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index ed5af053481..f4c59bd383a 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3090,7 +3090,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA * When the DEVMODE is already set on the printer, don't try to unpack it. */ - if (!printer->info_2->devmode) { + if (!printer->info_2->devmode && param->data_len) { /* * Set devmode on printer info, so entire printer initialization can be * saved to tdb. -- cgit From 8a5f5031176c43e153bdf593a3c9ff2ad8cebda1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Feb 2002 01:52:18 +0000 Subject: Ensure that all methods of looking up and connecting to DC's work using identical logic. Remove the zero_ip global. Jeremy. --- source/client/client.c | 12 +++--- source/client/smbmount.c | 7 +--- source/client/smbspool.c | 3 +- source/include/proto.h | 3 +- source/lib/interface.c | 9 ++--- source/lib/util.c | 29 +++++++++++--- source/lib/wins_srv.c | 6 +-- source/libsmb/cliconnect.c | 3 +- source/libsmb/domain_client_validate.c | 18 +++++---- source/libsmb/libsmbclient.c | 5 +-- source/libsmb/namequery.c | 28 +++++++++----- source/nmbd/nmbd.c | 2 - source/nmbd/nmbd_become_dmb.c | 3 +- source/nmbd/nmbd_browsesync.c | 5 +-- source/nmbd/nmbd_logonnames.c | 1 - source/nmbd/nmbd_namequery.c | 6 +-- source/nmbd/nmbd_responserecordsdb.c | 2 - source/nmbd/nmbd_subnetdb.c | 11 +++--- source/nmbd/nmbd_winsserver.c | 4 +- source/nmbd/nmbd_workgroupdb.c | 3 +- source/nsswitch/winbindd_cm.c | 70 ++++++++++++++++++++++++---------- source/nsswitch/winbindd_wins.c | 2 +- source/nsswitch/wins.c | 2 +- source/smbd/password.c | 15 +++++--- source/smbwrapper/smbw.c | 5 +-- source/utils/locktest.c | 5 +-- source/utils/locktest2.c | 5 +-- source/utils/masktest.c | 5 +-- source/utils/nmblookup.c | 1 - source/utils/smbcacls.c | 5 +-- source/utils/torture.c | 3 +- 31 files changed, 156 insertions(+), 122 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index fe339094c8e..6d907e6ec56 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -42,7 +42,6 @@ static pstring workgroup; static char *cmdstr; static BOOL got_pass; static int io_bufsize = 64512; -extern struct in_addr ipzero; static int name_type = 0x20; static int max_protocol = PROTOCOL_NT1; @@ -2147,7 +2146,6 @@ struct cli_state *do_connect(char *server, char *share) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; fstring servicename; char *sharename; @@ -2164,13 +2162,13 @@ struct cli_state *do_connect(char *server, char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , server, name_type); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -2419,12 +2417,12 @@ static int do_message_op(void) struct in_addr ip; struct nmb_name called, calling; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , desthost, name_type); - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) { @@ -2661,7 +2659,7 @@ static int do_message_op(void) case 'I': { dest_ip = *interpret_addr2(optarg); - if (zero_ip(dest_ip)) + if (is_zero_ip(dest_ip)) exit(1); have_ip = True; } diff --git a/source/client/smbmount.c b/source/client/smbmount.c index 2c941836e39..302ec7f2b3f 100644 --- a/source/client/smbmount.c +++ b/source/client/smbmount.c @@ -27,8 +27,6 @@ #include #include -extern struct in_addr ipzero; - extern BOOL in_client; extern pstring user_socket_options; extern BOOL append_log; @@ -120,7 +118,6 @@ static struct cli_state *do_connection(char *svc_name) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; pstring server; char *share; @@ -144,7 +141,7 @@ static struct cli_state *do_connection(char *svc_name) make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -748,7 +745,7 @@ static void parse_mount_smb(int argc, char **argv) DEBUGLEVEL = val; } else if(!strcmp(opts, "ip")) { dest_ip = *interpret_addr2(opteq+1); - if (zero_ip(dest_ip)) { + if (is_zero_ip(dest_ip)) { fprintf(stderr,"Can't resolve address %s\n", opteq+1); exit(1); } diff --git a/source/client/smbspool.c b/source/client/smbspool.c index 1a17b15b896..64484f0aa99 100644 --- a/source/client/smbspool.c +++ b/source/client/smbspool.c @@ -29,7 +29,6 @@ */ extern BOOL in_client; /* Boolean for client library */ -extern struct in_addr ipzero; /* Any address */ /* @@ -290,7 +289,7 @@ smb_connect(char *workgroup, /* I - Workgroup */ get_myname(myname); - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, myname, 0x0); make_nmb_name(&called, server, 0x20); diff --git a/source/include/proto.h b/source/include/proto.h index 9f992c17087..4b5da7840f9 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1079,7 +1079,8 @@ int interpret_protocol(char *str,int def); BOOL is_ipaddress(const char *str); uint32 interpret_addr(const char *str); struct in_addr *interpret_addr2(const char *str); -BOOL zero_ip(struct in_addr ip); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); char *automount_lookup(char *user_name); char *automount_lookup(char *user_name); BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); diff --git a/source/lib/interface.c b/source/lib/interface.c index 3a269294ed9..2e67b4a4a67 100644 --- a/source/lib/interface.c +++ b/source/lib/interface.c @@ -24,7 +24,6 @@ static struct iface_struct *probed_ifaces; static int total_probed; -struct in_addr ipzero; struct in_addr allones_ip; struct in_addr loopback_ip; @@ -40,7 +39,8 @@ Try and find an interface that matches an ip. If we cannot, return NULL static struct interface *iface_find(struct in_addr ip, BOOL CheckMask) { struct interface *i; - if (zero_ip(ip)) return local_interfaces; + if (is_zero_ip(ip)) + return local_interfaces; for (i=local_interfaces;i;i=i->next) if (CheckMask) { @@ -102,8 +102,8 @@ static void interpret_interface(char *token) char *p; int i, added=0; - ip = ipzero; - nmask = ipzero; + zero_ip(&ip); + zero_ip(&nmask); /* first check if it is an interface name */ for (i=0;i= entry->mourning ) /* Found a live one. */ { /* If we don't have the IP, look it up. */ - if( zero_ip( entry->ip_addr ) ) + if( is_zero_ip( entry->ip_addr ) ) entry->ip_addr = *interpret_addr2( entry->server ); /* If we still don't have the IP then kill it, else return it. */ - if( zero_ip( entry->ip_addr ) ) + if( is_zero_ip( entry->ip_addr ) ) entry->mourning = now + NECROMANCYCLE; else return( entry->ip_addr ); @@ -208,7 +208,7 @@ void wins_srv_died( struct in_addr boothill_ip ) { list_entry *entry; - if( zero_ip( boothill_ip ) ) + if( is_zero_ip( boothill_ip ) ) { DEBUG( 4, ("wins_srv_died(): Got request to mark zero IP down.\n") ); return; diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index 751bac6e6ba..de1924ee23a 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -730,7 +730,6 @@ open the client sockets ****************************************************************************/ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip) { - extern struct in_addr ipzero; extern pstring user_socket_options; int name_type = 0x20; char *p; @@ -747,7 +746,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip) *p = 0; } - if (!ip || ip_equal(*ip, ipzero)) { + if (!ip || is_zero_ip(*ip)) { if (!resolve_name(cli->desthost, &cli->dest_ip, name_type)) { return False; } diff --git a/source/libsmb/domain_client_validate.c b/source/libsmb/domain_client_validate.c index b76f462dc9e..42269a73f1e 100644 --- a/source/libsmb/domain_client_validate.c +++ b/source/libsmb/domain_client_validate.c @@ -22,8 +22,6 @@ #include "includes.h" -extern struct in_addr ipzero; - extern pstring global_myname; /*********************************************************************** @@ -180,7 +178,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, * Ignore addresses we have already tried. */ - if (ip_equal(ipzero, *ip)) + if (is_zero_ip(*ip)) return False; if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name)) @@ -193,6 +191,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, We have been asked to dynamcially determine the IP addresses of the PDC and BDC's for this DOMAIN, and query them in turn. ************************************************************************/ + static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd, time_t last_change_time) @@ -229,7 +228,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli, if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) break; - ip_list[i] = ipzero; /* Tried and failed. */ + zero_ip(&ip_list[i]); /* Tried and failed. */ } /* @@ -238,8 +237,10 @@ static BOOL find_connect_pdc(struct cli_state *pcli, if(!connected_ok) { i = (sys_random() % count); - if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) - ip_list[i] = ipzero; /* Tried and failed. */ + if (!is_zero_ip(ip_list[i]) { + if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) + zero_ip(&ip_list[i]); /* Tried and failed. */ + } } /* @@ -252,14 +253,15 @@ static BOOL find_connect_pdc(struct cli_state *pcli, * Note that from a WINS server the #1 IP address is the PDC. */ for(i = 0; i < count; i++) { + if (is_zero_ip(ip_list[i])) + continue; + if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) break; } } SAFE_FREE(ip_list); - - return connected_ok; } diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index ce6d477c1a4..2f79425824f 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -245,9 +245,8 @@ struct smbc_server *smbc_server(char *server, char *share, fstring group; pstring ipenv; struct in_addr ip; - extern struct in_addr ipzero; - ip = ipzero; + zero_ip(&ip); ZERO_STRUCT(c); /* try to use an existing connection */ @@ -305,7 +304,7 @@ struct smbc_server *smbc_server(char *server, char *share, again: slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n); - ip = ipzero; + zero_ip(&ip); /* have to open a new connection */ if (!cli_initialise(&c) || !cli_connect(&c, server_n, &ip)) { diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index d9a61d9368c..a192f2968a7 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -26,25 +26,25 @@ BOOL global_in_nmbd = False; /**************************************************************************** -generate a random trn_id + Generate a random trn_id. ****************************************************************************/ + static int generate_trn_id(void) { static int trn_id; - if (trn_id == 0) { + if (trn_id == 0) sys_srandom(sys_getpid()); - } trn_id = sys_random(); return trn_id % (unsigned)0x7FFF; } - /**************************************************************************** - parse a node status response into an array of structures + Parse a node status response into an array of structures. ****************************************************************************/ + static struct node_status *parse_node_status(char *p, int *num_names) { struct node_status *ret; @@ -68,11 +68,11 @@ static struct node_status *parse_node_status(char *p, int *num_names) return ret; } - /**************************************************************************** -do a NBT node status query on an open socket and return an array of -structures holding the returned names or NULL if the query failed + Do a NBT node status query on an open socket and return an array of + structures holding the returned names or NULL if the query failed. **************************************************************************/ + struct node_status *node_status_query(int fd,struct nmb_name *name, struct in_addr to_ip, int *num_names) { @@ -1211,8 +1211,15 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun p = pserver; while (next_token(&p,name,LIST_SEP,sizeof(name))) { - if (strequal(name, "*")) - return internal_resolve_name(group, name_type, ip_list, count); + if (strequal(name, "*")) { + /* + * Use 1C followed by 1B. This shouldn't work but with + * broken WINS servers it might. JRA. + */ + if (!pdc_only && internal_resolve_name(group, 0x1C, ip_list, count)) + return True; + return internal_resolve_name(group, 0x1B, ip_list, count); + } num_adresses++; } if (num_adresses == 0) @@ -1240,6 +1247,7 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun /******************************************************** Get the IP address list of the Local Master Browsers ********************************************************/ + BOOL get_lmb_list(struct in_addr **ip_list, int *count) { return internal_resolve_name( MSBROWSE, 0x1, ip_list, count); diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index de955b79fe4..4b624a5b2df 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -50,8 +50,6 @@ BOOL found_lm_clients = False; time_t StartupTime = 0; -extern struct in_addr ipzero; - /**************************************************************************** ** Catch a sigterm. **************************************************************************** */ diff --git a/source/nmbd/nmbd_become_dmb.c b/source/nmbd/nmbd_become_dmb.c index 59edbbc9d7b..7af896e3e03 100644 --- a/source/nmbd/nmbd_become_dmb.c +++ b/source/nmbd/nmbd_become_dmb.c @@ -27,7 +27,6 @@ extern pstring global_myname; extern fstring global_myworkgroup; extern char **my_netbios_names; -extern struct in_addr ipzero; extern struct in_addr allones_ip; extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ @@ -214,7 +213,7 @@ static void become_domain_master_query_success(struct subnet_record *subrec, /* BUG note. Samba 1.9.16p11 servers seem to return the broadcast address or zero ip for this query. Pretend this is ok. */ - if(ismyip(ip) || ip_equal(allones_ip, ip) || ip_equal(ipzero, ip)) + if(ismyip(ip) || ip_equal(allones_ip, ip) || is_zero_ip(ip)) { if( DEBUGLVL( 3 ) ) { diff --git a/source/nmbd/nmbd_browsesync.c b/source/nmbd/nmbd_browsesync.c index d472b6ff284..40e04e7ecb7 100644 --- a/source/nmbd/nmbd_browsesync.c +++ b/source/nmbd/nmbd_browsesync.c @@ -25,7 +25,6 @@ #include "includes.h" #include "smb.h" -extern struct in_addr ipzero; extern pstring global_myname; extern fstring global_myworkgroup; @@ -308,7 +307,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec, /* First check if we already have a dmb for this workgroup. */ - if(!ip_equal(work->dmb_addr, ipzero) && ip_equal(work->dmb_addr, answer_ip)) + if(!is_zero_ip(work->dmb_addr) && ip_equal(work->dmb_addr, answer_ip)) { /* Do the local master browser announcement to the domain master browser name and IP. */ @@ -319,7 +318,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec, return; } else - putip((char *)&work->dmb_addr, &ipzero); + zero_ip(&work->dmb_addr); /* Now initiate the node status request. */ make_nmb_name(&nmbname,"*",0x0); diff --git a/source/nmbd/nmbd_logonnames.c b/source/nmbd/nmbd_logonnames.c index 4f48b21b7fd..52340f1f310 100644 --- a/source/nmbd/nmbd_logonnames.c +++ b/source/nmbd/nmbd_logonnames.c @@ -27,7 +27,6 @@ extern pstring global_myname; extern fstring global_myworkgroup; extern char **my_netbios_names; -extern struct in_addr ipzero; extern struct in_addr allones_ip; extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ diff --git a/source/nmbd/nmbd_namequery.c b/source/nmbd/nmbd_namequery.c index 1f0895ee37f..9d2a7a48958 100644 --- a/source/nmbd/nmbd_namequery.c +++ b/source/nmbd/nmbd_namequery.c @@ -24,8 +24,6 @@ #include "includes.h" -extern struct in_addr ipzero; - /**************************************************************************** Deal with a response packet when querying a name. ****************************************************************************/ @@ -38,7 +36,9 @@ static void query_name_response( struct subnet_record *subrec, BOOL success = False; struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name; - struct in_addr answer_ip = ipzero; + struct in_addr answer_ip; + + zero_ip(&answer_ip); /* Ensure we don't retry the query but leave the response record cleanup to the timeout code. We may get more answer responses in which case diff --git a/source/nmbd/nmbd_responserecordsdb.c b/source/nmbd/nmbd_responserecordsdb.c index b24c85a9d81..63601ff26c4 100644 --- a/source/nmbd/nmbd_responserecordsdb.c +++ b/source/nmbd/nmbd_responserecordsdb.c @@ -26,8 +26,6 @@ extern int ClientNMB; -extern struct in_addr ipzero; - int num_response_packets = 0; /*************************************************************************** diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c index 9030e42b298..0067d89f669 100644 --- a/source/nmbd/nmbd_subnetdb.c +++ b/source/nmbd/nmbd_subnetdb.c @@ -33,7 +33,6 @@ extern int global_nmb_port; extern fstring myworkgroup; extern char **my_netbios_names; -extern struct in_addr ipzero; /* This is the broadcast subnets database. */ struct subnet_record *subnetlist = NULL; @@ -232,7 +231,7 @@ BOOL create_subnets(void) { int num_interfaces = iface_count(); int i; - struct in_addr unicast_ip; + struct in_addr unicast_ip, ipzero; extern struct in_addr loopback_ip; if(num_interfaces == 0) @@ -280,7 +279,7 @@ BOOL create_subnets(void) struct in_addr real_wins_ip; real_wins_ip = wins_srv_ip(); - if (!zero_ip(real_wins_ip)) + if (!is_zero_ip(real_wins_ip)) { unicast_ip = real_wins_ip; } @@ -302,7 +301,7 @@ BOOL create_subnets(void) { /* We should not be using a WINS server at all. Set the ip address of the subnet to be zero. */ - unicast_ip = ipzero; + zero_ip(&unicast_ip); } /* @@ -315,6 +314,8 @@ BOOL create_subnets(void) unicast_subnet = make_subnet( "UNICAST_SUBNET", UNICAST_SUBNET, unicast_ip, unicast_ip, unicast_ip); + zero_ip(&ipzero); + remote_broadcast_subnet = make_subnet( "REMOTE_BROADCAST_SUBNET", REMOTE_BROADCAST_SUBNET, ipzero, ipzero, ipzero); @@ -347,7 +348,7 @@ BOOL we_are_a_wins_client(void) static int cache_we_are_a_wins_client = -1; if(cache_we_are_a_wins_client == -1) - cache_we_are_a_wins_client = (ip_equal(ipzero, unicast_subnet->myip) ? + cache_we_are_a_wins_client = (is_zero_ip(unicast_subnet->myip) ? False : True); return cache_we_are_a_wins_client; diff --git a/source/nmbd/nmbd_winsserver.c b/source/nmbd/nmbd_winsserver.c index 04f7ae33bbc..45385fc4e00 100644 --- a/source/nmbd/nmbd_winsserver.c +++ b/source/nmbd/nmbd_winsserver.c @@ -26,12 +26,10 @@ #define WINS_LIST "wins.dat" #define WINS_VERSION 1 -extern struct in_addr ipzero; - - /**************************************************************************** possibly call the WINS hook external program when a WINS change is made *****************************************************************************/ + static void wins_hook(char *operation, struct name_record *namerec, int ttl) { pstring command; diff --git a/source/nmbd/nmbd_workgroupdb.c b/source/nmbd/nmbd_workgroupdb.c index baa40dc1f9e..1dddc2cd18c 100644 --- a/source/nmbd/nmbd_workgroupdb.c +++ b/source/nmbd/nmbd_workgroupdb.c @@ -31,7 +31,6 @@ extern pstring global_myname; extern fstring global_myworkgroup; extern char **my_netbios_names; extern uint16 samba_nb_type; -extern struct in_addr ipzero; int workgroup_count = 0; /* unique index key: one for each workgroup */ @@ -101,7 +100,7 @@ static struct work_record *create_workgroup(const char *name, int ttl) /* No known domain master browser as yet. */ *work->dmb_name.name = '\0'; - putip((char *)&work->dmb_addr, &ipzero); + zero_ip(&work->dmb_addr); /* WfWg uses 01040b01 */ /* Win95 uses 01041501 */ diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index af03826ad07..3b0b3fe5b26 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -147,38 +147,66 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name) DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); return False; } - - /* Firstly choose a PDC/BDC who has the same network address as any - of our interfaces. */ - + + /* Pick a nice close server */ + /* Look for DC on local net */ + for (i = 0; i < count; i++) { - if(is_local_net(ip_list[i])) - goto got_ip; - } + if (!is_local_net(ip_list[i])) + continue; - if (count == 0) { - DEBUG(3, ("No domain controllers for domain %s\n", domain)); - return False; + if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { + dc_ip = ip_list[i]; + goto done; + } + zero_ip(&ip_list[i]); } - + + /* + * Secondly try and contact a random PDC/BDC. + */ + i = (sys_random() % count); - - got_ip: - dc_ip = ip_list[i]; - SAFE_FREE(ip_list); - - /* We really should be doing a GETDC call here rather than a node - status lookup. */ - if (!name_status_find(domain, 0x1c, 0x20, dc_ip, srv_name)) { - DEBUG(3, ("Error looking up DC name for %s in domain %s\n", inet_ntoa(dc_ip), domain)); - return False; + if (!is_zero_ip(ip_list[i]) && name_status_find(domain, 0x1c, 0x20, + ip_list[i], srv_name)) { + dc_ip = ip_list[i]; + goto done; + } + zero_ip(&ip_list[i]); /* Tried and failed. */ + + /* Finally return first DC that we can contact */ + + for (i = 0; i < count; i++) { + if (is_zero_ip(ip_list[i])) + continue; + + if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { + dc_ip = ip_list[i]; + goto done; + } } + /* No-one to talk to )-: */ + return False; /* Boo-hoo */ + + done: + + /* + * We have the netbios name and IP address of a domain controller. + * Ideally we should sent a SAMLOGON request to determine whether + * the DC is alive and kicking. If we can catch a dead DC before + * performing a cli_connect() we can avoid a 30-second timeout. + */ + /* We have a name so make the cache entry positive now */ fstrcpy(dcc->srv_name, srv_name); + DEBUG(3, ("cm_get_dc_name: Returning DC %s (%s) for domain %s\n", srv_name, + inet_ntoa(dc_ip), domain)); + + SAFE_FREE(ip_list); return True; } diff --git a/source/nsswitch/winbindd_wins.c b/source/nsswitch/winbindd_wins.c index ca21ccb4853..398488f4032 100644 --- a/source/nsswitch/winbindd_wins.c +++ b/source/nsswitch/winbindd_wins.c @@ -95,7 +95,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return NULL; p = wins_srv_ip(); - if( !zero_ip(p) ) { + if( !is_zero_ip(p) ) { ret = name_query(fd,name,0x20,False,True, p, count); goto out; } diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c index 3dce245335c..337e530d127 100644 --- a/source/nsswitch/wins.c +++ b/source/nsswitch/wins.c @@ -129,7 +129,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return NULL; p = wins_srv_ip(); - if( !zero_ip(p) ) { + if( !is_zero_ip(p) ) { ret = name_query(fd,name,0x20,False,True, p, count); goto out; } diff --git a/source/smbd/password.c b/source/smbd/password.c index b404868c6d3..68343918579 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -22,7 +22,6 @@ #include "includes.h" extern int Protocol; -extern struct in_addr ipzero; /* users from session setup */ static pstring session_users=""; @@ -1337,7 +1336,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, un * Ignore addresses we have already tried. */ - if (ip_equal(ipzero, *ip)) + if (is_zero_ip(*ip)) return False; if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name)) @@ -1385,7 +1384,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) break; - ip_list[i] = ipzero; /* Tried and failed. */ + zero_ip(&ip_list[i]); /* Tried and failed. */ } /* @@ -1394,8 +1393,10 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd if(!connected_ok) { i = (sys_random() % count); - if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) - ip_list[i] = ipzero; /* Tried and failed. */ + if (!is_zero_ip(ip_list[i])) { + if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) + zero_ip(&ip_list[i]); /* Tried and failed. */ + } } /* @@ -1408,13 +1409,15 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd * Note that from a WINS server the #1 IP address is the PDC. */ for(i = 0; i < count; i++) { + if (is_zero_ip(ip_list[i])) + continue; + if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) break; } } SAFE_FREE(ip_list); - return connected_ok; } diff --git a/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c index 8f60707f0b5..9878d3c70b6 100644 --- a/source/smbwrapper/smbw.c +++ b/source/smbwrapper/smbw.c @@ -449,9 +449,8 @@ struct smbw_server *smbw_server(char *server, char *share) fstring group; pstring ipenv; struct in_addr ip; - extern struct in_addr ipzero; - ip = ipzero; + zero_ip(&ip); ZERO_STRUCT(c); get_auth_data_fn(server, share, &workgroup, &username, &password); @@ -502,7 +501,7 @@ struct smbw_server *smbw_server(char *server, char *share) again: slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n); - ip = ipzero; + zero_ip(&ip); if ((p=smbw_getshared(ipenv))) { ip = *(interpret_addr2(p)); } diff --git a/source/utils/locktest.c b/source/utils/locktest.c index 4697067e881..3846b10ab79 100644 --- a/source/utils/locktest.c +++ b/source/utils/locktest.c @@ -113,7 +113,6 @@ struct cli_state *connect_one(char *share) char *server_n; fstring server; struct in_addr ip; - extern struct in_addr ipzero; fstring myname; static int count; @@ -125,7 +124,7 @@ struct cli_state *connect_one(char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); @@ -133,7 +132,7 @@ struct cli_state *connect_one(char *share) make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); /* have to open a new connection */ if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) || diff --git a/source/utils/locktest2.c b/source/utils/locktest2.c index 91083bc3ec4..ac16055c0f1 100644 --- a/source/utils/locktest2.c +++ b/source/utils/locktest2.c @@ -157,7 +157,6 @@ struct cli_state *connect_one(char *share) char *server_n; fstring server; struct in_addr ip; - extern struct in_addr ipzero; fstring myname; static int count; @@ -169,7 +168,7 @@ struct cli_state *connect_one(char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); @@ -177,7 +176,7 @@ struct cli_state *connect_one(char *share) make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); /* have to open a new connection */ if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) || diff --git a/source/utils/masktest.c b/source/utils/masktest.c index ba719bae248..df12aafca64 100644 --- a/source/utils/masktest.c +++ b/source/utils/masktest.c @@ -165,7 +165,6 @@ struct cli_state *connect_one(char *share) char *server_n; char *server; struct in_addr ip; - extern struct in_addr ipzero; server = share+2; share = strchr(server,'\\'); @@ -175,13 +174,13 @@ struct cli_state *connect_one(char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, "masktest", 0x0); make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); /* have to open a new connection */ if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) || diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c index 27bd419c781..a134b218f61 100644 --- a/source/utils/nmblookup.c +++ b/source/utils/nmblookup.c @@ -24,7 +24,6 @@ #include "includes.h" -extern struct in_addr ipzero; extern BOOL AllowDebugChange; static BOOL use_bcast = True; diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index f65f65fd330..382d836a5e8 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -691,7 +691,6 @@ struct cli_state *connect_one(char *share) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; extern pstring global_myname; fstrcpy(server,share+2); @@ -702,13 +701,13 @@ struct cli_state *connect_one(char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); /* have to open a new connection */ if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) || diff --git a/source/utils/torture.c b/source/utils/torture.c index 185cd93d164..5bb89bf8555 100644 --- a/source/utils/torture.c +++ b/source/utils/torture.c @@ -135,14 +135,13 @@ static BOOL open_nbt_connection(struct cli_state *c) { struct nmb_name called, calling; struct in_addr ip; - extern struct in_addr ipzero; ZERO_STRUCTP(c); make_nmb_name(&calling, myname, 0x0); make_nmb_name(&called , host, 0x20); - ip = ipzero; + zero_ip(&ip); if (!cli_initialise(c) || !cli_connect(c, host, &ip)) { printf("Failed to connect with %s\n", host); -- cgit From 20d41022ff331f997e621c32539496b041861af9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Feb 2002 03:30:51 +0000 Subject: Fixed autodetection of PDC if no remote machine given when joining domain. Jeremy. --- source/utils/smbpasswd.c | 73 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 48200812b05..2b4ce6dc4f4 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -269,15 +269,16 @@ Join a domain using the administrator username and password goto done; \ } -static int join_domain_byuser(char *domain, char *remote_machine, +static int join_domain_byuser(char *domain, char *remote, char *username, char *password) { /* libsmb variables */ + pstring pdc_name; struct nmb_name calling, called; struct ntuser_creds creds; struct cli_state cli; - fstring dest_host, acct_name; + fstring acct_name; struct in_addr dest_ip; TALLOC_CTX *mem_ctx; @@ -301,6 +302,8 @@ static int join_domain_byuser(char *domain, char *remote_machine, NTSTATUS result; int retval = 1; + pstrcpy(pdc_name, remote ? remote : ""); + /* Connect to remote machine */ ZERO_STRUCT(cli); @@ -319,17 +322,34 @@ static int join_domain_byuser(char *domain, char *remote_machine, init_rpcclient_creds(&creds, username, domain, password); cli_init_creds(&cli, &creds); - if (!resolve_srv_name(remote_machine, dest_host, &dest_ip)) { - DEBUG(0, ("Could not resolve name %s\n", remote_machine)); - goto done; + /* + * If we are given a remote machine assume this is the PDC. + */ + + if(remote == NULL) { + struct in_addr *ip_list; + int addr_count; + if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) { + fprintf(stderr, "Unable to find the domain controller for domain %s.\n", domain); + return 1; + } + if ((addr_count < 1) || (is_zero_ip(ip_list[0]))) { + fprintf(stderr, "Incorrect entries returned when finding the domain controller for domain %s.\n", domain); + return 1; + } + + if (!lookup_dc_name(global_myname, domain, &ip_list[0], pdc_name)) { + fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain); + return 1; + } } - make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20); + make_nmb_name(&called, pdc_name, 0x20); make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0); - if (!cli_establish_connection(&cli, dest_host, &dest_ip, &calling, + if (!cli_establish_connection(&cli, pdc_name, &dest_ip, &calling, &called, "IPC$", "IPC", False, True)) { - DEBUG(0, ("Error connecting to %s\n", dest_host)); + DEBUG(0, ("Error connecting to %s\n", pdc_name)); goto done; } @@ -533,13 +553,13 @@ Join a domain. Old server manager method. static int join_domain(char *domain, char *remote) { - pstring remote_machine; + pstring pdc_name; fstring trust_passwd; unsigned char orig_trust_passwd_hash[16]; DOM_SID domain_sid; BOOL ret; - pstrcpy(remote_machine, remote ? remote : ""); + pstrcpy(pdc_name, remote ? remote : ""); fstrcpy(trust_passwd, global_myname); strlower(trust_passwd); E_md4hash( (uchar *)trust_passwd, orig_trust_passwd_hash); @@ -568,22 +588,30 @@ machine %s in domain %s.\n", global_myname, domain); */ if(remote == NULL) { - pstrcpy(remote_machine, lp_passwordserver()); - } + struct in_addr *ip_list; + int addr_count; + if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) { + fprintf(stderr, "Unable to find the domain controller for domain %s.\n", domain); + return 1; + } + if ((addr_count < 1) || (is_zero_ip(ip_list[0]))) { + fprintf(stderr, "Incorrect entries returned when finding the domain controller for domain %s.\n", domain); + return 1; + } - if(!*remote_machine) { - fprintf(stderr, "No password server list given in smb.conf - \ -unable to join domain.\n"); - return 1; + if (!lookup_dc_name(global_myname, domain, &ip_list[0], pdc_name)) { + fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain); + return 1; + } } - if (!fetch_domain_sid( domain, remote_machine, &domain_sid) || + if (!fetch_domain_sid( domain, pdc_name, &domain_sid) || !secrets_store_domain_sid(domain, &domain_sid)) { fprintf(stderr,"Failed to get domain SID. Unable to join domain %s.\n",domain); return 1; } - ret = change_trust_account_password( domain, remote_machine); + ret = change_trust_account_password( domain, pdc_name); if(!ret) { trust_password_delete(domain); @@ -684,7 +712,7 @@ static BOOL password_change(const char *remote_machine, char *user_name, return False; } ret = remote_password_change(remote_machine, user_name, - old_passwd, new_passwd, err_str, sizeof(err_str)); + old_passwd, new_passwd, err_str, sizeof(err_str)); if(*err_str) fprintf(stderr, err_str); return ret; @@ -722,7 +750,7 @@ static BOOL store_ldap_admin_pw (char* pw) Handle password changing for root. *************************************************************/ -static int process_root() +static int process_root(void) { struct passwd *pwd; int result = 0; @@ -903,9 +931,10 @@ static int process_root() /************************************************************* -handle password changing for non-root + Handle password changing for non-root. *************************************************************/ -static int process_nonroot() + +static int process_nonroot(void) { struct passwd *pwd = NULL; int result = 0; -- cgit From 365c76adab38cd3b51616dc37fd4aff53285da35 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Feb 2002 22:51:04 +0000 Subject: Fix CUPS build broken when fstrcpy added. Jeremy. --- source/printing/print_cups.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c index 327811dd9fe..91c3116a53d 100644 --- a/source/printing/print_cups.c +++ b/source/printing/print_cups.c @@ -904,8 +904,8 @@ cups_queue_get(int snum, print_queue_struct **q, print_status_struct *status) LPQ_PRINTING; temp->priority = job_priority; temp->time = job_time; - strncpy(temp->user, user_name, sizeof(temp->user) - 1); - strncpy(temp->file, job_name, sizeof(temp->file) - 1); + strncpy(temp->fs_user, user_name, sizeof(temp->fs_user) - 1); + strncpy(temp->fs_file, job_name, sizeof(temp->fs_file) - 1); qcount ++; -- cgit From 72eb80f066d2f9567dfc24e2e4e53fd18ca6ccf3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Mar 2002 01:03:59 +0000 Subject: Attempt to fix Solaris winbind nss build. Jeremy. --- source/Makefile.in | 4 ++-- source/configure | 37 +++++++++++++++++++++++++------------ source/configure.in | 13 ++++++++++++- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 2370121d191..b965dd59cbc 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -396,7 +396,7 @@ WINBINDD_OBJ = \ WBINFO_OBJ = nsswitch/wbinfo.o libsmb/smbencrypt.o libsmb/smbdes.o \ passdb/secrets.o -WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o nsswitch/winbind_nss_solaris.o +WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o @WINBIND_NSS_EXTRA_OBJS@ WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) @@ -640,7 +640,7 @@ bin/winbindd: $(WINBINDD_OBJ) bin/.dummy nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS) @echo "Linking $@" - @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) + @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy @echo Linking $@ diff --git a/source/configure b/source/configure index edfb7f83800..baec57bbff9 100755 --- a/source/configure +++ b/source/configure @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -12948,9 +12948,18 @@ echo "configure:12947: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*|*hpux11*) + *linux*|*irix*) HAVE_WINBIND=yes ;; + *solaris*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTGRA_LIBS="-lsocket" + ;; + *hpux11*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + ;; *) HAVE_WINBIND=no winbind_no_reason=", unsupported on $host_os" @@ -13015,6 +13024,8 @@ fi + + ################################################# # final configure stuff echo "checking configure summary" @@ -13022,11 +13033,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -13228,6 +13239,8 @@ s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g +s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g +s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g s%@builddir@%$builddir%g CEOF diff --git a/source/configure.in b/source/configure.in index 994abdb20a3..71039a86cb3 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2582,9 +2582,18 @@ AC_MSG_CHECKING(whether to build winbind) # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*|*hpux11*) + *linux*|*irix*) HAVE_WINBIND=yes ;; + *solaris*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTGRA_LIBS="-lsocket" + ;; + *hpux11*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + ;; *) HAVE_WINBIND=no winbind_no_reason=", unsupported on $host_os" @@ -2646,6 +2655,8 @@ AC_SUBST(WINBIND_TARGETS) AC_SUBST(WINBIND_STARGETS) AC_SUBST(WINBIND_LTARGETS) AC_SUBST(WINBIND_PAM_TARGETS) +AC_SUBST(WINBIND_NSS_EXTRA_OBJS) +AC_SUBST(WINBIND_NSS_EXTRA_LIBS) ################################################# # final configure stuff -- cgit From 732510896550e5c81506a2380f48a009795597a7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 1 Mar 2002 14:37:30 +0000 Subject: couple of typo fixes from Ian Nicholls and peter.a.bryant --- docs/Samba-HOWTO-Collection.pdf | 642 +++++++++++++++--------------- docs/docbook/projdoc/printer_driver2.sgml | 6 +- docs/htmldocs/Samba-HOWTO-Collection.html | 6 +- 3 files changed, 331 insertions(+), 323 deletions(-) diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf index 24b4a205c94..c6dfde6038a 100644 --- a/docs/Samba-HOWTO-Collection.pdf +++ b/docs/Samba-HOWTO-Collection.pdf @@ -1,6 +1,6 @@ %PDF-1.2 %âãÏÓ -1 0 obj<>endobj +1 0 obj<>endobj 2 0 obj<>endobj 3 0 obj<>endobj 4 0 obj<>endobj @@ -566,7 +566,7 @@ 383 0 obj<>endobj 384 0 obj<>endobj 385 0 obj<>endobj -386 0 obj<>endobj +386 0 obj<>endobj 387 0 obj<>endobj 388 0 obj<>endobj 389 0 obj<>endobj @@ -880,7 +880,7 @@ 602 0 obj<>endobj 603 0 obj<>endobj 604 0 obj<>endobj -605 0 obj<>endobj +605 0 obj<>endobj 606 0 obj<>endobj 607 0 obj<>endobj 608 0 obj<>endobj @@ -1388,15 +1388,19 @@ endobj endobj 727 0 obj<>>>/Annots 85 0 R>>endobj 728 0 obj<>stream -xWÛnÛF}÷WL…Q›ºZ’Û‡B¾5Y‘”KQÅŠ\I›\…KZqÑï™]’¢èÆ@kÁº»;3gΜ~=éP¯ »Ô\.On–'mo4¢Ã[²Á6 z]¼÷GCþ>À["iÍ;pÇ”oXÞºmÓ-×8z€£–½Ý¦¥ßü}—¨8ýñ3þ{½ü|Ò¦³laQ“ò¿¿Ï>öºŸFƒâ7>¦ÆGzohº¤o£Aãû{'Ó~»²µº÷â¼u1zak¯;¾›½—»ÍŽÃÝVü9þ4{ñ„·“Ù¢< jŽÏûívûÅݳÙÕasm÷Lïe2»²û[·çÔéXŒ{C¯OgÝ‘×eÇËåÍt9¹Ÿþ@4¿y÷~2¿¹¦ÙÍüíd±ÀÕãfs|”´ù¯œF:¿¸ðyŽ;89^pŽ[·ýÜ\—·=¬&u“N™PªÉÏ’DÆiøD"HP,÷$êÑÝ}Ò-D´´Õ&=%Ò±$½¦t:Tªtl(ÊLŠa@i’ÉŸØgô¬;°†›Ë­$áû:‹SÊŒÄ*»;–~Ê_SÜ>¡ü4ñˆM”©€íµé¡©<éáJ¢uZœöðšØVëÖÏ£=‚š nÐ|è†öæx¦=Àë :XxŽQDýN0º_aÀ¯ëYÆÊâÿD´âx"­-Cˆ¨óäVíÛó>2yäÍ¡Zm¶d»yÈE(umáÂò©˜-N±ßì)Mš*“zu8{½Ž7¬zà–#q™æû58‘%FžÚàÀÎ0Ò]äÞÒĤ* i§‘Æð-þ ˜~kJûƒÁ1Ù*P NЉÂÕ•Œ¥H·T(’gC‚õ\!ÍeŽmº lðid¶"Án¼‘‘–n¯)@ª8|zE«' -äZdaj;âŠ)/´þhTŠi§Ó[ŠJƒÄêÐßǾ$.-“؇=FcJä× 1ep*yTX.â©2FûÊ®>Žþ”ŒŠv(ÒPoàzµhj0ðyÈzfT¼Á®\š:ÉS[ЦYð£¤Ç!¯MÔU‘³u¢#SQó>ðCÑðˆ¦âQmàpQÇ÷ ™˜R5óô¬¡Lü¸RîÎWœò°2[A@Œd,HÅZVr$(˜Üaðƒ‰Ôß2Y€jJžkdTÅ2¨ËHIRQšJÊ!,’®[rß,šeëö‚:PO– ÞÕ¶*¤¯‹-dš²“×V7 ­öÍ7Ô_,aw£v‡¬SKøÿR°ª -‹ð+Cå™°dQÝsIY²Å®·’\ÊA,µ&„<Õp€RpYVÂ)üÉQâèÚ€X™¢'Ä"’´¦(&Õ ×¢&Mïi6ŸL—7sºžO>àcüa<¹_ÞÝÐíýœ–o&¶¥ñ‘3#_ŒOÓ£;Ð*!ÙØãoE¼±eoX/húþîŽL -Âmì…0Ô{Ëô\pjpŒ!.y"@å¿DÂPbºluÑîsnÆi*£M"ì=*tÆ*Ûv‰ÞÉ$emâ„‹óýVù[¤ƒÉÉÈ9),RQ³nS¥‚1þÖ’LA ÅÆuÕÖm5(o¯×Ò*ä}5ä‹8FD¿ ”Ù…âIH0-gƒõ—C1;髵ª_à/ïU±I!¡28µB‰…Z‡2©ù\AÀº_³x­­îÚ>ÌÏ´‘žÄzÿËqâ+q]…ÊÿB©n0"ì¯$€0@Y1Yd Ó; QB0{…>ñTííXšã±{li¨Åv˜UÑA Ç;,ªCÎ{&|lLÁ§žç5h•¥)«ÞP…§¬rg @ýÂ0stÊZÈg)QÀjEÛ wÙΊ(+h‘@䌂ä4qJ‹ÞbÙÊc@ )ÓÿéÙPð|Æ:¸U &ë_K¾¯³8¥ÌH¬²»cé§ü5Åí½ÊOÏØD™ +Ø^“ëÊ“®$Z§Åio‰m5ný<Ú³>¨ âõÇv¯oo×bÚ¼N¯……ç(‘EÔmu£ûVìðºŽeü¾,þOD Ž'’ÑÐ2„ˆ:Oî¡}xsÞE&¼ÙW« À–l;¹¥ê¢-\˜B^#³¥ý)ö›=¥ IBeR¯ +g§Óòú@÷Ür$.Óü°'²ÄÈSøÁFº‹Ü[š˜T…!m´1Ò¾Å`Óo©Bi08&[*Á :Q¸º±éš +EòlHP£Ž+¤©Ì±M× >ÌZ$Ø72ÒÒíM"H‡»7´ØQ —" S{ÜW,Hy¡uƒRL[­ØRT$¶W…þ!ö%q鬙Ä>ì1 +S"¿fˆ)(£€SɳÂrH•1ÚWvõqô§dT´A‘†z׋¦Ÿ‡¬gFÅ+èÊå±®“<µmê?JzìóZG]9[&:Â1jÞõšöù¡‚nxDSm,¡ ÉSÅ›±T«õ¤XkÔ :T»ßQ¾–&¡@ök6öE‚f…% Ô^ØÂž¡öK<]´§«±xV+¬)Ä¥6á&&ãy^ &BhŸG¿!Af­3¨–‘œR1ôL„¶>TiŽHɬŠDꯙ¡ð°ÀϬâH¥b¤YÇ̃ä0^éxFè.à®kÑܬ‹ݸ½ $›u¯ƒÞ}¬Þ=¯Ídš²“×V¬EîæŠ˜/³±}^Ñ»Û}Ç9ü-XW’ðÆPyf m¹Ž-Ãc ×[IÞ?Àfµb‡ +>0Bb/Ëò;…?9J]ö•)Q,"I[aŠ +vQõr¬Óø&ÓÑx~3¥ëéè#>†‡£»áåÝ Ý>Liþndû(Ï.¹Zäëñ©{tÚ$„ +2¶±ùk¯líÂ)¸»#“‚P+{! õÖ‚…Ɔ N×™¢! ¡hy"P?‰„ùPb>>>/Annots 94 0 R>>endobj 731 0 obj<>stream @@ -2226,7 +2230,7 @@ endobj 951 0 obj<>endobj 952 0 obj<>endobj 953 0 obj<>endobj -954 0 obj<>endobj +954 0 obj<>endobj 955 0 obj<>endobj 956 0 obj<>endobj 957 0 obj<>endobj @@ -3038,314 +3042,314 @@ xref 0000102766 00000 n 0000102788 00000 n 0000102981 00000 n -0000104855 00000 n -0000104877 00000 n -0000105061 00000 n -0000106971 00000 n -0000106993 00000 n -0000107169 00000 n -0000108970 00000 n -0000108992 00000 n -0000109162 00000 n -0000110760 00000 n -0000110782 00000 n -0000110967 00000 n -0000112443 00000 n -0000112465 00000 n -0000112658 00000 n -0000114229 00000 n -0000114251 00000 n -0000114426 00000 n -0000116206 00000 n -0000116228 00000 n -0000116384 00000 n -0000117945 00000 n -0000117967 00000 n -0000118152 00000 n -0000120004 00000 n -0000120026 00000 n -0000120192 00000 n -0000121839 00000 n -0000121861 00000 n -0000122046 00000 n -0000123995 00000 n -0000124017 00000 n -0000124201 00000 n -0000125928 00000 n -0000125950 00000 n -0000126120 00000 n -0000127725 00000 n -0000127747 00000 n -0000127916 00000 n -0000129789 00000 n -0000129811 00000 n -0000129996 00000 n -0000131860 00000 n -0000131882 00000 n -0000132058 00000 n -0000134148 00000 n -0000134170 00000 n -0000134345 00000 n -0000136285 00000 n -0000136307 00000 n -0000136483 00000 n -0000138799 00000 n -0000138821 00000 n -0000138973 00000 n -0000140953 00000 n -0000140975 00000 n -0000141135 00000 n -0000143002 00000 n -0000143024 00000 n -0000143175 00000 n -0000144927 00000 n -0000144949 00000 n -0000145081 00000 n -0000146955 00000 n -0000146977 00000 n -0000147119 00000 n -0000149190 00000 n -0000149212 00000 n -0000149363 00000 n -0000151157 00000 n -0000151179 00000 n -0000151311 00000 n -0000153104 00000 n -0000153126 00000 n -0000153249 00000 n -0000153703 00000 n -0000153724 00000 n -0000153881 00000 n -0000155494 00000 n -0000155516 00000 n -0000155668 00000 n -0000157328 00000 n -0000157350 00000 n -0000157492 00000 n -0000158375 00000 n -0000158396 00000 n -0000158581 00000 n -0000160737 00000 n -0000160759 00000 n -0000160935 00000 n -0000163120 00000 n -0000163142 00000 n -0000163293 00000 n -0000164394 00000 n -0000164416 00000 n -0000164592 00000 n -0000166092 00000 n -0000166114 00000 n -0000166299 00000 n -0000168151 00000 n -0000168173 00000 n -0000168358 00000 n -0000170265 00000 n -0000170287 00000 n -0000170444 00000 n -0000171375 00000 n -0000171396 00000 n -0000171548 00000 n -0000173289 00000 n -0000173311 00000 n -0000173453 00000 n -0000175215 00000 n -0000175237 00000 n -0000175388 00000 n -0000177279 00000 n -0000177301 00000 n -0000177458 00000 n -0000179311 00000 n -0000179333 00000 n -0000179527 00000 n -0000181587 00000 n -0000181609 00000 n -0000181784 00000 n -0000183376 00000 n -0000183398 00000 n -0000183582 00000 n -0000184932 00000 n -0000184954 00000 n -0000185114 00000 n -0000186357 00000 n -0000186379 00000 n -0000186530 00000 n -0000187986 00000 n -0000188008 00000 n -0000188169 00000 n -0000189817 00000 n -0000189839 00000 n -0000189972 00000 n -0000190442 00000 n -0000190463 00000 n -0000190630 00000 n -0000192298 00000 n -0000192320 00000 n -0000192477 00000 n -0000193665 00000 n -0000193687 00000 n -0000193844 00000 n -0000195396 00000 n -0000195418 00000 n -0000195602 00000 n -0000196407 00000 n -0000196428 00000 n -0000196585 00000 n -0000202008 00000 n -0000202030 00000 n -0000202187 00000 n -0000207481 00000 n -0000207503 00000 n -0000207660 00000 n -0000212788 00000 n -0000212810 00000 n -0000212967 00000 n -0000213737 00000 n -0000213758 00000 n -0000213815 00000 n -0000213920 00000 n -0000214098 00000 n -0000214217 00000 n -0000214352 00000 n -0000214488 00000 n -0000214636 00000 n -0000214786 00000 n -0000214926 00000 n -0000215067 00000 n -0000215220 00000 n -0000215382 00000 n -0000215531 00000 n -0000215719 00000 n -0000215852 00000 n -0000215980 00000 n -0000216098 00000 n -0000216234 00000 n -0000216376 00000 n -0000216492 00000 n -0000216618 00000 n -0000216734 00000 n -0000216925 00000 n -0000217024 00000 n -0000217172 00000 n -0000217290 00000 n -0000217414 00000 n -0000217536 00000 n -0000217662 00000 n -0000217820 00000 n -0000217950 00000 n -0000218074 00000 n -0000218192 00000 n -0000218310 00000 n -0000218429 00000 n -0000218619 00000 n -0000218805 00000 n -0000218958 00000 n -0000219121 00000 n -0000219272 00000 n -0000219376 00000 n -0000219593 00000 n -0000219699 00000 n -0000219831 00000 n -0000219953 00000 n -0000220158 00000 n -0000220263 00000 n -0000220363 00000 n -0000220567 00000 n -0000220728 00000 n -0000220876 00000 n -0000221004 00000 n -0000221147 00000 n -0000221271 00000 n -0000221400 00000 n -0000221545 00000 n -0000221710 00000 n -0000221862 00000 n -0000222042 00000 n -0000222147 00000 n -0000222266 00000 n -0000222391 00000 n -0000222536 00000 n -0000222678 00000 n -0000222828 00000 n -0000222959 00000 n -0000223085 00000 n -0000223210 00000 n -0000223350 00000 n -0000223477 00000 n -0000223608 00000 n -0000223739 00000 n -0000223917 00000 n -0000224045 00000 n -0000224181 00000 n -0000224316 00000 n -0000224522 00000 n -0000224635 00000 n -0000224751 00000 n -0000224896 00000 n -0000225067 00000 n -0000225216 00000 n -0000225371 00000 n -0000225511 00000 n -0000225643 00000 n -0000225777 00000 n -0000225909 00000 n -0000226047 00000 n -0000226197 00000 n -0000226365 00000 n -0000226512 00000 n -0000226699 00000 n -0000226812 00000 n -0000226928 00000 n -0000227084 00000 n -0000227242 00000 n -0000227373 00000 n -0000227519 00000 n -0000227653 00000 n -0000227786 00000 n -0000228007 00000 n -0000228108 00000 n -0000228227 00000 n -0000228356 00000 n -0000228515 00000 n -0000228649 00000 n -0000228780 00000 n -0000228907 00000 n -0000229046 00000 n -0000229181 00000 n -0000229333 00000 n -0000229482 00000 n -0000229587 00000 n -0000229797 00000 n -0000229902 00000 n -0000230025 00000 n -0000230157 00000 n -0000230281 00000 n -0000230409 00000 n -0000230554 00000 n -0000230686 00000 n -0000230831 00000 n -0000230972 00000 n -0000231099 00000 n -0000231240 00000 n -0000231365 00000 n -0000231490 00000 n -0000231621 00000 n -0000231743 00000 n -0000231850 00000 n -0000232020 00000 n -0000232121 00000 n -0000232310 00000 n -0000232504 00000 n -0000232691 00000 n -0000232853 00000 n -0000233045 00000 n -0000233154 00000 n -0000233288 00000 n -0000233418 00000 n -0000233531 00000 n -0000233626 00000 n +0000104908 00000 n +0000104930 00000 n +0000105114 00000 n +0000107024 00000 n +0000107046 00000 n +0000107222 00000 n +0000109023 00000 n +0000109045 00000 n +0000109215 00000 n +0000110813 00000 n +0000110835 00000 n +0000111020 00000 n +0000112496 00000 n +0000112518 00000 n +0000112711 00000 n +0000114282 00000 n +0000114304 00000 n +0000114479 00000 n +0000116259 00000 n +0000116281 00000 n +0000116437 00000 n +0000117998 00000 n +0000118020 00000 n +0000118205 00000 n +0000120057 00000 n +0000120079 00000 n +0000120245 00000 n +0000121892 00000 n +0000121914 00000 n +0000122099 00000 n +0000124048 00000 n +0000124070 00000 n +0000124254 00000 n +0000125981 00000 n +0000126003 00000 n +0000126173 00000 n +0000127778 00000 n +0000127800 00000 n +0000127969 00000 n +0000129842 00000 n +0000129864 00000 n +0000130049 00000 n +0000131913 00000 n +0000131935 00000 n +0000132111 00000 n +0000134201 00000 n +0000134223 00000 n +0000134398 00000 n +0000136338 00000 n +0000136360 00000 n +0000136536 00000 n +0000138852 00000 n +0000138874 00000 n +0000139026 00000 n +0000141006 00000 n +0000141028 00000 n +0000141188 00000 n +0000143055 00000 n +0000143077 00000 n +0000143228 00000 n +0000144980 00000 n +0000145002 00000 n +0000145134 00000 n +0000147008 00000 n +0000147030 00000 n +0000147172 00000 n +0000149243 00000 n +0000149265 00000 n +0000149416 00000 n +0000151210 00000 n +0000151232 00000 n +0000151364 00000 n +0000153157 00000 n +0000153179 00000 n +0000153302 00000 n +0000153756 00000 n +0000153777 00000 n +0000153934 00000 n +0000155547 00000 n +0000155569 00000 n +0000155721 00000 n +0000157381 00000 n +0000157403 00000 n +0000157545 00000 n +0000158428 00000 n +0000158449 00000 n +0000158634 00000 n +0000160790 00000 n +0000160812 00000 n +0000160988 00000 n +0000163173 00000 n +0000163195 00000 n +0000163346 00000 n +0000164447 00000 n +0000164469 00000 n +0000164645 00000 n +0000166145 00000 n +0000166167 00000 n +0000166352 00000 n +0000168204 00000 n +0000168226 00000 n +0000168411 00000 n +0000170318 00000 n +0000170340 00000 n +0000170497 00000 n +0000171428 00000 n +0000171449 00000 n +0000171601 00000 n +0000173342 00000 n +0000173364 00000 n +0000173506 00000 n +0000175268 00000 n +0000175290 00000 n +0000175441 00000 n +0000177332 00000 n +0000177354 00000 n +0000177511 00000 n +0000179364 00000 n +0000179386 00000 n +0000179580 00000 n +0000181640 00000 n +0000181662 00000 n +0000181837 00000 n +0000183429 00000 n +0000183451 00000 n +0000183635 00000 n +0000184985 00000 n +0000185007 00000 n +0000185167 00000 n +0000186410 00000 n +0000186432 00000 n +0000186583 00000 n +0000188039 00000 n +0000188061 00000 n +0000188222 00000 n +0000189870 00000 n +0000189892 00000 n +0000190025 00000 n +0000190495 00000 n +0000190516 00000 n +0000190683 00000 n +0000192351 00000 n +0000192373 00000 n +0000192530 00000 n +0000193718 00000 n +0000193740 00000 n +0000193897 00000 n +0000195449 00000 n +0000195471 00000 n +0000195655 00000 n +0000196460 00000 n +0000196481 00000 n +0000196638 00000 n +0000202061 00000 n +0000202083 00000 n +0000202240 00000 n +0000207534 00000 n +0000207556 00000 n +0000207713 00000 n +0000212841 00000 n +0000212863 00000 n +0000213020 00000 n +0000213790 00000 n +0000213811 00000 n +0000213868 00000 n +0000213973 00000 n +0000214151 00000 n +0000214270 00000 n +0000214405 00000 n +0000214541 00000 n +0000214689 00000 n +0000214839 00000 n +0000214979 00000 n +0000215120 00000 n +0000215273 00000 n +0000215435 00000 n +0000215584 00000 n +0000215772 00000 n +0000215905 00000 n +0000216033 00000 n +0000216151 00000 n +0000216287 00000 n +0000216429 00000 n +0000216545 00000 n +0000216671 00000 n +0000216787 00000 n +0000216978 00000 n +0000217077 00000 n +0000217225 00000 n +0000217343 00000 n +0000217467 00000 n +0000217589 00000 n +0000217715 00000 n +0000217873 00000 n +0000218003 00000 n +0000218127 00000 n +0000218245 00000 n +0000218363 00000 n +0000218482 00000 n +0000218672 00000 n +0000218858 00000 n +0000219011 00000 n +0000219174 00000 n +0000219325 00000 n +0000219429 00000 n +0000219646 00000 n +0000219752 00000 n +0000219884 00000 n +0000220006 00000 n +0000220211 00000 n +0000220316 00000 n +0000220416 00000 n +0000220620 00000 n +0000220781 00000 n +0000220929 00000 n +0000221057 00000 n +0000221200 00000 n +0000221324 00000 n +0000221453 00000 n +0000221598 00000 n +0000221763 00000 n +0000221915 00000 n +0000222095 00000 n +0000222200 00000 n +0000222319 00000 n +0000222444 00000 n +0000222589 00000 n +0000222731 00000 n +0000222881 00000 n +0000223012 00000 n +0000223138 00000 n +0000223263 00000 n +0000223403 00000 n +0000223530 00000 n +0000223661 00000 n +0000223792 00000 n +0000223970 00000 n +0000224098 00000 n +0000224234 00000 n +0000224369 00000 n +0000224575 00000 n +0000224688 00000 n +0000224804 00000 n +0000224949 00000 n +0000225120 00000 n +0000225269 00000 n +0000225424 00000 n +0000225564 00000 n +0000225696 00000 n +0000225830 00000 n +0000225962 00000 n +0000226100 00000 n +0000226250 00000 n +0000226418 00000 n +0000226565 00000 n +0000226752 00000 n +0000226865 00000 n +0000226981 00000 n +0000227137 00000 n +0000227295 00000 n +0000227426 00000 n +0000227572 00000 n +0000227706 00000 n +0000227839 00000 n +0000228060 00000 n +0000228161 00000 n +0000228280 00000 n +0000228409 00000 n +0000228568 00000 n +0000228702 00000 n +0000228833 00000 n +0000228960 00000 n +0000229099 00000 n +0000229234 00000 n +0000229386 00000 n +0000229535 00000 n +0000229640 00000 n +0000229850 00000 n +0000229955 00000 n +0000230078 00000 n +0000230210 00000 n +0000230334 00000 n +0000230462 00000 n +0000230607 00000 n +0000230739 00000 n +0000230884 00000 n +0000231025 00000 n +0000231152 00000 n +0000231293 00000 n +0000231418 00000 n +0000231543 00000 n +0000231674 00000 n +0000231796 00000 n +0000231903 00000 n +0000232073 00000 n +0000232174 00000 n +0000232363 00000 n +0000232557 00000 n +0000232744 00000 n +0000232906 00000 n +0000233098 00000 n +0000233207 00000 n +0000233341 00000 n +0000233471 00000 n +0000233584 00000 n +0000233679 00000 n trailer -<]>> +<]>> startxref -233841 +233894 %%EOF diff --git a/docs/docbook/projdoc/printer_driver2.sgml b/docs/docbook/projdoc/printer_driver2.sgml index 4377303ffb2..84a24bcdefc 100644 --- a/docs/docbook/projdoc/printer_driver2.sgml +++ b/docs/docbook/projdoc/printer_driver2.sgml @@ -230,8 +230,10 @@ that all file shares are set to 'read only' by default. Once you have created the required [print$] service and associated subdirectories, simply log onto the Samba server using a root (or printer admin) account -from a Windows NT 4.0 client. Navigate to the "Printers" folder -on the Samba server. You should see an initial listing of printers +from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or +"My Network Places" and browse for the Samba host. Once you have located +the server, navigate to the "Printers..." folder. +You should see an initial listing of printers that matches the printer shares defined on your Samba host. diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index c641050a39b..9f7129a16b0 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -4666,8 +4666,10 @@ CLASS="PARAMETER" >printer admin
    ) account -from a Windows NT 4.0 client. Navigate to the "Printers" folder -on the Samba server. You should see an initial listing of printers +from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or +"My Network Places" and browse for the Samba host. Once you have located +the server, navigate to the "Printers..." folder. +You should see an initial listing of printers that matches the printer shares defined on your Samba host.

    Date: Fri, 1 Mar 2002 14:52:57 +0000 Subject: typo fix from Ian Nicholls --- source/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index aad5bf5de56..0f1f769d113 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2051,7 +2051,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * if(!S_ISLNK(sbuf.st_mode)) return(UNIXERROR(ERRSRV,ERRbadlink)); #else - return(UNIXERROR(ERRDOS,ErrNotALink)); + return(UNIXERROR(ERRDOS,ERRbadlink)); #endif len = conn->vfs_ops.readlink(conn,dos_to_unix(fullpathname,False), buffer, sizeof(pstring)-1); /* read link */ if (len == -1) -- cgit From cdfdd5576da844dc8965f9922e0401bd695aa94d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 1 Mar 2002 15:16:33 +0000 Subject: off by one fix from Peter Haight --- source/passdb/pdb_ldap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 0fcda53adb5..a747ca40b1b 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -56,6 +56,7 @@ struct ldap_enum_info { LDAP *ldap_struct; LDAPMessage *result; LDAPMessage *entry; + int index; }; static struct ldap_enum_info global_ldap_ent; @@ -705,6 +706,7 @@ BOOL pdb_setsampwent(BOOL update) global_ldap_ent.entry = ldap_first_entry(global_ldap_ent.ldap_struct, global_ldap_ent.result); + global_ldap_ent.index = -1; return True; } @@ -731,8 +733,11 @@ BOOL pdb_getsampwent(SAM_ACCOUNT * user) if (!global_ldap_ent.entry) return False; - global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct, - global_ldap_ent.entry); + global_ldap_ent.index++; + if (global_ldap_ent.index > 0) + { + global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct, global_ldap_ent.entry); + } if (global_ldap_ent.entry != NULL) { -- cgit From 700af40e32f01438ee56f7104fe83323f4c9cd3d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 1 Mar 2002 16:24:47 +0000 Subject: This is an intermediate commit. * comment out the call to free_notify_data() as it corrupts the heap right now. At least we won't seg fault. * only call srv_spoolss_sendnotify() on a PRINTER_CHANGE_SET_PRINTER_DRIVER This needs to be fixed to check for what events the client is monitoring. * add debugs to free_notify_data() --- source/rpc_server/srv_spoolss_nt.c | 78 ++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 582c74942a1..2ab66816cb3 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -562,37 +562,51 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) /********************************************************************** Release the memory held by a SPOOL_NOTIFY_INFO_DATA *********************************************************************/ - static void free_notify_data(SPOOL_NOTIFY_INFO_DATA *data, uint32 len) { - uint32 i; + uint32 i; - if (!data) - return; + DEBUG(10,("free_notify_data: enter\n")); - for (i=0; imem_ctx, MARSHALL); prs_init(&rbuf, 0, pcli->mem_ctx, UNMARSHALL ); - + ZERO_STRUCT(notify_info); - + /* lookup the printer if we have a name */ - + if (*printername) { result = get_a_printer(&printer, 2, printername); if (! W_ERROR_IS_OK(result)) { *status = result; goto done; } - } + } /* * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX @@ -633,17 +647,17 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, goto done; } notify_data = data; - + memset(notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); - - /* - * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE * See PRINTER_NOTIFY_INFO_DATA entries in MSDN * --jerry */ construct_info_data(notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); - spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, pcli->mem_ctx); + spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, pcli->mem_ctx); idx++; } @@ -655,13 +669,13 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, #endif /* create and send a MSRPC command with api */ - + /* store the parameters */ - + notify_info.flags = 0x00000200; notify_info.count = idx; notify_info.data = notify_data; - + make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high, ¬ify_info); /* turn parameters into data stream */ @@ -678,7 +692,7 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, goto done; } - + /* turn data stream into parameters*/ if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); @@ -692,7 +706,9 @@ done: prs_mem_free(&buf); prs_mem_free(&rbuf); free_a_printer(&printer, 2); +#if 0 /* JERRY */ free_notify_data(notify_data, idx); +#endif return W_ERROR_IS_OK(*status); } @@ -4938,8 +4954,12 @@ done: * between 2k -> 2k. Otherwise a PRINTER_CHANGE_SET_PRINTER * event is ok. --jerry */ - srv_spoolss_sendnotify(printer->info_2->printername, 0, notify_flag); - + if (notify_flag & ~PRINTER_CHANGE_SET_PRINTER) { + DEBUG(10,("update_printer: sending change notify for printer [%s]\n", + printer->info_2->printername)); + srv_spoolss_sendnotify(printer->info_2->printername, 0, notify_flag); + } + free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); -- cgit From c642e3456327eb9f3c18a9810d18e8e39b036870 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 1 Mar 2002 16:45:15 +0000 Subject: typo fix from David Tercero --- packaging/Mandrake/makerpms.sh.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl index dd0e6d32f0d..6ed3d7a5576 100644 --- a/packaging/Mandrake/makerpms.sh.tmpl +++ b/packaging/Mandrake/makerpms.sh.tmpl @@ -54,11 +54,11 @@ esac ( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) ( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) -( cd ../../.. ; tar --exclude=CVS -cvf ${SRCDIR}/samba-${VERSION}.tar.gz samba-${VERSION} ) +( cd ../../.. ; tar --exclude=CVS -cvf ${SRCDIR}/samba-${VERSION}.tar samba-${VERSION} ) ( cd ${SRCDIR}; bzip2 samba-$VERSION.tar ) cp -av samba.spec ${SPECDIR} -cp -a *.patch smb.* samba.log $SRCDIR +cp -a *.patch.bz2 *.xpm.bz2 smb.* samba.xinetd samba.log $SRCDIR echo Getting Ready to build release package cd ${SPECDIR} -- cgit From 40db9b0de2755bd8f618accfe5b95b87560bed93 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 1 Mar 2002 17:35:19 +0000 Subject: fix typo caught by Mike Gerdts --- source/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/configure.in b/source/configure.in index 71039a86cb3..407850dd8f8 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2588,7 +2588,7 @@ case "$host_os" in *solaris*) HAVE_WINBIND=yes WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" - WINBIND_NSS_EXTGRA_LIBS="-lsocket" + WINBIND_NSS_EXTRA_LIBS="-lsocket" ;; *hpux11*) HAVE_WINBIND=yes -- cgit From 1ec4ffb9f15d657f47c0d2d70c73f5283528c533 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Mar 2002 22:02:12 +0000 Subject: Fix the memory corruption bug. It was caused by trying to deep-free an array whose internal pointers were talloced. We can just get away with SAFE_FREE'ing the array pointer. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 43 ++++++-------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 2ab66816cb3..56faae93d26 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -559,39 +559,6 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) return True; } -/********************************************************************** - Release the memory held by a SPOOL_NOTIFY_INFO_DATA - *********************************************************************/ -static void free_notify_data(SPOOL_NOTIFY_INFO_DATA *data, uint32 len) -{ - uint32 i; - - DEBUG(10,("free_notify_data: enter\n")); - - if (!data) { - DEBUG(10,("free_notify_data: NULL data pointer\n")); - return; - } - - DEBUG(10,("free_notify_data: number of entries in array = [%d]\n", len)); - - for (i=0; idev.handlename, 0, PRINTER_CHANGE_DELETE_PRINTER); -- cgit From c5758bb10a6a1659a972742099bd3e83e31b3ee5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Mar 2002 22:03:06 +0000 Subject: Added requested cast for splint. Jeremy. --- source/include/byteorder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/byteorder.h b/source/include/byteorder.h index fab77060be0..2cbe711a7a7 100644 --- a/source/include/byteorder.h +++ b/source/include/byteorder.h @@ -117,7 +117,7 @@ it also defines lots of intermediate macros, just ignore those :-) #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8) #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16) -#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(val)&0xFF,CVAL_NC(buf,pos+1)=(val)>>8) +#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8)) #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16)) #define SVALS(buf,pos) ((const int16)SVAL(buf,pos)) #define IVALS(buf,pos) ((const int32)IVAL(buf,pos)) -- cgit From 7c68e611a014275c9a878064f9ec04593441be54 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Mar 2002 00:44:35 +0000 Subject: Fix lseek-on-pipe problem in VFS (where it belongs IMHO). Jeremy. --- source/smbd/fileio.c | 14 +------------- source/smbd/vfs-wrap.c | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index ba60690383b..3ac6a041812 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -37,19 +37,7 @@ SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos) seek_ret = fsp->conn->vfs_ops.lseek(fsp,fsp->fd,pos+offset,SEEK_SET); - /* - * We want to maintain the fiction that we can seek - * on a fifo for file system purposes. This allows - * people to set up UNIX fifo's that feed data to Windows - * applications. JRA. - */ - - if((seek_ret == -1) && (errno == ESPIPE)) { - seek_ret = pos+offset; - errno = 0; - } - - if((seek_ret == -1) || (seek_ret != pos+offset)) { + if(seek_ret == -1) { DEBUG(0,("seek_file: sys_lseek failed. Error was %s\n", strerror(errno) )); fsp->pos = -1; return -1; diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 1fa9e72fcc3..1c1edebf503 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -226,13 +226,26 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n) SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence) { - SMB_OFF_T result; + SMB_OFF_T result; - START_PROFILE(syscall_lseek); + START_PROFILE(syscall_lseek); - result = sys_lseek(filedes, offset, whence); - END_PROFILE(syscall_lseek); - return result; + result = sys_lseek(filedes, offset, whence); + + /* + * We want to maintain the fiction that we can seek + * on a fifo for file system purposes. This allows + * people to set up UNIX fifo's that feed data to Windows + * applications. JRA. + */ + + if((result == -1) && (errno == ESPIPE)) { + result = 0; + errno = 0; + } + + END_PROFILE(syscall_lseek); + return result; } /********************************************************* -- cgit From db5c429cde1c943678a85434ce261b18110dc6f3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Mar 2002 01:01:11 +0000 Subject: This code is so obviously correct it really needs to be in 2.2.x. Jeremy. --- source/nmbd/nmbd.c | 83 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 4b624a5b2df..52f9d6d9f03 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -51,52 +51,51 @@ BOOL found_lm_clients = False; time_t StartupTime = 0; /**************************************************************************** ** - Catch a sigterm. + Handle a SIGTERM in band. **************************************************************************** */ -static void sig_term(int sig) +static void terminate(void) { - BlockSignals(True,SIGTERM); - - DEBUG(0,("Got SIGTERM: going down...\n")); - - /* Write out wins.dat file if samba is a WINS server */ - wins_write_database(False); - - /* Remove all SELF registered names. */ - release_my_names(); - - /* Announce all server entries as 0 time-to-live, 0 type. */ - announce_my_servers_removed(); + DEBUG(0,("Got SIGTERM: going down...\n")); + + /* Write out wins.dat file if samba is a WINS server */ + wins_write_database(False); - /* If there was an async dns child - kill it. */ - kill_async_dns_child(); + /* Remove all SELF registered names. */ + release_my_names(); - exit(0); + /* Announce all server entries as 0 time-to-live, 0 type. */ + announce_my_servers_removed(); -} /* sig_term */ + /* If there was an async dns child - kill it. */ + kill_async_dns_child(); + + exit(0); +} /**************************************************************************** ** - Catch a sighup. + Catch a SIGTERM signal. **************************************************************************** */ -static VOLATILE sig_atomic_t reload_after_sighup = False; +static VOLATILE sig_atomic_t got_sig_term; -static void sig_hup(int sig) +static void sig_term(int sig) { - BlockSignals( True, SIGHUP ); - - DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) ); - - write_browse_list( 0, True ); - - dump_all_namelists(); + got_sig_term = 1; + sys_select_signal(); +} - reload_after_sighup = True; +/**************************************************************************** ** + Catch a SIGHUP signal. + **************************************************************************** */ - BlockSignals(False,SIGHUP); +static VOLATILE sig_atomic_t reload_after_sighup; -} /* sig_hup */ +static void sig_hup(int sig) +{ + reload_after_sighup = 1; + sys_select_signal(); +} #if DUMP_CORE /**************************************************************************** ** @@ -334,6 +333,15 @@ static void process(void) if(listen_for_packets(run_election)) return; + /* + * Handle termination inband. + */ + + if (got_sig_term) { + got_sig_term = 0; + terminate(); + } + /* * Process all incoming packets * read above. This calls the success and @@ -491,11 +499,14 @@ static void process(void) */ if(reload_after_sighup) { - reload_nmbd_services( True ); - reopen_logs(); - if(reload_interfaces(0)) - return; - reload_after_sighup = False; + DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) ); + write_browse_list( 0, True ); + dump_all_namelists(); + reload_nmbd_services( True ); + reopen_logs(); + if(reload_interfaces(0)) + return; + reload_after_sighup = 0; } /* check for new network interfaces */ -- cgit From 74bc21970ed6e012d5374e7edf7edfd25d7e8f18 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Mar 2002 01:26:14 +0000 Subject: Merge in the mutex code to stop multiple domain logon failures. This code already in HEAD and app-head. Jeremy. --- source/include/proto.h | 11 ++++-- source/lib/messages.c | 97 ++++++++++++++++++++++++++++++++++++++++++-------- source/smbd/password.c | 20 ++++++++++- 3 files changed, 110 insertions(+), 18 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 4b5da7840f9..74f2906c45c 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -127,12 +127,18 @@ void mdfour(unsigned char *out, unsigned char *in, int n); void ping_message(int msg_type, pid_t src, void *buf, size_t len); void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len); BOOL message_init(void); -BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL duplicates_allowed); +BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len, + BOOL duplicates_allowed); void message_dispatch(void); void message_register(int msg_type, void (*fn)(int msg_type, pid_t pid, void *buf, size_t len)); void message_deregister(int msg_type); -BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len, BOOL duplicates_allowed); +BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, + const void *buf, size_t len, + BOOL duplicates_allowed, + int *n_sent); +BOOL message_named_mutex(char *name); +void message_named_mutex_release(char *name); /*The following definitions come from lib/ms_fnmatch.c */ @@ -2033,6 +2039,7 @@ BOOL lp_dos_filetime_resolution(int ); BOOL lp_fake_dir_create_times(int ); BOOL lp_blocking_locks(int ); BOOL lp_inherit_perms(int ); +BOOL lp_inherit_acls(int ); BOOL lp_use_client_driver(int ); BOOL lp_default_devmode(int ); BOOL lp_nt_acl_support(int ); diff --git a/source/lib/messages.c b/source/lib/messages.c index b4fd82139ea..46c2f935859 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -1,8 +1,8 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba internal messaging functions Copyright (C) Andrew Tridgell 2000 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,13 +19,22 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* this module is used for internal messaging between Samba daemons. +/** + @defgroups messages Internal messaging framework + @{ + @file messages.c + + This module is used for internal messaging between Samba daemons. The idea is that if a part of Samba wants to do communication with another Samba process then it will do a message_register() of a dispatch function, and use message_send_pid() to send messages to that process. + The dispatch function is given the pid of the sender, and it can + use that to reply by message_send_pid(). See ping_message() for a + simple example. + This system doesn't have any inherent size limitations but is not very efficient for large messages or when messages are sent in very quick succession. @@ -151,7 +160,8 @@ static BOOL message_notify(pid_t pid) Send a message to a particular pid. ****************************************************************************/ -BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL duplicates_allowed) +BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len, + BOOL duplicates_allowed) { TDB_DATA kbuf; TDB_DATA dbuf; @@ -198,7 +208,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL dupli */ if (!memcmp(ptr, &rec, sizeof(rec))) { - if (!len || (len && !memcmp( ptr + sizeof(rec), (char *)buf, len))) { + if (!len || (len && !memcmp( ptr + sizeof(rec), buf, len))) { DEBUG(10,("message_send_pid: discarding duplicate message.\n")); SAFE_FREE(dbuf.dptr); tdb_chainunlock(tdb, kbuf); @@ -303,6 +313,7 @@ void message_dispatch(void) void *buf; size_t len; struct dispatch_fns *dfn; + int n_handled; if (!received_signal) return; @@ -311,12 +322,21 @@ void message_dispatch(void) received_signal = 0; while (message_recv(&msg_type, &src, &buf, &len)) { + DEBUG(10,("message_dispatch: received msg_type=%d src_pid=%d\n", + msg_type, (int) src)); + n_handled = 0; for (dfn = dispatch_fns; dfn; dfn = dfn->next) { if (dfn->msg_type == msg_type) { DEBUG(10,("message_dispatch: processing message of type %d.\n", msg_type)); dfn->fn(msg_type, src, buf, len); + n_handled++; } } + if (!n_handled) { + DEBUG(5,("message_dispatch: warning: no handlers registed for " + "msg_type %d in pid%d\n", + msg_type, getpid())); + } SAFE_FREE(buf); } } @@ -366,9 +386,10 @@ void message_deregister(int msg_type) struct msg_all { int msg_type; - void *buf; + const void *buf; size_t len; BOOL duplicates; + int n_sent; }; /**************************************************************************** @@ -390,8 +411,9 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void /* if the msg send fails because the pid was not found (i.e. smbd died), * the msg has already been deleted from the messages.tdb.*/ - if (!message_send_pid(crec.pid, msg_all->msg_type, msg_all->buf, msg_all->len, - msg_all->duplicates)) { + if (!message_send_pid(crec.pid, msg_all->msg_type, + msg_all->buf, msg_all->len, + msg_all->duplicates)) { /* if the pid was not found delete the entry from connections.tdb */ if (errno == ESRCH) { @@ -400,16 +422,26 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void tdb_delete(the_tdb, kbuf); } } + msg_all->n_sent++; return 0; } -/**************************************************************************** - This is a useful function for sending messages to all smbd processes. - It isn't very efficient, but should be OK for the sorts of applications that - use it. When we need efficient broadcast we can add it. -****************************************************************************/ - -BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len, BOOL duplicates_allowed) +/** + * Send a message to all smbd processes. + * + * It isn't very efficient, but should be OK for the sorts of + * applications that use it. When we need efficient broadcast we can add + * it. + * + * @param n_sent Set to the number of messages sent. This should be + * equal to the number of processes, but be careful for races. + * + * @return True for success. + **/ +BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, + const void *buf, size_t len, + BOOL duplicates_allowed, + int *n_sent) { struct msg_all msg_all; @@ -417,7 +449,42 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len msg_all.buf = buf; msg_all.len = len; msg_all.duplicates = duplicates_allowed; + msg_all.n_sent = 0; tdb_traverse(conn_tdb, traverse_fn, &msg_all); + if (n_sent) + *n_sent = msg_all.n_sent; return True; } + +/** @} **/ + + +/* + lock the messaging tdb based on a string - this is used as a primitive form of mutex + between smbd instances. +*/ +BOOL message_named_mutex(char *name) +{ + TDB_DATA key; + + if (!message_init()) return False; + + key.dptr = name; + key.dsize = strlen(name)+1; + + return (tdb_chainlock(tdb, key) == 0); +} + +/* + unlock a named mutex +*/ +void message_named_mutex_release(char *name) +{ + TDB_DATA key; + + key.dptr = name; + key.dsize = strlen(name)+1; + + tdb_chainunlock(tdb, key); +} diff --git a/source/smbd/password.c b/source/smbd/password.c index 68343918579..4d751c2a419 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1235,17 +1235,28 @@ static BOOL connect_to_domain_password_server(struct cli_state *pcli, cli_shutdown(pcli); return False; } - + + /* we use a mutex to prevent two connections at once - when a NT PDC gets + two connections where one hasn't completed a negprot yet it will send a + TCP reset to the first connection (tridge) */ + + if (!message_named_mutex(server)) { + DEBUG(1,("domain mutex failed for %s\n", server)); + return False; + } + if (!cli_connect(pcli, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \ session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); + message_named_mutex_release(server); return False; } @@ -1255,6 +1266,7 @@ session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } @@ -1262,6 +1274,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n", remote_machine)); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } @@ -1273,6 +1286,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } @@ -1280,6 +1294,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n", remote_machine)); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } @@ -1287,9 +1302,12 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); + message_named_mutex_release(server); return False; } + message_named_mutex_release(server); + /* * We now have an anonymous connection to IPC$ on the domain password server. */ -- cgit From 66acd74f6923e7a84e84f523c0dafa6ad0761b5f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 3 Mar 2002 00:55:21 +0000 Subject: Fixed extra arg needed for message send all. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 2 +- source/rpc_server/srv_srvsvc_nt.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 56faae93d26..eca8ae54751 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -764,7 +764,7 @@ static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low) low, high, printer_name)); message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, - False); + False, NULL); return True; } diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 6d8d8459aae..9534d5a44db 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -1344,7 +1344,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, } /* Tell everyone we updated smb.conf. */ - message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False); + message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL); } else { DEBUG(10,("_srv_net_share_set_info: No change to share name (%s)\n", share_name )); @@ -1466,7 +1466,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET } /* Tell everyone we updated smb.conf. */ - message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False); + message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL); /* * We don't call reload_services() here, the message will @@ -1529,7 +1529,7 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET delete_share_security(snum); /* Tell everyone we updated smb.conf. */ - message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False); + message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL); lp_killservice(snum); -- cgit From c98022f5b93b6c682d858450f482556e54d38d02 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 3 Mar 2002 00:55:58 +0000 Subject: Fix for extra arg. Jeremy. --- source/printing/printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/printing/printing.c b/source/printing/printing.c index 50051c495b5..6699b703466 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -328,7 +328,7 @@ static void send_queue_message(const char *printer_name, uint32 high, uint32 low SIVAL(msg,4,high); fstrcpy(&msg[8], printer_name); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, False); + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, False, NULL); } /**************************************************************************** -- cgit From c96b8eff7b2fd6c09e17978dc417285a7d87e3c4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 3 Mar 2002 00:57:39 +0000 Subject: Fix for missing arg to message_send_all. Jeremy. --- source/utils/smbcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index f1c56040dcb..9205d82cbf1 100644 --- a/source/utils/smbcontrol.c +++ b/source/utils/smbcontrol.c @@ -139,7 +139,7 @@ static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL dupl /* "smbd" is the only broadcast operation */ if (strequal(dest,"smbd")) { - retval = message_send_all(the_tdb,msg_type, buf, len, duplicates); + retval = message_send_all(the_tdb,msg_type, buf, len, duplicates, NULL); } else if (strequal(dest,"nmbd")) { pid = pidfile_pid(dest); if (pid == 0) { -- cgit From e3966f49a3591656b179bde55e4098ff16714174 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 4 Mar 2002 17:02:31 +0000 Subject: fixed typo --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 60ec379a03e..84534311e36 100644 --- a/README +++ b/README @@ -90,7 +90,7 @@ CONTRIBUTIONS If you want to contribute to the development of the software then please join the mailing list. The Samba team accepts patches -(preferably in "diff -u" format, see docs/BUGS.txt for more details) +(preferably in "diff -u" format, see docs/textdocs/BUGS.txt for more details) and are always glad to receive feedback or suggestions to the address samba@samba.org. We have recently put a new bug tracking system into place which should help the throughput quite a lot. You -- cgit From 5e9ed5d652b4f4339252153c68c38c48c18da126 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 4 Mar 2002 22:55:53 +0000 Subject: Canonicalise pathnames returned to Windows directory separators. Found by Andrew at connectathon with some new tests Jeremy. --- source/smbd/trans2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 0f1f769d113..7593283f0f4 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1694,8 +1694,10 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * /* NT expects the name to be in an exact form */ if (strequal(fname,".")) pstrcpy(dos_fname, "\\"); - else + else { snprintf(dos_fname, sizeof(dos_fname), "\\%s", fname); + string_replace( dos_fname, '/','\\'); + } switch (info_level) { case SMB_INFO_STANDARD: -- cgit From c1709ffe90f414acf7f5e0ee5642e8da8414be3e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Mar 2002 01:17:42 +0000 Subject: More connectathon fixes. srvsvc returns WERRORs not NTSTATUS codes. Added aDIR mask for setfileinfo. Jeremy. --- source/include/doserr.h | 1 + source/include/proto.h | 37 +++---- source/include/rpc_srvsvc.h | 30 ++--- source/libsmb/cli_srvsvc.c | 2 +- source/rpc_parse/parse_srv.c | 71 ++++++------ source/rpc_server/srv_srvsvc_nt.c | 226 +++++++++++++++++++------------------- source/smbd/dosmode.c | 2 + source/smbd/reply.c | 3 + source/smbd/trans2.c | 5 + 9 files changed, 192 insertions(+), 185 deletions(-) diff --git a/source/include/doserr.h b/source/include/doserr.h index a2c53791cc8..6861b1f5ba4 100644 --- a/source/include/doserr.h +++ b/source/include/doserr.h @@ -162,6 +162,7 @@ #define WERR_NOMEM W_ERROR(8) #define WERR_INVALID_NAME W_ERROR(123) #define WERR_UNKNOWN_LEVEL W_ERROR(124) +#define WERR_OBJECT_PATH_INVALID W_ERROR(161) #define WERR_NO_MORE_ITEMS W_ERROR(259) #define WERR_MORE_DATA W_ERROR(234) #define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797) diff --git a/source/include/proto.h b/source/include/proto.h index 74f2906c45c..81280da6ae0 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2039,7 +2039,6 @@ BOOL lp_dos_filetime_resolution(int ); BOOL lp_fake_dir_create_times(int ); BOOL lp_blocking_locks(int ); BOOL lp_inherit_perms(int ); -BOOL lp_inherit_acls(int ); BOOL lp_use_client_driver(int ); BOOL lp_default_devmode(int ); BOOL lp_nt_acl_support(int ); @@ -3799,9 +3798,9 @@ void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv, char *server_name, uint32 switch_value); BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth); void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, - uint32 switch_value, SRV_INFO_CTR *ctr, NTSTATUS status); + uint32 switch_value, SRV_INFO_CTR *ctr, WERROR status); void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv, - uint32 switch_value, NTSTATUS status); + uint32 switch_value, WERROR status); BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, prs_struct *ps, int depth); BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth); @@ -4054,24 +4053,24 @@ BOOL api_srvsvc_rpc(pipes_struct *p); BOOL share_info_db_init(void); void map_generic_share_sd_bits(SEC_DESC *psd); BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 desired_access); -NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u); -NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u); -NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u); -NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u); -NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u); -NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); -NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); -NTSTATUS _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u); -NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u); -NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u); -NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u); -NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u); -NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u, +WERROR _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u); +WERROR _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u); +WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u); +WERROR _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u); +WERROR _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u); +WERROR _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); +WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); +WERROR _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u); +WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u); +WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u); +WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u); +WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u); +WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u, SRV_R_NET_FILE_QUERY_SECDESC *r_u); -NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u, +WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u, SRV_R_NET_FILE_SET_SECDESC *r_u); -NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u); -NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u); +WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u); +WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u); /*The following definitions come from rpc_server/srv_util.c */ diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h index 651c0b97673..c5117632329 100644 --- a/source/include/rpc_srvsvc.h +++ b/source/include/rpc_srvsvc.h @@ -67,7 +67,7 @@ typedef struct net_srv_disk_enum { uint32 preferred_len; /* preferred maximum length (0xffff ffff) */ uint32 total_entries; /* total number of entries */ ENUM_HND enum_hnd; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM; typedef struct net_name_validate { @@ -76,7 +76,7 @@ typedef struct net_name_validate { UNISTR2 uni_name; /*name to validate*/ uint32 type; uint32 flags; - NTSTATUS status; + WERROR status; } SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE; /* SESS_INFO_0 (pointers to level 0 session info strings) */ @@ -185,7 +185,7 @@ typedef struct r_net_sess_enum_info uint32 total_entries; /* total number of entries */ ENUM_HND enum_hnd; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SESS_ENUM; @@ -288,7 +288,7 @@ typedef struct r_net_conn_enum_info uint32 total_entries; /* total number of entries */ ENUM_HND enum_hnd; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_CONN_ENUM; @@ -444,7 +444,7 @@ typedef struct r_net_share_enum_info uint32 total_entries; /* total number of entries */ ENUM_HND enum_hnd; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SHARE_ENUM; @@ -480,7 +480,7 @@ typedef struct srv_share_info { typedef struct r_net_share_get_info_info { SRV_SHARE_INFO info; - NTSTATUS status; + WERROR status; } SRV_R_NET_SHARE_GET_INFO; @@ -502,7 +502,7 @@ typedef struct r_net_share_set_info { uint32 switch_value; /* switch value */ - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SHARE_SET_INFO; @@ -523,7 +523,7 @@ typedef struct r_net_share_add { uint32 switch_value; /* switch value */ - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SHARE_ADD; @@ -539,7 +539,7 @@ typedef struct q_net_share_del /* SRV_R_NET_SHARE_DEL */ typedef struct r_net_share_del { - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SHARE_DEL; @@ -622,7 +622,7 @@ typedef struct r_net_file_enum_info uint32 total_entries; /* total number of files */ ENUM_HND enum_hnd; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_FILE_ENUM; @@ -704,7 +704,7 @@ typedef struct r_net_srv_get_info { SRV_INFO_CTR *ctr; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SRV_GET_INFO; @@ -725,7 +725,7 @@ typedef struct r_net_srv_set_info { uint32 switch_value; /* switch value */ - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_SRV_SET_INFO; @@ -761,7 +761,7 @@ typedef struct r_net_remote_tod uint32 ptr_srv_tod; /* pointer to TOD */ TIME_OF_DAY_INFO *tod; - NTSTATUS status; /* return status */ + WERROR status; /* return status */ } SRV_R_NET_REMOTE_TOD; @@ -786,7 +786,7 @@ typedef struct r_net_file_query_secdesc uint32 ptr_secdesc; uint32 size_secdesc; SEC_DESC *sec_desc; - NTSTATUS status; + WERROR status; } SRV_R_NET_FILE_QUERY_SECDESC; /* SRV_Q_NET_FILE_SET_SECDESC */ @@ -807,6 +807,6 @@ typedef struct q_net_file_set_secdesc /* SRV_R_NET_FILE_SET_SECDESC */ typedef struct r_net_file_set_secdesc { - NTSTATUS status; + WERROR status; } SRV_R_NET_FILE_SET_SECDESC; #endif /* _RPC_SRVSVC_H */ diff --git a/source/libsmb/cli_srvsvc.c b/source/libsmb/cli_srvsvc.c index c9bd4643622..7d161292bee 100644 --- a/source/libsmb/cli_srvsvc.c +++ b/source/libsmb/cli_srvsvc.c @@ -70,7 +70,7 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, goto done; } - result = r.status; + result = dos_to_ntstatus(ERRDOS, W_ERROR_V(r.status)); done: prs_mem_free(&qbuf); diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c index fa52b244956..2e593890126 100644 --- a/source/rpc_parse/parse_srv.c +++ b/source/rpc_parse/parse_srv.c @@ -119,33 +119,34 @@ void init_srv_share_info2_str(SH_INFO_2_STR *sh2, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2_STR *sh2, prs_struct *ps, int depth) +static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth) { if (sh2 == NULL) return False; + if (UNMARSHALLING(ps)) + ZERO_STRUCTP(sh2); + prs_debug(ps, depth, desc, "srv_io_share_info2_str"); depth++; if(!prs_align(ps)) return False; - if(!smb_io_unistr2("", &sh2->uni_netname, True, ps, depth)) - return False; + if (sh->ptr_netname) + if(!smb_io_unistr2("", &sh2->uni_netname, True, ps, depth)) + return False; - if(!prs_align(ps)) - return False; - if(!smb_io_unistr2("", &sh2->uni_remark, True, ps, depth)) - return False; + if (sh->ptr_remark) + if(!smb_io_unistr2("", &sh2->uni_remark, True, ps, depth)) + return False; - if(!prs_align(ps)) - return False; - if(!smb_io_unistr2("", &sh2->uni_path, True, ps, depth)) - return False; + if (sh->ptr_netname) + if(!smb_io_unistr2("", &sh2->uni_path, True, ps, depth)) + return False; - if(!prs_align(ps)) - return False; - if(!smb_io_unistr2("", &sh2->uni_passwd, True, ps, depth)) - return False; + if (sh->ptr_passwd) + if(!smb_io_unistr2("", &sh2->uni_passwd, True, ps, depth)) + return False; return True; } @@ -495,7 +496,7 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct } for (i = 0; i < num_entries; i++) { - if(!srv_io_share_info2_str("", &info2[i].info_2_str, ps, depth)) + if(!srv_io_share_info2_str("", &info2[i].info_2, &info2[i].info_2_str, ps, depth)) return False; } @@ -614,7 +615,7 @@ BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct * return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -687,7 +688,7 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA if(!srv_io_share_info2("", &r_n->share.info2.info_2, ps, depth)) return False; - if(!srv_io_share_info2_str("", &r_n->share.info2.info_2_str, ps, depth)) + if(!srv_io_share_info2_str("", &r_n->share.info2.info_2, &r_n->share.info2.info_2_str, ps, depth)) return False; break; @@ -739,7 +740,7 @@ BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_ if(!prs_align(ps)) return False; - if(!prs_ntstatus("status", ps, depth, &r_n->status)) + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; @@ -800,7 +801,7 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_ if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) return False; - if(!prs_ntstatus("status ", ps, depth, &q_n->status)) + if(!prs_werror("status ", ps, depth, &q_n->status)) return False; return True; @@ -858,7 +859,7 @@ BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) return False; - if(!prs_ntstatus("status ", ps, depth, &q_n->status)) + if(!prs_werror("status ", ps, depth, &q_n->status)) return False; return True; @@ -905,7 +906,7 @@ BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps if(!prs_align(ps)) return False; - if(!prs_ntstatus("status ", ps, depth, &q_n->status)) + if(!prs_werror("status ", ps, depth, &q_n->status)) return False; return True; @@ -1308,7 +1309,7 @@ BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -1673,7 +1674,7 @@ BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *p return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -1951,7 +1952,7 @@ BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -2237,13 +2238,13 @@ BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_stru ********************************************************************/ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, - uint32 switch_value, SRV_INFO_CTR *ctr, NTSTATUS status) + uint32 switch_value, SRV_INFO_CTR *ctr, WERROR status) { DEBUG(5,("init_srv_r_net_srv_get_info\n")); srv->ctr = ctr; - if (NT_STATUS_IS_OK(status)) { + if (W_ERROR_IS_OK(status)) { srv->ctr->switch_value = switch_value; srv->ctr->ptr_srv_ctr = 1; } else { @@ -2259,7 +2260,7 @@ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, ********************************************************************/ void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv, - uint32 switch_value, NTSTATUS status) + uint32 switch_value, WERROR status) { DEBUG(5,("init_srv_r_net_srv_set_info\n")); @@ -2323,7 +2324,7 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru if(!srv_io_info_ctr("ctr", r_n->ctr, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -2345,7 +2346,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, if(!prs_uint32("switch_value ", ps, depth, &r_n->switch_value)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -2464,7 +2465,7 @@ BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct * if(!srv_io_time_of_day_info("tod", r_n->tod, ps, depth)) return False; - if(!prs_ntstatus("status ", ps, depth, &r_n->status)) + if(!prs_werror("status ", ps, depth, &r_n->status)) return False; return True; @@ -2563,7 +2564,7 @@ BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_ntstatus("status", ps, depth, &r_n->status)) + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; @@ -2623,7 +2624,7 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st if(!prs_align(ps)) return False; - if(!prs_ntstatus("status", ps, depth, &r_n->status)) + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; @@ -2710,7 +2711,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r if(!prs_align(ps)) return False; - if(!prs_ntstatus("status", ps, depth, &r_n->status)) + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; @@ -2788,7 +2789,7 @@ BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, if(!prs_align(ps)) return False; - if(!prs_ntstatus("status", ps, depth, &r_n->status)) + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 9534d5a44db..acf137b130b 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -174,8 +174,8 @@ static SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, int snum, size_t * se_map_generic(&def_access, &file_generic_mapping); - init_sec_access(&sa, GENERIC_ALL_ACCESS | def_access ); - init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0); + init_sec_access(&sa, GENERIC_ALL_ACCESS | def_access ); + init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0); if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, 1, &ace)) != NULL) { psd = make_sec_desc(ctx, SEC_DESC_REVISION, NULL, NULL, NULL, psa, psize); @@ -205,13 +205,13 @@ static SEC_DESC *get_share_security( TALLOC_CTX *ctx, int snum, size_t *psize) slprintf(key, sizeof(key)-1, "SECDESC/%s", lp_servicename(snum)); - if (tdb_prs_fetch(share_tdb, key, &ps, ctx)!=0 || - !sec_io_desc("get_share_security", &psd, &ps, 1)) { + if (tdb_prs_fetch(share_tdb, key, &ps, ctx)!=0 || + !sec_io_desc("get_share_security", &psd, &ps, 1)) { - DEBUG(4,("get_share_security: using default secdesc for %s\n", lp_servicename(snum) )); + DEBUG(4,("get_share_security: using default secdesc for %s\n", lp_servicename(snum) )); - return get_share_security_default(ctx, snum, psize); - } + return get_share_security_default(ctx, snum, psize); + } if (psd) *psize = sec_desc_size(psd); @@ -237,27 +237,26 @@ static BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC prs_init(&ps, (uint32)sec_desc_size(psd), mem_ctx, MARSHALL); - if (!sec_io_desc("share_security", &psd, &ps, 1)) { - goto out; - } + if (!sec_io_desc("share_security", &psd, &ps, 1)) + goto out; slprintf(key, sizeof(key)-1, "SECDESC/%s", share_name); - if (tdb_prs_store(share_tdb, key, &ps)==0) { - ret = True; - DEBUG(5,("set_share_security: stored secdesc for %s\n", share_name )); - } else { - DEBUG(1,("set_share_security: Failed to store secdesc for %s\n", share_name )); - } - - /* Free malloc'ed memory */ + if (tdb_prs_store(share_tdb, key, &ps)==0) { + ret = True; + DEBUG(5,("set_share_security: stored secdesc for %s\n", share_name )); + } else { + DEBUG(1,("set_share_security: Failed to store secdesc for %s\n", share_name )); + } + + /* Free malloc'ed memory */ out: - prs_mem_free(&ps); - if (mem_ctx) - talloc_destroy(mem_ctx); - return ret; + prs_mem_free(&ps); + if (mem_ctx) + talloc_destroy(mem_ctx); + return ret; } /******************************************************************* @@ -527,9 +526,9 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n if (init_srv_share_info_ctr(p, &r_n->ctr, info_level, &resume_hnd, &r_n->total_entries, all)) { - r_n->status = NT_STATUS_OK; + r_n->status = WERR_OK; } else { - r_n->status = NT_STATUS_INVALID_INFO_CLASS; + r_n->status = WERR_UNKNOWN_LEVEL; } init_enum_hnd(&r_n->enum_hnd, resume_hnd); @@ -542,7 +541,7 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_INFO *r_n, char *share_name, uint32 info_level) { - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; int snum; DEBUG(5,("init_srv_r_net_share_get_info: %d\n", __LINE__)); @@ -567,14 +566,14 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I break; default: DEBUG(5,("init_srv_net_share_get_info: unsupported switch value %d\n", info_level)); - status = NT_STATUS_INVALID_INFO_CLASS; + status = WERR_UNKNOWN_LEVEL; break; } } else { - status = NT_STATUS_BAD_NETWORK_NAME; + status = WERR_INVALID_NAME; } - r_n->info.ptr_share_ctr = NT_STATUS_IS_OK(status) ? 1 : 0; + r_n->info.ptr_share_ctr = W_ERROR_IS_OK(status) ? 1 : 0; r_n->status = status; } @@ -691,10 +690,10 @@ static void init_srv_sess_info_1(SRV_SESS_INFO_1 *ss1, uint32 *snum, uint32 *sto makes a SRV_R_NET_SESS_ENUM structure. ********************************************************************/ -static NTSTATUS init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr, +static WERROR init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr, int switch_value, uint32 *resume_hnd, uint32 *total_entries) { - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; DEBUG(5,("init_srv_sess_info_ctr: %d\n", __LINE__)); ctr->switch_value = switch_value; @@ -713,7 +712,7 @@ static NTSTATUS init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr, (*resume_hnd) = 0; (*total_entries) = 0; ctr->ptr_sess_ctr = 0; - status = NT_STATUS_INVALID_INFO_CLASS; + status = WERR_UNKNOWN_LEVEL; break; } @@ -732,11 +731,11 @@ static void init_srv_r_net_sess_enum(SRV_R_NET_SESS_ENUM *r_n, r_n->sess_level = sess_level; if (sess_level == -1) - r_n->status = NT_STATUS_INVALID_INFO_CLASS; + r_n->status = WERR_UNKNOWN_LEVEL; else r_n->status = init_srv_sess_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries); - if (NT_STATUS_IS_ERR(r_n->status)) + if (!W_ERROR_IS_OK(r_n->status)) resume_hnd = 0; init_enum_hnd(&r_n->enum_hnd, resume_hnd); @@ -847,10 +846,10 @@ static void init_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *sto makes a SRV_R_NET_CONN_ENUM structure. ********************************************************************/ -static NTSTATUS init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr, +static WERROR init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr, int switch_value, uint32 *resume_hnd, uint32 *total_entries) { - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; DEBUG(5,("init_srv_conn_info_ctr: %d\n", __LINE__)); ctr->switch_value = switch_value; @@ -869,7 +868,7 @@ static NTSTATUS init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr, (*resume_hnd = 0); (*total_entries) = 0; ctr->ptr_conn_ctr = 0; - status = NT_STATUS_INVALID_INFO_CLASS; + status = WERR_UNKNOWN_LEVEL; break; } @@ -887,11 +886,11 @@ static void init_srv_r_net_conn_enum(SRV_R_NET_CONN_ENUM *r_n, r_n->conn_level = conn_level; if (conn_level == -1) - r_n->status = NT_STATUS_INVALID_INFO_CLASS; + r_n->status = WERR_UNKNOWN_LEVEL; else r_n->status = init_srv_conn_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries); - if (NT_STATUS_IS_ERR(r_n->status)) + if (!W_ERROR_IS_OK(r_n->status)) resume_hnd = 0; init_enum_hnd(&r_n->enum_hnd, resume_hnd); @@ -947,10 +946,10 @@ static void init_srv_file_info_3(SRV_FILE_INFO_3 *fl3, uint32 *fnum, uint32 *fto makes a SRV_R_NET_FILE_ENUM structure. ********************************************************************/ -static NTSTATUS init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr, +static WERROR init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr, int switch_value, uint32 *resume_hnd, uint32 *total_entries) { - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; DEBUG(5,("init_srv_file_info_ctr: %d\n", __LINE__)); ctr->switch_value = switch_value; @@ -965,7 +964,7 @@ static NTSTATUS init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr, (*resume_hnd = 0); (*total_entries) = 0; ctr->ptr_file_ctr = 0; - status = NT_STATUS_INVALID_INFO_CLASS; + status = WERR_UNKNOWN_LEVEL; break; } @@ -983,11 +982,11 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n, r_n->file_level = file_level; if (file_level == 0) - r_n->status = NT_STATUS_INVALID_INFO_CLASS; + r_n->status = WERR_UNKNOWN_LEVEL; else r_n->status = init_srv_file_info_ctr(r_n->ctr, switch_value, &resume_hnd, &(r_n->total_entries)); - if (NT_STATUS_IS_ERR(r_n->status)) + if (!W_ERROR_IS_OK(r_n->status)) resume_hnd = 0; init_enum_hnd(&r_n->enum_hnd, resume_hnd); @@ -997,13 +996,13 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n, net server get info ********************************************************************/ -NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u) +WERROR _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u) { - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; SRV_INFO_CTR *ctr = (SRV_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_INFO_CTR)); if (!ctr) - return NT_STATUS_NO_MEMORY; + return WERR_NOMEM; ZERO_STRUCTP(ctr); @@ -1035,7 +1034,7 @@ NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV init_srv_info_100(&ctr->srv.sv100, 500, global_myname); break; default: - status = NT_STATUS_INVALID_INFO_CLASS; + status = WERR_UNKNOWN_LEVEL; break; } @@ -1051,12 +1050,9 @@ NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV net server set info ********************************************************************/ -NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u) +WERROR _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u) { - /* NT gives "Windows NT error 0xc00000022" if we return - NT_STATUS_ACCESS_DENIED here so just pretend everything is OK. */ - - NTSTATUS status = NT_STATUS_OK; + WERROR status = WERR_OK; DEBUG(5,("srv_net_srv_set_info: %d\n", __LINE__)); @@ -1073,11 +1069,11 @@ NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV net file enum ********************************************************************/ -NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u) +WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u) { r_u->ctr = (SRV_FILE_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_FILE_INFO_CTR)); if (!r_u->ctr) - return NT_STATUS_NO_MEMORY; + return WERR_NOMEM; ZERO_STRUCTP(r_u->ctr); @@ -1098,13 +1094,13 @@ NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET net conn enum ********************************************************************/ -NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u) +WERROR _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u) { DEBUG(5,("srv_net_conn_enum: %d\n", __LINE__)); r_u->ctr = (SRV_CONN_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_CONN_INFO_CTR)); if (!r_u->ctr) - return NT_STATUS_NO_MEMORY; + return WERR_NOMEM; ZERO_STRUCTP(r_u->ctr); @@ -1123,13 +1119,13 @@ NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET net sess enum ********************************************************************/ -NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u) +WERROR _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u) { DEBUG(5,("_srv_net_sess_enum: %d\n", __LINE__)); r_u->ctr = (SRV_SESS_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_SESS_INFO_CTR)); if (!r_u->ctr) - return NT_STATUS_NO_MEMORY; + return WERR_NOMEM; ZERO_STRUCTP(r_u->ctr); @@ -1148,7 +1144,7 @@ NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET Net share enum all. ********************************************************************/ -NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u) +WERROR _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u) { DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__)); @@ -1166,7 +1162,7 @@ NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV Net share enum. ********************************************************************/ -NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u) +WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u) { DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__)); @@ -1184,7 +1180,7 @@ NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_N Net share get info. ********************************************************************/ -NTSTATUS _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u) +WERROR _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u) { fstring share_name; @@ -1244,7 +1240,7 @@ static char *valid_share_pathname(char *dos_pathname) Net share set info. Modify share details. ********************************************************************/ -NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u) +WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u) { struct current_user user; pstring command; @@ -1264,27 +1260,27 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, r_u->switch_value = 0; if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global")) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; snum = find_service(share_name); /* Does this share exist ? */ if (snum < 0) - return NT_STATUS_BAD_NETWORK_NAME; + return WERR_INVALID_NAME; /* No change to printer shares. */ if (lp_print_ok(snum)) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; get_current_user(&user,p); if (user.uid != 0) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; switch (q_u->info_level) { case 1: /* Not enough info in a level 1 to do anything. */ - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; case 2: unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name)); unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name)); @@ -1299,7 +1295,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, map_generic_share_sd_bits(psd); break; case 1005: - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; case 1501: fstrcpy(pathname, lp_pathname(snum)); fstrcpy(comment, lp_comment(snum)); @@ -1309,16 +1305,16 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, break; default: DEBUG(5,("_srv_net_share_set_info: unsupported switch value %d\n", q_u->info_level)); - return NT_STATUS_INVALID_INFO_CLASS; + return WERR_UNKNOWN_LEVEL; } /* We can only modify disk shares. */ if (type != STYPE_DISKTREE) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; /* Check if the pathname is valid. */ if (!(ptr = valid_share_pathname( pathname ))) - return NT_STATUS_OBJECT_PATH_INVALID; + return WERR_OBJECT_PATH_INVALID; /* Ensure share name, pathname and comment don't contain '"' characters. */ string_replace(share_name, '"', ' '); @@ -1332,7 +1328,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, if (strcmp(ptr, lp_pathname(snum)) || strcmp(comment, lp_comment(snum)) ) { if (!lp_change_share_cmd() || !*lp_change_share_cmd()) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"", lp_change_share_cmd(), CONFIGFILE, share_name, ptr, comment); @@ -1340,7 +1336,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command )); if ((ret = smbrun(command, NULL)) != 0) { DEBUG(0,("_srv_net_share_set_info: Running [%s] returned (%d)\n", command, ret )); - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; } /* Tell everyone we updated smb.conf. */ @@ -1366,14 +1362,14 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__)); - return NT_STATUS_OK; + return WERR_OK; } /******************************************************************* Net share add. Call 'add_share_command "sharename" "pathname" "comment" "read only = xxx"' ********************************************************************/ -NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u) +WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u) { struct current_user user; pstring command; @@ -1394,18 +1390,18 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET if (user.uid != 0) { DEBUG(10,("_srv_net_share_add: uid != 0. Access denied.\n")); - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; } if (!lp_add_share_cmd() || !*lp_add_share_cmd()) { DEBUG(10,("_srv_net_share_add: No add share command\n")); - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; } switch (q_u->info_level) { case 1: /* Not enough info in a level 1 to do anything. */ - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; case 2: unistr2_to_ascii(share_name, &q_u->info.share.info2.info_2_str.uni_netname, sizeof(share_name)); unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name)); @@ -1422,28 +1418,28 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET break; case 1005: /* DFS only level. */ - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; default: DEBUG(5,("_srv_net_share_add: unsupported switch value %d\n", q_u->info_level)); - return NT_STATUS_INVALID_INFO_CLASS; + return WERR_UNKNOWN_LEVEL; } if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global")) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; snum = find_service(share_name); /* Share already exists. */ if (snum >= 0) - return NT_STATUS_OBJECT_NAME_COLLISION; + return WERR_ALREADY_EXISTS; /* We can only add disk shares. */ if (type != STYPE_DISKTREE) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; /* Check if the pathname is valid. */ if (!(ptr = valid_share_pathname( pathname ))) - return NT_STATUS_OBJECT_PATH_INVALID; + return WERR_OBJECT_PATH_INVALID; /* Ensure share name, pathname and comment don't contain '"' characters. */ string_replace(share_name, '"', ' '); @@ -1456,7 +1452,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET DEBUG(10,("_srv_net_share_add: Running [%s]\n", command )); if ((ret = smbrun(command, NULL)) != 0) { DEBUG(0,("_srv_net_share_add: Running [%s] returned (%d)\n", command, ret )); - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; } if (psd) { @@ -1476,7 +1472,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET DEBUG(5,("_srv_net_share_add: %d\n", __LINE__)); - return NT_STATUS_OK; + return WERR_OK; } /******************************************************************* @@ -1484,7 +1480,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET a parameter. ********************************************************************/ -NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u) +WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u) { struct current_user user; pstring command; @@ -1497,24 +1493,24 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET unistr2_to_ascii(share_name, &q_u->uni_share_name, sizeof(share_name)); if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global")) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; snum = find_service(share_name); if (snum < 0) - return NT_STATUS_BAD_NETWORK_NAME; + return WERR_NO_SUCH_SHARE; /* No change to printer shares. */ if (lp_print_ok(snum)) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; get_current_user(&user,p); if (user.uid != 0) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; if (!lp_delete_share_cmd() || !*lp_delete_share_cmd()) - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\"", lp_delete_share_cmd(), CONFIGFILE, lp_servicename(snum)); @@ -1522,7 +1518,7 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET DEBUG(10,("_srv_net_share_del: Running [%s]\n", command )); if ((ret = smbrun(command, NULL)) != 0) { DEBUG(0,("_srv_net_share_del: Running [%s] returned (%d)\n", command, ret )); - return NT_STATUS_ACCESS_DENIED; + return WERR_ACCESS_DENIED; } /* Delete the SD in the database. */ @@ -1533,14 +1529,14 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET lp_killservice(snum); - return NT_STATUS_OK; + return WERR_OK; } /******************************************************************* time of day ********************************************************************/ -NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u) +WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u) { TIME_OF_DAY_INFO *tod; struct tm *t; @@ -1548,13 +1544,13 @@ NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_N tod = (TIME_OF_DAY_INFO *)talloc(p->mem_ctx, sizeof(TIME_OF_DAY_INFO)); if (!tod) - return NT_STATUS_NO_MEMORY; + return WERR_NOMEM; ZERO_STRUCTP(tod); r_u->tod = tod; r_u->ptr_srv_tod = 0x1; - r_u->status = NT_STATUS_OK; + r_u->status = WERR_OK; DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__)); @@ -1584,7 +1580,7 @@ NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_N Win9x NT tools get security descriptor. ***********************************************************************************/ -NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u, +WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u, SRV_R_NET_FILE_QUERY_SECDESC *r_u) { SEC_DESC *psd = NULL; @@ -1605,7 +1601,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE ZERO_STRUCT(st); - r_u->status = NT_STATUS_OK; + r_u->status = WERR_OK; unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname)); @@ -1621,13 +1617,13 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE if (conn == NULL) { DEBUG(3,("_srv_net_file_query_secdesc: Unable to connect to %s\n", qualname)); - r_u->status = NT_STATUS(ecode); + r_u->status = W_ERROR(ecode); goto error_exit; } if (!become_user(conn, conn->vuid)) { DEBUG(0,("_srv_net_file_query_secdesc: Can't become connected user!\n")); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } became_user = True; @@ -1645,7 +1641,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE if (!fsp) { DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename)); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } } @@ -1654,7 +1650,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE if (sd_size == 0) { DEBUG(3,("_srv_net_file_query_secdesc: Unable to get NT ACL for file %s\n", filename)); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } @@ -1690,7 +1686,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE Win9x NT tools set security descriptor. ***********************************************************************************/ -NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u, +WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u, SRV_R_NET_FILE_SET_SECDESC *r_u) { BOOL ret; @@ -1710,7 +1706,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC * ZERO_STRUCT(st); - r_u->status = NT_STATUS_OK; + r_u->status = WERR_OK; unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname)); @@ -1726,13 +1722,13 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC * if (conn == NULL) { DEBUG(3,("_srv_net_file_set_secdesc: Unable to connect to %s\n", qualname)); - r_u->status = NT_STATUS(ecode); + r_u->status = W_ERROR(ecode); goto error_exit; } if (!become_user(conn, conn->vuid)) { DEBUG(0,("_srv_net_file_set_secdesc: Can't become connected user!\n")); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } became_user = True; @@ -1751,7 +1747,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC * if (!fsp) { DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n", filename)); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } } @@ -1760,7 +1756,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC * if (ret == False) { DEBUG(3,("_srv_net_file_set_secdesc: Unable to set NT ACL on file %s\n", filename)); - r_u->status = NT_STATUS_ACCESS_DENIED; + r_u->status = WERR_ACCESS_DENIED; goto error_exit; } @@ -1830,13 +1826,13 @@ static const char *next_server_disk_enum(uint32 *resume) return disk; } -NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u) +WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u) { uint32 i; const char *disk_name; uint32 resume=get_enum_hnd(&q_u->enum_hnd); - r_u->status=NT_STATUS_OK; + r_u->status=WERR_OK; r_u->total_entries = init_server_disk_enum(&resume); @@ -1866,12 +1862,12 @@ NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET return r_u->status; } -NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u) +WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u) { int snum; fstring share_name; - r_u->status=NT_STATUS_OK; + r_u->status=WERR_OK; switch(q_u->type) { @@ -1885,12 +1881,12 @@ NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, S /* Share already exists. */ if (snum >= 0) - r_u->status = NT_STATUS_OBJECT_NAME_INVALID; + r_u->status = WERR_ALREADY_EXISTS; break; default: /*unsupported type*/ - r_u->status = NT_STATUS_INVALID_LEVEL; + r_u->status = WERR_UNKNOWN_LEVEL; break; } diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c index d7b40198771..bd6744a272c 100644 --- a/source/smbd/dosmode.c +++ b/source/smbd/dosmode.c @@ -196,6 +196,8 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT * if (S_ISDIR(st->st_mode)) dosmode |= aDIR; + else + dosmode &= ~aDIR; if (dos_mode(conn,fname,st) == dosmode) return(0); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index adddf7e4f82..7fac12de29d 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1247,6 +1247,9 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (VALID_STAT_OF_DIR(sbuf)) mode |= aDIR; + else + mode &= ~aDIR; + if (check_name(fname,conn)) ok = (file_chmod(conn,fname,mode,NULL) == 0); if (ok) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 7593283f0f4..96239e5eabf 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2742,6 +2742,11 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", DEBUG(6,("actime: %s " , ctime(&tvs.actime))); DEBUG(6,("modtime: %s ", ctime(&tvs.modtime))); DEBUG(6,("size: %.0f ", (double)size)); + if (S_ISDIR(sbuf.st_mode)) + dosmode |= aDIR; + else + dosmode &= ~aDIR; + DEBUG(6,("dosmode: %x\n" , dosmode)); if(!((info_level == SMB_SET_FILE_END_OF_FILE_INFO) || -- cgit From 05db3d34a3428917010a8d85a44a1770573ebfc2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Mar 2002 02:50:19 +0000 Subject: Add missing error codes. Tify up libsmb error return. Jeremy. --- source/include/doserr.h | 1 + source/libsmb/cli_srvsvc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/include/doserr.h b/source/include/doserr.h index 6861b1f5ba4..498c3a5d2b1 100644 --- a/source/include/doserr.h +++ b/source/include/doserr.h @@ -170,6 +170,7 @@ #define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802) #define WERR_INVALID_DATATYPE W_ERROR(1804) #define WERR_INVALID_ENVIRONMENT W_ERROR(1805) +#define WERR_INVALID_FORM_SIZE W_ERROR(1903) #define WERR_BUF_TOO_SMALL W_ERROR(2123) #define WERR_JOB_NOT_FOUND W_ERROR(2151) #define WERR_DEST_NOT_FOUND W_ERROR(2152) diff --git a/source/libsmb/cli_srvsvc.c b/source/libsmb/cli_srvsvc.c index 7d161292bee..17393c35460 100644 --- a/source/libsmb/cli_srvsvc.c +++ b/source/libsmb/cli_srvsvc.c @@ -70,7 +70,7 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, goto done; } - result = dos_to_ntstatus(ERRDOS, W_ERROR_V(r.status)); + result = werror_to_ntstatus(r.status); done: prs_mem_free(&qbuf); -- cgit From 7f82fe83abf09ceb78227e92136ffe176ac8bf74 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Mar 2002 20:57:36 +0000 Subject: Ignore 0/0 lock (don't error out). Jeremy. --- source/locking/brlock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/locking/brlock.c b/source/locking/brlock.c index cbf98c46a5e..c48c626266e 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -292,10 +292,8 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum, dbuf.dptr = NULL; #if !ZERO_ZERO - if (start == 0 && size == 0) { + if (start == 0 && size == 0) DEBUG(0,("client sent 0/0 lock - please report this\n")); - return NT_STATUS_INVALID_PARAMETER; - } #endif tdb_chainlock(tdb, kbuf); -- cgit From b220eb39cedf6e1ceaca178299418a340b7bab19 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Mar 2002 21:31:37 +0000 Subject: Fix -d option being overridden with log level parameter. Jeremy. --- source/smbd/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/smbd/server.c b/source/smbd/server.c index b3b428a9b42..73709c408f6 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -555,6 +555,7 @@ static void usage(char *pname) int main(int argc,char *argv[]) { extern BOOL append_log; + extern BOOL AllowDebugChange; /* shall I run as a daemon */ BOOL is_daemon = False; BOOL interactive = False; @@ -611,6 +612,7 @@ static void usage(char *pname) DEBUGLEVEL = 10000; else DEBUGLEVEL = atoi(optarg); + AllowDebugChange = False; break; case 'p': -- cgit From 43feb070c4d6378496ac4717d5d09426578783c0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 5 Mar 2002 22:57:47 +0000 Subject: move data format from individual entries to a statically sized structure for srv_spoolss_sendnotify(). This will make it easier to add information to specify changed values. I'll merge this into HEAD a little later. Not quite done. --- source/include/rpc_spoolss.h | 30 ++++++ source/rpc_server/srv_spoolss_nt.c | 199 +++++++++++++++++++++++-------------- 2 files changed, 156 insertions(+), 73 deletions(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 17bc651f566..bcbd4ed2aed 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -316,6 +316,36 @@ #define PRINTER_NOTIFY_INFO_DISCARDED 0x1 +/* + * Set of macros for flagging what changed in the PRINTER_INFO_2 struct + * when sending messages to other smbd's + */ +#define PRINTER_MESSAGE_DRIVER 0x00000001 +#define PRINTER_MESSAGE_COMMENT 0x00000002 +#define PRINTER_MESSAGE_PRINTERNAME 0x00000004 +#define PRINTER_MESSAGE_LOCATION 0x00000008 +#define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */ +#define PRINTER_MESSAGE_SEPFILE 0x00000020 +#define PRINTER_MESSAGE_PRINTPROC 0x00000040 +#define PRINTER_MESSAGE_PARAMS 0x00000080 +#define PRINTER_MESSAGE_DATATYPE 0x00000100 +#define PRINTER_MESSAGE_SECDESC 0x00000200 +#define PRINTER_MESSAGE_CJOBS 0x00000400 +#define PRINTER_MESSAGE_PORT 0x00000800 +#define PRINTER_MESSAGE_SHARENAME 0x00001000 + +typedef struct printer_message_info { + /* PRINTER_CHANGE_XXX*/ + uint32 low; + uint32 high; + + fstring printer_name; + + /* PRINTER_MESSAGE_XXX */ + uint32 flags; +} +PRINTER_MESSAGE_INFO; + /* * The printer attributes. * I #defined all of them (grabbed form MSDN) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index eca8ae54751..f3da6d3c184 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -559,20 +559,58 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) return True; } +/********************************************************************************** + Build the SPOOL_NOTIFY_INFO_DATA entries based upon the flags which have been set + *********************************************************************************/ + +static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, uint32 flags, + SPOOL_NOTIFY_INFO_DATA **notify_data) +{ + SPOOL_NOTIFY_INFO_DATA *data; + uint32 idx = 0; + + /* Changing the printer driver */ + + if (flags & PRINTER_MESSAGE_DRIVER) { + DEBUG(10,("build_notify_data: PRINTER_MESSAGE_DRIVER set on [%s][%d]\n", + printer->info_2->printername, idx)); + if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", + (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); + return -1; + } + *notify_data = data; + + /* clear memory */ + memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + * See PRINTER_NOTIFY_INFO_DATA entries in MSDN + * --jerry + */ + construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); + + spoolss_notify_driver_name(-1, *notify_data+idx, NULL, printer, ctx); + idx++; + } + + return idx; +} + /*************************************************************************** Send a notify to the client. ****************************************************************************/ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, - char* printername, uint32 change_low, uint32 change_high, - WERROR *status) + PRINTER_MESSAGE_INFO *info, WERROR *status) { prs_struct rbuf; prs_struct buf; SPOOL_NOTIFY_INFO notify_info; - SPOOL_NOTIFY_INFO_DATA *notify_data = NULL, *data; - uint32 idx = 0; + SPOOL_NOTIFY_INFO_DATA *notify_data = NULL; + uint32 data_len; WERROR result; @@ -581,6 +619,11 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, SPOOL_Q_REPLY_RRPCN q_s; SPOOL_R_REPLY_RRPCN r_s; + if (!info) { + DEBUG(5,("cli_spoolss_reply_rrpcn: NULL printer message info pointer!\n")); + return False; + } + prs_init(&buf, 1024, pcli->mem_ctx, MARSHALL); prs_init(&rbuf, 0, pcli->mem_ctx, UNMARSHALL ); @@ -588,8 +631,8 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, /* lookup the printer if we have a name */ - if (*printername) { - result = get_a_printer(&printer, 2, printername); + if (*(info->printer_name)) { + result = get_a_printer(&printer, 2, info->printer_name); if (! W_ERROR_IS_OK(result)) { *status = result; goto done; @@ -600,33 +643,18 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX * events. --jerry */ + DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_MESSAGE flags = 0x%8x\n", info->flags)); - /* Did the driver change? */ - - if (change_low & PRINTER_CHANGE_SET_PRINTER_DRIVER) { - change_low &= ~PRINTER_CHANGE_SET_PRINTER_DRIVER; - DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_CHANGE_SET_PRINTER_DRIVER set on [%s][%d]\n", - printername, idx)); - if ((data=Realloc(notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", - (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); - *status = WERR_NOMEM; - goto done; - } - notify_data = data; - - memset(notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); - - /* - * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE - * See PRINTER_NOTIFY_INFO_DATA entries in MSDN - * --jerry - */ - construct_info_data(notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); - - spoolss_notify_driver_name(-1, notify_data+idx, NULL, printer, pcli->mem_ctx); - idx++; + data_len = build_notify_data(pcli->mem_ctx, printer, info->flags, ¬ify_data); + if (info->flags && (data_len == -1)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Failed to build SPOOL_NOTIFY_INFO_DATA [flags == 0x%x] for printer [%s]\n", + info->flags, info->printer_name)); + *status = WERR_NOMEM; + goto done; } + notify_info.flags = 0x00000200; + notify_info.count = data_len; + notify_info.data = notify_data; #if 0 /* JERRY -- do not delete */ @@ -636,14 +664,9 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, #endif /* create and send a MSRPC command with api */ - /* store the parameters */ - notify_info.flags = 0x00000200; - notify_info.count = idx; - notify_info.data = notify_data; - - make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high, ¬ify_info); + make_spoolss_q_reply_rrpcn(&q_s, handle, info->low, info->high, ¬ify_info); /* turn parameters into data stream */ if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { @@ -682,31 +705,36 @@ done: return W_ERROR_IS_OK(*status); } +/*************************************************************************** + Simple check to see if the client motify handle is set to watch for events + represented by 'flags' + **************************************************************************/ + +static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) +{ + + return True; +} + /*************************************************************************** Receive the notify message. ****************************************************************************/ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) { + PRINTER_MESSAGE_INFO msg; Printer_entry *find_printer; WERROR status; - fstring printer_name; - char msg[8]; - char *buf_ptr = (char *)buf; - uint32 low, high; - if (len < sizeof(msg) + 2) { + if (len < sizeof(msg)) { DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); return; } - memcpy(msg, buf_ptr, sizeof(msg)); - low = IVAL(msg,0); - high = IVAL(msg,4); - fstrcpy(printer_name, buf_ptr + sizeof(msg)); + memcpy(&msg, buf, sizeof(PRINTER_MESSAGE_INFO)); - DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x\n", - printer_name, (unsigned int)low, (unsigned int)high )); + DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x flags=0x%x\n", + msg.printer_name, (unsigned int)msg.low, (unsigned int)msg.high, msg.flags )); /* Iterate the printer list */ for(find_printer = printers_list; find_printer; find_printer = find_printer->next) { @@ -716,7 +744,15 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size */ if (find_printer->notify.client_connected==True) { + + /* does the client care about what changed? */ + if (msg.flags && !is_client_monitoring_event(find_printer, msg.flags)) { + DEBUG(10,("srv_spoolss_receive_message: Client [%s] not monitoring these events\n", + find_printer->client.machine)); + continue; + } + if (find_printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) DEBUG(10,("srv_spoolss_receive_message: printserver [%s]\n", find_printer->dev.printerservername )); else @@ -727,17 +763,17 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size * ...else if handle is a printerserver, send to all */ - if (*printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) - && !strequal(printer_name, find_printer->dev.handlename)) + if (*msg.printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) + && !strequal(msg.printer_name, find_printer->dev.handlename)) { DEBUG(10,("srv_spoolss_receive_message: ignoring message sent to %s [%s]\n", - printer_name, find_printer->dev.handlename )); + msg.printer_name, find_printer->dev.handlename )); continue; } /* issue the client call */ - if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, printer_name, low, high, &status)) + if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, &msg, &status)) DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n", (unsigned int)W_ERROR_V(status))); else @@ -750,20 +786,24 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size Send a notify event. ****************************************************************************/ -static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low) +static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low, uint32 flags) { - char msg[8 + sizeof(fstring)]; - - ZERO_STRUCT(msg); - - SIVAL(msg,0,low); - SIVAL(msg,4,high); - fstrcpy(&msg[8], printer_name); + char msg[sizeof(PRINTER_MESSAGE_INFO)]; + PRINTER_MESSAGE_INFO info; + + ZERO_STRUCT(info); - DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x [%s]\n", - low, high, printer_name)); + info.low = low; + info.high = high; + info.flags = flags; + fstrcpy(info.printer_name, printer_name); - message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, + memcpy(msg, &info, sizeof(PRINTER_MESSAGE_INFO)); + + DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x [%s], flags=0x%x\n", + low, high, printer_name, flags)); + + message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(PRINTER_MESSAGE_INFO), False, NULL); return True; @@ -1156,7 +1196,7 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL update_c_setprinter(False); if (W_ERROR_IS_OK(result)) { - srv_spoolss_sendnotify(Printer->dev.handlename, 0, PRINTER_CHANGE_DELETE_PRINTER); + srv_spoolss_sendnotify(Printer->dev.handlename, 0, PRINTER_CHANGE_DELETE_PRINTER, 0x0); } return result; @@ -4791,7 +4831,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, NT_PRINTER_INFO_LEVEL *printer = NULL, *old_printer = NULL; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); WERROR result; - uint32 notify_flag = PRINTER_CHANGE_SET_PRINTER; + uint32 change_flag = 0x0; DEBUG(8,("update_printer\n")); @@ -4909,26 +4949,39 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, */ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)){ set_driver_init(printer, 2); - notify_flag |= PRINTER_CHANGE_SET_PRINTER_DRIVER; + change_flag |= PRINTER_MESSAGE_DRIVER; } } /* Update printer info */ result = mod_a_printer(*printer, 2); + + /* flag which changes actually occured. This is a small subset of + all the possible changes */ + + if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) + change_flag |= PRINTER_MESSAGE_COMMENT; + + if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) + change_flag |= PRINTER_MESSAGE_SHARENAME; + + if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) + change_flag |= PRINTER_MESSAGE_PORT; + + if (!strequal(printer->info_2->location, old_printer->info_2->location)) + change_flag |= PRINTER_MESSAGE_LOCATION; -done: /* * It appears that if the PrinterName had changed, we should * set this to PRINTER_CHANGE_ADD_PRINTER. This was observed * between 2k -> 2k. Otherwise a PRINTER_CHANGE_SET_PRINTER * event is ok. --jerry */ - if (notify_flag & ~PRINTER_CHANGE_SET_PRINTER) { - DEBUG(10,("update_printer: sending change notify for printer [%s]\n", - printer->info_2->printername)); - srv_spoolss_sendnotify(printer->info_2->printername, 0, notify_flag); - } + + srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_SET_PRINTER, + change_flag); +done: free_a_printer(&printer, 2); free_a_printer(&old_printer, 2); @@ -6140,7 +6193,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_ACCESS_DENIED; } - srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER); + srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, 0x0); free_a_printer(&printer,2); -- cgit From b4ce3d90bfd68172884b5d69817b0d47494750c9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 5 Mar 2002 22:58:40 +0000 Subject: new spoolss notify message format --- source/utils/smbcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index 9205d82cbf1..102fdbb19e7 100644 --- a/source/utils/smbcontrol.c +++ b/source/utils/smbcontrol.c @@ -282,12 +282,13 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) return (False); } { - char msg[8 + sizeof(fstring)]; + char msg[8 + sizeof(fstring)+4]; SIVAL(msg,0,PRINTER_CHANGE_ALL); SIVAL(msg,4,0); fstrcpy(&msg[8], params[0]); + SIVAL(msg,8+strlen(params[0])+1, PRINTER_MESSAGE_DRIVER); - retval = send_message(dest, MSG_PRINTER_NOTIFY, msg, 8 + strlen(params[0]) + 1, False); + retval = send_message(dest, MSG_PRINTER_NOTIFY, msg, 8 + strlen(params[0]) + 1 + 4, False); } break; -- cgit From 44d69ffca7f700a6de858c77bdc636e287e00aca Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Mar 2002 03:46:26 +0000 Subject: Reformatting preparing for the changes to come.... :-). Jeremy. --- source/smbd/nttrans.c | 307 +++++++++++++++++++++++++------------------------- 1 file changed, 154 insertions(+), 153 deletions(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 61737ea756e..93802503bf4 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -332,17 +332,17 @@ static BOOL saved_short_case_preserve; static void set_posix_case_semantics(uint32 file_attributes) { - if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) - return; + if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) + return; - saved_case_sensitive = case_sensitive; - saved_case_preserve = case_preserve; - saved_short_case_preserve = short_case_preserve; + saved_case_sensitive = case_sensitive; + saved_case_preserve = case_preserve; + saved_short_case_preserve = short_case_preserve; - /* Set to POSIX. */ - case_sensitive = True; - case_preserve = True; - short_case_preserve = True; + /* Set to POSIX. */ + case_sensitive = True; + case_preserve = True; + short_case_preserve = True; } /**************************************************************************** @@ -351,12 +351,12 @@ static void set_posix_case_semantics(uint32 file_attributes) static void restore_case_semantics(uint32 file_attributes) { - if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) - return; + if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) + return; - case_sensitive = saved_case_sensitive; - case_preserve = saved_case_preserve; - short_case_preserve = saved_short_case_preserve; + case_sensitive = saved_case_sensitive; + case_preserve = saved_case_preserve; + short_case_preserve = saved_short_case_preserve; } /**************************************************************************** @@ -365,40 +365,40 @@ static void restore_case_semantics(uint32 file_attributes) static int map_create_disposition( uint32 create_disposition) { - int ret; - - switch( create_disposition ) { - case FILE_CREATE: - /* create if not exist, fail if exist */ - ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_FAIL); - break; - case FILE_SUPERSEDE: - case FILE_OVERWRITE_IF: - /* create if not exist, trunc if exist */ - ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE); - break; - case FILE_OPEN: - /* fail if not exist, open if exists */ - ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN); - break; - case FILE_OPEN_IF: - /* create if not exist, open if exists */ - ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_OPEN); - break; - case FILE_OVERWRITE: - /* fail if not exist, truncate if exists */ - ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE); - break; - default: - DEBUG(0,("map_create_disposition: Incorrect value for create_disposition = %d\n", - create_disposition )); - return -1; - } + int ret; + + switch( create_disposition ) { + case FILE_CREATE: + /* create if not exist, fail if exist */ + ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_FAIL); + break; + case FILE_SUPERSEDE: + case FILE_OVERWRITE_IF: + /* create if not exist, trunc if exist */ + ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE); + break; + case FILE_OPEN: + /* fail if not exist, open if exists */ + ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN); + break; + case FILE_OPEN_IF: + /* create if not exist, open if exists */ + ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_OPEN); + break; + case FILE_OVERWRITE: + /* fail if not exist, truncate if exists */ + ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE); + break; + default: + DEBUG(0,("map_create_disposition: Incorrect value for create_disposition = %d\n", + create_disposition )); + return -1; + } - DEBUG(10,("map_create_disposition: Mapped create_disposition 0x%lx to 0x%x\n", - (unsigned long)create_disposition, ret )); + DEBUG(10,("map_create_disposition: Mapped create_disposition 0x%lx to 0x%x\n", + (unsigned long)create_disposition, ret )); - return ret; + return ret; } /**************************************************************************** @@ -406,138 +406,139 @@ static int map_create_disposition( uint32 create_disposition) ****************************************************************************/ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_options, - uint32 desired_access, uint32 share_access, uint32 file_attributes) + uint32 desired_access, uint32 share_access, uint32 file_attributes) { - int smb_open_mode = -1; + int smb_open_mode = -1; - *pstat_open_only = False; + *pstat_open_only = False; - /* - * Convert GENERIC bits to specific bits. - */ + /* + * Convert GENERIC bits to specific bits. + */ - se_map_generic(&desired_access, &file_generic_mapping); - - switch( desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) { - case FILE_READ_DATA: - smb_open_mode = DOS_OPEN_RDONLY; - break; - case FILE_WRITE_DATA: - case FILE_APPEND_DATA: - case FILE_WRITE_DATA|FILE_APPEND_DATA: - smb_open_mode = DOS_OPEN_WRONLY; - break; - case FILE_READ_DATA|FILE_WRITE_DATA: - case FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA: - case FILE_READ_DATA|FILE_APPEND_DATA: - smb_open_mode = DOS_OPEN_RDWR; - break; - } + se_map_generic(&desired_access, &file_generic_mapping); - /* - * NB. For DELETE_ACCESS we should really check the - * directory permissions, as that is what controls - * delete, and for WRITE_DAC_ACCESS we should really - * check the ownership, as that is what controls the - * chmod. Note that this is *NOT* a security hole (this - * note is for you, Andrew) as we are not *allowing* - * the access at this point, the actual unlink or - * chown or chmod call would do this. We are just helping - * clients out by telling them if they have a hope - * of any of this succeeding. POSIX acls may still - * deny the real call. JRA. - */ + switch( desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) { + case FILE_READ_DATA: + smb_open_mode = DOS_OPEN_RDONLY; + break; + case FILE_WRITE_DATA: + case FILE_APPEND_DATA: + case FILE_WRITE_DATA|FILE_APPEND_DATA: + smb_open_mode = DOS_OPEN_WRONLY; + break; + case FILE_READ_DATA|FILE_WRITE_DATA: + case FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA: + case FILE_READ_DATA|FILE_APPEND_DATA: + smb_open_mode = DOS_OPEN_RDWR; + break; + } - if (smb_open_mode == -1) { + /* + * NB. For DELETE_ACCESS we should really check the + * directory permissions, as that is what controls + * delete, and for WRITE_DAC_ACCESS we should really + * check the ownership, as that is what controls the + * chmod. Note that this is *NOT* a security hole (this + * note is for you, Andrew) as we are not *allowing* + * the access at this point, the actual unlink or + * chown or chmod call would do this. We are just helping + * clients out by telling them if they have a hope + * of any of this succeeding. POSIX acls may still + * deny the real call. JRA. + */ - if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS) - *pstat_open_only = True; + if (smb_open_mode == -1) { - if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| - FILE_EXECUTE|FILE_READ_ATTRIBUTES| - FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS| - FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) { - smb_open_mode = DOS_OPEN_RDONLY; - } else if(desired_access == 0) { + if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS) + *pstat_open_only = True; - /* - * JRA - NT seems to sometimes send desired_access as zero. play it safe - * and map to a stat open. - */ + if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| + FILE_EXECUTE|FILE_READ_ATTRIBUTES| + FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS| + FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) { + smb_open_mode = DOS_OPEN_RDONLY; + } else if(desired_access == 0) { - *pstat_open_only = True; - smb_open_mode = DOS_OPEN_RDONLY; + /* + * JRA - NT seems to sometimes send desired_access as zero. play it safe + * and map to a stat open. + */ - } else { - DEBUG(0,("map_share_mode: Incorrect value 0x%lx for desired_access to file %s\n", - (unsigned long)desired_access, fname)); - return -1; - } - } + *pstat_open_only = True; + smb_open_mode = DOS_OPEN_RDONLY; - /* - * Set the special bit that means allow share delete. - * This is held outside the normal share mode bits at 1<<15. - * JRA. - */ + } else { + DEBUG(0,("map_share_mode: Incorrect value 0x%lx for desired_access to file %s\n", + (unsigned long)desired_access, fname)); + return -1; + } + } - if(share_access & FILE_SHARE_DELETE) { - smb_open_mode |= ALLOW_SHARE_DELETE; - DEBUG(10,("map_share_mode: FILE_SHARE_DELETE requested. open_mode = 0x%x\n", smb_open_mode)); - } + /* + * Set the special bit that means allow share delete. + * This is held outside the normal share mode bits at 1<<15. + * JRA. + */ - /* - * We need to store the intent to open for Delete. This - * is what determines if a delete on close flag can be set. - * This is the wrong way (and place) to store this, but for 2.2 this - * is the only practical way. JRA. - */ + if(share_access & FILE_SHARE_DELETE) { + smb_open_mode |= ALLOW_SHARE_DELETE; + DEBUG(10,("map_share_mode: FILE_SHARE_DELETE requested. open_mode = 0x%x\n", smb_open_mode)); + } - if(desired_access & DELETE_ACCESS) { - smb_open_mode |= DELETE_ACCESS_REQUESTED; - DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode)); - } + /* + * We need to store the intent to open for Delete. This + * is what determines if a delete on close flag can be set. + * This is the wrong way (and place) to store this, but for 2.2 this + * is the only practical way. JRA. + */ - if (create_options & FILE_DELETE_ON_CLOSE) { - /* Implicit delete access requested... */ - smb_open_mode |= DELETE_ACCESS_REQUESTED; - smb_open_mode |= DELETE_ON_CLOSE_FLAG; - DEBUG(10,("map_share_mode: FILE_DELETE_ON_CLOSE requested. open_mode = 0x%x\n", smb_open_mode)); - } + if(desired_access & DELETE_ACCESS) { + smb_open_mode |= DELETE_ACCESS_REQUESTED; + DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode)); + } - /* Add in the requested share mode. */ - switch( share_access & (FILE_SHARE_READ|FILE_SHARE_WRITE)) { - case FILE_SHARE_READ: - smb_open_mode |= SET_DENY_MODE(DENY_WRITE); - break; - case FILE_SHARE_WRITE: - smb_open_mode |= SET_DENY_MODE(DENY_READ); - break; - case (FILE_SHARE_READ|FILE_SHARE_WRITE): - smb_open_mode |= SET_DENY_MODE(DENY_NONE); - break; - case FILE_SHARE_NONE: - smb_open_mode |= SET_DENY_MODE(DENY_ALL); - break; - } + if (create_options & FILE_DELETE_ON_CLOSE) { + /* Implicit delete access requested... */ + smb_open_mode |= DELETE_ACCESS_REQUESTED; + smb_open_mode |= DELETE_ON_CLOSE_FLAG; + DEBUG(10,("map_share_mode: FILE_DELETE_ON_CLOSE requested. open_mode = 0x%x\n", smb_open_mode)); + } - /* - * Handle an O_SYNC request. - */ + /* Add in the requested share mode. */ + switch( share_access & (FILE_SHARE_READ|FILE_SHARE_WRITE)) { + case FILE_SHARE_READ: + smb_open_mode |= SET_DENY_MODE(DENY_WRITE); + break; + case FILE_SHARE_WRITE: + smb_open_mode |= SET_DENY_MODE(DENY_READ); + break; + case (FILE_SHARE_READ|FILE_SHARE_WRITE): + smb_open_mode |= SET_DENY_MODE(DENY_NONE); + break; + case FILE_SHARE_NONE: + smb_open_mode |= SET_DENY_MODE(DENY_ALL); + break; + } + + /* + * Handle an O_SYNC request. + */ - if(file_attributes & FILE_FLAG_WRITE_THROUGH) - smb_open_mode |= FILE_SYNC_OPENMODE; + if(file_attributes & FILE_FLAG_WRITE_THROUGH) + smb_open_mode |= FILE_SYNC_OPENMODE; - DEBUG(10,("map_share_mode: Mapped desired access 0x%lx, share access 0x%lx, file attributes 0x%lx \ + DEBUG(10,("map_share_mode: Mapped desired access 0x%lx, share access 0x%lx, file attributes 0x%lx \ to open_mode 0x%x\n", (unsigned long)desired_access, (unsigned long)share_access, - (unsigned long)file_attributes, smb_open_mode )); + (unsigned long)file_attributes, smb_open_mode )); - return smb_open_mode; + return smb_open_mode; } /**************************************************************************** Reply to an NT create and X call on a pipe. ****************************************************************************/ + static int nt_open_pipe(char *fname, connection_struct *conn, char *inbuf, char *outbuf, int *ppnum) { @@ -1003,8 +1004,8 @@ static int do_nt_transact_create_pipe( connection_struct *conn, get_filename_transact(&fname[0], params, 53, total_parameter_count - 53 - fname_len, fname_len); - if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0) - return ret; + if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0) + return ret; /* Realloc the size of parameters and data we will return */ params = Realloc(*ppparams, 69); -- cgit From cfe360f3ce5a30265ebb89156ad29fe6fa8ae536 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 6 Mar 2002 18:39:21 +0000 Subject: merge torture target from head --- source/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Makefile.in b/source/Makefile.in index b965dd59cbc..b9e0bd8cf20 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -95,6 +95,7 @@ PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bi MPROGS = @MPROGS@ LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup +TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2 SHLIBS = libsmbclient SCRIPTS = $(srcdir)/script/smbtar @@ -413,6 +414,8 @@ pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@ smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@ +torture : CHECK $(TORTURE_PROGS) + smbtorture : CHECK bin/smbtorture masktest : CHECK bin/masktest -- cgit From f214e276a1ea642898478bfa618fcad5d960f877 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 6 Mar 2002 18:42:40 +0000 Subject: fix compile errors --- source/utils/locktest.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/utils/locktest.c b/source/utils/locktest.c index 3846b10ab79..f34e12885be 100644 --- a/source/utils/locktest.c +++ b/source/utils/locktest.c @@ -34,7 +34,7 @@ static BOOL use_oplocks; #define FILENAME "\\locktest.dat" #define LOCKRANGE 1000 -#define LOCKBASE 0; +#define LOCKBASE 0 /* #define LOCKBASE (0x40000000 - 50) @@ -59,14 +59,16 @@ struct record { char needed; }; +#define PRESETS 0 + +#if PRESETS static struct record preset[] = { -#if 0 {36, 5, 0, 0, 0, 8, 1}, { 2, 6, 0, 1, 0, 1, 1}, {53, 92, 0, 0, 0, 0, 1}, {99, 11, 0, 0, 7, 1, 1}, -#endif }; +#endif static struct record *recorded; @@ -377,9 +379,12 @@ static void test_locks(char *share[NSERVERS]) recorded = (struct record *)malloc(sizeof(*recorded) * numops); for (n=0; n Date: Thu, 7 Mar 2002 00:20:50 +0000 Subject: Formatting tidyups. --- source/nsswitch/winbindd_sid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 689ad34c4e0..3efc8833e94 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -74,16 +74,16 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: lookupname %s\n", state->pid, state->request.data.name)); - if (!parse_domain_user(state->request.data.name, name_domain, name_user)) + if (!parse_domain_user(state->request.data.name, name_domain, + name_user)) return WINBINDD_ERROR; snprintf(name, sizeof(name), "%s\\%s", name_domain, name_user); /* Lookup name from PDC using lsa_lookup_names() */ - if (!winbindd_lookup_sid_by_name(name, &sid, &type)) { + if (!winbindd_lookup_sid_by_name(name, &sid, &type)) return WINBINDD_ERROR; - } sid_to_string(sid_str, &sid); fstrcpy(state->response.data.sid.sid, sid_str); -- cgit From 47f3fb0aa5c7602b903504045f35faafb59c092a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 7 Mar 2002 00:28:19 +0000 Subject: The name/sid cache code was using the name passed as input to lookupnames as a key in winbindd_cache.tdb. This meant that a lookupsid of that user's sid would return the name specified by the user in the previous lookupname which can result in weird capitalisation issues. The fix is to do a lookupsid immediately after the lookupname and store the name returned in the cache file. We also store the username in the name/sid cache lowercased so as to avoid multiple entries for different capitalisations of names. Test case: rpcclient jonquille -U% -c 'lookupnames npsd-test2\administraTOR' npsd-test2\administraTOR S-1-5-21-1067277791-1719175008-3000797951-500 (1) rpcclient jonquille -U% -c 'lookupsids S-1-5-21-1067277791-1719175008-3000797951-500' S-1-5-21-1067277791-1719175008-3000797951-500 [NPSD-TEST2]\[Administrator] (1) --- source/nsswitch/winbindd_cache.c | 27 +++++++++-- source/nsswitch/winbindd_util.c | 100 +++++++++++++++++++++++---------------- 2 files changed, 82 insertions(+), 45 deletions(-) diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 8ad5bc2e7d8..9250e9e498d 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -230,14 +230,14 @@ void winbindd_store_group_cache(struct winbindd_domain *domain, } static void store_cache_entry(struct winbindd_domain *domain, char *cache_type, - char *name, void *buf, int len) + char *name, void *buf, int len) { fstring keystr; /* Create key for store */ snprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, - domain->name, name); + domain->name, name); /* Store it */ @@ -261,15 +261,32 @@ void winbindd_store_name_cache_entry(struct winbindd_domain *domain, /* Fill a SID cache entry */ void winbindd_store_sid_cache_entry(struct winbindd_domain *domain, - char *name, struct winbindd_sid *sid) + char *name, struct winbindd_sid *sid) { + fstring name_domain, name_user; + char *key_name; + if (lp_winbind_cache_time() == 0) return; - store_cache_entry(domain, CACHE_TYPE_SID, name, sid, + /* Store the lowercased username as a key */ + + if (!parse_domain_user(name, name_domain, name_user)) + return; + + strlower(name_user); + + if (asprintf(&key_name, "%s\\%s", name_domain, name_user) < 0) + return; + + /* Store cache entry and update seqnum */ + + store_cache_entry(domain, CACHE_TYPE_SID, key_name, sid, sizeof(struct winbindd_sid)); - set_cache_sequence_number(domain, CACHE_TYPE_SID, name); + set_cache_sequence_number(domain, CACHE_TYPE_SID, key_name); + + SAFE_FREE(key_name); } /* Fill a user info cache entry */ diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index e3441624647..fe60c0a3902 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -281,7 +281,7 @@ static void store_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME *p = '\0'; if ((domain = find_domain_from_name(domain_str)) == NULL) - return; + return; sid_to_string(sid_val.sid, sid); sid_val.type = (int)type; @@ -296,30 +296,38 @@ static void store_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME static BOOL winbindd_lookup_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME_USE *type) { - fstring domain_str; - char *p; + fstring name_domain, name_user; + char *key_name = NULL; struct winbindd_sid sid_ret; struct winbindd_domain *domain; + BOOL result = False; /* Get name from domain. */ - fstrcpy( domain_str, name); - p = strchr(domain_str, '\\'); - if (p) - *p = '\0'; + + if (!parse_domain_user(name, name_domain, name_user)) + goto done; - if ((domain = find_domain_from_name(domain_str)) == NULL) - return False; + if ((domain = find_domain_from_name(name_domain)) == NULL) + goto done; - if (!winbindd_fetch_sid_cache_entry(domain, name, &sid_ret)) - return False; + strlower(name_user); /* Username in key is lowercased */ - string_to_sid( sid, sid_ret.sid); + if (asprintf(&key_name, "%s\\%s", name_domain, name_user) < 0) + goto done; + + if (!winbindd_fetch_sid_cache_entry(domain, key_name, &sid_ret)) + goto done; + + string_to_sid(sid, sid_ret.sid); *type = (enum SID_NAME_USE)sid_ret.type; - DEBUG(10,("winbindd_lookup_sid_by_name_in_cache: Cache hit for name %s. SID = %s\n", - name, sid_ret.sid )); + DEBUG(10, ("winbindd_lookup_sid_by_name_in_cache: Cache hit for name %s. SID = %s\n", name, sid_ret.sid)); - return True; + result = True; + + done: + SAFE_FREE(key_name); + return result; } /* Store a name in a domain indexed by SID in the cache. */ @@ -337,7 +345,7 @@ static void store_name_by_sid_in_cache(DOM_SID *sid, fstring name, enum SID_NAME sid_split_rid(&domain_sid, &rid); if ((domain = find_domain_from_sid(&domain_sid)) == NULL) - return; + return; sid_to_string(sid_str, sid); fstrcpy( name_val.name, name ); @@ -388,9 +396,9 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty DOM_SID *sids = NULL; uint32 *types = NULL; CLI_POLICY_HND *hnd; - NTSTATUS result; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; TALLOC_CTX *mem_ctx; - BOOL rv = False; + char **names; /* Don't bother with machine accounts */ @@ -416,38 +424,50 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty num_names, (char **)&name, &sids, &types, &num_sids); - /* Return rid and type if lookup successful */ - - if (NT_STATUS_IS_OK(result)) { - - /* Return sid */ - - if ((sid != NULL) && (sids != NULL)) - sid_copy(sid, &sids[0]); - - /* Return name type */ - - if ((type != NULL) && (types != NULL)) - *type = (enum SID_NAME_USE)types[0]; - - /* Store the forward and reverse map of this lookup in the cache. */ - store_sid_by_name_in_cache(name, &sids[0], (enum SID_NAME_USE)types[0]); - store_name_by_sid_in_cache(&sids[0], name, (enum SID_NAME_USE)types[0]); - } else { - /* JRA. Here's where we add the -ve cache store with a name type of SID_NAME_USE_NONE. */ + /* JRA. Here's where we add the -ve cache store with a name type of + SID_NAME_USE_NONE. */ + + if (!NT_STATUS_IS_OK(result)) { DOM_SID nullsid; - + ZERO_STRUCT(nullsid); store_sid_by_name_in_cache(name, &nullsid, SID_NAME_USE_NONE); *type = SID_NAME_UNKNOWN; + + goto done; } - rv = NT_STATUS_IS_OK(result); + /* Return sid */ + + if ((sid != NULL) && (sids != NULL)) + sid_copy(sid, &sids[0]); + + /* Return name type */ + + if ((type != NULL) && (types != NULL)) + *type = (enum SID_NAME_USE)types[0]; + + /* Now we do a reverse lookup of the SID to get the correct + capitalisation of the name. */ + + result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol, 1, + sids, &names, &types, &num_names); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Store the forward and reverse map of this lookup in the cache. */ + + store_sid_by_name_in_cache( + names[0], &sids[0], (enum SID_NAME_USE)types[0]); + + store_name_by_sid_in_cache( + &sids[0], names[0], (enum SID_NAME_USE)types[0]); done: talloc_destroy(mem_ctx); - return rv; + return NT_STATUS_IS_OK(result); } /** -- cgit From 146c5981124406e0d964379f035170b56696e481 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 01:02:42 +0000 Subject: Merge in the change to do per-handle access checks on setdata/setform etc. Should allow the buggy spoolss code on NT to work against us. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 208 ++++++++++++++++++++++++------------- 1 file changed, 138 insertions(+), 70 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index f3da6d3c184..d75eaac1dea 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -59,7 +59,7 @@ typedef struct _Printer{ fstring printerservername; } dev; uint32 type; - uint32 access; + uint32 access_granted; struct { uint32 flags; uint32 options; @@ -328,8 +328,9 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) } /**************************************************************************** - return the snum of a printer corresponding to an handle + Return the snum of a printer corresponding to an handle. ****************************************************************************/ + static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number) { Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); @@ -351,23 +352,6 @@ static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number) } } -/**************************************************************************** - set printer handle type. -****************************************************************************/ -static BOOL set_printer_hnd_accesstype(pipes_struct *p, POLICY_HND *hnd, uint32 access_required) -{ - Printer_entry *Printer = find_printer_index_by_hnd(p, hnd); - - if (!Printer) { - DEBUG(2,("set_printer_hnd_accesstype: Invalid handle (%s:%u:%u)", OUR_HANDLE(hnd))); - return False; - } - - DEBUG(4,("Setting printer access=%x\n", access_required)); - Printer->access = access_required; - return True; -} - /**************************************************************************** Set printer handle type. Check if it's \\server or \\server\printer @@ -469,10 +453,10 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) } /**************************************************************************** - find first available printer slot. creates a printer handle for you. + Find first available printer slot. creates a printer handle for you. ****************************************************************************/ -static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name) +static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name, uint32 access_granted) { Printer_entry *new_printer; @@ -503,31 +487,17 @@ static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name) return False; } - DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count )); + new_printer->access_granted = access_granted; - return True; -} - -/******************************************************************** - Return True if the handle is a print server. - ********************************************************************/ - -static BOOL handle_is_printserver(pipes_struct *p, POLICY_HND *handle) -{ - Printer_entry *Printer=find_printer_index_by_hnd(p,handle); + DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count )); - if (!Printer) - return False; - - if (Printer->printer_type != PRINTER_HANDLE_IS_PRINTSERVER) - return False; - return True; } /**************************************************************************** - allocate more memory for a BUFFER. + Allocate more memory for a BUFFER. ****************************************************************************/ + static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) { prs_struct *ps; @@ -830,6 +800,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, fstring name; int snum; struct current_user user; + Printer_entry *Printer=NULL; if (q_u->printername_ptr != 0) printername = &q_u->printername; @@ -843,9 +814,17 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, DEBUGADD(3,("checking name: %s\n",name)); - if (!open_printer_hnd(p, handle, name)) + if (!open_printer_hnd(p, handle, name, 0)) return WERR_INVALID_PRINTER_NAME; + Printer=find_printer_index_by_hnd(p, handle); + if (!Printer) { + DEBUG(0,(" _spoolss_open_printer_ex: logic error. \ +Can't find printer handle we created for priunter %s\n", name )); + close_printer_handle(p,handle); + return WERR_INVALID_PRINTER_NAME; + } + /* if (printer_default->datatype_ptr != NULL) { @@ -856,11 +835,6 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, set_printer_hnd_datatype(handle, ""); */ - if (!set_printer_hnd_accesstype(p, handle, printer_default->access_required)) { - close_printer_handle(p, handle); - return WERR_ACCESS_DENIED; - } - /* First case: the user is opening the print server: @@ -886,7 +860,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, get_current_user(&user, p); - if (handle_is_printserver(p, handle)) { + if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) { if (printer_default->access_required == 0) { return WERR_OK; } @@ -939,6 +913,21 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, return WERR_ACCESS_DENIED; } + /* + * An admin user always has access. + */ + + if (user.uid == 0 || user_in_list(uidtoname(user.uid), lp_printer_admin(snum))) + printer_default->access_required = PRINTER_ACCESS_ADMINISTER; + + if (printer_default->access_required & PRINTER_ACCESS_ADMINISTER) + printer_default->access_required = PRINTER_ACCESS_ADMINISTER; + else + printer_default->access_required = PRINTER_ACCESS_USE; + + DEBUG(4,("Setting printer access=%x\n", printer_default->access_required)); + Printer->access_granted = printer_default->access_required; + /* * If we have a default device pointer in the * printer_default struct, then we need to get @@ -1020,6 +1009,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, /**************************************************************************** ****************************************************************************/ + static BOOL convert_printer_info(const SPOOL_PRINTER_INFO_LEVEL *uni, NT_PRINTER_INFO_LEVEL *printer, uint32 level) { @@ -1206,6 +1196,7 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL * static function to lookup the version id corresponding to an * long architecture string ******************************************************************/ + static int get_version_id (char * arch) { int i; @@ -1274,10 +1265,10 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER return delete_printer_driver(info.info_3); } - /******************************************************************** GetPrinterData on a printer server Handle. ********************************************************************/ + static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type, uint8 **data, uint32 *needed, uint32 in_size) { int i; @@ -1367,6 +1358,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 /******************************************************************** GetPrinterData on a printer Handle. ********************************************************************/ + static BOOL getprinterdata_printer(pipes_struct *p, TALLOC_CTX *ctx, POLICY_HND *handle, fstring value, uint32 *type, uint8 **data, uint32 *needed, uint32 in_size ) @@ -1487,8 +1479,9 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO } /*************************************************************************** - connect to the client + Connect to the client. ****************************************************************************/ + static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle) { WERROR status; @@ -1598,6 +1591,7 @@ static void spoolss_notify_server_name(int snum, /******************************************************************* * fill a notify_info_data with the printername (not including the servername). ********************************************************************/ + static void spoolss_notify_printer_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1632,6 +1626,7 @@ static void spoolss_notify_printer_name(int snum, /******************************************************************* * fill a notify_info_data with the servicename ********************************************************************/ + static void spoolss_notify_share_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1658,6 +1653,7 @@ static void spoolss_notify_share_name(int snum, /******************************************************************* * fill a notify_info_data with the port name ********************************************************************/ + static void spoolss_notify_port_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1687,6 +1683,7 @@ static void spoolss_notify_port_name(int snum, * fill a notify_info_data with the printername * but it doesn't exist, have to see what to do ********************************************************************/ + void spoolss_notify_driver_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1713,6 +1710,7 @@ void spoolss_notify_driver_name(int snum, /******************************************************************* * fill a notify_info_data with the comment ********************************************************************/ + static void spoolss_notify_comment(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1744,6 +1742,7 @@ static void spoolss_notify_comment(int snum, * fill a notify_info_data with the comment * location = "Room 1, floor 2, building 3" ********************************************************************/ + static void spoolss_notify_location(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1771,6 +1770,7 @@ static void spoolss_notify_location(int snum, * fill a notify_info_data with the device mode * jfm:xxxx don't to it for know but that's a real problem !!! ********************************************************************/ + static void spoolss_notify_devmode(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1782,6 +1782,7 @@ static void spoolss_notify_devmode(int snum, /******************************************************************* * fill a notify_info_data with the separator file name ********************************************************************/ + static void spoolss_notify_sepfile(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1809,6 +1810,7 @@ static void spoolss_notify_sepfile(int snum, * fill a notify_info_data with the print processor * jfm:xxxx return always winprint to indicate we don't do anything to it ********************************************************************/ + static void spoolss_notify_print_processor(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1836,6 +1838,7 @@ static void spoolss_notify_print_processor(int snum, * fill a notify_info_data with the print processor options * jfm:xxxx send an empty string ********************************************************************/ + static void spoolss_notify_parameters(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1863,6 +1866,7 @@ static void spoolss_notify_parameters(int snum, * fill a notify_info_data with the data type * jfm:xxxx always send RAW as data type ********************************************************************/ + static void spoolss_notify_datatype(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1891,6 +1895,7 @@ static void spoolss_notify_datatype(int snum, * jfm:xxxx send an null pointer to say no security desc * have to implement security before ! ********************************************************************/ + static void spoolss_notify_security_desc(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1905,6 +1910,7 @@ static void spoolss_notify_security_desc(int snum, * fill a notify_info_data with the attributes * jfm:xxxx a samba printer is always shared ********************************************************************/ + static void spoolss_notify_attributes(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1918,6 +1924,7 @@ static void spoolss_notify_attributes(int snum, /******************************************************************* * fill a notify_info_data with the priority ********************************************************************/ + static void spoolss_notify_priority(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1931,6 +1938,7 @@ static void spoolss_notify_priority(int snum, /******************************************************************* * fill a notify_info_data with the default priority ********************************************************************/ + static void spoolss_notify_default_priority(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1944,6 +1952,7 @@ static void spoolss_notify_default_priority(int snum, /******************************************************************* * fill a notify_info_data with the start time ********************************************************************/ + static void spoolss_notify_start_time(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1957,6 +1966,7 @@ static void spoolss_notify_start_time(int snum, /******************************************************************* * fill a notify_info_data with the until time ********************************************************************/ + static void spoolss_notify_until_time(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1970,6 +1980,7 @@ static void spoolss_notify_until_time(int snum, /******************************************************************* * fill a notify_info_data with the status ********************************************************************/ + static void spoolss_notify_status(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1986,6 +1997,7 @@ static void spoolss_notify_status(int snum, /******************************************************************* * fill a notify_info_data with the number of jobs queued ********************************************************************/ + static void spoolss_notify_cjobs(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -1999,6 +2011,7 @@ static void spoolss_notify_cjobs(int snum, /******************************************************************* * fill a notify_info_data with the average ppm ********************************************************************/ + static void spoolss_notify_average_ppm(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2014,6 +2027,7 @@ static void spoolss_notify_average_ppm(int snum, /******************************************************************* * fill a notify_info_data with username ********************************************************************/ + static void spoolss_notify_username(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2040,6 +2054,7 @@ static void spoolss_notify_username(int snum, /******************************************************************* * fill a notify_info_data with job status ********************************************************************/ + static void spoolss_notify_job_status(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2053,6 +2068,7 @@ static void spoolss_notify_job_status(int snum, /******************************************************************* * fill a notify_info_data with job name ********************************************************************/ + static void spoolss_notify_job_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2079,6 +2095,7 @@ static void spoolss_notify_job_name(int snum, /******************************************************************* * fill a notify_info_data with job status ********************************************************************/ + static void spoolss_notify_job_status_string(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2128,6 +2145,7 @@ static void spoolss_notify_job_status_string(int snum, /******************************************************************* * fill a notify_info_data with job time ********************************************************************/ + static void spoolss_notify_job_time(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2141,6 +2159,7 @@ static void spoolss_notify_job_time(int snum, /******************************************************************* * fill a notify_info_data with job size ********************************************************************/ + static void spoolss_notify_job_size(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -2279,8 +2298,9 @@ struct s_notify_info_data_table notify_info_data_table[] = }; /******************************************************************* -return the size of info_data structure + Return the size of info_data structure. ********************************************************************/ + static uint32 size_of_notify_info_data(uint16 type, uint16 field) { int i=0; @@ -2298,8 +2318,9 @@ static uint32 size_of_notify_info_data(uint16 type, uint16 field) } /******************************************************************* -return the type of notify_info_data + Return the type of notify_info_data. ********************************************************************/ + static BOOL type_of_notify_info_data(uint16 type, uint16 field) { int i=0; @@ -2325,6 +2346,7 @@ static BOOL type_of_notify_info_data(uint16 type, uint16 field) /**************************************************************************** ****************************************************************************/ + static int search_notify(uint16 type, uint16 field, int *value) { int j; @@ -2346,6 +2368,7 @@ static int search_notify(uint16 type, uint16 field, int *value) /**************************************************************************** ****************************************************************************/ + void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id) { info_data->type = type; @@ -2362,6 +2385,7 @@ void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 * fill a notify_info struct with info asked * ********************************************************************/ + static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int snum, SPOOL_NOTIFY_OPTION_TYPE *option_type, uint32 id, @@ -2419,6 +2443,7 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int * fill a notify_info struct with info asked * ********************************************************************/ + static BOOL construct_notify_jobs_info(print_queue_struct *queue, SPOOL_NOTIFY_INFO *info, NT_PRINTER_INFO_LEVEL *printer, @@ -2552,6 +2577,7 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, * fill a notify_info struct with info asked * ********************************************************************/ + static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY_INFO *info, TALLOC_CTX *mem_ctx) { @@ -2688,6 +2714,7 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN * construct_printer_info_0 * fill a printer_info_0 struct ********************************************************************/ + static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) { pstring chaine; @@ -2792,6 +2819,7 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) * construct_printer_info_1 * fill a printer_info_1 struct ********************************************************************/ + static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int snum) { pstring chaine; @@ -2989,6 +3017,7 @@ static BOOL construct_printer_info_2(PRINTER_INFO_2 *printer, int snum) * construct_printer_info_3 * fill a printer_info_3 struct ********************************************************************/ + static BOOL construct_printer_info_3(PRINTER_INFO_3 **pp_printer, int snum) { NT_PRINTER_INFO_LEVEL *ntprinter = NULL; @@ -3081,10 +3110,10 @@ static BOOL construct_printer_info_5(PRINTER_INFO_5 *printer, int snum) return True; } - /******************************************************************** Spoolss_enumprinters. ********************************************************************/ + static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { int snum; @@ -3139,6 +3168,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 /******************************************************************** enum_all_printers_info_1_local. *********************************************************************/ + static WERROR enum_all_printers_info_1_local(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { DEBUG(4,("enum_all_printers_info_1_local\n")); @@ -3149,6 +3179,7 @@ static WERROR enum_all_printers_info_1_local(NEW_BUFFER *buffer, uint32 offered, /******************************************************************** enum_all_printers_info_1_name. *********************************************************************/ + static WERROR enum_all_printers_info_1_name(fstring name, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { char *s = name; @@ -3168,6 +3199,7 @@ static WERROR enum_all_printers_info_1_name(fstring name, NEW_BUFFER *buffer, ui /******************************************************************** enum_all_printers_info_1_remote. *********************************************************************/ + static WERROR enum_all_printers_info_1_remote(fstring name, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { PRINTER_INFO_1 *printer; @@ -3296,6 +3328,7 @@ static WERROR enum_all_printers_info_2(NEW_BUFFER *buffer, uint32 offered, uint3 /******************************************************************** * handle enumeration of printers at level 1 ********************************************************************/ + static WERROR enumprinters_level1( uint32 flags, fstring name, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) @@ -3320,6 +3353,7 @@ static WERROR enumprinters_level1( uint32 flags, fstring name, /******************************************************************** * handle enumeration of printers at level 2 ********************************************************************/ + static WERROR enumprinters_level2( uint32 flags, fstring servername, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) @@ -3348,6 +3382,7 @@ static WERROR enumprinters_level2( uint32 flags, fstring servername, /******************************************************************** * handle enumeration of printers at level 5 ********************************************************************/ + static WERROR enumprinters_level5( uint32 flags, fstring servername, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) @@ -3415,6 +3450,7 @@ WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_ /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_0(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_0 *printer=NULL; @@ -3447,6 +3483,7 @@ static WERROR getprinter_level_0(int snum, NEW_BUFFER *buffer, uint32 offered, u /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_1(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_1 *printer=NULL; @@ -3479,6 +3516,7 @@ static WERROR getprinter_level_1(int snum, NEW_BUFFER *buffer, uint32 offered, u /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_2(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_2 *printer=NULL; @@ -3514,6 +3552,7 @@ static WERROR getprinter_level_2(int snum, NEW_BUFFER *buffer, uint32 offered, u /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_3(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_3 *printer=NULL; @@ -3544,6 +3583,7 @@ static WERROR getprinter_level_3(int snum, NEW_BUFFER *buffer, uint32 offered, u /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_4(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_4 *printer=NULL; @@ -3577,6 +3617,7 @@ static WERROR getprinter_level_4(int snum, NEW_BUFFER *buffer, uint32 offered, u /**************************************************************************** ****************************************************************************/ + static WERROR getprinter_level_5(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { PRINTER_INFO_5 *printer=NULL; @@ -3650,6 +3691,7 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET /******************************************************************** * fill a DRIVER_INFO_1 struct ********************************************************************/ + static void fill_printer_driver_info_1(DRIVER_INFO_1 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername, fstring architecture) { init_unistr( &info->name, driver.info_3->name); @@ -3658,6 +3700,7 @@ static void fill_printer_driver_info_1(DRIVER_INFO_1 *info, NT_PRINTER_DRIVER_IN /******************************************************************** * construct_printer_driver_info_1 ********************************************************************/ + static WERROR construct_printer_driver_info_1(DRIVER_INFO_1 *info, int snum, fstring servername, fstring architecture, uint32 version) { NT_PRINTER_INFO_LEVEL *printer = NULL; @@ -3682,6 +3725,7 @@ static WERROR construct_printer_driver_info_1(DRIVER_INFO_1 *info, int snum, fst * construct_printer_driver_info_2 * fill a printer_info_2 struct ********************************************************************/ + static void fill_printer_driver_info_2(DRIVER_INFO_2 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername) { pstring temp; @@ -3715,6 +3759,7 @@ static void fill_printer_driver_info_2(DRIVER_INFO_2 *info, NT_PRINTER_DRIVER_IN * construct_printer_driver_info_2 * fill a printer_info_2 struct ********************************************************************/ + static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fstring servername, fstring architecture, uint32 version) { NT_PRINTER_INFO_LEVEL *printer = NULL; @@ -3741,6 +3786,7 @@ static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fst * * convert an array of ascii string to a UNICODE string ********************************************************************/ + static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *servername) { int i=0; @@ -3782,6 +3828,7 @@ static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *ser * construct_printer_info_3 * fill a printer_info_3 struct ********************************************************************/ + static void fill_printer_driver_info_3(DRIVER_INFO_3 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername) { pstring temp; @@ -3828,6 +3875,7 @@ static void fill_printer_driver_info_3(DRIVER_INFO_3 *info, NT_PRINTER_DRIVER_IN * construct_printer_info_3 * fill a printer_info_3 struct ********************************************************************/ + static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fstring servername, fstring architecture, uint32 version) { NT_PRINTER_INFO_LEVEL *printer = NULL; @@ -3950,6 +3998,7 @@ static void fill_printer_driver_info_6(DRIVER_INFO_6 *info, NT_PRINTER_DRIVER_IN * construct_printer_info_6 * fill a printer_info_6 struct ********************************************************************/ + static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, fstring servername, fstring architecture, uint32 version) { NT_PRINTER_INFO_LEVEL *printer = NULL; @@ -4010,6 +4059,7 @@ static void free_printer_driver_info_6(DRIVER_INFO_6 *info) /**************************************************************************** ****************************************************************************/ + static WERROR getprinterdriver2_level1(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { DRIVER_INFO_1 *info=NULL; @@ -4046,6 +4096,7 @@ static WERROR getprinterdriver2_level1(fstring servername, fstring architecture, /**************************************************************************** ****************************************************************************/ + static WERROR getprinterdriver2_level2(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { DRIVER_INFO_2 *info=NULL; @@ -4082,6 +4133,7 @@ static WERROR getprinterdriver2_level2(fstring servername, fstring architecture, /**************************************************************************** ****************************************************************************/ + static WERROR getprinterdriver2_level3(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { DRIVER_INFO_3 info; @@ -4115,6 +4167,7 @@ static WERROR getprinterdriver2_level3(fstring servername, fstring architecture, /**************************************************************************** ****************************************************************************/ + static WERROR getprinterdriver2_level6(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { DRIVER_INFO_6 info; @@ -4346,6 +4399,7 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R * called from the spoolss dispatcher * ********************************************************************/ + static WERROR control_printer(POLICY_HND *handle, uint32 command, pipes_struct *p) { @@ -4403,6 +4457,7 @@ WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R * called by spoolss_api_setprinter * when updating a printer description ********************************************************************/ + static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, const SPOOL_PRINTER_INFO_LEVEL *info, pipes_struct *p, SEC_DESC_BUF *secdesc_ctr) @@ -4516,6 +4571,7 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum) /**************************************************************************** ****************************************************************************/ + static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) { char *cmd = lp_addprinter_cmd(); @@ -4910,8 +4966,8 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, /* Check calling user has permission to update printer description */ - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("update_printer: printer property change denied by security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(3, ("update_printer: printer property change denied by handle\n")); result = WERR_ACCESS_DENIED; goto done; } @@ -5067,6 +5123,7 @@ WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u /**************************************************************************** ****************************************************************************/ + static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, int position, int snum) { @@ -5095,6 +5152,7 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, /**************************************************************************** ****************************************************************************/ + static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, int position, int snum, NT_PRINTER_INFO_LEVEL *ntprinter, @@ -5144,6 +5202,7 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, /**************************************************************************** Enumjobs at level 1. ****************************************************************************/ + static WERROR enumjobs_level1(print_queue_struct *queue, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) @@ -5190,6 +5249,7 @@ static WERROR enumjobs_level1(print_queue_struct *queue, int snum, /**************************************************************************** Enumjobs at level 2. ****************************************************************************/ + static WERROR enumjobs_level2(print_queue_struct *queue, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) @@ -5370,6 +5430,7 @@ WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u /**************************************************************************** Enumerates all printer drivers at level 1. ****************************************************************************/ + static WERROR enumprinterdrivers_level1(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { int i; @@ -5450,6 +5511,7 @@ static WERROR enumprinterdrivers_level1(fstring servername, fstring architecture /**************************************************************************** Enumerates all printer drivers at level 2. ****************************************************************************/ + static WERROR enumprinterdrivers_level2(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { int i; @@ -5531,6 +5593,7 @@ static WERROR enumprinterdrivers_level2(fstring servername, fstring architecture /**************************************************************************** Enumerates all printer drivers at level 3. ****************************************************************************/ + static WERROR enumprinterdrivers_level3(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { int i; @@ -5859,6 +5922,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM * /**************************************************************************** ****************************************************************************/ + static void fill_port_1(PORT_INFO_1 *port, char *name) { init_unistr(&port->port_name, name); @@ -5866,6 +5930,7 @@ static void fill_port_1(PORT_INFO_1 *port, char *name) /**************************************************************************** ****************************************************************************/ + static void fill_port_2(PORT_INFO_2 *port, char *name) { init_unistr(&port->port_name, name); @@ -5879,6 +5944,7 @@ static void fill_port_2(PORT_INFO_2 *port, char *name) /**************************************************************************** enumports level 1. ****************************************************************************/ + static WERROR enumports_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { PORT_INFO_1 *ports=NULL; @@ -6097,6 +6163,7 @@ WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUM /**************************************************************************** ****************************************************************************/ + static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_srv_name, const SPOOL_PRINTER_INFO_LEVEL *info, DEVICEMODE *devmode, SEC_DESC_BUF *sec_desc_buf, @@ -6186,7 +6253,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return err; } - if (!open_printer_hnd(p, handle, name)) { + if (!open_printer_hnd(p, handle, name, PRINTER_ACCESS_ADMINISTER)) { /* Handle open failed - remove addition. */ del_a_printer(printer->info_2->sharename); free_a_printer(&printer,2); @@ -6276,6 +6343,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, /**************************************************************************** ****************************************************************************/ + static void fill_driverdir_1(DRIVER_DIRECTORY_1 *info, char *name) { init_unistr(&info->name, name); @@ -6283,6 +6351,7 @@ static void fill_driverdir_1(DRIVER_DIRECTORY_1 *info, char *name) /**************************************************************************** ****************************************************************************/ + static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environment, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { pstring path; @@ -6572,9 +6641,8 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP * when connecting to a printer --jerry */ - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("security descriptor change denied by existing " - "security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(3, ("_spoolss_setprinterdata: change denied by handle access permissions\n")); status = WERR_ACCESS_DENIED; goto done; } @@ -6641,9 +6709,8 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ if (!get_printer_snum(p, handle, &snum)) return WERR_BADFID; - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("_spoolss_deleteprinterdata: printer properties " - "change denied by existing security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(3, ("_spoolss_deleteprinterdata: printer properties change denied by handle\n")); return WERR_ACCESS_DENIED; } @@ -6690,9 +6757,8 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM if (!get_printer_snum(p,handle, &snum)) return WERR_BADFID; - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("security descriptor change denied by existing " - "security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(2,("_spoolss_addform: denied by handle permissions.\n")); status = WERR_ACCESS_DENIED; goto done; } @@ -6752,9 +6818,8 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE if (!get_printer_snum(p, handle, &snum)) return WERR_BADFID; - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("security descriptor change denied by existing " - "security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(2,("_spoolss_deleteform: denied by handle permissions\n")); return WERR_ACCESS_DENIED; } @@ -6814,9 +6879,8 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM * if (!get_printer_snum(p, handle, &snum)) return WERR_BADFID; - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(3, ("security descriptor change denied by existing " - "security descriptor\n")); + if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(2,("_spoolss_setform: denied by handle permissions\n")); return WERR_ACCESS_DENIED; } @@ -6851,6 +6915,7 @@ done: /**************************************************************************** enumprintprocessors level 1. ****************************************************************************/ + static WERROR enumprintprocessors_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { PRINTPROCESSOR_1 *info_1=NULL; @@ -6919,6 +6984,7 @@ WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS /**************************************************************************** enumprintprocdatatypes level 1. ****************************************************************************/ + static WERROR enumprintprocdatatypes_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { PRINTPROCDATATYPE_1 *info_1=NULL; @@ -7012,6 +7078,7 @@ static WERROR enumprintmonitors_level_1(NEW_BUFFER *buffer, uint32 offered, uint /**************************************************************************** enumprintmonitors level 2. ****************************************************************************/ + static WERROR enumprintmonitors_level_2(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) { PRINTMONITOR_2 *info_2=NULL; @@ -7082,6 +7149,7 @@ WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_ /**************************************************************************** ****************************************************************************/ + static WERROR getjob_level_1(print_queue_struct *queue, int count, int snum, uint32 jobid, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { int i=0; @@ -7128,9 +7196,9 @@ static WERROR getjob_level_1(print_queue_struct *queue, int count, int snum, uin return WERR_OK; } - /**************************************************************************** ****************************************************************************/ + static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uint32 jobid, NEW_BUFFER *buffer, uint32 offered, uint32 *needed) { int i=0; -- cgit From cd64cca5e6f72ae99bd39392b72bc6b12fc4f258 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 01:07:05 +0000 Subject: Fix winbindd to respect command line debuglevel as nmbd/smbd. Jeremy. --- source/nsswitch/winbindd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 5dc28a43695..6fe06c661a0 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -743,13 +743,14 @@ struct winbindd_state server_state; /* Server state information */ int main(int argc, char **argv) { + extern BOOL AllowDebugChange; extern pstring global_myname; extern fstring global_myworkgroup; extern BOOL append_log; pstring logfile; int accept_sock; BOOL interactive = False; - int opt, new_debuglevel = -1; + int opt; /* glibc (?) likes to print "User defined signal 1" and exit if a SIGUSR1 is received before a handler is installed */ @@ -785,7 +786,8 @@ int main(int argc, char **argv) /* Run with specified debug level */ case 'd': - new_debuglevel = atoi(optarg); + DEBUGLEVEL = atoi(optarg); + AllowDebugChange = False; break; /* Load a different smb.conf file */ @@ -833,9 +835,6 @@ int main(int argc, char **argv) fstrcpy(global_myworkgroup, lp_workgroup()); - if (new_debuglevel != -1) - DEBUGLEVEL = new_debuglevel; - if (!interactive) become_daemon(); -- cgit From fc141523f9fdb473f33fe34167bb3930b7970279 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 7 Mar 2002 02:20:22 +0000 Subject: Compile fix. --- source/passdb/pdb_nisplus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/passdb/pdb_nisplus.c b/source/passdb/pdb_nisplus.c index e168e487f75..1c38d4d290e 100644 --- a/source/passdb/pdb_nisplus.c +++ b/source/passdb/pdb_nisplus.c @@ -858,7 +858,7 @@ static BOOL init_nisp_from_sam(nis_object *obj, SAM_ACCOUNT *sampass, /*************************************************************** calls nis_list, returns results. ****************************************************************/ -static nis_result *nisp_get_nis_list(char *nis_name, uint_t flags) +static nis_result *nisp_get_nis_list(char *nis_name, unsigned int flags) { nis_result *result; int i; -- cgit From 300bdb8cf81bdd15df1055b6a40ef327b2ef4d3e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 04:17:23 +0000 Subject: include/smb.h: Made constants like aARCH easier to read. smbd/nttrans.c: smbd/open.c: Fixes for delete on close semantics. Jeremy. --- source/include/smb.h | 12 ++++++------ source/smbd/nttrans.c | 25 ++++++++++++------------- source/smbd/open.c | 8 ++++---- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/source/include/smb.h b/source/include/smb.h index 0e5deaf2aa4..cf5efe2c7a1 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -80,12 +80,12 @@ implemented */ #define pSETDIR '\377' /* these define the attribute byte as seen by DOS */ -#define aRONLY (1L<<0) -#define aHIDDEN (1L<<1) -#define aSYSTEM (1L<<2) -#define aVOLID (1L<<3) -#define aDIR (1L<<4) -#define aARCH (1L<<5) +#define aRONLY (1L<<0) /* 0x01 */ +#define aHIDDEN (1L<<1) /* 0x02 */ +#define aSYSTEM (1L<<2) /* 0x04 */ +#define aVOLID (1L<<3) /* 0x08 */ +#define aDIR (1L<<4) /* 0x10 */ +#define aARCH (1L<<5) /* 0x20 */ /* deny modes */ #define DENY_DOS 0 diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 93802503bf4..e406c259116 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -406,7 +406,7 @@ static int map_create_disposition( uint32 create_disposition) ****************************************************************************/ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_options, - uint32 desired_access, uint32 share_access, uint32 file_attributes) + uint32 *desired_access, uint32 share_access, uint32 file_attributes) { int smb_open_mode = -1; @@ -416,9 +416,9 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt * Convert GENERIC bits to specific bits. */ - se_map_generic(&desired_access, &file_generic_mapping); + se_map_generic(desired_access, &file_generic_mapping); - switch( desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) { + switch( *desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) { case FILE_READ_DATA: smb_open_mode = DOS_OPEN_RDONLY; break; @@ -450,15 +450,15 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt if (smb_open_mode == -1) { - if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS) + if(*desired_access == WRITE_DAC_ACCESS || *desired_access == READ_CONTROL_ACCESS) *pstat_open_only = True; - if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| + if(*desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| FILE_EXECUTE|FILE_READ_ATTRIBUTES| FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS| FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) { smb_open_mode = DOS_OPEN_RDONLY; - } else if(desired_access == 0) { + } else if(*desired_access == 0) { /* * JRA - NT seems to sometimes send desired_access as zero. play it safe @@ -470,7 +470,7 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt } else { DEBUG(0,("map_share_mode: Incorrect value 0x%lx for desired_access to file %s\n", - (unsigned long)desired_access, fname)); + (unsigned long)*desired_access, fname)); return -1; } } @@ -493,14 +493,13 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt * is the only practical way. JRA. */ - if(desired_access & DELETE_ACCESS) { + if(*desired_access & DELETE_ACCESS) { smb_open_mode |= DELETE_ACCESS_REQUESTED; DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode)); } if (create_options & FILE_DELETE_ON_CLOSE) { - /* Implicit delete access requested... */ - smb_open_mode |= DELETE_ACCESS_REQUESTED; + /* Implicit delete access is *NOT* requested... */ smb_open_mode |= DELETE_ON_CLOSE_FLAG; DEBUG(10,("map_share_mode: FILE_DELETE_ON_CLOSE requested. open_mode = 0x%x\n", smb_open_mode)); } @@ -529,7 +528,7 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt smb_open_mode |= FILE_SYNC_OPENMODE; DEBUG(10,("map_share_mode: Mapped desired access 0x%lx, share access 0x%lx, file attributes 0x%lx \ -to open_mode 0x%x\n", (unsigned long)desired_access, (unsigned long)share_access, +to open_mode 0x%x\n", (unsigned long)*desired_access, (unsigned long)share_access, (unsigned long)file_attributes, smb_open_mode )); return smb_open_mode; @@ -751,7 +750,7 @@ int reply_ntcreate_and_X(connection_struct *conn, */ RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); - if((smb_open_mode = map_share_mode(&stat_open_only, fname, create_options, desired_access, + if((smb_open_mode = map_share_mode(&stat_open_only, fname, create_options, &desired_access, share_access, file_attributes)) == -1) { END_PROFILE(SMBntcreateX); @@ -1268,7 +1267,7 @@ static int call_nt_transact_create(connection_struct *conn, * and the share access. */ - if((smb_open_mode = map_share_mode( &stat_open_only, fname, create_options, desired_access, + if((smb_open_mode = map_share_mode( &stat_open_only, fname, create_options, &desired_access, share_access, file_attributes)) == -1) return ERROR_DOS(ERRDOS,ERRbadaccess); diff --git a/source/smbd/open.c b/source/smbd/open.c index e12317f4313..ae2e89340a4 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -628,8 +628,7 @@ static void kernel_flock(files_struct *fsp, int deny_mode) /**************************************************************************** - Open a file with a share mode. On output from this open we are guarenteeing - that + Open a file with a share mode - old method. ****************************************************************************/ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, @@ -640,8 +639,7 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S } /**************************************************************************** - Open a file with a share mode. On output from this open we are guarenteeing - that + Open a file with a share mode - called from NTCreateAndX. ****************************************************************************/ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, @@ -951,6 +949,8 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", NTSTATUS result = set_delete_on_close_internal(fsp, delete_on_close); if (NT_STATUS_V(result) != NT_STATUS_V(NT_STATUS_OK)) { + /* Remember to delete the mode we just added. */ + del_share_mode(fsp, NULL); unlock_share_entry_fsp(fsp); fd_close(conn,fsp); file_free(fsp); -- cgit From 9e2331053993ce548a634436af5cdaa360cc5828 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 7 Mar 2002 20:00:45 +0000 Subject: reran autoconf --- source/configure | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/configure b/source/configure index baec57bbff9..0148037f2ab 100755 --- a/source/configure +++ b/source/configure @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -12954,7 +12954,7 @@ case "$host_os" in *solaris*) HAVE_WINBIND=yes WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" - WINBIND_NSS_EXTGRA_LIBS="-lsocket" + WINBIND_NSS_EXTRA_LIBS="-lsocket" ;; *hpux11*) HAVE_WINBIND=yes -- cgit From 6404a15eb2b48f4ce10e9c43986cfb3cada00b6d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 20:33:34 +0000 Subject: Update with tdbbackup from tridge. Jeremy. --- source/tdb/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/tdb/Makefile b/source/tdb/Makefile index b29bedf92c7..3417759124b 100644 --- a/source/tdb/Makefile +++ b/source/tdb/Makefile @@ -2,7 +2,7 @@ # Makefile for tdb directory # -CFLAGS = -DSTANDALONE -DTDB_DEBUG -O2 -g -DHAVE_MMAP=1 +CFLAGS = -DSTANDALONE -DTDB_DEBUG -pg -g -DHAVE_MMAP=1 CC = gcc PROGS = tdbtest tdbtool tdbtorture @@ -22,5 +22,8 @@ tdbtorture: tdbtorture.o $(TDB_OBJ) tdbdump: tdbdump.o $(TDB_OBJ) $(CC) $(CFLAGS) -o tdbdump tdbdump.o $(TDB_OBJ) +tdbbackup: tdbbackup.o $(TDB_OBJ) + $(CC) $(CFLAGS) -o tdbbackup tdbbackup.o $(TDB_OBJ) + clean: rm -f $(PROGS) *.o *~ *% core test.db test.tdb test.gdbm -- cgit From 21b0905042c68ac8d46f7473323f94e74045a669 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 20:41:11 +0000 Subject: Merge from HEAD for return flags for oplocks. Jeremy. --- source/smbd/nttrans.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index e406c259116..5cd0d391c4a 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -758,7 +758,9 @@ int reply_ntcreate_and_X(connection_struct *conn, } oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; - oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + if (oplock_request) { + oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + } /* * Ordinary file or directory. @@ -926,12 +928,17 @@ int reply_ntcreate_and_X(connection_struct *conn, * exclusive & batch here. */ - if (smb_action & EXTENDED_OPLOCK_GRANTED) - SCVAL(p,0, BATCH_OPLOCK_RETURN); - else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) + if (smb_action & EXTENDED_OPLOCK_GRANTED) { + if (flags & REQUEST_BATCH_OPLOCK) { + SCVAL(p,0, BATCH_OPLOCK_RETURN); + } else { + SCVAL(p,0, EXCLUSIVE_OPLOCK_RETURN); + } + } else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) { SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); - else + } else { SCVAL(p,0,NO_OPLOCK_RETURN); + } p++; SSVAL(p,0,fsp->fnum); -- cgit From e2313789c045cc48292c82eb19ce74cdbd9013eb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Mar 2002 21:51:54 +0000 Subject: Fix for machines that have their time changed forward, then back. Ensure that any cached lpq information gathered during that time doesn't stay around for longer than 1 hour. Jeremy. --- source/include/printing.h | 7 +++++++ source/printing/printing.c | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/source/include/printing.h b/source/include/printing.h index 40fe964a193..bde2bfa6bdb 100644 --- a/source/include/printing.h +++ b/source/include/printing.h @@ -1,3 +1,6 @@ +#ifndef PRINTING_H_ +#define PRINTING_H_ + /* Unix SMB/Netbios implementation. Version 3.0 @@ -65,5 +68,9 @@ extern struct printif cups_printif; #define UNIX_JOB_START PRINT_MAX_JOBID #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1) +#define MAX_CACHE_VALID_TIME 3600 + #define PRINT_SPOOL_PREFIX "smbprn." #define PRINT_DATABASE_VERSION 2 + +#endif /* PRINTING_H_ */ diff --git a/source/printing/printing.c b/source/printing/printing.c index 6699b703466..82bd2f722c4 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -775,15 +775,27 @@ int print_job_write(int jobid, const char *buf, int size) static BOOL print_cache_expired(int snum) { fstring key; - time_t t2, t = time(NULL); + time_t last_qscan_time, time_now = time(NULL); - slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum)); + slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum)); dos_to_unix(key, True); /* Convert key to unix-codepage */ - t2 = (time_t)tdb_fetch_int32(tdb, key); - if (t2 == ((time_t)-1) || (t - t2) >= lp_lpqcachetime()) { + last_qscan_time = (time_t)tdb_fetch_int32(tdb, key); + + /* + * Invalidate the queue for 3 reasons. + * (1). last queue scan time == -1. + * (2). Current time - last queue scan time > allowed cache time. + * (3). last queue scan time > current time + MAX_CACHE_VALID_TIME (1 hour by default). + * This last test picks up machines for which the clock has been moved + * forward, an lpq scan done and then the clock moved back. Otherwise + * that last lpq scan would stay around for a loooong loooong time... :-). JRA. + */ + + if (last_qscan_time == ((time_t)-1) || (time_now - last_qscan_time) >= lp_lpqcachetime() || + last_qscan_time > (time_now + MAX_CACHE_VALID_TIME)) { DEBUG(3, ("print cache expired for queue %s \ -(last_cache = %d, time now = %d, qcachetime = %d)\n", lp_servicename(snum), - (int)t2, (int)t, (int)lp_lpqcachetime() )); +(last_qscan_time = %d, time now = %d, qcachetime = %d)\n", lp_servicename(snum), + (int)last_qscan_time, (int)time_now, (int)lp_lpqcachetime() )); return True; } return False; -- cgit From 58c2b929058a056d240e9bbaf939e6b82dafad5b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Mar 2002 00:25:59 +0000 Subject: Turns out an Admin user shouldn't always have access on a handle. Jeremy. --- source/Makefile.in | 9 ++++++++- source/rpc_server/srv_spoolss_nt.c | 7 ------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index b9e0bd8cf20..42e65553c3b 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -106,7 +106,8 @@ QUOTAOBJS=@QUOTAOBJS@ # object file lists ###################################################################### -TDB_OBJ = tdb/tdb.o tdb/spinlock.o tdb/tdbutil.o +TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o +TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \ lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \ @@ -401,6 +402,8 @@ WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o @WINBIND_NSS_EXTRA WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) +TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ) + ###################################################################### # now the rules... ###################################################################### @@ -654,6 +657,10 @@ bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) $(UBIQX_OBJ) bi @$(LINK) -o $@ $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \ $(UBIQX_OBJ) $(LIBS) +bin/tdbbackup: $(TDBBACKUP_OBJ) bin/.dummy + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(TDBBACKUP_OBJ) + install: installbin installman installscripts installcp installswat installdirs: diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d75eaac1dea..2b3a34e42c0 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -913,13 +913,6 @@ Can't find printer handle we created for priunter %s\n", name )); return WERR_ACCESS_DENIED; } - /* - * An admin user always has access. - */ - - if (user.uid == 0 || user_in_list(uidtoname(user.uid), lp_printer_admin(snum))) - printer_default->access_required = PRINTER_ACCESS_ADMINISTER; - if (printer_default->access_required & PRINTER_ACCESS_ADMINISTER) printer_default->access_required = PRINTER_ACCESS_ADMINISTER; else -- cgit From 10025fbb8986a8d3cdf23b2b407a46831cd34d64 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 8 Mar 2002 04:45:21 +0000 Subject: Added case statment for decoding enumprinters level 0 result. --- source/libsmb/cli_spoolss.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libsmb/cli_spoolss.c b/source/libsmb/cli_spoolss.c index 16a95b69e17..8f0e2dc7465 100644 --- a/source/libsmb/cli_spoolss.c +++ b/source/libsmb/cli_spoolss.c @@ -442,6 +442,10 @@ NTSTATUS cli_spoolss_enum_printers( if ((*returned = r.returned)) { switch (level) { + case 0: + decode_printer_info_0(mem_ctx, r.buffer, r.returned, + &ctr->printers_0); + break; case 1: decode_printer_info_1(mem_ctx, r.buffer, r.returned, &ctr->printers_1); -- cgit From ba7c63b3ba8dd0d6879bb9da0387deff6cdb2b96 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 8 Mar 2002 14:15:14 +0000 Subject: As nobody complained, remove the course notes. Currently no html, but will be available. Volker --- docs/textdocs/kurs.pdf | Bin 371391 -> 0 bytes docs/textdocs/kurs.tex | 4856 ------------------------------------------------ docs/textdocs/logo.ps | 344 ---- 3 files changed, 5200 deletions(-) delete mode 100644 docs/textdocs/kurs.pdf delete mode 100644 docs/textdocs/kurs.tex delete mode 100644 docs/textdocs/logo.ps diff --git a/docs/textdocs/kurs.pdf b/docs/textdocs/kurs.pdf deleted file mode 100644 index e681a05ad87..00000000000 Binary files a/docs/textdocs/kurs.pdf and /dev/null differ diff --git a/docs/textdocs/kurs.tex b/docs/textdocs/kurs.tex deleted file mode 100644 index 93771c40e86..00000000000 --- a/docs/textdocs/kurs.tex +++ /dev/null @@ -1,4856 +0,0 @@ -\documentclass{scrartcl}\usepackage{pslatex}\typearea{12} -%\documentclass[ncs]{dpunkt} -\usepackage[dvips,colorlinks=true, - pdfauthor={Volker Lendecke, Service Network GmbH}, - pdftitle={Kursskript Samba}, - pdfsubject={Samba}, - pdfkeywords={samba,training} - ]{hyperref} -\usepackage[T1]{fontenc} -\usepackage{german} -\usepackage{pstricks} -\usepackage[dvips]{epsfig} -\newcommand{\prog}{\texttt} -\newcommand{\param}{\texttt} -\newcommand{\dateistyle}{\texttt} -\newcommand{\nbname}{\texttt} -\newcommand{\todo}[1]{} -\newcommand{\defin}{\emph} -\newcommand{\username}{\textbf} -\hyphenation{Net-BIOS} - -\setcounter{tocdepth}{1} - -\usepackage{fancyheadings} -\pagestyle{fancyplain} -\lhead{} -\rhead{\thepage} -\rfoot{\copyright{} 1999, 2000, 2001, Volker Lendecke -(http://www.sernet.de/vl/)} -\cfoot{} - -\author{Volker Lendecke\\\texttt{VL@SerNet.DE}} -\title{Samba for Runaways} - -\begin{document} - -\title{Kursskript\\[\baselineskip] - \epsfig{file=logo.ps,width=6cm}} - -\author{Volker Lendecke\\ -Service Network GmbH\\ -G"ottingen\\ -http://www.SerNet.DE/\\ -http://samba.SerNet.DE/} - -\date{\today} - -\maketitle -\thispagestyle{empty} - -\begin{quote} - Dieses Dokument ist eine Mitschrift des Sambakurses der Service - Network GmbH in G"ottingen. Es gibt einen guten "Uberblick "uber den - Kurs und kann gleichzeitig als generelle Einf"uhrung in NetBIOS und - Samba dienen. -\end{quote} - -\break - -\tableofcontents - -\break - -\section{Einf"uhrung} - -Samba -- Was ist das? - -Kurz gesagt l"a"st Samba jeden Unixrechner in der Netzwerkumgebung von -Windows erscheinen. Das hei"st, man kann von Windows aus auf einen -Unixrechner genau wie auf einen anderen Windowsrechner zugreifen. Der -Clientrechner merkt gar nicht, da"s er es nicht mit einem echten -Windowsserver zu tun hat. Im Detail bedeutet das, da"s sehr einfach -Dateifreigaben erstellt werden k"onnen. Jeder Benutzer kann -transparent Dateien auf seinem Heimatverzeichnis unter Unix und in -anderen freigegebenen Verzeichnissen ablegen. Weiterhin kann man -Drucker, die unter Unix ansprechbar sind, als Netzwerkdrucker in -Windows ansprechen. Dar"uber hinaus bietet Samba viele Dienste, die -sonst nur von Windows NT geleistet werden. Dazu geh"oren: - -\begin{description} - -\item[WINS-Server] Mit Samba kann sehr einfach ein WINS-Server - eingerichtet werden. Dieser stellt Namensdienste f"ur NetBIOS-Netze - zur Verf"ugung, damit sich Windows-Maschinen "uber Subnetzgrenzen - hinweg erreichen k"onnen - -\item[Computersuchdienst] Samba als sehr stabiler Server kann alle - Aufgaben des Computersuchdienstes "ubernehmen. Die in Windowsumgebungen - oft nicht sehr vorhersagbare Netzwerkumgebung kann so etwas - stabiler gemacht werden. - -\item[Logon Server] F"ur Windows-95/98 ist Samba Logon-Server, kann - also die Dom"anenanmeldung f"ur diese Systeme "ubernehmen. - -\item[PDC] Die Funktionalit"at des echten Primary Domain Controller - ist nicht vollst"andig implementiert. F"ur viele Anwendungszwecke, - insbesondere Authentifizierung von NT-Workstation\-be\-nu\-tzern, reicht - Samba jedoch v"ollig aus. - -\item[Diagnosewerkzeuge] Samba bietet eine Reihe von kleinen, aber -sehr effektiven Werkzeugen, die die oft m"uhselige Suche nach Fehlern -im Netz vereinfachen k"onnen. - -\end{description} - -Samba bietet gegen"uber anderen Implementationen des -SMB-Protokolls einige Vorteile. Teilweise sind diese Vorteile von Unix -geerbt, teilweise sind sie in der Architektur von Samba begr"undet. - -\begin{description} - -\item[Entfernte Administration] Der gr"o"ste Vorteil von Samba in - gr"o"seren Umgebungen ist die M"oglichkeit, die gesamte - Administration von der Kommandozeile aus durchzuf"uhren. Damit - bekommt man gegen"uber grafischen Oberfl"achen sehr viel bessere - M"oglichkeiten, von entfernten Standorten aus zu administrieren. - Werkzeuge wie PC Anywhere sind hier deutlich weniger flexibel. - - Zus"atzlich bietet Samba die M"oglichkeit der grafischen - Administration "uber einen Webbrowser. Auch hier ist es unerheblich, - wo sich Administrator und Server befinden. - -\item[Zentrale Konfiguration] Die gesamte Konfiguration von Samba - befindet sich in einer einzigen Datei und ist nicht "uber viele - Dialogfelder verteilt. Das erleichtert die Administration erheblich. - So l"a"st sich eine funktionierende Konfiguration sehr einfach - sichern und wieder einspielen. - -\item[Stabilit"at] Samba erbt von Unix eine hohe Stabilit"at. - Unixrechner sind daf"ur ausgelegt, "uber Monate hinweg durchzulaufen - und leisten dies auch. Samba als weiterer Proze"s profitiert von - dieser hohen Verf"ugbarkeit. Die modulare Struktur von Unix l"a"st - es dar"uber hinaus zu, da"s der Serverdienst Samba unabh"angig von - allen anderen Systemprozessen eigenst"andig neu gestartet werden - kann, sofern hier ein Problem vorliegen sollte. - - Samba hat eine Architektur, die die Stabilit"at weiter f"ordert. - F"ur jede Clientverbindung wird ein eigener Proze"s gestartet. - Verursacht also ein Client ein Problem auf Serverseite, wird - m"oglicherweise der f"ur diesen Client zust"andige Proze"s - abst"urzen. Die anderen Prozesse und damit Clients werden nicht - gest"ort. - -\item[Skalierbarkeit] Samba kann von dem vielzitierten kleinen 386er - unter Linux bis hin zu den gr"o"sten heute verf"ugbaren Maschinen - jede Hardware optimal ausnutzen. Die Architektur von Samba - erm"oglicht es, da"s auch Multiprozessormaschinen ausgelastet - werden. Multiprozessormaschinen k"onnen alle Prozessoren dann - besch"aftigen, wenn es viele unabh"angige Prozesse im System gibt. - Samba erstellt f"ur jeden Client einen Proze"s, der auf einem - eigenen Prozessor ablaufen kann. - -\item[Flexibilit"at] Samba bietet eine riesige Anzahl von - Konfigurationsoptionen, die zun"achst einmal "uberw"altigend wirkt. - Im Laufe des Kurses wird sich herausstellen, da"s f"ur das - Funktionieren von Samba nur sehr wenige Optionen wirklich notwendig - sind. Die meisten Optionen werden nur f"ur Spezialf"alle ben"otigt, - oder sind aus Kompatibilit"atsgr"unden zu sehr exotischen Clients - vorhanden. - - Soll Samba an spezielle Situationen angepa"st werden, ist es durch - ein sehr flexibles Schema von Makroersetzungen m"oglich, die - Konfigurationsdatei weitgehend dynamisch zu ver"andern. Damit sind - erheblich mehr Konfigurationsm"oglichkeiten gegeben als mit Windows. - Als Beispiel sei genannt, da"s man sehr einfach einen Sambaserver - unter zwei verschiedenen Namen in der Netzwerkumgebung erscheinen - lassen kann, und beide virtuelle Server unterschiedlich - konfigurieren kann. Zu Testzwecken ist es sogar m"oglich, zwei - unterschiedliche Versionen gleichzeitig auf einer Maschine laufen zu - lassen. - -\end{description} - -Der Kostenaspekt ist hier bewu"st nicht mit aufgef"uhrt worden. Samba -als freie Software\footnote{Samba wird hier bewu"st als \emph{freie} - Software im Sinne des GNU-Projektes verstanden. Samba ist dadurch - nat"urlich auch Open Source Software} ist unter den Bedingungen der -GNU General Public License f"ur alle Zwecke kostenlos einsetzbar. -Damit entstehen beim Einsatz von Samba keinerlei Lizenzkosten. Samba -ist jedoch nicht kostenlos. Es m"ussen Administratoren eingewiesen -werden, wenn Support ben"otigt wird, kann dieser viel Geld kosten. - -Das Hauptaugenmerk sollte hier auf dem Aspekt liegen, da"s Samba -h"aufig einfach die technisch beste L"osung ist. Ein Kunde stand -beispielsweise vor der Aufgabe, einige bestehende, kleinere NT-Server -durch eine gr"o"sere L"osung zu ersetzen. Durch einen einzigen gro"sen -NT-Server w"aren die bestehenden Server sehr wohl zu ersetzen gewesen. -Das Problem bestand nun darin, da"s in vielen Dokumenten die -vorhandenen Servernamen "uber Objektreferenzen auf vollst"andige -UNC-Pfadnamen hart kodiert waren. Damit mu"sten die vorhandenen -Servernamen definitiv erhalten bleiben, um nicht jedes Dokument -anfassen zu m"ussen. Ein einziger Server unter NT kam also nicht in -Frage, unter Samba jedoch sehr wohl. Samba erlaubt die Einrichtung -virtueller Server unter verschiedenen Namen auf einer einzigen -Maschine. Mehr dazu ab Seite \pageref{virtuelle-server}. - -\section{Eine einfache Konfiguration} - -F"ur den Anfang soll hier eine einfache Konfiguration beschrieben -werden, mit der ein Samba-Server im Netz erscheint und einige, wenige -Dienste anbietet. Diese einfache Konfiguration soll als Startpunkt das -Experimentieren in den weiteren Kapiteln erleichtern. Die einzelnen -Parameter werden hier kurz erkl"art, in weiteren Kapiteln gibt es -ausf"uhrlichere Erkl"arungen. - -Samba wird mit der Datei \prog{smb.conf} konfiguriert. Je nach Unix -oder Linux-Distribution kann diese Datei an unterschiedlichen Orten zu -finden sein: \prog{/etc/smb.conf}, \prog{/etc/samba/smb.conf} oder -auch \prog{/usr/local/samba/lib/smb.conf}, wenn Samba selbst -kompiliert wurde. Wurde die Datei \prog{smb.conf} wie beschrieben -angelegt, m"ussen zwei D"amonen gestartet werden: Der \prog{nmbd} und -der \prog{smbd}. An dieser Stelle unterscheiden sich die Unix- und -Linuxversionen erheblich, so da"s keine allgemeinen Hinweise gegeben -werden k"onnen. Verschiedene M"oglichkeiten sind: - -\begin{verbatim} -/etc/init.d/smb start -/sbin/init.d/smb start -/usr/local/samba/sbin/nmbd -D; /usr/local/samba/sbin/smbd -D -rcsmb start -\end{verbatim} - -Die \prog{smb.conf} f"ur eine einfache Konfiguration k"onnte so -aussehen: - -\begin{verbatim} -[global] - workgroup = samba - netbios name = sambaserver - interfaces = eth0 - - encrypt passwords = yes - -[homes] - valid users = %S - writeable = yes - browseable = no - -[cdrom] - path = /cdrom - -[public] - path = /pub - writeable = yes -\end{verbatim} - -Wenn man mit dieser Einstellung Zugriff auf den Server erm"oglichen -m"ochte, mu"s man f"ur jeden Benutzer einen Eintrag in der Datei -\dateistyle{smbpasswd} machen, da verschl"usselte Pa"sw"orter -(\param{encrypt passwords = yes}) eingesetzt werden. Dies geschieht -beispielsweise f"ur den Benutzer \username{linux} "uber: - -\begin{verbatim} -delphin:~ # smbpasswd -a linux -New SMB password: -Retype new SMB password: -Added user linux. -delphin:~ # -\end{verbatim} - -Die einzelnen Zeilen haben folgende Wirkung: - -\begin{description} -\item[\param{[global]}] leitet globale Servereinstellungen ein. Alle - anderen Abschnitte beschreiben Freigaben. -\item[\param{workgoup = samba}] legt die Arbeitsgruppe fest, in der - der Server auftauchen soll. -\item[\param{netbios name = sambaserver}] gibt dem Server einen Namen, - unter dem er im Netz erscheint. -\item[\param{interfaces = eth0}] beschreibt das Netzwerkinterface, auf - dem Samba Dienste anbieten soll. Selbst wenn der Rechner nur ein - einziges Netzwerkinterface hat, sollte dieser Parameter angegeben - werden. Die vorhandenen Interfaces bekommt man bei den meisten - Unixsystemen "uber den Befehl \prog{netstat -ian} heraus. - \todo{netstat -ian?} -\item[\param{encrypt passwords = yes}] verlangt vom Client, da"s keine - Klartextpa"sw"orter "ubertragen werden. Mit modernen Clients gibt es - Probleme, wenn man diese Option nicht aktiviert. Au"serdem m"ochte - man aus Sicherheitsgr"unden seine Pa"sw"orter nicht allen mitteilen. -\item[\param{[homes]}] leitet die Freigabe der Heimatverzeichnisse - s"amtlicher Benutzer ein. Jeder Benutzer bekommt eine eigene - Freigabe unter seinem eigenen Namen und hat damit einen eigenen - Bereich, auf dem er schreiben kann. -\item[\param{valid users = \%S}] beschr"ankt den Zugriff auf den - Benutzer, der sich verbinden m"ochte. -\item[\param{writeable = yes}] vergibt Schreibrecht auf die Freigabe. - Standardm"a"sig wird nur Lesezugriff vergeben. -\item[\param{browseable = no}] versteckt die Freigabe \param{[homes]} - in der Netzwerkumgebung. Der Client zeigt sie nicht mehr als - \param{[homes]} an, sondern nur noch unter dem Benutzernamen. -\item[\param{[cdrom]}] leitet eine weitere Freigabe ein. -\item[\param{path = /cdrom}] gibt den genannten Pfad frei. Dieser mu"s - selbstverst"andlich im Dateisystem existieren. -\item[\param{[public]}] macht noch eine Freigabe im Netz. Die - Parameter sollten jetzt selbsterkl"arend sein. -\end{description} - -Mit dieser minimalen \dateistyle{smb.conf} sollte es auf jeden Fall -m"oglich sein, auf den Rechner zuzugreifen. Wenn man Probleme mit der -Konfiguration weiterer Dienste bekommt, sollte man von einer -m"oglichst einfachen Konfiguration ausgehen und dann Schritt f"ur -Schritt weitere Parameter hinzunehmen. - - - -\section{NetBIOS} - -Sobald Windowsrechner Dateisysteme austauschen, sich gegenseitig in -der Netzwerkumgebung sehen oder Drucker freigeben, funktioniert die -Kommunikation "uber NetBIOS\footnote{Dies ist in reinen Windows 2000 - Umgebungen nicht mehr richtig. Microsoft hat bei Windows 2000 die - NetBIOS-Ebene abgeschafft, Windows 2000 kommuniziert direkt "uber - TCP. Aus Kompatibilit"atsgr"unden kann Windows 2000 jedoch noch - "uber NetBIOS kommunizieren.}. Was ist NetBIOS? Je nachdem, wen man -fragt, bekommt man unterschiedliche Antworten. Fragt man IBM, ist -NetBIOS ein Protokoll, viele andere bezeichnen NetBIOS als reine -Softwareschnittstelle zur Kommunikation von Rechnern. Mit dieser -Schnittstelle werden Programmen unterschiedliche Dienste zur -Kommunikation zur Verf"ugung gestellt. NetBIOS wurde entworfen, um in -kleinen, lokalen Netzen Kommunikation zu erm"oglichen. Beim Entwurf -von NetBIOS wurde zun"achst darauf geachtet, die Dinge sehr einfach zu -halten, um sie in kleinen lokalen Netzen anwendbar zu machen. Auf -Skalierbarkeit und die Andwendung in Weitverkehrsnetzen wurde beim -Design nicht geachtet. - -\subsection{NetBIOS-Dienste} - -Die Kommunikation mit NetBIOS wurde in drei Teilbereiche aufgeteilt, -den Namens-, den Datagramm- und den Sitzungsdienst. - -\begin{description} - -\item[Namensdienst:] Im Rahmen des Namensdienstes sind die Rechner in - der Lage, sich gegenseitig im Netz zu identifizieren. Es sei an - dieser Stelle betont, da"s der NetBIOS-Namensdienst nichts mit der - Anzeige in der Netzwerkumgebung zu tun hat. Der Computersuchdienst, - der f"ur die Netzwerkumgebung zust"andig ist, h"angt jedoch sehr - stark von einem korrekt funktionierenden Namensdienst ab. - -\item[Datagrammdienst:] Betrachtet man die Rechnerkommunikation auf - dem Netz, so sieht man, da"s die versendeten Daten in einzelne - Pakete aufgeteilt werden. Diese einzelnen Pakete werden dann vom - Netz nach bestem Bem"uhen an einen Zielrechner ausgeliefert. Geht - ein Paket verloren, kann man nichts machen, man bekommt unter - Umst"anden nicht einmal eine Benachrichtigung dar"uber, da"s etwas - nicht stimmt. Aufeinanderfolgende Pakete k"onnen au"serdem in - vertauschter Reihenfolge beim Empf"anger ankommen. Es kann sogar - sein, da"s Pakete auf dem Weg dupliziert werden, also mehrfach - ankommen. - - Ein solches Netzwerk ist folglich zun"achst einmal unzuverl"assig. - Diese Unzuverl"assigkeit des Netzes wird durch den Datagrammdienst - an die Benutzerprogramme weitergegeben. Das hei"st, wenn ein - Programm den Datagrammdienst nutzt, kann es nicht sicher sein, da"s - die Daten"ubertragung gew"ahrleistet ist. Das Programm mu"s selbst - daf"ur sorgen, da"s mit Paketverlust vern"unftig umgegangen wird. - - Der Datagrammdienst hat jedoch nicht nur Nachteile. Zwei Vorteile - sind der geringe Aufwand, mit dem Pakete verschickt werden k"onnen, - und die M"oglichkeit, ein Datagramm an mehrere Rechner gleichzeitig - zu verschicken. Die Applikation mu"s selbst entscheiden, wie sie mit - der Unzuverl"assigkeit des Dienstes klarkommt. - -\item[Sitzungsdienst:] Die Unzuverl"assigkeit des Netzes ist f"ur - bestimmte Applikationen wie Dateitransfer oder Terminalanwendungen - nicht akzeptabel. Wenn man eine Datei "ubertr"agt, m"ochte man - sicher sein, da"s die Datei komplett und korrekt "ubertragen wurde. - F"ur diese h"oheren Anforderungen wurde der Sitzungsdienst - entworfen. Zwei Rechner vereinbaren eine NetBIOS-Sitzung. Die Daten, - die "uber diese Verbindung "ubertragen werden, kommen auf jeden Fall - an, und zwar in der richtigen Reihenfolge. K"onnen Daten einmal - nicht "ubertragen werden, so erh"alt die versendende Applikation - eine Fehlermeldung. Die Applikation kann nun versuchen, die - abgebrochene Sitzung neu aufzubauen. Dieser Zuverl"assigkeit steht - ein erh"ohter Aufwand beim Sitzungsauf- und -abbau gegen"uber. - -\end{description} - -\subsection{NetBIOS-Namensdienst} - -Zwei Rechner, die kommunizieren wollen, m"ussen sich zun"achst gegenseitig -identifizieren. NetBIOS sieht hierf"ur bis zu 16 Zeichen lange Namen -vor. Jede Applikation kann f"ur sich beliebig viele Namen reservieren -und unter einem dieser Namen Verbindungen aufbauen und Daten austauschen. -Diese Reservierung von Namen gilt sowohl f"ur Server, die vom Netz aus -erreichbar sein m"ussen, als auch f"ur Clients, die Server im Netz -erreichen wollen, da Server wissen m"ussen, wohin die Antworten -gehen m"ussen. - -Wollen zwei Anwendungen per NetBIOS miteinander kommunizieren, mu"s -zun"achst der Server seine Bereitschaft kundtun, Verbindungen -entgegenzunehmen. Dazu meldet er sich im Netz mit seinem Namen an. -Diese Anmeldung geschieht per Broadcast, so da"s alle im Netz -mith"oren k"onnen. Jeder Rechner ist frei, beliebige Namen im Netz -f"ur sich zu beanspruchen, sofern diese noch nicht belegt -sind\footnote{Mit dieser Freiheit ergeben sich viele M"oglicheiten, - von einem beliebigen Rechner aus ein Windows-Netz bis zur - Unbenutzbarkeit zu st"oren. Man mu"s nur den Namen der Dom"ane mit - dem Namenstyp \nbname{1d} zum richtigen Zeitpunkt reservieren und - reserviert halten. Dann bootet der PDC nicht mehr sauber.}. - -Eine Reservierung geschieht, indem ein Rechner per Broadcast -ank"undigt, da"s er unter einem bestimmten Namen erreichbar ist. Dann -wartet er auf Protest. Beklagt sich niemand, schickt er einen zweiten -Reservierungsversuch und wartet wieder. Nach dem dritten -Reservierungsversuch ist der Rechner ausreichend sicher, da"s kein -anderer den Namen bereits f"ur sich eingenommen hat, und sieht ihn als -f"ur sich reserviert an. - -Wenn nun ein Client mit einem Server reden m"ochte, dann mu"s er sich -wie der Server einen eindeutigen Namen ausdenken und im Netz -reservieren. Das Verfahren dazu ist identisch. Zus"atzlich mu"s der -Client jedoch die MAC-Adresse des Servers herausbekommen. Die -Mechanismen, wie dies geschieht, h"angen davon ab, wie NetBIOS -implementiert ist. - -\subsection{NetBIOS-Implementationen} - -NetBIOS kann mit unterschiedlichen Protokollen implementiert werden. -NetBEUI, IPX und TCP/IP sind drei heute verwendete Protokolle, wobei -f"ur Neuinstallation TCP/IP das bevorzugte Protokoll sein sollte. -Der Ablauf der Namensaufl"osung soll an einem -Beispiel verdeutlicht werden. - -Auf einem Client soll eine Verbindung zu dem Server \nbname{samba} -aufgebaut werden. Direkt erreicht man dies, indem man in der Taskleiste -Start $\rightarrow$ Ausf"uhren $\rightarrow$ \verb|\\samba| eingibt. -Im folgenden werden die unterschiedlichen Verfahren betrachtet, mit -denen ein Rechner die MAC-Adresse des Servers herausbekommt. - -\begin{description} - -\item[NetBEUI:] - - \textbf{"`Samba"'$\,\Rightarrow\,$MAC-Adresse} - - Bei diesem Protokoll findet der Client den Server ausschlie"slich - "uber Broadcasts. Er verschickt per Broadcast eine Anfrage, wer sich - f"ur den gesuchten Namen verantwortlich f"uhlt. Der Rechner, der - diesen Namen tats"achlich als Server reserviert hat, wird aufgrund - dieser Anfrage seine eigene MAC-Adresse aus dem ROM seiner - Netzwerkkarte auslesen und entsprechend antworten. Daraufhin kann - der Client dann die Verbindung aufbauen. "Uber NetBEUI k"onnen also - nur Rechner miteinander reden, die in der gleichen Broadcastdom"ane - liegen. Sobald Router zum Einsatz kommen sollen, kann reines NetBEUI - nicht mehr verwendet werden, da dann der Server, der kontaktiert - werden soll, von der Namensanfrage nichts mehr mitbekommt, also auch - nicht antworten kann. - -\item[IPX] - - \textbf{"`Samba"'$\,\Rightarrow\,$IPX-Knotenadresse - $\,\Rightarrow\,$MAC-Adresse} - - Bei IPX liegt zwischen Servernamen und der MAC-Adresse die - IPX-Knotenadresse. Diese enth"alt eine 4 Byte lange Netzwerknummer - und die 6 Byte lange MAC-Adresse des Rechners. Die Knotenadresse - wird anhand des NetBIOS-Namens wie bei NetBEUI per Broadcast im - lokalen Netz gesucht. Damit w"aren Rechner hinter Routern nicht - erreichbar, da die Namensanfrage nicht zu ihnen durchdringt. - IPX-Router erkennen jedoch diese Namensanfragen und leiten sie per - Broadcast in s"amtliche angeschlossenen Netze weiter, so da"s die - Anfrage jedes Teilnetz erreicht. - - Jede Anfrage l"ost einen Broadcast in jedem angeschlossenen Subnetz - aus. Einige IPX-Router speichern eine Namenstabelle und k"onnen so - viele Anfragen selbst beantworten, so da"s die Broadcastlast - reduziert wird. - -\item[TCP/IP] - - \textbf{"`Samba"'$\,\Rightarrow\,$IP-Adresse$\,\Rightarrow\, - $MAC-Adresse} - - Bei TCP/IP mu"s der Client die IP-Adresse des Servers herausfinden. - Dies geschieht wie bei den anderen Protokollen per Broadcast im - lokalen Netz. IP-Router k"onnen nicht angewiesen werden, die - Anfragen per Broadcast in alle angeschlossenen Netze weiterzuleiten. - Aus diesem Grund gibt es hier andere Mechanismen, die im folgenden - beschrieben werden. - - Nachdem die IP-Adresse herausgefunden wurde, kommen die bekannten - Mechanismen von IP zum Tragen. Befindet sich der Rechner im eigenen - Subnetz, wird direkt eine ARP-Anfrage nach der MAC-Adresse - ausgel"ost. Andernfalls wird der entsprechende Router anhand der - Routingtabelle herausgefunden und dann dessen MAC-Adresse per ARP - festgestellt. - - Wenn NetBIOS "uber TCP/IP verwendet wird, kommen folgende Protokolle - und Ports zum Einsatz: - - \label{protokolle-und-ports} -% \begin{tabular}{|L|L|L|L|}\hline -% \LCC -% \tabulargray&\tabulargray&\tabulargray&\tabulargray\\ -% \tabularheader{Dienst}&\tabularheader{Protokoll}&\tabularheader{Port}& -% \tabularheader{Proze"s}\\ -% \hline -% \ECC -% &&&\topseparation -% Namensdienst & UDP &137 & \prog{nmbd} \\ -% Datagrammdienst & UDP &138 & \prog{nmbd} \\ -% Sitzungsdienst & TCP &139 & \prog{smbd} -% \bottomseparationline -% \end{tabular} - \begin{center}\begin{tabular}{|l|l|l|l|}\hline - Dienst&Protokoll&Port&Samba-Proze"s\\ - \hline\hline - Namensdienst & UDP &137 & \prog{nmbd} \\\hline - Datagrammdienst & UDP &138 & \prog{nmbd} \\\hline - Sitzungsdienst & TCP &139 & \prog{smbd}\\\hline - \end{tabular} -\end{center} - -\end{description} - -Die Protokolle ordnen sich folgenderma"sen ein: - -\begin{figure}[ht] -\[\begin{pspicture}(12,6) -\psframe(3,0)(9,1) -\rput(6,0.5){Hardware} -\psframe(3,1)(5,3) -\rput(4,2){TCP/IP} -\psframe(5,1)(7,3) -\rput(6,2){NetBEUI} -\psframe(7,1)(9,2) -\rput(8,1.5){IPX} -\psframe(7,2)(9,3) -\rput(8,2.5){NWLink} -\psframe(3,3)(9,4) -\rput(6,3.5){{\bfseries NetBIOS}} -\psframe(0,4)(2,5) -\rput(1,4.5){ping} -\psline(0,4)(3,3) -\psline(2,4)(5,3) -\psframe(10,3)(12,4) -\rput(11,3.5){NWClient} -\psline(7,2)(10,3) -\psline(9,2)(12,3) -\psframe(3,4)(6,5) -\rput(4.5,4.5){SMB} -\psframe(3,5)(6,6) -\rput(4.5,5.5){Datei, Druck} -\psframe(6,4)(9,6) -\rput(7.5,5.5){Andere} -\rput(7.5,5){NetBIOS-} -\rput(7.5,4.5){Anwendungen} -\end{pspicture}\] -\caption{Protokollstapel} -\label{protokollstapel} -\end{figure} - -In dieser Grafik steht das Programm \prog{ping} f"ur beliebige -Programme, die direkt auf TCP/IP aufsetzen. Dies gilt beispielsweise -f"ur alle WWW-Browser und f"ur die Programme \prog{telnet} und -\prog{ftp}. - -Man kann festhalten, da"s NetBEUI hier das einzige Protokoll ist, das -nicht "uber Routergrenzen hinweg verwendbar ist. Sowohl IPX als auch -IP sind f"ur den Einsatz in Weitverkehrsnetzen entworfen worden und -k"onnen folglich mit Routern umgehen. - -Samba ist ausschlie"slich in der Lage, NetBIOS "uber TCP/IP zu -benutzen. Daher werden die anderen Protokolle ab hier ignoriert. F"ur -ein gut funktionierendes Netzwerk ist es jedoch sehr wichtig, da"s auf -den Clients nur die Protokolle installiert sind, die \emph{wirklich} -ben"otigt werden. Ist beispielsweise noch NetBEUI zus"atzlich zu -TCP/IP installiert, ist nicht klar, ob die Netzwerkumgebung in der -NetBEUI- oder die in der TCP/IP-Welt gelten soll. Normalerweise ist -heute ausschlie"slich noch TCP/IP notwendig. IPX kann dann noch -ben"otigt werden, wenn es Novellsysteme im Netz gibt. - -\section{Bestandteile von Samba} - -Das Programmpaket Samba besteht aus mehreren Programmen, von denen -einige der Serverseite und andere der Clientseite zugeordnet werden -k"onnen. - -\subsection{Die Servertools} - -\begin{description} - -\item[smbd] ist der zentrale Serverproze"s, der f"ur die eigentlichen - Datei- und Druckdienste zust"andig ist. Sie werden mehrere - \prog{smbd}s im System finden. Einer dieser Prozesse h"ort auf dem - TCP-Port 139, und nimmt neue Verbindungen entgegen. Jede neue - Verbindung st"o"st einen neuen \prog{smbd} Proze"s an. Wenn Sie - einen Client vom Sambaserver trennen wollen, m"ussen Sie nur mit - \prog{smbstatus} die Proze"snummer des zust"andigen \prog{smbd} - erfragen, und diesen einen Proze"s t"oten. - - Jeder \emph{aktive} Client ben"otigt etwa 1-2 MB Hauptspeicher auf dem - Server. Clients, die gerade nicht aktiv Dateien mit dem Sambaserver - austauschen, ben"otigen praktisch "uberhaupt keine Resourcen. Viel - Hauptspeicher kann von Samba selbstverst"andlich gut als Cache - genutzt werden. - -\item[nmbd] ist f"ur die NetBIOS Namens- und Datagrammdienste - zust"andig. Dieser Proze"s reserviert beim Start von Samba die - entsprechenden NetBIOS-Namen, er kann WINS-Server sein und ist f"ur - den Computersuchdienst zust"andig. - -\item[testparm] Mit diesem Programm kann man die \dateistyle{smb.conf} - auf syntaktische Korrektheit pr"ufen. Das Programm liest die - Konfigurationsdatei ein und gibt Fehlermeldungen aus, sofern es - unbekannte Parameter findet. - -\item[smbpasswd] wird zur Pflege der verschl"usselten Pa"sw"orter auf - Serverseite verwendet. Wie dies funktioniert, wird im Kapitel - \ref{passwoerter} erkl"art. - -\item[smbcontrol] Mit diesem Programm lassen sich die D"amonen von - Samba kontrollieren. Beispielsweise kann man f"ur einzelne D"amonen - den Debuglevel gezielt auf einen gew"unschten Wert setzen. - -\end{description} - -\subsection{Die Clients} - -\begin{description} - -\item[smbclient] Mit dem Programm \prog{smbclient} kann man auf - Freigaben von NT-Rechnern zugreifen. Man kann auf von NT zur - Verf"ugung gestellten Druckern drucken und man kann NT-Freigaben in - tar-Dateien sichern. Weiterhin kann mit \prog{smbclient} die Liste - der Server im Netz erfragt werden, analog zu der Netzwerkumgebung - unter Windows. - -\item[nmblookup] ist ein Diagnosewerkzeug f"ur die - NetBIOS-Namensaufl"osung. Wenn zwei Computer mit Windows sich nicht - finden k"onnen, kann man mit \prog{nmblookup} deren Versuche, sich - gegenseitig zu finden, genau nachstellen. Ebenso k"onnen WINS-Server - befragt werden und ein NetBIOS Node Status abgefragt werden. Das - entsprechende Programm auf unter Windows ist das - Kommandozeilenprogramm \prog{nbtstat}. - -\item[smbcacls:] Mit diesem Programm lassen sich von Unix aus Access - Control Lists auf Windows-Dateien auslesen und setzen. Ist Samba mit - ACL-Support kompiliert, geht dies selbstverst"andlich auch f"ur die - auf Unix abgelegten Dateien. - -\end{description} - -\subsection{Weitere Serverkomponenten} - -\begin{description} - -\item[smb.conf:] Die zentrale Konfigurationsdatei von Samba. Ist Samba - als fester Systembestandteil installiert, findet sie sich in der - Regel unter \dateistyle{/etc/smb.conf}. Wurde Samba selbst - kompiliert, so liegt sie h"aufig unter - \dateistyle{/usr/local/samba/lib/smb.conf}. - -\item[/var/lock/samba:] Samba ben"otigt ein Verzeichnis, in dem es - tempor"are Lockdateien und Datenbanken ablegen kann. Wird Samba ohne - besondere Optionen selbst kompiliert, liegt dieses Verzeichnis unter - \dateistyle{/usr/local/samba/var}. - -\item[/etc/smbpasswd] ist die Pa"swortdatenbank von Samba, sofern mit - verschl"usselten Pa"s\-w"ortern gearbeitet wird. Bei selbst - kompilierten Sambaversionen liegt diese Datei h"aufig im Verzeichnis - \dateistyle{/usr/local/samba/private/}. - -\end{description} - -\section{NetBIOS-Konfiguration mit Samba} - -Als erstes soll eine minimale Konfiguration von Samba erreicht werden, -mit der jeder Rechner in der Netzwerkumgebung zu sehen ist. Dazu -sollte die Datei \dateistyle{smb.conf} folgenderma"sen aussehen: - -\begin{verbatim} -[global] -workgroup = arbeitsgruppe -interfaces = / -\end{verbatim} - -\label{aufbau-smb.conf} -Der grunds"atzliche Aufbau der \dateistyle{smb.conf} gleicht dem Aufbau der -.INI-Dateien von Windows 3. Die Datei ist in mehrere Abschnitte -unterteilt, die jeweils durch einen Abschnittsnamen eingeleitet -werden. Dieser Abschnittsname selbst wird in eckige Klammern gesetzt. -Der Inhalt jedes Abschnitts besteht nun aus Parameterzuweisungen. Im -Beispiel gibt es nur den Abschnitt \param{global}. In diesem werden -Festlegungen getroffen, die den Server als ganzes betreffen. Wenn -sp"ater Freigaben erstellt werden, geschieht dies durch Anlegen von -weiteren Abschnitten. - -Mit dem Parameter \param{workgroup =} wird die Arbeitsgruppe -festgelegt, in der sich der Server befinden soll. - -Der Parameter \label{interfaces}\param{interfaces =} ist einer der -wichtigsten Parameter der Sambakonfiguration. Er ist deshalb so -wichtig, weil damit das Funktionieren des NetBIOS-Systems innerhalb -von Samba garantiert wird. Sp"ater wird deutlich werden, da"s gro"se -Teile der Kommunikation auf Broadcasts basieren. Mit \prog{netstat - -ia} bekommt man auf den meisten Unix-Systemen Informationen "uber -die vorhandenen Netzwerkinterfaces. Mit \prog{ifconfig } -kann man sich dann n"ahere Informationen anzeigen lassen. - -Der Parameter \param{interfaces =} weist Samba an, diese und keine -andere Schnittstelle zu nutzen. Dar"uberhinaus ist Samba nun in der -Lage, die Broadcastadresse, die auf dieser Schnittstelle g"ultig ist, -zu bestimmen. Theoretisch k"onnte Samba die Broadcastadresse -selbst"andig herausfinden, aber es gibt keinen portablen Weg, dies -"uber Systemgrenzen hinweg zu tun. Das sicherste ist, Samba direkt -"uber die Broadcastadresse zu informieren. - -Meistens funktioniert zus"atzlich zur Notation - -\begin{verbatim} -interfaces = / -\end{verbatim} - -\noindent auch \prog{interfaces = }. - -Mit diesen beiden Einstellungen wird man direkt den Sambarechner in -der Netzwerkumgebung sehen. Will man Tests auf NetBIOS-Ebene -durchf"uhren, sollte man zur Vereinfachung zwei weitere Parameter -setzen. Mit diesen drei Parametern bekommt man einen \emph{komplett - offenen} Server. Die Parameter werden in sp"ateren Abschnitten -genauer erkl"art. Die vollst"andige \dateistyle{smb.conf} sieht -folgenderma"sen aus: - -\begin{verbatim} -[global] -workgroup = arbeitsgruppe -interfaces = / -security = share -encrypt passwords = yes -\end{verbatim} - -Mit dieser Konfiguration kann Samba gestartet werden. Es werden die -beiden D"amonen \prog{nmbd} und \prog{smbd} ben"otigt. Diese kann man -direkt von der Kommandozeile starten. - -Setzt man SuSE Linux ein, so kann man Samba mit dem Aufruf - -\begin{verbatim} -rcsmb start -\end{verbatim} - -Damit Samba beim n"achsten Hochfahren automatisch gestartet wird, -sollte die Variable \texttt{START\_SMB} in der Datei -\dateistyle{/etc/rc.config} auf \texttt{yes} gesetzt werden. - -Es ist denkbar, den Aufruf beider Programme durch den \prog{inetd} -durchf"uhren zu lassen. Bei Samba ist dies jedoch nicht sinnvoll. -Insbesondere der \prog{nmbd} mu"s auf jeden Fall beim Start des -Systems hochfahren, da dieser im NetBIOS-System Namen f"ur sich -reservieren mu"s. W"urde er erst bei der ersten Anfrage gestartet, -h"atten Windowsrechner keine M"oglichkeit, den Sambarechner zu finden. -Au"serdem wird sich der \prog{nmbd} nicht wieder beenden, sobald er -einmal gestartet wurde. Der \prog{smbd} k"onnte durch den \prog{inetd} -gestartet werden. Jedoch ist der Resourcenbedarf nicht so hoch, da"s -die erh"ohte Startzeit damit gerechtfertigt werden k"onnte. - -Nachdem alle Sambaserver gestartet wurden, sollten diese in der -Netzwerkumgebung der beteiligten Windowsrechner erscheinen. - -\section{Namensaufl"osung per Broadcast} - -Mit \prog{nmblookup} kann man direkt eine NetBIOS-Namensanfrage -ausl"osen. - -\begin{quote} -\begin{small}\begin{verbatim} -vlendec@server:/home/vlendec> nmblookup server -querying server on 192.168.1.255 -192.168.1.3 server<00> -vlendec@linux:/home/vlendec> -\end{verbatim}\end{small} -\end{quote} - -An diesem Beispiel wird deutlich, wie die NetBIOS-Namensaufl"osung -normalerweise arbeitet. Es wird ein Paket an der Adresse 192.168.1.255 -versendet, das hei"st an die Broadcastadresse im lokalen Subnetz. Um -NetBIOS-Namensanfragen zu erm"oglichen, mu"s Samba in der Lage sein, -die Broadcastadresse herauszufinden, an die das Paket geschickt werden -soll. \prog{nmblookup} entnimmt diese Adresse der Zeile -\param{interfaces =} der \dateistyle{smb.conf}. F"ur Tests kann man -\prog{nmblookup} mit dem Parameter -B anweisen, die Anfragen an eine -andere Broadcastadresse zu versenden. - -\begin{quote}\begin{small}\begin{verbatim} -vlendec@delphin:~ > nmblookup -B 192.168.234.31 server -querying server on 192.168.234.31 -name_query failed to find name server -vlendec@delphin:~ > -\end{verbatim}\end{small}\end{quote} - -In diesem Beispiel wurde die Broadcastadresse auf 192.168.1.31 -gesetzt. Diese Broadcastadresse gilt in Subnetz 192.168.1.0/27. Jedoch -f"uhlte sich der \prog{nmbd}, der f"ur diesen Namen verantwortlich -ist, nicht angesprochen. Folglich hat er nicht auf diese Namensanfrage -geantwortet. - -Unter Windows kann man die Namensanfrage so isoliert nicht ausl"osen, -man mu"s eine Verbindung aufbauen. Windows unterh"alt einen Cache, in -dem erfolgreiche Anfragen zwischengespeichert werden. Diesen kann man -sich mit \prog{nbtstat -c} anzeigen und mit \prog{nbtstat -R} l"oschen. -Man kann eine Anfrage erzwingen, indem man mit leerem Namenscache eine -Verbindung aufbaut, beispielsweise durch ein \prog{net view - \textbackslash{}\textbackslash{}samba}. - -Die Fehlermeldung, wenn eine NetBIOS-Namensanfrage fehlschl"agt, -lautet im GUI: "`Der Netzwerkpfad wurde nicht gefunden"'. Auf der -Kommandozeile kommt noch die Fehlermeldung 53 dazu. - -Mit \prog{nmblookup} und \prog{nbtstat} kann man sich zus"atzlich die -von einem Rechner reservierten Namen ausgeben lassen. Die -entsprechende Operation nennt sich \defin{Node Status Request} und -wird durch den Parameter \prog{nmblookup -A } ausgel"ost. -Die Ausgabe eines solchen Node Status Request zeigt, da"s ein Rechner -f"ur sich nicht nur einen einzigen Namen reserviert, sondern gleich -mehrere. - -\begin{quote}\begin{small}\begin{verbatim} -vlendec@delphin:~ > nmblookup -A 192.168.234.5 -Looking up status of 192.168.234.5 -received 6 names - NT4WKS <00> - B - SAMBA <00> - B - NT4WKS <03> - B - ADMINISTRATOR <03> - B - NT4WKS <20> - B - SAMBA <1e> - B -num_good_sends=0 num_good_receives=0 - -vlendec@delphin:~ > -\end{verbatim}\end{small}\end{quote} - -Zun"achst gibt es die Einzelnamen, zum Beispiel den Computernamen -selbst. F"ur diese gilt die Regel, da"s sie nur ein einziges Mal im -gesamten Netz auftauchen d"urfen. Sie werden reserviert und stehen dem -entsprechenden Rechner dann exklusiv zur Verf"ugung. Daneben gibt es -die Gruppennamen, die im Node Status Request durch \texttt{} -markiert sind. Diese kann es mehrfach im Netz geben. Die Gruppennamen -sind insbesondere als Ziele f"ur NetBIOS-Datagramme interessant. -Beispielsweise reserviert jeder Teilnehmer an einer Arbeitsgruppe den -NetBIOS-Gruppennamen \nbname{arbeitsgruppe<00>}. Damit kann ein -Rechner mit einem einzigen verschickten Datagramm an diesen Namen -s"amtliche Rechner in dieser Arbeitsgruppe erreichen. - -Zus"atzlich f"allt auf, da"s beispielsweise der Computername selbst -als Einzelname mehrfach reserviert ist. Hier kommen die -unterschiedlichen Namenstypen ins Spiel. Das 16. Byte eines -NetBIOS-Namens ist f"ur ein Typfeld reserviert. So sind -unterschiedliche Anwendungen auf einem Rechner in der Lage, sich Namen -zu reservieren, ohne sich gegenseitig zu st"oren. Der Wert des -Typfeldes wird hexadezimal in spitzen Klammern angegeben. - -Zun"achst die Einzelnamen, die h"aufig auftauchen: - -\begin{description} - -\item[computername$<$00$>$] Hiermit tut der Rechner einfach seine -Existenz kund. Wenn ein Rechner auf Resourcen anderer Rechner zugreift, -wird als Clientname dieser Name benutzt. - -\item[computername$<$20$>$] Dieser Name wird f"ur den Serverdienst -reserviert. Wenn ein Rechner als Datei- oder Druckserver angesprochen -werden soll, dann wird eine Verbindung zu diesem NetBIOS-Namen aufgebaut. - -\item[computername$<$03$>$] Unter diesem Namen meldet sich der -Nachrichtendienst des Rechners an. Kurze Meldungen, die unter Windows -NT mit dem Kommando \prog{net send} abgesetzt werden, und unter -Windows 95 mit dem Programm Winpopup verschickt werden, kann der -Rechner damit empfangen und am Bildschirm anzeigen. - -\item[arbeitsgruppe$<$1d$>$] Dieser Rechner ist der so genannte - \defin{Locale Master Browser}, der die Liste s"amtlicher Rechner in - der Netzwerkumgebung pflegt. - -\item[arbeitsgruppe$<$1b$>$] Dieser Rechner ist der \defin{Domain - Master Browser}, der "uber Subnetzgrenzen hinweg f"ur die - Netzwerkumgebung zust"andig ist. - -\end{description} - -Einige Gruppennamen werden ebenfalls reserviert: - -\begin{description} - -\item[arbeitsgruppe$<$00$>$] Ein Rechner verk"undet hiermit seine - Zugeh"origkeit zu einer Arbeitsgruppe. Beispielsweise k"onnen - Winpopup-Meldungen an eine ganze Arbeitsgruppe versendet werden. - Dies geschieht per Datagramm an diesen Namen. - -\item[arbeitsgruppe$<$1c$>$] Jeder Domain Logon Server reserviert - diesen Namen f"ur sich. Clients finden ihre Domain Controller "uber - diesen NetBIOS-Namen. - -\item[arbeitsgruppe$<$1e$>$] Wahlen zum Local Master Browser werden - "uber diesen Namen abgewickelt. Siehe hierzu Kapitel - \ref{netzwerkumgebung}. - -\end{description} - -Damit sind die f"ur Datei- und Druckerdienste wichtigsten Namenstypen -beschrieben. Sobald unter NT andere Dienste installiert werden, kommen -andere Namenstypen hinzu. Exchange zum Beispiel nutzt die Namenstypen -22, 23 und 24. Mehr Namenstypen findet man in der Microsoft Knowlegde -Base unter Artikel Nummer Q163409. - -\section{Netzwerkumgebung} -\label{netzwerkumgebung} - -Die Netzwerkumgebung ist eine Anzeige, in der s"amtliche Server im Netz -aufgef"uhrt sind. Alle Rechner, die Datei- oder Druckfreigaben -zur Verf"ugung stellen, erscheinen dort oder sollten es zumindest, wenn alles -reibungslos funktioniert. Jeder Client, der auf eine solche Resource -zugreifen m"ochte, kann sich die Liste der Server im Netz geben lassen. Damit -diese Anzeige nicht zu un"ubersichtlich ger"at, werden die Rechner in so -genannte Arbeitsgruppen aufgeteilt. Jeder Rechner wird einer Arbeitsgruppe -zugeordnet, in erscheint und die er als erstes beim Doppelklick auf das -Symbol "`Netzwerkumgebung"' angezeigt. Die anderen Arbeitsgruppen sind -ebenfalls "uber den Unterzweig "`Gesamtes Netzwerk"' sichtbar. - -Bez"uglich des Zugangs zu Arbeitsgruppen findet keinerlei Authentifizierung -statt. Jeder Rechner kann frei f"ur sich entscheiden, in welcher Arbeitsgruppe -er erscheinen m"ochte, jeder im Netz kann sich beliebige Arbeitsgruppen -anzeigen. Dies gilt ebenfalls, wenn im Netz mit NT-Dom"anen gearbeitet wird. -NT-Dom"anen haben nur eher zuf"allig im Netz ein der Arbeitsgruppe "ahnliches -Erscheinungsbild. - -Das klingt verwirrend, ist es vermutlich beim ersten Lesen auch. Zum -Verst"andnis des Windows-Networking mu"s man drei Begriffe ganz klar -von einander trennen: - -\begin{description} -\item[NetBIOS] Unter jeglicher Kommunikation von Windowsrechnern liegt - das API NetBIOS. Mit Hilfe des NetBIOS sind Rechner im Netz - ansprechbar, sie k"onnen verschiedenste Dienste anbieten. Einer - dieser Dienste ist die Netzwerkumgebung. -\item[Arbeitsgruppe] Eine Arbeitsgruppe ist eine reine Liste von - Rechnern. Sie hat mit NetBIOS \emph{ausschlie"slich} als - Transportmedium zu tun. Der Dienst, der die Netzwerkumgebung bereit stellt, -k"onnte theoretisch vollst"andig unabh"angig von NetBIOS implementiert werden, -ist in der Praxis aber sehr von einem funktionierenden NetBIOS abh"angig. - -\item[Dom"ane] Eine Dom"ane bezeichnet etwas v"ollig anderes als eine - Arbeitsgruppe.Eine Dom"ane ist eine gemeinsam genutzte - Benutzerdatenbank. Microsoft hat in seiner Implementation einer - Dom"ane die Einschr"ankung gemacht, da"s alle Rechner einer Dom"ane - in einer Arbeitsgruppe auftauchen m"ussen. Das hei"st aber nicht, - da"s alle Rechner in der Arbeitsgruppe einer Dom"ane auch die - gemeinsame Benutzerdatenbank nutzen m"ussen. -\end{description} - -Das Auftauchen eines Rechners in der Netzwerkumgebung hat nichts mit -seiner Erreichbarkeit zu tun, es ist h"ochstens ein vager Hinweis -darauf, da"s man es dort einmal versuchen kann. Ein Rechner -erreichbar sein, aber nie auftauchen, oder er kann in der -Netzwerkumgebung stehen, aber lange nicht mehr erreichbar sein. - -Die \defin{Netzwerkumgebung} ist einer der instabileren Aspekte von -Windows. Hiermit kann man sich, sofern alles funktioniert, alle -Rechner in einer Arbeitsgruppe anzeigen lassen. Dabei dauert es -mitunter geraume Zeit, bis ein Rechner in einer Anzeige erscheint, und -es dauert unter Umst"anden noch l"anger, bis er wieder verschwindet. - -Eine naive Implementation k"onnte so aussehen: Jeder Rechner, -der Serverdienste anbietet, teilt dies regelm"a"sig per Broadcast im Netz -mit. Ein solches Vorgehen hat jedoch mehrere Nachteile. Erstens -w"urde die Last im Netz mit jedem zus"atzlichen Rechner stark -ansteigen. Zweitens mu"s jeder Rechner, der die Netzwerkumgebung anzeigen -will, relativ komplexe Software laufen lassen. Und drittens scheitert dieses -Schema auf jeden Fall an Subnetzgrenzen, die f"ur Broadcasts eine -Grenze darstellen. Aus diesen Gr"unden ist man einen anderen Weg -gegangen. - -Der \defin{Local Master Browser\footnote{Der Local Master Browser - wird in der deutschen Dokumentation von Windows - \emph{Computersuchdienst} genannt. Der Domain Master Browser ist - der Dom"anenhauptsuchdienst. Local Master Browser finde ich sehr - viel handlicher, und daher werde ich den englischen Begriff - verwenden.}} (im Folgenden auch LMB genannt) ist ein Rechner, der -im Netz die Netzwerkumgebung pflegt. Dieser Rechner wird nirgendwo -zentral bestimmt, sondern er wird gew"ahlt. Diese Wahl findet immer -dann statt, wenn einer der beteiligten Rechner feststellt, da"s es im -Moment keinen solchen Local Master Browser gibt. Beispielsweise -kann der Explorer von Windows eine solche Wahl ansto"sen. Wenn Windows -95 beim "Offnen der Netzwerkumgebung die geschwenkte Taschenlampe anzeigt, -wird der LMB gesucht. Ist -keiner vorhanden, wird eine Wahl angesto"sen. - -Die Wahl erfolgt mit Datagrammen an den Gruppennamen -\nbname{arbeitsgruppe<1e>}. Ein Rechner verschickt ein Datagramm an -diesen Namen. Jeder Rechner, der diesen Namen reserviert hat, h"ort -dieses Datagramm und entscheidet, wie er selbst vorgehen soll. In dem -Datagramm sind verschiedene Kriterien zur Wahl enthalten, -beispielsweise das Betriebssystem des versendenden Rechners. Hieraus folgt, -da"s es in einem Subnetz f"ur jede vorhandene Arbeitsgruppe einen LMB gibt. - -Empf"angt beispielsweise eine Windows NT Workstation ein Paket von -einem Windows NT Server, so entscheidet sie, da"s sie die Wahl -verloren hat. Damit wird sie selbst nicht mehr aktiv. Kommt dieses -Paket jedoch von einem Rechner mit Windows 95, so h"alt sie sich -selbst f"ur geeigneter, den Local Master Browser zu "ubernehmen. -Dann wird sie selbst ein solches Wahlpaket mit ihren Parametern -versenden. Der Windows 95 Rechner empf"angt dies, und sieht, da"s er -verloren hat. Auf diese Weise schaukelt sich die Wahl hoch, bis der -"`beste"' Rechner die Wahl gewinnt. - -Wenn es nun mehrere Windows NT Workstations im Netz g"abe, dann -w"are die Wahl unentschieden. An dieser Stelle kommt die \emph{Uptime} -der Rechner ins Spiel. Der Rechner, der am l"angsten l"auft, gewinnt -die Wahl. Nun kann es sein, da"s nach einem Stromausfall zwei Rechner -genau die gleiche Uptime haben. Dann kommt als letztes und eindeutiges -Entscheidungskriterium der NetBIOS-Name des Rechners zum Zug. Der -alphabetisch vorne stehende Rechner gewinnt. Mit diesen drei Kriterien -ist eine eindeutige Wahl gesichert. - -Samba ordnet sich in der Standardeinstellung zwischen Windows 95 und -Windows NT ein, das hei"st, gegen Windows 95 gewinnt Samba die Wahl, -"uberl"a"st jedoch Windows NT Rechnern den Local Master Browser. - -Drei Parameter in der \dateistyle{smb.conf} bestimmen das Verhalten von Samba -in der Wahl zum Local Master Browser: - -\begin{description} - -\item[\param{os level}] Damit wird die Einordnung von Samba in die - unterschiedlichen Betriebssysteme geregelt. Diese haben f"ur die - Betriebssystemstufe folgende Werte: - -\[\begin{tabular}{|l|r|} -\hline -Windows for Workgroups & 0 \\ -\hline -Windows 95/98 & 1 \\ -\hline -Windows NT Workstation & 16 \\ -\hline -Samba & 20 \\ -\hline -Windows NT Server & 32 \\ -\hline -\end{tabular}\] - -Diese Werte sind nicht als fest anzusehen. Wenn ein neues Service Pack -f"ur ein Betriebssystem herausgegeben wird, ist es m"oglich, da"s in -der Software f"ur den Local Master Browser Fehler bereinigt wurden. -Dann ist es sinnvoll, da"s diese neue Software die Rolle des LMB -"ubernimmt. - -Der Parameter \param{os level} kann Werte von 0 bis 255 annehmen. -Setzt man ihn auf 255, wird nach einer erfolgreichen Wahl niemand mehr -Local Master Browser werden k"onnen. - -\item[\param{local master}] M"ochte man auf keinen Fall den LMB auf - einem Sambarechner haben, so setzt man den Parameter \param{local - master = no}. Dann nimmt Samba an keiner Wahl teil. - -\item[\param{preferred master}] Mit der Standardeinstellung - \param{preferred master = no} sucht Samba beim Start nach - einem LMB. Findet er einen, meldet er sich dort. Findet er keinen - LMB, bleibt Samba passiv. Jemand anders mu"s eine Wahl ansto"sen. - Wenn dann eine Wahl stattfindet, nimmt Samba teil und ordnet sich - anhand seines \param{os level} ein. - -\end{description} - -Es ist sehr sinnvoll, den Local Master Browser st"andig auf einer -festen Maschine laufen zu lassen. H"aufige Wechsel des Local Master -Browser lassen die Netzwerkumgebung aus zwei Gr"unden sehr instabil -werden. Erstens m"ussen sich die Server im Netz h"aufig an neuen Local -Master Browsern anmelden. Diese Anmeldung erfolgt per UDP und kann -auch mal fehlschlagen. Zweitens kann es passieren, da"s ein Client den -Wechsel eines Local Master Browser nicht mitbekommt und Informationen -von einem nicht mehr aktuellen Local Master Browser beziehen m"ochte. -Ein Sambaserver ist typischerweise eine Maschine, die als Server -durchl"auft und auch deutlich stabiler als Windows-Clients ist. Mit -den Einstellungen - -\begin{verbatim} -[global] -os level = 100 -preferred master = yes -\end{verbatim} - -\noindent -kann man sicher sein, da"s der Sambarechner immer den Local Master -Browser innehat. \param{preferred master = yes} stellt sicher, da"s -beim Start von Samba eine Wahl angesto"sen wird, und mit \param{os - level = 100} gewinnt Samba diese Wahl gegen alle anderen Maschinen -im Netz. Es sei denn, ein anderer Administrator von Samba kommt auf -die Idee, einen noch h"oheren Wert f"ur den \param{os level} zu -benutzen. - -\section{NetBIOS "uber Subnetzgrenzen} - -\newcommand{\computer}[2]{% - \rput[t](0,0){% - \begin{pspicture}(2,2) - \psframe(0,0.5)(2,1.5) - \psline(1,1.5)(1,2) - \rput(1,1){\texttt{#1}} - \rput[b](1,0.2){{\footnotesize IP: #2}} - \end{pspicture}}} -\newcommand{\network}[1]{% - \rput[l](0,0){% - \begin{pspicture}(#1,0.6) - \psline(0,0)(0,0.6) - \psline(0,0.3)(#1,0.3) - \psline(#1,0)(#1,0.6) - \end{pspicture}}} -\newcommand{\routednet}{% -\rput[lb](0,0){% -\begin{pspicture}(10,5.5) -\rput(0,5){\network{7}} -\rput(2,5){\computer{WKS}{192.168.1.5}} -\rput(3,2){\network{7}} -\rput(8,2){\computer{SERVER}{192.168.2.8}} -\rput(5.5,3.75){\psframe(-1,-0.25)(1,0.25)} -\rput(5.5,3.75){{\footnotesize 192.168.1.1}} -\rput(5.5,3.25){\psframe(-1,-0.25)(1,0.25)} -\rput(5.5,3.25){{\footnotesize 192.168.2.1}} -\psline(5.5,4)(5.5,5) -\psline(5.5,2)(5.5,3) -\end{pspicture}}} - -Die wenigsten Firmen haben heutzutage nur ein einziges LAN. Entweder -sind verschiedene Geb"aude oder Standorte mit Routern verbunden, oder -jemand w"ahlt sich in das Firmennetz ein. In diesen F"allen -funktioniert die Namensaufl"osung nicht mehr wie beschrieben. Wird die -Namensreservierung und -aufl"osung ausschlie"slich per Broadcast -durchgef"uhrt, kann man Rechner, die hinter Routern liegen, nicht -erreichen. Broadcasts verbleiben in den Subnetzen, in denen sie -ausgesendet wurden. - -\begin{figure}[ht]\[ -\begin{pspicture}(10,6) -\rput(0,0){\routednet} -\psline{<-}(0,5.5)(2.7,5.5) -\psline{->}(4.3,5.5)(7,5.5) -\rput(3.5,5.5){\texttt{SERVER?}} -\end{pspicture}\] -\caption{Namensanfrage per Broadcast} -\label{broadcastanfrage} -\end{figure} - -In der dargestellten Situation sind zwei Netze "uber einen Router -verbunden. Jeder der beiden Rechner reserviert seinen Namen in dem ihm -zugeordneten Subnetz. Die Workstation \nbname{WKS} schickt ihre -Reservierungen per Broadcast an 192.168.1.255, und der Server -\nbname{SERVER} wird seinen Namen auf 192.168.2.255 reservieren. Der -Router zwischen beiden bekommt diese Reservierungen zwar mit, wird sie -aber nicht in das jeweils andere Subnetz weiterleiten. Wenn nun -\nbname{WKS} ihren Server \nbname{SERVER} sucht, geschieht dies -ebenfalls per Broadcast an 192.168.1.255. Diese Anfrage bleibt wie -dargestellt im oberen Subnetz und erreicht \nbname{SERVER} gar nicht, -so da"s dieser auch nicht antworten kann. - -\subsection{\nbname{LMHOSTS}} - -Der einfachste Weg, die Namensaufl"osung "uber Subnetzgrenzen hinweg -zu realisieren, geht "uber eine statische Tabelle. Unter Windows -liegt diese in der Datei \dateistyle{LMHOSTS}. Sie liegt abh"angig von der -Windowsversion in unterschiedlichen Verzeichnissen und l"a"st sich am -einfachsten mit der Suchfunktion des Desktops finden. Diese Datei ist -"ahnlich aufgebaut wie die Datei \dateistyle{/etc/hosts} unter Unix. Ein -Beispieleintrag ist der folgende: - -\verb|192.168.1.5 samba| - -Die Eintr"age in der \dateistyle{LMHOSTS} k"onnen durch den Zusatz -\texttt{\#PRE} erg"anzt werden. Dieser Zusatz legt fest, in welcher -Reihenfolge die Namensaufl"osung vorgenommen wird. Ist kein -\texttt{\#PRE} vorhanden, so wird zun"achst eine konventionelle -Namensaufl"osung per Broadcast versucht. Erst, wenn diese -fehlschl"agt, wird in der \dateistyle{LMHOSTS} nachgeschaut. Ist der Zusatz -vorhanden, so wird ohne Namensaufl"osung direkt der Wert in der -\dateistyle{LMHOSTS} verwendet. - -Die Namensaufl"osung "uber die Datei \dateistyle{LMHOSTS} hat wie die -Datei \dateistyle{/etc/hosts} den entscheidenden Nachteil, da"s sie -auf jedem Rechner einzeln gepflegt werden mu"s. Das macht diese Art -der Namenspflege sehr schnell unwartbar. Die Syntax der -\dateistyle{LMHOSTS} l"a"st einen einfachen Trick zu, mit dem zentral -eine \dateistyle{LMHOSTS}\footnote{Zentrale LMHOSTS} vorgehalten -werden kann, das Statement \nbname{\#INCLUDE}. Man stellt an zentraler -Stelle eine Freigabe zur Verf"ugung, in der die \dateistyle{LMHOSTS} -steht, und f"ugt sie automatisch bei jedem booten in die Liste auf den -Clients ein. Dazu mu"s einmalig auf den Clients die -\dateistyle{LMHOSTS} folgenderma"sen aufgesetzt werden: - -\begin{verbatim} -192.168.1.1 samba #PRE -#INCLUDE \\samba\public\lmhosts -\end{verbatim} - -Die einzelnen Werte sind nat"urlich den Gegebenheiten vor Ort -anzupassen. Es ist darauf zu achten, da"s die Worte \nbname{\#PRE} und -\nbname{\#INCLUDE} in Gro"sbuchstaben geschrieben sind. Bei den Namen -selbst die Gro"sschreibung egal. - -\subsection{WINS} - -Die zweite M"oglichkeit, das Problem zu l"osen, ist ein zentraler -Server, der die NetBIOS-Namen in einer Datenbank dynamisch pflegt. -Dazu gibt es den WINS-Server. Ein solcher Server ist ein Rechner, bei -dem sich jede NetBIOS-Applikation im Netz mit ihren Namen anmeldet. -Die IP-Adresse dieses Servers mu"s jedem Rechner mitgeteilt werden. -Bei Windows geschieht dies in den Eigenschaften des TCP/IP Protokolls -im Reiter WINS-Adresse. Setzt man DHCP-Server ein, kann man ebenfalls -den WINS-Server festlegen. Samba bekommt die Adresse mit dem Parameter -\param{wins server = } im Abschnitt \param{[global]} der -\dateistyle{smb.conf} mitgeteilt. Sobald ein Client die IP-Adresse des -WINS-Servers kennt, ist es v"ollig gleichg"ultig, ob sich dieser im -gleichen Subnetz befindet oder nicht. - -Die Namensreservierung erfolgt nicht mehr per Broadcast, sondern mit -einem gerichteten UDP-Paket an den WINS-Server. Gerichtete Pakete -leitet der Router wie jedes andere Paket an den WINS-Server weiter. -Dieser sieht in seiner Tabelle nach, ob der Name bereits reserviert -ist. Ist das nicht der Fall, so wird er spontan eine Best"atigung der -Reservierung zur"uckschicken. Diese Reservierung gilt nun f"ur eine -bestimmte Zeit und mu"s rechtzeitig erneuert werden. - -Ist der Name bereits reserviert, wird der WINS-Server den bisherigen -Besitzer befragen, ob er den Namen noch ben"otigt. Bekommt er keine -Antwort, wird er dem neuen Besitzer ebenfalls eine Best"atigung -schicken. M"ochte der alte Besitzer den Namen noch verwenden, so wird -der Anfragende eine Ablehnung der Reservierung erhalten. Diese -Nachfrage ist notwendig, um einem abgest"urzten Rechner das spontane -Booten zu erm"oglichen, da bei einem Absturz keine Freigabe der -Namensreservierung erfolgen kann. - -Die Namensanfrage, die in Abbildung \ref{broadcastanfrage} den Server -nicht erreichte, weil der Router keine Broadcasts weitergibt, wird nun -direkt an den WINS-Server gerichtet, der in seiner Tabelle nachsehen -kann. - -\begin{figure}[ht]\[ -\begin{pspicture}(10,6) -\rput(0,0){\routednet} -\rput(4,2){\computer{WINS}{192.168.2.5}} -\psline[linestyle=dashed,linearc=0.25] - {->}(2.5,4.5)(3.2,4.9)(5.3,4.9)(5.3,2)(4.5,1.5) -\rput(3.5,5.8){\texttt{SERVER?}} -\end{pspicture}\] -\caption{WINS-Anfrage} -\end{figure} - -Samba kann als WINS-Server konfiguriert werden, indem der Parameter -\param{wins support = yes} gesetzt wird. Ist dieser Parameter gesetzt, -kann Samba nach einem Neustart bei allen Clients und allen sonstigen -Servern als WINS-Server eingetragen werden. Werden diese dann neu -gestartet, melden sie sich beim WINS-Server an. - -Wenn nun ein Rechner mit Samba als WINS-Server konfiguriert ist, und -sich die anderen Rechner dort anmelden, werden diese in der Datei -\dateistyle{/var/lock/samba/wins.dat} abgelegt. Der \prog{nmbd} pflegt -diese Datei dynamisch, je nach Reservierungen und Abmeldungen. Die -Datei \dateistyle{wins.dat} wird in regelm"a"sigen Abst"anden geschrieben. -Wenn es notwendig sein sollte, den wirklich aktuellen Stand -unabh"angig von diesem Zeitintervall zu erhalten, so kann man dem -\prog{nmbd} das \prog{HANGUP}-Signal durch den Befehl \prog{killall --HUP nmbd} senden. Au"serdem wird die \dateistyle{wins.dat} beim Beenden -des \prog{nmbd} geschrieben. - -Diese Datenbank wird auf Festplatte gehalten, damit die Daten einen -Neustart von Samba "uberleben. Jeder Rechner, der einen Namen f"ur -sich reserviert hat, hat diese Reservierung f"ur einen bestimmten -Zeitraum ausgesprochen. Wenn Samba jetzt neu gestartet werden sollte, -und dadurch die Datenbank verloren ginge, w"are der gesamte -NetBIOS-Namensraum nicht mehr verf"ugbar. Au"serdem kann ein WINS -Server die angeschlossenen Clients weder von sich aus finden, noch sie -darum bitten, sich erneut zu registrieren. Daher ist die WINS -Datenbank "uber Neustarts von Samba hinaus zu erhalten. - -Die Anfrage, die die Workstation \nbname{WKS} absetzt, wird nun nicht -mehr per Broadcast gestellt, sondern mit einem gerichteten Paket an -den WINS-Server, bei dem sich alle Rechner angemeldet haben. - -%\[\setlength{\unitlength}{1mm} -%\begin{picture}(100,60)(0,20) -%\put(0,0){\routednet} -%\put(30,75){\makebox(0,0)[l]{{\ttfamily\bfseries SERVER?}}} -%\curve(17,65, 20,72, 29,75) -%\tagcurve(40,75, 50,75, 57,65, 57,45, 45,38, 40,30, 30,20) -%\put(50,45){\circle*{1}} -%\put(40,40){\computer{WINS}{192.168.2.5}} -%\end{picture}\] - -WINS hat gegen"uber der broadcastbasierten Namensreservierung einige -Vorteile. Namensreservierung per Broadcast ben"otigt Wartezeiten. Es -wird die Reservierung angek"undigt, es wird gewartet, die Reservierung -wird erneut angek"undigt, und es wird wieder gewartet. Dieses Spiel -wiederholt sich mehrfach, bis der Rechner sicher sein kann, da"s ein -eventueller Vorbesitzer des Namens genug Zeit hatte, sich zu beklagen. -Beim Einsatz von WINS entfallen diese Wartezeiten, da hier ein -einziger Rechner s"amtliche reservierte Namen registriert und in -seiner Tabelle nachschauen kann. Daher ist die Reservierung per -NetBIOS deutlich schneller, und auch weniger netzbelastend. Selbst -wenn man also nur ein einziges Subnetz hat, sollte man zur Reduzierung -der Netzlast den Einsatz eines WINS-Servers in Erw"agung ziehen. - -Zus"atzlich sei hier angemerkt, da"s es netzwerkweit nur einen -einzigen WINS-Server geben darf. Selbst wenn es unterschiedliche -Arbeitsgruppen oder Dom"anen gibt, darf es nicht mehr als einen -WINS-Server geben. Setzt man mehrere WINS-Server ein, hat man -getrennte Namensr"aume und handelt sich damit massive Probleme ein, da -Windows Namen sowohl beim WINS als auch per Broadcast aufl"ost. - -Rechner im einen Namensraum k"onnen mit Rechnern, die an einem anderen -WINS-Server angeschlossen sind, nicht kommunizieren, da die Namen -nicht aufgel"ost werden k"onnen. Namen, die beim WINS nicht bekannt -sind, werden von Windows zus"atzlich lokal per Broadcast aufgel"ost. -Das hei"st, man findet beim einige Rechner nur per WINS, andere auch -lokal. Die Fehlerdiagnose wird dadurch stark erschwert. - -Unter Windows NT kann man mehrere WINS-Server einsetzen, die sich -gegenseitig abstimmen. Diese Replikation stellt sicher, da"s die -Clients unabh"angig von der Anzahl der WINS-Server nur eine einzige -Namensdatenbank sehen. Die WINS-Server stellen sich somit gegen"uber -den Clients als eine konsistente Datenbank dar. - -Die Abfrage eines WINS-Servers durch \prog{nmblookup} erfolgt -beispielhaft folgenderma"sen: - -\begin{verbatim} -nmblookup -R -U 192.168.1.5 samba -\end{verbatim} - -Hiermit wird der WINS-Server, der auf dem Rechner 192.168.1.5 liegt, -nach dem Namen \nbname{samba} befragt. - -Samba kennt zwei zus"atzliche Funktionen, die es im Zusammenhang mit -WINS interessant machen. Einerseits kann Samba als WINS Proxy -eingerichtet werden, indem \param{wins proxy = yes} gesetzt wird. Ist -diese Einstellung aktiv, dann wird Samba s"amtliche Reservierungen und -Anfragen, die es aus dem lokalen Netz per Broadcast erh"alt, an den -mit \prog{wins server =} konfigurierten WINS-Server weiterleiten. -Stellt man mit dieser Einstellung einen Samba-Server in ein Subnetz, -werden s"amtliche Rechner in diesem Netz werden nun beim WINS -angemeldet, und nutzen diesen auch. Dies ist auch dann der Fall, wenn -sie entweder selbst keinen WINS-Server ansprechen k"onnen oder nicht -daf"ur konfiguriert sind. Man sollte jedoch in jedem Fall eine echte -Konfiguration des WINS-Servers auf dem Client vorziehen. Ein WINS -Proxy kann nur eine Behelfsl"osung sein, da man sich damit auf einen -weiteren Rechner verl"a"st. - -Unter Windows kann man statische Eintr"age im WINS vornehmen. Dies -geht so direkt unter Samba nicht. Man mu"s hierzu den Parameter -\param{dns proxy = yes} auf dem WINS-Server setzen. Empf"angt der WINS -Server nun eine Anfrage, die er nicht aus seiner Datenbank beantworten -kann, wird er eine ganz normale Unix-Hostnamenanfrage machen. -Typischerweise wird er in der \dateistyle{/etc/hosts} nachschauen und -danach dann das DNS anhand der Konfiguration in der Datei -\dateistyle{/etc/resolv.conf} befragen. Damit ist es durch einen Eintrag -auf dem WINS-Server m"oglich, den gesamten DNS-Namensraum auch in der -NetBIOS-Namenswelt zur Verf"ugung zu stellen. - -\section{Windows-Namensaufl"osung im Detail} - -Um die Namensaufl"osung unter Windows zu verstehen, mu"s man zwei -Arten von Anwendungen unterscheiden: - -\begin{description} -\item[NetBIOS-Anwendungen:] Dies sind die klassischen - Windows-Programme, zum Beispiel um Laufwerke mit einem Server zu - verbinden, oder um Outlook mit dem Exchange-Server zu verbinden. Die - gesamte Netzwerkumgebung geh"ort ebenfalls zu den - NetBIOS-Anwen\-dun\-gen. -\item[TCP/IP-Anwendungen:] Telnet, ping und Netscape geh"oren zu den - Anwendungen, die es nur in der TCP/IP-Protokollfamilie gibt. Bei - diesen funktioniert die Namensaufl"osung etwas anders als bei den - NetBIOS-Anwendungen. -\end{description} - -Wenn eine {\bfseries NetBIOS-Anwendung} einen Namen aufl"osen will, -dann geschieht dies in mehreren Schritten, die nacheinander -ausgef"uhrt werden, bis der Name gefunden ist. - -\begin{enumerate} -\item Das System schaut im NetBIOS-Namenscache nach. Dieser kann durch - \prog{nbtstat -c} vom Benutzer abgefragt werden. -\item Ist ein WINS-Server konfiguriert, so wird dieser befragt. -\item Kann der Name im WINS nicht aufgel"ost werden, so wird eine - Broadcast-Anfrage ausgel"ost. -\item Es wird in der Datei \dateistyle{LMHOSTS} nachgesehen. -\item Sofern in den Eigenschaften von TCP/IP die DNS-Aufl"osung f"ur - NetBIOS-Namen aktiviert ist, wird nun an das Aufl"osungssystem f"ur - TCP/IP-Anwendungen "ubergeben. -\end{enumerate} - -Wenn man Namen in die Datei \dateistyle{LMHOSTS} eintr"agt, so werden diese -erst nach den WINS- und Broadcast-Timeouts ber"ucksichtigt. Wenn man -diese sofort aufgel"ost haben m"ochte, so kann man sie mit dem Zusatz -\nbname{\#PRE} versehen. Dann werden sie beim n"achsten Reboot -dauerhaft in den NetBIOS-Namenscache geladen. Im laufenden Betrieb -kann man dieses Laden in den Namenscache durch ein \prog{nbtstat -R} -erzwingen. - -Setzt man f"ur die IP-Adre"svergabe DHCP ein, kann man Windows-Clients -die IP-Adresse des WINS-Servers auf diesem Weg mitteilen. Tut man -dies, mu"s man den Clients ebenfalls einen Knotentyp zuweisen. Die -oben beschriebene Tabelle gilt f"ur den Knotentyp 8, den sogenannten -H-Knoten. Setzt man den Knotentyp auf 4, so bekommt man einen -M-Knoten, der zuerst Broadcast und dann WINS ausf"uhrt. Diese -Einstellung ist jedoch nur in Ausnahmef"allen sinnvoll, da jede -Anfrage beim WINS die Broadcastlast im Netz reduziert. - -Die Namensaufl"osung f"ur {\bfseries TCP/IP-Anwendungen} ist -einfacher. - -\begin{enumerate} -\item Zun"achst wird in der Datei \dateistyle{HOSTS} nachgesehen. -\item Ist ein DNS-Server konfiguriert, wird dieser befragt. -\item Der DNS-Name wird, so wie er ist, an die - NetBIOS-Namensaufl"osung "ubergeben. Damit kann f"ur interne Systeme - vermeiden, sie ins DNS aufnehmen zu m"ussen. Will man etwa einen - Proxy unter dem Namen "`proxy"' einrichten, gen"ugt es, auf dieser - Maschine einen korrekt konfigurierten \prog{nmbd} zu installieren, - der den Namen "`proxy"' registriert. Damit kann man auf allen - Browsern einfach "`proxy"' eintragen. -\end{enumerate} - -\todo{Tabelle} - -Die Namensaufl"osung von Samba ist weit weniger kritisch als die von -Window-Systemen, da Samba in der Regel ausschlie"slich als Server -auftritt. Samba als Server ist es gleichg"ultig, wie Namen aufgel"ost -werden k"onnen. Es gibt zwei Situationen, in denen Samba Namen -aufl"osen mu"s: - -\begin{description} -\item[smbclient] Samba als Client mu"s offensichtlich Namen aufl"osen. -\item[Samba als Dom"anenmitglied] Mit dem Parameter \param{password - server} wird Samba als Dom"anenmitglied mitgeteilt, welcher - Dom"anencontroller f"ur Pa"sw"orter zust"andig ist. Es ist enorm - wichtig, da"s f"ur diese Funktion die Namensaufl"osung korrekt - funktioniert. -\end{description} - -Wie Windows kennt Samba vier Mechanismen zur Namensaufl"osung: -Broadcast, WINS, LMHOSTS und die normale Unix-Namensaufl"osung. Die -Reihenfolge, in der die Mechanismen abgefragt werden, wird durch den -Parameter \param{name resolve order} festgelegt. Mit den vier Werten -\param{bcast}, \param{wins}, \param{lmhosts} und \param{host} werden -die vier Mechanismen beschrieben. Die Standardreihenfolge ist - -\begin{verbatim} -name resolve order = lmhosts host wins bcast -\end{verbatim} - -\noindent und legt fest, da"s vor der Windows-Namensaufl"osung zun"achst das -DNS -befragt wird. Dies ist h"aufig ein Problem f"ur \prog{smbclient}, da -man m"oglicherweise auf einen DNS-Timeout warten mu"s, bevor die -Windows-Namensaufl"osung benutzt wird. In vielen F"allen kann es von -Vorteil sein, f"ur Samba als Client vollst"andig auf die -DNS-Namensaufl"osung zu verzichten oder sie ans Ende der Liste zu -stellen: - -\begin{verbatim} -name resolve order = lmhosts wins bcast host -\end{verbatim} - -\section{Browsing "uber Subnetzgrenzen} -\label{browsing-im-wan} - -So, wie die Netzwerkumgebung in Abschnitt \ref{netzwerkumgebung} -betrachtet wurde, funktioniert sie nur in einem einzigen lokalen Netz. -Die Wahl zum Local Master Browser funktioniert per Datagramm, das an -den Namen \nbname{arbeitsgruppe<1e>} gesendet wird. -\nbname{arbeitsgruppe<1e>} ist ein Gruppenname, der von mehreren -Rechnern reserviert sein kann. Das hei"st, da"s ein Datagramm an -diesen Namen mehrere Rechner erreichen mu"s. Dies geschieht bei -NetBIOS "uber TCP/IP mit einem UDP-Paket an die Broadcastadresse im -lokalen Netz. Allein hieraus ergibt sich, da"s es pro Arbeitsgruppe in -jedem Subnetz einen eigenen LMB geben mu"s. Jeder LMB bekommt aus -seinem Subnetz die Informationen "uber vorhandene Server. - -Um diese Einschr"ankung zu umgehen, gibt es den Domain Master Browser -(DMB). Der DMB ist ein Rechner, der die Serverlisten von allen LMBs -einsammelt und auf Anforderung wieder herausgibt. Dabei sitzt der DMB -nur passiv da und wartet darauf, da"s sich ein LMB mit ihm -synchronisieren will. Es ist Aufgabe der LMBs, sich regelm"a"sig -danach zu erkundigen, wo der DMB sitzt, und mit diesem dann die -Serverlisten abzugleichen. - -Die Vorg"ange werden am deutlichsten, wenn man ein Beispiel -betrachtet. Dieses Beispiel ist im wesentlichen der -Originaldokumentation von Samba aus der Datei \dateistyle{BROWSING.txt} -entnommen. - -\newcommand{\minicomputer}[1]{% -\begin{picture}(10,9)(5,9) -\put(0,0){\framebox(10,5){{\ttfamily #1}}} -\put(5,5){\line(0,1){4}} -\end{picture}} -\newcommand{\mininetz}[1]{% -\begin{picture}(62,12) -\put(10,10){\minicomputer{N#1A}} -\put(25,10){\minicomputer{N#1B}} -\put(40,10){\minicomputer{N#1C}} -\put(55,10){\minicomputer{N#1D}} -\put(3,10){\line(1,0){59}} -\put(3,8){\line(0,1){4}} -\put(62,8){\line(0,1){4}} -\end{picture}} - -\begin{figure}[ht] -\[\setlength{\unitlength}{1.1mm} -\begin{picture}(120,60)(0,5) -\put(0,20){\mininetz{1}} -\put(25,19){\makebox(0,0){\textit{{\small DMB,LMB}}}} -\put(30,50){\mininetz{2}} -\put(85,49){\makebox(0,0){\textit{{\small WINS}}}} -\put(55,49){\makebox(0,0){\textit{{\small LMB}}}} -\put(50,5){\mininetz{3}} -\put(105,4){\makebox(0,0){\textit{{\small LMB}}}} -\put(48,48){\minicomputer{R1}} -\put(48,48){\line(0,1){12}} -\put(48,39){\line(0,-1){9}} -\put(77,48){\minicomputer{R2}} -\put(77,48){\line(0,1){12}} -\put(77,39){\line(0,-1){24}} -\end{picture}\] -\caption{Domain Master Browser} -\end{figure} - -Dieses Netz besteht aus drei Subnetzen (1,2,3), die durch zwei Router (R1 -und R2) verbunden sind. Die Router lassen keine Broadcasts durch. Alle -Subnetze bestehen aus jeweils vier Maschinen. Nehmen wir der Einfachheit -halber an, da"s alle Maschinen in der gleichen Arbeitsgruppe -konfiguriert sind. Rechner \nbname{N1B} im Subnetz 1 ist als Domain -Master Browser konfiguriert. Das hei"st, da"s er die Browserliste f"ur -die ganze Arbeitsgruppe aufsammelt. Rechner \nbname{N2D} ist als WINS -Server konfiguriert und alle anderen Maschinen registrieren ihre -NetBIOS Namen dort. - -Wenn alle diese Maschinen gebootet werden, werden in jedem der drei -Subnetze Wahlen um einen Local Master Browser abgehalten. Nehmen wir -an, im Subnetz 1 gewinnt \nbname{N1B}, im Subnetz 2 gewinnt -\nbname{N2B} und im Subnetz 3 gewinnt \nbname{N3D}. Diese Maschinen -sind als Local Master Browser in ihrem Subnetz bekannt. Im Subnetz 1 -liegen der LMB und der DMB auf der gleichen Maschine, was nicht der -Fall sein mu"s. Diese beiden Rollen sind vollst"andig unabh"angig -voneinander. - -Alle Maschinen, die Serverdienste anzubieten haben, k"undigen dies per -Broadcast auf ihrem Subnetz an. Der Local Master Browser in jedem -Subnetz empf"angt diese Broadcasts und tr"agt alle Server in einer -Liste ein. Diese Liste von Eintr"agen ist die Basis f"ur die -Browserliste. In unserem Fall nehmen wir an, da"s alle Maschinen -Serverdienste anbieten, das hei"st, da"s alle Maschinen in der Liste -erscheinen. - -F"ur jedes Subnetz wird der Local Master Browser als -\emph{ma"sgeblich} angesehen, und zwar f"ur alle Namen, die er per -lokalem Broadcast empf"angt. Broadcasts verlassen das Subnetz nicht, -und die Broadcasts im lokalen Subnetz werden als ma"sgeblich -angesehen. Daher wird dem Local Master Browser bei diesen Servern -geglaubt. Rechner, die sich in anderen Subnetzen befinden, und "uber -die der Local Master Browser von anderen Local Master Browsern -informiert wurde, werden als nicht ma"sgeblich angesehen. - -An diesem Punkt sieht die Browse Liste folgenderma"sen aus: (dies sind -die Maschinen, die Sie in Ihrer Netzwerkumgebung sehen w"urden, wenn -Sie sie in einem bestimmten Subnetz ansehen) - -\vspace{\baselineskip} -\[\begin{tabular}{|c|c|l|} -\hline -Netz & LMB & Liste \\ \hline \hline -1 & \nbname{N1C} & \nbname{N1A}, \nbname{N1B}, \nbname{N1C}, \nbname{N1D}\\ -\hline -2 & \nbname{N2B} & \nbname{N2A}, \nbname{N2B}, \nbname{N2C}, \nbname{N2D}\\ -\hline -3 & \nbname{N3D} & \nbname{N3A}, \nbname{N3B}, \nbname{N3C}, \nbname{N3D}\\ -\hline -\end{tabular}\] -\vspace{\baselineskip} - -An diesem Punkt sind alle Subnetze vollst"andig separat, keine -Maschine wird in anderen Subnetzen gesehen. Die -Microsoft-Dokumentation spricht davon, da"s die Arbeitsgruppen in den -Subnetzen getrennt sind. - -Sehen wir uns nun Subnetz zwei an. Sobald \nbname{N2B} der Local Master -Browser geworden ist, sucht er den Domain Master Browser, um mit ihm -die Browse Listen zu synchronisieren. Dies tut er, indem er den WINS -Server (\nbname{N2D}) nach der IP-Adresse fragt, die zum NetBIOS-Namen -\nbname{arbeitsgruppe<1B>} geh"ort. Diesen Namen hat der Domain Master -Browser (\nbname{N1C}) beim WINS-Server f"ur sich beim booten -registriert. - -\nbname{N2B} kennt nun den Domain Master Browser. Er k"undigt sich als -Local Master Browser f"ur Subnetz 2 bei ihm an. Dann synchronisiert -\nbname{N2B} sich mit \nbname{N2D}, indem er einen -NetServerEnum2-Aufruf abschickt. Der Domain Master Browser schickt -alle Server, die er kennt, zur"uck. Sobald der Domain Master Browser -die Ank"undigung von \nbname{N2B} als Lokaler Master Browser erhalten -hat, wird auch er sich mit dem Local Master Browser -synchronisieren. Nachdem beide Synchronisationen stattgefunden haben, -sehen die Browse Listen so aus: - -\vspace{\baselineskip} -\[\begin{tabular}{|c|c|l|} -\hline -Netz & LMB & Liste \\ \hline \hline -1 & \nbname{N1C} & \nbname{N1A}, \nbname{N1B}, \nbname{N1C}, \nbname{N1D}\\ - & & \nbname{N2A*}, \nbname{N2B*}, \nbname{N2C*}, \nbname{N2D*}\\ -\hline -2 & \nbname{N2B} & \nbname{N2A}, \nbname{N2B}, \nbname{N2C}, \nbname{N2D}\\ -& & \nbname{N1A*}, \nbname{N1B*}, \nbname{N1C*}, \nbname{N1D*}\\ -\hline -3 & \nbname{N3D} & \nbname{N3A}, \nbname{N3B}, \nbname{N3C}, \nbname{N3D}\\ -\hline -\end{tabular}\] -\vspace{\baselineskip} - -Die mit * bezeichneten Eintr"age werden als nicht ma"sgeblich -angesehen, da sie von anderen Master Browsern erhalten wurden. F"ur -den Client macht dies jedoch keinen Unterschied. Nur der LMB darf -diese Eintr"age selbstverst"andlich beim n"achsten Abgleich nicht an -den DMB als seine eigenen zur"uckmelden. - -Zu diesem Zeitpunkt werden Benutzer in den Subnetzen 1 und 2, die die -Netzwerkumgebung ansehen, die Server in beiden Subnetzen sehen, -Benutzer im Subnetz 3 sehen immer noch nur die Server in ihrem eigenen -Subnetz. - -Der lokale Master Browser im Subnetz 3 (\nbname{N3D}) macht nun exakt -das gleiche wie \nbname{N2B}. Wenn er die Browse Listen mit dem Domain -Master Browser (\nbname{N1B}) abgeglichen hat, bekommt er sowohl die -Server in Subnetz 1, als auch die im Subnetz 2. Nachdem sich -\nbname{N3D} mit \nbname{N1C} synchronisiert hat und umgekehrt, sehen -die Browse Listen folgenderma"sen aus: - -\vspace{\baselineskip} -\[\begin{tabular}{|c|c|l|} -\hline -Netz & LMB & Liste \\ \hline \hline -1 & \nbname{N1C} & \nbname{N1A}, \nbname{N1B}, \nbname{N1C}, \nbname{N1D}\\ - & & \nbname{N2A*}, \nbname{N2B*}, \nbname{N2C*}, \nbname{N2D*}\\ - & & \nbname{N3A*}, \nbname{N3B*}, \nbname{N3C*}, \nbname{N3D*}\\ -\hline -2 & \nbname{N2B} & \nbname{N2A}, \nbname{N2B}, \nbname{N2C}, \nbname{N2D}\\ - & & \nbname{N1A*}, \nbname{N1B*}, \nbname{N1C*}, \nbname{N1D*}\\ -\hline -3 & \nbname{N3D} & \nbname{N3A}, \nbname{N3B}, \nbname{N3C}, \nbname{N3D}\\ - & & \nbname{N1A*}, \nbname{N1B*}, \nbname{N1C*}, \nbname{N1D*}\\ - & & \nbname{N2A*}, \nbname{N2B*}, \nbname{N2C*}, \nbname{N2D*}\\ -\hline -\end{tabular}\] -\vspace{\baselineskip} - -Jetzt sehen Benutzer in den Subnetzen 1 und 3 alle Server in allen -Subnetzen, Benutzer im Subnetz 2 sehen jedoch immer noch nur die -Server von Subnetz 1 und 2, nicht jedoch die im Subnetz 3. - -Zum guten Schlu"s wird sich der lokale Master Browser im Subnetz 2 -(\nbname{N2B}) erneut mit dem Domain Master Browser abstimmen, und die -fehlenden Servereintr"age bekommen. Endlich sehen die Browse Listen -als stabiler Zustand so aus: - -\vspace{\baselineskip} -\[\begin{tabular}{|c|c|l|} -\hline -Netz & LMB & Liste \\ \hline \hline -1 & \nbname{N1C} & \nbname{N1A}, \nbname{N1B}, \nbname{N1C}, \nbname{N1D}\\ - & & \nbname{N2A*}, \nbname{N2B*}, \nbname{N2C*}, \nbname{N2D*}\\ - & & \nbname{N3A*}, \nbname{N3B*}, \nbname{N3C*}, \nbname{N3D*}\\ -\hline -2 & \nbname{N2B} & \nbname{N2A}, \nbname{N2B}, \nbname{N2C}, \nbname{N2D}\\ - & & \nbname{N1A*}, \nbname{N1B*}, \nbname{N1C*}, \nbname{N1D*}\\ - & & \nbname{N3A*}, \nbname{N3B*}, \nbname{N3C*}, \nbname{N3D*}\\ -\hline -3 & \nbname{N3D} & \nbname{N3A}, \nbname{N3B}, \nbname{N3C}, \nbname{N3D}\\ - & & \nbname{N1A*}, \nbname{N1B*}, \nbname{N1C*}, \nbname{N1D*}\\ - & & \nbname{N2A*}, \nbname{N2B*}, \nbname{N2C*}, \nbname{N2D*}\\ -\hline -\end{tabular}\] -\vspace{\baselineskip} - -Synchronisationen zwischen dem Domain Master Browser und den Local -Master Browsern wird weiterhin auftreten, aber dies sollte den -stabilen Zustand nur best"atigen. - -Wenn Router R1 oder R2 ausfallen, wird das folgende passieren: - -\begin{enumerate} -\item Namen der Computer auf beiden Seiten der nicht mehr erreichbaren -Subnetze werden f"ur 36 Minuten weiter in den Browse Listen gehalten, -so da"s sie in der Netzwerkumgebung weiterhin erscheinen. - -\item Versuche, Verbindungen zu diesen Rechnern aufzubauen, werden -scheitern, aber die Namen werden nicht von den Browse Listen entfernt -werden. - -\item Wenn ein Subnetz vom WINS-Server getrennt wird, wird es nur noch -auf die lokalen Server zugreifen k"onnen, deren Namen mit lokaler -Broadcast NetBIOS-Namensaufl"osung aufgel"ost werden k"onnen. Das ist -vergleichbar mit der Situation, keinen Zugriff auf einen DNS Server -mehr zu haben. -\end{enumerate} - -\subsection{Browsing mit vielen Arbeitsgruppen} - -Wenn man in der Netzwerkumgebung auf das Microsoft Windows Netzwerk -klickt, bekommt man eine Liste s"amtlicher Arbeitsgruppen im Netz -angezeigt. Diese Liste der Arbeitsgruppen wird vom Local Master -Browser vorgehalten. Wie bekommt er diese Liste? - -Jeder Local Master Browser reserviert f"ur sich einen speziellen -Gruppennamen, der folgenderma"sen dargestellt wird: -\nbname{..\_\_MSBROWSE\_\_.<01>}. Die Punkte stehen dabei f"ur die -Ascii-Werte eins und zwei. Regelm"a"sig wird jeder Local Master -Browser seine Existenz an diesen Gruppennamen senden. Alle anderen -Local Master Browser im Netz sammeln diese Ank"undigungen, damit sie -Clients die Liste der vorhandenen Arbeitsgruppen und Local Master -Browser mitteilen k"onnen. - -Wenn Domain Master Browser ins Spiel kommen, wird das Bild etwas -komplizierter. Samba hat Erweiterungen implementiert, mit denen das -Browsing "uber Subnetzgrenzen stabiler gemacht werden soll. Samba -fragt den WINS-Server regelm"a"sig nach allen Domain Master Browsern. -Diese werden in zuf"alligen Abst"anden kontaktiert, um die Browse -Listen mit ihnen abzugleichen. Dadurch kann es passieren, da"s -Arbeitsgruppen, die nicht mehr existieren, weiterhin in der -Netzwerkumgebung auftauchen und sich nicht l"oschen lassen. Samba -kennt den Parameter \param{enhanced browsing = no}, mit dem sich -dieses Verhalten abstellen l"a"st. - -\section{Virtuelle Sambaserver} -\label{virtuelle-server} - -Manchmal kann es notwendig sein, mehr als einen Sambaserver -gleichzeitig auf einem Rechner laufen zu lassen. Zur -Serverkonsolidierung kann es notwendig sein, unter mehreren Namen in -der Netzwerkumgebung zu erscheinen. Dies ist mit dem Parameter -\param{netbios aliases} sehr einfach m"oglich. Wenn es n"otig ist, in -mehr als einer Arbeitsgruppe aufzutauchen, dann scheitert dies -Verfahren jedoch, da der Parameter \param{workgroup} nur einmal -angegeben werden kann. - -Eine andere Konfiguration ist die Einbindung von virtuellen Servern in -eine Hochverf"ugbarkeitsumgebung. Es kann w"unschenswert sein, zwei -physikalisch vorhandene Server unabh"angig voneinander arbeiten und -sich gegenseitig "uberwachen zu lassen. Jeder der beiden Server hat -seinen eigenen Namen und seine eigenen Freigaben. Stellt ein Server -fest, da"s sein Partner defekt ist, mu"s er dessen Aufgaben -"ubernehmen. Dies ist am einfachsten m"oglich, wenn die Aufgaben des -defekten Servers isoliert in einer eigenen Samba-Instanz wahrgenommen -werden. Die Hochverf"ugbarkeitssoftware mu"s nur daf"ur sorgen, da"s -die Platten "ubernommen werden und der ausgefallene Dienst auf dem -noch lebenden Server gestartet wird. Es ist keine Neukonfiguration des -bereits laufenden Servers notwendig. - -Hier soll ein Beispiel aufgebaut werden, mit dem Samba auf einem -Rechner f"ur verschiedene Arbeitsgruppen Local Master Browser -wird. Ist dieser Rechner ein Unixserver, der 24 Stunden durchl"auft, -kann so mit sehr einfachen Mitteln eine recht stabile Netzwerkumgebung -f"ur beliebig viele Arbeitsgruppen erreicht werden. - -Zun"achst wird ein isolierter Local Master Browser f"ur die -Arbeitsgruppe \nbname{GOETTINGEN} installiert. Der Name dieses -Rechners soll der Einfachheit halber \nbname{GOE} hei"sen. Die gesamte -Konfiguration wird unter \dateistyle{/samba/goe} abgelegt, so da"s sie -recht einfach duplizierbar ist. Die Datei -\dateistyle{/samba/goe/smb.conf} hat folgenden Aufbau: - -\begin{verbatim} -[global] -workgroup = goettingen -netbios name = goe - -interfaces = eth0:1 -bind interfaces only = yes - -encrypt passwords = yes -smb passwd file = /samba/goe/smbpasswd - -log file = /samba/goe/var/log.smb -lock directory = /samba/goe/locks - -os level = 100 -preferred master = yes -\end{verbatim} -\label{smbconf-goe} - -In dieser Konfigurationsdatei gibt es einige Einstellungen, die die -Voreinstellungen vom Kompilieren "uberschreiben. Normalerweise finden -sich die Logdateien unter Linux in \dateistyle{/var/log} oder bei -selbstkompilierten Sambas in \dateistyle{/usr/local/samba/var}, hier -sollen sie pro Server separat in einem eigenen Verzeichnis abgelegt -werden. - -Die nicht offensichtlichen Einstellungen bedeuten: - -\begin{description} -\item[bind interfaces only:] Normalerweise nimmt der \prog{smbd} auf - jeder im System konfigurierten IP-Adresse Verbindungen entgegen. Den - Vorgang, mit dem der \prog{smbd} dies dem Kernel mitteilt, nennt - sich "`An eine Adresse binden"'. Um auf jeder Adresse Verbindungen - entgegen zu nehmen, bindet Samba an die spezielle Adresse 0. Jede - konfigurierte IP-Adresse kann nur von einem einzigen Proze"s - gebunden werden. Versucht ein \prog{smbd}, eine bereits verwendete - Adresse zu binden, wird dies mit der Fehlermeldung \textbf{Address - already in use} verweigert. Mit \prog{bind interfaces only = yes} - wird der \prog{smbd} nur die im Parameter \prog{interfaces} - angegebenen Adressen beziehungsweise Interfaces verwenden. - - Der Unterschied wird im Vergleich zweier Ausgaben des Programms - \prog{netstat -nat} (hier unter Linux) deutlich. Zun"achst der - relevante Teil \emph{ohne} \param{bind interfaces only = yes}: - -\begin{verbatim} -vlendec@server:~ > netstat -natu -Active Internet connections (servers and established) -Proto Recv-Q Send-Q Local Address Foreign Address State - -tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN - -vlendec@server:~/ > -\end{verbatim} - - Im Vergleich dazu die Ausgabe des gleichen Programmaufrufs - \emph{mit} \param{bind interfaces only = yes}: - -\begin{verbatim} -vlendec@server:~ > netstat -natu -Active Internet connections (servers and established) -Proto Recv-Q Send-Q Local Address Foreign Address State - -tcp 0 0 192.168.42.1:139 0.0.0.0:* LISTEN - -vlendec@server:~/ > -\end{verbatim} - - Mit \param{bind interfaces only = yes} wird ausschlie"slich an die - im Parameter \param{interfaces} referenzierte IP-Adresse gebunden, - so da"s sich mehrere \prog{smbd}s nicht st"oren. - - -\item[log file:] Hier wird das Logfile nur f"ur den \prog{smbd} - festgelegt. Es ist m"oglich, f"ur alle Samba-Instanzen ein - gemeinsames Logfile zu verwenden, das kann jedoch sehr schnell - un"ubersichtlich werden. Der \prog{nmbd} ignoriert diese - Einstellung. Sein Logfile mu"s "uber den Kommandozeilenparameter - \prog{-l} festgelegt werden. -\item[lock directory:] Die verschiedenen D"amonen von Samba - kommunizieren "uber viele Datenbanken miteinander. Sie haben die - Endung \dateistyle{.tdb}, und ihr Verzeichnis ist durch das - \param{lock directory} festgelegt. Jede Instanz von Samba ben"otigt - ihr eigenes \param{lock directory}, da die Datenbanken jeweils nur - f"ur eine Samba-Instanz ausgelegt sind. -\end{description} - -Diese Samba-Instanz kann "uber die folgende Startdatei kontrolliert werden: - -\begin{verbatim} -#!/bin/sh -DIR=/samba/goe -case "$1" in - start) - echo "Starte Samba in $DIR" - /usr/local/samba/bin/smbd -D -s $DIR/smb.conf - /usr/local/samba/bin/nmbd -D -s $DIR/smb.conf -l $DIR/var - ;; - stop) - echo "Fahre Samba in $DIR herunter" - kill -TERM $(cat $DIR/locks/smbd.pid) - kill -TERM $(cat $DIR/locks/nmbd.pid) - ;; - *) - echo "Usage: $0 [start|stop]" - ;; -esac -\end{verbatim} - -Diese Installation von Samba ist so weit isoliert, da"s eine zweite -ungest"ort gleichzeitig laufen kann. Um jetzt eine zweite Installation -zu bauen, m"ussen folgende Dinge angepa"st werden: - -\begin{description} -\item[workgroup:] Die Arbeitsgruppe mu"s nur in dem aktuell - verwendeten Beispiel der Local Master Browser ge"andert werden. Ein - zweites Samba kann selbstverst"andlich auch in der gleichen - Arbeitsgruppe sein. -\item[netbios name:] Jede Instanz braucht zwingend ihren eigenen - Namen. -\item[interfaces:] Jede Instanz ben"otigt ihre eigene IP-Adresse. -\item[smb passwd file:] Falls jede der Instanzen ihre eigene - Benutzerdatenbank m"ochte, so mu"s die Datei \dateistyle{smbpasswd} - separat angelegt werden. Die Unix-Benutzerdatenbank teilen jedoch - alle Instanzen. Das hei"st, Benutzer \username{meier} auf der einen - Instanz wird immer der gleiche Unixbenutzer wie Benutzer - \username{meier} auf allen anderen Instanzen sein. Wenn man die - gleiche Benutzerdatenbank ben"otigt, kann man auf die gleiche - \dateistyle{smbpasswd} zugreifen. Empfehlenswerter ist es jedoch, - eine der beiden Instanzen als Dom"anencontroller einzurichten und - die andere als Dom"anenclient. Dann kann man v"ollig ohne - Unterbrechung die gesamte Konfiguration komplett auf einen anderen - Rechner migrieren, ohne da"s irgend etwas ge"andert werden m"u"ste. - Insbesondere f"ur Hochverf"ugbarkeitsl"osungen ist dies die - Konfiguration der Wahl. -\item[log file:] Dies kann f"ur alle Instanzen gleich sein, meistens - wird man jedoch separate logfiles f"ur die einzelnen \prog{smbd}s - haben wollen. -\item[lock directory:] Dieses mu"s zwingend f"ur jede Instanz separat - angelegt werden. -\end{description} - -Als letztes ist die Variable DIR in der Startdatei anzupassen, und -mehreren Instanzen von Samba steht nichts mehr im Wege. - -\section{Browsing im WAN -- schneller} - -Das im Kapitel \ref{browsing-im-wan} beschriebene Verfahren, mit dem -"uber Subnetzgrenzen hinweg die Netzwerkumgebung gepflegt wird, ist -au"serordentlich tr"age. Jede "Anderung mu"s vom Local Master Browser -an den Domain Master Browser "ubergeben werden und von dort aus wieder -an die anderen Local Master Browser zur"uck. Bis diese "Anderung beim -Client ankommt, kann es sehr lange dauern. - -Zudem ist bei einem komplexen Setup die Zahl der beteiligten Rechner -sehr hoch. Als Beispiel sei ein Netz auf 4 Subnetze verteilt. Jeder -Mitarbeiter ist einer von 5 verschiedenen Arbeitsgruppen zugeteilt. -Nun ist es gefordert, da"s die Mitarbeiter sich im Netz frei bewegen -k"onnen m"ussen, da"s sie also unabh"angig von ihrem Standort im Netz -immer ihre eigene Arbeitsgruppe vorfinden m"ussen. Dazu mu"s -selbstverst"andlich ein WINS-Server eingerichtet sein. Damit das -Browsing funktioniert, mu"s es zudem f"ur jede Arbeitsgruppe einen -Domain Master Browser geben, der sich mit den jeweiligen Local Master -Browsern abgleicht. Die Zahl der Local Master Browser ist hier recht -hoch. Da jeder Mitarbeiter in jedem Subnetz seine Arbeitsgruppe sehen -soll, mu"s es in jedem Subnetz f"ur jede Arbeitsgruppe einen eigenen -Local Master Browser geben. Das hei"st, es werden 20 Local Master -Browser ben"otigt. - -Um das folgende Beispiel zu verstehen, sollte man sich -vergegenw"artigen, von welchen Rechnern welche Information bezogen -wird, wenn man im Explorer die Netzwerkumgebung durchklickt. Man kann -die Vorg"ange sehr gut nachvollziehen, wenn man an einer frisch -angemeldeten Sitzung mit \prog{nbtstat -s} die aktiven -NetBIOS-Sitzungen nach jedem Schritt nachvollzieht. Direkt nach dem -anmelden sollte keine NetBIOS-Sitzung aktiv sein, mit jedem Klick in -der Netzwerkumgebung kommt gegebenenfalls eine Verbindung hinzu. - -\begin{description} -\item[Netzwerkumgebung:] Hier wird die eigene Arbeitsgruppe - dargestellt. Diese Information liefert der eigene Local Master - Browser. Dieser wird "uber eine Broadcast-Anfrage auf den Namen der - eigenen Arbeitsgruppe vom Typ \nbname{<\#1d>} herausgefunden. -\item[Gesamtes Netzwerk:] Dieser Schritt liefert nur die lokal - installierten Clientsysteme. Wenn ein Novell-Client installiert ist, - wird hier das Novell-Netz neben dem Microsoft Windows-Netzwerk - angeboten, ansonsten nur das Microsoft-Windows Netzwerk. Da dies - rein lokal passiert, wird es keine zus"atzliche Verbindung geben. -\item[Microsoft Windows Netzwerk:] Hier wird die Liste der - verf"ugbaren Arbeitsgruppen angezeigt. Diese Information liefert - ebenfalls der eigene Local Master Browser. Das kann man sich mit - einem \prog{smbclient -L} \emph{ lmb} verdeutlichen. Neben der Liste der - Freigaben und der Server liefert der LMB eine Liste der - Arbeitsgruppen, die er kennt. Zus"atzlich gibt er noch den jeweils - zust"andigen Local Master Browser heraus. -\item[Arbeitsgruppe:] Diese Information liefert der jeweilige Local - Master Browser. Der eigene Local Master Browser hat im letzten - Schritt dessen Namen herausgegeben. Dessen IP-Adresse findet der - Client durch eine normale NetBIOS-Namensanfrage heraus. -\item[Freigabeliste:] Ein Rechner ist f"ur seine Freigaben selbst - verantwortlich, nur der Rechner selbst kann die Liste der von ihm - freigegebenen Verzeichnisse herausgeben. -\end{description} - -Gibt ein Rechner Informationen der genannten Art heraus, dann -geschieht dies "uber eine vollst"andig aufgebaute SMB-Sitzung, die auf -einer NetBIOS-Sitzung aufbaut. Kapitel \ref{smb-sitzungen} beschreibt -dies im Detail. Wie auf Seite \pageref{protokolle-und-ports} -dargestellt, nutzt der NetBIOS-Sitzungsdienst TCP "uber Port 139. - -\subsection{Trennung von \prog{nmbd} und \prog{smbd}} - -Die folgende Situation l"a"st sich erheblich einfacher und stabiler -l"osen als mit einem Domain Master Browser. Das Beispielnetz besteht -aus zwei Filialen einer Firma in G"ottinen und Heidelberg. F"ur das -sp"ater vollst"andig aufgebaute Beispiel seien die beiden Netze -192.168.1.0/24 in G"ottingen und 192.168.2.0/24 in Heidelberg -vergeben. - -In jeder Filiale gibt es eine Arbeitsgruppe, also die Gruppen -\nbname{GOETTINGEN} und \nbname{HEIDELBERG}. In G"ottingen stehen nur -Rechner der Arbeitsgruppe \nbname{GOETTINGEN}, in Heidelberg nur -Rechner der Arbeitsgruppen \nbname{HEIDELBERG}. Nun soll auf beiden -Seiten jeweils die eigene und die entfernte Arbeitsgruppe sichtbar -sein, um sich im Netz mit dem Explorer frei bewegen zu k"onnen. Dazu -mu"s es sowohl in G"ottingen als auch in Heidelberg jeweils einen -Local Master Browser f"ur \nbname{GOETTINGEN} und \nbname{HEIDELBERG} -geben. Es gibt im Beispiel vier Local Master Browser, die hier auch -bereits mit IP-Adressen versehen wurden: - -\vspace{\baselineskip} -\begin{center} -\begin{tabular}{|l|l|l|}\hline -&\nbname{GOETTINGEN}&\nbname{HEIDELBERG}\\ -\hline -Ort: G"ottingen & \nbname{GOE}, 192.168.1.1 & \nbname{GOEHD}, 192.168.1.2 \\ -Ort: Heidelberg & \nbname{HDGOE}, 192.168.2.2 & \nbname{HD}, 192.168.2.1 \\ -\hline -\end{tabular} -\end{center} -\vspace{\baselineskip} - -%\begin{tabular}{|L|L|L|}\hline -% \LCC -% \tabulargray&\tabulargray&\tabulargray\\ -% &\tabularheader{\nbname{GOETTINGEN}}&\tabularheader{\nbname{HEIDELBERG}}\\ -% \hline -% \ECC -% &&\topseparation -% Ort: G"ottingen & \nbname{GOE} & \nbname{GOEHD} \\ -% Ort: Heidelberg & \nbname{HDGOE} & \nbname{HD} -% \bottomseparationline -%\end{tabular} - -Die Idee f"ur die Konfiguration ist nun, die G"ottinger Anfragen an -den Local Master Browser f"ur \nbname{HEIDELBERG} (Rechner -\nbname{GOEHD}) direkt nach Heidelberg an den Rechner \nbname{HD} -umzuleiten. In G"ottingen mu"s nur ein \prog{nmbd} behaupten, er sei -Local Master Browser f"ur die Arbeitsgruppe \nbname{HEIDELBERG}. Dies -tut er, indem er auf UDP Port 137 die NetBIOS-Namensanfragen f"ur -\nbname{HEIDELBERG\#1D} beantwortet. Der TCP-Port 139 auf dem Rechner -\nbname{GOEHD} in G"ottingen wird dann an den echten Local Master -Browser \nbname{HD} weitergeleitet. - -Das Weiterleiten von TCP Port 139 auf dem Rechner \nbname{GOEHD} an -Port 139 des Rechners \nbname{HD} kann unterschiedlich geschehen. - -\setlength{\unitlength}{4144sp}% -% -\begingroup\makeatletter\ifx\SetFigFont\undefined% -\gdef\SetFigFont#1#2#3#4#5{% - \reset@font\fontsize{#1}{#2pt}% - \fontfamily{#3}\fontseries{#4}\fontshape{#5}% - \selectfont}% -\fi\endgroup% -\begin{picture}(5019,4611)(1789,-4483) -\thinlines -{\color[rgb]{0,0,0}\put(1936,-1051){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(2386,-646){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(3286,-1051){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(3736,-646){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(4861,-1051){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(5311,-646){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(4861,-3166){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(5311,-2761){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(3826,-1276){\framebox(405,225){}}}% -\put(3916,-1231){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}139}% -}}} -{\color[rgb]{0,0,0}\put(4771,-4471){\framebox(405,225){}}}% -\put(4861,-4426){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}139}% -}}} -{\color[rgb]{0,0,0}\put(4231,-4246){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(4681,-3841){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(5401,-4246){\framebox(945,405){}}}% -{\color[rgb]{0,0,0}\put(5851,-3841){\line( 0, 1){405}}}% -{\color[rgb]{0,0,0}\put(1801,-241){\line( 1, 0){4050}}}% -{\color[rgb]{0,0,0}\put(5311,-2671){\line( 0, 1){1620}}}% -{\color[rgb]{0,0,0}\put(5311,-3166){\line( 0,-1){270}}}% -{\color[rgb]{0,0,0}\put(4231,-1141){\line( 3, 1){945}}\put(5176,-826){\line( 0,-1){2205}} -\put(5176,-3031){\line(-1,-5){242.308}}}% -{\color[rgb]{0,0,0}\put(3691,-3436){\line( 1, 0){3105}}}% -\put(2071,-871){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}GOE}% -}}} -\put(3466,-871){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}GOEHD}% -}}} -\put(4366,-4111){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}HD}% -}}} -\put(5581,-4111){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}HDGOE}% -}}} -\put(2386,-16){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Goettingen}% -}}} -\put(5941,-3301){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Heidelberg}% -}}} -\end{picture} - -\subsection{Konfiguration} - -Als Beispiel soll hier die vollst"andige Konfiguration am Standort -G"ottingen mit beiden Local Master Browsern beschrieben werden, die am -Standort Heidelberg kann dann spiegelverkehrt aufgesetzt werden. - -Der Local Master Browser in G"ottingen hat die beiden IP-Adressen -192.168.1.1 (Interface eth0) f"ur den LMB der Arbeitsgruppe -\nbname{GOETTINGEN} und 192.168.1.2 (Interface eth0:1) f"ur die -Arbeitsgruppe \nbname{HEIDELBERG}. Die Interface-Bezeichnungen sind -hier Linux-spezifisch. Andere Unix-Versionen vergeben virtuelle -IP-Adressen m"oglicherweise anders. Die beiden virtuellen Sambaserver -werden mit ihren Konfigurationen in den Verzeichnissen -\dateistyle{/samba/goe} und \dateistyle{/samba/goehd} abgelegt. - -Es m"ussen nun zwei Dateien \dateistyle{smb.conf} erstellt werden, -f"ur jeden Local Master Browser eine. F"ur die Arbeitsgruppe -\nbname{GOETTINGEN} kann direkt die \dateistyle{smb.conf} von Seite -\pageref{smbconf-goe} verwendet werden. Nur die Zeile \prog{interfaces - =} mu"s angepa"st werden, so da"s sich die folgende -\dateistyle{/samba/goe/smb.conf} ergibt: - -\begin{verbatim} -; /samba/goe/smb.conf -[global] -workgroup = goettingen -netbios name = goe -interfaces = eth0 -bind interfaces only = yes -encrypt passwords = yes -smb passwd file = /samba/goe/smbpasswd -log file = /samba/goe/var/log.smb -lock directory = /samba/goe/locks -os level = 100 -preferred master = yes -\end{verbatim} - -Entsprechend ist die Datei \dateistyle{/samba/goehd/smb.conf} -aufgebaut. Um der K"urze willen sind s"amtliche Einstellungen, die -ausschlie"slich den \prog{smbd} betreffen, weggelassen worden. In -G"ottingen soll f"ur die Arbeitsgruppe \nbname{HEIDELBERG} kein -\prog{smbd} gestartet werden, daf"ur ist der \prog{smbd} auf dem -Rechner \nbname{HDGOE} in Heidelberg zust"andig. - -\begin{verbatim} -; /samba/goehd/smb.conf -[global] -workgroup = heidelberg -netbios name = goehd -interfaces = eth0:1 -bind interfaces only = yes -lock directory = /samba/goe/locks -os level = 100 -preferred master = yes -\end{verbatim} - -Die Startdatei f"ur die Local Master Browser kann folgenderma"sen -aussehen. Es werden drei Prozesse gestartet, ein vollst"andiges Samba -f"ur den Rechner \nbname{GOE} und nur den \prog{nmbd} f"ur -\prog{GOEHD}. - -\begin{verbatim} -#!/bin/sh -SMBD=/usr/local/samba/bin/smbd -NMBD=/usr/local/samba/bin/nmbd -case "$1" in - start) - echo "Starte Samba" - $SMBD -D -s /samba/goe/smb.conf - $NMBD -D -s /samba/goe/smb.conf - $NNBD -D -s /samba/goehd/smb.conf -l /samba/goehd/var - ;; - stop) - echo "Fahre Samba herunter" - kill -TERM $(cat /samba/goe/locks/smbd.pid) - kill -TERM $(cat /samba/goe/locks/nmbd.pid) - kill -TERM $(cat /samba/goehd/locks/nmbd.pid) - ;; - *) - echo "Usage: $0 [start|stop]" - ;; -esac -\end{verbatim} - -Die Weiterleitung des TCP-Ports 139 von der IP-Adresse 192.168.1.2 in -G"ottingen an die Adresse 192.168.2.1 Port 139 in Heidelberg kann mit -unterschiedlichen Methoden geschehen. Die einfachste Methode mit dem -Programm \prog{netcat} und dem \prog{inetd} funktioniert hier leider -nicht, da dem \prog{inetd} leider nicht gesagt werden kann, da"s er -bitte nur an ein spezielles Interfaces binden soll. G"abe es f"ur den -Rechner \nbname{GOEHD} eine eigene Maschine, k"onnte man den -\prog{inetd} jedoch problemlos verwenden. Die Zeile - -\begin{verbatim} -netbios-ssn stream tcp nowait nobody /usr/bin/netcat netcat 192.168.2.1 139 -\end{verbatim} - -in der \dateistyle{/etc/inetd.conf} zusammen mit - -\begin{verbatim} -netbios-ssn 139/tcp -\end{verbatim} - -in der \prog{/etc/services} leiten eingehende TCP-Verbindungen auf -Port 139 zum Port 139 des Rechners 192.168.2.1 weiter. - -Die zweite M"oglichkeit der Portweiterleitung bietet das Programm -\prog{rinetd}. Der \prog{rinetd} ist f"ur genau diesen Zweck -geschaffen worden und ist bei SuSE-Linux als fertiges Paket -mitgeliefert. Im Gegensatz zum \prog{inetd} kann der \prog{rinetd} an -spezielle Interfaces binden, so da"s sein Einsatz auch mit virtuellen -Sambaservern m"oglich ist. Der \prog{rinetd} wird "uber die Datei -\prog{/etc/rinetd.conf} konfiguriert. Die notwendige Datei besteht nur -aus einer einzigen Zeile: - -\begin{verbatim} -192.168.1.2 139 192.168.2.1 -\end{verbatim} - -Alternative drei besteht beim Einsatz des \prog{xinetd}, der den -\prog{inetd} vollst"andig ersetzt und erheblich leistungsf"ahiger ist. -Der \prog{xinetd} beherrscht einerseits das Binden an einzelne -Interfaces, andererseits kennt er bereits die M"oglichkeit, -TCP-Verbindungen weiterzuleiten. Der Abschnitt in der -Konfigurationsdatei \dateistyle{/etc/xinetd.conf} k"onnte -beispielsweise so aussehen\todo{CHECK}: - -\begin{verbatim} -service goehd -{ - socket_type = stream - protocol = tcp - wait = no - port = 139 - redirect = 192.168.2.1 139 - bind = 192.168.1.2 -} -\end{verbatim} - -F"ur welche der Alternativen man sich entscheidet, h"angt von der -Umgebung ab. Setzt man virtuelle Server ein, f"allt der \prog{inetd} -aus. Die Entscheidung zwischen \prog{rinetd} und \prog{xinetd} wird -vermutlich danach fallen, ob der eventuell vorhandene \prog{inetd} -abgel"ost werden soll. Die Kombination von \prog{inetd} und virtuellen -Servern l"a"st nur die Wahl, den \prog{rinetd} einzusetzen. Wird der -\prog{xinetd} bereits verwendet, sollte man ihn selbstverst"andlich -auch f"ur die Portweiterleitung nutzen. - -\section{Einfache Freigaben} - -Warum setzt man Samba "uberhaupt ein? Einer der wichtigsten Dienste -von Samba ist, Festplattenbereiche f"ur Clients zur Verf"ugung zu -stellen. Damit ein Client Plattenplatz eines Servers erreichen kann, -mu"s man eine sogenannte \emph{Freigabe} erstellen. - -Beispielsweise m"ochte man den Inhalt des Unix-CDROM-Laufwerks an -Clients exportieren. Das Laufwerk sei unter \dateistyle{/cdrom} -eingebunden, und soll f"ur Clients unter -\nbname{\textbackslash{}\textbackslash{}servername\textbackslash{}cd} -erreichbar sein. Dazu mu"s man in der \dateistyle{smb.conf} einen -neuen Abschnitt einleiten, der den Namen \param{[cd]} tr"agt. Damit -wird eine Freigabe eingeleitet, die im Netz unter dem Namen -\nbname{cd} zu sehen ist. - -Das folgende Beispiel gibt genau dieses Verzeichnis frei. Dabei ist -zus"atzlich die Zugriffskontrolle so angelegt, da"s wirklich -\textbf{jeder} darauf zugreifen kann. Wenn Sie irgend eine Art von -sch"utzenswerten Daten auf der exportierten CD haben, sollten Sie sich -auf jeden Fall das Kapitel \ref{freigaberechte} zu Rechten an -Freigaben und das Kapitel \ref{smb-sitzungen} ansehen, um die Freigabe -sinnvoll sch"utzen zu k"onnen. - -\begin{verbatim} -[global] -workgroup = arbeitsgruppe -interfaces = / -security = share -encrypt passwords = yes - -[cd] -path = /cdrom -guest ok = yes -\end{verbatim} - - -\section{SMB-Sitzungen} -\label{smb-sitzungen} - -Sobald ein Rechner Freigaben im Netz zur Verf"ugung stellt, k"onnen -Clients darauf zugreifen. Bevor ein Client tats"achlich auf eine -Freigabe zugreifen kann, werden sechs Schritte durchlaufen. Diese -sechs Schritte im Detail zu verstehen, ist f"ur die Konfiguration -einfacher Server nicht wirklich notwendig. Sobald es aber darum geht, -Fehlerdiagnose zu betreiben, ist das Wissen um die genaue -Fehlerursache sehr wertvoll. Die genaue Stelle, an der eine -Freigabeverbindung scheitert, kann bei der Fehlersuche gute Hinweise -geben. - -\subsection{NetBIOS-Namensaufl"osung} - -Ein Benutzer an einem Client gibt den Namen des Servers mit -unterschiedlichen Methoden an. Ein typischer Weg geht "uber die -Netzwerkumgebung "uber einen Doppelklick auf den Rechner. Das -Erscheinen in der Netzwerkumgebung ist jedoch nicht notwendig, da ein -Client auch auf der Kommandozeile "uber ein - -\begin{verbatim} -net use h: \\server\freigabe -\end{verbatim} - -\noindent das Laufwerk H verbinden kann. Genauso kann im Explorer durch den -Men"upunkt "`Netzwerklaufwerk verbinden"' eine direkte Verbindung -ge"offnet werden. Ein weiterer Weg ist "uber Men"upunkt "`Ausf"uhren"' -im Startmen"u von Windows 95. Wenn man dort \verb|\\server| angibt, -bekommt man die Liste der Freigaben des Servers angezeigt, -unabh"angig, in welcher Arbeitsgruppe sich der Server befindet. - -\subsection{TCP-Verbindung} - -Wenn die IP-Adresse klar ist, wird eine TCP-Verbindung zu Port 139 des -Servers aufgebaut. Um vorhandene TCP-Verbindungen anzuzeigen, gibt es -sowohl auf Unix- als auch auf Windowsrechnern das Werkzeug -\prog{netstat}. - -Ob die TCP-Verbindung klappt, pr"uft man am besten mit - -\begin{verbatim} -telnet 139 -\end{verbatim} - -\noindent und einem Test mit \prog{netstat}, ob die Verbindung -im Zustand \prog{ESTABLISHED} ist. - -\subsection{NetBIOS-Sitzung} - -Auf einem Serverrechner arbeiten unter Umst"anden mehrere -Applikationen, die Namen f"ur sich reserviert haben. Diese sind alle -unter der IP-Adresse des Rechners und dem TCP-Protokoll auf Port 139 -erreichbar. Anhand des TCP-Verbindungsaufbaus ist nicht klar, welche -Serverapplikation angesprochen werden soll. Die Unterscheidung wird -durch den Servernamen getroffen, der in der TCP-Verbindung als erstes -"ubertragen wird. - -Da"s der Servername "ubertragen wird, kann man ganz einfach mit Hilfe -des Programms \prog{smbclient} sehen. Man versucht, sich die Liste der -Freigaben eines realen Windowsrechners geben zu lassen, indem man -folgendes aufruft: - -\verb|smbclient -L smallwin| - -Damit wird zun"achst eine NetBIOS-Namensanfrage ausgel"ost, und dann -eine Verbindung zum entsprechenden Server ausgel"ost. \prog{smbclient} -hat jedoch die M"oglichkeit, einen Server unter einem anderen Namen -anzusprechen, indem man - -\verb|smbclient -L test -I ip-adresse| - -\noindent -eingibt. \prog{smbclient} wird zun"achst versuchen, eine Verbindung -zum NetBIOS-Namen \texttt{test} aufzubauen, und zwar ohne da"s eine -NetBIOS-Namensanfrage ausgel"ost wird. Stattdessen wird die angegebene -IP-Adresse auf Port 139 direkt angesprochen, und der Name -\texttt{test} als Servername angegeben. Windows merkt, da"s das nicht -stimmen kann und verweigert den Verbindungsaufbau mit einer -Fehlermeldung. Erst im zweiten Versuch wird es \prog{smbclient} -gelingen, eine Verbindung aufzubauen, da diese Verbindung zum -allgemeinen Namen \texttt{*smbserver}\footnote{Das SMB-Protokoll wurde - als Antwort auf das WebNFS von SUN in Common Internet File System - umbenannt. Im Gegensatz zur Firma SUN, die tats"achlich das - NFS-Protokoll verbessert hat, hat sich Microsoft die Arbeit - einfacher gemacht. Der Name \texttt{*SMBSERVER} ist der einzige - echte Unterschied, der CIFS von seinem Urvater SMB unterscheidet. - Mit Windows 2000 werden diese NetBIOS-Namen beim Verbindungsaufbau - gar komplett unterschlagen. Daf"ur war es aber notwendig, einen - weiteren Port zu reservieren, und zwar Port 445.} aufgebaut wird. - -Auch der Clientname wird in der Verbindung "ubergeben. Dies testet man -am besten mit - -\verb|smbclient //win/c\$ -n blafasel| - -\noindent und schaut sich -die Verbindungstabelle auf der Windowsmaschine mit \verb|nbtstat -s| -an. - -Mit dem "ubergebenen Servernamen kann man sehr nette Tricks anstellen. -Man stelle sich vor, da"s einige Freigaben nur f"ur bestimmte -Clientrechner sichtbar sein sollen. Dies ist mit Bordmitteln von Samba -so nicht m"oglich. Man kann zwar mit dem Parameter \param{browseable} -festlegen, ob bestimmte Freigaben in der Netzwerkumgebung erscheinen. -Dieser Parameter hat aber zwei Nachteile. Erstens sind die Freigaben nur -unsichtbar geworden, darauf zugreifen kann man immer noch. Zweitens kann man -Freigaben nur f"ur alle Rechner verstecken oder freigeben. - -Samba bietet die Option, unter zwei oder mehreren verschiedenen Namen -in der Netzwerkumgebung zu erscheinen. Mit dem Parameter -\param{netbios name} gibt man einen Namen f"ur den Server an. -Zus"atzliche Namen kann man mit \param{netbios aliases} vergeben. Mit - -\begin{verbatim} -netbios name = fichte -netbios aliases = birke eiche kiefer buche -\end{verbatim} - -\noindent -handelt man sich einen ganzen Wald in der Netzwerkumgebung ein. Klickt -man auf die einzelnen Server, sieht man "uberall die gleichen -Freigaben und Zugriffsrechte. Nun kann man f"ur jeden dieser -virtuellen Rechner eine eigene Konfigurationsdatei anlegen. -Beispielsweise kann man diese Dateien \dateistyle{/etc/smb.conf.birke}, -\dateistyle{/etc/smb.conf.eiche} und so weiter nennen. Die Datei -\dateistyle{/etc/smb.conf} ist f"ur den Rechner \nbname{fichte} zust"andig -und enth"alt neben den Einstellungen f"ur \nbname{fichte} den -Parameter - -\param{config file = /etc/smb.conf.\%L} - -\noindent Dabei steht -\param{\%L} f"ur den Servernamen, unter dem Samba angesprochen wird. -Wenn es eine passende Datei gibt, dann bewirkt der Parameter -\param{config file}, da"s die komplette Konfiguration neu eingelesen -wird. Existiert keine passende Datei, so wird der Parameter einfach -ignoriert. Um nun den Zugriff nur f"ur einzelne Clients zu erlauben, -kann bei den einzelnen virtuellen Servern mit den Parametern -\param{hosts allow} und \param{hosts deny} der Zugriff geregelt -werden. - -\subsection{Negotiate Protocol} - -Die NetBIOS-Sitzung ist nun aufgebaut, und es k"onnen Daten -"ubermittelt werden. Innerhalb dieser NetBIOS-Sitzung wird eine -SMB-Sitzung schrittweise aufgebaut. SMB ist ein Protokoll, bei dem im -Prinzip der Client jede Aktion durch eine Anfrage anst"o"st, und der -Server diese beantwortet\footnote{Im Prinzip deshalb, da mit Oplocks - auch der Server von sich aus aktiv werden kann.}. - -SMB (Server Message Block) ist ein gewachsenes Protokoll. Es ist mit -den F"ahigkeiten der Betriebssysteme gewachsen, die damit arbeiten. -Zun"achst ist es entstanden, um die Dateisystemaufrufe der MS-DOS -Systemschnittstelle INT 0x21 auf das Netz zu verlagern. Mit einer -gewissen Weitsicht hat man jedoch vorausgesehen, da"s die Entwicklung -nicht bei MS-DOS stehen bleiben w"urde, sondern sich die -Dateisystemaufrufe "andern w"urden. Man hat im Protokoll also eine -M"oglichkeit vorgesehen, mit der unterschiedliche Protokollvarianten -ausgehandelt werden k"onnen. Die unterschiedlichen Protokolle -orientieren sich immer an den F"ahigkeiten der jeweiligen -Betriebssysteme. Beispielsweise wurde mit dem LAN Manager, der eine -Benutzerverwaltung besitzt, das Konzept des Benutzers im Protokoll -aufgenommen. OS/2 hat ein recht weitgehendes Konzept der -Druckerverwaltung, das entsprechend mit Protokollerweiterungen bedacht -wurde. Sogar f"ur XENIX gibt es einen eigenen Protokolldialekt, der -das Unix-Zugriffsrechtekonzept im SMB-Protokoll abbildet. Diese -Protokollvariante beherrscht nur leider kein moderner Client. Mit -Ausnahme des ausgestorbenen XENIX-Dialektes lassen sich die Protokolle -gut in eine Hierarchie einordnen. Sp"atere Protokolle beherrschen alle -Aspekte der vorherigen Varianten. - -Im Jahr 1996 wurde SMB in CIFS umbenannt. CIFS ist die Abk"urzung f"ur -Common Internet File System. Warum diese neue Bezeichnung, und warum -zu diesem Zeitpunkt? Kurz vorher hatte Sun Microsystems sein Protokoll -NFS angepa"st, um "uber Weitverkehrsstrecken besser benutzbar zu sein. -NFS setzt voraus, da"s zwischen Client und Server nur sehr kurze -Pingzeiten vorliegen. F"ur jeden Dateizugriff sind mehrere Anfragen -notwendig. Auch wenn jede Anfrage nur sehr kurz ist und wenig -Bandbreite verbraucht, mu"s doch jedesmal die Antwort des Servers -abgewartet werden. Hohe Pingzeiten belasten so die Leistung des NFS -erheblich. Sun hat das NFS so ver"andert, da"s die Anzahl der Anfragen -erheblich reduziert wurde. Das Ergebnis nannten sie WebNFS und haben -um dieses "`neue"' Protokoll eine gro"se Marketinginitiative -gestartet. Kurz vorher hatte Microsoft die Kr"ote namens Java von SUN -schlucken m"ussen und wollte sich nicht ein zweites Mal von SUN eine -Technologie aufzwingen lassen. Daher hat man einfach das hauseigene -Datei- und Druckprotokoll so umbenannt, da"s das Wort Internet im -Namen vorkam. Im Gegensatz zu SUN hat sich Microsoft bis auf ein -kleines Detail\footnote{Dies Detail hat nichts mit SMB, sondern mit - NetBIOS zu tun. SMB-Server wollen im NetBIOS-Sitzungsaufbau mit - ihrem eigenen NetBIOS-Namen angesprochen werden. Ein CIFS-Server im - Internet ist aber nur unter seinem DNS-Namen oder seiner IP-Adresse - bekannt. Der NetBIOS-Name ist normalerweise nicht publiziert. Daher - lauschen alle CIFS-Server auf den eigentlich illegalen NetBIOS-Namen - \nbname{*SMBSERVER}. Das ist der ganze Unterschied zwischen SMB und - CIFS.} nicht die M"uhe gemacht, das Protokoll wirklich in Richtung -Internet zu optimieren. - -Die erste Anfrage, die der Client an den Server schickt, ist ein -\defin{Negotiate Protocol Request}. In dieser Anfrage schickt der -Client an den Server eine Liste der Protokollvarianten, die er -beherrscht. Der Server w"ahlt nun aus dieser Liste der Protokolle eins -aus, und schickt eine entsprechende Antwort zur"uck. Die verschiedenen -Protokolle bauen aufeinander auf. Daher kann man mit dem Parameter -\param{protocol} das h"ochste Protokoll festlegen, mit dem Samba -arbeiten soll. - -In der Antwort auf diese erste Anfrage werden zwei weitere -Einstellungen verschickt, die Teile des weiteren Ablaufs festlegen. - -Der Server entscheidet, ob er die Zugriffssteuerung auf Benutzer- oder -auf Freigabeebene regeln m"ochte. Damit wird festgelegt, zu welchem -Zeitpunkt der Benutzer ein Pa"swort liefern mu"s. Entweder kann es -beim direkt folgenden \defin{Session Setup} erfolgen, oder erst beim -\defin{Tree Connect} danach. - -Der Parameter \param{security} legt fest, welche Art der -Zugriffssteuerung gew"ahlt wurde. Mit \param{security = share} wird -die Freigabeebene eingestellt, \param{security = user} legt die -Clients auf die Benutzerebene fest. - -Sichtbar wird diese Unterscheidung in der Windowswelt nur bei Windows -95 und Windows 98. Diese Betriebssysteme beherrschen zun"achst einmal -nur die Zugriffssteuerung auf Freigabeebene, da sie nicht "uber eine -Benutzerdatenbank verf"ugen. Es ist nicht m"oglich, einzelnen -Benutzern den Zugriff auf Freigaben zu gew"ahren oder zu -verweigern. Um trotzdem benutzerbasiert Zugriffssteuerung zu -erm"oglichen, mu"s ein Server angegeben werden, der f"ur Windows die -Benutzerdatenbank pflegt. Damit k"onnen Pa"sw"orter benutzerbasiert -"uberpr"uft werden. - -Weiterhin gibt der Server dem Client vor, ob Klartextpa"sw"orter -verwendet werden sollen, oder ob die Pa"sw"orter verschl"usselt -werden. Wenn der Server festlegt, da"s verschl"usselte Pa"sw"orter -verwendet werden, wird zus"atzlich die Herausforderung f"ur das -\defin{Challenge Response} Verfahren mitgeschickt. - -Die Entscheidung "uber Klartextpa"sw"orter mu"s also getroffen werden, -ohne da"s der Server den Benutzernamen, der sich anmelden will, -kennt. Es ist also nicht m"oglich, f"ur einige Benutzer -Klartextpa"sw"orter und f"ur andere Benutzer verschl"usselte -Pa"sw"orter zu verwenden. - -\subsection{Session Setup} - -Nachdem die Protokollversion ausgehandelt ist, wird vom Client ein -\defin{Session Setup} verschickt. In diesem Session Setup schickt der -Client seinen Benutzernamen an den Server. Sofern dieser -\param{security = user} verlangt hat, wird an dieser Stelle das -Pa"swort mitgeschickt. Damit ist der Server in der Lage, die -Identit"at des Benutzers festzustellen. Wenn \param{security = share} -vereinbart wurde, dann ignoriert der Server ein hier eventuell -mitgeschicktes Pa"swort. - -\subsection{Tree Connect} - -Als letztes legt der Client fest, welche Freigabe er ansprechen will. -Der entsprechende Aufruf hei"st \defin{Tree Connect}. Sofern -\param{security = share} vereinbart wurde, wird an dieser Stelle das -Pa"swort "uberpr"uft. Der Benutzername kann in diesem Fall nicht zur -Zugriffsregelung verwendet werden. Dieser wurde unter Umst"anden gar -nicht "ubermittelt, da der Client den Session Setup komplett auslassen -darf. Andererseits hat er bei einem durchgef"uhrten Session Setup kein -Pa"swort angeben m"ussen, anhand dessen die Identit"at des Benutzers -zweifelsfrei h"atte festgestellt werden k"onnen. - -\section{Rechte an Freigaben} -\label{freigaberechte} - -Bei Windows NT kann man mit zwei unterschiedlichen Mechanismen Rechte -vergeben. An einer Freigabe kann man "uber Schreib- und Lesezugriff -entscheiden. Innerhalb des Dateisystems kann man detailiert Rechte -vergeben. - -Ist bei Samba \param{security = user} gesetzt, so hat der Server die -M"oglichkeit, anhand des angemeldeten Benutzers Zugriffsrechte zu -vergeben oder zu verweigern. Wenn bei der Einstellung einer Freigabe -keine Parameter f"ur die Zugriffsrechte gesetzt sind, hat jeder -korrekt angemeldete Benutzer Leserecht. Man kann auch Gastbenutzern -Leserecht geben, indem man \param{guest ok = yes} setzt. - -Mit den Optionen zur Rechtevergabe an Freigaben hat man die -M"oglichkeit, einzelnen Benutzern und ganzen Unixgruppen Rechte zu -geben oder zu nehmen. Die M"oglichkeiten sind hier deutlich weitergehend -als die Semantik, die Unix mit den Rechtemasken f"ur den -Dateibesitzer, die besitzende Gruppe und den Rest der Welt bereit -stellt. Von den m"oglichen Anwendungen sollen hier drei h"aufig -ben"otigte F"alle dargestellt werden: - -\begin{itemize} -\item {\bf \emph{Alle} Benutzer haben gleichen Zugriff} - -\begin{verbatim} -[projekt] -path = /data/projekt -\end{verbatim} - -Bei dieser Freigabe bekommen alle Benutzer, die sich mit Namen und -Pa"swort am Server angemeldet haben, \emph{Leserecht} auf die -Freigabe. Schreibrecht vergibt man, indem man den Parameter -\param{writeable = yes} setzt: - -\begin{verbatim} -[projekt] - path = /data/projekt - writeable = yes -\end{verbatim} - -\item {\bf \emph{Einige} Benutzer haben gleichen Zugriff} - -Will man den Zugriff auf einige Benutzer einschr"anken, erstellt man -eine Liste \param{valid users} auf: - -\begin{verbatim} -[projekt] -path = /data/projekt -valid users = mueller, meier -\end{verbatim} - -Zu dieser Freigabe haben die Benutzer mueller und meier -Lesezugriff. Sollen diese Benutzer Schreibzugriff bekommen, so ist wie -im vorangegangenen Beispiel der Parameter \param{writeable = yes} zu -setzen: - -\begin{verbatim} -[projekt] -path = /data/projekt -valid users = mueller, meier -writeable = yes -\end{verbatim} - -F"ur den Parameter \param{valid users} spielt der Benutzer root keine -besondere Rolle. Das hei"st, da"s er auf die Freigabe \param{projekt} -keinen Zugriff hat. Soll er Zugriff bekommen, mu"s man ihn wie jeden -anderen Benutzer in die Liste \param{valid users} mit aufnehmen. - -Der Parameter \param{valid users} gibt die M"oglichkeit, ganze -Unixgruppen in den Zugriff mit aufzunehmen. Um dies zu erreichen, mu"s -man das at-Zeichen voranstellen: - -\begin{verbatim} -[projekt] -path = /data/projekt -valid users = root, @users -writeable = yes -\end{verbatim} - -Mit dieser Einstellung haben alle Benutzer, die in der Unixgruppe -users sind, Schreibzugriff auf die Freigabe. Zus"atzlich kann der -Benutzer root schreiben. - -\item {\bf Einige Benutzer haben Leserecht, andere Schreibrecht} - -Will man differenziert Rechte vergeben, so mu"s man s"amtliche -Benutzer, die "uberhaupt Zugriff auf die Freigabe bekommen sollen, in -die Liste \param{valid users} aufnehmen, und mit \param{writeable = -no} nur Leserechte vergeben. Die Benutzer, die "uber diese -Standardeinstellung hinaus Schreibrecht bekommen sollen, m"ussen in -die \param{write list} aufgenommen werden. - -\begin{verbatim} -[projekt] -path = /data/projekt -valid users = @users, @admins -write list = @admins -\end{verbatim} - -Mit diesen Einstellungen haben die Benutzer der Gruppe users -Leserecht, und die Benutzer der Gruppe admins haben Schreibrecht. - -\end{itemize} - -\section{Zugriffsrechte im Dateisystem} - -Unter Windows NT gibt es zwei M"oglichkeiten, Netzzugriff auf Dateien -zu kontrollieren. "Uber eine Freigabe kann ein Lese- oder ein -Schreibrecht vergeben werden. Ist das freigegebene Dateisystem mit -NTFS formatiert, k"onnen durch Access Control Lists im Dateisystem -Rechte vergeben werden. Damit mu"s ein Benutzer sowohl durch die -Freigabe- als auch durch die Dateisystemrechte zu einer Operation -berechtigt sein. - -Auch bei Samba auf Unix gibt es zwei Stellen, an denen Zugriff auf -Dateien und Verzeichnisse geregelt ist. Die im Kapitel -\ref{freigaberechte} beschriebenen Zugriffsrechte beziehen sich -ausschlie"slich auf die von Samba selbst vergebenen Rechte. Diese von -Samba vergebenen Rechte k"onnen die darunter liegenden Unixrechte -nicht erweitern. Das hei"st, Samba kann f"ur bestimmte Freigaben -Schreibrecht vergeben. Der Benutzer, der zugreift, kann aber nur dann -wirklich in den freigegebenen Dateien und Verzeichnissen schreiben, -wenn er dies unter Unix ebenfalls darf. Diese Einschr"ankung durch -Unixrechte ist ein wichtiges Prinzip von Samba: Im Dateisystem -implementiert Samba keine eigenen Zugriffskontrollen, sondern -verl"a"st sich auf die Unixmechanismen. - -Samba k"onnte theoretisch eine eigene Datenbank von Zugriffsrechten -f"uhren. In dieser Datenbank k"onnte die vollst"andige NT-Semantik von -Access Control Lists abgelegt und implementiert werden. Zwei Gr"unde -sprechen gegen diesen Ansatz: - -\begin{itemize} -\item Wenn Samba tats"achlich Dateisystemrechte implementieren w"urde, - w"aren die Entwickler daf"ur verantwortlich, da"s diese korrekt - eingehalten werden. Zugriffsrechte auf Dateien werden vom - Betriebssystem bereits hervorragend implementiert, warum sollte man - sich also die zus"atzliche Komplexit"at einhandeln?\footnote{Unter - Marketinggesichtspunkten kann es wichtig sein, vollst"andige - NT-Kompatibilit"at zu implementieren, die Samba mit dem - Unix-Rechtemodell bisher nicht bietet. Es existieren Patches, die - eine eigene ACL-Datenbank implementieren. Diese sind jedoch leider - momentan noch nicht frei verf"ugbar. Dies ist mit der GPL durchaus - m"oglich, da sie niemandem zug"anglich gemacht wurden. Es wird - jedoch in der Zukunft eine ver"offentlichte Version geben.} -\item Sobald Samba eine eigene ACL-Datenbank implementiert, gilt diese - ausschlie"slich f"ur den Dateizugriff via SMB. Es ist nicht - m"oglich, Samba-ACL synchron mit dem Unix-Dateisystem zu halten, - wenn auch noch Zugriff von Unixprozessen aus erlaubt wird. Wenn sich - Verzeichnisb"aume "andern, ohne da"s Samba involviert ist, wie soll - Samba dann die ACLs korrekt anpassen? -\end{itemize} - -Eng verwoben mit den Unix-Zugriffsrechten auf Dateien ist in der -Implementation von Samba die Behandlung der DOS-Attribute. Diese -Attribute sind Eigenschaften von Dateien, die es in dieser Form unter -Unix nicht gibt. Viele Applikationen, die auf ein Netzwerklaufwerk -zugreifen, setzen jedoch funktionierende Attribute voraus. -Insbesondere das Archiv-Attribut wird von vielen Programmen verwendet. -Insgesamt kennt DOS vier verschiedene Attribute, die f"ur Dateien -vergeben werden k"onnen: - -\begin{description} -\item[Read-Only] Der Inhalt dieser Datei kann nur gelesen, aber nicht - geschrieben werden. Die Datei kann nicht gel"oscht werden. -\item[System] Diese Datei ist f"ur spezielle Betriebssystemzwecke - vorgesehen. -\item[Hidden] Diese Datei wird mit dem Kommando 'DIR' nicht angezeigt. -\item[Archiv] Das Archivbit wird bei jedem Schreibzugriff gesetzt. - Backupprogrammen ist es freigestellt, dieses Bit zur"uckzusetzen. - Damit kann eine inkrementelle Sicherung erm"oglicht werden. -\end{description} - -Diese Bits k"onnen unter DOS von jedem Benutzer frei gesetzt und -wieder zur"uckgesetzt werden. Das Schreibschutzbit ist also nicht als -echter Zugriffschutz zu verstehen, sondern nur als kleine -Hilfestellung gegen Fehlbedienungen. - -\subsection{Abbildung DOS-Attribute zu Unix-Rechten} - -Unix f"uhrt mit jeder Datei einen Satz von Zugriffsrechten mit. Diese -sind aufgeteilt in drei Gruppen von Benutzern: Der Dateibesitzer, die -besitzende Gruppe und alle anderen. Jeder Gruppe k"onnen drei -Rechte zugeteilt werden: Lesen, Schreiben und Ausf"uhren. - -Unter DOS werden Ausf"uhrungsrechte nicht verwendet. Sie stehen f"ur -Samba zur Verf"ugung, um die DOS-Attribute im Unix-Dateisystem -abzubilden. Das Schreibschutzbit unter DOS hat mit dem Schreibrecht -des Dateibesitzers unter Unix eine Entsprechung. Bis auf die Umsetzung -des Schreibschutzbits kann die Umsetzung der Attribute unter Samba mit -den entsprechenden Parametern \param{map } gesteuert werden, -wobei das Archivbit ohne Zusatzangabe umgesetzt wird, die anderen -beiden Attribute nicht. Die Attributumsetzung erfolgt anhand der -folgenden Tabelle: - -\[ \begin{tabular}{|l|l|c|l|l|} -\hline -DOS-Attribut & Unix-Recht & Maske & Parameter & Standard \\ -\hline\hline -Schreibschutz & Schreibrecht Besitzer & 200 & - & immer \\ -\hline -Archiv & Ausf"uhrung Besitzer & 100 & \param{map archive} & \param{yes} \\ -\hline -System & Ausf"uhrung Gruppe & 010 & \param{map system} & \param{no} \\ -\hline -Versteckt & Ausf"uhrung Andere & 001 & \param{map hidden} & \param{no} \\ -\hline -\end{tabular} \] - -Samba mu"s nun diese beiden Dateiattribute ineinander "uberf"uhren. -Samba mu"s neu erstellten Dateien Unixrechte zuordnen. Wird eine -Datei neu erstellt, dann gibt der Client dem Server die DOS-Attribute -mit, mit der er die Datei erstellt haben m"ochte. Daraus formt Samba -einen Satz von Unix-Zugriffsrechten. Diese Rechte werden vom Parameter -\param{create mask} eingeschr"ankt. Die Standardvorgabe f"ur die -\param{create mask} ist gleich \param{744}, was der Rechtemaske -\param{rwxr-{}-r-{}-} entspricht. Der Dateieigent"umer hat Schreib- und -Leserecht, alle anderen haben reines Leserecht. Samba schr"ankt die -Rechte ein, indem der gew"unschte Satz an Rechten mit einer logischen -UND-Operation mit der \param{create mask} verkn"upft wird. Nur die -Rechte, die in der \param{create mask} gesetzt sind, k"onnen -m"oglicherweise in der neu erzeugten Datei auftauchen. In einem -weiteren Schritt setzt Samba explizit gew"unschte Zugriffsrechte -anhand des Parameters \param{force create mode}, dessen Standardwert -auf \param{000} steht. Dies geschieht durch eine ODER-Verkn"upfung mit -diesem Wert. - -Diese Zusammenh"ange werden an einem Beispiel deutlicher. Es kann -gew"unscht sein, da"s auf neu erstellten Dateien nur der -Dateibesitzer und die Gruppe Leserecht haben sollen. Der Rest der Welt -soll diese Dateien nicht lesen k"onnen. Das wird dadurch erreicht, -da"s man die \param{create mask = 740} setzt, also das Leserecht f"ur -den Rest der Welt ausmaskiert. Es kann dar"uber hinaus gew"unscht -sein, da"s die besitzende Gruppe ein Schreibrecht einger"aumt -bekommt. Das kann man durch \param{force create mode = 020} erreichen. -Tabellarisch dargestellt hei"st dies: - -\[ \begin{tabular}{|l|l||c|l|} -\hline -Wunsch & & & \texttt{rw-r-{}-r-{}-} \\ -\hline -create mask & 740 & UND & \texttt{rw-r-{}-{}-{}-{}-} \\ -\hline -\hline -& & & \texttt{rw-r-{}-{}-{}-{}-} \\ -\hline -force create mode & 020 & ODER & \texttt{-{}-{}-{}-w-{}-{}-{}-} \\ -\hline -\hline -Ergebnis & & & \texttt{rw-rw-{}-{}-{}-} \\ -\hline -\end{tabular} \] - -Die Ausf"uhrungsrechte auf Dateien werden unter DOS nicht verwendet, -sie k"onnen also verwendet werden, um DOS-Attribute im -Unix-Dateisystem abzulegen. Ausf"uhrungsrechte auf Dateiverzeichnissen -wirken sich jedoch auf das Verhalten von Samba aus, da durch sie der -Zugriff zu den Verzeichnissen geregelt wird. Daher kann es -w"unschenswert sein, da"s die Rechtezuweisung auf Dateien und -Verzeichnissen unterschiedlich geregelt wird. Die Parameter -\param{create mask} und \param{force create mode} wirken daher nur auf -neu angelegte Dateien. F"ur Verzeichnisse sind die Parameter -\param{directory mask} und \param{force directory mode} -verantwortlich. Der Vorgabewert f"ur \param{directory mask} ist -hierbei \param{755}, um den Zutritt f"ur die Gruppe und den Rest der -Welt zu erm"oglichen, die Vorgabe f"ur \param{force directory mode} -besetzt mit dem Wert \param{000} kein zus"atzliches Recht. - -\subsection{Beispiel: Ein Projektverzeichnis} - -H"aufig mu"s man einer Anzahl von Benutzern gemeinsamen Schreibzugriff -auf eine Freigabe, beispielsweise auf die Freigabe \param{fibu}, -geben. Das Beispiel der Projektverzeichnisse wird noch mehrfach -betrachtet werden. Es gibt mit Samba viele M"oglichkeiten der -Realisation, die alle f"ur unterschiedliche Situation geeignet sind. - -Ein einfaches Projektverzeichnis l"a"st sich folgenderma"sen -realisieren: - -\begin{verbatim} -[fibu] - path = /data/fibu - writeable = yes - valid users = @fibu, mueller, meier -\end{verbatim} - -Damit darf die Gruppe \username{fibu} das Recht, auf diese Freigabe -schreibend zuzugreifen. \username{mueller} und \username{meier}, die -nicht Mitglied der Finanzbuchhaltung sind, d"urfen ebenfalls -schreiben. Damit problemloser gemeinsamer Zugriff m"oglich ist, mu"s -die Rechtevergabe im Unix-Dateisystem geregelt werden. Dabei wird hier -vorausgesetzt, da"s im Unix selbst nur die Benutzer der Gruppe -\username{fibu} auf \dateistyle{/data/fibu} zugreifen sollen. -\username{meier} und \username{mueller} sind \emph{nicht} Mitglieder -der Gruppe \username{fibu}, sollen aber trotzdem schreiben k"onnen. -F"ur sie mu"s eine Sonderregelung geschaffen werden, die sich mit -Standard-Unixrechten nicht abbilden l"a"st. Dazu ben"otigt man die -ACLs aus Kapitel \ref{acl}. - -Hat man keine ACLs zur Verf"ugung, gibt es eine sehr einfache -M"oglichkeit, jegliche Probleme im gemeinsamen Dateizugriff zu -vermeiden, ist der Parameter \param{force user}. Will man diesen -Parameter anwenden, so sollte man f"ur diese Freigabe oder f"ur alle -solchen Gruppenfreigaben einen separaten User anlegen, und diesem dann -das freigegebene Verzeichnis "ubergeben: - -\begin{verbatim} -root@delphin:~ > mkdir -p /data/fibu -root@delphin:~ > useradd fibuuser -root@delphin:~ > chown projektuser /data/fibu/ -root@delphin:~ > chmod 770 /data/fibu -\end{verbatim} - -Die Freigabe sieht dann folgenderma"sen aus: - -\begin{verbatim} -[fibu] - path = /data/fibu - writeable = yes - valid users = @fibu, mueller, meier - force user = fibuuser -\end{verbatim} - -Die Zugriffskontrolle wird bei dieser Definition ganz normal anhand -von \param{valid users} vorgenommen. Nur die dort erw"ahnten Benutzer -bekommen Zugriff auf die Freigabe. \emph{Nachdem} der Zugriff gew"ahrt -wurde, vergi"st Samba den Namen, mit dem sich der Benutzer angemeldet -hat. Samba schaltet f"ur jegliche Zugriffe im Dateisystem in den -Benutzer \username{fibuuser}. Man mu"s sich damit nicht mehr um -gemeinsame Zugriffsrechte im Unix k"ummern, da man ohnehin nur unter -einer einzigen Userid arbeitet. Man verliert jedoch die -Nachvollziehbarkeit. Alle Dateien geh"oren \username{pcuser}. Dies -wird insbesondere auch so im entsprechenden Dialog von Windows -angezeigt. - -Mit etwas mehr Aufwand kann man es schaffen, den Dateibesitzer korrekt -zu behalten und gleichzeitig gemeinsames Schreiben zu erm"oglichen. -Das Verzeichnis \dateistyle{/data/fibu} selbst kann mit den -korrekten Gruppenschreibrechten angelegt werden: - -\begin{verbatim} -root@delphin:~ > mkdir -p /data/fibu -root@delphin:~ > groupadd fibu -root@delphin:~ > chgrp fibu /data/fibu/ -root@delphin:~ > chmod 770 /data/fibu -\end{verbatim} - -Die Benutzer der Gruppe \username{fibu} k"onnen in diesem -Verzeichnis einwandfrei Dateien anlegen und ihre eigenen Dateien auch -"andern. Es gibt jedoch noch zwei Probleme. - -\begin{itemize} -\item \username{mueller} und \username{meier} k"onnen nicht auf das - Verzeichnis zugreifen, da Unix ihnen den Zugriff verweigert. -\item Die Benutzer aus der Gruppe \username{fibu} m"ussen nicht - notwendigerweise diese Gruppe als Hauptgruppe haben. Das hei"st, neu - angelegte Dateien geh"oren m"oglicherweise anderen Gruppen an. - Dieses spezielle Problem lie"se sich mit dem set-group-id Bit auf - dem Verzeichnis \dateistyle{/data/fibu} l"osen: - -\begin{verbatim} -chmod g+s /data/fibu -\end{verbatim} - - \username{mueller} und \username{meier} blieben jedoch immer noch - au"sen vor, da sie nicht in der Gruppe \username{fibu} sind, also - auf dem Verzeichnis \dateistyle{/data/fibu} kein Schreibrecht haben. -\end{itemize} - -Beide Probleme bekommt man mit dem Parameter \param{force group = - fibu} in den Griff. Dieser Parameter arbeitet genau so wie -\param{force user}, nur da"s er sich anstatt der User-ID auf die -Group-ID bezieht. Jegliche Dateisystemzugriffe werden damit als Gruppe -\username{fibu} vorgenommen, die User-ID bleibt unangetastet. - -Als letztes mu"s nun noch sichergestellt werden, da"s die Gruppe, in -diesem Fall \username{fibu}, immer schreiben kann, und da"s der -Rest der Welt keinen Zugriff bekommt. Die vollst"andige -Freigabedefinition sieht demnach folgenderma"sen aus: - -\begin{verbatim} -[fibu] - path = /data/fibu - writeable = yes - valid users = @fibu, mueller, meier - force group = fibu - create mask = 740 - directory mask = 750 - force create mode = 020 - force directory mode = 020 -\end{verbatim} - -\todo{Global- und shareparameter, copy = freigabe} - -\section{Projektverzeichnisse, zum zweiten} - -Folgendes Problem stellt sich bei der Migration von Novell zu Samba -recht h"aufig. Unter Novell kann man anhand von -Gruppenzugeh"origkeiten den Zugriff auf Verzeichnisse regeln. Dies ist -unter Samba anhand von Unixrechten ebenfalls m"oglich. Was Unix leider -nicht zur Verf"ugung stellt, ist die M"oglichkeit, Verzeichnisse vor -Benutzern zu verstecken. Ein Benutzer sieht grunds"atzlich alle -Verzeichnisse, bekommt aber bei vielen dieser Verzeichnisse die -Meldung, da"s der Zugriff verweigert wurde. Wenn es jetzt anhand der -Gruppenzugeh"origkeit des Benutzers m"oglich w"are, nur die -Verzeichnisse anzuzeigen, auf die er tats"achlich Zugriff hat, -k"onnten die Verzeichnisse deutlich "ubersichtlicher werden. - -Die Flexibilit"at von Samba erm"oglicht es, diese von Unix -vorgegeben Beschr"ankung zu umgehen, und zwar unter Benutzung von -Skripten, die vor dem Verbinden mit einer Freigabe ausgef"uhrt werden. - -Folgendes Szenario wird vorausgesetzt: Jeder Benutzer ist in mehrere -Gruppen eingeteilt, die jeweils Projekte, Arbeitsgruppen oder -Abteilungen darstellen k"onnen. Jede dieser Gruppen hat unter -\dateistyle{/data/groups} ein eigenes Verzeichnis, auf das sie schreiben -darf. Die einzelnen Verzeichnisse haben das Set Group ID Bit gesetzt, -damit die neu angelegten Dateien den jeweiligen Gruppen angeh"oren. - -Als Beispiel gebe es die drei Gruppen \param{edv}, \param{fibu} und -\param{verkauf}. Unter \dateistyle{/data/groups} kann man folgende -Gruppenverzeichnisse anlegen: - -{\small\begin{verbatim} -root@server:/data/groups> ls -l -total 12 -drwxrws--- 2 root edv 4096 Jan 31 06:43 edv -drwxrws--- 2 root fibu 4096 Jan 31 06:43 fibu -drwxrws--- 2 root verkauf 4096 Jan 31 06:43 verkauf -root@server:/data/groups> -\end{verbatim} -} - -Die korrekten Rechte erreicht man unter Unix durch: - -{\small\begin{verbatim} -root@server:/root> mkdir /data/groups/edv -root@server:/root> chgrp edv /data/groups/edv -root@server:/root> chmod 2770 /data/groups/edv -\end{verbatim} -} - -Eine Freigabe, die jedem Benutzer anhand seiner Rechte hierauf Zugriff -gew"ahrt, kann folgenderma"sen aussehen: - -{\small\begin{verbatim} -[allgroups] -path = /data/groups -writeable = yes -create mode = 740 -directory mode = 750 -force create mode = 020 -force directory mode = 020 -\end{verbatim} -} - -Zu beachten ist hier, da"s keine zus"atzlichen Einschr"ankungen anhand -von \param{valid users} notwendig sind, da der Zugriff durch die -Unixrechte beschr"ankt ist. Die Parameter \param{create mask} und -\param{directory mask} sind nicht strikt notwendig, da bereits auf der -Ebene \dateistyle{/data/share} die Benutzer abgewiesen werden. Die -Parameter \dateistyle{force create mode} und \param{force directory mode} -sind hingegen notwendig, da ohne sie neu angelegte Dateien nicht die -notwendigen Gruppenschreibrechte erhalten w"urden, die zum gemeinsamen -Zugriff notwendig sind. - -Diese Freigabe erf"ullt funktional genau die Anforderungen, da"s -jeder in die Verzeichnisse schreiben darf, f"ur die er die -Gruppenmitgliedschaft hat. Der Nachteil an diesem Verfahren ist, da"s -er alle anderen Verzeichnisse sieht, was bei gro"sen Servern mit -vielen Gruppen recht un"ubersichtlich werden kann. - -Die preexec-Skripte von Samba erm"oglichen die "ubersichtliche -Darstellung der Gruppenstruktur. Ein preexec-Skript wird ausgef"uhrt, -bevor der Benutzer tats"achlich mit der Freigabe verbunden wird. - -{\small\begin{verbatim} -[gruppen] -path = /data/users/%U -root preexec = /usr/local/bin/mklinks %U -writeable = yes -\end{verbatim} -} - -Die Datei \dateistyle{mklinks} hat folgenden Inhalt: - -{\small\begin{verbatim} -#!/bin/sh -umask 022 -cd /data/users -rm -rf "$1" -mkdir "$1" -cd "$1" -for i in $(groups $1) -do - ln -s "/data/groups/$i" . -done -\end{verbatim} -} - -Beim Verbinden an die Freigabe wird das Verzeichnis -\dateistyle{/data/users/username} frisch erstellt, das anhand der -Gruppenzugeh"origkeit des Benutzers eine Liste von symbolischen Links -erstellt, die auf die eigentlichen Gruppenverzeichnisse verweisen. -Damit bekommt er nur die Verzeichnisse im Explorer angezeigt, auf die -er tats"achlich Zugriff hat. Durch die Angabe \param{path = -/data/users/\%U} ist zudem sichergestellt, da"s die Freigabe f"ur -alle Benutzer gleich hei"st, aber f"ur jeden Benutzer auf ein eigenes -Verzeichnis verweist. - -Das Skript wird in diesem Beispiel als \param{root preexec} -ausgef"uhrt, um den Verwaltungsaufwand beim Anlegen neuer Benutzer zu -minimieren. Mit einem reinen \param{preexec} ohne Rootrechte w"are es -notwendig, f"ur jeden Benutzer unterhalb von \param{/data/users} ein -eigenes Verzeichnis mit den notwendigen Rechten anzulegen. Jedoch darf dieses -Verfahren nur dann angewendet werden, wenn die Benutzernamen unter -vertrauensw"urdiger Kontrolle stehen. Wenn es m"oglich ist, da"s -Benutzernamen beispielsweise von einem NIS-Server bezogen werden, kann "uber -einen Benutzernamen \username{../..} das gesamte Dateisystem -gel"oscht werden. Ist ein NIS-Server beteiligt, mu"s man das Verfahren -ohne \param{root preexec} und nur mit \param{preexec} ohne Root-Rechte -verwenden. - -Alternativ k"onnte man das Verzeichnis mit der Gruppenliste im -Heimatverzeichnis des Benutzers anlegen, wobei dabei Zweifel -bez"uglich der "Ubersichtlichkeit angebracht sind. Ein weiteres -Argument, das Skript unter Rootrechten auszuf"uhren, ist die -Betriebssicherheit. Ohne dies w"are es dem Benutzer m"oglich, sich -vollst"andig von einem Gruppenverzeichnis auszuschlie"sen indem er das -gesamte Verzeichnis inklusive symbolischem Link l"oscht. Mit der -dargestellten Version geh"ort das Verzeichnis mit den symbolischen -Links dem Benutzer root, und Fehlbedienungen in dieser Ebene sind -ausgechlossen. - -Wenn man die Freigabe \param{[allgroups]} auf \param{browseable = - no} setzt, so hat man maximale "Ubersichtlichkeit bei vollem -Zugriff auf s"amtliche Gruppenverzeichnisse durch den Administrator -gegeben. - -"Andern sich die Gruppenzugeh"origkeiten eines Benutzers, so kann -er einfach durch ein Neuverbinden an die Freigabe die neue Sicht auf -die Verzeichnisstruktur bekommen. Dieses Neuverbinden kann erzwungen -werden, indem der richtige Serverprozess get"otet wird. Dieser kann -anhand des Programms \prog{smbstatus} leicht herausgefunden werden. - -\section{ACLs} -\label{acl} - -Die Zugriffsrechte unter Unix werden durch den Dateimodus bestimmt. -Dieser Dateimodus enth"alt neun Bits, die den Zugriff auf die Datei -regeln. Dazu kommen drei zus"atzliche Bits f"ur spezielle Anwendungen. -Mit diesen neun Bits k"onnen Zugriffsrechte f"ur drei Benutzerklassen -vergeben werden: Den Dateibesitzer, die besitzende Gruppe und den Rest -der Welt. Mit dem Befehl \prog{chmod} werden diese Rechte gesetzt. - -Dieser Mechanismus hat einen unsch"atzbaren Vorteil: Er ist einfach. -Mit insgesamt zw"olf Bits kann ein sehr gro"ses Spektrum an Szenarien -abgedeckt werden. Jedoch ist es oft notwendig, Zugriffsrechte feiner -zu vergeben, als dies mit Unix m"oglich ist. Insbesondere haben viele -Unternehmensanwendungen komplexere Anforderungen an die -Zugriffsrechte. - -Beispielsweise soll auf einem Verzeichnis die Gruppe \username{fibu} -Schreibrecht haben und die Gruppe \username{controlling} soll Leserecht -bekommen. Der Benutzer \username{mueller} ist nun in der Gruppe -\username{controlling} und hat sich bei der Finanzbuchhaltung unbeliebt -gemacht. Er soll auf dieses Verzeichnis keinen Zugriff mehr haben. Eine -solche Konfiguration ist mit den traditionellen Unix-Zugriffsrechten nicht -mehr abzubilden. - -Die Hersteller von Unix haben sich irgendwann zusammengefunden, um das -beschr"ankte Rechtemodell zu erweitern. Geplant war eine Erweiterung, die -sich in das vorhandene Rechtemodell von Unix nahtlos einbinden l"a"st, aber -die dem Benutzer erheblich mehr M"oglichkeiten zur -Rechtesteuerung gibt. - -Zugriffskontrollisten (Access Control Lists oder ACLs) unterst"utzen genau -diese weitergehenden Zugriffsrechte. Beliebige Benutzer und -Gruppen k"onnen Rechte auf Dateien und Verzeichnissen bekommen oder -verweigert bekommen. Die klassischen drei Benutzerklassen kann man als drei -Eintr"age in einer ACL ansehen. - -Das Modell der ACLs erweitert M"oglichkeiten, wem man Rechte geben -kann. Es erweitert nicht die Art der Rechte, die vergeben werden -k"onnen. Es geht weiterhin nur um die Rechte Lesen, Schreiben und -Ausf"uhren, mit der bekannten Bedeutung auf Dateien und -Verzeichnissen. - -\subsection{Rechte unter Unix} - -Die Auswertung der Zugriffsrechte unter Unix funktioniert, indem -zuerst entschieden wird, welche der drei Rechtegruppen Benutzer, -Gruppe und Andere benutzt werden soll. Im zweiten Schritt wird -nachgesehen, ob das gew"unschte Recht auf der Datei gesetzt ist. - -Die Zugriffsrechte eines Benutzers werden bestimmt durch seinen -Sicherheitskontext. Dieser Sicherheitskontext besteht aus seiner -effektiven User ID (EUID), seiner prim"aren Gruppe (EGID) und seinen -zus"atzlichen Gruppen (GIDs). Die Entscheidung f"ur eine Rechtegruppe -funktioniert in drei Schritten: - -\begin{itemize} -\item Ist EUID gleich dem Dateibesitzer? In diesem Fall wird die erste - Rechtegruppe, die f"ur den User benutzt. -\item Ist der Benutzer in der besitzenden Gruppe? Dann wird die zweite - Rechtegruppe f"ur Group benutzt. Die tats"achliche Pr"ufung - passiert, indem die besitzende Gruppe in der Liste GID's gesucht - wird, in der der Benutzer aufgenommen ist. -\item Ist beides nicht der Fall, so wird die dritte Rechtemaske f"ur - Others benutzt. -\end{itemize} - -Wenn entschieden wurde, welche Rechtemaske verwendet werden soll, wird -nicht mehr versucht, eine andere Rechtemaske zu verwenden. Wenn ein -Benutzer sich selbst das Leserecht auf einer Datei genommen hat, und -dem Rest der Welt "uber die Maske Others Leserecht gegeben hat, wird -er die Datei nicht lesen k"onnen. - -\subsection{Eintr"age in einer ACL} - -Da ACLs eine reine Erweiterung des Unix-Rechtemodells sind, gibt es -weiterhin einen Dateibesitzer und eine besitzende Gruppe f"ur jede -Datei. Eine Access Control List kennt eine Anzahl unterschiedlicher -Eintr"age: - -\begin{description} -\item[ACL\_USER\_OBJ:] Dies ist die Rechtemaske f"ur den - Dateibesitzer. Sie entspricht der ersten Rechtemaske f"ur den User - im klassischen Rechtemodell. -\item[ACL\_GROUP\_OBJ:] Dies ist die Entsprechung der - Group-Rechtemaske im klassischen Modell. -\item[ACL\_OTHER:] Die Rechtemaske f"ur den Rest der Welt unter Unix. - Von diesen ersten drei Eintr"agen gibt es jeweils genau einen in - jeder ACL. -\item[ACL\_USER:] Ein Eintrag f"ur einen benannten Benutzer. Von - diesem Eintrag kann es mehrere geben, mit denen f"ur - unterschiedliche Benutzer unterschiedliche Rechte vergeben werden. - Gibt es einen Benutzereintrag ohne jegliche Rechte, kann dieser auf - die Datei nicht zugreifen. -\item[ACL\_GROUP:] Eintrag f"ur eine Gruppe. Auch von diesem Eintrag - kann es mehrere geben. -\item[ACL\_MASK:] Die Maske f"ur die effektiven Rechte. Sobald f"ur - eine Datei ACLs verwendet werden, wird \prog{ls -l} diese - Rechtemaske als Gruppenrecht anzeigen. Sobald mit \prog{chmod} die - Rechte f"ur die besitzende Gruppe ver"andert werden (etwa per - \prog{chmod g-rx}), wird die ACL\_MASK ver"andert. -\end{description} - -\subsection{Rechte mit ACLs} - -Wenn ein Prozess auf eine Datei zugreifen will, wird mit dem folgenden -Algorithmus festgestellt, ob der Zugriff zugelassen oder verweigert -wird. - -\begin{itemize} -\item Ist die EUID des Prozesses gleich dem Dateibesitzer, wird der - Zugriff gew"ahrt, wenn der Eintrag f"ur ACL\_USER\_OBJ die - ben"otigten Zugriffsrechte enth"alt. -\item Wenn es in der ACL einen ACL\_USER Eintrag gibt, der der EUID - entspricht, wird dieser Eintrag verwendet. Ist dass gew"unschte - Recht in diesem Eintrag vorhanden, wird der Zugriff gew"ahrt, sofern - es \emph{auch} im Eintrag ACL\_MASK vorhanden ist. Ist das Recht - entweder im ACL-Eintrag oder in ACL\_MASK \emph{nicht} vorhanden, - wird das Recht verweigert. -\item Ist der Benutzer in der besitzenden Gruppe der Datei ist - (Eintrag f"ur ACL\_GROUP\_OBJ), oder wenn der Benutzer in einer - Gruppeneintr"age vom Typ ACL\_GROUP ist, wird folgendes getestet: - Sind die gew"unschten Rechte in einem der Eintr"age vollst"andig - vorhanden, so wird der Zugriff gew"ahrt, sofern das Recht ebenfalls - im Eintrag ACL\_MASK vorhanden ist. Ansonsten wird der Zugriff - verweigert. -\item Wenn kein Eintrag gefunden werden konnte, wird der Zugriff - anhand des Eintrags ACL\_OTHER gew"ahrt. -\end{itemize} - -Es ist hier wichtig festzustellen, da"s die Benutzereintr"age in einer -ACL immer \emph{vor} Gruppeneintr"agen durchsucht werden. Damit werden -die spezifischeren Eintr"age grunds"atzlich vorrangig vor den weniger -spezifischen Eintr"agen behandelt. - -\subsection{ACL-Beispiel} - -Linux unterst"utzt mit dem richtigen Kernelpatch die beschriebenen -ACLs auf dem Ext2-Dateisystem. Der Kernelpatch ist zu diesem Zeitpunkt -(Sommer 2001) notwendig, da Linus Torvalds ihn noch nicht in den -Standardkernel aufgenommen hat. Unter -\href{http://acl.bestbits.at/}{http://acl.bestbits.at} findet man den -entsprechenden Kernelpatch und die notwendigen Utilities. ACLs setzen -kann man mit \prog{setfacl}, mit \prog{getfacl} werden ACLs angezeigt. - -Das oben beschriebene Beispiel eines Verzeichnisses f"ur die -Finanzbuchhaltung l"a"st sich folgenderma"sen erstellen: - -\begin{verbatim} -root@delphin:~ > cd / -root@delphin:/ > mkdir fibu -root@delphin:/ > chmod o-rwx fibu -root@delphin:/ > setfacl -m group:fibu:rwx fibu -root@delphin:/ > setfacl -m group:controlling:rx fibu -root@delphin:/ > setfacl -m user:mueller:--- fibu -root@delphin:/ > getfacl fibu -# file: fibu -# owner: root -# group: root -user::rwx -user:mueller:--- -group::r-x -group:fibu:rwx -group:controlling:r-x -mask:rwx -other:--- -\end{verbatim} - -Obwohl der Benutzer \username{mueller} Mitglied der Gruppe -\username{controlling} ist, hat er keinen Zugriff auf dieses -Verzeichnis, da der ACL-Eintrag f"ur ihn keinen Zugriff erlaubt, und -dieser vor seinem Gruppeneintrag gefunden wird. - -Interessant an diesem Beispiel ist die Behandlung der ACL-mask. Sie -wird in der Anzeige von \prog{ls -l} als Gruppenberechtigung -angezeigt. - -\begin{verbatim} -root@delphin:/ > ls -ld fibu -drwxrwx--- 2 root root 4096 Aug 28 07:56 fibu -\end{verbatim} - -An der Ausgabe von \prog{getfacl} ist zu sehen, da"s die besitzende -Gruppe \username{root} nur Lese- und Ausf"uhrungsrechte hat. Trotzdem -zeigt \prog{ls -l} f"ur die Gruppe ein \prog{rwx} an. Dies wird -gemacht, um Benutzer vor "Uberraschungen zu sch"utzen. "Uber ACLs sind -auf dem Verzeichnis \dateistyle{fibu} mehr Rechte vergeben, als aus -der Ausgabe von \prog{ls -l} ersichtlich ist. Will man die -Rechtevergabe durch ACLs ausschalten, gen"ugt es, mit \prog{chmod - g-rwx fibu} die Rechte f"ur die besitzende Gruppe komplett -wegzunehmen. - -\subsection{Default ACLs} - -Das vorangegangene Beispiel ist noch nicht vollst"andig. F"ur das -Verzeichnis \dateistyle{fibu} sind die Rechte korrekt gesetzt. Wenn -jedoch Benutzer in diesem Verzeichnis Dateien anlegen, gelten wieder -nur die normalen Regeln von Unix. Erreichen m"ochte man jedoch in der -Regel, da"s f"ur neue Dateien unterhalb eines solchen Verzeichnisses -wieder die gleichen Regeln gelten wie f"ur das Verzeichnis selbst. - -Wenn eine neue Datei oder ein Verzeichnis erstellt wird, mu"s "uber -die Zugriffsrechte entschieden werden, die darauf gesetzt werden. Im -traditionellen Unixmodell wird die Rechtemaske auf neuen Dateien und -Verzeichnissen durch die so genannte \emph{umask} eingeschr"ankt. Ein -Programm, das eine Datei erzeugt, kann einen Satz von Zugriffsrechten -bestimmen, mit dem die Datei erzeugt werden soll. Bevor die Datei -tats"achlich mit diesen Rechten erzeugt wird, wird dieser Satz von -Rechten um die Bits eingeschr"ankt, die in der \emph{umask} gesetzt -sind. Wenn ACLs verwendet werden, ist dieses einfache Modell nicht -mehr verwendbar. Stattdessen kann man f"ur jedes Verzeichnis eine -so genannte \emph{Default ACL} vergeben. Diese werden an Dateien und -Verzeichnisse weitergegeben. - -Setzen kann man die Default ACL, indem man dem Befehl \prog{setfacl} -den Schalter \prog{-d} mitgibt: - -\begin{verbatim} -root@delphin:/ > setfacl -d -m group:fibu:rwx fibu/ -root@delphin:/ > setfacl -d -m group:controlling:r-x fibu -root@delphin:/ > setfacl -d -m user:mueller:--- fibu -root@delphin:/ > getfacl fibu -# file: fibu -# owner: root -# group: root -user::rwx -user:mueller:--- -group::r-x -group:fibu:rwx -group:controlling:r-x -mask:rwx -other:--- -default:user::rwx -default:user:mueller:--- -default:group::r-x -default:group:fibu:rwx -default:group:controlling:r-x -default:mask:rwx -default:other:--- -\end{verbatim} - -Mit diesen Eintr"agen ist das Beispielverzeichnis vollst"andig. Die -Default-Eintr"age werden an neue Dateien und Verzeichnisse -weitergegeben. - -Zu beachten ist hier noch die umask des Benutzers. Sobald ACLs benutzt -werden, wirken die Gruppenrechte, die im \prog{ls} dargestellt und mit -\prog{chown} ge"andert werden, als \emph{mask} einschr"ankend auf die -ACLs. Wenn die umask eines Unix-Benutzers so gesetzt ist, da"s die -Gruppe eingeschr"ankt wird, so wirkt sich das beim Einsatz von ACLs so -aus, da"s bei neu angelegten Dateien und Verzeichnissen diese -Gruppeneinschr"ankungen als \emph{mask} wirken und somit die default -ACLs beschr"anken. - -\subsection{ACLs aus Windows-Sicht} - -Was hat das ganze mit Samba zu tun? Zun"achst einmal sind -Windows-Administratoren gewohnt, deutlich st"arker mit ACLs zu -arbeiten, als Unixbenutzer. Dies mag daran liegen, da"s Unix lange -Zeit keine ACLs unterst"utzt hat und man vieles auch mit den -traditionellen Zugriffsrechten erreichen kann. Bei der Planung eines -Sambaservers als Ersatz f"ur einen NT-Server stellt sich so -zwangsl"aufig die Frage nach der Unterst"utzung von ACLs. - -Der Zusammenhang mit Samba ergibt sich nun daraus, da"s mit Samba 2.2 -diese ACLs von Windows aus angeschaut und sogar gesetzt werden -k"onnen. Dazu mu"s bei der Kompilation von Samba die Option -\prog{-{}-with-acl-support} an das Skript \prog{configure} "ubergeben -worden sein, und beim Kompilieren mu"s die ACL-Unterst"utzung in den -Headerfiles des Kernels vorhanden sein. Ist beides der Fall, kann man -"uber die Sicherheitseigenschaften von Dateien und Verzeichnissen -deren ACLs editieren. Dabei ergibt sich bei der Umsetzung von den sehr -komplexen NT-ACLs zu den deutlich einfacheren Posix-ACLs h"aufig eine -gewisse Einschr"ankung der Funktionalit"at, aber dies ist leider nicht -zu vermeiden. Die Anforderungen, die im obigen Beispiel skizziert -wurden, werden jedoch korrekt umgesetzt. Wer sich f"ur die genaue -Umsetzung der ACLs zwischen der NT- und der Posix-Welt interessiert, -mag sich die Datei \dateistyle{samba-acls.ag.pdf} aus dem -Unterverzeichnis \prog{slides} eines Samba-FTP Servers ansehen. Dies -sind die Folien eines Vortrags von Jeremy Allison "uber jene -Umsetzung, den er bei der CIFS 2001 Konferenz in Bellevue gehalten -hat. - -\section{oplocks} - -Dateizugriffe "uber ein Netzwerk sind trotz leistungsf"ahiger -Netzwerkhardware meistens deutlich langsamer als auf einer lokalen -Festplatte. Der lokale Hauptspeicher, der heutzutage in den meisten -Workstations im "Uberflu"s vorhanden ist, ist nochmal um -Gr"o"senordnungen schneller. F"ur lokale Festplatten gibt es in allen -Systemen Caches im Hauptspeicher, und so w"are es Verschwendung, -Caching nicht auch auf Netzwerkdateien anzuwenden. Netzwerkzugriffe, -die gar nicht erst gemacht werden m"ussen, sind die schnellsten -Zugriffe. Im Gegensatz zu einem lokalen Festplattencache kann ein -Cache von Netzwerkdateien nicht davon ausgehen, die Datei alleine zu -benutzen\footnote{Geteilte Blockger"ate in einem Storage Area Network - sei hier einmal au"sen vor gelassen.}. Zugriffe unterschiedlicher -Clients m"ussen koordiniert werden. - -Opportunistic Locks (Oplocks) sind ein Mechanismus, mit dem Clients -erlaubt werden kann, Dateiinhalte zu cachen. Mit einem Oplock bekommt -der Client eine Datei solange exklusiv f"ur sich, bis der Server ihn -auffordert, die "Anderungen zur"uckzuschreiben und die Sperre -freizugeben. - -Ein Client A m"ochte eine Datei "offnen und beantragt ein Oplock auf -die Datei. Wenn der Server dieses Oplock gew"ahrt, ist das die Zusage, -da"s niemand anders auf die Datei zugreift. Damit mu"s Client A -weder bei jedem Lesezugriff den Server befragen, noch mu"s er jeden -Schreibzugriff unverz"uglich an den Server liefern. Moderne -Windowsclient nutzen dieses Feature sehr ausgiebig und erreichen damit -in typischen Applikationen zwischen drei"sig und vierzig Prozent mehr -Geschwindigkeit. - -Wenn ein zweiter Client, B, auf die Datei "offnen m"ochte, schickt der -Server dem Client A ein so genanntes Oplock Break. Dies ist die -Anweisung, s"amtliche lokalen "Anderungen zur"uckzuschreiben und den -Schreibcache auf dieser Datei in Zukunft auszuschalten. Erst nachdem -Client A alle "Anderungen zur"uckgeschrieben hat, wird Client B die -Datei "offnen k"onnen. Da keiner von beiden noch ein Oplock bekommt, -sehen beide s"amtliche "Anderungen sofort. - -Dieses Schema funktioniert innerhalb von Samba hervorragend. Sobald -Unix-Prozesse ebenfalls auf Dateien zugreifen m"ussen, die von Samba -freigegeben sind, gibt es Probleme mit Oplocks. Beispielsweise wird es -nicht m"oglich sein, vern"unftig Datensicherung zu betreiben, da -Clients m"oglicherweise nicht alle Daten zum Server geschickt haben. - -Es gibt mehrere M"oglichkeiten, dieses Problem in den Griff zu -bekommen: - -\begin{description} -\item[Keine Oplocks:] Durch den Parameter \param{oplocks = no} k"onnen - Oplocks f"ur eine Freigabe komplett abgeschaltet werden. Damit - handelt man sich aber massive Performanceprobleme ein. -\item[Keine Oplocks f"ur einzelne Dateien:] Der Parameter \param{veto - oplock files} verweigert Oplocks f"ur einzelne Dateien. Dieser - Parameter verlangt eine Liste von Unix-Pfadnamen oder - DOS-Wild\-cards. Die Syntax ist in der Beschreibung zum Parameter - \param{veto files} zu finden. -\item[Kernel Oplocks:] Das Problem mit Oplocks liegt darin, da"s Samba - vom Kernel nicht informiert werden kann, wenn ein Unixproze"s eine - Datei "offnen will. Samba k"onnte f"ur diese Datei ein Oplock - vergeben haben und m"u"ste es vom Client zur"uckfordern, bevor der - Unixproze"s die Datei "offnen kann. IRIX und Linux 2.4 sind um ein - API erweitert worden, das genau dies leistet. Um Kernel Oplocks zu - nutzen, mu"s Samba entsprechend kompiliert werden. Liegen bei der - Kompilation die Quellen des Kernel 2.4 vor, erkennt Samba diese - automatisch. Sollten sich bei der Nutzung dieses Features Probleme - herausstellen, kann es mit \param{kernel oplocks = no} abgeschaltet - werden, obwohl dies nie notwendig sein sollte. -\end{description} - -Bevor Samba Oplocks unterst"utzt hat, konnte man mit \param{fake - oplocks = yes} f"ur read only Freigaben jegliche Oplocks vergeben, -ohne sie jemals zur"uckzufordern. Dies sollte man heutzutage -\emph{nicht} mehr einsetzen. - -\section{Pa"sw"orter} -\label{passwoerter} - -Protokolle der IP-Welt wie telnet, ftp und pop3 "ubertragen die -Pa"sw"orter zur Benutzerauthentifizierung im Klartext. Damit kann -jeder, der den Netzverkehr abh"oren kann, s"amtliche Pa"sw"orter -mitschreiben. Daf"ur existieren fertige Programme, die Benutzernamen -und dazugeh"orige Pa"sw"orter ausgeben. In der Unixwelt wurde dies -zun"achst nicht als problematisch angesehen, da zum Zugriff auf das -Netz Administratorrechte oder physikalischer Zugriff zum Netz -notwendig sind. Beides war historisch oft nicht gegeben, so da"s das -Risiko als relativ gering eingesch"atzt wurde. Seit dem Aufkommen von -DOS und Ethernet hat jeder Benutzer Administratorrechte, kann also den -Netzverkehr mitschneiden. - -Benutzerauthentifizierung mu"s vor allem eins leisten: Der Benutzer -mu"s beweisen, da"s er sein Pa"swort kennt. Ein -Authentifizierungsprotokoll kann es dabei erm"oglichen, da"s das -Pa"swort nicht "ubertragen werden mu"s. - -Klassische symmetrische Verschl"usselung funktioniert folgenderma"sen: -Jemand m"ochte einem Bekannten\footnote{In der Literatur hei"sen diese - beiden Bekannten Alice und Bob. Es gibt ganze Abhandlungen dazu, was - diesen beiden schon alles passiert ist$\ldots$} eine geheime -Nachricht zukommen lassen. Das hei"st, jemand, der die "Ubertragung -abh"ort, soll diese Nachricht nicht lesen k"onnen. Dazu kann man ein -symmetrisches Verfahren wie DES, IDEA oder AES einsetzen. Diese -Verfahren zerst"uckeln die Nachricht so, da"s sie niemand mehr lesen -kann, au"ser jemand wei"s, mit welchem Verfahren die Nachricht -verschl"usselt wurde. Zu jedem Verschl"usselungsverfahren gibt es -n"amlich ein Gegenst"uck, das aus der zerst"uckelten Nachricht das -Original wieder herstellt. Es gibt auch Verfahren, bei denen es keinen -R"uckweg gibt. Diese sind zwar f"ur die genannte Anwendung nicht -brauchbar, denn man kommt nicht mehr an die Nachricht, aber in anderen -Bereichen sind diese so genannten Hashverfahren sehr weit verbreitet. - -Alle heute verwendeten symmetrischen Verschl"usselungsverfahren -verwenden zus"atzlich Schl"ussel. Erst mit einem Schl"ussel wird die -genaue Methode festgelegt, mit der die Nachricht verschl"usselt wird. -Jemand, der die verschl"usselte Nachricht liest, mu"s also nicht nur -das grunds"atzliche Verfahren kennen, sondern insbesondere mu"s er den -Schl"ussel herausbekommen, um die Nachricht lesen zu k"onnen. Das -Raten des Schl"ussels ist meistens der viel schwierigere Teil, da es -sehr viel mehr Schl"ussel gibt als Verschl"usselungsverfahren. An -dieser Stelle kommt die vielzitierte Schl"ussell"ange ins Spiel. Wenn -ein Schl"ussel wie bei DES 56 Bit lang ist, dann gibt es $2^56 = -72.057.594.037.927.936$ verschiedene Schl"ussel. Mit heutiger -Technologie k"onnen diese Schl"ussel alle in kurzer Zeit ausprobiert -werden, daher arbeiten moderne Verfahren mit mindestens 128 Bit langen -Schl"usseln. Man nimmt an, da"s $2^128$ Schl"ussel auch in der -absehbaren Zukunft nicht alle durchprobiert werden k"onnen. Abbildung -\ref{symmetrisch} verdeutlicht die symmetrische Verschl"usselung. - -\begin{figure}\[ -\setlength{\unitlength}{1cm} -\begin{picture}(11,3.5) - -\put(0,0){\framebox(11,3.5){}} - -\put(4,0){\line(0,1){3.5}} -\put(7,0){\line(0,1){3.5}} -\put(0,2.5){\line(1,0){11}} - -\put(2,3){\makebox(0,0){Alice}} -\put(5.5,3){\makebox(0,0){Eve}} -\put(9,3){\makebox(0,0){Bob}} - -\put(0.2,1.5){\framebox(1,0.5){Pssst!}} -\put(1.2,1.75){\vector(1,0){0.8}} -\put(2,1.5){\framebox(1,0.5){AES}} -\put(3,1.75){\vector(1,0){1.6}} -\put(1.6,0.3){\framebox(1.8,0.5){Schl"ussel}} -\put(2.5,0.8){\vector(0,1){0.7}} - -\put(4.6,1.5){\framebox(1.8,0.5){@Yx!?a\{}} -\put(6.4,1.75){\vector(1,0){1.6}} - -\put(8,1.5){\framebox(1,0.5){AES}} -\put(7.6,0.3){\framebox(1.8,0.5){Schl"ussel}} -\put(8.5,0.8){\vector(0,1){0.7}} -\put(9,1.75){\vector(1,0){0.8}} -\put(9.8,1.5){\framebox(1,0.5){Pssst!}} - -\end{picture}\] -\caption{Symmetrische Verschl"usselung} -\label{symmetrisch} -\end{figure} - -\subsection{Challenge-Response Verfahren} - -Werden im SMB-Protokoll verschl"usselte Pa"sw"orter verwendet, so wird -die symmetrische Verschl"usselung trickreich eingesetzt. Der Client -m"ochte eine Verbindung zum Server aufbauen. Bevor dies geschieht, -mu"s der Benutzer seinen Namen und sein Pa"swort eingeben. Erst danach -baut der Client die Verbindung zum Server auf. In der Antwort auf die -erste Anfrage des Clients, der Negotiate Protocol Response, schickt -der Server dem Client eine Zufallszahl. Diese Zufallszahl wird -Herausforderung genannt. - -Der Client verf"ugt nun "uber drei Werte: Den Benutzernamen, das -Pa"swort des Benutzers und die Herausforderung. Das Pa"swort soll nun -verschl"usselt "uber das Netz "ubertragen werden. Ein naiver Ansatz -w"are, die Herausforderung als Schl"ussel f"ur ein symmetrisches -Verschl"usselungsverfahren einzusetzen. Der Server kennt die -Herausforderung, da er sie selbst verschickt hat, kann also das -verschl"usselte Pa"swort wieder entschl"usseln. Das Problem liegt -darin, da"s jeder Zuh"orer ebenfalls den Schl"ussel kennt, also auch -das Pa"swort entschl"usseln kann. Daher wird anders vorgegangen: Das -Pa"swort wird als Schl"ussel benutzt, um die Herausforderung zu -verschl"usseln. Diese mit dem Pa"swort verschl"usselte Herausforderung -schickt der Client im Session Setup zusammen mit dem Benutzernamen an -den Server. - -Wor"uber verf"ugt der Server, wenn er den Session Setup erhalten hat? -Er hat sich die Zufallszahl gemerkt, und der Client hat im den -Benutzernamen geschickt. Aus der Benutzerdatenbank kann er damit das -Pa"swort des Benutzers auslesen. Mit diesem ausgelesenen Pa"swort als -Schl"ussel entschl"usselt der Server die verschl"usselte -Herausforderung und pr"uft, ob wieder die versendete Zufallszahl -herauskommt. Ist dies der Fall, stimmen die beiden Schl"ussel -"uberein. Das hei"st, der Client hat die als Herausforderung gesendete -Zufallszahl mit dem gleichen Pa"swort verschl"usselt, das auch der -Server in seiner Benutzerdatenbank gespeichert hat. Stimmt der -entschl"usselte Wert nicht mit der gesendeten Zufallszahl "uberein, -wurde f"ur die Verschl"usselung ein anderer Schl"ussel, also ein -anderes Pa"swort, benutzt, als f"ur die Entschl"usselung. Das am -Client eingegebene Pa"swort stimmt also nicht mit dem "uberein, das -der Server in seiner Benutzerdatenbank gespeichert hat. Der Server -bekommt nicht heraus, welches Pa"swort der Client benutzt hat, aber -das mu"s er auch gar nicht. Das Pa"swort war in jedem Fall falsch. - -Abbildung \ref{encrypt-challenge} verdeutlicht die verwendete -Verschl"usselung, Abbildung \ref{challenge-requests} den zeitlichen -Ablauf des Protokolls. - -\begin{figure}\[ -\setlength{\unitlength}{1cm} -\begin{picture}(11,3.5) - -\put(0,0){\framebox(11,3.5){}} - -\put(4,0){\line(0,1){3.5}} -\put(7,0){\line(0,1){3.5}} -\put(0,2.5){\line(1,0){11}} - -\put(2,3){\makebox(0,0){Client}} -\put(5.5,3){\makebox(0,0){Zuh"orer}} -\put(9,3){\makebox(0,0){Server}} - -\put(0.2,1.5){\framebox(1.2,0.5){Zufall}} -\put(1.4,1.75){\vector(1,0){0.6}} -\put(2,1.5){\framebox(1,0.5){DES}} -\put(3,1.75){\vector(1,0){1.6}} -\put(1.6,0.3){\framebox(1.8,0.5){Pa"swort}} -\put(2.5,0.8){\vector(0,1){0.7}} - -\put(4.6,1.5){\framebox(1.8,0.5){@Yx!?a\{}} -\put(6.4,1.75){\vector(1,0){1.6}} - -\put(8,1.5){\framebox(1,0.5){DES}} -\put(7.6,0.3){\framebox(1.8,0.5){Pa"swort}} -\put(8.5,0.8){\vector(0,1){0.7}} -\put(9,1.75){\vector(1,0){0.5}} -\put(9.5,1.5){\framebox(1.3,0.5){Zufall?}} - -\end{picture}\] -\caption{Verschl"usselung der Herausforderung} -\label{encrypt-challenge} -\end{figure} - -\begin{figure}\[ -\begin{pspicture}(11.5,6.5) -%\psgrid[subgriddiv=1,griddots=10] -\psframe(11.5,6.5) -\psline(3,6.5)(3,0) -\psline(7,6.5)(7,0) -\psframe[fillstyle=solid,fillcolor=lightgray](3,0)(7,6.5) -\rput(2,6){{\sffamily\bfseries Client}} -\rput(5,6){{\sffamily\bfseries Zuh"orer}} -\rput(8,6){{\sffamily\bfseries Server}} -\psline(0,5.7)(11.5,5.7) - -\psline{->}(2.5,5)(7.5,5) -\rput(5,5.2){Negotiate Protocol} - -\rput[lB](8,4.5){H: Herausforderung} -\psline{->}(7.5,4.5)(2.5,4.5) -\rput(5,4.3){{\bfseries H}} - -\psline{->}(2.5,3)(7.5,3) -\rput(5,3.2){Session Setup} -\rput(5,2.8){{\bfseries Username, PW(H)}} -\rput[lB](0.3,3.9){Herausforderung} -\rput[lB](0.3,3.5){Username} -\rput[lB](0.3,3.1){Pa"swort} - -\rput[lB](8,2.9){Username} -\rput[lB](8.2,2.5){$\Rightarrow$ Pa"swort} -\rput[lB](8.2,2.1){entschl"ussle PW(H)} - -% \pscurve{->}(5.8,2.7)(8,1.8)(9.5,1.8)(10,2) -\rput[tl](9.8,1.9){$\Rightarrow$ =H?} - -% \pscurve{<->}(10.5,1.6)(10.8,1.5)(11.3,2)(11,3)(8.3,4.4) -%\rput[t](10.8,1.4){=?} - -\psline{->}(7.5,0.8)(2.5,0.8) -\rput(5,0.6){{\bfseries Ok?}} -\end{pspicture}\] -\caption{Challenge-Response Verfahren} -\label{challenge-requests} -\end{figure} - -Warum ist das Verfahren sicher? Die mit dem Pa"swort verschl"usselte -Herausforderung hat den Server davon "uberzeugt, da"s der Benutzer -sein Pa"swort kennt. Man k"onnte vermuten, da"s man diese -verschl"usselte Herausforderung einfach nochmal schicken mu"s, um die -Rechte des Benutzers zu bekommen. Dieser so genannte Replay-Angriff -schl"agt jedoch fehl, da bei jeder neuen Anmeldung eine neue -Herausforderung verschl"usselt werden mu"s. Dies gilt nat"urlich nur, -wenn der Server sich jedes Mal eine neue Herausforderung -ausdenkt$\ldots$ - -Windows NT verh"alt sich diesbez"uglich vern"unftig. Windows 95 denkt -sich jedoch nur alle 15 Minuten eine neue Herausforderung aus. Das -hei"st, da"s jemand nur einen Verbindungsaufbau mitschneiden mu"s, und -sich sofort danach mit der gleichen Benutzerkennung bei der gleichen -Maschine anmelden kann. Man kann sich fast sicher darauf verlassen, -die gleiche Herausforderung zu bekommen, und mit der mitgeschnittenen -Antwort Zugriff zu erhalten. Dies gilt selbstverst"andlich nur f"ur -die Zugriffe, bei denen Windows 95 als Server benutzt wird. Und wer -tut das schon? - -Ein Zuh"orer verf"ugt "uber die Herausforderung und den -verschl"usselten Wert. Mit diesen beiden Werten k"onnte er einen -Known-Plaintext-Angriff gegen die Verschl"usselung starten. Das -hei"st, es mu"s ein Verschl"usselungsalgorithmus gew"ahlt werden, der -gegen einen solchen Angriff f"ur alle praktischen Belange immun ist. - -\subsection{Vor- und Nachteile von verschl"usselten Pa"sw"ortern} - -Das Challenge-Response Verfahren setzt voraus, da"s der Server "uber das -Benutzerpa"swort im Klartext verf"ugt. Unter Unix tut er das nicht, sondern -der Server kennt nur eine zerhackte Version des Pa"swortes. Die meisten -Linuxsysteme speichern diesen Wert in der Datei \dateistyle{/etc/shadow}, -andere Unixe k"onnen die Pa"swortdatenbank in anderen Dateien abspeichern. Der -Wert, der dort gespeichert wird, ist f"ur die Authentifizierung benutzbar. Der -Server ist jedoch nicht in der Lage, daraus das Klartextpa"swort des Benutzers -zu berechnen. - -Die Authentifizierung unter Unix benutzt eine Hashfunktion, die drei -Eigenschaften erf"ullt: - -\begin{enumerate} - -\item Sie ist leicht zu berechnen. Dies ist notwendig, damit die -Pa"swort"uberpr"ufung nicht zu lange dauert. - -\item Sie ist nur sehr schwer umkehrbar. Das hei"st, aus dem - zerhackten Pa"swort ist das Klartextpa"swort nicht berechenbar. Als - Beispiel f"ur eine solche Einwegfunktion soll hier die - Multiplikation herhalten. 98453*34761=3422324733 ist relativ einfach - zu berechnen. Da"s die Zahl 3422324733 aus den beiden - Ursprungszahlen entstanden ist, ist schon sehr viel schwieriger - herauszufinden. Es gibt Verfahren, bei denen es keinen R"uckweg gibt, der -irgendwie berechnet werden kann. Um f"ur einen Funktionswert den Ausgangswert -herauszubekommen, mu"s man alle m"oglichen Ausgangswerte durchprobieren oder -gleich eine Wertetabelle mit allen Ausgangswerten anlegen.\footnote{Wie -"uberall in der Kryptographie gilt - dies auch nur so lange, bis jemand den R"uckweg gefunden hat.}. - -Mit dieser Eigenschaft war es zu rechtfertigen, da"s in den fr"uhen Tagen von -Unix die Hashwerte der Pa"sw"orter f"ur alle Benutzer lesbar waren, da -niemand daraus etwas ableiten konnte. Mit dem "Uberflu"s an Rechenleistung -kann man aber so genannte crack-Programme verwenden, die die erste -Eigenschaft der Hashfunktion ausnutzen: Sie probieren einfach tausende von -Pa"sw"ortern pro Sekunde aus. Schlechte Pa"sw"orter k"onnen so sehr schnell -gefunden werden. Daher hat man die Pa"sw"orter in die nicht allgemein lesbare -Datei \dateistyle{/etc/shadow} ausgelagert. - -\item Zwei verschiedene Pa"sw"orter f"uhren zu zwei verschiedenen Hashwerten. -Damit kann das Loginprogramm ausreichend sicher sein, da"s ein korrekter -Hashwert aus dem korrekten Pa"swort entstanden ist. - -\end{enumerate} - -Authentifizierung unter Unix setzt voraus, da"s der Client dem Server -das Klartextpa"swort pr"asentiert. Der Server kann daraus den Hashwert -berechnen, und mit dem gespeicherten Wert vergleichen. Leider verf"ugt er -nicht "uber das Klartextpa"swort des Benutzers, um das -Challenge-Response Verfahren durchf"uhren zu k"onnen. Daher mu"s unter Samba -f"ur die Pa"swortversch"usselung eine zweite Pa"swortdatenbankgepflegt -werden, die Datei \dateistyle{smbpasswd}. - -Was bis jetzt beschrieben wurde, entspricht nur fast der Wahrheit. Oben wurde -beschrieben, da"s die Verschl"usselung der Herausforderung mit dem Pa"swort des -Benutzers geschieht. Dies ist so nicht ganz richtig. Die Verschl"usselung -geschieht mit einem Hashwert des Pa"swortes. Dieser Hashwert wird vom Client -direkt nach Eingabe des Pa"swortes gebildet und gespeichert. Das gesamte oben -beschriebene Verfahren wird dann mit diesem Hashwert durchgef"uhrt. Das hei"st, -da"s auch in der Datei \dateistyle{smbpasswd} keine echten Klartextpa"sw"orter -gespeichert werden m"ussen, sondern diese Hashwerte. Das hei"st, da"s man mit -den dort enthaltenen Werten so direkt nicht mehr anfangen kann als mit den -Werten aus der Datei \dateistyle{/etc/shadow} unter Unix. Wenn man sie als -Pa"swort eingeben w"urde, w"urde Windows sofort wieder den Hash darauf -anwenden, und einen anderen, also falschen Wert daraus errechnen. Das -Programm \prog{smbclient} mu"s diese Operation ebenfalls durchf"uhren, nur -hat man hierzu den Quellcode und kann die entsprechenden Stellen -auskommentieren. So hat man die M"oglichkeit, sich anhand der Werte in der -\dateistyle{smbpasswd} ohne Einsatz von crack bei einem NT-Rechner -anzumelden. Damit sind die Werte aus der \dateistyle{smbpasswd} so gut wie -Klartextpa"sw"orter. - -Alles nicht dramatisch, sagt Microsoft. Das "Aquivalent zur Datei -\dateistyle{smbpasswd} liegt unter NT verschl"usselt vor. Diese -Verschl"usselung mu"s jedoch reversibel sein, um das -Challenge-Response Verfahren durchf"uhren zu k"onnen. Ein Teil der -Sicherheitsargumentation liegt darin, da"s dieses -Verschl"usselungsverfahren nicht offengelegt wurde. Das Verfahren war solange -geheim, bis Jeremy Allison das Programm \prog{pwdump} ver"offentlicht hat. -Dieses Programm extrahiert aus der Benutzerdatenbank von NT eine Datei, die -direkt als -\dateistyle{smbpasswd} verwendet werden kann \footnote{Allerdings nur f"ur -Samba 1.9, zu 2.0 hin wurde das Format ge"andert. Es gibt in Samba 2.0 aber -ein Konvertierungsskript.}. - -Das hei"st, der Administrator unter NT verf"ugt direkt "uber die -Pa"sw"orter aller Benutzer oder zumindest "uber etwas Gleichwertiges. -Damit hat er automatisch die M"oglichkeit, sich bei fremden Systemen -anzumelden, sofern dort das Pa"swort gleich ist. Bei Unix kann sich -der Administrator zwar in die Identit"at jedes Benutzers versetzen. -Dies bleibt aber auf das lokale System beschr"ankt, da er das Pa"swort -des Benutzers nicht kennt. Windows 2000 mit dem dort eingesetzten -Kerberos-Verfahren ist in dieser Hinsicht "ubrigens nicht besser. Der -Dom"anencontroller kennt hier ebenfalls die Klartextpa"sw"orter der Benutzer. -Ihm wird also genau so vertraut wie einem NT4-Dom"anencontroller. - -Sollte ein neugieriger Administrator einmal an den tats"achlichen -Klartextpa"sw"ortern seiner Benutzer interessiert sein, dann macht NT -es ihm deutlich einfacher als Unix dies tut. Unix verwendet so -genannte versalzene Pa"sw"orter. Wenn ein Pa"swort ge"andert wird, -dann wird ein Zufallswert berechnet, dem Pa"swort hinzugef"ugt und -dann die Hashfunktion durchgef"uhrt. Der Zufallswert wird der Datei -\dateistyle{/etc/shadow} im Klartext hinzugef"ugt, damit die -"Uberpr"ufung die gleichen Operationen durchf"uhren kann. So kann man -keine Tabelle von Pa"sw"ortern und den zugeh"origen Hashwerten -anlegen. Man kann auch nicht erkennen, wenn zwei Benutzer das gleiche -Pa"swort verwenden. Windows NT verwendet dieses Verfahren nicht. - -Aus Kompatibilit"atsgr"unden mu"s NT auch noch zus"atzlich einen sehr -schlechten Hashwert mitf"uhren. Bei alten Windowsversionen konnte das -Pa"swort bis zu 14 Zeichen lang sein. War es k"urzer, wurde es mit -Leerzeichen aufgef"ullt. Dann wurde mit den ersten 7 Zeichen ein -Hashwert berechnet, und dann mit den zweiten 7 Zeichen. Das hei"st, es -sind sofort alle Pa"sw"orter erkennbar, die weniger als 7 Zeichen -haben, da die zweite H"alfte des Hashwertes immer gleich ist. - -\subsection{NT4 Service Pack 3} - -Um die Pa"swortverschl"usselung im Zusammenhang mit Windows NT 4 -Service Pack 3 und Windows 95 in sp"ateren Versionen gibt es immer -noch weitverbreitete Mi"sverst"andnisse. Beispielsweise da"s alle -Systeme vorher nicht in der Lage waren, mit verschl"usselten -Pa"sw"ortern zu arbeiten. Richtig ist folgendes: - -\begin{itemize} -\item \emph{Alle} Clients sind in der Lage, mit verschl"usselten - Pa"sw"ortern umzugehen. Das gilt f"ur alle aktuellen Clients - sowieso. Aber sogar der DOS-LanManager-Client, den man sich heute - noch von Microsofts FTP-Server laden kann, kann Pa"sw"orter - verschl"usseln. -\item Auch die neuen Clients k"onnen sowohl mit verschl"usselten - Pa"sw"ortern, als auch mit Klartextpa"sw"ortern umgehen. -\item Windows NT4 Service Pack 3 ist das erste NT-System, das sich in - der Default-Einstellung weigert, Klartextpa"sw"orter zu verschicken. -\end{itemize} - -Ein Client wirkt an der Entscheidung "uber verschl"usselte Pa"sw"orter -zun"achst einmal "uberhaupt nicht mit. Der Server wird f"ur -verschl"usselte oder f"ur Klartextpa"sw"orter mit der Einstellung -\param{encrypt passwords} konfiguriert. In der Antwort zum Negotiate -Protocol teilt der Server dem Client seine Entscheidung mit. Der -Server verschickt im Falle der verschl"usselten Pa"sw"orter noch eine -Herausforderung mit. Der Server teilt dem Client m"oglicherweise mit, -da"s er ein Klartextpa"swort sehen will. Der Client kann nur noch die -Verbindung sofort abbrechen, sofern er keine Pa"sw"orter im Klartext -verschicken m"ochte. Windows NT tut dies ab Service Pack 3 mit der -Fehlermeldung, da"s man sich micht diesem Konto nicht an dem Server -anmelden kann. - -\begin{center} -\epsfig{file=konto.eps,width=6cm} -\end{center} - -Windows 95 und folgende fragen immer wieder nach dem Kennwort f"ur die -Freigabe \texttt{IPC\$}. F"ur alle Clientbetriebssysteme liefert Samba -im Unterverzeichnis \dateistyle{docs/} Registrierungsdateien mit, mit -denen diese Verweigerung von Klartextpa"sw"ortern abgestellt werden -kann. - -Mit Klartextpa"sw"ortern bekommt man den gro"sen Vorteil, da"s man -nicht zwei verschiedene Pa"swortdatenbanken pflegen mu"s. Einige -Nachteile handelt man sich jedoch ein: - -\begin{itemize} -\item Man mu"s heutzutage jeden Client anfassen, um die Registrierung - zu "andern. -\item Man versendet Pa"sw"orter im Klartext, man hat also ein - m"oglicherweise erhebliches Sicherheitsproblem. Tools wie - \prog{dsniff}\footnote{Suchen Sie einmal auf http://freshmeat.net - nach dsniff und lesen Sie das README.} sammeln die Pa"sw"orter - automatisch auf. -\item Man verliert jegliche Dom"anenfunktionalit"at, auf die weiter - unten noch genauer eingegangen wird. Ein Dom"anencontroller kann nur - mit verschl"usselten Pa"sw"ortern funktionieren. -\end{itemize} - -Insgesamt kann man nur zu verschl"usselten Pa"sw"ortern raten, wenn -nicht wirklich wichtige Gr"unde f"ur Klartextpa"sw"orter sprechen. - -\subsection{Migration zu verschl"usselten Pa"sw"ortern} - -Sind momentan Klartextpa"sw"ortern auaf einem Server im Einsatz, und -ist die Migration zu verschl"usselten Pa"sw"ortern geplant, gibt es -einen sehr einfachen Weg, dies binnen einer Woche ohne gro"se Arbeit -zu erledigen. Direkt aus der \dateistyle{/etc/shadow} bekommt man die -die NT- und LanManager-Hashes leider nicht heraus, da man dazu die -Klartextpa"sw"orter ben"otigt. Nur aus diesen k"onnen die -Windows-Hashwerte berechnet werden. Die Clients liefern die -Pa"sw"orter jedoch bei jedem Anmelden im Klartext zum Server, und -daraus k"onnen dann die Hashwerte berechnet werden. Dazu mu"s man aus -der \dateistyle{/etc/passwd} mit dem Skript -\dateistyle{mksmbpasswd.sh} zun"achst eine Datei -\dateistyle{smbpasswd} machen, in der alle Benutzer mit leerem -Pa"swort angelegt sind. Dieses Skript findet sich in den Samba-Quellen -im Unterverzeichnis \dateistyle{source/script}. Die neu angelegte -\dateistyle{smbpasswd} mu"s dann mit den korrekten Zugriffsrechten -versehen werden: - -\begin{verbatim} -sh mksmbpasswd.sh < /etc/passwd > /etc/smbpasswd -chown root.root /etc/smbpasswd -chmod 700 /etc/smbpasswd -\end{verbatim} - -Die Migration leitet man mit den folgenden Einstellungen ein: - -\begin{verbatim} -[global] - encrypt passwords = no - update encrypted = yes -\end{verbatim} - -Jeder Benutzer, der sich anmeldet, liefert sein Pa"swort im Klartext -an den Server. Dieser berechnet daraus die beiden Windows-Hashwerte -und tr"agt sie in der \dateistyle{/etc/smpasswd} ein. Das hei"st, man -mu"s jetzt nur abwarten, bis sich alle Benutzer einmal angemeldet -haben, und kann dann verschl"usselte Pa"sw"orter aktivieren: - -\begin{verbatim} -[global] - encrypt passwords = yes - update encrypted = no -\end{verbatim} - -\section{Druckfreigaben} - -Um Drucker unter Samba zur Verf"ugung zu stellen, m"ussen diese von -Unix aus ansprechbar sein. Unter Linux mit einem BSD-kompatiblen -Drucksystem geschieht dies durch Eintr"age in der Datei -\dateistyle{/etc/printcap}. Alle Drucker, die dort definiert sind, -kann man als Netzwerkdrucker f"ur Windowsclients freigeben. - -Unter Linux ist die Frage der Druckertreiber noch nicht -zufriedenstellend gel"ost. Druckertreiber unter Windows w"urde man -unter Linux nicht als solche bezeichnen. In der Linuxwelt sind Treiber -Softwaremodule, die direkt Hardware wie Netzwerkkarten oder den -parallelen Port ansprechen. Druckertreiber im Sinne von Windows sind -unter Linux so genannte Filter, die Druckdaten in ein f"ur den Drucker -akzeptables Format aufbereiten. Das einheitliche Druckformat unter -Linux ist Postscript, das mit dem Programm Ghostscript in viele -druckereigene Formate umgewandelt werden kann. Druckertreiber unter -Windows gehen vom Windows Metafile-Format aus, und wandeln dies -entsprechend um. Das Windows Metafile-Format enth"alt Aufrufe an die -Graphische Komponente von Windows, das GDI. - -Wenn man einen Drucker, der "uber Unix angesprochen wird, von Windows -aus nutzen m"ochte, mu"s man planen, wo die Aufbereitung in das -druckereigene Format geschehen soll. Zwei Wege sind denkbar. - -\begin{itemize} -\item Auf den Arbeitspl"atzen wird ein generischer Postscripttreiber - installiert. Die Clients m"ussen nicht wissen, welches Druckermodell - sich hinter einer Freigabe verbirgt. Die Umwandlung findet auf dem - Druckerserver mittels \prog{ghostscript} statt. -\item Der Druckertreiber reicht die Daten weiter, ohne sie weiter zu - behandeln. Auf den Arbeitspl"atzen werden f"ur jeden Netzdrucker die - korrekten Treiber installiert. -\end{itemize} - -Beide Wege haben Vor- und Nachteile. Im ersten Fall hat man weniger -Aufwand mit der Administration auf Clientseite. Man mu"s den korrekten -"`Druckertreiber"' nur einmal definieren, am Druckerserver. Beim -zweiten Weg kann man die bessere Unterst"utzung der Druckerhersteller -f"ur die Windowsplattformen nutzen. Druckertreiber f"ur Windows bieten -in der Regel die M"oglichkeit, Sonderfunktionen wie die Auswahl des -Papierschachtes zu nutzen. Dieser erh"ohte Komfort zieht jedoch nach -sich, da"s auf jedem Client der korrekte Druckertreiber installiert -ist. - -Nutzt eine Windows NT Workstation einen Drucker, der von einem Windows -NT Server freigegeben wurde, so gibt es noch die M"oglichkeit, die -Druckaufbereitung komplett vom NT Server vornehmen zu lassen, und -trotzdem s"amtliche Komfortfunktionen auf der Workstation zu nutzen. -Dazu mu"s auf der Workstation kein Druckertreiber installiert sein. -Diese so genannten EMF-Druckerwarteschlangen kann Samba zur Zeit nicht -exportieren. Samba wird dies voraussichtlich auch nicht so schnell -erm"oglichen, da hierf"ur gro"se Teile von Windows, n"amlich das GDI, -auf Sambaseite implementiert werden m"u"ste. - -Eine Druckfreigabe wird genau wie eine Dateifreigabe in einem eigenen -Abschnitt erstellt, wobei f"ur die Druckfunktion drei Optionen -notwendig sind: - -\begin{verbatim} -[deskjet] -printable = yes -printer = lp -path = /tmp -\end{verbatim} - -Zu einer Druckfreigabe wird die Definition durch die Angabe -\param{printable = yes}. - -Mit der Option \param{printer =} wird festgelegt, welche -Druckerwarteschlange unter Unix angesprochen werden soll. Diese -Warteschlange mu"s das Format verstehen, das vom Windowsdruckertreiber -geliefert wird. Also sollte hier entweder Postscript angenommen -werden, oder die Daten sollten per so genannter Raw-Queue direkt ohne -Umwandlung an den Drucker weitergeleitet werden. - -Die Option \param{path =} legt einen Spoolbereich fest. Ein Druckjob, -den ein Windowsrechner an Samba schickt, mu"s zun"achst in einer Datei -abgespeichert werden. Wenn diese Datei geschlossen wird, teilt der -Client dem Server mit, da"s diese nun zum Drucker geschickt werden -soll. Samba realisiert dies, indem das Programm \prog{lpr} mit der -Druckdatei als Argument aufgerufen wird. Samba mu"s also f"ur sich die -M"oglichkeit haben, Druckjobs in Dateien zu speichern, bevor sie an -den \prog{lpd} "ubergeben werden. Dies sollte nicht das -Spoolverzeichnis sein, das der \prog{lpd} selbst f"ur den Drucker -vorsieht. - -\section{Windows NT Dom"anen} - -Installiert man eine Arbeitsgruppe von Windows NT Rechnern, dann -bekommt man komplett getrennte Benutzerdatenbanken auf den einzelnen -Rechnern. Erstellt man auf einem Server eine Freigabe und m"ochte f"ur -diese Freigabe Rechte vergeben, so mu"s man zun"achst die -Benutzer\footnote{Windows NT benutzt grunds"atzlich \param{security = - user}} einrichten, die Rechte auf dieser Freigabe bekommen sollen. -Greift ein Benutzer von einer anderen Workstation auf die Freigabe zu, -so probiert die Workstation das so genannte transparente Anmelden: Die -Workstation versucht es erst einmal mit dem lokal angemeldeten -Benutzer und seinem Pa"swort. Dadurch sieht es so aus, als ob man nur -ein Benutzerkonto verwenden w"urde. - -Die Administration der Benutzerdatenbanken kann komplett von einem -zentralen Rechner aus erfolgen. Dazu ben"otigt man den Benutzermanager -f"ur Dom"anen\footnote{Benutzermanager f"ur Dom"anen}, der -normalerweise bei Windows NT Server mitgeliefert wird. Man kann sich -diesen aber auch kostenlos von Microsoft von der Webseite -\url{http://www.microsoft.com/} beziehen. Man mu"s zu dem Rechner, den -man administrieren m"ochte, eine Verbindung als Administrator -aufbauen. Dazu mu"s man auf der Workstation, von der aus man -administriert, auf der Kommandozeile mit - -\begin{verbatim} -net use \\remote\ipc$ /user:administrator -\end{verbatim} - -eine Verbindung aufgebaut werden. Kommt dann die Fehlermeldung -\emph{Die Referenzen passen nicht zu einer bestehenden - Referenzenmenge}, so besteht unter einer anderen Benutzerkennung -bereits eine Verbindung. In diesem Fall mu"s man sich ab- und neu -anmelden, und den Befehl als allererstes absetzen, bevor irgend eine -Verbindung zum entfernten Rechner \nbname{remote} aufgebaut werden -kann. Hat man eine solche Verbindung, kann man im Benutzermanager f"ur -Dom"anen im Men"upunkt \emph{Dom"ane ausw"ahlen} mit -\nbname{\textbackslash{}\textbackslash{}remote} die Benutzerdatenbank -von \nbname{remote} ausw"ahlen und voll administrieren. - -Diese Art der Administration skaliert nicht besonders gut. Jeden -Benutzer mu"s es auf jedem Server geben, die lokalen Workstations -brauchen ebenfalls separat gepflegte Benutzer. Mit Windows NT wurde, -um dieses Problem zu l"osen, das Dom"anenkonzept eingef"uhrt. Mit -einer Windows NT Dom"ane bekommt jeder Benutzer ein zentrales Konto, -das auf allen Dom"anenmitgliedern g"ultig ist. - -Realisiert ist die Dom"ane durch einen speziellen Rechner, den Primary -Domain Controller PDC, der seine Benutzerdatenbank f"ur andere im Netz -zur Verf"ugung stellt. Alle Dom"anenmitglieder importieren diese -Benutzerdatenbank. Somit sind auf den Dom"anenmitgliedern zwei -Benutzerdatenbanken g"ultig: Die lokale und die des PDC. - -Die Kommunikation zwischen der Workstation und dem Primary Domain -Controller l"auft verschl"usselt ab. Um eine solche Verschl"usselung -zu erm"oglichen, mu"s ein gemeinsamer Schl"ussel vereinbart werden. Um -sich "uber einen Schl"ussel einig zu werden, gibt es spezialisierte -Protokolle, wie beispielsweise den Diffie-Hellmann -Schl"usselaustausch. Um jeglichen Problemen mit Patenten oder -Exportrestriktionen zu umgehen, ist Microsoft einen anderen Weg -gegangen. Beim Schl"usselaustausch geht es im wesentlichen darum, -sich "uber ein gemeinsames Geheimnis einig zu werden. Um ein -gemeinsames Geheimnis zu wahren und zu pr"ufen, kennt Microsoft -bereits eine Gruppe von Protokollen: Die Protokolle zum Pr"ufen und -Austauschen von Benutzerpa"sw"ortern. Genau diese Protokolle werden -verwendet, um die Kommunikation zwischen PDC und Workstation zu -sichern. Das hei"st, es mu"s f"ur jedes Dom"anenmitglied ein -Benutzerkonto auf dem PDC geben, damit f"ur dieses Konto ein Pa"swort -vergeben werden kann. Dieses Benutzerkonto hei"st "ublicherweise -Computerkonto. - -\section{Samba als Primary Domain Controller} - -Um Samba als PDC zu konfigurieren, sind in der \dateistyle{smb.conf} -im Abschnitt \param{[global]} 2 Einstellungen notwendig: - -\begin{verbatim} -domain logons = yes -domain master = yes -\end{verbatim} - -Eine vollst"andige \dateistyle{smb.conf} f"ur einen PDC sieht damit -folgenderma"sen aus\label{pdc-smbconf}: - -\begin{verbatim} -[global] - workgroup = samba - encrypt passwords = yes - domain master = yes - domain logons = yes -\end{verbatim} - -Da"s ein PDC auch gleichzeitig Domain Master Browser sein mu"s, ist -eine Einschr"ankung der Implementation der Microsoft-Clients. -Eigentlich hat die Funktion des Domain Master Browsers (siehe -Abschnitt \ref{browsing-im-wan}) nichts mit der Funktion als zentraler -Server f"ur die Benutzerdatenbank zu tun. Die Clientimplementation von -Microsoft setzt aber voraus, da"s beide Funktionen auf einer Maschine -vereinigt sind. Auch funktionieren die Dom"anenfunktionen -ausschlie"slich mit verschl"usselten Pa"sw"ortern. Ist man auf -Klartextpa"sw"orter angewiesen, kann man Samba nicht als PDC -einsetzen. - -Befinden sich Windows 9x Clients im Netz, k"onnen diese den Samba-PDC -sofort ohne weitere Konfiguration als Anmeldeserver nutzen. Dazu -tr"agt man in den Eigenschaften des Clients f"ur Microsoft-Netzwerke -ein, da"s sich die Clients an der Samba-Dom"ane anmelden m"ussen. Ist -dies erfolgreich, so kann man "uber die Systemsteuerung des Clients -direkt sein SMB-Pa"swort auf dem Server "andern. - -\subsection{Manuelles Erstellen der Computerkonten} - -F"ur Dom"anenmitglieder unter Windows NT oder 2000 m"ussen noch die -Computerkonten erstellt werden. Jedes Maschinenkonto mu"s unter Unix -als normaler Benutzer existieren. Dieser Benutzer braucht weder ein -Unixpa"swort, noch eine Login-Shell oder ein Heimatverzeichnis. Der -Name des Benutzers ist der Name der Workstation, erg"anzt um ein -\$-Zeichen. Erstellt wird ein solcher Benutzer f"ur die Workstation -\nbname{WKS} unter Linux beispielsweise mit - -\begin{verbatim} -root@erde: useradd -d /dev/null -s /bin/false wks\$ -root@erde: smbpasswd -a -m wks -\end{verbatim} - -Der Befehl \prog{smbpasswd -a -m wks} f"ugt den Benutzer mit einem -Standardpa"swort in die Datei \dateistyle{smbpasswd} ein. Das -Standardpa"swort f"ur Computerkonten ist der Name der Workstation, in -diesem Fall also \nbname{wks}. Man beachte, da"s beim Befehl -\texttt{useradd} ein Dollarzeichen, maskiert durch den Backslash, -hinzugef"ugt wurde. Der Befehl \prog{smbpasswd} f"ugt diesen bei -Verwendung des Parameters \prog{-m} selbst hinzu. - -Nachdem das Computerkonto auf dem PDC erstellt wurde, kann in den -Eigenschaften der Netzwerkumgebung in die Dom"ane gewechselt werden. -Dabei wird das Pa"swort des Computerkontos ge"andert. Sollte aus -irgendwelchen Gr"unden ein erneutes Betreten der Dom"ane notwendig -sein, dann mu"s der Befehl \prog{smbpasswd -a -m wks} erneut -ausgef"uhrt werden, um das Pa"swort des Computerkontos auf den -Anfangswert zur"uckzusetzen. - -\subsection{Automatisches Erstellen der Computerkonten} - -Windows NT 4 bietet in dem Dialog, in dem in die Dom"ane gewechselt -wird, die M"oglichkeit, das Computerkonto automatisch erstellen zu -lassen. Dies geschieht unter Angabe eines Benutzers und Kennwortes, -der auf dem PDC berechtigt ist, Computerkonten zu erstellen. Dies ist -unter Unix nur \emph{root}, da die \dateistyle{/etc/passwd} hierzu -ge"andert werden mu"s. - -Um das Computerkonto automatisch erstellen zu lassen, m"ussen zwei -Dinge auf dem PDC konfiguriert sein: - -\begin{itemize} -\item \emph{root} oder ein anderer Benutzer mit der UID 0 mu"s ein - Pa"swort in der \dateistyle{smbpasswd} haben. Dieses Pa"swort mu"s - nicht mit dem Systempa"swort von \emph{root} "ubereinstimmen. Wenn - man nicht \emph{root}, sondern beispielsweise einen Benutzer - \emph{admin} mit der UID 0 verwendet, braucht dieser Benutzer nicht - einmal eine Login-Shell auf Unix. Er mu"s nur in die - \dateistyle{/etc/passwd} schreiben d"urfen. -\item Der Parameter \param{add user script} mu"s korrekt konfiguriert - werden. Mit \param{add user script} wird ein Unix-Script angegeben, - mit dem das Computerkonto in der \dateistyle{/etc/passwd} angelegt - wird. Beispielsweise kann man mit - -\begin{verbatim} -add user script = useradd -d /dev/null -s /bin/false %u -\end{verbatim} - - die gleiche Wirkung erzielen wie mit der manuellen Konfiguration aus - dem letzten Abschnitt. -\end{itemize} - -\subsection{BDCs mit Samba} - -In einer echten NT Dom"ane gibt es zwei Arten von Dom"anencontrollern: -Prim"are Dom"anencontroller (PDCs) und Backup Dom"anencontroller -(BDCs). Der PDC besitzt die Hauptkopie der Benutzerdatenbank -SAM\todo{uebersetzung}, die BDCs halten read-only Kopien der SAM vor, -um Authentifizierungsanfragen von Workstations und Mitgliedsservern -beantworten zu k"onnen. Alle "Anderungen an der Benutzerdatenbank, -beispielsweise Pa"swort"anderungen, m"ussen auf dem PDC durchgef"uhrt -werden. Der PDC "ubertr"agt diese "Anderungen dann an die BDCs, damit -diese wieder "uber den aktuellen Stand der Datenbank verf"ugen. - -Samba 2.2.2 ist noch kein voller Ersatz f"ur einen Backup Domain -Controller in einer echten NT-Dom"ane. Auch kann Samba als PDC keinen -echten NT-BDC mit Dom"anendaten versorgen. Die Protokolle zur -Replikation der Benutzerdatenbank sind noch nicht vollst"andig -implementiert. Das Samba Team, insbesondere Tim Potter, arbeitet -jedoch daran, die Protokolle zu verstehen und in Samba zu integrieren. -Vermutlich ist mit Erscheinen dieses Buches die echte -BDC-Funktionalit"at bereits in Samba integriert. - -Wird Samba als PDC eingesetzt, k"onnen weitere Sambaserver jedoch als -Backup Domain Controller eingesetzt werden. Die Replikation der -Benutzerdatenbank zwischen den Servern kann mit Unix-Bordmitteln -vorgenommen werden. Die wesentliche Idee beim Einsatz eines BDC ist -seine \dateistyle{smb.conf}: - -\begin{verbatim} -workgroup = samba -encrypt passwords = yes -domain master = no -domain logons = yes -\end{verbatim} - -Der Unterschied zum PDC ist die Zeile \param{domain master = no} im -Gegensatz zu \param{domain master = yes}. Mit dieser -\dateistyle{smb.conf} sehen die Workstations den BDC als -Dom"anencontroller f"ur die Dom"ane \nbname{SAMBA} an. - -Wenn eine Workstation einen Benutzer authentifizieren mu"s, tut sie -dies nicht selbst, sondern sucht ihren Dom"anencontroller f"ur die -Best"atigung der Identit"at des Benutzers. Dies tut sie, indem sie -eine NetBIOS-Namensanfrage nach dem Namen \nbname{SAMBA<1c>} absetzt. -\nbname{SAMBA<1c>} ist ein NetBIOS-Gruppenname, den jeder -Dom"anencontroller per Broadcast oder beim WINS-Server reserviert. -Diese Reservierung wird bei Samba durch den Parameter \nbname{domain - logons = yes} angesto"sen. Im n"achsten Schritt authentifizieren -sich die Workstation und der Dom"anencontroller gegenseitig anhand des -Workstationkontos. Dieses Workstationkonto mu"s somit sowohl auf dem -PDC, als auch auf den BDCs vorhanden sein, damit die Workstation auch -die BDCs als Dom"anencontroller akzeptiert. Auch die gesamte restliche -Benutzerdatenbank mu"s vom PDC auf die BDCs "ubertragen werden. - -\subsection{Hintergrund: Benutzerdatenbanken und SIDs} - -Unter Unix besteht ein Benutzer im wesentlichen aus einer numerischen -Userid, und nicht mehr. Das Programm \prog{login} mu"s beim Anmelden -des Benutzers anhand seines Namens herausfinden, welche numerische -Userid er hat. Dazu sieht es in der Datei \dateistyle{/etc/passwd} -nach. Mit der Datei \dateistyle{/etc/shadow} pr"uft \prog{login} das -Pa"swort. Ist es korrekt, wird in die gefundene Userid umgeschaltet -und die Loginshell des Benutzers gestartet. Nach diesem Vorgang ist -es Unix v"ollig egal, wie der Benutzer hei"st, das einzige, was -interessiert, ist der numerische Wert. Damit h"angt an jedem Proze"s -eine endeutige Identifikation der Rechte, die er hat. - -Unter Unix ist es so, da"s Userids nur auf dem Rechner gelten, auf dem -sie zugeordnet wurden. Es gibt keine M"oglichkeit, Rechte von einem -Rechner auf den n"achsten zu "ubernehmen oder global Benutzer -zuzuordnen. Die einzige M"oglichkeit, die man zu Vereinheitlichung -hat, ist der Austausch der jeweils auf einem Rechner geltenden -Tabellen "uber verschiedene Rechner hinweg. Genau das tut NIS. Die -Benutzerdatenbank wird im Netz kopiert, gilt aber -auf jedem Rechner rein lokal. - -Unter NT ist das zun"achst genau so. Es gibt eine numerische Userid, -der Name des Benutzers ist nur w"ahrend der Anmeldung f"ur das System -interessant. Nach der Anmeldung ist nur noch die numerische Userid -relevant. Windows NT Benutzer sind jedoch im Gegensatz zu Unix -Benutzern "uber Rechnergrenzen hin g"ultig. Um dies zu erreichen, wird -der Benutzer nicht durch eine kleine Zahl beschrieben, sondern durch -einen so genannten Security Identifier SID. Dieser SID besteht aus zwei -wesentlichen Teilen. Der erste Teil besteht aus einer 96 Bit langen -Zahl, die die Benutzerdatenbank des SID eindeutig identifiziert. Der -zweite Teil ist der so genannte Relative Identifier RID. Der RID ist -mit der numerischen Userid unter Unix vergleichbar. Da eine Userid -unter NT jedoch \emph{nur} zusammen mit den 96 Bit der -Benutzerdatenbank verwendet werden, sind Benutzer unterschiedlicher -Maschinen oder Dom"anen unterscheidbar. - -Mit dieser eindeutigen Zuordnung von Benutzern zu ihren jeweiligen -Benutzerdatenbanken wird es m"oglich, da"s eine Workstation -gleichnamige Benutzer aus mehreren Benutzerdatenbanken lokal v"ollig -gleichwertig verwenden kann. Je nachdem, ob sich ein Dom"anenbenutzer -oder ein lokaler Benutzer an der Workstation anmelden m"ochte, wird -die lokale Benutzerdatenbank oder die des PDC um Best"atigung des -Kennwortes gebeten. Ist dies erfolgt, ist der Benutzer dem System nur -noch unter dem numerischen SID bekannt. Dabei ist es v"ollig -gleichg"ultig, ob es sich bei diesem SID um einen lokalen, oder einen -Dom"anen-SID handelt. - -Jeder Sambaserver generiert beim ersten Start seine eigene -Maschinenkennung und speichert sie in der Datei -\dateistyle{MACHINE.SID} ab. Die Maschinenkennung wird sp"atestens -dann ben"otigt, wenn der Sambaserver als Dom"anencontroller -konfiguriert wird. Die Benutzer, die sich an den Workstations -anmelden, m"ussen eine eindeutige Dom"anenkennung als Teil ihres SID -bekommen. Selbst wenn der Sambaserver nicht als Dom"anencontroller -fungiert, wird die Maschinenkennung verwendet. Beispielsweise bei der -Anzeige der ACLs in den Sicherheitseigenschaften von Dateien und -Verzeichnissen wird die Liste der Benutzer in Form eine SID-Liste -"ubergeben. Diese SIDs m"ussen eindeutig sein und mit separaten -Aufrufen in Benutzernamen "ubersetzt werden k"onnen. - -\section{Profile, Logon Scripts und Policies} - -Unter Unix gibt es f"ur jeden Benutzer ein Heimatverzeichnis als -einzigen Bereich im System, in dem der Benutzer schreiben kann. So -etwas kennt Windows in dieser restriktiven Form nicht, da viele -Anwendungen voraussetzen, "uberall im System schreiben zu k"onnen. Aus -Kompatibilit"atsgr"unden mu"s Windows also relativ offen sein. Dem -Heimatverzeichnis am n"achsten kommt unter NT das Profil des -Benutzers, ein ihm zugeordneter Bereich unter -\verb|c:\winnt\profiles\|. Dort ist der Desktop, der -benutzereigene Teil des Startmen"us, der Zweig HKEY\_CURRENT\_USER der -Registry und vieles andere abgelegt. Also alles, was zur -Arbeitsumgebung des Benutzers geh"ort. - -Meldet sich ein Benutzer bei NT das erste Mal an, wird aus -\verb|c:\winnt\profiles\default user| eine Kopie in das benutzereigene -Profil gelegt. Beim Anmelden an der n"achsten Workstation wird der -gleiche Vorgang wiederholt. Das hei"st, jeder Benutzer hat an jeder -Workstation ein anderes Profil. In einer Dom"anenumgebung m"ochte man -nat"urlich erreichen, da"s ein Benutzer sein Profil mitnehmen kann, -da"s er also an jedem Arbeitsplatz seine eigene Umgebung vorfindet. -Windows l"ost dies mit den serverbasierten Profilen. - -F"ur jeden Benutzer kann ein Pfad angegeben werden, in dem sein Profil -abgelegt wird. Viele Anwendungen setzen aber voraus, da"s das Profil auf -einer lokalen Platte abgelegt wird. Folglich kopiert Windows beim Anmelden -des Benutzers das Profil von seinem Serverpfad nach \verb|c:\winnt\profiles| -und bei jedem abmelden wieder zur"uck auf den Serverpfad. - -Der Pfad f"ur das serverbasierte Profil wird bei Samba mit dem -Parameter \param{logon path} festgelegt. Der Standardpfad steht auf -\param{logon path = -\textbackslash{}\textbackslash{}\%N\textbackslash{}\%U\textbackslash{}profile} -. -Damit wird im Heimatverzeichnis des Benutzers auf dem PDC ein -Verzeichnis namens \dateistyle{profile} angelegt und das Profil dort -gespeichert. Leider kann man mit Samba nicht sauber f"ur einzelne -Benutzer festlegen, da"s sie ihre Profile auf einem Server ablegen, -andere Benutzer ihre Profile aber lokal auf den Workstations belassen. - -\todo{logon home f"ur win95} - -\subsection{Anmeldeskripte} - -Meldet sich ein Benutzer an einer Dom"ane an, kann der Primary Domain -Controller der Workstation mitteilen, da"s unter den Rechten des Benutzers -eine Batchdatei automatisch ausgef"uhrt werden soll, das so genannte -\emph{Logon Script}. Samba kennt den Parameter \param{logon - script}, mit dem der Name des Logon Schriptes festgelegt wird. -Standarm"a"sig gibt es kein Logon Script. Wird eines festgelegt, -bezieht es sich immer auf eine \dateistyle{.bat}-Datei in der -festgelegten Freigabe \param{[netlogon]}. Eine vollst"andige -\dateistyle{smb.conf} f"ur einen PDC s"ahe so aus: - -\begin{verbatim} -[global] -workgroup = samba -encrypt passwords = yes -domain master = yes -domain logons = yes - -logon script = logon.bat - -[homes] -writeable = yes -valid users = %S - - [netlogon] -path = /data/netlogon -\end{verbatim} - -Ein einfaches Logon Script in \dateistyle{/data/netlogon/logon.bat} -kann so aussehen: - -\begin{verbatim} -@echo off^M -net use h: \\pdc\homes^M -\end{verbatim} - -Die \verb|^M|-Zeichen am Zeilenende bezeichnen die -DOS-Zeilenendekonvention, bei der an jedem Zeilenende zuerst ein -Carriage Return und dann ein Linefeed kommt. Unix kennt nur den -Linefeed als Zeilenende. Der Carriage Return ist hier entscheidend, da -ansonsten Windows diese Batchdatei nicht ausf"uhren wird. Wenn ein -Logon Script unter Unix editiert wird, bekommt man den Carriage Return -im Editor normalerweise durch die Kombination Control-V Control-M. -Moderne Editoren wie der vim oder der Emacs erkennen eine existierende -Datei mit DOS-Zeilenendekonvention automatisch und speichern sie auch -entsprechend wieder ab. - -\section{Samba als Dom"anenmitglied} -\label{domain-member} -Wenn man mehr als einen Sambaserver betreibt oder einen echten Windows-Server -betreibt, ben"otigt man genau so wie mit einer echten Windows-Dom"ane eine -zentrale Benutzerverwaltung. - -Die zentrale Verwaltung der Pa"sw"orter ist ein erster Schritt. Um dies zu -erreichen, mu"s man mit Samba eine Windows NT-Dom"ane betreten. Dazu setzt -man in der \dateistyle{smb.conf} folgende Parameter: - -\begin{verbatim} -[global] - workgroup = windows - security = domain - password server = * - encrypt passwords = yes - name resolve order = wins bcast -\end{verbatim} - -Im Kapitel \ref{smb-sitzungen} wurde beschrieben, wie eine SMB-Sitzung -aufgebaut wird. Dort wurde auf den Unterschied zwischen \param{security -= share} und \param{security = user} eingegangen. \param{security = domain} -verh"alt sich aus der Sicht eines Clients genau wie \param{security = user}, -es wird vom Benutzer im Session -Setup ein Benutzername, eine Dom"ane und ein Kennwort verlangt. Ist das -Kennwort nicht korrekt, so wird der Benutzer zur"uckgewiesen. Der Parameter -\param{security = domain} bewirkt nun, da"s das Pa"swort nicht wie bei -\param{security = user} in der lokalen \dateistyle{smbpasswd} nachgesehen -wird, sondern an einen PDC weitergeleitet wird. Dieser entscheidet dann, ob -das Pa"swort korrekt ist oder nicht. Best"atigt der PDC das Pa"swort, -akzeptiert Samba den Benutzer. Kann der PDC die Benutzeridentit"at nicht -best"atigen, macht Samba einen zweiten Versuch anhand der lokalen -\dateistyle{smbpasswd}. Damit kann man es erreichen, da"s f"ur Administratoren -der Zugriff auf den Sambaserver noch m"oglich ist, falls einmal kein -Dom"anencontroller verf"ugbar sein sollte. - -Zus"atzlich zu \param{security = domain} gibt es noch -\param{security = server}. Diese Einstellung ist jedoch nicht mehr zu -empfehlen, dazu mehr am Ende des Kapitels. - -F"ur den Parameter \param{password server} gibt es zwei -M"oglichkeiten. Entweder man setzt ihn auf * wie im Beispiel -geschehen. Dann sucht sich Samba mit NT-konformen Mitteln selbst den -PDC oder einen BDC, um Benutzer zu authentifizieren. Man kann aber -auch eine Liste von NetBIOS-Namen angeben, mit denen Samba arbeiten -soll. In beiden F"allen ist es wichtig, da"s die Namensaufl"osung -einwandfrei funktioniert. Samba mu"s in der Lage sein, einen -Dom"anencontroller f"ur die Authentifizierung zu finden. Dies ist eine -der wenigen Stellen, bei denen Samba als NetBIOS-Client arbeitet. -Daher ist es hier m"oglicherweise n"otig, die \param{name resolve - order} korrekt zu setzen. Insbesondere ist dies wichtig, wenn die -Namen der PDCs im DNS bereits vergeben sind und vielleicht auf andere -Maschinen zeigen als die entsprechenden NetBIOS-Namen. - -Um f"ur bestimmte Benutzer nicht auf den PDC angewiesen zu sein, -versucht Samba bei einem erfolglosen Versuch der Dom"anenanmeldung -zus"atzlich, den Benutzer in der \dateistyle{smbpasswd} zu finden. -Damit kann der Server mit m"oglicherweise nicht aktuellen Pa"sw"ortern -funktionsf"ahig gehalten werden, auch wenn der PDC einmal ausfallen -sollte. - -Samba mu"s, um Pa"sw"orter an den PDC weiterzuleiten, genau wie eine -NT-Workstation ein Computerkonto auf dem PDC besitzen und die Dom"ane -betreten. Das Computerkonto kann auf dem PDC mit dem Servermanager -oder mit dem Kommando - -\begin{verbatim} -net computer /add -\end{verbatim} - -auf der Kommandozeile erledigt werden. Danach kann Samba mit dem -Aufruf - -\begin{verbatim} -smbclient -j DOMAIN -r PDCNAME -\end{verbatim} - -die Dom"ane betreten. Seit Samba 2.2.2 ist es zus"atzlich m"oglich, -das Computerkonto wie von einer NT Workstation aus beim Betreten der -Dom"ane automatisch erstellen zu lassen. Dies geschieht, indem man dem -Aufruf von \prog{smbpasswd -j} noch einen berechtigten Benutzer -mitgibt: - -\begin{verbatim} -smbclient -j DOMAIN -r PDCNAME -U Administrator -\end{verbatim} - -\prog{smbclient} erfragt das Pa"swort des Dom"anenadministrators. Nach -Eingabe des Pa"swortes wird das Computerkonto auf dem PDC erstellt und -das entsprechende Pa"swort korrekt gesetzt. - -Ist Samba Dom"anenclient, so wird das Pa"swort zum Computerkonto in -der Datei \dateistyle{secrets.tdb} abgespeichert. Diese -"ubernimmt damit die Aufgabe der Datei -\dateistyle{DOMAIN.MACHINE.mac}, die es bis Samba 2.0 gab. Geht diese -Datei verloren, mu"s die Dom"ane neu betreten werden. Dies kann durch -Entfernen und wieder Hinzuf"ugen zur Dom"ane mit dem Servermanager und -nachfolgendes \prog{smbpasswd -j} oder durch ein automatisches -Erstellen des Computerkontos geschehen. - -\todo{allow trusted domains} - -Mit der Dom"anenmitgliedschaft wird der Sambaserver nur von der -Pa"swortverwaltung befreit. Um die Benutzer und Gruppen mu"s er sich -weiterhin selbst k"ummern. Eine gewisse Erleichterung kann dabei das -\param{add user script} bringen, das bei Samba als PDC daf"ur gesorgt -hat, die Computerkonten in der \param{/etc/passwd} automatisch zu -erstellen. Ist Samba Dom"anenmitglied, so wird bei einer -Benutzeranfrage auf den Server zun"achst der PDC nach der Richtigkeit -des Pa"swortes befragt. Best"atigt dieser das Pa"swort und will der -Benutzer dann auf das Dateisystem des Sambaservers zugreifen, so wird -eine Unix UID ben"otigt, Samba schaut in die \dateistyle{/etc/passwd}. -Findet Samba dort trotz erfolgreicher Anmeldung am PDC keinen -Benutzer, so wird das \param{add user script} mit entsprechenden -Argumenten aufgerufen, um den Benutzer zu erstellen. - -Damit mu"s man sich teilweise nicht mehr um die Verwaltung der -Benutzer auf dem Sambaserver k"ummern. Teilweise deswegen, da von dem -neu anzulegenden Benutzer ausschlie"slich der Name bekannt ist. Es -fehlt jegliche Information dar"uber, in welchen Gruppen sich der -Benutzer in der Dom"ane befindet. Diese Einschr"ankung macht eine -Rechteverwaltung auf dem Sambaserver sehr schwierig bis unm"oglich. - -Unter Unix gibt es mehrere M"oglichkeiten, "uber Rechnergrenzen hinweg die -Benutzerdatenbanken zu synchronisieren. Das reicht vom unsicheren NIS bis hin -zur skriptgesteuerten Verteilung der Dateien \dateistyle{/etc/passwd} und -\dateistyle{/etc/group} "uber rsync und ssh. Setzt man f"ur die Datei- und -Druckdienste komplett auf Unix mit Samba, kann man so eine zentrale -Verwaltung der Server erreichen. Die \dateistyle{smbpasswd} mu"s dabei in die -Verteilung der Benutzerdatenbanken nicht mit einbezogen werden, da hierf"ur -eine Dom"ane aufgebaut werden kann. Einer der Server wird zum -Dom"anencontroller erkl"art, die anderen Server sind ganz normale -Mitgliedsserver, die die Pa"sw"orter vom Dom"anencontroller "uberpr"ufen lassen. - -\subsection{Hintergrund: \param{security = server}} - -Vor Samba 2.0 gab es f"ur die zentrale Verwaltung von Pa"sw"ortern nur -die M"oglichkeit, \param{security = server} zu setzen. Damit konnte -ein Sambaserver sehr einfach die Anmeldung von einem weiteren Server -oder einer NT Workstation beziehen. Samba 2.0 und 2.2 beherrschen -diese M"oglichkeit immer noch, man sollte jedoch strikt von ihrer -Nutzung abraten, da sie erhebliche Probleme mit sich bringt. -\param{security = server} nutzt nicht das Dom"anencontrollerprotokoll, -sondern leitet den Benutzernamen und das Pa"swort an einen Server -weiter. Dies ist im Prinzip nicht schlecht, birgt aber ein subtiles -Problem. Setzt man keine verschl"usselten Pa"sw"orter ein, verschicken -viele Clients die Pa"sw"orter in Gro"sbuchstaben. Verlangt der -Pa"swortserver nun verschl"usselte Pa"sw"orter, mu"s Samba raten. Dies -kostet Last und Zeit. Setzt man auf dem Sambaserver verschl"usselte -Pa"sw"orter ein, handelt man sich ein noch subtileres Problem ein. Um -das zu verstehen, sollte man sich das Kapitel \ref{passwoerter} auf -jeden Fall genau angesehen haben. - -In der Antwort zur Anfrage Negotiate Protocol liefert der Server dem -Client eine Herausforderung. Im Session Setup mu"s der Client die mit -dem Pa"swort verschl"usselte Herausforderung liefern. Will Samba dies -nun gegen"uber einem Pa"swortserver machen, so mu"s er zun"achst einen -Negotiate Protocol absetzen, um vom Pa"swortserver eine -Herausforderung zu erhalten. Diese Herausforderung liefert er seinem -Client direkt weiter, damit dieser sie dann mit dem Pa"swort -verschl"usseln kann. Da es pro Verbindung vom Client zum Server nur -einen Negotiate Protocol Request gibt, gilt die Herausforderung f"ur -die gesamte Verbindung. Viele Clients setzen aber mehrere Session -Setups "uber die gleiche Verbindung ab. Damit der Sambaserver zwischen -Client und Pa"swortserver immer mit der gleichen Herausforderung -arbeiten kann (der Client sieht nur diese eine Herausforderung), mu"s -er zum Pa"swortserver st"andig eine Verbindung offen halten. Br"ache -diese Verbindung ab, bek"ame der Sambaserver vom Pa"swortserver eine -neue Herausforderung mitgeteilt. Der Sambaserver hat leider keine -M"oglichkeit, den Client dazu zu zwingen, eine neue Herausforderung zu -verlangen. Die einzige M"oglichkeit ist, die Verbindung zum Client -abzubrechen, um einen neuen Negotiate Protocol zu verlangen. Damit -gibt es zwei Probleme: - -\begin{itemize} -\item Pro Clientsystem mu"s der Sambaserver st"andig eine Verbindung -zum Pa"swortserver offenhalten. Damit werden auf dem Pa"swortserver -erhebliche Resourcen gebunden. -\item Das Netz wird au"serordentlich instabil, sollte sich der -Pa"swortserver entscheiden, diese vielen nicht besonders aktiven -Verbindungen abzubrechen. Clients werden sich am Sambaserver -erneut anmelden m"ussen. -\end{itemize} - -Das Dom"anencontrollerprotokoll l"ost diese beiden Probleme, indem es -dem Sambaserver erlaubt, sich eine eigene Herausforderung pro Client -auszudenken und diese bei der Netzwerkanmeldung beim PDC -mitzuschicken. Um kein Sicherheitsproblem aufkommen zu lassen, mu"s -diese Netzwerkanmeldung vom Sambserver zum PDC verschl"usselt sein, -daher das Computerkonto, dessen Pa"swort als Schl"ussel f"ur die -symmetrische Verschl"usselung zwischen Sambaserver und PDC verwendet -wird. - -\section{winbind} - -Wenn man Samba als Dom"anenmitglied betreibt, hat man die gr"o"ste -H"urde zu einer problemlosen Integration bereits genommen: Die -Pa"swortverwaltung. Jeder Benutzer kann sein Pa"swort in der Dom"ane -"andern, und die "Anderung wird sofort auf allen Dom"anenmitgliedern -sichtbar. Ein Problem bleibt jedoch bestehen. Man mu"s auf den -Sambaservern, die Dom"anenmiglieder sind, die Benutzer -nachpflegen. Wird ein neuer Benutzer in der Dom"ane angelegt, oder -werden Gruppenmitgliedschaften ge"andert, mu"s dies manuell auf den -Sambaservern eingetragen werden. Ist auch der Primary Domain Cotroller -ein Sambaserver, kann man sich mit dem Network Information System NIS -behelfen, aber wenn die Benutzerdatenbank auf einem echten NT-Server -liegt, ist dieser Weg verschlossen. - -Eine wirklich zwischen Windows NT und Unix vereinheitlichte -Benutzerdatenbank bietet seit Samba 2.2.2 der D"amon -\defin{winbind}. Er erm"oglicht die volle Einbindung eines Unixsystems -in eine NT-Dom"ane. Voraussetzung daf"ur ist die Unterst"utzung der -\prog{nsswitch}-Module. Momentan bieten dies Linux und Solaris. Die -anderen von Samba unterst"utzten Unixsysteme bleiben au"sen vor. - -\subsection{nsswitch-Module} - -Viele Programme unter Unix m"ussen auf Datenbanken im Verzeichnis -\dateistyle{/etc} zugreifen. Beispielsweise mu"s \prog{ls -l} den -Dateibesitzer, der in der Datei nur in numerischer Form vorliegt, in -einen Benutzernamen "ubersetzen. Dazu mu"s die numerische User-ID in -der Datei \dateistyle{/etc/passwd} gesucht werden. Da"s diese -"Ubersetzung tats"achlich stattfindet, kann man leicht folgenderma"sen -"uberpr"ufen. Man mu"s nur testweise die Leserechte f"ur -\username{others} von der Datei \dateistyle{/etc/passwd} mit -\prog{chmod o-r /etc/paswd} wegnehmen und \prog{ls -l} aufrufen. Die -Dateibesitzer werden nur noch numerisch angezeigt\footnote{Sollte dies -nicht spontan funktionieren, kann der \prog{nscd} schuld sein. Siehe -hierzu Seite \pageref{nscd}.} - -Sauber geschriebene Programme greifen nicht direkt auf die Dateien in -\dateistyle{/etc} zu, sondern durch Bibliotheksaufrufe wie beispielsweise -\prog{getpwuid(2)}. Seit der glibc-Version 2 werden diese Bibliotheksaufrufe -in dynamisch geladenen Modulen implementiert. Gesteuert werden diese Module -"uber die Datei \dateistyle{/etc/nsswitch.conf}. F"ur jede der Dateien in -\dateistyle{/etc}, die von allgemeinem Interesse ist, gibt es eine -Zeile in der \dateistyle{/etc/nsswitch.conf}. Beispielsweise wird der -Zugriff auf die Datei \dateistyle{/etc/passwd} "uber die Zeile - -\begin{verbatim} -passwd: compat -\end{verbatim} - -\noindent oder - -\begin{verbatim} -passwd: files nis -\end{verbatim} - -\noindent gesteuert. Durch die erste Version wird ein -Kompatibilit"atsmodul zum Zugriff herangezogen, die zweite Variante -legt explizit fest, da"s zuerst in der lokalen Datei -\prog{/etc/passwd} nach Benutzern gesucht werden soll. Schl"agt dies -fehl, wird das NIS befragt. - -Wie funktioniert diese Steuerung? Die Option \param{compat} bewirkt, -da"s zur Laufzeit eines Programms die dynamische Bibliothek -\dateistyle{/lib/libnss\_{\bfseries compat}.so.2} geladen wird und die -Anfrage beantworten mu"s. \param{files} und \param{nis} beziehen sich -entsprechend auf die Dateien \dateistyle{/lib/libnss\_{\bfseries - files}.so.2} und \dateistyle{/lib/libnss\_{\bfseries nis}.so.2}. - -\prog{winbind} besteht aus zwei Teilen: Einer Datei -\dateistyle{libnss\_winbind.so} und einem D"amon \prog{winbind}. In -den Samba-Quellen findet sich der winbind unter -\dateistyle{source/nsswitch}. Dort wird auch die Datei -\dateistyle{libnss\_winbind.so} abgelegt. Zur Installation mu"s sie -manuell nach \dateistyle{/lib} kopiert werden: - -\begin{verbatim} -cp source/nsswitch/libnss_winbind.so /lib/libnss_winbind.so.2 -\end{verbatim} - -Der \prog{winbindd} selbst wird automatisch mit im -\dateistyle{sbin}-Unterverzeichnis von Samba installiert. - -\subsection{Konfiguration von Winbind} - -Um Winbind zu aktivieren, m"ussen in der Datei -\dateistyle{/etc/nsswitch.conf} die beiden Zeilen f"ur \param{passwd} -und \param{group} durch die Angabe \param{winbind} erg"anzt werden, -etwa so: - -\begin{verbatim} -# /etc/nsswitch.conf -passwd: files winbind -group: files winbind -\end{verbatim} - -Damit werden Benutzer und Gruppen zuerst in den lokalen Dateien -gesucht. Danach wird der \prog{winbindd} befragt, der im Hintergrund -laufen mu"s. - -F"ur die Konfiguration des \prog{winbindd} mu"s Samba ein normales -Dom"anenmitglied sein. Siehe hierzu Kapitel \ref{domain-member}. Der -\prog{winbindd} ben"otigt in der \dateistyle{/etc/smb.conf} einige -zus"atzliche Parameter. Eine vollst"andige Beispielkonfiguration ist -die folgende: - -\begin{verbatim} -; Samba als Domaenenmitglied -workgroup = windows -security = domain -password server = * -encrypt passwords = yes - -; Winbind-Konfiguration -winbind separator = + -winbind uid = 10000-20000 -winbind gid = 10000-20000 -template shell = /bin/bash -template homedir = /home/%D/%u -\end{verbatim} - -Die Parameter bedeuten im einzelnen: - -\begin{description} - -\item[winbind separator:] Unter Windows wird ein vollst"andiger - Benutzername mit Dom"ane in der Form - \username{DOMAENE\textbackslash{}benutzername} angegeben. Unter Unix - hat dies Nachteile, da der Backslash \textbackslash{} f"ur die Shell - eine Sonderbedeutung hat. Daher kann man den Trenner zwischen - Dom"ane und Benutzername separat konfigurieren. Als unkritisch - erweist sich das +-Zeichen. Ein Benutzer wird somit als - \username{DOMAENE+benutzername} angegeben. - -\item[winbind uid:] Der \prog{winbindd} mu"s dynamisch f"ur - Dom"anenbenutzer numerische User-IDs vergeben. Um dies tun zu - k"onnen, wird ihm mit dem Parameter \param{winbind uid} eine Menge - von User-IDs "ubergeben, die nicht in der \dateistyle{/etc/passwd} - oder im NIS verwendet werden. Wird auf einen Benutzernamen das erste - Mal zugegriffen, w"ahlt der \prog{winbindd} f"ur diesen Benutzer aus - seinem Pool die n"achste freie User-ID aus und speichert diese - Zuordnung fest in der Datei \dateistyle{winbindd\_idmap.tdb}. - -\item[winbind gid:] F"ur Group-IDs gilt das gleiche wie f"ur User-IDs. - -\item[template shell:] Der Primary Domain Controller kennt das Konzept - der Login-Shell nicht. Diese mu"s zentral f"ur alle Winbind-Benutzer - in der \dateistyle{smb.conf} vergeben werden. - -\item[template homedir:] Auch ein Heimatverzeichnis wird in der SAM - von Windows nicht abgespeichert und mu"s in der - \dateistyle{smb.conf} vorgegeben werden. Hierbei sollte man auf - jeden Fall die Dom"ane des Benutzers in den Pfad mit aufnehmen, um - Namenskollisionen bei Vertrauensstellungen zu behandeln. Der - Benutzer \username{schmidt} in der Dom"ane \username{GOE} sollte ein - anderes Heimatverzeichnis bekommen als der Benutzer - \username{schmidt} in der Dom"ane \username{HD}. Die - Heimatverzeichnisse werden selbstverst"andlich nicht automatisch - erzeugt, sondern m"ussen manuell angelegt und den Benutzern - "ubergeben werden. Auf einem reinen Fileserver mit gemeinsamen - Dateien ist es jedoch m"oglicherweise nicht notwendig, f"ur jeden - Benutzer eigene Heimatverzeichnisse anzulegen. -\end{description} - -Mit diesen Einstellungen kann man den \prog{winbindd} zus"atzlich zu -\prog{smbd} und \prog{nmbd} starten, die ebenfalls laufen m"ussen. - -\subsection{Winbindd abfragen: wbinfo} - -Laufen \prog{winbindd}, \prog{smbd} und \prog{nmbd} in der Dom"ane, -kann man das ganze testen. Das Utility zum Testen hei"st -\prog{wbinfo}. Der wichtigste Test ist der Aufruf \prog{wbinfo -t}. -Damit wird die Verbindung zum Dom"anencontroller gepr"uft, -\prog{winbindd} sucht den PDC und meldet sich mit dem Workstationkonto -an. Das Programm \prog{wbinfo} mu"s die Ausgabe \texttt{Secret is - good} geben. Gibt \prog{wbinfo} diese Ausgabe, so ist der -\prog{winbindd} g"ultiges Dom"anenmitglied und kann Informationen vom -PDC abrufen. - -\prog{wbinfo} kennt noch eine Reihe weiterer Parameter, mit denen die -Benutzerdatenbank der Dom"ane abgefragt werden kann. Die Ausgabe des -Aufrufts \prog{wbinfo} ohne Parameter gibt einen Hilfetext mit den -verf"ugbaren Optionen aus. - -Schl"agt \prog{wbinfo -t} fehl, so mu"s die Dom"anenmitgliedschaft -"uberpr"uft werden. Hierzu siehe Kapitel \ref{domain-member}. - -Verl"auft der Test mit \prog{wbinfo -t} erfolgreich, so kann man sich -s"amtliche verf"ugbaren Benutzer mit \prog{getent passwd} und die -Gruppen mit \prog{getent group} auflisten lassen. - -\todo{valid users = @DOMAIN+group} - -\todo{pam\_winbind} - -\subsection{nscd} -\label{nscd} - -Unter Linux ist der Name Service Caching Daemon \prog{nscd} ist ein -Programm, mit dem s"amtliche Abfragen durch den nsswitch-Mechanismus -gecached werden k"onnen. Der \prog{nscd} macht Sinn, wenn diese -Anfragen sehr lange dauern. Dies kann der Fall sein, wenn die Dateien -sehr gro"s sind, etwa wenn hunderte von Usern im System angelegt sind. -Ein anderer Verz"ogerungsgrund ist die Abfrage von Benutzerdaten "uber -ein Netzwerk beim Einsatz von NIS. - -Ein Nachteil des \prog{nscd} kann sein, da"s er "Anderungen in der -Benutzerdatenbank nicht schnell genug mitbekommt. Insbesondere beim -Testen des \prog{winbind} kann dies sehr hinderlich sein. Wer -beispielsweise folgendes schon einmal erlebt hat, hat ein Problem mit -dem \prog{nscd}: - -\begin{verbatim} -delphin:~ # useradd -m vl -delphin:~ # passwd vl -passwd: Unknown user vl -delphin:~ # -\end{verbatim} - -In diesem Falle sollte man den \prog{nscd} schleunigst killen und -daf"ur sorgen, da"s er beim n"achsten booten nicht wiederkommt. - - -\section{smbcontrol} - -Bis zur Version 2.0 hatte man relativ wenig M"oglichkeiten, in das -laufende Samba einzugreifen. Man konnte mit dem Signal \texttt{USR1} -den Debuglevel um einen Punkt erh"ohen und mit \texttt{USR2} um einen -Punkt erniedrigen. Dar"uber hinaus blieb h"aufig nur die M"oglichkeit, -einzelne Sambaprozesse oder sogar das ganze Samba herunterzufahren, -wenn man Konfigurations"anderungen vorgenommen hatte. Mit Samba 2.2 -gibt es f"ur diese Anwendungen ein neues Werkzeug: \prog{smbcontrol}. -\prog{smbcontrol} bietet die M"oglichkeit, einzelne Dinge anzusto"sen. -\prog{smbcontrol} verschickt hierzu Nachrichten an einzelne -Sambaprozesse, oder an alle \prog{smbd}s. - -Man kann jetzt im Gegensatz zu Samba 2.0 den Debuglevel einzelner -Prozesse direkt setzen. Dies geschieht wie in folgendem Beispiel: - -\begin{verbatim} -root@server:~ > smbcontrol smbd debuglevel -Current debug level of PID 4423 is 0 -Current debug level of PID 17392 is 0 -Current debug level of PID 22272 is 0 -root@server:~ > smbcontrol 17392 debug 1 -root@server:~ > smbcontrol smbd debuglevel -Current debug level of PID 4423 is 0 -Current debug level of PID 17392 is 1 -Current debug level of PID 22272 is 0 -\end{verbatim} - -An diesem Beispiel ist deutlich, wie \prog{smbcontrol} zu benutzen -ist. Als ersten Parameter verlangt \prog{smbcontrol} das Ziel der -Nachricht, die es verschicken soll. Zweiter Parameter ist die -Nachricht, die verschickt werden soll. Daran schlie"sen sich dann -weitere Parameter an, die m"oglicherweise zu der Nachricht geh"oren. - -Die Nachrichten im Einzelnen: - -\begin{description} -\item[debug:] Mit dieser Nachricht wird der Debuglevel anhand des - weiteren Parameters gesetzt. -\item[debuglevel:] \prog{smbcontrol} liest hiermit den aktuellen - Debuglevel von Prozessen aus. -\item[force-election:] Mit dieser Nachricht wird eine Wahl zum Local - Master Browser erzwungen. Diese Nachricht kann nur an den - \prog{nmbd} geschickt werden. Der \prog{smbd} hat mit der Wahl - nichts zu tun. -\item[ping:] Mit dieser Nachricht k"onnen Prozesse einfach zum - Antworten bewegt werden. {\bfseries ping} erwartet einen Parameter, - der die Anzahl der Pings zum Ziel festlegt. -\item[profile:] Diese Nachricht ist f"ur Entwickler gedacht. Um das - Profiling zu nutzen, mu"s Samba mit der \prog{configure}-Option - \texttt{-{}-with-profiling-data} compiliert werden. Dann kann mit - dieser Nachricht der interne Profiling-Code gesteuert werden. Damit - k"onnen Entwickler die Teile des Codes bestimmen, in denen am - meisten Zeit verbraucht wird. -\item[profilelevel:] Diese Nachricht ist ebenfalls f"ur Entwickler - gedacht. -\item[close-share:] Der \prog{smbd} kann mit dieser Nachricht dazu - bewegt werden, alle Verbindungen zu einer bestimmten Freigabe zu - beenden, ohne die restlichen Verbindungen zu st"oren. Dies kann - insbesondere dann sinnvoll sein, wenn "Anderungen an den - Zugriffsrechten einer Freigabe vorgenommen wurden. -\item[printer-notify:] Wenn Sie von Windows NT Clients aus mit - Druckern verbunden sind, nutzen Sie m"oglicherweise das neue - Drucksystem von Samba. In diesem Fall sind Druckereinstellungen auf - dem Server gespeichert. "Andern sich diese Einstellungen, k"onnen - Sie mit dieser Nachricht die momentan verbundenen Clients "uber - diese "Anderungen informieren. -\end{description} - -\end{document} diff --git a/docs/textdocs/logo.ps b/docs/textdocs/logo.ps deleted file mode 100644 index 4fa39aef368..00000000000 --- a/docs/textdocs/logo.ps +++ /dev/null @@ -1,344 +0,0 @@ -%!PS-Adobe-3.0 -%%Pages: (atend) -%%BoundingBox: 0 261 683 580 -%..................................... -%%Creator: Aladdin Ghostscript 601 (pswrite) -%%CreationDate: 2000/08/03 14:15:29 -%%DocumentData: Clean7Bit -%%EndComments -%%BeginProlog -% This copyright applies to everything between here and the %%EndProlog: -% Copyright (C) 2000 Aladdin Enterprises, Menlo Park, CA. All rights reserved. -%%BeginResource: procset GS_pswrite_ProcSet -/GS_pswrite_ProcSet 80 dict dup begin -/!{bind def}bind def/#{load def}!/N/counttomark # -/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}! -/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}! -/w/setlinewidth #/J/setlinecap # -/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat # -/m/moveto #/l/lineto #/c/rcurveto #/h{p closepath}!/H{P closepath}! -/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}! -/re{4 -2 roll m exch dup lx exch ly neg lx h}! -/^{3 index neg 3 index neg}! -/P{N 0 gt{N -2 roll moveto p}if}! -/p{N 2 idiv{N -2 roll rlineto}repeat}! -/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}! -/q/gsave #/Q/grestore #/rf{re fill}! -/Y{initclip P clip newpath}!/Y*{initclip P eoclip newpath}!/rY{re Y}! -/|={pop exch 4 1 roll 3 array astore cvx exch 1 index def exec}! -/|{exch string readstring |=}! -/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}! -/@/currentfile #/${+ @ |}! -/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}! -/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}! -/|X{exch string readhexstring |=}!/$X{+ @ |X}! -/@X{{currentfile ( ) readhexstring pop}}! -/PS{1 index where{pop cvx exec pop pop}{pop/setpage where -{pop pageparams 3{exch pop}repeat setpage}{pop pop}ifelse}ifelse}! -end def -%%EndResource -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -/pagesave save def GS_pswrite_ProcSet begin -612 792 /letter PS -0.1 0.1 scale -480 0 translate -%%EndPageSetup -mark -75 w -4 M -255 15 0 rG -481.48 4361.14 m --66 41.75 -145.25 62.64 -237.74 62.64 c --24.49 0 -47.76 -3.02 -69.76 -9 c --31.49 -8.49 -46.23 -21.97 -44.23 -40.43 c -1.99 -16.99 28.47 -38.2 79.51 -63.66 c -78.49 -38.96 125.74 -63.66 141.74 -74.15 c -51.97 -33.95 79.98 -69.9 83.99 -107.81 c -7 -64.92 -39.99 -117.36 -141.01 -157.3 c --90.5 -35.94 -199.74 -53.9 -327.74 -53.9 c --89.01 0 -168.99 7.23 -239.97 21.71 c --90.53 18.45 -137.02 39.43 -139.51 62.9 c --0.53 3.48 -0.03 6.97 1.49 10.49 c -45 140.04 p -74 -54.26 149.24 -81.39 225.76 -81.39 c -36.97 0 54.23 12.21 51.74 36.68 c --3.52 30.41 -24.76 58.85 -63.75 85.31 c --20.51 12.95 -56.78 36.91 -108.75 71.84 c --43.51 29.91 -65.24 65.83 -65.24 107.75 c -0 75.32 60.73 130.69 182.26 166.11 c -84.49 24.44 182.72 36.68 294.72 36.68 c -119.48 0 224.24 -16.81 314.24 -50.42 c -17.25 -164.09 h -S -1304.6 4343.04 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.5 -60.29 -92.26 -90.44 -140.25 -90.44 c --35.01 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.25 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.5 -73.24 h -1108.1 4573.78 m --132.51 0 -249.26 -30.5 -350.24 -91.5 c --120 -72.5 -180 -170.77 -180 -294.75 c -0 -13.51 0.73 -27.51 2.25 -42.01 c -7.97 -76.5 42.98 -134.24 105 -173.24 c -53.49 -34.01 120.99 -51 202.5 -51 c -149.01 0 267.75 57.86 356.25 173.61 c --51.76 -164.24 426 0 195.76 626.25 p --169.51 11.25 -404.76 16.88 -705.76 16.88 c -h -S -5755.04 4343.04 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.5 -60.29 -92.26 -90.44 -140.25 -90.44 c --35 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.25 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.5 -73.24 h -5558.54 4573.78 m --132.5 0 -249.25 -30.5 -350.24 -91.5 c --120 -72.5 -180 -170.77 -180 -294.75 c -0 -13.51 0.73 -27.51 2.26 -42.01 c -7.96 -76.5 42.97 -134.24 105 -173.24 c -53.49 -34.01 120.99 -51 202.5 -51 c -149 0 267.74 57.86 356.25 173.61 c --51.77 -164.24 426 0 195.77 626.25 p --169.52 11.25 -404.77 16.88 -705.77 16.88 c -h -S -4670.96 5042.19 -297.33 668.31 -574.48 -685.34 202.89 3.96 -315.84 -1098.47 436.49 0 23.24 59.24 P -50.5 -49.51 136.75 -74.24 258.75 -74.24 c -132.01 0 247.99 31.94 348.01 95.83 c -115.49 73.89 173.26 173.21 173.26 298.01 c -0 13.95 -0.76 28.19 -2.25 42.66 c --15.5 147.74 -141.01 221.63 -376.5 221.63 c --63.01 0 -138.77 -10.64 -227.25 -31.88 c -123.99 490.32 227.02 9.97 h -4464.7 4260.71 m --48.01 -126.3 -109.01 -189.43 -182.99 -189.43 c --26.51 0 -49.01 3.69 -67.52 11.13 c --11.02 5.45 -22 10.9 -32.99 16.35 c -16.49 45.32 p -35.98 100.05 70.49 166.67 103.51 199.87 c -28.01 28.21 68 42.33 120 42.33 c -90.76 0 -47.26 -125.57 h -S -3637.84 4406.7 m --12.01 112.61 -97.53 168.95 -256.52 168.95 c --199.51 0 -348.49 -20.01 -446.98 -60 c --56.52 39.99 -147.02 60 -271.5 60 c --204.52 0 -428.26 -5.77 -671.25 -17.25 c --196.5 -627.75 436.5 0 23.26 62.26 p -73.48 195 138.72 313.74 195.74 356.25 c -32.98 24.99 77.48 37.5 133.5 37.5 c --19.02 -46.52 -33.25 -85.52 -42.75 -117.01 c --107.25 -339 442.5 0 24 62.26 p -45.46 115.99 77.22 192.74 95.24 230.24 c -30.49 62.49 60.23 104.51 89.24 126.01 c -32.99 24.99 77.49 37.5 133.5 37.5 c --19.01 -46.52 -33.25 -85.52 -42.74 -117.01 c --292.57 -917.2 -223.62 3.05 297.33 -668.31 543.98 656.81 -177.09 2.42 295.99 923.64 p -16 50.53 21.97 96.09 17.99 136.64 c -h -S -K -457.11 4402.39 m --66 41.75 -145.25 62.64 -237.74 62.64 c --24.49 0 -47.76 -3.02 -69.76 -9 c --31.49 -8.49 -46.23 -21.97 -44.23 -40.43 c -1.99 -16.99 28.47 -38.2 79.51 -63.66 c -78.49 -38.96 125.74 -63.66 141.74 -74.15 c -51.97 -33.95 79.98 -69.9 83.99 -107.81 c -7 -64.92 -39.99 -117.36 -141.01 -157.3 c --90.5 -35.94 -199.74 -53.9 -327.74 -53.9 c --89.01 0 -168.99 7.23 -239.97 21.71 c --90.53 18.45 -137.02 39.43 -139.51 62.9 c --0.53 3.48 -0.03 6.97 1.49 10.49 c -45 140.04 p -74 -54.26 149.24 -81.39 225.76 -81.39 c -36.97 0 54.23 12.21 51.74 36.68 c --3.52 30.41 -24.76 58.85 -63.75 85.31 c --20.51 12.95 -56.78 36.91 -108.75 71.84 c --43.51 29.91 -65.24 65.83 -65.24 107.75 c -0 75.32 60.73 130.69 182.26 166.11 c -84.49 24.44 182.72 36.68 294.72 36.68 c -119.48 0 224.24 -16.81 314.24 -50.42 c -17.25 -164.09 p f -45 w -0 255 r6 -457.11 4402.39 m --66 41.75 -145.25 62.64 -237.74 62.64 c --24.49 0 -47.76 -3.02 -69.76 -9 c --31.49 -8.49 -46.23 -21.97 -44.23 -40.43 c -1.99 -16.99 28.47 -38.2 79.51 -63.66 c -78.49 -38.96 125.74 -63.66 141.74 -74.15 c -51.97 -33.95 79.98 -69.9 83.99 -107.81 c -7 -64.92 -39.99 -117.36 -141.01 -157.3 c --90.5 -35.94 -199.74 -53.9 -327.74 -53.9 c --89.01 0 -168.99 7.23 -239.97 21.71 c --90.53 18.45 -137.02 39.43 -139.51 62.9 c --0.53 3.48 -0.03 6.97 1.49 10.49 c -45 140.04 p -74 -54.26 149.24 -81.39 225.76 -81.39 c -36.97 0 54.23 12.21 51.74 36.68 c --3.52 30.41 -24.76 58.85 -63.75 85.31 c --20.51 12.95 -56.78 36.91 -108.75 71.84 c --43.51 29.91 -65.24 65.83 -65.24 107.75 c -0 75.32 60.73 130.69 182.26 166.11 c -84.49 24.44 182.72 36.68 294.72 36.68 c -119.48 0 224.24 -16.81 314.24 -50.42 c -17.25 -164.09 h -S -13 16 255 rG -1280.22 4384.29 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.5 -60.29 -92.25 -90.44 -140.24 -90.44 c --35.01 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.24 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.51 -73.24 h -1083.73 4615.03 m --132.51 0 -249.26 -30.5 -350.25 -91.5 c --120 -72.5 -180 -170.77 -180 -294.75 c -0 -13.51 0.73 -27.51 2.25 -42.01 c -7.97 -76.5 42.98 -134.24 105 -173.24 c -53.49 -34.01 120.99 -51 202.5 -51 c -149 0 267.74 57.86 356.25 173.61 c --51.77 -164.24 426.01 0 195.76 626.25 p --169.51 11.25 -404.77 16.88 -705.76 16.88 c -f -0 255 r6 -1280.22 4384.29 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.5 -60.29 -92.25 -90.44 -140.24 -90.44 c --35.01 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.24 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.51 -73.24 h -1083.73 4615.03 m --132.51 0 -249.26 -30.5 -350.25 -91.5 c --120 -72.5 -180 -170.77 -180 -294.75 c -0 -13.51 0.73 -27.51 2.25 -42.01 c -7.97 -76.5 42.98 -134.24 105 -173.24 c -53.49 -34.01 120.99 -51 202.5 -51 c -149 0 267.74 57.86 356.25 173.61 c --51.77 -164.24 426.01 0 195.76 626.25 p --169.51 11.25 -404.77 16.88 -705.76 16.88 c -h -S -13 16 255 rG -5730.66 4384.29 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.49 -60.29 -92.25 -90.44 -140.24 -90.44 c --35.01 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.25 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.51 -73.24 h -5534.17 4615.03 m --132.51 0 -249.26 -30.5 -350.24 -91.5 c --120.01 -72.5 -180.01 -170.77 -180.01 -294.75 c -0 -13.51 0.74 -27.51 2.26 -42.01 c -7.97 -76.5 42.98 -134.24 105 -173.24 c -53.5 -34.01 121 -51 202.5 -51 c -149.01 0 267.75 57.86 356.25 173.61 c --51.77 -164.24 426.01 0 195.76 626.25 p --169.51 11.25 -404.76 16.88 -705.76 16.88 c -f -0 255 r6 -5730.66 4384.29 m --22.5 -58.8 -50.01 -109.87 -82.5 -153.2 c --45.49 -60.29 -92.25 -90.44 -140.24 -90.44 c --35.01 0 -52.5 23.91 -52.5 71.75 c -0 38.85 12.25 82.94 36.74 132.27 c -37.5 75.24 91.23 112.86 161.25 112.86 c -105.76 0 -28.51 -73.24 h -5534.17 4615.03 m --132.51 0 -249.26 -30.5 -350.24 -91.5 c --120.01 -72.5 -180.01 -170.77 -180.01 -294.75 c -0 -13.51 0.74 -27.51 2.26 -42.01 c -7.97 -76.5 42.98 -134.24 105 -173.24 c -53.5 -34.01 121 -51 202.5 -51 c -149.01 0 267.75 57.86 356.25 173.61 c --51.77 -164.24 426.01 0 195.76 626.25 p --169.51 11.25 -404.76 16.88 -705.76 16.88 c -h -S -K -4646.58 5083.44 -297.33 668.31 -574.48 -685.34 202.9 3.96 -315.85 -1098.47 436.5 0 23.23 59.24 P -50.51 -49.51 136.76 -74.24 258.75 -74.24 c -132.01 0 248 31.94 348.02 95.83 c -115.48 73.89 173.26 173.21 173.26 298.01 c -0 13.95 -0.76 28.19 -2.26 42.66 c --15.5 147.74 -141 221.63 -376.49 221.63 c --63.02 0 -138.78 -10.64 -227.26 -31.88 c -123.99 490.32 227.02 9.97 h -4440.33 4301.96 m --48.02 -126.3 -109.01 -189.43 -182.99 -189.43 c --26.51 0 -49.01 3.69 -67.53 11.13 c --11.01 5.45 -22 10.9 -32.99 16.35 c -16.5 45.32 p -35.97 100.05 70.48 166.67 103.5 199.87 c -28.01 28.21 68 42.33 120 42.33 c -90.77 0 -47.26 -125.57 p f -0 255 r6 -4646.58 5083.44 -297.33 668.31 -574.48 -685.34 202.9 3.96 -315.85 -1098.47 436.5 0 23.23 59.24 P -50.51 -49.51 136.76 -74.24 258.75 -74.24 c -132.01 0 248 31.94 348.02 95.83 c -115.48 73.89 173.26 173.21 173.26 298.01 c -0 13.95 -0.76 28.19 -2.26 42.66 c --15.5 147.74 -141 221.63 -376.49 221.63 c --63.02 0 -138.78 -10.64 -227.26 -31.88 c -123.99 490.32 227.02 9.97 h -4440.33 4301.96 m --48.02 -126.3 -109.01 -189.43 -182.99 -189.43 c --26.51 0 -49.01 3.69 -67.53 11.13 c --11.01 5.45 -22 10.9 -32.99 16.35 c -16.5 45.32 p -35.97 100.05 70.48 166.67 103.5 199.87 c -28.01 28.21 68 42.33 120 42.33 c -90.77 0 -47.26 -125.57 h -S -K -3613.46 4447.95 m --12.01 112.61 -97.53 168.95 -256.52 168.95 c --199.51 0 -348.49 -20.01 -446.98 -60 c --56.51 39.99 -147.01 60 -271.5 60 c --204.52 0 -428.26 -5.77 -671.25 -17.25 c --196.49 -627.75 436.49 0 23.27 62.26 p -73.47 195 138.72 313.74 195.73 356.25 c -32.99 24.99 77.49 37.5 133.5 37.5 c --19.01 -46.52 -33.25 -85.52 -42.74 -117.01 c --107.26 -339 442.5 0 24 62.26 p -45.47 115.99 77.22 192.74 95.24 230.24 c -30.5 62.49 60.24 104.51 89.24 126.01 c -32.99 24.99 77.49 37.5 133.51 37.5 c --19.02 -46.52 -33.25 -85.52 -42.75 -117.01 c --292.57 -917.2 -223.62 3.05 297.33 -668.31 543.99 656.81 -177.1 2.42 296 923.64 p -15.99 50.53 21.97 96.09 17.98 136.64 c -f -0 255 r6 -3613.46 4447.95 m --12.01 112.61 -97.53 168.95 -256.52 168.95 c --199.51 0 -348.49 -20.01 -446.98 -60 c --56.51 39.99 -147.01 60 -271.5 60 c --204.52 0 -428.26 -5.77 -671.25 -17.25 c --196.49 -627.75 436.49 0 23.27 62.26 p -73.47 195 138.72 313.74 195.73 356.25 c -32.99 24.99 77.49 37.5 133.5 37.5 c --19.01 -46.52 -33.25 -85.52 -42.74 -117.01 c --107.26 -339 442.5 0 24 62.26 p -45.47 115.99 77.22 192.74 95.24 230.24 c -30.5 62.49 60.24 104.51 89.24 126.01 c -32.99 24.99 77.49 37.5 133.51 37.5 c --19.02 -46.52 -33.25 -85.52 -42.75 -117.01 c --292.57 -917.2 -223.62 3.05 297.33 -668.31 543.99 656.81 -177.1 2.42 296 923.64 p -15.99 50.53 21.97 96.09 17.98 136.64 c -h -S -cleartomark end showpage pagesave restore -%%PageTrailer -%%Trailer -%%Pages: 1 -%%EOF -- cgit From 9cb80267314c73598d90cebf011f46b73517bcb9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Mar 2002 14:41:58 +0000 Subject: reformat comments --- source/include/rpc_spoolss.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index bcbd4ed2aed..f6d7c102cb1 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -50,7 +50,6 @@ #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39 -#define SPOOLSS_ROUTERREPLYPRINTER 0x3b #define SPOOLSS_ADDPORTEX 0x3d #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e #define SPOOLSS_SPOOLERINIT 0x3f @@ -96,16 +95,13 @@ #define SPOOLSS_ENUMMONITORS 0x24 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33 #define SPOOLSS_GETPRINTERDRIVER2 0x35 -/* find close printer notification */ -#define SPOOLSS_FCPN 0x38 +#define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */ #define SPOOLSS_REPLYOPENPRINTER 0x3a +#define SPOOLSS_ROUTERREPLYPRINTER 0x3b #define SPOOLSS_REPLYCLOSEPRINTER 0x3c -/* remote find first printer change notifyEx */ -#define SPOOLSS_RFFPCNEX 0x41 -/*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */ -#define SPOOLSS_RRPCN 0x42 -/* remote find next printer change notifyEx */ -#define SPOOLSS_RFNPCNEX 0x43 +#define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */ +#define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */ +#define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */ #define SPOOLSS_OPENPRINTEREX 0x45 #define SPOOLSS_ADDPRINTEREX 0x46 #define SPOOLSS_ENUMPRINTERDATA 0x48 -- cgit From 2487d469ffc6f31cf69c94ed35104b6cbc2455d2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Mar 2002 17:46:34 +0000 Subject: Fix for typo on solaris nss from Richard Bollinger. Jeremy. --- source/configure | 4 ++-- source/configure.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/configure b/source/configure index 0148037f2ab..87da3c49551 100755 --- a/source/configure +++ b/source/configure @@ -12953,12 +12953,12 @@ case "$host_os" in ;; *solaris*) HAVE_WINBIND=yes - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" WINBIND_NSS_EXTRA_LIBS="-lsocket" ;; *hpux11*) HAVE_WINBIND=yes - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" ;; *) HAVE_WINBIND=no diff --git a/source/configure.in b/source/configure.in index 407850dd8f8..7ad049869b9 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2587,12 +2587,12 @@ case "$host_os" in ;; *solaris*) HAVE_WINBIND=yes - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" WINBIND_NSS_EXTRA_LIBS="-lsocket" ;; *hpux11*) HAVE_WINBIND=yes - WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris" + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" ;; *) HAVE_WINBIND=no -- cgit From 24d5f1cd444ff0639f3ede6a6e1674253d321115 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Mar 2002 21:51:24 +0000 Subject: first pass at inplementing SPOOLSS_ROUTERREPLYPRINTER. This is only the parsing and the client routines. I have some hacked server code that makes the Win2k Printers folder display the updated driver name when changing settings via the properties page (ask me if this doesn't make sense), but it's too ugly too live. That will come later. Makefile.in simply include libsmb/cli_spoolss.o and related files into smbd (will need this for printer change notification). --- source/Makefile.in | 3 +- source/include/proto.h | 6 ++++ source/include/rpc_spoolss.h | 16 ++++++++++ source/libsmb/cli_spoolss.c | 52 ++++++++++++++++++++++++++++++ source/rpc_parse/parse_spoolss.c | 69 +++++++++++++++++++++++++++++++++++++++- 5 files changed, 144 insertions(+), 2 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 42e65553c3b..08002fef1eb 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -193,7 +193,8 @@ SMBD_OBJ1 = smbd/server.o smbd/files.o smbd/chgpasswd.o smbd/connection.o \ smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \ smbd/posix_acls.o lib/sysacls.o \ smbd/process.o smbd/service.o smbd/error.o \ - printing/printfsp.o lib/util_seaccess.o + printing/printfsp.o lib/util_seaccess.o libsmb/cli_spoolss.o \ + libsmb/cli_pipe_util.o PRINTING_OBJ = printing/pcap.o printing/print_svid.o \ printing/print_cups.o printing/print_generic.o \ diff --git a/source/include/proto.h b/source/include/proto.h index 81280da6ae0..19433601e6e 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -590,6 +590,8 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, fstring procdir); NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value); +NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 condition, uint32 changd_id); /*The following definitions come from libsmb/cli_srvsvc.c */ @@ -3694,6 +3696,10 @@ BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, const fstring string, uint32 printer, uint32 type); BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, + uint32 condition, uint32 change_id); +BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd); BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index f6d7c102cb1..a94b85fab75 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1872,6 +1872,22 @@ typedef struct spool_r_replyopenprinter } SPOOL_R_REPLYOPENPRINTER; +typedef struct spool_q_routerreplyprinter +{ + POLICY_HND handle; + uint32 condition; + uint32 unknown1; /* 0x00000001 */ + uint32 change_id; + uint8 unknown2[5]; /* 0x0000000001 */ +} +SPOOL_Q_ROUTERREPLYPRINTER; + +typedef struct spool_r_routerreplyprinter +{ + WERROR status; +} +SPOOL_R_ROUTERREPLYPRINTER; + typedef struct spool_q_replycloseprinter { POLICY_HND handle; diff --git a/source/libsmb/cli_spoolss.c b/source/libsmb/cli_spoolss.c index 8f0e2dc7465..feb9c0c6784 100644 --- a/source/libsmb/cli_spoolss.c +++ b/source/libsmb/cli_spoolss.c @@ -1168,3 +1168,55 @@ done: return result; } +NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 condition, uint32 changd_id) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ROUTERREPLYPRINTER q; + SPOOL_R_ROUTERREPLYPRINTER r; + NTSTATUS result; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + + /* Initialise input parameters */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + + /* write the request */ + make_spoolss_q_routerreplyprinter(&q, pol, condition, changd_id); + + /* Marshall data and send request */ + if (!spoolss_io_q_routerreplyprinter ("", &q, &qbuf, 0)) { + DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to marshall SPOOL_Q_ROUTERREPLYPRINTER!\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + + if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf)) { + DEBUG(0,("cli_spoolss_routerreplyprinter: rpc_api_pipe_req failed!\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + if (!spoolss_io_r_routerreplyprinter ("", &r, &rbuf, 0)) { + DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to unmarshall SPOOL_R_ROUTERREPLYPRINTER!\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + result = werror_to_ntstatus(r.status); + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 4c38f4d4303..2e802908276 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -6101,6 +6101,73 @@ BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, pr return True; } +/******************************************************************* + * init a structure. + ********************************************************************/ +BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, + uint32 condition, uint32 change_id) +{ + + memcpy(&q_u->handle, hnd, sizeof(q_u->handle)); + + q_u->condition = condition; + q_u->change_id = change_id; + + /* magic values */ + q_u->unknown1 = 0x1; + memset(q_u->unknown2, 0x0, 5); + q_u->unknown2[0] = 0x1; + + return True; +} + +/******************************************************************* + Parse a SPOOL_Q_ROUTERREPLYPRINTER structure. +********************************************************************/ +BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth) +{ + + prs_debug(ps, depth, desc, "spoolss_io_q_routerreplyprinter"); + depth++; + + if (!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth)) + return False; + + if (!prs_uint32("condition", ps, depth, &q_u->condition)) + return False; + + if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1)) + return False; + + if (!prs_uint32("change_id", ps, depth, &q_u->change_id)) + return False; + + if (!prs_uint8s(False, "private", ps, depth, q_u->unknown2, 5)) + return False; + + return True; +} + +/******************************************************************* + Parse a SPOOL_R_ROUTERREPLYPRINTER structure. +********************************************************************/ +BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_r_routerreplyprinter"); + depth++; + + if (!prs_align(ps)) + return False; + + if (!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + /******************************************************************* * init a structure. ********************************************************************/ @@ -6239,7 +6306,7 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, q_u->unknown0=0x0; q_u->unknown1=0x0; - q_u->info_ptr=1; + q_u->info_ptr=0xaddee11e; q_u->info.version=2; -- cgit From 881453c6e661a67ff8ae0aeed5f9e2d2c50ef852 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Mar 2002 21:57:34 +0000 Subject: fix two error return codes --- source/rpc_server/srv_spoolss_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 2b3a34e42c0..a4248dce6f2 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1466,7 +1466,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO } if (*needed > *out_size) - return WERR_STATUS_MORE_ENTRIES; + return WERR_MORE_DATA; else return WERR_OK; } @@ -7369,7 +7369,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, *data = NULL; } - return WERR_INVALID_PARAM; + return WERR_BADFILE; } if (*needed > *out_size) -- cgit From 08035d33c587dbc4c34d78f95ee1f2f9277d924d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Mar 2002 22:06:59 +0000 Subject: coupld of minor fixes and correct typo in last commit --- source/rpc_server/srv_spoolss_nt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index a4248dce6f2..82c36d52f5a 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -545,7 +545,7 @@ static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, u DEBUG(10,("build_notify_data: PRINTER_MESSAGE_DRIVER set on [%s][%d]\n", printer->info_2->printername, idx)); if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Realloc() failed with size [%d]!\n", + DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n", (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); return -1; } @@ -622,7 +622,8 @@ static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, *status = WERR_NOMEM; goto done; } - notify_info.flags = 0x00000200; + notify_info.version = 0x2; + notify_info.flags = 0x00020000; notify_info.count = data_len; notify_info.data = notify_data; @@ -672,6 +673,9 @@ done: */ SAFE_FREE(notify_data); + if (!W_ERROR_IS_OK(*status)) + DEBUG(5,("cli_spoolss_reply_rrpcn: %s\n", get_dos_error_msg(*status))); + return W_ERROR_IS_OK(*status); } @@ -1308,7 +1312,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) return False; - SIVAL(*data, 0, 0x02); + SIVAL(*data, 0, 0x03); *needed = 0x4; return True; } @@ -7350,7 +7354,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, */ if (strcmp(key, "PrinterDriverData") != 0) - return WERR_INVALID_PARAM; + return WERR_BADFILE; DEBUG(10, ("_spoolss_getprinterdataex: pass me to getprinterdata\n")); found = getprinterdata_printer(p, p->mem_ctx, handle, value, @@ -7369,7 +7373,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, *data = NULL; } - return WERR_BADFILE; + return WERR_INVALID_PARAM; } if (*needed > *out_size) -- cgit From 01d3ddd6633c29913d1a04f3bff6f145501f6af8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 10 Mar 2002 19:10:59 +0000 Subject: silly typo since 98? --- source/smbd/mangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index 3d214d46589..ea441e2ded5 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -555,7 +555,7 @@ static void cache_mangled_name( char *mangled_name, char *raw_name ) if( s1 && (s2 = strrchr( raw_name, '.' )) ) { i = 1; - while( s1[i] && (tolower( s1[1] ) == s2[i]) ) + while( s1[i] && (tolower( s1[i] ) == s2[i]) ) i++; if( !s1[i] && !s2[i] ) { -- cgit From 924768f2f1da17561d1c48031da21f747ccc0405 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 11 Mar 2002 02:16:14 +0000 Subject: Some patches to make Samba return the same information as NT. - when returning and creating printer info, uppercase the server name --- source/printing/nt_printing.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index f4c59bd383a..9a91088b78d 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2519,8 +2519,11 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin snum = lp_servicenumber(sharename); slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); - slprintf(info.printername, sizeof(info.printername)-1, "\\\\%s\\%s", - get_called_name(), sharename); + strupper(info.servername); + slprintf(info.printername, sizeof(info.printername)-1, "\\\\%s\\", + get_called_name()); + strupper(info.printername); + fstrcat(info.printername, sharename); fstrcpy(info.sharename, sharename); fstrcpy(info.portname, SAMBA_PRINTER_PORT_NAME); fstrcpy(info.drivername, lp_printerdriver(snum)); @@ -2637,10 +2640,9 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen info.attributes |= (PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK); /* Restore the stripped strings. */ - slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); - slprintf(printername, sizeof(printername)-1, "\\\\%s\\%s", get_called_name(), - info.printername); - fstrcpy(info.printername, printername); + slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", + get_called_name()); + strupper(info.servername); len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len); -- cgit From 5a78d4231ec4b28ff41e49e64fc59e76563cddae Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 11 Mar 2002 02:27:38 +0000 Subject: Some patches to make Samba return the same information as NT. - fix up the comment returned in a printer_info_1 (we still get this wrong as the last field should be the printer location not the comment, despite what MSDN says) - don't return the printer name prefixed by the server name when doing a enumprinters --- source/rpc_server/srv_spoolss_nt.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 82c36d52f5a..703bffd3d30 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2815,9 +2815,13 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) /******************************************************************** * construct_printer_info_1 * fill a printer_info_1 struct + * + * The is_enum parameter says whether the PRINTER_INFO_1 returned is + * to be used in an enumprinters call. This affects whether the netbios + * name of the server is prefixed to the printer and server names. ********************************************************************/ - -static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int snum) +static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, + int snum, BOOL is_enum) { pstring chaine; pstring chaine2; @@ -2830,13 +2834,23 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int if (*ntprinter->info_2->comment == '\0') { init_unistr(&printer->comment, lp_comment(snum)); - slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, - ntprinter->info_2->drivername, lp_comment(snum)); - } - else { + if (is_enum) { + char *p; + + p = strchr(ntprinter->info_2->printername + 2, '\\'); + + if (p) + fstrcpy(ntprinter->info_2->printername, p + 1); + } + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", + ntprinter->info_2->printername, + ntprinter->info_2->drivername, lp_comment(snum)); + } else { init_unistr(&printer->comment, ntprinter->info_2->comment); /* saved comment. */ - slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, - ntprinter->info_2->drivername, ntprinter->info_2->comment); + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", + ntprinter->info_2->printername, + ntprinter->info_2->drivername, + ntprinter->info_2->comment); } slprintf(chaine2,sizeof(chaine)-1,"%s", ntprinter->info_2->printername); @@ -3124,8 +3138,8 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 for (snum=0; snum Date: Mon, 11 Mar 2002 03:01:25 +0000 Subject: Updated copyright. --- source/rpc_server/srv_spoolss_nt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 703bffd3d30..a298ff3d86b 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4,9 +4,10 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, - * Copyright (C) Jean François Micouleau 1998-2000. - * Copyright (C) Jeremy Allison 2001. - * Copyright (C) Gerald Carter 2000-2001. + * Copyright (C) Jean François Micouleau 1998-2000, + * Copyright (C) Jeremy Allison 2001, + * Copyright (C) Gerald Carter 2000-2001, + * Copyright (C) Tim Potter 2001-2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- cgit From 34aba559faa27d5f106a8ad4c8ebb97444701a9d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 11 Mar 2002 03:47:24 +0000 Subject: Move strip server name code outside of check for comment != "" --- source/rpc_server/srv_spoolss_nt.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index a298ff3d86b..b5032536523 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2833,25 +2833,25 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, printer->flags=flags; - if (*ntprinter->info_2->comment == '\0') { - init_unistr(&printer->comment, lp_comment(snum)); - if (is_enum) { - char *p; + /* Strip server name from printer name if we are doing an enum */ - p = strchr(ntprinter->info_2->printername + 2, '\\'); + if (is_enum) { + char *p; + + p = strchr(ntprinter->info_2->printername + 2, '\\'); + + if (p) + fstrcpy(ntprinter->info_2->printername, p + 1); + } - if (p) - fstrcpy(ntprinter->info_2->printername, p + 1); - } - slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", - ntprinter->info_2->printername, + if (*ntprinter->info_2->comment == '\0') { + init_unistr(&printer->comment, lp_comment(snum)); + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, ntprinter->info_2->drivername, lp_comment(snum)); } else { init_unistr(&printer->comment, ntprinter->info_2->comment); /* saved comment. */ - slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", - ntprinter->info_2->printername, - ntprinter->info_2->drivername, - ntprinter->info_2->comment); + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, + ntprinter->info_2->drivername, ntprinter->info_2->comment); } slprintf(chaine2,sizeof(chaine)-1,"%s", ntprinter->info_2->printername); -- cgit From 8deba16ac5efa02dcbd02156fc60a081306674e2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 11 Mar 2002 18:26:10 +0000 Subject: Merge in the locking changes from HEAD. Added "inherit acls" parameter, no code yet. Jeremy. --- source/include/proto.h | 5 +- source/libsmb/clifile.c | 58 ++++++++++ source/locking/brlock.c | 20 +++- source/locking/locking.c | 2 +- source/param/loadparm.c | 4 + source/smbd/blocking.c | 9 +- source/smbd/reply.c | 269 ++++++++++++++++++++++++----------------------- 7 files changed, 229 insertions(+), 138 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 19433601e6e..c5f3e4120a1 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -268,6 +268,8 @@ int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredA int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, enum brl_type lock_type); BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); @@ -2041,6 +2043,7 @@ BOOL lp_dos_filetime_resolution(int ); BOOL lp_fake_dir_create_times(int ); BOOL lp_blocking_locks(int ); BOOL lp_inherit_perms(int ); +BOOL lp_inherit_acls(int ); BOOL lp_use_client_driver(int ); BOOL lp_default_devmode(int ); BOOL lp_nt_acl_support(int ); @@ -3698,7 +3701,7 @@ BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, pr BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, uint32 condition, uint32 change_id); -BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd); BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth); diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c index 52c553c1cdc..ed13bf4d812 100644 --- a/source/libsmb/clifile.c +++ b/source/libsmb/clifile.c @@ -543,6 +543,57 @@ BOOL cli_close(struct cli_state *cli, int fnum) return !cli_is_error(cli); } +/**************************************************************************** + send a lock with a specified locktype + this is used for testing LOCKING_ANDX_CANCEL_LOCK +****************************************************************************/ +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype) +{ + char *p; + int saved_timeout = cli->timeout; + + memset(cli->outbuf,'\0',smb_size); + memset(cli->inbuf,'\0', smb_size); + + set_message(cli->outbuf,8,0,True); + + SCVAL(cli->outbuf,smb_com,SMBlockingX); + SSVAL(cli->outbuf,smb_tid,cli->cnum); + cli_setup_packet(cli); + + SCVAL(cli->outbuf,smb_vwv0,0xFF); + SSVAL(cli->outbuf,smb_vwv2,fnum); + SCVAL(cli->outbuf,smb_vwv3,locktype); + SIVALS(cli->outbuf, smb_vwv4, timeout); + SSVAL(cli->outbuf,smb_vwv6,0); + SSVAL(cli->outbuf,smb_vwv7,1); + + p = smb_buf(cli->outbuf); + SSVAL(p, 0, cli->pid); + SIVAL(p, 2, offset); + SIVAL(p, 6, len); + + p += 10; + + cli_setup_bcc(cli, p); + + cli_send_smb(cli); + + if (timeout != 0) { + cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000); + } + + if (!cli_receive_smb(cli)) { + cli->timeout = saved_timeout; + return NT_STATUS_UNSUCCESSFUL; + } + + cli->timeout = saved_timeout; + + return cli_nt_error(cli); +} + /**************************************************************************** Lock a file. ****************************************************************************/ @@ -581,6 +632,9 @@ BOOL cli_lock(struct cli_state *cli, int fnum, cli_send_smb(cli); cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000); + if (timeout != 0) { + cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000); + } if (!cli_receive_smb(cli)) { cli->timeout = saved_timeout; @@ -683,6 +737,10 @@ BOOL cli_lock64(struct cli_state *cli, int fnum, cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000); + if (timeout != 0) { + cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 5*1000); + } + if (!cli_receive_smb(cli)) { cli->timeout = saved_timeout; return False; diff --git a/source/locking/brlock.c b/source/locking/brlock.c index c48c626266e..e7fa4022f62 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. byte range locking code Updated to handle range splits/merges. @@ -286,14 +285,17 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum, struct lock_struct lock, *locks; char *tp; NTSTATUS status = NT_STATUS_OK; + static int last_failed = -1; + static br_off last_failed_start; kbuf = locking_key(dev,ino); dbuf.dptr = NULL; #if !ZERO_ZERO - if (start == 0 && size == 0) + if (start == 0 && size == 0) { DEBUG(0,("client sent 0/0 lock - please report this\n")); + } #endif tdb_chainlock(tdb, kbuf); @@ -348,6 +350,18 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum, return NT_STATUS_OK; fail: + /* this is a nasty hack to try to simulate the lock result cache code in w2k. + It isn't completely accurate as I haven't yet worked out the correct + semantics (tridge) + */ + if (last_failed == fnum && + last_failed_start == start && + NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED)) { + status = NT_STATUS_FILE_LOCK_CONFLICT; + } + last_failed = fnum; + last_failed_start = start; + SAFE_FREE(dbuf.dptr); tdb_chainunlock(tdb, kbuf); return status; diff --git a/source/locking/locking.c b/source/locking/locking.c index 9822c587f1c..8c7b9bf9194 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -172,7 +172,7 @@ NTSTATUS do_unlock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, if (!ok) { DEBUG(10,("do_unlock: returning ERRlock.\n" )); - return NT_STATUS_LOCK_NOT_GRANTED; + return NT_STATUS_RANGE_NOT_LOCKED; } if (!lp_posix_locking(SNUM(conn))) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 8457243feac..dcf3a0f50ab 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -397,6 +397,7 @@ typedef struct BOOL bFakeDirCreateTimes; BOOL bBlockingLocks; BOOL bInheritPerms; + BOOL bInheritACLS; BOOL bMSDfsRoot; BOOL bUseClientDriver; BOOL bDefaultDevmode; @@ -514,6 +515,7 @@ static service sDefault = { False, /* bFakeDirCreateTimes */ True, /* bBlockingLocks */ False, /* bInheritPerms */ + False, /* bInheritACLS */ False, /* bMSDfsRoot */ False, /* bUseClientDriver */ False, /* bDefaultDevmode */ @@ -760,6 +762,7 @@ static struct parm_struct parm_table[] = { {"directory security mask", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, {"force directory security mode", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE}, {"inherit permissions", P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE}, + {"inherit acls", P_BOOL, P_LOCAL, &sDefault.bInheritACLS, NULL, NULL, FLAG_SHARE}, {"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE}, {"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0}, @@ -1718,6 +1721,7 @@ FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution) FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes) FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks) FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms) +FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS) FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver) FN_LOCAL_BOOL(lp_default_devmode, bDefaultDevmode) FN_LOCAL_BOOL(lp_nt_acl_support, bNTAclSupport) diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c index 0d2a99b3f07..bc8c54caf7c 100644 --- a/source/smbd/blocking.c +++ b/source/smbd/blocking.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. Blocking Locking functions Copyright (C) Jeremy Allison 1998 @@ -176,6 +175,12 @@ static void generic_blocking_lock_error(blocking_lock_record *blr, NTSTATUS stat char *inbuf = blr->inbuf; construct_reply_common(inbuf, outbuf); + /* whenever a timeout is given w2k maps LOCK_NOT_GRANTED to + FILE_LOCK_CONFLICT! (tridge) */ + if (NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED)) { + status = NT_STATUS_FILE_LOCK_CONFLICT; + } + ERROR_NT(status); if (!send_smb(smbd_server_fd(),outbuf)) exit_server("generic_blocking_lock_error: send_smb failed."); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 7fac12de29d..74a7982805d 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -4367,180 +4367,187 @@ SMB_BIG_UINT get_lock_offset( char *data, int data_offset, BOOL large_file_forma int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { - files_struct *fsp = file_fsp(inbuf,smb_vwv2); - unsigned char locktype = CVAL(inbuf,smb_vwv3); - unsigned char oplocklevel = CVAL(inbuf,smb_vwv3+1); - uint16 num_ulocks = SVAL(inbuf,smb_vwv6); - uint16 num_locks = SVAL(inbuf,smb_vwv7); - SMB_BIG_UINT count = 0, offset = 0; - uint16 lock_pid; - int32 lock_timeout = IVAL(inbuf,smb_vwv4); - int i; - char *data; - BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES)?True:False; - BOOL err; + files_struct *fsp = file_fsp(inbuf,smb_vwv2); + unsigned char locktype = CVAL(inbuf,smb_vwv3); + unsigned char oplocklevel = CVAL(inbuf,smb_vwv3+1); + uint16 num_ulocks = SVAL(inbuf,smb_vwv6); + uint16 num_locks = SVAL(inbuf,smb_vwv7); + SMB_BIG_UINT count = 0, offset = 0; + uint16 lock_pid; + int32 lock_timeout = IVAL(inbuf,smb_vwv4); + int i; + char *data; + BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES)?True:False; + BOOL err; NTSTATUS status; - START_PROFILE(SMBlockingX); + START_PROFILE(SMBlockingX); - CHECK_FSP(fsp,conn); + CHECK_FSP(fsp,conn); - data = smb_buf(inbuf); + data = smb_buf(inbuf); - /* Check if this is an oplock break on a file - we have granted an oplock on. - */ + if (locktype & (LOCKING_ANDX_CANCEL_LOCK | LOCKING_ANDX_CHANGE_LOCKTYPE)) { + /* we don't support these - and CANCEL_LOCK makes w2k + and XP reboot so I don't really want to be + compatible! (tridge) */ + return ERROR_NT(NT_STATUS_NOT_SUPPORTED); + } + + /* Check if this is an oplock break on a file + we have granted an oplock on. + */ if ((locktype & LOCKING_ANDX_OPLOCK_RELEASE)) { - /* Client can insist on breaking to none. */ - BOOL break_to_none = (oplocklevel == 0); + /* Client can insist on breaking to none. */ + BOOL break_to_none = (oplocklevel == 0); - DEBUG(5,("reply_lockingX: oplock break reply (%u) from client for fnum = %d\n", - (unsigned int)oplocklevel, fsp->fnum )); + DEBUG(5,("reply_lockingX: oplock break reply (%u) from client for fnum = %d\n", + (unsigned int)oplocklevel, fsp->fnum )); - /* - * Make sure we have granted an exclusive or batch oplock on this file. - */ + /* + * Make sure we have granted an exclusive or batch oplock on this file. + */ if(!EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) { - DEBUG(0,("reply_lockingX: Error : oplock break from client for fnum = %d and \ + DEBUG(0,("reply_lockingX: Error : oplock break from client for fnum = %d and \ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name)); - /* if this is a pure oplock break request then don't send a reply */ - if (num_locks == 0 && num_ulocks == 0) { - END_PROFILE(SMBlockingX); - return -1; - } else { - END_PROFILE(SMBlockingX); - return ERROR_DOS(ERRDOS,ERRlock); - } - } + /* if this is a pure oplock break request then don't send a reply */ + if (num_locks == 0 && num_ulocks == 0) { + END_PROFILE(SMBlockingX); + return -1; + } else { + END_PROFILE(SMBlockingX); + return ERROR_DOS(ERRDOS,ERRlock); + } + } - if (remove_oplock(fsp, break_to_none) == False) { - DEBUG(0,("reply_lockingX: error in removing oplock on file %s\n", - fsp->fsp_name )); - } + if (remove_oplock(fsp, break_to_none) == False) { + DEBUG(0,("reply_lockingX: error in removing oplock on file %s\n", + fsp->fsp_name )); + } - /* if this is a pure oplock break request then don't send a reply */ + /* if this is a pure oplock break request then don't send a reply */ if (num_locks == 0 && num_ulocks == 0) { - /* Sanity check - ensure a pure oplock break is not a - chained request. */ - if(CVAL(inbuf,smb_vwv0) != 0xff) - DEBUG(0,("reply_lockingX: Error : pure oplock break is a chained %d request !\n", - (unsigned int)CVAL(inbuf,smb_vwv0) )); - END_PROFILE(SMBlockingX); - return -1; - } - } + /* Sanity check - ensure a pure oplock break is not a + chained request. */ + if(CVAL(inbuf,smb_vwv0) != 0xff) + DEBUG(0,("reply_lockingX: Error : pure oplock break is a chained %d request !\n", + (unsigned int)CVAL(inbuf,smb_vwv0) )); + END_PROFILE(SMBlockingX); + return -1; + } + } - /* - * We do this check *after* we have checked this is not a oplock break - * response message. JRA. - */ + /* + * We do this check *after* we have checked this is not a oplock break + * response message. JRA. + */ - release_level_2_oplocks_on_change(fsp); + release_level_2_oplocks_on_change(fsp); - /* Data now points at the beginning of the list - of smb_unlkrng structs */ - for(i = 0; i < (int)num_ulocks; i++) { - lock_pid = get_lock_pid( data, i, large_file_format); - count = get_lock_count( data, i, large_file_format); - offset = get_lock_offset( data, i, large_file_format, &err); + /* Data now points at the beginning of the list + of smb_unlkrng structs */ + for(i = 0; i < (int)num_ulocks; i++) { + lock_pid = get_lock_pid( data, i, large_file_format); + count = get_lock_count( data, i, large_file_format); + offset = get_lock_offset( data, i, large_file_format, &err); - /* - * There is no error code marked "stupid client bug".... :-). - */ - if(err) { - END_PROFILE(SMBlockingX); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + /* + * There is no error code marked "stupid client bug".... :-). + */ + if(err) { + END_PROFILE(SMBlockingX); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } - DEBUG(10,("reply_lockingX: unlock start=%.0f, len=%.0f for pid %u, file %s\n", - (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name )); + DEBUG(10,("reply_lockingX: unlock start=%.0f, len=%.0f for pid %u, file %s\n", + (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name )); status = do_unlock(fsp,conn,lock_pid,count,offset); if (NT_STATUS_V(status)) { - END_PROFILE(SMBlockingX); + END_PROFILE(SMBlockingX); return ERROR_NT(status); - } - } + } + } - /* Setup the timeout in seconds. */ - lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000); + /* Setup the timeout in seconds. */ + lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000); - /* Now do any requested locks */ - data += ((large_file_format ? 20 : 10)*num_ulocks); + /* Now do any requested locks */ + data += ((large_file_format ? 20 : 10)*num_ulocks); - /* Data now points at the beginning of the list - of smb_lkrng structs */ + /* Data now points at the beginning of the list + of smb_lkrng structs */ - for(i = 0; i < (int)num_locks; i++) { - lock_pid = get_lock_pid( data, i, large_file_format); - count = get_lock_count( data, i, large_file_format); - offset = get_lock_offset( data, i, large_file_format, &err); + for(i = 0; i < (int)num_locks; i++) { + lock_pid = get_lock_pid( data, i, large_file_format); + count = get_lock_count( data, i, large_file_format); + offset = get_lock_offset( data, i, large_file_format, &err); - /* - * There is no error code marked "stupid client bug".... :-). - */ - if(err) { - END_PROFILE(SMBlockingX); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + /* + * There is no error code marked "stupid client bug".... :-). + */ + if(err) { + END_PROFILE(SMBlockingX); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } - DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s\n", - (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name )); + DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s\n", + (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name )); status = do_lock(fsp,conn,lock_pid, count,offset, - ((locktype & 1) ? READ_LOCK : WRITE_LOCK)); + ((locktype & 1) ? READ_LOCK : WRITE_LOCK)); if (NT_STATUS_V(status)) { if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn))) { - /* - * A blocking lock was requested. Package up - * this smb into a queued request and push it - * onto the blocking lock queue. - */ - if(push_blocking_lock_request(inbuf, length, lock_timeout, i)) { - END_PROFILE(SMBlockingX); - return -1; + /* + * A blocking lock was requested. Package up + * this smb into a queued request and push it + * onto the blocking lock queue. + */ + if(push_blocking_lock_request(inbuf, length, lock_timeout, i)) { + END_PROFILE(SMBlockingX); + return -1; + } + } + break; + } } - } - break; - } - } - /* If any of the above locks failed, then we must unlock - all of the previous locks (X/Open spec). */ - if(i != num_locks && num_locks != 0) { - /* - * Ensure we don't do a remove on the lock that just failed, - * as under POSIX rules, if we have a lock already there, we - * will delete it (and we shouldn't) ..... - */ - for(i--; i >= 0; i--) { - lock_pid = get_lock_pid( data, i, large_file_format); - count = get_lock_count( data, i, large_file_format); - offset = get_lock_offset( data, i, large_file_format, &err); + /* If any of the above locks failed, then we must unlock + all of the previous locks (X/Open spec). */ + if(i != num_locks && num_locks != 0) { + /* + * Ensure we don't do a remove on the lock that just failed, + * as under POSIX rules, if we have a lock already there, we + * will delete it (and we shouldn't) ..... + */ + for(i--; i >= 0; i--) { + lock_pid = get_lock_pid( data, i, large_file_format); + count = get_lock_count( data, i, large_file_format); + offset = get_lock_offset( data, i, large_file_format, &err); - /* - * There is no error code marked "stupid client bug".... :-). - */ - if(err) { - END_PROFILE(SMBlockingX); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + /* + * There is no error code marked "stupid client bug".... :-). + */ + if(err) { + END_PROFILE(SMBlockingX); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } do_unlock(fsp,conn,lock_pid,count,offset); - } - END_PROFILE(SMBlockingX); + } + END_PROFILE(SMBlockingX); return ERROR_NT(status); - } + } - set_message(outbuf,2,0,True); + set_message(outbuf,2,0,True); - DEBUG( 3, ( "lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n", - fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks ) ); + DEBUG( 3, ( "lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n", + fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks ) ); - END_PROFILE(SMBlockingX); - return chain_reply(inbuf,outbuf,length,bufsize); + END_PROFILE(SMBlockingX); + return chain_reply(inbuf,outbuf,length,bufsize); } /* Back from the dead for OS/2..... JRA. */ -- cgit From 3e616cf09cde59c5288c0c5856faec46d039eafe Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 11 Mar 2002 21:56:32 +0000 Subject: Implemented default ACL patch (set inherit acls = true on a per share basis). Based on code donated by Olaf Fr±czyk . Further commit will change to sending via vfs interface. Jeremy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/include/proto.h | 1 + source/smbd/open.c | 14 ++++++++++++-- source/smbd/posix_acls.c | 13 +++++++++++++ source/smbd/vfs-wrap.c | 38 +++++++++++++++++++++----------------- 4 files changed, 47 insertions(+), 19 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index c5f3e4120a1..c13ddd0908f 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4397,6 +4397,7 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc); BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd); int chmod_acl(const char *name, mode_t mode); int fchmod_acl(int fd, mode_t mode); +BOOL directory_has_default_acl(const char *fname); /*The following definitions come from smbd/process.c */ diff --git a/source/smbd/open.c b/source/smbd/open.c index ae2e89340a4..8b895bc4626 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -655,6 +655,7 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ BOOL delete_on_close = GET_DELETE_ON_CLOSE_FLAG(share_mode); BOOL file_existed = VALID_STAT(*psbuf); BOOL fcbopen = False; + BOOL def_acl = False; SMB_DEV_T dev = 0; SMB_INO_T inode = 0; int num_share_modes = 0; @@ -809,6 +810,14 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", */ } + /* + * Ensure we pay attention to default ACLs on directories if required. + */ + + if ((flags2 & O_CREAT) && lp_inherit_acls(SNUM(conn)) && + (def_acl = directory_has_default_acl(dos_to_unix(parent_dirname(fname),False)))) + mode = 0777; + DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n", flags,flags2,(int)mode)); @@ -959,10 +968,11 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", } /* - * Take care of inherited ACLs on created files. JRA. + * Take care of inherited ACLs on created files - if default ACL not + * selected. */ - if (!file_existed && (conn->vfs_ops.fchmod_acl != NULL)) { + if (!file_existed && !def_acl && (conn->vfs_ops.fchmod_acl != NULL)) { int saved_errno = errno; /* We might get ENOSYS in the next call.. */ if (conn->vfs_ops.fchmod_acl(fsp, fsp->fd, mode) == -1 && errno == ENOSYS) errno = saved_errno; /* Ignore ENOSYS */ diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 99c5760314b..e8a1820db9d 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -2294,3 +2294,16 @@ int fchmod_acl(int fd, mode_t mode) sys_acl_free_acl(posix_acl); return ret; } + +BOOL directory_has_default_acl(const char *fname) +{ + SMB_ACL_T dir_acl = sys_acl_get_file( fname, SMB_ACL_TYPE_DEFAULT); + BOOL has_acl = False; + SMB_ACL_ENTRY_T entry; + + if (dir_acl != NULL && (sys_acl_get_entry(dir_acl, SMB_ACL_FIRST_ENTRY, &entry) == 1)) + has_acl = True; + + sys_acl_free_acl(dir_acl); + return has_acl; +} diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 1c1edebf503..9d1c5380fbf 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -95,19 +95,23 @@ struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp) int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode) { - int result; + int result; + BOOL has_dacl = False; - START_PROFILE(syscall_mkdir); + START_PROFILE(syscall_mkdir); #ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_mkdir()\n"); - } + if (path == NULL) { + smb_panic("NULL pointer passed to vfswrap_mkdir()\n"); + } #endif - result = mkdir(path, mode); + if (lp_inherit_acls(SNUM(conn)) && (has_dacl = directory_has_default_acl(parent_dirname(path)))) + mode = 0777; + + result = mkdir(path, mode); - if (result == 0) { + if (result == 0 && !has_dacl) { /* * We need to do this as the default behavior of POSIX ACLs * is to set the mask to be the requested group permission @@ -122,8 +126,8 @@ int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode) } } - END_PROFILE(syscall_mkdir); - return result; + END_PROFILE(syscall_mkdir); + return result; } int vfswrap_rmdir(connection_struct *conn, char *path) @@ -164,19 +168,19 @@ int vfswrap_closedir(connection_struct *conn, DIR *dirp) int vfswrap_open(connection_struct *conn, char *fname, int flags, mode_t mode) { - int result; + int result; - START_PROFILE(syscall_open); + START_PROFILE(syscall_open); #ifdef VFS_CHECK_NULL - if (fname == NULL) { - smb_panic("NULL pointer passed to vfswrap_open()\n"); - } + if (fname == NULL) { + smb_panic("NULL pointer passed to vfswrap_open()\n"); + } #endif - result = sys_open(fname, flags, mode); - END_PROFILE(syscall_open); - return result; + result = sys_open(fname, flags, mode); + END_PROFILE(syscall_open); + return result; } int vfswrap_close(files_struct *fsp, int fd) -- cgit From 8098b5d2fd75514664547e22a06bd5fc1aea357d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 11 Mar 2002 23:50:56 +0000 Subject: Added POSIX ACL layer into the vfs. Jeremy. --- source/include/proto.h | 28 ++++++++-- source/include/smb.h | 2 +- source/include/vfs.h | 27 +++++++++- source/smbd/open.c | 2 +- source/smbd/posix_acls.c | 130 ++++++++++++++++++++++++----------------------- source/smbd/vfs-wrap.c | 116 ++++++++++++++++++++++++++++++++++++++++-- source/smbd/vfs.c | 92 ++++++++++++++++++++++++++++++++- 7 files changed, 323 insertions(+), 74 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index c13ddd0908f..63f1a9b6ab4 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4395,9 +4395,9 @@ int reply_pipe_close(connection_struct *conn, char *inbuf,char *outbuf); size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc); BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd); -int chmod_acl(const char *name, mode_t mode); -int fchmod_acl(int fd, mode_t mode); -BOOL directory_has_default_acl(const char *fname); +int chmod_acl(connection_struct *conn, const char *name, mode_t mode); +int fchmod_acl(files_struct *fsp, int fd, mode_t mode); +BOOL directory_has_default_acl(connection_struct *conn, const char *fname); /*The following definitions come from smbd/process.c */ @@ -4628,6 +4628,28 @@ BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, S BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent, SEC_DESC *psd); int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); +int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int vfswrap_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void * vfswrap_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T vfswrap_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T vfswrap_sys_acl_get_fd(struct files_struct *fsp, int fd); +int vfswrap_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset); +int vfswrap_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char * vfswrap_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T vfswrap_sys_acl_init(struct connection_struct *conn, int count); +int vfswrap_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int vfswrap_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int vfswrap_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual); +int vfswrap_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int vfswrap_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl ); +int vfswrap_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int vfswrap_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl); +int vfswrap_sys_acl_delete_def_file(struct connection_struct *conn, const char *path); +int vfswrap_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); +int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); +int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); /*The following definitions come from smbwrapper/realcalls.c */ diff --git a/source/include/smb.h b/source/include/smb.h index cf5efe2c7a1..28e58970014 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -438,6 +438,7 @@ typedef struct /* Include VFS stuff */ +#include "smb_acls.h" #include "vfs.h" typedef struct connection_struct @@ -1649,6 +1650,5 @@ struct unix_error_map { #define SAFE_NETBIOS_CHARS ". -_" #include "nsswitch/winbindd_nss.h" -#include "smb_acls.h" #endif /* _SMB_H */ diff --git a/source/include/vfs.h b/source/include/vfs.h index ee4bdea6022..71c70e0e622 100644 --- a/source/include/vfs.h +++ b/source/include/vfs.h @@ -40,7 +40,8 @@ */ /* Changed to version 2 for CIFS UNIX extensions (mknod and link added). JRA. */ -#define SMB_VFS_INTERFACE_VERSION 2 +/* Changed to version 3 for POSIX acl extensions. JRA. */ +#define SMB_VFS_INTERFACE_VERSION 3 /* VFS operations structure */ @@ -104,7 +105,29 @@ struct vfs_ops { int (*chmod_acl)(struct connection_struct *conn, char *name, mode_t mode); int (*fchmod_acl)(struct files_struct *fsp, int fd, mode_t mode); - + + int (*sys_acl_get_entry)(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); + int (*sys_acl_get_tag_type)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); + int (*sys_acl_get_permset)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); + void * (*sys_acl_get_qualifier)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d); + SMB_ACL_T (*sys_acl_get_file)(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type); + SMB_ACL_T (*sys_acl_get_fd)(struct files_struct *fsp, int fd); + int (*sys_acl_clear_perms)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset); + int (*sys_acl_add_perm)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); + char * (*sys_acl_to_text)(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen); + SMB_ACL_T (*sys_acl_init)(struct connection_struct *conn, int count); + int (*sys_acl_create_entry)(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); + int (*sys_acl_set_tag_type)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); + int (*sys_acl_set_qualifier)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual); + int (*sys_acl_set_permset)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); + int (*sys_acl_valid)(struct connection_struct *conn, SMB_ACL_T theacl ); + int (*sys_acl_set_file)(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); + int (*sys_acl_set_fd)(struct files_struct *fsp, int fd, SMB_ACL_T theacl); + int (*sys_acl_delete_def_file)(struct connection_struct *conn, const char *path); + int (*sys_acl_get_perm)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); + int (*sys_acl_free_text)(struct connection_struct *conn, char *text); + int (*sys_acl_free_acl)(struct connection_struct *conn, SMB_ACL_T posix_acl); + int (*sys_acl_free_qualifier)(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); }; struct vfs_options { diff --git a/source/smbd/open.c b/source/smbd/open.c index 8b895bc4626..f264d8f622a 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -815,7 +815,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", */ if ((flags2 & O_CREAT) && lp_inherit_acls(SNUM(conn)) && - (def_acl = directory_has_default_acl(dos_to_unix(parent_dirname(fname),False)))) + (def_acl = directory_has_default_acl(conn, dos_to_unix(parent_dirname(fname),False)))) mode = 0777; DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n", diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index e8a1820db9d..6d072dd753d 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -154,13 +154,13 @@ static void print_canon_ace_list(const char *name, canon_ace *ace_list) Map POSIX ACL perms to canon_ace permissions (a mode_t containing only S_(R|W|X)USR bits). ****************************************************************************/ -static mode_t convert_permset_to_mode_t(SMB_ACL_PERMSET_T permset) +static mode_t convert_permset_to_mode_t(connection_struct *conn, SMB_ACL_PERMSET_T permset) { mode_t ret = 0; - ret |= (sys_acl_get_perm(permset, SMB_ACL_READ) ? S_IRUSR : 0); - ret |= (sys_acl_get_perm(permset, SMB_ACL_WRITE) ? S_IWUSR : 0); - ret |= (sys_acl_get_perm(permset, SMB_ACL_EXECUTE) ? S_IXUSR : 0); + ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_READ) ? S_IRUSR : 0); + ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_WRITE) ? S_IWUSR : 0); + ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_EXECUTE) ? S_IXUSR : 0); return ret; } @@ -188,20 +188,20 @@ static mode_t unix_perms_to_acl_perms(mode_t mode, int r_mask, int w_mask, int x an SMB_ACL_PERMSET_T. ****************************************************************************/ -static int map_acl_perms_to_permset(mode_t mode, SMB_ACL_PERMSET_T *p_permset) +static int map_acl_perms_to_permset(connection_struct *conn, mode_t mode, SMB_ACL_PERMSET_T *p_permset) { - if (sys_acl_clear_perms(*p_permset) == -1) + if (conn->vfs_ops.sys_acl_clear_perms(conn, *p_permset) == -1) return -1; if (mode & S_IRUSR) { - if (sys_acl_add_perm(*p_permset, SMB_ACL_READ) == -1) + if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_READ) == -1) return -1; } if (mode & S_IWUSR) { - if (sys_acl_add_perm(*p_permset, SMB_ACL_WRITE) == -1) + if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_WRITE) == -1) return -1; } if (mode & S_IXUSR) { - if (sys_acl_add_perm(*p_permset, SMB_ACL_EXECUTE) == -1) + if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_EXECUTE) == -1) return -1; } return 0; @@ -1425,6 +1425,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ DOM_SID *powner, DOM_SID *pgroup) { extern DOM_SID global_sid_World; + connection_struct *conn = fsp->conn; mode_t acl_mask = (S_IRUSR|S_IWUSR|S_IXUSR); canon_ace *list_head = NULL; canon_ace *ace = NULL; @@ -1433,7 +1434,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ SMB_ACL_ENTRY_T entry; size_t ace_count; - while ( posix_acl && (sys_acl_get_entry(posix_acl, entry_id, &entry) == 1)) { + while ( posix_acl && (conn->vfs_ops.sys_acl_get_entry(conn, posix_acl, entry_id, &entry) == 1)) { SMB_ACL_TAG_T tagtype; SMB_ACL_PERMSET_T permset; DOM_SID sid; @@ -1445,10 +1446,10 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ entry_id = SMB_ACL_NEXT_ENTRY; /* Is this a MASK entry ? */ - if (sys_acl_get_tag_type(entry, &tagtype) == -1) + if (conn->vfs_ops.sys_acl_get_tag_type(conn, entry, &tagtype) == -1) continue; - if (sys_acl_get_permset(entry, &permset) == -1) + if (conn->vfs_ops.sys_acl_get_permset(conn, entry, &permset) == -1) continue; /* Decide which SID to use based on the ACL type. */ @@ -1461,7 +1462,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ break; case SMB_ACL_USER: { - uid_t *puid = (uid_t *)sys_acl_get_qualifier(entry); + uid_t *puid = (uid_t *)conn->vfs_ops.sys_acl_get_qualifier(conn, entry); if (puid == NULL) { DEBUG(0,("canonicalise_acl: Failed to get uid.\n")); continue; @@ -1469,7 +1470,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ uid_to_sid( &sid, *puid); unix_ug.uid = *puid; owner_type = UID_ACE; - sys_acl_free_qualifier((void *)puid,tagtype); + conn->vfs_ops.sys_acl_free_qualifier(conn, (void *)puid,tagtype); break; } case SMB_ACL_GROUP_OBJ: @@ -1480,7 +1481,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ break; case SMB_ACL_GROUP: { - gid_t *pgid = (gid_t *)sys_acl_get_qualifier(entry); + gid_t *pgid = (gid_t *)conn->vfs_ops.sys_acl_get_qualifier(conn, entry); if (pgid == NULL) { DEBUG(0,("canonicalise_acl: Failed to get gid.\n")); continue; @@ -1488,11 +1489,11 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ gid_to_sid( &sid, *pgid); unix_ug.gid = *pgid; owner_type = GID_ACE; - sys_acl_free_qualifier((void *)pgid,tagtype); + conn->vfs_ops.sys_acl_free_qualifier(conn, (void *)pgid,tagtype); break; } case SMB_ACL_MASK: - acl_mask = convert_permset_to_mode_t(permset); + acl_mask = convert_permset_to_mode_t(conn, permset); continue; /* Don't count the mask as an entry. */ case SMB_ACL_OTHER: /* Use the Everyone SID */ @@ -1514,7 +1515,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ ZERO_STRUCTP(ace); ace->type = tagtype; - ace->perms = convert_permset_to_mode_t(permset); + ace->perms = convert_permset_to_mode_t(conn, permset); ace->attr = ALLOW_ACE; ace->trustee = sid; ace->unix_ug = unix_ug; @@ -1571,8 +1572,9 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL default_ace, BOOL *pacl_set_support) { + connection_struct *conn = fsp->conn; BOOL ret = False; - SMB_ACL_T the_acl = sys_acl_init((int)count_canon_ace_list(the_ace) + 1); + SMB_ACL_T the_acl = conn->vfs_ops.sys_acl_init(conn, (int)count_canon_ace_list(the_ace) + 1); canon_ace *p_ace; int i; SMB_ACL_ENTRY_T mask_entry; @@ -1601,7 +1603,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * Get the entry for this ACE. */ - if (sys_acl_create_entry( &the_acl, &the_entry) == -1) { + if (conn->vfs_ops.sys_acl_create_entry(conn, &the_acl, &the_entry) == -1) { DEBUG(0,("set_canon_ace_list: Failed to create entry %d. (%s)\n", i, strerror(errno) )); goto done; @@ -1622,7 +1624,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * First tell the entry what type of ACE this is. */ - if (sys_acl_set_tag_type(the_entry, p_ace->type) == -1) { + if (conn->vfs_ops.sys_acl_set_tag_type(conn, the_entry, p_ace->type) == -1) { DEBUG(0,("set_canon_ace_list: Failed to set tag type on entry %d. (%s)\n", i, strerror(errno) )); goto done; @@ -1634,7 +1636,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau */ if ((p_ace->type == SMB_ACL_USER) || (p_ace->type == SMB_ACL_GROUP)) { - if (sys_acl_set_qualifier(the_entry,(void *)&p_ace->unix_ug.uid) == -1) { + if (conn->vfs_ops.sys_acl_set_qualifier(conn, the_entry,(void *)&p_ace->unix_ug.uid) == -1) { DEBUG(0,("set_canon_ace_list: Failed to set qualifier on entry %d. (%s)\n", i, strerror(errno) )); goto done; @@ -1645,13 +1647,13 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * Convert the mode_t perms in the canon_ace to a POSIX permset. */ - if (sys_acl_get_permset(the_entry, &the_permset) == -1) { + if (conn->vfs_ops.sys_acl_get_permset(conn, the_entry, &the_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to get permset on entry %d. (%s)\n", i, strerror(errno) )); goto done; } - if (map_acl_perms_to_permset(p_ace->perms, &the_permset) == -1) { + if (map_acl_perms_to_permset(conn, p_ace->perms, &the_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to create permset for mode (%u) on entry %d. (%s)\n", (unsigned int)p_ace->perms, i, strerror(errno) )); goto done; @@ -1661,7 +1663,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * ..and apply them to the entry. */ - if (sys_acl_set_permset(the_entry, the_permset) == -1) { + if (conn->vfs_ops.sys_acl_set_permset(conn, the_entry, the_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to add permset on entry %d. (%s)\n", i, strerror(errno) )); goto done; @@ -1675,27 +1677,27 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * Add in a mask of rwx. */ - if (sys_acl_create_entry( &the_acl, &mask_entry) == -1) { + if (conn->vfs_ops.sys_acl_create_entry( conn, &the_acl, &mask_entry) == -1) { DEBUG(0,("set_canon_ace_list: Failed to create mask entry. (%s)\n", strerror(errno) )); goto done; } - if (sys_acl_set_tag_type(mask_entry, SMB_ACL_MASK) == -1) { + if (conn->vfs_ops.sys_acl_set_tag_type(conn, mask_entry, SMB_ACL_MASK) == -1) { DEBUG(0,("set_canon_ace_list: Failed to set tag type on mask entry. (%s)\n",strerror(errno) )); goto done; } - if (sys_acl_get_permset(mask_entry, &mask_permset) == -1) { + if (conn->vfs_ops.sys_acl_get_permset(conn, mask_entry, &mask_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to get mask permset. (%s)\n", strerror(errno) )); goto done; } - if (map_acl_perms_to_permset(S_IRUSR|S_IWUSR|S_IXUSR, &mask_permset) == -1) { + if (map_acl_perms_to_permset(conn, S_IRUSR|S_IWUSR|S_IXUSR, &mask_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to create mask permset. (%s)\n", strerror(errno) )); goto done; } - if (sys_acl_set_permset(mask_entry, mask_permset) == -1) { + if (conn->vfs_ops.sys_acl_set_permset(conn, mask_entry, mask_permset) == -1) { DEBUG(0,("set_canon_ace_list: Failed to add mask permset. (%s)\n", strerror(errno) )); goto done; } @@ -1704,7 +1706,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau * Check if the ACL is valid. */ - if (sys_acl_valid(the_acl) == -1) { + if (conn->vfs_ops.sys_acl_valid(conn, the_acl) == -1) { DEBUG(0,("set_canon_ace_list: ACL type (%s) is invalid for set (%s).\n", the_acl_type == SMB_ACL_TYPE_DEFAULT ? "directory default" : "file", strerror(errno) )); @@ -1716,27 +1718,27 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau */ if(default_ace || fsp->is_directory || fsp->fd == -1) { - if (sys_acl_set_file(dos_to_unix(fsp->fsp_name,False), the_acl_type, the_acl) == -1) { + if (conn->vfs_ops.sys_acl_set_file(conn, dos_to_unix(fsp->fsp_name,False), the_acl_type, the_acl) == -1) { /* * Some systems allow all the above calls and only fail with no ACL support * when attempting to apply the acl. HPUX with HFS is an example of this. JRA. */ if (errno == ENOSYS) *pacl_set_support = False; - DEBUG(2,("set_canon_ace_list: sys_acl_set_file type %s failed for file %s (%s).\n", + DEBUG(2,("set_canon_ace_list: conn->vfs_ops.sys_acl_set_file type %s failed for file %s (%s).\n", the_acl_type == SMB_ACL_TYPE_DEFAULT ? "directory default" : "file", fsp->fsp_name, strerror(errno) )); goto done; } } else { - if (sys_acl_set_fd(fsp->fd, the_acl) == -1) { + if (conn->vfs_ops.sys_acl_set_fd(fsp, fsp->fd, the_acl) == -1) { /* * Some systems allow all the above calls and only fail with no ACL support * when attempting to apply the acl. HPUX with HFS is an example of this. JRA. */ if (errno == ENOSYS) *pacl_set_support = False; - DEBUG(2,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n", + DEBUG(2,("set_canon_ace_list: conn->vfs_ops.sys_acl_set_file failed for file %s (%s).\n", fsp->fsp_name, strerror(errno) )); goto done; } @@ -1747,7 +1749,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau done: if (the_acl != NULL) - sys_acl_free_acl(the_acl); + conn->vfs_ops.sys_acl_free_acl(conn, the_acl); return ret; } @@ -1846,6 +1848,7 @@ static int nt_ace_comp( SEC_ACE *a1, SEC_ACE *a2) size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) { + connection_struct *conn = fsp->conn; SMB_STRUCT_STAT sbuf; SEC_ACE *nt_ace_list = NULL; DOM_SID owner_sid; @@ -1874,14 +1877,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) * Get the ACL from the path. */ - posix_acl = sys_acl_get_file( dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_ACCESS); + posix_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_ACCESS); /* * If it's a directory get the default POSIX ACL. */ if(fsp->is_directory) - dir_acl = sys_acl_get_file( dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_DEFAULT); + dir_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_DEFAULT); } else { @@ -1892,7 +1895,7 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) /* * Get the ACL from the fd. */ - posix_acl = sys_acl_get_fd(fsp->fd); + posix_acl = conn->vfs_ops.sys_acl_get_fd(fsp, fsp->fd); } DEBUG(5,("get_nt_acl : file ACL %s, directory ACL %s\n", @@ -1983,9 +1986,9 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) done: if (posix_acl) - sys_acl_free_acl(posix_acl); + conn->vfs_ops.sys_acl_free_acl(conn, posix_acl); if (dir_acl) - sys_acl_free_acl(dir_acl); + conn->vfs_ops.sys_acl_free_acl(conn, dir_acl); free_canon_ace_list(file_ace); free_canon_ace_list(dir_ace); SAFE_FREE(nt_ace_list); @@ -2138,8 +2141,8 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) * No default ACL - delete one if it exists. */ - if (sys_acl_delete_def_file(dos_to_unix(fsp->fsp_name,False)) == -1) { - DEBUG(3,("set_nt_acl: sys_acl_delete_def_file failed (%s)\n", strerror(errno))); + if (conn->vfs_ops.sys_acl_delete_def_file(conn, dos_to_unix(fsp->fsp_name,False)) == -1) { + DEBUG(3,("set_nt_acl: conn->vfs_ops.sys_acl_delete_def_file failed (%s)\n", strerror(errno))); free_canon_ace_list(file_ace_list); return False; } @@ -2188,13 +2191,13 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) and set the mask to rwx. Needed to preserve complex ACLs set by NT. ****************************************************************************/ -static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode) +static int chmod_acl_internals( connection_struct *conn, SMB_ACL_T posix_acl, mode_t mode) { int entry_id = SMB_ACL_FIRST_ENTRY; SMB_ACL_ENTRY_T entry; int num_entries = 0; - while ( sys_acl_get_entry(posix_acl, entry_id, &entry) == 1) { + while ( conn->vfs_ops.sys_acl_get_entry(conn, posix_acl, entry_id, &entry) == 1) { SMB_ACL_TAG_T tagtype; SMB_ACL_PERMSET_T permset; mode_t perms; @@ -2203,10 +2206,10 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode) if (entry_id == SMB_ACL_FIRST_ENTRY) entry_id = SMB_ACL_NEXT_ENTRY; - if (sys_acl_get_tag_type(entry, &tagtype) == -1) + if (conn->vfs_ops.sys_acl_get_tag_type(conn, entry, &tagtype) == -1) return -1; - if (sys_acl_get_permset(entry, &permset) == -1) + if (conn->vfs_ops.sys_acl_get_permset(conn, entry, &permset) == -1) return -1; num_entries++; @@ -2228,10 +2231,10 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode) continue; } - if (map_acl_perms_to_permset(perms, &permset) == -1) + if (map_acl_perms_to_permset(conn, perms, &permset) == -1) return -1; - if (sys_acl_set_permset(entry, permset) == -1) + if (conn->vfs_ops.sys_acl_set_permset(conn, entry, permset) == -1) return -1; } @@ -2252,22 +2255,22 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode) Note that name is in UNIX character set. ****************************************************************************/ -int chmod_acl(const char *name, mode_t mode) +int chmod_acl(connection_struct *conn, const char *name, mode_t mode) { SMB_ACL_T posix_acl = NULL; int ret = -1; - if ((posix_acl = sys_acl_get_file(name, SMB_ACL_TYPE_ACCESS)) == NULL) + if ((posix_acl = conn->vfs_ops.sys_acl_get_file(conn, name, SMB_ACL_TYPE_ACCESS)) == NULL) return -1; - if ((ret = chmod_acl_internals(posix_acl, mode)) == -1) + if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1) goto done; - ret = sys_acl_set_file(name, SMB_ACL_TYPE_ACCESS, posix_acl); + ret = conn->vfs_ops.sys_acl_set_file(conn, name, SMB_ACL_TYPE_ACCESS, posix_acl); done: - sys_acl_free_acl(posix_acl); + conn->vfs_ops.sys_acl_free_acl(conn, posix_acl); return ret; } @@ -2276,34 +2279,35 @@ int chmod_acl(const char *name, mode_t mode) and set the mask to rwx. Needed to preserve complex ACLs set by NT. ****************************************************************************/ -int fchmod_acl(int fd, mode_t mode) +int fchmod_acl(files_struct *fsp, int fd, mode_t mode) { + connection_struct *conn = fsp->conn; SMB_ACL_T posix_acl = NULL; int ret = -1; - if ((posix_acl = sys_acl_get_fd(fd)) == NULL) + if ((posix_acl = conn->vfs_ops.sys_acl_get_fd(fsp, fd)) == NULL) return -1; - if ((ret = chmod_acl_internals(posix_acl, mode)) == -1) + if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1) goto done; - ret = sys_acl_set_fd(fd, posix_acl); + ret = conn->vfs_ops.sys_acl_set_fd(fsp, fd, posix_acl); done: - sys_acl_free_acl(posix_acl); + conn->vfs_ops.sys_acl_free_acl(conn, posix_acl); return ret; } -BOOL directory_has_default_acl(const char *fname) +BOOL directory_has_default_acl(connection_struct *conn, const char *fname) { - SMB_ACL_T dir_acl = sys_acl_get_file( fname, SMB_ACL_TYPE_DEFAULT); + SMB_ACL_T dir_acl = conn->vfs_ops.sys_acl_get_file( conn, fname, SMB_ACL_TYPE_DEFAULT); BOOL has_acl = False; SMB_ACL_ENTRY_T entry; - if (dir_acl != NULL && (sys_acl_get_entry(dir_acl, SMB_ACL_FIRST_ENTRY, &entry) == 1)) + if (dir_acl != NULL && (conn->vfs_ops.sys_acl_get_entry(conn, dir_acl, SMB_ACL_FIRST_ENTRY, &entry) == 1)) has_acl = True; - sys_acl_free_acl(dir_acl); + conn->vfs_ops.sys_acl_free_acl(conn, dir_acl); return has_acl; } diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 9d1c5380fbf..c2345f4a503 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -106,7 +106,7 @@ int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode) } #endif - if (lp_inherit_acls(SNUM(conn)) && (has_dacl = directory_has_default_acl(parent_dirname(path)))) + if (lp_inherit_acls(SNUM(conn)) && (has_dacl = directory_has_default_acl(conn, parent_dirname(path)))) mode = 0777; result = mkdir(path, mode); @@ -841,7 +841,7 @@ int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode) int result; START_PROFILE(chmod_acl); - result = chmod_acl(name, mode); + result = chmod_acl(conn, name, mode); END_PROFILE(chmod_acl); return result; } @@ -851,7 +851,117 @@ int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode) int result; START_PROFILE(fchmod_acl); - result = fchmod_acl(fd, mode); + result = fchmod_acl(fsp, fd, mode); END_PROFILE(fchmod_acl); return result; } + +int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p) +{ + return sys_acl_get_entry(theacl, entry_id, entry_p); +} + +int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p) +{ + return sys_acl_get_tag_type(entry_d, tag_type_p); +} + +int vfswrap_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p) +{ + return sys_acl_get_permset(entry_d, permset_p); +} + +void * vfswrap_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d) +{ + return sys_acl_get_qualifier(entry_d); +} + +SMB_ACL_T vfswrap_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type) +{ + return sys_acl_get_file(path_p, type); +} + +SMB_ACL_T vfswrap_sys_acl_get_fd(struct files_struct *fsp, int fd) +{ + return sys_acl_get_fd(fd); +} + +int vfswrap_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset) +{ + return sys_acl_clear_perms(permset); +} + +int vfswrap_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return sys_acl_add_perm(permset, perm); +} + +char * vfswrap_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen) +{ + return sys_acl_to_text(theacl, plen); +} + +SMB_ACL_T vfswrap_sys_acl_init(struct connection_struct *conn, int count) +{ + return sys_acl_init(count); +} + +int vfswrap_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry) +{ + return sys_acl_create_entry(pacl, pentry); +} + +int vfswrap_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype) +{ + return sys_acl_set_tag_type(entry, tagtype); +} + +int vfswrap_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual) +{ + return sys_acl_set_qualifier(entry, qual); +} + +int vfswrap_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset) +{ + return sys_acl_set_permset(entry, permset); +} + +int vfswrap_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl ) +{ + return sys_acl_valid(theacl ); +} + +int vfswrap_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +{ + return sys_acl_set_file(name, acltype, theacl); +} + +int vfswrap_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl) +{ + return sys_acl_set_fd(fd, theacl); +} + +int vfswrap_sys_acl_delete_def_file(struct connection_struct *conn, const char *path) +{ + return sys_acl_delete_def_file(path); +} + +int vfswrap_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return sys_acl_get_perm(permset, perm); +} + +int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text) +{ + return sys_acl_free_text(text); +} + +int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl) +{ + return sys_acl_free_acl(posix_acl); +} + +int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype) +{ + return sys_acl_free_qualifier(qualifier, tagtype); +} diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 229880c9f15..9de8c12d69c 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -81,13 +81,36 @@ struct vfs_ops default_vfs_ops = { vfswrap_fset_nt_acl, vfswrap_set_nt_acl, + /* POSIX ACL operations. */ #if defined(HAVE_NO_ACLS) NULL, - NULL + NULL, #else vfswrap_chmod_acl, vfswrap_fchmod_acl #endif + vfswrap_sys_acl_get_entry, + vfswrap_sys_acl_get_tag_type, + vfswrap_sys_acl_get_permset, + vfswrap_sys_acl_get_qualifier, + vfswrap_sys_acl_get_file, + vfswrap_sys_acl_get_fd, + vfswrap_sys_acl_clear_perms, + vfswrap_sys_acl_add_perm, + vfswrap_sys_acl_to_text, + vfswrap_sys_acl_init, + vfswrap_sys_acl_create_entry, + vfswrap_sys_acl_set_tag_type, + vfswrap_sys_acl_set_qualifier, + vfswrap_sys_acl_set_permset, + vfswrap_sys_acl_valid, + vfswrap_sys_acl_set_file, + vfswrap_sys_acl_set_fd, + vfswrap_sys_acl_delete_def_file, + vfswrap_sys_acl_get_perm, + vfswrap_sys_acl_free_text, + vfswrap_sys_acl_free_acl, + vfswrap_sys_acl_free_qualifier }; /**************************************************************************** @@ -259,12 +282,79 @@ static BOOL vfs_init_custom(connection_struct *conn) if (conn->vfs_ops.set_nt_acl == NULL) conn->vfs_ops.set_nt_acl = default_vfs_ops.set_nt_acl; + /* POSIX ACL entries. */ if (conn->vfs_ops.chmod_acl == NULL) conn->vfs_ops.chmod_acl = default_vfs_ops.chmod_acl; if (conn->vfs_ops.fchmod_acl == NULL) conn->vfs_ops.fchmod_acl = default_vfs_ops.fchmod_acl; + if (conn->vfs_ops.sys_acl_get_entry == NULL) + conn->vfs_ops.sys_acl_get_entry = default_vfs_ops.sys_acl_get_entry; + + if (conn->vfs_ops.sys_acl_get_tag_type == NULL) + conn->vfs_ops.sys_acl_get_tag_type = default_vfs_ops.sys_acl_get_tag_type; + + if (conn->vfs_ops.sys_acl_get_permset == NULL) + conn->vfs_ops.sys_acl_get_permset = default_vfs_ops.sys_acl_get_permset; + + if (conn->vfs_ops.sys_acl_get_qualifier == NULL) + conn->vfs_ops.sys_acl_get_qualifier = default_vfs_ops.sys_acl_get_qualifier; + + if (conn->vfs_ops.sys_acl_get_file == NULL) + conn->vfs_ops.sys_acl_get_file = default_vfs_ops.sys_acl_get_file; + + if (conn->vfs_ops.sys_acl_get_fd == NULL) + conn->vfs_ops.sys_acl_get_fd = default_vfs_ops.sys_acl_get_fd; + + if (conn->vfs_ops.sys_acl_clear_perms == NULL) + conn->vfs_ops.sys_acl_clear_perms = default_vfs_ops.sys_acl_clear_perms; + + if (conn->vfs_ops.sys_acl_add_perm == NULL) + conn->vfs_ops.sys_acl_add_perm = default_vfs_ops.sys_acl_add_perm; + + if (conn->vfs_ops.sys_acl_to_text == NULL) + conn->vfs_ops.sys_acl_to_text = default_vfs_ops.sys_acl_to_text; + + if (conn->vfs_ops.sys_acl_init == NULL) + conn->vfs_ops.sys_acl_init = default_vfs_ops.sys_acl_init; + + if (conn->vfs_ops.sys_acl_create_entry == NULL) + conn->vfs_ops.sys_acl_create_entry = default_vfs_ops.sys_acl_create_entry; + + if (conn->vfs_ops.sys_acl_set_tag_type == NULL) + conn->vfs_ops.sys_acl_set_tag_type = default_vfs_ops.sys_acl_set_tag_type; + + if (conn->vfs_ops.sys_acl_set_qualifier == NULL) + conn->vfs_ops.sys_acl_set_qualifier = default_vfs_ops.sys_acl_set_qualifier; + + if (conn->vfs_ops.sys_acl_set_permset == NULL) + conn->vfs_ops.sys_acl_set_permset = default_vfs_ops.sys_acl_set_permset; + + if (conn->vfs_ops.sys_acl_valid == NULL) + conn->vfs_ops.sys_acl_valid = default_vfs_ops.sys_acl_valid; + + if (conn->vfs_ops.sys_acl_set_file == NULL) + conn->vfs_ops.sys_acl_set_file = default_vfs_ops.sys_acl_set_file; + + if (conn->vfs_ops.sys_acl_set_fd == NULL) + conn->vfs_ops.sys_acl_set_fd = default_vfs_ops.sys_acl_set_fd; + + if (conn->vfs_ops.sys_acl_delete_def_file == NULL) + conn->vfs_ops.sys_acl_delete_def_file = default_vfs_ops.sys_acl_delete_def_file; + + if (conn->vfs_ops.sys_acl_get_perm == NULL) + conn->vfs_ops.sys_acl_get_perm = default_vfs_ops.sys_acl_get_perm; + + if (conn->vfs_ops.sys_acl_free_text == NULL) + conn->vfs_ops.sys_acl_free_text = default_vfs_ops.sys_acl_free_text; + + if (conn->vfs_ops.sys_acl_free_acl == NULL) + conn->vfs_ops.sys_acl_free_acl = default_vfs_ops.sys_acl_free_acl; + + if (conn->vfs_ops.sys_acl_free_qualifier == NULL) + conn->vfs_ops.sys_acl_free_qualifier = default_vfs_ops.sys_acl_free_qualifier; + return True; } #endif -- cgit From 9deb403520d6265a38bcfc2c314b5f70ff2e5dc8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Mar 2002 02:39:16 +0000 Subject: Fix the returning of domain enum. Fix the generation of the MACHINE.SID file into the secrets.tdb. Jeremy. --- source/include/proto.h | 1 + source/lib/util_sid.c | 13 ++ source/passdb/machine_sid.c | 304 ++++++++++++++-------------------------- source/passdb/secrets.c | 3 + source/rpc_server/srv_samr_nt.c | 38 +++-- 5 files changed, 156 insertions(+), 203 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 63f1a9b6ab4..78bd32b7258 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1194,6 +1194,7 @@ BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *p BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); void split_domain_name(const char *fullname, char *domain, char *name); char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); BOOL sid_append_rid(DOM_SID *sid, uint32 rid); BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c index d9f7efe39b8..79f40bee13d 100644 --- a/source/lib/util_sid.c +++ b/source/lib/util_sid.c @@ -24,6 +24,9 @@ #include "includes.h" +/* NOTE! the global_sam_sid is the SID of our local SAM. This is only + equal to the domain SID when we are a DC, otherwise its our + workstation SID */ DOM_SID global_sam_sid; extern pstring global_myname; extern fstring global_myworkgroup; @@ -360,6 +363,16 @@ char *sid_to_string(fstring sidstr_out, DOM_SID *sid) return sidstr_out; } +/* + useful function for debug lines +*/ +const char *sid_string_static(DOM_SID *sid) +{ + static fstring sid_str; + sid_to_string(sid_str, sid); + return sid_str; +} + /***************************************************************** Convert a string to a SID. Returns True on success, False on fail. *****************************************************************/ diff --git a/source/passdb/machine_sid.c b/source/passdb/machine_sid.c index e374b0657d6..b276014f016 100644 --- a/source/passdb/machine_sid.c +++ b/source/passdb/machine_sid.c @@ -2,8 +2,8 @@ Unix SMB/Netbios implementation. Version 1.9. Password and authentication handling - Copyright (C) Jeremy Allison 1996-1998 - Copyright (C) Luke Kenneth Casson Leighton 1996-1998 + Copyright (C) Jeremy Allison 1996-2002 + Copyright (C) Andrew Tridgell 2002 Copyright (C) Gerald (Jerry) Carter 2000 This program is free software; you can redistribute it and/or modify @@ -27,29 +27,45 @@ Read the machine SID from a file. ****************************************************************************/ -static BOOL read_sid_from_file(int fd, char *sid_file) +static BOOL read_sid_from_file(char *fname, DOM_SID *sid) { - fstring fline; + char **lines; + int numlines; + BOOL ret; - memset(fline, '\0', sizeof(fline)); + lines = file_lines_load(fname, &numlines, False); - if(read(fd, fline, sizeof(fline) -1 ) < 0) { - DEBUG(0,("unable to read file %s. Error was %s\n", - sid_file, strerror(errno) )); - return False; - } + if (!lines || numlines < 1) { + if (lines) + file_lines_free(lines); + return False; + } - /* - * Convert to the machine SID. - */ + ret = string_to_sid(sid, lines[0]); + if (!ret) + DEBUG(0,("read_sid_from_file: Failed to convert machine SID. (%s)\n", lines[0])); + file_lines_free(lines); + return ret; +} - fline[sizeof(fline)-1] = '\0'; - if(!string_to_sid( &global_sam_sid, fline)) { - DEBUG(0,("unable to generate machine SID.\n")); - return False; - } +/**************************************************************************** + Generate a random sid - used to build our own sid if we don't have one. +****************************************************************************/ - return True; +static void generate_random_sid(DOM_SID *sid) +{ + int i; + unsigned char raw_sid_data[12]; + + memset((char *)sid, '\0', sizeof(*sid)); + sid->sid_rev_num = 1; + sid->id_auth[5] = 5; + sid->num_auths = 0; + sid->sub_auths[sid->num_auths++] = 21; + + generate_random_buffer(raw_sid_data, 12, True); + for (i = 0; i < 3; i++) + sid->sub_auths[sid->num_auths++] = IVAL(raw_sid_data, i*4); } /**************************************************************************** @@ -60,196 +76,94 @@ static BOOL read_sid_from_file(int fd, char *sid_file) BOOL pdb_generate_sam_sid(void) { - int fd; - pstring sid_file; - fstring sid_string; - SMB_STRUCT_STAT st; - BOOL overwrite_bad_sid = False; + char *fname = NULL; + extern pstring global_myname; + extern fstring global_myworkgroup; + BOOL is_dc = False; + pstring priv_dir; generate_wellknown_sids(); - get_private_directory(sid_file); - - if (!directory_exist(sid_file, NULL)) { - if (mkdir(sid_file, 0700) != 0) { - DEBUG(0,("can't create private directory %s : %s\n", - sid_file, strerror(errno))); - return False; - } + switch (lp_server_role()) { + case ROLE_DOMAIN_PDC: + case ROLE_DOMAIN_BDC: + is_dc = True; + break; + default: + is_dc = False; + break; } - pstrcat(sid_file, "/MACHINE.SID"); - - if((fd = sys_open(sid_file, O_RDWR | O_CREAT, 0644)) == -1) { - DEBUG(0,("unable to open or create file %s. Error was %s\n", - sid_file, strerror(errno) )); - return False; - } - - /* - * Check if the file contains data. - */ - - if(sys_fstat( fd, &st) < 0) { - DEBUG(0,("unable to stat file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); - return False; - } - - if(st.st_size > 0) { - /* - * We have a valid SID - read it. - */ - if(!read_sid_from_file( fd, sid_file)) { - DEBUG(0,("unable to read file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); - return False; + if (secrets_fetch_domain_sid(global_myname, &global_sam_sid)) { + DOM_SID domain_sid; + + /* We got our sid. If not a pdc/bdc, we're done. */ + if (!is_dc) + return True; + + if (!secrets_fetch_domain_sid(global_myworkgroup, &domain_sid)) { + + /* No domain sid and we're a pdc/bdc. Store it */ + + if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Can't store domain SID as a pdc/bdc.\n")); + return False; + } + return True; } - /* - * JRA. Reversed the sense of this test now that I have - * actually done this test *personally*. One more reason - * to never trust third party information you have not - * independently verified.... sigh. JRA. - */ - - if(global_sam_sid.num_auths > 0 && global_sam_sid.sub_auths[0] == 0x21) { - /* - * Fix and re-write... - */ - overwrite_bad_sid = True; - global_sam_sid.sub_auths[0] = 21; - DEBUG(5,("pdb_generate_sam_sid: Old (incorrect) sid id_auth of hex 21 \ -detected - re-writing to be decimal 21 instead.\n" )); - sid_to_string(sid_string, &global_sam_sid); - if(sys_lseek(fd, (SMB_OFF_T)0, SEEK_SET) != 0) { - DEBUG(0,("unable to seek file file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); + if (!sid_equal(&domain_sid, &global_sam_sid)) { + + /* Domain name sid doesn't match global sam sid. Re-store global sam sid as domain sid. */ + + DEBUG(0,("pdb_generate_sam_sid: Mismatched SIDs as a pdc/bdc.\n")); + if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Can't re-store domain SID as a pdc/bdc.\n")); return False; } - } else { - close(fd); return True; } - } else { - /* - * The file contains no data - we need to generate our - * own sid. - * Generate the new sid data & turn it into a string. - */ - int i; - uchar raw_sid_data[12]; - DOM_SID mysid; - - memset((char *)&mysid, '\0', sizeof(DOM_SID)); - mysid.sid_rev_num = 1; - mysid.id_auth[5] = 5; - mysid.num_auths = 0; - mysid.sub_auths[mysid.num_auths++] = 21; - - generate_random_buffer( raw_sid_data, 12, True); - for( i = 0; i < 3; i++) - mysid.sub_auths[mysid.num_auths++] = IVAL(raw_sid_data, i*4); - - sid_to_string(sid_string, &mysid); - } - - fstrcat(sid_string, "\n"); - - /* - * Ensure our new SID is valid. - */ - - if(!string_to_sid( &global_sam_sid, sid_string)) { - DEBUG(0,("unable to generate machine SID.\n")); - return False; - } - - /* - * Do an exclusive blocking lock on the file. - */ - - if(!do_file_lock( fd, 60, F_WRLCK)) { - DEBUG(0,("unable to lock file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); - return False; - } - - if(!overwrite_bad_sid) { - /* - * At this point we have a blocking lock on the SID - * file - check if in the meantime someone else wrote - * SID data into the file. If so - they were here first, - * use their data. - */ - - if(sys_fstat( fd, &st) < 0) { - DEBUG(0,("unable to stat file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); + + return True; + } + + /* check for an old MACHINE.SID file for backwards compatibility */ + get_private_directory(priv_dir); + asprintf(&fname, "%s/MACHINE.SID", priv_dir); + + if (read_sid_from_file(fname, &global_sam_sid)) { + /* remember it for future reference and unlink the old MACHINE.SID */ + if (!secrets_store_domain_sid(global_myname, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Failed to store SID from file.\n")); + SAFE_FREE(fname); return False; - } - - if(st.st_size > 0) { - /* - * Unlock as soon as possible to reduce - * contention on the exclusive lock. - */ - do_file_lock( fd, 60, F_UNLCK); - - /* - * We have a valid SID - read it. - */ - - if(!read_sid_from_file( fd, sid_file)) { - DEBUG(0,("unable to read file %s. Error was %s\n", - sid_file, strerror(errno) )); - close(fd); + } + unlink(fname); + if (is_dc) { + if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Failed to store domain SID from file.\n")); + SAFE_FREE(fname); return False; } - close(fd); - return True; - } + } } - - /* - * The file is still empty and we have an exlusive lock on it, - * or we're fixing an earlier mistake. - * Write out out SID data into the file. - */ - - /* - * Use chmod here as some (strange) UNIX's don't - * have fchmod. JRA. - */ - - if(chmod(sid_file, 0644) < 0) { - DEBUG(0,("unable to set correct permissions on file %s. \ -Error was %s\n", sid_file, strerror(errno) )); - do_file_lock( fd, 60, F_UNLCK); - close(fd); - return False; - } - - if(write( fd, sid_string, strlen(sid_string)) != strlen(sid_string)) { - DEBUG(0,("unable to write file %s. Error was %s\n", - sid_file, strerror(errno) )); - do_file_lock( fd, 60, F_UNLCK); - close(fd); - return False; - } - - /* - * Unlock & exit. - */ - - do_file_lock( fd, 60, F_UNLCK); - close(fd); - return True; -} + SAFE_FREE(fname); + + /* we don't have the SID in secrets.tdb, we will need to + generate one and save it */ + generate_random_sid(&global_sam_sid); + + if (!secrets_store_domain_sid(global_myname, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Failed to store generated machine SID.\n")); + return False; + } + if (is_dc) { + if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) { + DEBUG(0,("pdb_generate_sam_sid: Failed to store generated domain SID.\n")); + return False; + } + } + return True; +} diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c index ad29bb23b0f..c99d7ceb745 100644 --- a/source/passdb/secrets.c +++ b/source/passdb/secrets.c @@ -94,6 +94,7 @@ BOOL secrets_store_domain_sid(char *domain, DOM_SID *sid) fstring key; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain); + strupper(key); return secrets_store(key, sid, sizeof(DOM_SID)); } @@ -104,6 +105,7 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid) size_t size; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain); + strupper(key); dos_to_unix(key, True); /* Convert key to unix-codepage */ dyn_sid = (DOM_SID *)secrets_fetch(key, &size); @@ -136,6 +138,7 @@ char *trust_keystr(char *domain) slprintf(keystr,sizeof(keystr)-1,"%s/%s", SECRETS_MACHINE_ACCT_PASS, dos_domain); + strupper(keystr); return keystr; } diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index 2f1f6bce8c2..4e90ed25c75 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -2031,16 +2031,27 @@ NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u) { - r_u->status = NT_STATUS_OK; + fstring domain_name; + DOM_SID sid; + + r_u->status = NT_STATUS_OK; - if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL)) - return NT_STATUS_INVALID_HANDLE; + if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL)) + return NT_STATUS_INVALID_HANDLE; - /* assume the domain name sent is our global_myname and - send global_sam_sid */ - init_samr_r_lookup_domain(r_u, &global_sam_sid, r_u->status); + rpcstr_pull(domain_name, q_u->uni_domain.buffer, sizeof(domain_name), q_u->uni_domain.uni_str_len*2, 0); - return r_u->status; + ZERO_STRUCT(sid); + + if (!secrets_fetch_domain_sid(domain_name, &sid)) { + r_u->status = NT_STATUS_NO_SUCH_DOMAIN; + } + + DEBUG(2,("Returning domain sid for domain %s -> %s\n", domain_name, sid_string_static(&sid))); + + init_samr_r_lookup_domain(r_u, &sid, r_u->status); + + return r_u->status; } /****************************************************************** @@ -2089,10 +2100,21 @@ NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_EN { uint32 num_entries = 2; fstring dom[2]; + char *name; r_u->status = NT_STATUS_OK; - fstrcpy(dom[0],global_myworkgroup); + switch (lp_server_role()) { + case ROLE_DOMAIN_PDC: + case ROLE_DOMAIN_BDC: + name = global_myworkgroup; + break; + default: + name = global_myname; + } + + fstrcpy(dom[0],name); + strupper(dom[0]); fstrcpy(dom[1],"Builtin"); if (!make_enum_domains(p->mem_ctx, &r_u->sam, &r_u->uni_dom_name, num_entries, dom)) -- cgit From 174b75cc7eaa3c94d0d575dbccfd17490f3dc981 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Mar 2002 02:58:22 +0000 Subject: Fixup parsing of domain name from packet in enum_domains. Jeremy --- source/lib/util_unistr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index c044e8f248c..d11bb0657bb 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -2053,6 +2053,7 @@ int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags) { if(dest_len==-1) dest_len=MAXUNI-3; - unistr_to_ascii(dest, src, dest_len - 1); + dest_len = MIN((src_len/2), (dest_len-1)); + unistr_to_ascii(dest, src, dest_len); return src_len; } -- cgit From 2c770bfb80079c534aa0faed1c908c7c8cbd718e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Mar 2002 03:02:03 +0000 Subject: Use the correct 2.2.x method of getting a unicode string, not the fake 3.0.x one. Jeremy. --- source/rpc_server/srv_samr_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index 4e90ed25c75..18caa252369 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -2039,7 +2039,7 @@ NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_ if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL)) return NT_STATUS_INVALID_HANDLE; - rpcstr_pull(domain_name, q_u->uni_domain.buffer, sizeof(domain_name), q_u->uni_domain.uni_str_len*2, 0); + fstrcpy(domain_name, dos_unistrn2( q_u->uni_domain.buffer, q_u->uni_domain.uni_str_len)); ZERO_STRUCT(sid); -- cgit From 828e053a3d48653ff231c78378c6a7ea5774a148 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 14:58:34 +0000 Subject: added se_map_standard() for mapping standard bits (16-19) of access map to object specific bits. Will merge into HEAD once I'm done later this week (hopefully). --- source/lib/util_seaccess.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/lib/util_seaccess.c b/source/lib/util_seaccess.c index b8dc43dede4..6063f82d154 100644 --- a/source/lib/util_seaccess.c +++ b/source/lib/util_seaccess.c @@ -194,6 +194,31 @@ void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping) } } +/* Map standard access rights to object specific rights. This technique is + used to give meaning to assigning read, write, execute and all access to + objects. Each type of object has its own mapping of standard to object + specific access rights. */ + +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping) +{ + uint32 old_mask = *access_mask; + + if (*access_mask & READ_CONTROL_ACCESS) { + *access_mask &= ~READ_CONTROL_ACCESS; + *access_mask |= mapping->std_read; + } + + if (*access_mask & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS)) { + *access_mask &= ~(DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS); + *access_mask |= mapping->std_all; + } + + if (old_mask != *access_mask) { + DEBUG(10, ("se_map_standard(): mapped mask 0x%08x to 0x%08x\n", + old_mask, *access_mask)); + } +} + /***************************************************************************** Check access rights of a user against a security descriptor. Look at each ACE in the security descriptor until an access denied ACE denies -- cgit From 45e01356fa0eca0df7f1820bb01b1d9ea6744c2f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:03:08 +0000 Subject: defines and format fixes --- source/include/rpc_spoolss.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index a94b85fab75..4bf4a2cec54 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -259,6 +259,8 @@ #define JOB_NOTIFY_TOTAL_BYTES 0x16 #define JOB_NOTIFY_BYTES_PRINTED 0x17 +#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01 + #define PRINTER_CHANGE_ADD_PRINTER 0x00000001 #define PRINTER_CHANGE_SET_PRINTER 0x00000002 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004 @@ -331,14 +333,10 @@ #define PRINTER_MESSAGE_SHARENAME 0x00001000 typedef struct printer_message_info { - /* PRINTER_CHANGE_XXX*/ - uint32 low; - uint32 high; - + uint32 low; /* PRINTER_CHANGE_XXX */ + uint32 high; /* PRINTER_CHANGE_XXX */ fstring printer_name; - - /* PRINTER_MESSAGE_XXX */ - uint32 flags; + uint32 flags; /* PRINTER_MESSAGE_XXX */ } PRINTER_MESSAGE_INFO; -- cgit From d2693c5e223f40a8dffc4a1cc0ff940ee5a305d6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:05:17 +0000 Subject: No real meat to this commit. Mostly format updates and removed cli_spoolss_routerreplyprinter() as that is going to rpc_client/cli_spoolss_notify.c due to linking dependencies. --- source/libsmb/cli_spoolss.c | 530 ++++++++++++++++++-------------------------- 1 file changed, 217 insertions(+), 313 deletions(-) diff --git a/source/libsmb/cli_spoolss.c b/source/libsmb/cli_spoolss.c index feb9c0c6784..bd8f4877239 100644 --- a/source/libsmb/cli_spoolss.c +++ b/source/libsmb/cli_spoolss.c @@ -3,7 +3,7 @@ Version 2.2 RPC pipe client - Copyright (C) Gerald Carter 2001, + Copyright (C) Gerald Carter 2001,2002 Copyright (C) Tim Potter 2000, Copyright (C) Andrew Tridgell 1994-2000 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 @@ -36,126 +36,10 @@ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, return cli_pipe_initialise(cli, system_name, PIPE_SPOOLSS, creds); } -/* Open printer ex */ - -NTSTATUS cli_spoolss_open_printer_ex( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *printername, - char *datatype, - uint32 access_required, - char *station, - char *username, - POLICY_HND *pol -) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_OPEN_PRINTER_EX q; - SPOOL_R_OPEN_PRINTER_EX r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_open_printer_ex(&q, printername, datatype, - access_required, station, username); - - /* Marshall data and send request */ - - if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Unmarshall response */ - - if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Return output parameters */ - - if (W_ERROR_IS_OK(r.status)) { - result = NT_STATUS_OK; - *pol = r.handle; - } else { - result = werror_to_ntstatus(r.status); - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Close a printer handle */ - -NTSTATUS cli_spoolss_close_printer( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - POLICY_HND *pol -) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_CLOSEPRINTER q; - SPOOL_R_CLOSEPRINTER r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_closeprinter(&q, pol); - - /* Marshall data and send request */ - - if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Unmarshall response */ - - if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Return output parameters */ - - if (W_ERROR_IS_OK(r.status)) { - *pol = r.handle; - result = NT_STATUS_OK; - } else { - result = werror_to_ntstatus(r.status); - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Initialize a spoolss NEW_BUFFER */ +/********************************************************************** + Initialize a new spoolss buff for use by a client rpc +**********************************************************************/ static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) { buffer->ptr = (size != 0); @@ -165,15 +49,14 @@ static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) buffer->struct_start = prs_offset(&buffer->prs); } -/* Decode various printer info levels - perhaps this should live in - parse_spoolss.c? */ +/********************************************************************* + Decode various spoolss rpc's and info levels + ********************************************************************/ -static void decode_printer_info_0( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PRINTER_INFO_0 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PRINTER_INFO_0 **info) { uint32 i; PRINTER_INFO_0 *inf; @@ -189,12 +72,10 @@ static void decode_printer_info_0( *info=inf; } -static void decode_printer_info_1( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PRINTER_INFO_1 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PRINTER_INFO_1 **info) { uint32 i; PRINTER_INFO_1 *inf; @@ -210,12 +91,10 @@ static void decode_printer_info_1( *info=inf; } -static void decode_printer_info_2( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PRINTER_INFO_2 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PRINTER_INFO_2 **info) { uint32 i; PRINTER_INFO_2 *inf; @@ -233,12 +112,10 @@ static void decode_printer_info_2( *info=inf; } -static void decode_printer_info_3( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PRINTER_INFO_3 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_info_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PRINTER_INFO_3 **info) { uint32 i; PRINTER_INFO_3 *inf; @@ -256,14 +133,9 @@ static void decode_printer_info_3( } /********************************************************************** - Decode a PORT_INFO_1 struct from a NEW_BUFFER **********************************************************************/ -static void decode_port_info_1( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PORT_INFO_1 **info -) +static void decode_port_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PORT_INFO_1 **info) { uint32 i; PORT_INFO_1 *inf; @@ -280,13 +152,9 @@ static void decode_port_info_1( } /********************************************************************** - Decode a PORT_INFO_2 struct from a NEW_BUFFER **********************************************************************/ -static void decode_port_info_2( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - PORT_INFO_2 **info) +static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PORT_INFO_2 **info) { uint32 i; PORT_INFO_2 *inf; @@ -302,12 +170,10 @@ static void decode_port_info_2( *info=inf; } -static void decode_printer_driver_1( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - DRIVER_INFO_1 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_driver_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, DRIVER_INFO_1 **info) { uint32 i; DRIVER_INFO_1 *inf; @@ -323,12 +189,10 @@ static void decode_printer_driver_1( *info=inf; } -static void decode_printer_driver_2( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - DRIVER_INFO_2 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_driver_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, DRIVER_INFO_2 **info) { uint32 i; DRIVER_INFO_2 *inf; @@ -344,12 +208,10 @@ static void decode_printer_driver_2( *info=inf; } -static void decode_printer_driver_3( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - DRIVER_INFO_3 **info -) +/********************************************************************** +**********************************************************************/ +static void decode_printer_driver_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, DRIVER_INFO_3 **info) { uint32 i; DRIVER_INFO_3 *inf; @@ -365,11 +227,10 @@ static void decode_printer_driver_3( *info=inf; } -static void decode_printerdriverdir_1 ( - TALLOC_CTX *mem_ctx, - NEW_BUFFER *buffer, - uint32 returned, - DRIVER_DIRECTORY_1 **info +/********************************************************************** +**********************************************************************/ +static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, DRIVER_DIRECTORY_1 **info ) { DRIVER_DIRECTORY_1 *inf; @@ -384,16 +245,124 @@ static void decode_printerdriverdir_1 ( } -/* Enumerate printers */ +/********************************************************************************* + Win32 API - OpenPrinter() + ********************************************************************************/ + +NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_OPEN_PRINTER_EX q; + SPOOL_R_OPEN_PRINTER_EX r; + NTSTATUS result; -NTSTATUS cli_spoolss_enum_printers( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 flags, - uint32 level, - int *returned, - PRINTER_INFO_CTR *ctr -) + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_open_printer_ex(&q, printername, datatype, + access_required, station, username); + + /* Marshall data and send request */ + + if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + + if (W_ERROR_IS_OK(r.status)) { + result = NT_STATUS_OK; + *pol = r.handle; + } else { + result = werror_to_ntstatus(r.status); + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - ClosePrinter() + ********************************************************************************/ + +NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_CLOSEPRINTER q; + SPOOL_R_CLOSEPRINTER r; + NTSTATUS result; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_closeprinter(&q, pol); + + /* Marshall data and send request */ + + if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + + if (W_ERROR_IS_OK(r.status)) { + *pol = r.handle; + result = NT_STATUS_OK; + } else { + result = werror_to_ntstatus(r.status); + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - EnumPrinters() + ********************************************************************************/ + +NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 flags, uint32 level, int *returned, PRINTER_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPRINTERS q; @@ -470,14 +439,12 @@ NTSTATUS cli_spoolss_enum_printers( return result; } -/* Enumerate printer ports */ -NTSTATUS cli_spoolss_enum_ports( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - int *returned, - PORT_INFO_CTR *ctr -) +/********************************************************************************* + Win32 API - EnumPorts() + ********************************************************************************/ + +NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, + int *returned, PORT_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPORTS q; @@ -545,7 +512,10 @@ NTSTATUS cli_spoolss_enum_ports( return result; } -/* Get printer info */ +/********************************************************************************* + Win32 API - GetPrinter() + ********************************************************************************/ + NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr) { @@ -611,9 +581,10 @@ NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -/********************************************************************** - * Set printer info - */ +/********************************************************************************* + Win32 API - SetPrinter() + ********************************************************************************/ + NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr, uint32 command) @@ -656,9 +627,10 @@ done: return result; } -/********************************************************************** - * Get installed printer drivers for a given printer - */ +/********************************************************************************* + Win32 API - GetPrinterDriver() + ********************************************************************************/ + NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 level, char* env, PRINTER_DRIVER_CTR *ctr) @@ -732,17 +704,13 @@ NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct return result; } -/********************************************************************** - * Get installed printer drivers for a given printer - */ -NTSTATUS cli_spoolss_enumprinterdrivers ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - char* env, - uint32 *returned, - PRINTER_DRIVER_CTR *ctr -) +/********************************************************************************* + Win32 API - EnumPrinterDrivers() + ********************************************************************************/ + +NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, char* env, uint32 *returned, + PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPRINTERDRIVERS q; @@ -815,16 +783,12 @@ NTSTATUS cli_spoolss_enumprinterdrivers ( } -/********************************************************************** - * Get installed printer drivers for a given printer - */ -NTSTATUS cli_spoolss_getprinterdriverdir ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - char* env, - DRIVER_DIRECTORY_CTR *ctr -) +/********************************************************************************* + Win32 API - GetPrinterDriverDirectory() + ********************************************************************************/ + +NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTERDRIVERDIR q; @@ -887,15 +851,12 @@ NTSTATUS cli_spoolss_getprinterdriverdir ( return result; } -/********************************************************************** - * Install a printer driver - */ -NTSTATUS cli_spoolss_addprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_DRIVER_CTR *ctr -) +/********************************************************************************* + Win32 API - AddPrinterDriver() + ********************************************************************************/ + +NTSTATUS cli_spoolss_addprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTERDRIVER q; @@ -943,15 +904,12 @@ done: return result; } -/********************************************************************** - * Install a printer - */ -NTSTATUS cli_spoolss_addprinterex ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_INFO_CTR *ctr -) +/********************************************************************************* + Win32 API - AddPrinter() + ********************************************************************************/ + +NTSTATUS cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTEREX q; @@ -1005,16 +963,12 @@ done: return result; } -/********************************************************************** - * Delete a Printer Driver from the server (does not remove - * the driver files - */ -NTSTATUS cli_spoolss_deleteprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *arch, - char *driver -) +/********************************************************************************* + Win32 API - DeltePrinterDriver() + ********************************************************************************/ + +NTSTATUS cli_spoolss_deleteprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *arch, char *driver) { prs_struct qbuf, rbuf; SPOOL_Q_DELETEPRINTERDRIVER q; @@ -1062,13 +1016,12 @@ done: return result; } -/* Get print processor directory */ +/********************************************************************************* + Win32 API - GetPrinterProcessorDirectory() + ********************************************************************************/ -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *name, - char *environment, - fstring procdir) +NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *name, char *environment, fstring procdir) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTPROCESSORDIRECTORY q; @@ -1126,7 +1079,9 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, } -/*****************************************************************************/ +/********************************************************************************* + Win32 API - SetPrinterData() + ********************************************************************************/ NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value) @@ -1168,55 +1123,4 @@ done: return result; } -NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 condition, uint32 changd_id) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ROUTERREPLYPRINTER q; - SPOOL_R_ROUTERREPLYPRINTER r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - - /* Initialise input parameters */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - - /* write the request */ - make_spoolss_q_routerreplyprinter(&q, pol, condition, changd_id); - - /* Marshall data and send request */ - if (!spoolss_io_q_routerreplyprinter ("", &q, &qbuf, 0)) { - DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to marshall SPOOL_Q_ROUTERREPLYPRINTER!\n")); - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - - if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf)) { - DEBUG(0,("cli_spoolss_routerreplyprinter: rpc_api_pipe_req failed!\n")); - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Unmarshall response */ - if (!spoolss_io_r_routerreplyprinter ("", &r, &rbuf, 0)) { - DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to unmarshall SPOOL_R_ROUTERREPLYPRINTER!\n")); - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Return output parameters */ - result = werror_to_ntstatus(r.status); - -done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} -- cgit From ab09b203f5aa24d203f3288d5a5d427812d3b6bc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:10:46 +0000 Subject: * rewrite interface to spoolss change notify calls used by smbd. They not match the basic standards used by libsmb/cli_spoolss.c such as return NTSTATUS, accepting a TALLOC_CTX* as a parameter, etc... * moved cli_spoolss_reply_rrpcn() and associated functions from rpc_server/srv_spoolss_nt.c to this file --- source/rpc_client/cli_spoolss_notify.c | 277 ++++++++++++++++++++++++++++----- 1 file changed, 234 insertions(+), 43 deletions(-) diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 9562e6fe5dc..8353f5c33b7 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -127,68 +127,73 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine) return True; } -/*************************************************************************** +/* + * SPOOLSS Client RPC's used by servers as the notification + * back channel + */ + + /*************************************************************************** do a reply open printer ****************************************************************************/ -BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle) +NTSTATUS cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printer, uint32 localprinter, uint32 type, + POLICY_HND *handle) { + NTSTATUS result; + prs_struct rbuf; prs_struct buf; SPOOL_Q_REPLYOPENPRINTER q_s; SPOOL_R_REPLYOPENPRINTER r_s; - prs_init(&buf, 1024, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); + prs_init(&buf, 1024, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL ); /* create and send a MSRPC command with api SPOOLSS_REPLYOPENPRINTER */ -/* - DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", - cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname, - credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); -*/ + /* store the parameters */ make_spoolss_q_replyopenprinter(&q_s, printer, localprinter, type); /* turn parameters into data stream */ if(!spoolss_io_q_replyopenprinter("", &q_s, &buf, 0)) { - DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to marshall NET_Q_SRV_PWSET struct.\n")); - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to marshall SPOOL_Q_REPLYOPENPRINTER struct.\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; } /* send the data on \PIPE\ */ if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYOPENPRINTER, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - - prs_mem_free(&buf); /* turn data stream into parameters*/ if(!spoolss_io_r_replyopenprinter("", &r_s, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; + DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to unmarshall SPOOL_R_REPLYOPENPRINTER struct.\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - prs_mem_free(&rbuf); - memcpy(handle, &r_s.handle, sizeof(r_s.handle)); - *status=r_s.status; + result = werror_to_ntstatus(r_s.status); - return True; +done: + prs_mem_free(&buf); + prs_mem_free(&rbuf); + + return result; } /*************************************************************************** do a reply open printer ****************************************************************************/ -BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, - WERROR *status) +NTSTATUS cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle) { + NTSTATUS result; prs_struct rbuf; prs_struct buf; @@ -199,41 +204,227 @@ BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); /* create and send a MSRPC command with api */ -/* - DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", - cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname, - credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); -*/ + /* store the parameters */ make_spoolss_q_reply_closeprinter(&q_s, handle); /* turn parameters into data stream */ if(!spoolss_io_q_replycloseprinter("", &q_s, &buf, 0)) { DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_Q_REPLY_CLOSEPRINTER struct.\n")); - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + result = NT_STATUS_UNSUCCESSFUL; + goto done; } /* send the data on \PIPE\ */ if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYCLOSEPRINTER, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - prs_mem_free(&buf); - /* turn data stream into parameters*/ if(!spoolss_io_r_replycloseprinter("", &r_s, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; + DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_R_REPLY_CLOSEPRINTER struct.\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; } + + result = werror_to_ntstatus(r_s.status); + +done: + prs_mem_free(&buf); prs_mem_free(&rbuf); - *status=r_s.status; + return result; +} - return True; + +/********************************************************************* + This SPOOLSS_ROUTERREPLYPRINTER function is used to send a change + notification event when the registration **did not** use + SPOOL_NOTIFY_OPTION_TYPE structure to specify the events to monitor. + Also see cli_spolss_reply_rrpcn() + *********************************************************************/ + +NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 condition, uint32 changd_id) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ROUTERREPLYPRINTER q; + SPOOL_R_ROUTERREPLYPRINTER r; + NTSTATUS result; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + + /* Initialise input parameters */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + + /* write the request */ + make_spoolss_q_routerreplyprinter(&q, pol, condition, changd_id); + + /* Marshall data and send request */ + if (!spoolss_io_q_routerreplyprinter ("", &q, &qbuf, 0)) { + DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to marshall SPOOL_Q_ROUTERREPLYPRINTER!\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + + if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + if (!spoolss_io_r_routerreplyprinter ("", &r, &rbuf, 0)) { + DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to unmarshall SPOOL_R_ROUTERREPLYPRINTER!\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + result = werror_to_ntstatus(r.status); + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + + +/********************************************************************************** + Build the SPOOL_NOTIFY_INFO_DATA entries based upon the flags which have been set + *********************************************************************************/ + +static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, uint32 flags, + SPOOL_NOTIFY_INFO_DATA **notify_data) +{ + SPOOL_NOTIFY_INFO_DATA *data; + uint32 idx = 0; + + /* Changing the printer driver */ + + if (flags & PRINTER_MESSAGE_DRIVER) { + DEBUG(10,("build_notify_data: PRINTER_MESSAGE_DRIVER set on [%s][%d]\n", + printer->info_2->printername, idx)); + if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n", + (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); + return -1; + } + *notify_data = data; + + /* clear memory */ + memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + * See PRINTER_NOTIFY_INFO_DATA entries in MSDN + * --jerry + */ + construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); + + spoolss_notify_driver_name(-1, *notify_data+idx, NULL, printer, ctx); + idx++; + } + + return idx; +} + +/********************************************************************* + This SPOOLSS_ROUTERREPLYPRINTER function is used to send a change + notification event when the registration **did** use + SPOOL_NOTIFY_OPTION_TYPE structure to specify the events to monitor + Also see cli_spoolss_routereplyprinter() + *********************************************************************/ + +NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, + NT_PRINTER_INFO_LEVEL *printer) +{ + prs_struct rbuf; + prs_struct buf; + + SPOOL_NOTIFY_INFO notify_info; + SPOOL_NOTIFY_INFO_DATA *notify_data = NULL; + uint32 data_len; + + NTSTATUS result; + + SPOOL_Q_REPLY_RRPCN q_s; + SPOOL_R_REPLY_RRPCN r_s; + + if (!info) { + DEBUG(5,("cli_spoolss_reply_rrpcn: NULL printer message info pointer!\n")); + return NT_STATUS_UNSUCCESSFUL; + } + + prs_init(&buf, 1024, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL ); + + ZERO_STRUCT(notify_info); + + /* + * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX + * events. --jerry + */ + DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_MESSAGE flags = 0x%8x\n", info->flags)); + + data_len = build_notify_data(mem_ctx, printer, info->flags, ¬ify_data); + if (info->flags && (data_len == -1)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Failed to build SPOOL_NOTIFY_INFO_DATA [flags == 0x%x] for printer [%s]\n", + info->flags, info->printer_name)); + result = NT_STATUS_NO_MEMORY; + goto done; + } + notify_info.version = 0x2; + notify_info.flags = 0x00020000; /* ?? */ + notify_info.count = data_len; + notify_info.data = notify_data; + + /* create and send a MSRPC command with api */ + /* store the parameters */ + + make_spoolss_q_reply_rrpcn(&q_s, handle, info->low, info->high, ¬ify_info); + + /* turn parameters into data stream */ + if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* send the data on \PIPE\ */ + if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + + /* turn data stream into parameters*/ + if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { + DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + result = werror_to_ntstatus(r_s.status); + +done: + prs_mem_free(&buf); + prs_mem_free(&rbuf); + /* + * The memory allocated in this array is talloc'd so we only need + * free the array here. JRA. + */ + SAFE_FREE(notify_data); + + return result; } -- cgit From 1af965b6624cbbb9ba6e81008ab443ca7dbc3235 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:16:27 +0000 Subject: rpc_client/cli_spoolss_notify.c is only used by rpc_server/srv_spoolss_nt.c. Clean up dependencies to reflect this. --- source/Makefile.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 08002fef1eb..536a1cb5040 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -150,7 +150,7 @@ RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \ rpc_server/srv_samr.o rpc_server/srv_samr_nt.o rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o \ rpc_server/srv_util.o rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o \ rpc_server/srv_pipe.o rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o \ - rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o + rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o rpc_client/cli_spoolss_notify.c # this includes only the low level parse code, not stuff # that requires knowledge of security contexts @@ -165,7 +165,6 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \ RPC_CLIENT_OBJ = rpc_client/cli_netlogon.o rpc_client/cli_pipe.o \ rpc_client/cli_login.o \ - rpc_client/cli_spoolss_notify.o \ rpc_client/cli_trust.o LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o @@ -193,7 +192,7 @@ SMBD_OBJ1 = smbd/server.o smbd/files.o smbd/chgpasswd.o smbd/connection.o \ smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \ smbd/posix_acls.o lib/sysacls.o \ smbd/process.o smbd/service.o smbd/error.o \ - printing/printfsp.o lib/util_seaccess.o libsmb/cli_spoolss.o \ + printing/printfsp.o lib/util_seaccess.o \ libsmb/cli_pipe_util.o PRINTING_OBJ = printing/pcap.o printing/print_svid.o \ -- cgit From 093903d6aa442e6b5b6147d189ccd8abdcf134b1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:20:01 +0000 Subject: structure to support se_map_standard() --- source/include/rpc_secdes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/include/rpc_secdes.h b/source/include/rpc_secdes.h index 259c1567675..25daf1ceba5 100644 --- a/source/include/rpc_secdes.h +++ b/source/include/rpc_secdes.h @@ -172,4 +172,11 @@ typedef struct generic_mapping { uint32 generic_all; } GENERIC_MAPPING; +typedef struct standard_mapping { + uint32 std_read; + uint32 std_write; + uint32 std_execute; + uint32 std_all; +} STANDARD_MAPPING; + #endif /* _RPC_SECDES_H */ -- cgit From ca87bafc023c53c0006326a853e238378993597f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:21:41 +0000 Subject: tentative removal of a prs_align() --- source/rpc_parse/parse_spoolss.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 2e802908276..a1471afdab6 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -425,8 +425,13 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, return False; } } +#if 0 /* JERRY */ + + /* Win2k does not seem to put this parse align here */ + if(!prs_align(ps)) return False; +#endif return True; } -- cgit From 5a11ca458352f31b7d159f6c32314a729bdcb723 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:24:51 +0000 Subject: added the printer_std_mapping global variable --- source/printing/nt_printing.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 9a91088b78d..3dfeb6f3903 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -43,7 +43,14 @@ static TDB_CONTEXT *tdb_printers; /* used for printers files */ /* Map generic permissions to printer object specific permissions */ -struct generic_mapping printer_generic_mapping = { +GENERIC_MAPPING printer_generic_mapping = { + PRINTER_READ, + PRINTER_WRITE, + PRINTER_EXECUTE, + PRINTER_ALL_ACCESS +}; + +STANDARD_MAPPING printer_std_mapping = { PRINTER_READ, PRINTER_WRITE, PRINTER_EXECUTE, @@ -2772,8 +2779,17 @@ static uint32 rev_changeid(void) get_process_uptime(&tv); +#if 1 /* JERRY */ /* Return changeid as msec since spooler restart */ return tv.tv_sec * 1000 + tv.tv_usec / 1000; +#else + /* + * This setting seems to work well but is too untested + * to replace the above calculation. Left in for experiementation + * of the reader --jerry (Tue Mar 12 09:15:05 CST 2002) + */ + return tv.tv_sec * 10 + tv.tv_usec / 100000; +#endif } /* -- cgit From 45185b61a6d7c9c7d291186e7e96f949549094a5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:32:57 +0000 Subject: * updates to reflect that teh cli_spoolss_XXX() notify calls return an NTSTATUS now * send the change notify to the client **before** sending response to SetPrinter() (not entirely sure about this one but it is very easy to fix) * in srv_spoolss_receive_message(): ignore the message if we sent it as the chnage notify has already been sent to our client in update_printer() * support sending RPC's 0x42 or 0x3b depending on whether or not the SPOOLSS_FFPCN contained a SPOOL_NOTIFY_OPTIONS structure All of this now means that we support multiple change notify handles successfully and that explorer updates its view upon changing the driver for a printer. The notification code only supports PRINTER_CHANGE_SET_PRINTER_DRIVER currently, but I'm planning on adding the remaining events later this week. --- source/rpc_server/srv_spoolss_nt.c | 416 ++++++++++++++++--------------------- 1 file changed, 184 insertions(+), 232 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index b5032536523..a3e96d03002 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -91,6 +91,10 @@ static ubi_dlList counter_list; static struct cli_state cli; static uint32 smb_connections=0; + +/* in printing/nt_printing.c */ +extern STANDARD_MAPPING printer_std_mapping; + #define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) @@ -158,7 +162,7 @@ static void free_spool_notify_option(SPOOL_NOTIFY_OPTION **pp) static void srv_spoolss_replycloseprinter(POLICY_HND *handle) { - WERROR status; + NTSTATUS result; /* weird if the test succeds !!! */ if (smb_connections==0) { @@ -166,7 +170,9 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle) return; } - if(!cli_spoolss_reply_close_printer(&cli, handle, &status)) + result = cli_spoolss_reply_close_printer(&cli, cli.mem_ctx, handle); + + if (!NT_STATUS_IS_OK(result)) DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed.\n")); /* if it's the last connection, deconnect the IPC$ share */ @@ -529,160 +535,25 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) return True; } - -/********************************************************************************** - Build the SPOOL_NOTIFY_INFO_DATA entries based upon the flags which have been set - *********************************************************************************/ - -static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, uint32 flags, - SPOOL_NOTIFY_INFO_DATA **notify_data) -{ - SPOOL_NOTIFY_INFO_DATA *data; - uint32 idx = 0; - - /* Changing the printer driver */ - - if (flags & PRINTER_MESSAGE_DRIVER) { - DEBUG(10,("build_notify_data: PRINTER_MESSAGE_DRIVER set on [%s][%d]\n", - printer->info_2->printername, idx)); - if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n", - (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); - return -1; - } - *notify_data = data; - - /* clear memory */ - memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); - - /* - * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE - * See PRINTER_NOTIFY_INFO_DATA entries in MSDN - * --jerry - */ - construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); - - spoolss_notify_driver_name(-1, *notify_data+idx, NULL, printer, ctx); - idx++; - } - - return idx; -} - /*************************************************************************** - Send a notify to the client. -****************************************************************************/ - -static BOOL cli_spoolss_reply_rrpcn(struct cli_state *pcli, POLICY_HND *handle, - PRINTER_MESSAGE_INFO *info, WERROR *status) + Always give preference Printer_entry.notify.option over + Printer_entry.notify.flags. Return True if we should send notification + events using SPOOLSS_RRPCN. False means that we should use + SPOOLSS_ROUTERREPLYPRINTER. + **************************************************************************/ +static BOOL valid_notify_options(Printer_entry *printer) { - prs_struct rbuf; - prs_struct buf; - - SPOOL_NOTIFY_INFO notify_info; - SPOOL_NOTIFY_INFO_DATA *notify_data = NULL; - uint32 data_len; - - WERROR result; - - NT_PRINTER_INFO_LEVEL *printer = NULL; - - SPOOL_Q_REPLY_RRPCN q_s; - SPOOL_R_REPLY_RRPCN r_s; - - if (!info) { - DEBUG(5,("cli_spoolss_reply_rrpcn: NULL printer message info pointer!\n")); + if (printer->notify.option == NULL) return False; - } - prs_init(&buf, 1024, pcli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, pcli->mem_ctx, UNMARSHALL ); - - ZERO_STRUCT(notify_info); - - /* lookup the printer if we have a name */ - - if (*(info->printer_name)) { - result = get_a_printer(&printer, 2, info->printer_name); - if (! W_ERROR_IS_OK(result)) { - *status = result; - goto done; - } - } - - /* - * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX - * events. --jerry - */ - DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_MESSAGE flags = 0x%8x\n", info->flags)); - - data_len = build_notify_data(pcli->mem_ctx, printer, info->flags, ¬ify_data); - if (info->flags && (data_len == -1)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Failed to build SPOOL_NOTIFY_INFO_DATA [flags == 0x%x] for printer [%s]\n", - info->flags, info->printer_name)); - *status = WERR_NOMEM; - goto done; - } - notify_info.version = 0x2; - notify_info.flags = 0x00020000; - notify_info.count = data_len; - notify_info.data = notify_data; - - -#if 0 /* JERRY -- do not delete */ - DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", - pcli->srv_name_slash, pcli->mach_acct, sec_chan_type, global_myname, - credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); -#endif - - /* create and send a MSRPC command with api */ - /* store the parameters */ - - make_spoolss_q_reply_rrpcn(&q_s, handle, info->low, info->high, ¬ify_info); - - /* turn parameters into data stream */ - if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); - *status = WERR_BADFUNC; - goto done; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(pcli, SPOOLSS_RRPCN, &buf, &rbuf)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: SPOOLSS_RRPCN failed!\n")); - *status = WERR_BADFUNC; - goto done; - } - - - /* turn data stream into parameters*/ - if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { - DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); - *status = WERR_BADFUNC; - goto done; - } - - *status = r_s.status; - -done: - prs_mem_free(&buf); - prs_mem_free(&rbuf); - free_a_printer(&printer, 2); - /* - * The memory allocated in this array is talloc'd so we only need - * free the array here. JRA. - */ - SAFE_FREE(notify_data); - - if (!W_ERROR_IS_OK(*status)) - DEBUG(5,("cli_spoolss_reply_rrpcn: %s\n", get_dos_error_msg(*status))); - - return W_ERROR_IS_OK(*status); + return True; } /*************************************************************************** Simple check to see if the client motify handle is set to watch for events represented by 'flags' + + FIXME!!!! only a stub right now --jerry **************************************************************************/ static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) @@ -692,69 +563,177 @@ static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) } /*************************************************************************** - Receive the notify message. -****************************************************************************/ - -static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) + Server wrapper for cli_spoolss_routerreplyprinter() since the client + function can only send a single change notification at a time. + + FIXME!!! only handles one change currently (PRINTER_CHANGE_SET_PRINTER_DRIVER) + --jerry + **************************************************************************/ + +static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, PRINTER_MESSAGE_INFO *info, + NT_PRINTER_INFO_LEVEL *printer) { - PRINTER_MESSAGE_INFO msg; - Printer_entry *find_printer; - WERROR status; + NTSTATUS result; + uint32 condition = 0x0; + + if (info->flags & PRINTER_MESSAGE_DRIVER) + condition = PRINTER_CHANGE_SET_PRINTER_DRIVER; + + result = cli_spoolss_routerreplyprinter(cli, mem_ctx, pol, condition, + printer->info_2->changeid); - if (len < sizeof(msg)) { - DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); - return; + return result; +} + +/*********************************************************************** + Wrapper around the decision of which RPC use to in the change + notification + **********************************************************************/ + +static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, + struct cli_state *cli, PRINTER_MESSAGE_INFO *msg, + NT_PRINTER_INFO_LEVEL *info) +{ + NTSTATUS result; + + if (valid_notify_options(Printer)) { + /* This is a single call that can send information about multiple changes */ + result = cli_spoolss_reply_rrpcn(cli, cli->mem_ctx, &Printer->notify.client_hnd, + msg, info); + } + else { + /* This requires that the server send an individual event notification for each change */ + result = srv_spoolss_routerreplyprinter(cli, cli->mem_ctx, &Printer->notify.client_hnd, + msg, info); } + + return result; +} - memcpy(&msg, buf, sizeof(PRINTER_MESSAGE_INFO)); - DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x flags=0x%x\n", - msg.printer_name, (unsigned int)msg.low, (unsigned int)msg.high, msg.flags )); +/*********************************************************************** + Send a change notication message on all handles which have a call + back registered + **********************************************************************/ - /* Iterate the printer list */ - for(find_printer = printers_list; find_printer; find_printer = find_printer->next) { +static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) +{ + Printer_entry *find_printer; + NTSTATUS result; + WERROR wresult; + NT_PRINTER_INFO_LEVEL *printer = NULL; + + if (!msg) { + DEBUG(0,("send_spoolss_event_notification: NULL msg pointer!\n")); + return; + } + + for (find_printer = printers_list; find_printer; find_printer = find_printer->next) { /* - * If the entry has a connected client we send the message. + * If the entry has a connected client we send the message. There should + * only be one of these normally when dealing with the NT/2k spooler. + * However, iterate over all to make sure we deal with user applications + * in addition to spooler service. + * + * While we are only maintaining a single connection to the client, + * the FindFirstPrinterChangeNotification() call is made on a printer + * handle, so "client_connected" represents the whether or not the + * client asked for change notication on this handle. + * + * --jerry */ if (find_printer->notify.client_connected==True) { /* does the client care about what changed? */ - if (msg.flags && !is_client_monitoring_event(find_printer, msg.flags)) { - DEBUG(10,("srv_spoolss_receive_message: Client [%s] not monitoring these events\n", + if (msg->flags && !is_client_monitoring_event(find_printer, msg->flags)) { + DEBUG(10,("send_spoolss_event_notification: Client [%s] not monitoring these events\n", find_printer->client.machine)); continue; } if (find_printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) - DEBUG(10,("srv_spoolss_receive_message: printserver [%s]\n", find_printer->dev.printerservername )); + DEBUG(10,("send_spoolss_event_notification: printserver [%s]\n", find_printer->dev.printerservername )); else - DEBUG(10,("srv_spoolss_receive_message: printer [%s]\n", find_printer->dev.handlename)); + DEBUG(10,("send_spoolss_event_notification: printer [%s]\n", find_printer->dev.handlename)); /* * if handle is a printer, only send if the printer_name matches. * ...else if handle is a printerserver, send to all */ - if (*msg.printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) - && !strequal(msg.printer_name, find_printer->dev.handlename)) + if (*msg->printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER) + && !strequal(msg->printer_name, find_printer->dev.handlename)) { - DEBUG(10,("srv_spoolss_receive_message: ignoring message sent to %s [%s]\n", - msg.printer_name, find_printer->dev.handlename )); + DEBUG(10,("send_spoolss_event_notification: ignoring message sent to %s [%s]\n", + msg->printer_name, find_printer->dev.handlename )); continue; } + + /* lookup the printer if we have a name if we don't already have a + valid NT_PRINTER_INFO_LEVEL structure. And yes I'm assuming we + will always have a non-empty msg.printer_name */ + + if (!printer || !printer->info_2 || strcmp(msg->printer_name, printer->info_2->printername)) + { + + if (printer) { + free_a_printer(&printer, 2); + printer = NULL; + } + + wresult = get_a_printer(&printer, 2, msg->printer_name); + if (! W_ERROR_IS_OK(wresult)) + continue; + } + /* issue the client call */ - if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, &msg, &status)) - DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n", - (unsigned int)W_ERROR_V(status))); - else - DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn failed\n")); + result = srv_spoolss_send_event_to_client(find_printer, &cli, msg, printer); + + if (!NT_STATUS_IS_OK(result)) { + DEBUG(10,("send_spoolss_event_notification: Event notification failed [%s]\n", + get_nt_error_msg(result))); + } } } + + return; +} +/*************************************************************************** + Receive the notify message and decode the message. Do not send + notification if we sent this originally as that would result in + duplicates. +****************************************************************************/ + +static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) +{ + PRINTER_MESSAGE_INFO msg; + pid_t my_pid = sys_getpid(); + + if (len < sizeof(msg)) { + DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); + return; + } + + memcpy(&msg, buf, sizeof(PRINTER_MESSAGE_INFO)); + + if (my_pid == src) { + DEBUG(10,("srv_spoolss_receive_message: Skipping message to myself\n")); + return; + } + + DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x flags=0x%x\n", + msg.printer_name, (unsigned int)msg.low, (unsigned int)msg.high, msg.flags )); + + /* Iterate the printer list */ + + send_spoolss_event_notification(&msg); + } /*************************************************************************** @@ -772,7 +751,7 @@ static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low, info.high = high; info.flags = flags; fstrcpy(info.printer_name, printer_name); - + memcpy(msg, &info, sizeof(PRINTER_MESSAGE_INFO)); DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x [%s], flags=0x%x\n", @@ -895,6 +874,8 @@ Can't find printer handle we created for priunter %s\n", name )); if (!get_printer_snum(p, handle, &snum)) return WERR_BADFID; + se_map_standard(&printer_default->access_required, &printer_std_mapping); + /* map an empty access mask to the minimum access mask */ if (printer_default->access_required == 0x0) printer_default->access_required = PRINTER_ACCESS_USE; @@ -1482,7 +1463,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle) { - WERROR status; + NTSTATUS result; /* * If it's the first connection, contact the client @@ -1502,10 +1483,10 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin smb_connections++; - if(!cli_spoolss_reply_open_printer(&cli, printer, localprinter, type, &status, handle)) - return False; + result = cli_spoolss_reply_open_printer(&cli, cli.mem_ctx, printer, localprinter, + type, handle); - return True; + return (NT_STATUS_IS_OK(result)); } /******************************************************************** @@ -1552,8 +1533,10 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE /* connect to the client machine and send a ReplyOpenPrinter */ if(srv_spoolss_replyopenprinter(Printer->notify.localmachine, Printer->notify.printerlocal, 1, - &Printer->notify.client_hnd)) + &Printer->notify.client_hnd)) + { Printer->notify.client_connected=True; + } return WERR_OK; } @@ -2595,7 +2578,7 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY return WERR_BADFID; option=Printer->notify.option; - id=0xffffffff; + id = 0x0; info->version=2; info->data=NULL; info->count=0; @@ -4899,6 +4882,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, int snum; NT_PRINTER_INFO_LEVEL *printer = NULL, *old_printer = NULL; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + PRINTER_MESSAGE_INFO msg; WERROR result; uint32 change_flag = 0x0; @@ -5024,13 +5008,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, /* Update printer info */ result = mod_a_printer(*printer, 2); - + /* flag which changes actually occured. This is a small subset of all the possible changes */ if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) change_flag |= PRINTER_MESSAGE_COMMENT; - + if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) change_flag |= PRINTER_MESSAGE_SHARENAME; @@ -5040,15 +5024,20 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, if (!strequal(printer->info_2->location, old_printer->info_2->location)) change_flag |= PRINTER_MESSAGE_LOCATION; - /* - * It appears that if the PrinterName had changed, we should - * set this to PRINTER_CHANGE_ADD_PRINTER. This was observed - * between 2k -> 2k. Otherwise a PRINTER_CHANGE_SET_PRINTER - * event is ok. --jerry - */ - - srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_SET_PRINTER, - change_flag); + if (!(change_flag & PRINTER_MESSAGE_DRIVER)) + goto done; + + ZERO_STRUCT(msg); + + msg.low = PRINTER_CHANGE_ADD_PRINTER; + fstrcpy(msg.printer_name, printer->info_2->printername); + msg.flags = change_flag; + + /* send to myself before replying to SetPrinter() */ + send_spoolss_event_notification(&msg); + + /* send to other smbd's */ + srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, change_flag); done: free_a_printer(&printer, 2); @@ -6371,9 +6360,7 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen pstring long_archi; pstring short_archi; DRIVER_DIRECTORY_1 *info=NULL; -#if 0 - fstring asc_name, servername; -#endif + unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi)-1); if (get_short_archi(short_archi, long_archi)==False) @@ -6382,20 +6369,6 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen if((info=(DRIVER_DIRECTORY_1 *)malloc(sizeof(DRIVER_DIRECTORY_1))) == NULL) return WERR_NOMEM; -#if 0 /* JERRY */ - /* use the name the client sent us */ - - unistr2_to_ascii(asc_name, name, sizeof(asc_name)-1); - if (asc_name[0] == '\\' && asc_name[1] == '\\') - fstrcpy(servername, asc_name); - else { - fstrcpy(servername, "\\\\"); - fstrcat(servername, asc_name); - } - - slprintf(path, sizeof(path)-1, "%s\\print$\\%s", servername, short_archi); -#endif - slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi); DEBUG(4,("printer driver directory: [%s]\n", path)); @@ -7582,27 +7555,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ enum_values[num_entries].value_len = (strlen(value)+1) * 2; enum_values[num_entries].type = type; -#if 0 /* JERRY - I think think was a bad assumption based on bad - offset values when I first implemented it. Commented out. - We should not be adding an extra NULL to the end of a string - just send what the client set in the first place. */ - /* - * NULL terminate REG_SZ - * FIXME!!! We should not be correctly problems in the way - * we store PrinterData here. Need to investogate - * SetPrinterData[Ex] --jerry - */ - - if (type == REG_SZ) { - /* fix alignment if the string was stored - in a bizarre fashion */ - if ((data_len % 2) == 0) - add_len = 2; - else - add_len = data_len % 2; - } -#endif - if (!(enum_values[num_entries].data=talloc_zero(p->mem_ctx, data_len+add_len))) { DEBUG(0,("talloc_realloc failed to allocate more memory for data!\n")); result = WERR_NOMEM; -- cgit From 8d6205b3b486e537110daebb8a0e825775a85efe Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 15:33:31 +0000 Subject: make proto --- source/include/proto.h | 106 +++++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 73 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 78bd32b7258..642c749cd21 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -514,36 +514,15 @@ BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); struct cli_state *cli_spoolss_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); -NTSTATUS cli_spoolss_open_printer_ex( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *printername, - char *datatype, - uint32 access_required, - char *station, - char *username, - POLICY_HND *pol -); -NTSTATUS cli_spoolss_close_printer( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - POLICY_HND *pol -); -NTSTATUS cli_spoolss_enum_printers( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 flags, - uint32 level, - int *returned, - PRINTER_INFO_CTR *ctr -); -NTSTATUS cli_spoolss_enum_ports( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - int *returned, - PORT_INFO_CTR *ctr -); +NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol); +NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 flags, uint32 level, int *returned, PRINTER_INFO_CTR *ctr); +NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, + int *returned, PORT_INFO_CTR *ctr); NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr); NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, @@ -552,48 +531,21 @@ NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 level, char* env, PRINTER_DRIVER_CTR *ctr); -NTSTATUS cli_spoolss_enumprinterdrivers ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - char* env, - uint32 *returned, - PRINTER_DRIVER_CTR *ctr -); -NTSTATUS cli_spoolss_getprinterdriverdir ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - char* env, - DRIVER_DIRECTORY_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_DRIVER_CTR *ctr -); -NTSTATUS cli_spoolss_addprinterex ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 level, - PRINTER_INFO_CTR *ctr -); -NTSTATUS cli_spoolss_deleteprinterdriver ( - struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *arch, - char *driver -); -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - char *name, - char *environment, - fstring procdir); +NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, char* env, uint32 *returned, + PRINTER_DRIVER_CTR *ctr); +NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr); +NTSTATUS cli_spoolss_addprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_DRIVER_CTR *ctr); +NTSTATUS cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR *ctr); +NTSTATUS cli_spoolss_deleteprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *arch, char *driver); +NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *name, char *environment, fstring procdir); NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value); -NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 condition, uint32 changd_id); /*The following definitions come from libsmb/cli_srvsvc.c */ @@ -1164,6 +1116,7 @@ void free_userlist(struct sys_userlist *list_head); /*The following definitions come from lib/util_seaccess.c */ void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, uint32 acc_desired, uint32 *acc_granted, NTSTATUS *status); @@ -2440,9 +2393,16 @@ void cli_nt_session_close(struct cli_state *cli); BOOL spoolss_disconnect_from_client( struct cli_state *cli); BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); -BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle); -BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, - WERROR *status); +NTSTATUS cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printer, uint32 localprinter, uint32 type, + POLICY_HND *handle); +NTSTATUS cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle); +NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 condition, uint32 changd_id); +NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, + NT_PRINTER_INFO_LEVEL *printer); /*The following definitions come from rpc_client/cli_trust.c */ -- cgit From fce43c127818871962d6efe4d9b3a1771e2585a7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 16:02:56 +0000 Subject: "Be not!" --- source/include/includes.h | 1 - source/include/util_list.h | 59 ---------------------------------------------- 2 files changed, 60 deletions(-) delete mode 100644 source/include/util_list.h diff --git a/source/include/includes.h b/source/include/includes.h index d19862cf124..e7d46ca2cff 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -655,7 +655,6 @@ extern int errno; #include "nterr.h" #include "secrets.h" #include "messages.h" -#include "util_list.h" #include "util_getent.h" diff --git a/source/include/util_list.h b/source/include/util_list.h deleted file mode 100644 index 4ccb1667f01..00000000000 --- a/source/include/util_list.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - Samba utility functions - Copyright (C) Andrew Tridgell 1992-1999 - Copyright (C) Gerald Carter 2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -/****************************************************************** - Implementation of a generic list. See lib/util_list.c for - details on using this. - *****************************************************************/ - -#include "smb.h" - -#ifndef _GENERIC_LIST_H -#define _GENERIC_LIST_H - -struct _list_node; - -/* - * node container in list - */ -struct _list_node { - - void *data; /* generic container pointer */ - uint8 type; /* needed for identifiers - in a hetergenous list */ - struct _list_node *next; /* next in the list */ - -}; - -/* - * list data structure - */ -typedef struct _generic_list { - - struct _list_node *head, *tail; - uint32 length; - BOOL initialized; - -} GENERIC_LIST; - - -#endif /* _GENERIC_LIST_H */ -- cgit From 24b0147fd11e77b7729b72a92c9156f12dee05a2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 16:03:56 +0000 Subject: typo --- source/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 536a1cb5040..583e9028cf7 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -150,7 +150,7 @@ RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \ rpc_server/srv_samr.o rpc_server/srv_samr_nt.o rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o \ rpc_server/srv_util.o rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o \ rpc_server/srv_pipe.o rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o \ - rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o rpc_client/cli_spoolss_notify.c + rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o rpc_client/cli_spoolss_notify.o # this includes only the low level parse code, not stuff # that requires knowledge of security contexts -- cgit From 32ef73e21679b11f530bca1e19af671ea03d0dab Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 17:38:39 +0000 Subject: merge from APPLIANCE_HEAD. If the called name used by the client connecting to us was *SMBSERV[ER], the replace this with the IP address of fir nic in our interfaces list. Not perfect for mutli-homed hosts, but .... --- source/include/proto.h | 1 + source/lib/util.c | 19 +++++++++++++++++++ source/param/loadparm.c | 20 +++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/source/include/proto.h b/source/include/proto.h index 642c749cd21..529162dac23 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1058,6 +1058,7 @@ void set_namearray(name_compare_entry **ppname_array, char *namelist); void free_namearray(name_compare_entry *name_array); BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); BOOL is_myname(char *s); +const char* get_my_primary_ip (void); BOOL is_myname_or_ipaddr(char *s); void set_remote_arch(enum remote_arch_types type); enum remote_arch_types get_remote_arch(void); diff --git a/source/lib/util.c b/source/lib/util.c index 1b8d84c7bc0..a56f7276435 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1350,6 +1350,25 @@ BOOL is_myname(char *s) return(ret); } +/******************************************************************** + Return only the first IP address of our configured interfaces + as a string + *******************************************************************/ + +const char* get_my_primary_ip (void) +{ + static fstring ip_string; + int n; + struct iface_struct nics[MAX_INTERFACES]; + + if ((n=get_interfaces(nics, MAX_INTERFACES)) <= 0) + return NULL; + + fstrcpy(ip_string, inet_ntoa(nics[0].ip)); + return ip_string; +} + + BOOL is_myname_or_ipaddr(char *s) { char *ptr; diff --git a/source/param/loadparm.c b/source/param/loadparm.c index dcf3a0f50ab..0cbd6efd654 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -3787,5 +3787,23 @@ void lp_set_logfile(const char *name) const char *get_called_name(void) { extern fstring local_machine; - return (*local_machine) ? local_machine : global_myname; + static fstring called_name; + + if (! *local_machine) + return global_myname; + + /* + * Windows NT/2k uses "*SMBSERVER" and XP uses "*SMBSERV" + */ + + if (*local_machine) { + if (!StrCaseCmp(local_machine, "*SMBSERVER") || !StrCaseCmp(local_machine, "*SMBSERV")) { + fstrcpy(called_name, get_my_primary_ip()); + DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n", + called_name)); + return called_name; + } + } + + return local_machine; } -- cgit From 20992d26b260e5b37d7ee77139c95a6e897b9d88 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Mar 2002 18:36:25 +0000 Subject: Missing comma from systems that have ACLs. Merge from HEAD fix by jcmd. Jeremy. --- source/smbd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 9de8c12d69c..7d30ffe590e 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -87,7 +87,7 @@ struct vfs_ops default_vfs_ops = { NULL, #else vfswrap_chmod_acl, - vfswrap_fchmod_acl + vfswrap_fchmod_acl, #endif vfswrap_sys_acl_get_entry, vfswrap_sys_acl_get_tag_type, -- cgit From f6a9a43a8bad2898a4ebcd2ccac5945cd3d2ff05 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 19:49:41 +0000 Subject: reverted change which kept the server name from being prepended to the printer name in get_a_printer_2() --- source/printing/nt_printing.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 3dfeb6f3903..c5c7e4f8085 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2647,10 +2647,14 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen info.attributes |= (PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK); /* Restore the stripped strings. */ - slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", - get_called_name()); + slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); strupper(info.servername); + slprintf(printername, sizeof(printername)-1, "\\\\%s\\", get_called_name()); + strupper(printername); + fstrcat(printername, info.printername); + fstrcpy(info.printername, printername); + len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len); /* @@ -4010,6 +4014,7 @@ BOOL print_time_access_check(int snum) return ok; } +#if 0 /* JERRY - not used */ /**************************************************************************** Attempt to write a default device. *****************************************************************************/ @@ -4081,3 +4086,4 @@ WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul free_a_printer(&printer, 2); return result; } +#endif /* JERRY */ -- cgit From 7ebedfaeb8a8de3ead796b710aaa52793ed7c693 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Mar 2002 22:12:52 +0000 Subject: removed incomplete comment --- source/printing/nt_printing.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index c5c7e4f8085..b3c17b8d719 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2201,10 +2201,6 @@ void free_nt_printer_param(NT_PRINTER_PARAM **param_ptr) NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename) { -/* - * should I init this ones ??? - nt_devmode->devicename -*/ char adevice[32]; NT_DEVICEMODE *nt_devmode = (NT_DEVICEMODE *)malloc(sizeof(NT_DEVICEMODE)); -- cgit From efafe742de3e794b00ac2a3f4015000a1cb4545c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 13 Mar 2002 01:35:17 +0000 Subject: Sync up the util_sid.c code - optimise sid_to_uid if it's local (from HEAD). Jeremy. --- source/include/proto.h | 9 +++ source/lib/util_sid.c | 150 +++++++++++++++++++++++++++++++++++++++++-------- source/lib/util_str.c | 22 ++++++++ source/smbd/uid.c | 7 ++- 4 files changed, 164 insertions(+), 24 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 529162dac23..b866d80e222 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1156,10 +1156,18 @@ BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); void sid_copy(DOM_SID *dst, const DOM_SID *src); DOM_SID *sid_dup(DOM_SID *src); BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); size_t sid_size(DOM_SID *sid); BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); /*The following definitions come from lib/util_sock.c */ @@ -1226,6 +1234,7 @@ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); void split_at_last_component(char *path, char *front, char sep, char *back); char *octal_string(int i); char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); /*The following definitions come from lib/util_unistr.c */ diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c index 79f40bee13d..0004aa87033 100644 --- a/source/lib/util_sid.c +++ b/source/lib/util_sid.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Andrew Tridgell 1992-1998 Copyright (C) Luke Kenneth Caseson Leighton 1998-1999 @@ -23,7 +22,6 @@ #include "includes.h" - /* NOTE! the global_sam_sid is the SID of our local SAM. This is only equal to the domain SID when we are a DC, otherwise its our workstation SID */ @@ -64,7 +62,6 @@ static known_sid_users everyone_users[] = { static known_sid_users creator_owner_users[] = { { 0, SID_NAME_ALIAS, "Creator Owner" }, - { 1, SID_NAME_ALIAS, "Creator Group" }, {0, (enum SID_NAME_USE)0, NULL}}; static known_sid_users nt_authority_users[] = { @@ -383,21 +380,20 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr) char *p, *q; /* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */ uint32 ia; - - + if (StrnCaseCmp( sidstr, "S-", 2)) { DEBUG(0,("string_to_sid: Sid %s does not start with 'S-'.\n", sidstr)); return False; } memset((char *)sidout, '\0', sizeof(DOM_SID)); - + q = p = strdup(sidstr + 2); if (p == NULL) { DEBUG(0, ("string_to_sid: out of memory!\n")); return False; } - + if (!next_token(&p, tok, "-", sizeof(tok))) { DEBUG(0,("string_to_sid: Sid %s is not in a valid format.\n", sidstr)); SAFE_FREE(q); @@ -435,8 +431,6 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr) sid_append_rid(sidout, (uint32)strtoul(tok, NULL, 10)); } - DEBUG(7,("string_to_sid: converted SID %s ok\n", sidstr)); - SAFE_FREE(q); return True; } @@ -522,12 +516,11 @@ DOM_SID *sid_dup(DOM_SID *src) /***************************************************************** Write a sid out into on-the-wire format. *****************************************************************/ - BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid) { size_t i; - if(len < sid_size(sid)) + if (len < sid_size(sid)) return False; SCVAL(outbuf,0,sid->sid_rev_num); @@ -539,6 +532,45 @@ BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid) return True; } +/***************************************************************** + parse a on-the-wire SID to a DOM_SID +*****************************************************************/ +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid) +{ + int i; + if (len < 8) return False; + sid->sid_rev_num = CVAL(inbuf, 0); + sid->num_auths = CVAL(inbuf, 1); + memcpy(sid->id_auth, inbuf+2, 6); + if (len < 8 + sid->num_auths*4) return False; + for (i=0;inum_auths;i++) { + sid->sub_auths[i] = IVAL(inbuf, 8+i*4); + } + return True; +} + + +/***************************************************************** + Compare the auth portion of two sids. +*****************************************************************/ +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2) +{ + int i; + + if (sid1 == sid2) return 0; + if (!sid1) return -1; + if (!sid2) return 1; + + if (sid1->sid_rev_num != sid2->sid_rev_num) + return sid1->sid_rev_num - sid2->sid_rev_num; + + for (i = 0; i < 6; i++) + if (sid1->id_auth[i] != sid2->id_auth[i]) + return sid1->id_auth[i] - sid2->id_auth[i]; + + return 0; +} + /***************************************************************** Compare two sids. *****************************************************************/ @@ -551,34 +583,89 @@ int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2) if (!sid2) return 1; /* compare most likely different rids, first: i.e start at end */ + if (sid1->num_auths != sid2->num_auths) + return sid1->num_auths - sid2->num_auths; + for (i = sid1->num_auths-1; i >= 0; --i) if (sid1->sub_auths[i] != sid2->sub_auths[i]) return sid1->sub_auths[i] - sid2->sub_auths[i]; - if (sid1->num_auths != sid2->num_auths) - return sid1->num_auths - sid2->num_auths; + return sid_compare_auth(sid1, sid2); +} - if (sid1->sid_rev_num != sid2->sid_rev_num) - return sid1->sid_rev_num - sid2->sid_rev_num; +/***************************************************************** +see if 2 SIDs are in the same domain +this just compares the leading sub-auths +*****************************************************************/ +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2) +{ + int n, i; - for (i = 0; i < 6; i++) - if (sid1->id_auth[i] != sid2->id_auth[i]) - return sid1->id_auth[i] - sid2->id_auth[i]; + n = MIN(sid1->num_auths, sid2->num_auths); - return 0; -} + for (i = n-1; i >= 0; --i) + if (sid1->sub_auths[i] != sid2->sub_auths[i]) + return sid1->sub_auths[i] - sid2->sub_auths[i]; + return sid_compare_auth(sid1, sid2); +} /***************************************************************** Compare two sids. *****************************************************************/ - BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2) { return sid_compare(sid1, sid2) == 0; } +/***************************************************************** + Check if the SID is our domain SID (S-1-5-21-x-y-z). +*****************************************************************/ +BOOL sid_check_is_domain(const DOM_SID *sid) +{ + return sid_equal(sid, &global_sam_sid); +} + + +/***************************************************************** + Check if the SID is the builtin SID (S-1-5-32). +*****************************************************************/ +BOOL sid_check_is_builtin(const DOM_SID *sid) +{ + return sid_equal(sid, &global_sid_Builtin); +} + + +/***************************************************************** + Check if the SID is our domain SID (S-1-5-21-x-y-z). +*****************************************************************/ +BOOL sid_check_is_in_our_domain(const DOM_SID *sid) +{ + DOM_SID dom_sid; + uint32 rid; + + sid_copy(&dom_sid, sid); + sid_split_rid(&dom_sid, &rid); + + return sid_equal(&dom_sid, &global_sam_sid); +} + +/***************************************************************** + Check if the SID is our domain SID (S-1-5-21-x-y-z). +*****************************************************************/ +BOOL sid_check_is_in_builtin(const DOM_SID *sid) +{ + DOM_SID dom_sid; + uint32 rid; + + sid_copy(&dom_sid, sid); + sid_split_rid(&dom_sid, &rid); + + return sid_equal(&dom_sid, &global_sid_Builtin); +} + + /***************************************************************** Calculates size of a sid. *****************************************************************/ @@ -606,7 +693,7 @@ BOOL non_mappable_sid(DOM_SID *sid) if (sid_equal(&dom, &global_sid_Builtin)) return True; - if (sid_equal(&dom, &global_sid_Creator_Owner_Domain)) + if (sid_equal(&dom, &global_sid_Creator_Owner_Domain)) return True; if (sid_equal(&dom, &global_sid_NT_Authority)) @@ -614,3 +701,20 @@ BOOL non_mappable_sid(DOM_SID *sid) return False; } + +/* + return the binary string representation of a DOM_SID + caller must free +*/ +char *sid_binstring(DOM_SID *sid) +{ + char *buf, *s; + int len = sid_size(sid); + buf = malloc(len); + if (!buf) return NULL; + sid_linearize(buf, len, sid); + s = binary_string(buf, len); + free(buf); + return s; +} + diff --git a/source/lib/util_str.c b/source/lib/util_str.c index df0242ff3be..a2b01a0fc7e 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1310,3 +1310,25 @@ char *string_truncate(char *s, int length) } return s; } + +/* + return a RFC2254 binary string representation of a buffer + used in LDAP filters + caller must free +*/ +char *binary_string(char *buf, int len) +{ + char *s; + int i, j; + const char *hex = "0123456789ABCDEF"; + s = malloc(len * 3 + 1); + if (!s) return NULL; + for (j=i=0;i> 4]; + s[j+2] = hex[((unsigned char)buf[i]) & 0xF]; + j += 3; + } + s[j] = 0; + return s; +} diff --git a/source/smbd/uid.c b/source/smbd/uid.c index 5204f36ad6e..64dce1679f2 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -611,6 +611,11 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) fstring dom_name, name, sid_str; enum SID_NAME_USE name_type; + + /* if we know its local then don't try winbindd */ + if (sid_compare_domain(&global_sam_sid, psid) == 0) + return local_sid_to_uid(puid, psid, sidtype); + *sidtype = SID_NAME_UNKNOWN; /* @@ -643,7 +648,7 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) if (!winbind_sid_to_uid(puid, psid)) { DEBUG(10,("sid_to_uid: winbind lookup for sid %s failed.\n", sid_to_string(sid_str, psid) )); - return False; + return local_sid_to_uid(puid, psid, sidtype);; } DEBUG(10,("sid_to_uid: winbindd %s -> %u\n", -- cgit From ef5568ebf6b06746a698ee4405b6797efed0ebfd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 13 Mar 2002 17:09:45 +0000 Subject: support more printer change notification events for cli_spoolss_reply_rrpcn(). Things like comment and location fields are updated correctly in Explorer. However, the notification seems to still be broken when the SPOOLSS_FFPCN is called on a printer server handle (as opposed to a printer handle). --- source/include/proto.h | 60 +++++++++++++++++++++++++ source/include/rpc_spoolss.h | 2 + source/rpc_client/cli_spoolss_notify.c | 80 +++++++++++++++++++++++----------- source/rpc_server/srv_spoolss.c | 2 +- source/rpc_server/srv_spoolss_nt.c | 44 +++++++++++-------- 5 files changed, 145 insertions(+), 43 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index b866d80e222..0d55d8b294c 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -3979,11 +3979,71 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER SPOOL_R_DELETEPRINTERDRIVER *r_u); WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u); WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u); +void spoolss_notify_server_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx) ; +void spoolss_notify_printer_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_share_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_port_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); void spoolss_notify_driver_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); +void spoolss_notify_comment(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_location(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_sepfile(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_print_processor(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_parameters(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_datatype(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_attributes(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_cjobs(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id); WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u); WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 4bf4a2cec54..c64ed456a6a 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -318,6 +318,7 @@ * Set of macros for flagging what changed in the PRINTER_INFO_2 struct * when sending messages to other smbd's */ +#define PRINTER_MESSAGE_NULL 0x00000000 #define PRINTER_MESSAGE_DRIVER 0x00000001 #define PRINTER_MESSAGE_COMMENT 0x00000002 #define PRINTER_MESSAGE_PRINTERNAME 0x00000004 @@ -331,6 +332,7 @@ #define PRINTER_MESSAGE_CJOBS 0x00000400 #define PRINTER_MESSAGE_PORT 0x00000800 #define PRINTER_MESSAGE_SHARENAME 0x00001000 +#define PRINTER_MESSAGE_ATTRIBUTES 0x00002000 typedef struct printer_message_info { uint32 low; /* PRINTER_CHANGE_XXX */ diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 8353f5c33b7..502efd937b5 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -21,11 +21,36 @@ */ #include "includes.h" +#if 0 #include "rpc_parse.h" #include "nterr.h" - +#endif extern pstring global_myname; +struct msg_info_table { + uint32 msg; + uint32 field; + char* name; + void (*construct_fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); +}; + +struct msg_info_table msg_table[] = { +{ PRINTER_MESSAGE_DRIVER, PRINTER_NOTIFY_DRIVER_NAME, "PRINTER_MESSAGE_DRIVER", spoolss_notify_driver_name }, +{ PRINTER_MESSAGE_ATTRIBUTES, PRINTER_NOTIFY_ATTRIBUTES, "PRINTER_MESSAGE_ATTRIBUTES", spoolss_notify_attributes }, +{ PRINTER_MESSAGE_COMMENT, PRINTER_NOTIFY_COMMENT, "PRINTER_MESSAGE_COMMENT", spoolss_notify_comment }, +{ PRINTER_MESSAGE_LOCATION, PRINTER_NOTIFY_LOCATION, "PRINTER_MESSAGE_LOCATION", spoolss_notify_location }, +{ PRINTER_MESSAGE_PRINTERNAME, PRINTER_NOTIFY_PRINTER_NAME, "PRINTER_MESSAGE_PRINTERNAME", spoolss_notify_printer_name }, +{ PRINTER_MESSAGE_SHARENAME, PRINTER_NOTIFY_SHARE_NAME, "PRINTER_MESSAGE_SHARENAME", spoolss_notify_share_name }, +{ PRINTER_MESSAGE_PORT, PRINTER_NOTIFY_PORT_NAME, "PRINTER_MESSAGE_PORT", spoolss_notify_port_name }, +{ PRINTER_MESSAGE_CJOBS, PRINTER_NOTIFY_CJOBS, "PRINTER_MESSAGE_CJOBS", spoolss_notify_cjobs }, +{ PRINTER_MESSAGE_SEPFILE, PRINTER_NOTIFY_SEPFILE, "PRINTER_MESSAGE_SEPFILE", spoolss_notify_sepfile }, +{ PRINTER_MESSAGE_PARAMS, PRINTER_NOTIFY_PARAMETERS, "PRINTER_MESSAGE_PARAMETERS", spoolss_notify_parameters }, +{ PRINTER_MESSAGE_DATATYPE, PRINTER_NOTIFY_DATATYPE, "PRINTER_MESSAGE_DATATYPE", spoolss_notify_datatype }, +{ PRINTER_MESSAGE_NULL, 0x0, "", NULL }, +}; + /********************************************************* Disconnect from the client machine. **********************************************************/ @@ -307,31 +332,36 @@ static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, u { SPOOL_NOTIFY_INFO_DATA *data; uint32 idx = 0; - - /* Changing the printer driver */ - - if (flags & PRINTER_MESSAGE_DRIVER) { - DEBUG(10,("build_notify_data: PRINTER_MESSAGE_DRIVER set on [%s][%d]\n", - printer->info_2->printername, idx)); - if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { - DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n", - (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); - return -1; + int i = 0; + + while ((msg_table[i].msg != PRINTER_MESSAGE_NULL) && flags) + { + if (flags & msg_table[i].msg) + { + DEBUG(10,("build_notify_data: %s set on [%s][%d]\n", msg_table[i].name, + printer->info_2->printername, idx)); + if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n", + (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))); + return -1; + } + *notify_data = data; + + /* clear memory */ + memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); + + /* + * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE + * See PRINTER_NOTIFY_INFO_DATA entries in MSDN + * --jerry + */ + construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, msg_table[i].field, 0x00); + + msg_table[i].construct_fn(-1, *notify_data+idx, NULL, printer, ctx); + idx++; } - *notify_data = data; - - /* clear memory */ - memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA)); - - /* - * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE - * See PRINTER_NOTIFY_INFO_DATA entries in MSDN - * --jerry - */ - construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, 0x00); - - spoolss_notify_driver_name(-1, *notify_data+idx, NULL, printer, ctx); - idx++; + + i++; } return idx; diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index e71bcd36a9a..8f1236eaf22 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -1397,11 +1397,11 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors }, {"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob }, {"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes }, +#if 0 {"SPOOLSS_GETPRINTERDATAEX", SPOOLSS_GETPRINTERDATAEX, api_spoolss_getprinterdataex }, {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex }, {"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey }, {"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex }, -#if 0 /* Disabled because it doesn't fix the bug I am looking at but it would be a shame to throw away the code. -tpot */ {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory}, diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index a3e96d03002..b8c472ef2bd 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -599,6 +599,8 @@ static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, if (valid_notify_options(Printer)) { /* This is a single call that can send information about multiple changes */ + if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) + msg->flags |= PRINTER_MESSAGE_ATTRIBUTES; result = cli_spoolss_reply_rrpcn(cli, cli->mem_ctx, &Printer->notify.client_hnd, msg, info); } @@ -1545,7 +1547,7 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE * fill a notify_info_data with the servername ********************************************************************/ -static void spoolss_notify_server_name(int snum, +void spoolss_notify_server_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1573,7 +1575,7 @@ static void spoolss_notify_server_name(int snum, * fill a notify_info_data with the printername (not including the servername). ********************************************************************/ -static void spoolss_notify_printer_name(int snum, +void spoolss_notify_printer_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1608,7 +1610,7 @@ static void spoolss_notify_printer_name(int snum, * fill a notify_info_data with the servicename ********************************************************************/ -static void spoolss_notify_share_name(int snum, +void spoolss_notify_share_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1635,7 +1637,7 @@ static void spoolss_notify_share_name(int snum, * fill a notify_info_data with the port name ********************************************************************/ -static void spoolss_notify_port_name(int snum, +void spoolss_notify_port_name(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1692,7 +1694,7 @@ void spoolss_notify_driver_name(int snum, * fill a notify_info_data with the comment ********************************************************************/ -static void spoolss_notify_comment(int snum, +void spoolss_notify_comment(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1724,7 +1726,7 @@ static void spoolss_notify_comment(int snum, * location = "Room 1, floor 2, building 3" ********************************************************************/ -static void spoolss_notify_location(int snum, +void spoolss_notify_location(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1764,7 +1766,7 @@ static void spoolss_notify_devmode(int snum, * fill a notify_info_data with the separator file name ********************************************************************/ -static void spoolss_notify_sepfile(int snum, +void spoolss_notify_sepfile(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1792,7 +1794,7 @@ static void spoolss_notify_sepfile(int snum, * jfm:xxxx return always winprint to indicate we don't do anything to it ********************************************************************/ -static void spoolss_notify_print_processor(int snum, +void spoolss_notify_print_processor(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1820,7 +1822,7 @@ static void spoolss_notify_print_processor(int snum, * jfm:xxxx send an empty string ********************************************************************/ -static void spoolss_notify_parameters(int snum, +void spoolss_notify_parameters(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1848,7 +1850,7 @@ static void spoolss_notify_parameters(int snum, * jfm:xxxx always send RAW as data type ********************************************************************/ -static void spoolss_notify_datatype(int snum, +void spoolss_notify_datatype(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1892,7 +1894,7 @@ static void spoolss_notify_security_desc(int snum, * jfm:xxxx a samba printer is always shared ********************************************************************/ -static void spoolss_notify_attributes(int snum, +void spoolss_notify_attributes(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -1979,7 +1981,7 @@ static void spoolss_notify_status(int snum, * fill a notify_info_data with the number of jobs queued ********************************************************************/ -static void spoolss_notify_cjobs(int snum, +void spoolss_notify_cjobs(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, @@ -2766,8 +2768,13 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) printer->global_counter = global_counter; printer->total_pages = 0; +#if 0 /* JERRY */ printer->major_version = 0x0004; /* NT 4 */ printer->build_version = 0x0565; /* build 1381 */ +#else + printer->major_version = 0x0005; /* NT 5 */ + printer->build_version = 0x0893; /* build 2195 */ +#endif printer->unknown7 = 0x1; printer->unknown8 = 0x0; printer->unknown9 = 0x0; @@ -2816,6 +2823,7 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, printer->flags=flags; +#if 0 /* JERRY - wrong */ /* Strip server name from printer name if we are doing an enum */ if (is_enum) { @@ -2826,6 +2834,7 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, if (p) fstrcpy(ntprinter->info_2->printername, p + 1); } +#endif if (*ntprinter->info_2->comment == '\0') { init_unistr(&printer->comment, lp_comment(snum)); @@ -3123,7 +3132,11 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 if (lp_browseable(snum) && lp_snum_ok(snum) && lp_print_ok(snum) ) { DEBUG(4,("Found a printer in smb.conf: %s[%x]\n", lp_servicename(snum), snum)); +#if 0 /* JERRY */ if (construct_printer_info_1(flags, ¤t_prt, snum, True)) { +#else + if (construct_printer_info_1(flags, ¤t_prt, snum, False)) { +#endif if((tp=Realloc(printers, (*returned +1)*sizeof(PRINTER_INFO_1))) == NULL) { DEBUG(2,("enum_all_printers_info_1: failed to enlarge printers buffer!\n")); SAFE_FREE(printers); @@ -4557,9 +4570,9 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum) /* we force some elements to "correct" values */ slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", get_called_name()); - slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s", - get_called_name(), lp_servicename(snum)); fstrcpy(info->sharename, lp_servicename(snum)); + slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s", + get_called_name(), info->sharename); info->attributes = PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK; return True; @@ -5024,9 +5037,6 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, if (!strequal(printer->info_2->location, old_printer->info_2->location)) change_flag |= PRINTER_MESSAGE_LOCATION; - if (!(change_flag & PRINTER_MESSAGE_DRIVER)) - goto done; - ZERO_STRUCT(msg); msg.low = PRINTER_CHANGE_ADD_PRINTER; -- cgit From e7225a6cfda330d38c8b0c9d2146d327f21576e9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 13 Mar 2002 20:28:36 +0000 Subject: include/smb_macros.h: Don't round up an allocation if the size is zero. "One of these locks is not like the others... One of these locks is not quite the same" :-). When is a zero timeout lock not zero ? When it's being processed by Windows 2000 of course.. This code change, ugly though it is - completely fixes the foxpro/access multi-user file system database problems that people have been having. I used a *wonderful* test program donated by "Gerald Drouillard" which allowed me to completely reproduce this problem, and to finally determine the correct fix. This also explains why Windows 2000 is *so slow* when responding to the smbtorture lock tests. I *love* it when all these things come together and finally make sense :-). Jeremy. --- source/include/proto.h | 4 +++- source/include/smb_macros.h | 2 +- source/locking/locking.c | 26 +++++++++++++++++++++++++- source/param/loadparm.c | 8 ++++++++ source/smbd/blocking.c | 6 +++--- source/smbd/reply.c | 13 ++++++++----- 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 0d55d8b294c..a6c9d181350 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1352,7 +1352,7 @@ int brl_forall(BRLOCK_FN(fn)); BOOL is_locked(files_struct *fsp,connection_struct *conn, SMB_BIG_UINT count,SMB_BIG_UINT offset, enum brl_type lock_type, BOOL check_self); -NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, +NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid, SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type); NTSTATUS do_unlock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, SMB_BIG_UINT count,SMB_BIG_UINT offset); @@ -1926,6 +1926,8 @@ 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_lock_spin_count(void); +int lp_lock_sleep_time(void); char *lp_preexec(int ); char *lp_postexec(int ); char *lp_rootpreexec(int ); diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 5155d241d84..095d7324de0 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -162,7 +162,7 @@ #define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__) #define SMB_ROUNDUP(x,g) (((x)+((g)-1))&~((g)-1)) -#define SMB_ROUNDUP_ALLOCATION(s) (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) +#define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 ) /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ #define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2) diff --git a/source/locking/locking.c b/source/locking/locking.c index 8c7b9bf9194..22343d36f69 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -98,7 +98,7 @@ BOOL is_locked(files_struct *fsp,connection_struct *conn, Utility function called by locking requests. ****************************************************************************/ -NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, +static NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type) { NTSTATUS status; @@ -142,6 +142,30 @@ NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, return status; } +/**************************************************************************** + Utility function called by locking requests. This is *DISGISTING*. It also + appears to be "What Windows Does" (tm). Andrew, ever wonder why Windows 2000 + is so slow on the locking tests...... ? This is the reason. Much though I hate + it, we need this. JRA. +****************************************************************************/ + +NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid, + SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type) +{ + int j, maxj = lp_lock_spin_count(); + int sleeptime = lp_lock_sleep_time(); + NTSTATUS status; + + for (j = 0; j < maxj; j++) { + status = do_lock(fsp, conn, lock_pid, count, offset, lock_type); + if (!NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED) && + !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) + break; + usleep(sleeptime); + } + return status; +} + /**************************************************************************** Utility function called by unlocking requests. ****************************************************************************/ diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 0cbd6efd654..9b55587fe22 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -208,6 +208,8 @@ typedef struct int min_passwd_length; int oplock_break_wait_time; int winbind_cache_time; + int iLockSpinCount; + int iLockSpinTime; #ifdef WITH_LDAP_SAM int ldap_port; int ldap_ssl; @@ -972,6 +974,8 @@ static struct parm_struct parm_table[] = { {"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, {"kernel oplocks", P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, {"locking", P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"lock spin count", P_INTEGER, P_GLOBAL, &Globals.iLockSpinCount, NULL, NULL, FLAG_GLOBAL}, + {"lock spin time", P_INTEGER, P_GLOBAL, &Globals.iLockSpinTime, NULL, NULL, FLAG_GLOBAL}, {"oplocks", P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"level2 oplocks", P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, @@ -1327,6 +1331,8 @@ static void init_globals(void) Globals.min_passwd_length = MINPASSWDLENGTH; /* By Default, 5. */ Globals.oplock_break_wait_time = 0; /* By Default, 0 msecs. */ Globals.enhanced_browsing = True; + Globals.iLockSpinCount = 3; /* Try 2 times. */ + Globals.iLockSpinTime = 10; /* usec. */ #ifdef MMAP_BLACKLIST Globals.bUseMmap = False; #else @@ -1638,6 +1644,8 @@ 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) +FN_GLOBAL_INTEGER(lp_lock_spin_count, &Globals.iLockSpinCount) +FN_GLOBAL_INTEGER(lp_lock_sleep_time, &Globals.iLockSpinTime) FN_LOCAL_STRING(lp_preexec, szPreExec) FN_LOCAL_STRING(lp_postexec, szPostExec) FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec) diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c index bc8c54caf7c..d4a53d9a6d9 100644 --- a/source/smbd/blocking.c +++ b/source/smbd/blocking.c @@ -279,7 +279,7 @@ static BOOL process_lockread(blocking_lock_record *blr) numtoread = MIN(BUFFER_SIZE-outsize,numtoread); data = smb_buf(outbuf) + 3; - status = do_lock( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread, + status = do_lock_spin( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, READ_LOCK); if (NT_STATUS_V(status)) { if ((errno != EACCES) && (errno != EAGAIN)) { @@ -345,7 +345,7 @@ static BOOL process_lock(blocking_lock_record *blr) offset = IVAL(inbuf,smb_vwv3); errno = 0; - status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count, + status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count, (SMB_BIG_UINT)offset, WRITE_LOCK); if (NT_STATUS_IS_ERR(status)) { if((errno != EACCES) && (errno != EAGAIN)) { @@ -417,7 +417,7 @@ static BOOL process_lockingX(blocking_lock_record *blr) * request would never have been queued. JRA. */ errno = 0; - status = do_lock(fsp,conn,lock_pid,count,offset, + status = do_lock_spin(fsp,conn,lock_pid,count,offset, ((locktype & 1) ? READ_LOCK : WRITE_LOCK)); if (NT_STATUS_IS_ERR(status)) break; } diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 74a7982805d..2227a066ecb 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2243,7 +2243,7 @@ int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length * for a write lock. JRA. */ - status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), + status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, WRITE_LOCK); if (NT_STATUS_V(status)) { @@ -3054,7 +3054,7 @@ int reply_lock(connection_struct *conn, DEBUG(3,("lock fd=%d fnum=%d offset=%.0f count=%.0f\n", fsp->fd, fsp->fnum, (double)offset, (double)count)); - status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), count, offset, WRITE_LOCK); + status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), count, offset, WRITE_LOCK); if (NT_STATUS_V(status)) { if (lp_blocking_locks(SNUM(conn))) { /* @@ -4472,6 +4472,7 @@ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name)); } /* Setup the timeout in seconds. */ + lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000); /* Now do any requested locks */ @@ -4493,11 +4494,13 @@ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name)); return ERROR_DOS(ERRDOS,ERRnoaccess); } - DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s\n", - (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name )); + DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s timeout = %d\n", + (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name, + (int)lock_timeout )); - status = do_lock(fsp,conn,lock_pid, count,offset, + status = do_lock_spin(fsp,conn,lock_pid, count,offset, ((locktype & 1) ? READ_LOCK : WRITE_LOCK)); + if (NT_STATUS_V(status)) { if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn))) { /* -- cgit From 78d79ecd166041124817d9f866aa0e1abdb0a2ec Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 13 Mar 2002 20:50:04 +0000 Subject: Ensure we attempt to lock at least once. Only sleep if time param set. Jeremy. --- source/locking/locking.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/locking/locking.c b/source/locking/locking.c index 22343d36f69..883054857ab 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -156,12 +156,16 @@ NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid int sleeptime = lp_lock_sleep_time(); NTSTATUS status; + if (maxj <= 0) + maxj = 1; + for (j = 0; j < maxj; j++) { status = do_lock(fsp, conn, lock_pid, count, offset, lock_type); if (!NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED) && !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) break; - usleep(sleeptime); + if (sleeptime) + usleep(sleeptime); } return status; } -- cgit From 323cb62710b92591086d9aea8155d5a26abb701c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 14 Mar 2002 00:58:49 +0000 Subject: Backed out enumprinters stuff - leave it for another day. --- source/printing/nt_printing.c | 14 ++++---------- source/rpc_server/srv_spoolss_nt.c | 39 +++++++++----------------------------- 2 files changed, 13 insertions(+), 40 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index b3c17b8d719..722af4cfd1b 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2522,11 +2522,8 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin snum = lp_servicenumber(sharename); slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); - strupper(info.servername); - slprintf(info.printername, sizeof(info.printername)-1, "\\\\%s\\", - get_called_name()); - strupper(info.printername); - fstrcat(info.printername, sharename); + slprintf(info.printername, sizeof(info.printername)-1, "\\\\%s\\%s", + get_called_name(), sharename); fstrcpy(info.sharename, sharename); fstrcpy(info.portname, SAMBA_PRINTER_PORT_NAME); fstrcpy(info.drivername, lp_printerdriver(snum)); @@ -2644,11 +2641,8 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen /* Restore the stripped strings. */ slprintf(info.servername, sizeof(info.servername)-1, "\\\\%s", get_called_name()); - strupper(info.servername); - - slprintf(printername, sizeof(printername)-1, "\\\\%s\\", get_called_name()); - strupper(printername); - fstrcat(printername, info.printername); + slprintf(printername, sizeof(printername)-1, "\\\\%s\\%s", get_called_name(), + info.printername); fstrcpy(info.printername, printername); len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index b8c472ef2bd..64af2b4ff45 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2806,13 +2806,8 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) /******************************************************************** * construct_printer_info_1 * fill a printer_info_1 struct - * - * The is_enum parameter says whether the PRINTER_INFO_1 returned is - * to be used in an enumprinters call. This affects whether the netbios - * name of the server is prefixed to the printer and server names. ********************************************************************/ -static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, - int snum, BOOL is_enum) +static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int snum) { pstring chaine; pstring chaine2; @@ -2823,27 +2818,15 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, printer->flags=flags; -#if 0 /* JERRY - wrong */ - /* Strip server name from printer name if we are doing an enum */ - - if (is_enum) { - char *p; - - p = strchr(ntprinter->info_2->printername + 2, '\\'); - - if (p) - fstrcpy(ntprinter->info_2->printername, p + 1); - } -#endif - if (*ntprinter->info_2->comment == '\0') { init_unistr(&printer->comment, lp_comment(snum)); - slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, lp_comment(snum)); - } else { + slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, + ntprinter->info_2->drivername, lp_comment(snum)); + } + else { init_unistr(&printer->comment, ntprinter->info_2->comment); /* saved comment. */ - slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, ntprinter->info_2->comment); + slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, + ntprinter->info_2->drivername, ntprinter->info_2->comment); } slprintf(chaine2,sizeof(chaine)-1,"%s", ntprinter->info_2->printername); @@ -3132,11 +3115,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 if (lp_browseable(snum) && lp_snum_ok(snum) && lp_print_ok(snum) ) { DEBUG(4,("Found a printer in smb.conf: %s[%x]\n", lp_servicename(snum), snum)); -#if 0 /* JERRY */ - if (construct_printer_info_1(flags, ¤t_prt, snum, True)) { -#else - if (construct_printer_info_1(flags, ¤t_prt, snum, False)) { -#endif + if (construct_printer_info_1(flags, ¤t_prt, snum)) { if((tp=Realloc(printers, (*returned +1)*sizeof(PRINTER_INFO_1))) == NULL) { DEBUG(2,("enum_all_printers_info_1: failed to enlarge printers buffer!\n")); SAFE_FREE(printers); @@ -3500,7 +3479,7 @@ static WERROR getprinter_level_1(int snum, NEW_BUFFER *buffer, uint32 offered, u if((printer=(PRINTER_INFO_1*)malloc(sizeof(PRINTER_INFO_1))) == NULL) return WERR_NOMEM; - construct_printer_info_1(PRINTER_ENUM_ICON8, printer, snum, False); + construct_printer_info_1(PRINTER_ENUM_ICON8, printer, snum); /* check the required size. */ *needed += spoolss_size_printer_info_1(printer); -- cgit From 1e5ab994b27d8fb6b5f119d1a61f9e92a0df9a9f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 00:58:58 +0000 Subject: Get the current directory after becoming root. Jeremy. --- source/smbd/oplock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index cae94bc7a8f..1355ee558ce 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -730,8 +730,8 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id, saved_user_conn = current_user.conn; saved_vuid = current_user.vuid; saved_fsp_conn = fsp->conn; - vfs_GetWd(saved_fsp_conn,saved_dir); change_to_root_user(); + vfs_GetWd(saved_fsp_conn,saved_dir); /* Save the chain fnum. */ file_chain_save(); -- cgit From 56d3718275f06a6fd68801a00dfd801337882aeb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 01:05:38 +0000 Subject: Use sys_usleep not usleep. Jeremy. --- source/locking/locking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/locking/locking.c b/source/locking/locking.c index 883054857ab..9d70e00d226 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -165,7 +165,7 @@ NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) break; if (sleeptime) - usleep(sleeptime); + sys_usleep(sleeptime); } return status; } -- cgit From e55c268d534b034a77c5d97e7ed0115e048d2f05 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 01:32:29 +0000 Subject: Added winbindd pidfile create call. Jeremy. --- source/nsswitch/winbindd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 6fe06c661a0..8f8d14bdc30 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -821,6 +821,8 @@ int main(int argc, char **argv) exit(1); } + pidfile_create("winbindd"); + codepage_initialise(lp_client_code_page()); /* Setup names. */ -- cgit From 4b8b4601df486b385d82c4afc5e2c221ff9b24c1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 02:15:10 +0000 Subject: Now we have reliable signals take SIGTERM inband. Jeremy. --- source/smbd/process.c | 14 ++++++--- source/smbd/server.c | 87 +++++++++++++++++++++++++++------------------------ 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/source/smbd/process.c b/source/smbd/process.c index 1299fd20e3a..e882853e6de 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -47,6 +47,7 @@ extern int global_oplock_break; extern userdom_struct current_user_info; extern int smb_read_error; extern VOLATILE sig_atomic_t reload_after_sighup; +extern VOLATILE sig_atomic_t got_sig_term; extern BOOL global_machine_password_needs_changing; extern fstring global_myworkgroup; extern pstring global_myname; @@ -108,9 +109,10 @@ BOOL push_oplock_pending_smb_message(char *buf, int msg_len) } /**************************************************************************** -do all async processing in here. This includes UDB oplock messages, kernel -oplock messages, change notify events etc. + Do all async processing in here. This includes UDB oplock messages, kernel + oplock messages, change notify events etc. ****************************************************************************/ + static void async_processing(fd_set *fds, char *buffer, int buffer_len) { /* check for oplock messages (both UDP and kernel) */ @@ -118,6 +120,10 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len) process_local_message(buffer, buffer_len); } + if (got_sig_term) { + exit_server("Caught TERM signal"); + } + /* check for async change notify events */ process_pending_change_notify_queue(0); @@ -126,7 +132,7 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len) change_to_root_user(); DEBUG(1,("Reloading services after SIGHUP\n")); reload_services(False); - reload_after_sighup = False; + reload_after_sighup = 0; } } @@ -1063,7 +1069,7 @@ void check_reload(int t) if (reload_after_sighup || (t >= last_smb_conf_reload_time+SMBD_RELOAD_CHECK)) { reload_services(True); - reload_after_sighup = False; + reload_after_sighup = 0; last_smb_conf_reload_time = t; } } diff --git a/source/smbd/server.c b/source/smbd/server.c index 73709c408f6..a5fcfcbf535 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -61,26 +61,43 @@ void smbd_set_server_fd(int fd) } /**************************************************************************** - when exiting, take the whole family + Terminate signal. ****************************************************************************/ -static void *dflt_sig(void) + +VOLATILE sig_atomic_t got_sig_term = 0; + +static void sig_term(void) +{ + got_sig_term = 1; + sys_select_signal(); +} + +/**************************************************************************** + Catch a sighup. +****************************************************************************/ + +VOLATILE sig_atomic_t reload_after_sighup = 0; + +static void sig_hup(int sig) { - exit_server("caught signal"); - return NULL; + reload_after_sighup = 1; + sys_select_signal(); } /**************************************************************************** Send a SIGTERM to our process group. *****************************************************************************/ + static void killkids(void) { - if(am_parent) kill(0,SIGTERM); + if(am_parent) + kill(0,SIGTERM); } - /**************************************************************************** - open the socket communication + Open the socket communication - inetd. ****************************************************************************/ + static BOOL open_sockets_inetd(void) { /* Started from inetd. fd 0 is the socket. */ @@ -97,10 +114,10 @@ static BOOL open_sockets_inetd(void) return True; } - /**************************************************************************** - open the socket communication + Open the socket communication. ****************************************************************************/ + static BOOL open_sockets(BOOL is_daemon,BOOL interactive, int port) { int num_interfaces = iface_count(); @@ -212,10 +229,13 @@ max can be %d\n", num = sys_select(FD_SETSIZE,&lfds,NULL,NULL,NULL); if (num == -1 && errno == EINTR) { - extern VOLATILE sig_atomic_t reload_after_sighup; + if (got_sig_term) { + exit_server("Caught TERM signal"); + } /* check for sighup processing */ if (reload_after_sighup) { + DEBUG(0,("Got SIGHUP\n")); change_to_root_user(); DEBUG(1,("Reloading services after SIGHUP\n")); reload_services(False); @@ -320,8 +340,9 @@ max can be %d\n", } /**************************************************************************** - reload the services file - **************************************************************************/ + Reload the services file. + **************************************************************************/ + BOOL reload_services(BOOL test) { BOOL ret; @@ -370,30 +391,11 @@ BOOL reload_services(BOOL test) return(ret); } - - -/**************************************************************************** - Catch a sighup. -****************************************************************************/ - -VOLATILE sig_atomic_t reload_after_sighup = False; - -static void sig_hup(int sig) -{ - BlockSignals(True,SIGHUP); - DEBUG(0,("Got SIGHUP\n")); - - sys_select_signal(); - reload_after_sighup = True; - BlockSignals(False,SIGHUP); -} - - - #if DUMP_CORE /******************************************************************* -prepare to dump a core file - carefully! + Prepare to dump a core file - carefully ! ********************************************************************/ + static BOOL dump_core(void) { char *p; @@ -443,8 +445,9 @@ static void decrement_smbd_process_count(void) } /**************************************************************************** -exit the server + Exit the server. ****************************************************************************/ + void exit_server(char *reason) { static int firsttime=1; @@ -494,8 +497,9 @@ void exit_server(char *reason) } /**************************************************************************** - initialise connect, service and file structs + Initialise connect, service and file structs. ****************************************************************************/ + static void init_structs(void ) { /* @@ -526,8 +530,9 @@ static void init_structs(void ) } /**************************************************************************** -usage on the program + Usage on the program. ****************************************************************************/ + static void usage(char *pname) { @@ -548,10 +553,10 @@ static void usage(char *pname) printf("\n"); } - /**************************************************************************** - main program + main program. ****************************************************************************/ + int main(int argc,char *argv[]) { extern BOOL append_log; @@ -668,7 +673,8 @@ static void usage(char *pname) gain_root_group_privilege(); fault_setup((void (*)(void *))exit_server); - CatchSignal(SIGTERM , SIGNAL_CAST dflt_sig); + CatchSignal(SIGTERM , SIGNAL_CAST sig_term); + CatchSignal(SIGHUP,SIGNAL_CAST sig_hup); /* we are never interested in SIGPIPE */ BlockSignals(True,SIGPIPE); @@ -687,6 +693,7 @@ static void usage(char *pname) * these signals masked, we will have problems, as we won't recieve them. */ BlockSignals(False, SIGHUP); BlockSignals(False, SIGUSR1); + BlockSignals(False, SIGTERM); /* we want total control over the permissions on created files, so set our umask to 0 */ @@ -737,8 +744,6 @@ static void usage(char *pname) fstrcpy(global_myworkgroup, lp_workgroup()); - CatchSignal(SIGHUP,SIGNAL_CAST sig_hup); - DEBUG(3,( "loaded services\n")); if (!is_daemon && !is_a_socket(0)) { -- cgit From 6ef89a569ff8874393ce239e365dc58839a354a3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 04:10:04 +0000 Subject: Fix core dumps on lookup_name/lookup_sid returning SID_NAME_UNKNOWN. Jeremy. --- source/nsswitch/winbindd_util.c | 86 +++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index fe60c0a3902..5e700424bc9 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -388,6 +388,14 @@ static BOOL winbindd_lookup_name_by_sid_in_cache(DOM_SID *sid, fstring name, enu return True; } +static void store_negative_sid_by_name(char *name) +{ + DOM_SID nullsid; + + ZERO_STRUCT(nullsid); + store_sid_by_name_in_cache(name, &nullsid, SID_NAME_USE_NONE); +} + /* Lookup a sid in a domain from a name */ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *type) @@ -412,6 +420,10 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty return True; } + /* Setup for fail. */ + *type = SID_NAME_UNKNOWN; + ZERO_STRUCTP(sid); + /* Lookup name */ if (!(mem_ctx = talloc_init())) @@ -428,33 +440,41 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty SID_NAME_USE_NONE. */ if (!NT_STATUS_IS_OK(result)) { - DOM_SID nullsid; - - ZERO_STRUCT(nullsid); - store_sid_by_name_in_cache(name, &nullsid, SID_NAME_USE_NONE); + store_negative_sid_by_name(name); *type = SID_NAME_UNKNOWN; + goto done; + } + if (sids == NULL || types == NULL || ((enum SID_NAME_USE)types[0]) == SID_NAME_UNKNOWN) { + store_negative_sid_by_name(name); + *type = SID_NAME_UNKNOWN; + result = NT_STATUS_NONE_MAPPED; goto done; } - /* Return sid */ - - if ((sid != NULL) && (sids != NULL)) - sid_copy(sid, &sids[0]); - - /* Return name type */ - - if ((type != NULL) && (types != NULL)) - *type = (enum SID_NAME_USE)types[0]; - + /* Return sid and type */ + + sid_copy(sid, &sids[0]); + *type = (enum SID_NAME_USE)types[0]; + /* Now we do a reverse lookup of the SID to get the correct capitalisation of the name. */ result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol, 1, sids, &names, &types, &num_names); - if (!NT_STATUS_IS_OK(result)) + /* Tests for results being ok. */ + + if (!NT_STATUS_IS_OK(result)) { + *type = SID_NAME_UNKNOWN; goto done; + } + + if (names == NULL || types == NULL || ((enum SID_NAME_USE)types[0]) == SID_NAME_UNKNOWN) { + *type = SID_NAME_UNKNOWN; + result = NT_STATUS_NONE_MAPPED; + goto done; + } /* Store the forward and reverse map of this lookup in the cache. */ @@ -465,8 +485,8 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty &sids[0], names[0], (enum SID_NAME_USE)types[0]); done: + talloc_destroy(mem_ctx); - return NT_STATUS_IS_OK(result); } @@ -505,6 +525,10 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, return True; } + /* Default fail. */ + *type = SID_NAME_UNKNOWN; + *name = '\0'; + /* Lookup name */ if (!(mem_ctx = talloc_init())) @@ -523,29 +547,33 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, /* Return name */ - if ((names != NULL) && (name != NULL)) + if (names != NULL) fstrcpy(name, names[0]); /* Return name type */ - if ((type != NULL) && (types != NULL)) + if (types != NULL) *type = (enum SID_NAME_USE)types[0]; - store_sid_by_name_in_cache(names[0], sid, (enum SID_NAME_USE)types[0]); - store_name_by_sid_in_cache(sid, names[0], (enum SID_NAME_USE)types[0]); - } else { - /* OK, so we tried to look up a name in this sid, and - * didn't find it. Therefore add a negative cache - * entry. */ - store_name_by_sid_in_cache(sid, "", SID_NAME_USE_NONE); - *type = SID_NAME_UNKNOWN; - fstrcpy(name, name_deadbeef); + if ((*type != SID_NAME_UNKNOWN) && *name) { + store_sid_by_name_in_cache(name, sid, *type); + store_name_by_sid_in_cache(sid, name, *type); + goto done; + } } - + /* OK, so we tried to look up a name in this sid, and + * didn't find it. Therefore add a negative cache + * entry. */ + + store_name_by_sid_in_cache(sid, "", SID_NAME_USE_NONE); + *type = SID_NAME_UNKNOWN; + fstrcpy(name, name_deadbeef); + rv = False; + done: - talloc_destroy(mem_ctx); + talloc_destroy(mem_ctx); return rv; } -- cgit From f1c2f7f0e7a50179c91683ba80096042f06b131a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Mar 2002 17:30:26 +0000 Subject: removed #if 0/ #endif around xxx_printprocessordirectory_xxx(). Not reason not to --- source/rpc_server/srv_spoolss_nt.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 64af2b4ff45..c0289fc344e 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -7585,11 +7585,6 @@ done: /**************************************************************************** ****************************************************************************/ -/* Disabled because it doesn't fix the bug I am looking at but it would be - a shame to throw away the code. -tpot */ - -#if 0 - static void fill_printprocessordirectory_1(PRINTPROCESSOR_DIRECTORY_1 *info, char *name) { init_unistr(&info->name, name); @@ -7667,4 +7662,3 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC return WERR_ACCESS_DENIED; } -#endif -- cgit From d9409d37c236fd259cf9291a9802350b02e6701a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Mar 2002 17:33:10 +0000 Subject: more uncomments --- source/rpc_server/srv_spoolss.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index 8f1236eaf22..07fee04db58 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -1319,11 +1319,6 @@ static BOOL api_spoolss_enumprinterdataex(pipes_struct *p) /**************************************************************************** ****************************************************************************/ -/* Disabled because it doesn't fix the bug I am looking at but it would be - a shame to throw away the code. -tpot */ - -#if 0 - static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p) { SPOOL_Q_GETPRINTPROCESSORDIRECTORY q_u; @@ -1349,8 +1344,6 @@ static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p) return True; } -#endif - /******************************************************************* \pipe\spoolss commands ********************************************************************/ -- cgit From a4ec0bfac7085b128734503ddc18e086f8aca72a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Mar 2002 17:45:50 +0000 Subject: I was 1/2 wrong about set_driver_init_2(). Windows NT/2k does not swap the device mode out for a new driver, but does reset the private data size and driverversion fields. --- source/printing/nt_printing.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 722af4cfd1b..66378e4980a 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2901,22 +2901,43 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) ZERO_STRUCT(info.devmode->devicename); fstrcpy(info.devmode->devicename, info_ptr->printername); -#if 0 /* JERRY */ + /* - * NT/2k does not change the Device Mode of a printer - * when changing the driver. This makes no sense to me - * but it just the way it goes. However, printer data - * should be deleted and reset so I'm leaving that in. - * --jerry + * NT/2k does not change out the entire DeviceMode of a printer + * when changing the driver. Only the driverextra, private, & + * driverversion fields. --jerry (Thu Mar 14 08:58:43 CST 2002) */ +#if 0 /* JERRY */ + /* * Bind the saved DEVMODE to the new the printer. */ free_nt_devicemode(&info_ptr->devmode); info_ptr->devmode = info.devmode; #else - free_nt_devicemode(&info.devmode); + /* copy the entire devmode if we currently don't have one */ + + if (!info_ptr->devmode) { + DEBUG(10,("set_driver_init_2: Current Devmode is NULL. Copying entire Device Mode\n")); + info_ptr->devmode = info.devmode; + } + else { + /* only set the necessary fields */ + + DEBUG(10,("set_driver_init_2: Setting driverversion [0x%x] and private data [0x%x]\n", + info.devmode->driverversion, info.devmode->driverextra)); + + info_ptr->devmode->driverversion = info.devmode->driverversion; + + SAFE_FREE(info_ptr->devmode->private); + info_ptr->devmode->private = NULL; + + if (info.devmode->driverversion) + info_ptr->devmode->private = memdup(info.devmode->private, info.devmode->driverversion); + + free_nt_devicemode(&info.devmode); + } #endif DEBUG(10,("set_driver_init_2: Set printer [%s] init DEVMODE for driver [%s]\n", -- cgit From aabb7dd69f3bc7b67b48c775f800576b32c68fc9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Mar 2002 17:46:38 +0000 Subject: renabled Win2k rpc's. Commented out by mistake. --- source/rpc_server/srv_spoolss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index 07fee04db58..d26b99b5b85 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -1390,11 +1390,11 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors }, {"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob }, {"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes }, -#if 0 {"SPOOLSS_GETPRINTERDATAEX", SPOOLSS_GETPRINTERDATAEX, api_spoolss_getprinterdataex }, {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex }, {"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey }, {"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex }, +#if 0 /* Disabled because it doesn't fix the bug I am looking at but it would be a shame to throw away the code. -tpot */ {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory}, -- cgit From 5dd999bb9ca48e49802f27f3f84fb62d25795ac0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 14 Mar 2002 17:48:49 +0000 Subject: added #define's for bits for the DEVICEMODE.fields member --- source/include/rpc_spoolss.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index c64ed456a6a..2096427476b 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -420,6 +420,44 @@ typedef struct spool_user_ctr_info } SPOOL_USER_CTR; +/* + * various bits in the DEVICEMODE.fields member + */ + +#define DEVMODE_ORIENTATION 0x00000001 +#define DEVMODE_PAPERSIZE 0x00000002 +#define DEVMODE_PAPERLENGTH 0x00000004 +#define DEVMODE_PAPERWIDTH 0x00000008 +#define DEVMODE_SCALE 0x00000010 +#define DEVMODE_POSITION 0x00000020 +#define DEVMODE_NUP 0x00000040 +#define DEVMODE_COPIES 0x00000100 +#define DEVMODE_DEFAULTSOURCE 0x00000200 +#define DEVMODE_PRINTQUALITY 0x00000400 +#define DEVMODE_COLOR 0x00000800 +#define DEVMODE_DUPLEX 0x00001000 +#define DEVMODE_YRESOLUTION 0x00002000 +#define DEVMODE_TTOPTION 0x00004000 +#define DEVMODE_COLLATE 0x00008000 +#define DEVMODE_FORMNAME 0x00010000 +#define DEVMODE_LOGPIXELS 0x00020000 +#define DEVMODE_BITSPERPEL 0x00040000 +#define DEVMODE_PELSWIDTH 0x00080000 +#define DEVMODE_PELSHEIGHT 0x00100000 +#define DEVMODE_DISPLAYFLAGS 0x00200000 +#define DEVMODE_DISPLAYFREQUENCY 0x00400000 +#define DEVMODE_ICMMETHOD 0x00800000 +#define DEVMODE_ICMINTENT 0x01000000 +#define DEVMODE_MEDIATYPE 0x02000000 +#define DEVMODE_DITHERTYPE 0x04000000 +#define DEVMODE_PANNINGWIDTH 0x08000000 +#define DEVMODE_PANNINGHEIGHT 0x10000000 + + +/* + * Devicemode structure + */ + typedef struct devicemode { UNISTR devicename; -- cgit From 8b94b66538d090a6fc593e5cffa63c90f2a2eef2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Mar 2002 18:17:41 +0000 Subject: Fix memory leak in main loop. Found due to help from Don McCall @ HP. Jeremy. --- source/nsswitch/winbindd.c | 1 + source/rpc_parse/parse_misc.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 8f8d14bdc30..ff2a99e7798 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -597,6 +597,7 @@ static void process_loop(int accept_sock) /* Free up temporary memory */ lp_talloc_free(); + main_loop_talloc_free(); /* Initialise fd lists for select() */ diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c index afb829637c3..34f20accf51 100644 --- a/source/rpc_parse/parse_misc.c +++ b/source/rpc_parse/parse_misc.c @@ -15,7 +15,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + e * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -571,7 +571,7 @@ static void create_buffer3(BUFFER3 *str, size_t len) if (len < MAX_BUFFERLEN) len = MAX_BUFFERLEN; - str->buffer = talloc_zero(get_talloc_ctx(), len); + str->buffer = talloc_zero(get_talloc_ctx(), len); if (str->buffer == NULL) smb_panic("create_buffer3: talloc fail\n"); -- cgit From 2c662e7075a68ac3ab0620055eef3713a9bb8cc0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Mar 2002 00:57:10 +0000 Subject: Fixup skel vfs code. Jeremy. --- examples/VFS/skel.c | 212 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 173 insertions(+), 39 deletions(-) diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index 65cb4bfe0d5..bf781733cb5 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -41,8 +41,6 @@ extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ struct vfs_ops skel_ops; - - /* VFS initialisation - return vfs_ops function pointer structure */ BOOL vfs_init(connection_struct *conn) @@ -53,17 +51,17 @@ BOOL vfs_init(connection_struct *conn) return True; } -int skel_connect(struct connection_struct *conn, char *service, char *user) +static int skel_connect(struct connection_struct *conn, char *service, char *user) { return default_vfs_ops.connect(conn, service, user); } -void skel_disconnect(struct connection_struct *conn) +static void skel_disconnect(struct connection_struct *conn) { default_vfs_ops.disconnect(conn); } -SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path, +static SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { @@ -71,171 +69,282 @@ SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path, dfree, dsize); } -DIR *skel_opendir(struct connection_struct *conn, char *fname) +static DIR *skel_opendir(struct connection_struct *conn, char *fname) { return default_vfs_ops.opendir(conn, fname); } -struct dirent *skel_readdir(struct connection_struct *conn, DIR *dirp) +static struct dirent *skel_readdir(struct connection_struct *conn, DIR *dirp) { return default_vfs_ops.readdir(conn, dirp); } -int skel_mkdir(struct connection_struct *conn, char *path, mode_t mode) +static int skel_mkdir(struct connection_struct *conn, char *path, mode_t mode) { return default_vfs_ops.mkdir(conn, path, mode); } -int skel_rmdir(struct connection_struct *conn, char *path) +static int skel_rmdir(struct connection_struct *conn, char *path) { return default_vfs_ops.rmdir(conn, path); } -int skel_closedir(struct connection_struct *conn, DIR *dir) +static int skel_closedir(struct connection_struct *conn, DIR *dir) { return default_vfs_ops.closedir(conn, dir); } -int skel_open(struct connection_struct *conn, char *fname, int flags, mode_t mode) +static int skel_open(struct connection_struct *conn, char *fname, int flags, mode_t mode) { return default_vfs_ops.open(conn, fname, flags, mode); } -int skel_close(struct files_struct *fsp, int fd) +static int skel_close(struct files_struct *fsp, int fd) { return default_vfs_ops.close(fsp, fd); } -ssize_t skel_read(struct files_struct *fsp, int fd, char *data, size_t n) +static ssize_t skel_read(struct files_struct *fsp, int fd, char *data, size_t n) { return default_vfs_ops.read(fsp, fd, data, n); } -ssize_t skel_write(struct files_struct *fsp, int fd, char *data, size_t n) +static ssize_t skel_write(struct files_struct *fsp, int fd, char *data, size_t n) { return default_vfs_ops.write(fsp, fd, data, n); } -SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence) +static SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence) { return default_vfs_ops.lseek(fsp, filedes, offset, whence); } -int skel_rename(struct connection_struct *conn, char *old, char *new) +static int skel_rename(struct connection_struct *conn, char *old, char *new) { return default_vfs_ops.rename(conn, old, new); } -int skel_fsync(struct files_struct *fsp, int fd) +static int skel_fsync(struct files_struct *fsp, int fd) { return default_vfs_ops.fsync(fsp, fd); } -int skel_stat(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf) +static int skel_stat(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf) { return default_vfs_ops.stat(conn, fname, sbuf); } -int skel_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) +static int skel_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) { return default_vfs_ops.fstat(fsp, fd, sbuf); } -int skel_lstat(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf) +static int skel_lstat(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf) { return default_vfs_ops.lstat(conn, path, sbuf); } -int skel_unlink(struct connection_struct *conn, char *path) +static int skel_unlink(struct connection_struct *conn, char *path) { return default_vfs_ops.unlink(conn, path); } -int skel_chmod(struct connection_struct *conn, char *path, mode_t mode) +static int skel_chmod(struct connection_struct *conn, char *path, mode_t mode) { return default_vfs_ops.chmod(conn, path, mode); } -int skel_fchmod(struct files_struct *fsp, int fd, mode_t mode) +static int skel_fchmod(struct files_struct *fsp, int fd, mode_t mode) { return default_vfs_ops.fchmod(fsp, fd, mode); } -int skel_chown(struct connection_struct *conn, char *path, uid_t uid, gid_t gid) +static int skel_chown(struct connection_struct *conn, char *path, uid_t uid, gid_t gid) { return default_vfs_ops.chown(conn, path, uid, gid); } -int skel_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid) +static int skel_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid) { return default_vfs_ops.fchown(fsp, fd, uid, gid); } -int skel_chdir(struct connection_struct *conn, char *path) +static int skel_chdir(struct connection_struct *conn, char *path) { return default_vfs_ops.chdir(conn, path); } -char *skel_getwd(struct connection_struct *conn, char *buf) +static char *skel_getwd(struct connection_struct *conn, char *buf) { return default_vfs_ops.getwd(conn, buf); } -int skel_utime(struct connection_struct *conn, char *path, struct utimbuf *times) +static int skel_utime(struct connection_struct *conn, char *path, struct utimbuf *times) { return default_vfs_ops.utime(conn, path, times); } -int skel_ftruncate(struct files_struct *fsp, int fd, SMB_OFF_T offset) +static int skel_ftruncate(struct files_struct *fsp, int fd, SMB_OFF_T offset) { return default_vfs_ops.ftruncate(fsp, fd, offset); } -BOOL skel_lock(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) +static BOOL skel_lock(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { return default_vfs_ops.lock(fsp, fd, op, offset, count, type); } -BOOL skel_symlink(struct connection_struct *conn, const char *oldpath, const char *newpath) +static BOOL skel_symlink(struct connection_struct *conn, const char *oldpath, const char *newpath) { return default_vfs_ops.symlink(conn, oldpath, newpath); } -BOOL skel_readlink(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz) +static BOOL skel_readlink(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz) { return default_vfs_ops.readlink(conn, path, buf, bufsiz); } -size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc) +static size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc) { return default_vfs_ops.fget_nt_acl(fsp, fd, ppdesc); } -size_t skel_get_nt_acl(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc) +static size_t skel_get_nt_acl(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc) { return default_vfs_ops.get_nt_acl(fsp, name, ppdesc); } -BOOL skel_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd) { return default_vfs_ops.fset_nt_acl(fsp, fd, security_info_sent, psd); } -BOOL skel_set_nt_acl(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_set_nt_acl(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd) { return default_vfs_ops.set_nt_acl(fsp, name, security_info_sent, psd); } -BOOL skel_chmod_acl(struct connection_struct *conn, char *name, mode_t mode) +static BOOL skel_chmod_acl(struct connection_struct *conn, char *name, mode_t mode) { return default_vfs_ops.chmod_acl(conn, name, mode); } -BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) +static BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) { return default_vfs_ops.fchmod_acl(fsp, fd, mode); } +static int skel_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p) +{ + return default_vfs_ops.sys_acl_get_entry(conn, theacl, entry_id, entry_p); +} + +static int skel_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p) +{ + return default_vfs_ops.sys_acl_get_tag_type(conn, entry_d, tag_type_p); +} + +static int skel_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p) +{ + return default_vfs_ops.sys_acl_get_permset(conn, entry_d, permset_p); +} + +static void *skel_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d) +{ + return default_vfs_ops.sys_acl_get_qualifier(conn, entry_d); +} + +static SMB_ACL_T skel_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type) +{ + return default_vfs_ops.sys_acl_get_file(conn, path_p, type); +} + +static SMB_ACL_T skel_sys_acl_get_fd(struct files_struct *fsp, int fd) +{ + return default_vfs_ops.sys_acl_get_fd(fsp, fd); +} + +static int skel_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset) +{ + return default_vfs_ops.sys_acl_clear_perms(conn, permset); +} + +static int skel_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return default_vfs_ops.sys_acl_add_perm(conn, permset, perm); +} + +static char *skel_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen) +{ + return default_vfs_ops.sys_acl_to_text(conn, theacl, plen); +} + +static SMB_ACL_T skel_sys_acl_init(struct connection_struct *conn, int count) +{ + return default_vfs_ops.sys_acl_init(conn, count); +} + +static int skel_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry) +{ + return default_vfs_ops.sys_acl_create_entry(conn, pacl, pentry); +} + +static int skel_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype) +{ + return default_vfs_ops.sys_acl_set_tag_type(conn, entry, tagtype); +} + +static int skel_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual) +{ + return default_vfs_ops.sys_acl_set_qualifier(conn, entry, qual); +} + +static int skel_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset) +{ + return default_vfs_ops.sys_acl_set_permset(conn, entry, permset); +} + +static int skel_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl ) +{ + return default_vfs_ops.sys_acl_valid(conn, theacl ); +} + +static int skel_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +{ + return default_vfs_ops.sys_acl_set_file(conn, name, acltype, theacl); +} + +static int skel_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl) +{ + return default_vfs_ops.sys_acl_set_fd(fsp, fd, theacl); +} + +static int skel_sys_acl_delete_def_file(struct connection_struct *conn, const char *path) +{ + return default_vfs_ops.sys_acl_delete_def_file(conn, path); +} + +static int skel_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return default_vfs_ops.sys_acl_get_perm(conn, permset, perm); +} + +static int skel_sys_acl_free_text(struct connection_struct *conn, char *text) +{ + return default_vfs_ops.sys_acl_free_text(conn, text); +} + +static int skel_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl) +{ + return default_vfs_ops.sys_acl_free_acl(conn, posix_acl); +} + +static int skel_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype) +{ + return default_vfs_ops.sys_acl_free_qualifier(conn, qualifier, tagtype); +} + + /* VFS operations structure */ @@ -288,5 +397,30 @@ struct vfs_ops skel_ops = { skel_set_nt_acl, skel_chmod_acl, - skel_fchmod_acl + skel_fchmod_acl, + + /* POSIX ACL operations */ + + skel_sys_acl_get_entry, + skel_sys_acl_get_tag_type, + skel_sys_acl_get_permset, + skel_sys_acl_get_qualifier, + skel_sys_acl_get_file, + skel_sys_acl_get_fd, + skel_sys_acl_clear_perms, + skel_sys_acl_add_perm, + skel_sys_acl_to_text, + skel_sys_acl_init, + skel_sys_acl_create_entry, + skel_sys_acl_set_tag_type, + skel_sys_acl_set_qualifier, + skel_sys_acl_set_permset, + skel_sys_acl_valid, + skel_sys_acl_set_file, + skel_sys_acl_set_fd, + skel_sys_acl_delete_def_file, + skel_sys_acl_get_perm, + skel_sys_acl_free_text, + skel_sys_acl_free_acl, + skel_sys_acl_free_qualifier }; -- cgit From e56db3630aa0f4fc9ceae8451c0d5e961c6e6522 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 15 Mar 2002 01:03:31 +0000 Subject: merging spoolss code between branches. SPOOLSS_RESETPRINTER was missing in SAMBA_2_2. Mergeed from APPLIANCE_HEAD. --- source/include/proto.h | 3 +++ source/include/rpc_spoolss.h | 18 +++++++++++++++++- source/rpc_parse/parse_spoolss.c | 36 ++++++++++++++++++++++++++++++++++++ source/rpc_server/srv_spoolss.c | 27 +++++++++++++++++++++++++++ source/rpc_server/srv_spoolss_nt.c | 6 ++++++ 5 files changed, 89 insertions(+), 1 deletion(-) diff --git a/source/include/proto.h b/source/include/proto.h index a6c9d181350..55caa0d22db 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -3651,6 +3651,8 @@ BOOL make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, TALLOC_CTX *ctx, char* value, char* data); BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth); BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value, uint32 type, const uint8 *data, uint32 len); BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth); @@ -4072,6 +4074,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u); WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u); WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u); +WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u); WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u); WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u); WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 2096427476b..8843c94b0de 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -46,7 +46,6 @@ #define SPOOLSS_DELETEPRINTPROCESSOR 0x30 #define SPOOLSS_ADDPRINTPROVIDOR 0x31 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32 -#define SPOOLSS_RESETPRINTER 0x34 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39 @@ -94,6 +93,7 @@ #define SPOOLSS_ENUMPORTS 0x23 #define SPOOLSS_ENUMMONITORS 0x24 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33 +#define SPOOLSS_RESETPRINTER 0x34 #define SPOOLSS_GETPRINTERDRIVER2 0x35 #define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */ #define SPOOLSS_REPLYOPENPRINTER 0x3a @@ -1804,6 +1804,22 @@ typedef struct spool_r_setprinterdata } SPOOL_R_SETPRINTERDATA; +typedef struct spool_q_resetprinter +{ + POLICY_HND handle; + uint32 unknown1; + DEVMODE_CTR devmode_ctr; + +} SPOOL_Q_RESETPRINTER; + +typedef struct spool_r_resetprinter +{ + WERROR status; +} +SPOOL_R_RESETPRINTER; + + + typedef struct _form { uint32 flags; diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index a1471afdab6..ecd2c7e12c5 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -5731,7 +5731,43 @@ BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_st /******************************************************************* ********************************************************************/ +BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_q_resetprinter"); + depth++; + + if (!prs_align(ps)) + return False; + if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth)) + return False; + + if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1)) + return False; + + if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ +BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_r_resetprinter"); + depth++; + + if(!prs_align(ps)) + return False; + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value, uint32 type, const uint8 *data, uint32 len) { diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index d26b99b5b85..67fc7da2624 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -976,7 +976,33 @@ static BOOL api_spoolss_setprinterdata(pipes_struct *p) /**************************************************************************** ****************************************************************************/ +static BOOL api_spoolss_reset_printer(pipes_struct *p) +{ + SPOOL_Q_RESETPRINTER q_u; + SPOOL_R_RESETPRINTER r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + if(!spoolss_io_q_resetprinter("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n")); + return False; + } + + r_u.status = _spoolss_resetprinter(p, &q_u, &r_u); + + if(!spoolss_io_r_resetprinter("", &r_u, rdata, 0)) { + DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_RESETPRINTER.\n")); + return False; + } + + return True; +} + +/**************************************************************************** +****************************************************************************/ static BOOL api_spoolss_addform(pipes_struct *p) { SPOOL_Q_ADDFORM q_u; @@ -1380,6 +1406,7 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_getprinterdriverdirectory }, {"SPOOLSS_ENUMPRINTERDATA", SPOOLSS_ENUMPRINTERDATA, api_spoolss_enumprinterdata }, {"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata }, + {"SPOOLSS_RESETPRINTER", SPOOLSS_RESETPRINTER, api_spoolss_reset_printer }, {"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata }, {"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform }, {"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform }, diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index c0289fc344e..3d7e39d1786 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6663,6 +6663,12 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP /**************************************************************************** ****************************************************************************/ +WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u) +{ + return WERR_OK; +} + + WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u) { POLICY_HND *handle = &q_u->handle; -- cgit From 8e80950b814f3b206ba56e052fddb80bd3a3ade3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Mar 2002 01:05:27 +0000 Subject: Fix skel vfs for new interface. Jeremy. --- examples/VFS/skel.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index bf781733cb5..b254c512e18 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -104,12 +104,12 @@ static int skel_close(struct files_struct *fsp, int fd) return default_vfs_ops.close(fsp, fd); } -static ssize_t skel_read(struct files_struct *fsp, int fd, char *data, size_t n) +static ssize_t skel_read(struct files_struct *fsp, int fd, void *data, size_t n) { return default_vfs_ops.read(fsp, fd, data, n); } -static ssize_t skel_write(struct files_struct *fsp, int fd, char *data, size_t n) +static ssize_t skel_write(struct files_struct *fsp, int fd, const void *data, size_t n) { return default_vfs_ops.write(fsp, fd, data, n); } @@ -204,6 +204,21 @@ static BOOL skel_readlink(struct connection_struct *conn, const char *path, char return default_vfs_ops.readlink(conn, path, buf, bufsiz); } +static int skel_link(struct connection_struct *conn, const char *oldpath, const char *newpath) +{ + return default_vfs_ops.link(conn, oldpath, newpath); +} + +static int skel_mknod(struct connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev) +{ + return default_vfs_ops.mknod(conn, path, mode, dev); +} + +static char *skel_realpath(struct connection_struct *conn, const char *path, char *resolved_path) +{ + return default_vfs_ops.realpath(conn, path, resolved_path); +} + static size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc) { return default_vfs_ops.fget_nt_acl(fsp, fd, ppdesc); @@ -388,6 +403,9 @@ struct vfs_ops skel_ops = { skel_lock, skel_symlink, skel_readlink, + skel_link, + skel_mknod, + skel_realpath, /* NT File ACL operations */ -- cgit From e1ee5c807112701b7c8d0c689ce5265a776029b2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Mar 2002 01:42:12 +0000 Subject: Not quite fixed.... Jeremy. --- examples/VFS/audit.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index ce2aa52250e..b5ef4bc1210 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -92,16 +92,49 @@ struct vfs_ops audit_ops = { NULL, /* lstat */ audit_unlink, audit_chmod, + audit_fchmod, NULL, /* chown */ + NULL, /* fchown */ NULL, /* chdir */ NULL, /* getwd */ NULL, /* utime */ NULL, /* ftruncate */ NULL, /* lock */ + NULL, /* symlink */ + NULL, /* readlink */ + NULL, /* link */ + NULL, /* mknod */ + NULL, /* realpath */ NULL, /* fget_nt_acl */ NULL, /* get_nt_acl */ NULL, /* fset_nt_acl */ - NULL /* set_nt_acl */ + NULL, /* set_nt_acl */ + + audit_chmod_acl, /* chmod_acl */ + audit_fchmod_acl, /* fchmod_acl */ + + NULL, /* sys_acl_get_entry */ + NULL, /* sys_acl_get_tag_type */ + NULL, /* sys_acl_get_permset */ + NULL, /*sys_acl_get_qualifier */ + NULL, /* sys_acl_get_file */ + NULL, /* sys_acl_get_fd */ + NULL, /* sys_acl_clear_perms */ + NULL, /* sys_acl_add_perm */ + NULL, /* sys_acl_to_text */ + NULL, /* sys_acl_init */ + NULL, /* sys_acl_create_entry */ + NULL, /* sys_acl_set_tag_type */ + NULL, /* sys_acl_set_qualifier */ + NULL, /* sys_acl_set_permset */ + NULL, /* sys_acl_valid */ + NULL, /* sys_acl_set_file */ + NULL, /* sys_acl_set_fd */ + NULL, /* sys_acl_delete_def_file */ + NULL, /* sys_acl_get_perm */ + NULL, /* sys_acl_free_text */ + NULL, /* sys_acl_free_acl */ + NULL /* sys_acl_free_qualifier */ }; /* VFS initialisation function. Return initialised vfs_ops structure @@ -227,4 +260,3 @@ int audit_chmod(struct connection_struct *conn, char *path, mode_t mode) return result; } - -- cgit From 37353cd4086996f3cd5bf3a41614ce5869e420eb Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 15 Mar 2002 07:46:45 +0000 Subject: form stuff from HEAD --- source/rpc_parse/parse_spoolss.c | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index ecd2c7e12c5..7acc9a3a99f 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -6865,3 +6865,78 @@ BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCE return True; } + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, + int level, FORM *form) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + q_u->level = level; + q_u->level2 = level; + memcpy(&q_u->form, form, sizeof(FORM)); + + return True; +} + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, + int level, char *form_name, FORM *form) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + q_u->level = level; + q_u->level2 = level; + memcpy(&q_u->form, form, sizeof(FORM)); + init_unistr2(&q_u->name, form_name, strlen(form_name) + 1); + + return True; +} + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + init_unistr2(&q_u->name, form, strlen(form) + 1); + return True; +} + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, + char *formname, uint32 level, NEW_BUFFER *buffer, + uint32 offered) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + q_u->level = level; + init_unistr2(&q_u->formname, formname, strlen(formname) + 1); + q_u->buffer=buffer; + q_u->offered=offered; + + return True; +} + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, + uint32 level, NEW_BUFFER *buffer, + uint32 offered) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + q_u->level = level; + q_u->buffer=buffer; + q_u->offered=offered; + + return True; +} -- cgit From 97cc5f88d1c3257cdc264bf6f0fd5a0ca33746d2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 15 Mar 2002 07:47:48 +0000 Subject: format fix from HEAD so files sync up --- source/lib/util_seaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/util_seaccess.c b/source/lib/util_seaccess.c index 6063f82d154..b80ba6e8046 100644 --- a/source/lib/util_seaccess.c +++ b/source/lib/util_seaccess.c @@ -246,7 +246,7 @@ BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, *status = NT_STATUS_OK; *acc_granted = 0; - DEBUG(10,("se_access_check: requested access %x, for NT token with %u entries and first sid %s.\n", + DEBUG(10,("se_access_check: requested access 0x%08x, for NT token with %u entries and first sid %s.\n", (unsigned int)acc_desired, (unsigned int)token->num_sids, sid_to_string(sid_str, &token->user_sids[0]))); -- cgit From 10070469d618f6ec441246a677f624e9600f237b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 15 Mar 2002 07:49:24 +0000 Subject: merges from APPLIANCE_HEAD and HEAD --- source/rpc_client/cli_spoolss_notify.c | 4 ++ source/rpc_server/srv_spoolss_nt.c | 76 ++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 32 deletions(-) diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 502efd937b5..93ef6e97f26 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -444,6 +444,10 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, goto done; } + if (r_s.unknown0 == 0x00080000) { + DEBUG(8,("cli_spoolss_reply_rrpcn: I think the spooler resonded that the notification was ignored.\n")); + } + result = werror_to_ntstatus(r_s.status); done: diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 3d7e39d1786..fcc2a08451d 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4876,9 +4876,10 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, Printer_entry *Printer = find_printer_index_by_hnd(p, handle); PRINTER_MESSAGE_INFO msg; WERROR result; - uint32 change_flag = 0x0; DEBUG(8,("update_printer\n")); + + ZERO_STRUCT(msg); result = WERR_OK; @@ -4994,7 +4995,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, */ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)){ set_driver_init(printer, 2); - change_flag |= PRINTER_MESSAGE_DRIVER; + msg.flags |= PRINTER_MESSAGE_DRIVER; } } @@ -5005,28 +5006,31 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, all the possible changes */ if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) - change_flag |= PRINTER_MESSAGE_COMMENT; + msg.flags |= PRINTER_MESSAGE_COMMENT; if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) - change_flag |= PRINTER_MESSAGE_SHARENAME; + msg.flags |= PRINTER_MESSAGE_SHARENAME; if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) - change_flag |= PRINTER_MESSAGE_PORT; + msg.flags |= PRINTER_MESSAGE_PORT; if (!strequal(printer->info_2->location, old_printer->info_2->location)) - change_flag |= PRINTER_MESSAGE_LOCATION; + msg.flags |= PRINTER_MESSAGE_LOCATION; ZERO_STRUCT(msg); msg.low = PRINTER_CHANGE_ADD_PRINTER; fstrcpy(msg.printer_name, printer->info_2->printername); - msg.flags = change_flag; - /* send to myself before replying to SetPrinter() */ - send_spoolss_event_notification(&msg); + /* only send a notify if something changed */ + if (msg.flags) + { + /* send to myself before replying to SetPrinter() */ + send_spoolss_event_notification(&msg); - /* send to other smbd's */ - srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, change_flag); + /* send to other smbd's */ + srv_spoolss_sendnotify(msg.printer_name, 0, PRINTER_CHANGE_ADD_PRINTER, msg.flags); + } done: free_a_printer(&printer, 2); @@ -5271,8 +5275,8 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum, } for (i=0; i<*returned; i++) - fill_job_info_2( - &info[i], &queue[i], i, snum, ntprinter, devmode); + fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter, + devmode); free_a_printer(&ntprinter, 2); SAFE_FREE(queue); @@ -7194,8 +7198,8 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin ZERO_STRUCTP(info_2); if (info_2 == NULL) { - SAFE_FREE(queue); - return WERR_NOMEM; + ret = WERR_NOMEM; + goto done; } for (i=0; i offered) { + ret = WERR_INSUFFICIENT_BUFFER; + goto done; + } - if (*needed > offered) - return WERR_INSUFFICIENT_BUFFER; + ret = WERR_OK; + + done: + /* Cleanup allocated memory */ - return WERR_OK; + SAFE_FREE(queue); + free_job_info_2(info_2); /* Also frees devmode */ + SAFE_FREE(info_2); + free_a_printer(&ntprinter, 2); + + return ret; } /**************************************************************************** -- cgit From a73142f2348d73702f8779870073ffd44a70404a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Mar 2002 19:25:23 +0000 Subject: Merge of return first error from HEAD. Jeremy. --- source/include/proto.h | 1975 +++++++++++++++++++++++----------------------- source/locking/locking.c | 15 +- 2 files changed, 1004 insertions(+), 986 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 55caa0d22db..cf66aaf230a 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -172,128 +172,625 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from libsmb/cliconnect.c */ - -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); - -/*The following definitions come from libsmb/cli_dfs.c */ +/*The following definitions come from lib/smbrun.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from lib/snprintf.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from lib/substitute.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from lib/sysacls.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/*The following definitions come from libsmb/clifile.c */ +/*The following definitions come from lib/system.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); + +/*The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); + +/*The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/*The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/*The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/*The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/*The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/*The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/*The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/*The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/*The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/*The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); + +/*The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/*The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from libsmb/clilist.c */ +/*The following definitions come from lib/wins_srv.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); + +/*The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); /*The following definitions come from libsmb/cli_lsarpc.c */ @@ -329,13 +826,6 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/*The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); - /*The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -362,12 +852,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); -/*The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -375,56 +859,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/*The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/*The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -503,12 +937,6 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); -/*The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -547,787 +975,359 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CT NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value); -/*The following definitions come from libsmb/cli_srvsvc.c */ - -struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr); - -/*The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/*The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/*The following definitions come from libsmb/credentials.c */ - -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/*The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/*The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/*The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/*The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/*The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/*The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from libsmb/cli_srvsvc.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from libsmb/cliconnect.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from libsmb/clidgram.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/snprintf.c */ +/*The following definitions come from libsmb/clientgen.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/substitute.c */ +/*The following definitions come from libsmb/clierror.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/sysacls.c */ +/*The following definitions come from libsmb/clifile.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from lib/system.c */ +/*The following definitions come from libsmb/clilist.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from lib/talloc.c */ +/*The following definitions come from libsmb/climessage.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from lib/time.c */ +/*The following definitions come from libsmb/clioplock.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from lib/ufc.c */ +/*The following definitions come from libsmb/cliprint.c */ -char *ufc_crypt(const char *key,const char *salt); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from lib/username.c */ +/*The following definitions come from libsmb/clirap.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from lib/util.c */ +/*The following definitions come from libsmb/clireadwrite.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from lib/util_file.c */ +/*The following definitions come from libsmb/clisecdesc.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/*The following definitions come from lib/util_getent.c */ +/*The following definitions come from libsmb/clistr.c */ -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from lib/util_seaccess.c */ +/*The following definitions come from libsmb/clitrans.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/credentials.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/errormap.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/namequery.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/nmblib.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/*The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from lib/util_unistr.c */ +/*The following definitions come from libsmb/smbdes.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/*The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/*The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /*The following definitions come from locking/brlock.c */ @@ -1415,6 +1415,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1445,9 +1448,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2325,14 +2325,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ +/*The following definitions come from printing/print_generic.c */ + + +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/*The following definitions come from printing/print_generic.c */ - - /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2357,11 +2362,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2420,39 +2420,6 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -3698,6 +3665,17 @@ BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth); BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth); +BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, + int level, FORM *form); +BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, + int level, char *form_name, FORM *form); +BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form); +BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, + char *formname, uint32 level, NEW_BUFFER *buffer, + uint32 offered); +BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, + uint32 level, NEW_BUFFER *buffer, + uint32 offered); /*The following definitions come from rpc_parse/parse_srv.c */ @@ -4136,6 +4114,39 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4604,24 +4615,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/*The following definitions come from smbd/vfs.c */ - -BOOL vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); @@ -4687,6 +4680,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/*The following definitions come from smbd/vfs.c */ + +BOOL vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/locking/locking.c b/source/locking/locking.c index 9d70e00d226..be0987228c0 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -154,20 +154,27 @@ NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid { int j, maxj = lp_lock_spin_count(); int sleeptime = lp_lock_sleep_time(); - NTSTATUS status; + NTSTATUS status, ret; if (maxj <= 0) maxj = 1; + ret = NT_STATUS_OK; /* to keep dumb compilers happy */ + for (j = 0; j < maxj; j++) { status = do_lock(fsp, conn, lock_pid, count, offset, lock_type); if (!NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED) && - !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) - break; + !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) { + return status; + } + /* if we do fail then return the first error code we got */ + if (j == 0) { + ret = status; + } if (sleeptime) sys_usleep(sleeptime); } - return status; + return ret; } /**************************************************************************** -- cgit From c6cbf41b3c26d24af37149ac94304501b8382cb0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Mar 2002 21:07:57 +0000 Subject: Merges from HEAD (debug fix and enable locking on winbindd cache tdb). Jeremy. --- source/nsswitch/winbindd_cache.c | 2 +- source/smbd/posix_acls.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 9250e9e498d..87bcda504f3 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -42,7 +42,7 @@ void winbindd_cache_init(void) /* Open tdb cache */ if (!(cache_tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, - TDB_NOLOCK, O_RDWR | O_CREAT | O_TRUNC, + TDB_DEFAULT, O_RDWR | O_CREAT | O_TRUNC, 0600))) DEBUG(0, ("Unable to open tdb cache - user and group caching disabled\n")); } diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 6d072dd753d..8d421a6141d 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -440,7 +440,8 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & OWNER_SECURITY_INFORMATION) { sid_copy(&owner_sid, psd->owner_sid); if (!sid_to_uid( &owner_sid, puser, &sid_type)) { - DEBUG(3,("unpack_nt_owners: unable to validate owner sid.\n")); + DEBUG(3,("unpack_nt_owners: unable to validate owner sid for %s.\n", + sid_string_static(&owner_sid))); return False; } } -- cgit From 5a94092322fb76c2260f2439e8b99419e19c24e1 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 15 Mar 2002 21:25:07 +0000 Subject: Fixed segv with spoolss_addprinterex_level_2 bug with out of order srv_spoolss_sendnotify and free_a_printer... Jerry - Beware the Ides of March rpc_server/srv_spoolss_nt.c reverse order of notify and free. JohnR cr198 --- source/rpc_server/srv_spoolss_nt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index fcc2a08451d..e7578e90118 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6255,12 +6255,11 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_ACCESS_DENIED; } - srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, 0x0); - free_a_printer(&printer,2); update_c_setprinter(False); + srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, 0x0); return WERR_OK; } -- cgit From 57882f0315ed95be764da45aa913f6348a723a46 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 15 Mar 2002 22:48:23 +0000 Subject: Ok, I'm an idiot... or more accurately, careless. I merged in a fix to APPLIANCE_HEAD, and in my haste, merged in a 'break' to 2.2. This commit reverts the later. Thanks to the ever vigilant JRA for spotting this. rpc_server/srv_spoolss_nt.c reverse order of notify and free. JohnR cr198 --- source/rpc_server/srv_spoolss_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index e7578e90118..66d3c9677be 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6255,12 +6255,12 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ return WERR_ACCESS_DENIED; } - free_a_printer(&printer,2); - update_c_setprinter(False); srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, 0x0); + free_a_printer(&printer,2); + return WERR_OK; } -- cgit From b3f299ca2ce36f8898fa807a9d261779ebed6e04 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 16 Mar 2002 00:25:18 +0000 Subject: Fix audit vfs example. Jeremy. --- examples/VFS/audit.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index b5ef4bc1210..64f8e1562e7 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -57,6 +57,9 @@ int audit_close(struct files_struct *fsp, int fd); int audit_rename(struct connection_struct *conn, char *old, char *new); int audit_unlink(struct connection_struct *conn, char *path); int audit_chmod(struct connection_struct *conn, char *path, mode_t mode); +int audit_chmod_acl(struct connection_struct *conn, char *name, mode_t mode); +int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode); +int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode); /* VFS operations */ @@ -113,9 +116,9 @@ struct vfs_ops audit_ops = { audit_chmod_acl, /* chmod_acl */ audit_fchmod_acl, /* fchmod_acl */ - NULL, /* sys_acl_get_entry */ - NULL, /* sys_acl_get_tag_type */ - NULL, /* sys_acl_get_permset */ + NULL, /* sys_acl_get_entry */ + NULL, /* sys_acl_get_tag_type */ + NULL, /* sys_acl_get_permset */ NULL, /*sys_acl_get_qualifier */ NULL, /* sys_acl_get_file */ NULL, /* sys_acl_get_fd */ @@ -260,3 +263,39 @@ int audit_chmod(struct connection_struct *conn, char *path, mode_t mode) return result; } + +int audit_chmod_acl(struct connection_struct *conn, char *path, mode_t mode) +{ + int result = default_vfs_ops.chmod_acl(conn, path, mode); + + syslog(SYSLOG_PRIORITY, "chmod_acl %s mode 0x%x %s%s\n", + path, mode, + (result < 0) ? "failed: " : "", + (result < 0) ? strerror(errno) : ""); + + return result; +} + +int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode) +{ + int result = default_vfs_ops.fchmod(fsp, fd, mode); + + syslog(SYSLOG_PRIORITY, "fchmod %s mode 0x%x %s%s\n", + fsp->fsp_name, mode, + (result < 0) ? "failed: " : "", + (result < 0) ? strerror(errno) : ""); + + return result; +} + +int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) +{ + int result = default_vfs_ops.fchmod_acl(fsp, fd, mode); + + syslog(SYSLOG_PRIORITY, "fchmod_acl %s mode 0x%x %s%s\n", + fsp->fsp_name, mode, + (result < 0) ? "failed: " : "", + (result < 0) ? strerror(errno) : ""); + + return result; +} -- cgit From 0cbf949c09788b3e7122dec4c26514890c664e34 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Sat, 16 Mar 2002 01:32:26 +0000 Subject: only kill smbd and nmbd processes started from default install paths. This allows this to be used and not kill failsafe versions that might be running. --- packaging/SGI/samba.rc | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc index 84d1d1bea58..8906f66c633 100644 --- a/packaging/SGI/samba.rc +++ b/packaging/SGI/samba.rc @@ -5,7 +5,7 @@ # IS_ON=/etc/chkconfig -KILLALL=/sbin/killall +KILL=/usr/bin/kill SAMBAD=/usr/samba/bin/smbd #SAMBA_OPTS=-d2 @@ -25,28 +25,49 @@ fi case $1 in 'profile') if $IS_ON samba && test -x $SAMBAD; then - $KILLALL -15 smbd nmbd smbd.profile nmbd.profile + ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/smbd.pid` + fi + ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` + fi $ECHO "Samba:\c" - $SAMBAD.profile $SAMBA_OPTS -D; $ECHO " smbd.profile\c" - $NMBD.profile $NMBD_OPTS -D; $ECHO " nmbd.profile\c" + $SAMBAD.profile $SAMBA_OPTS; $ECHO " smbd.profile\c" + $NMBD.profile $NMBD_OPTS; $ECHO " nmbd.profile\c" $ECHO "." fi ;; 'start') if $IS_ON samba && test -x $SAMBAD; then - $KILLALL -15 smbd nmbd smbd.profile nmbd.profile + ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/smbd.pid` + fi + ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` + fi $ECHO "Samba:\c" - $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c" - $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c" + $SAMBAD $SAMBA_OPTS; $ECHO " smbd\c" + $NMBD $NMBD_OPTS; $ECHO " nmbd\c" $ECHO "." fi ;; 'stop') $ECHO "Stopping Samba Servers." - $KILLALL -15 smbd nmbd smbd.profile nmbd.profile + ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/smbd.pid` + fi + ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null + if [ $? -eq 0 ]; then + $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` + fi exit 0 ;; *) - echo "usage: /etc/init.d/samba {start|stop}" + echo "usage: /etc/init.d/samba {start|stop|profile}" ;; esac -- cgit From 3f3c7fbd1e4f27c049907e10089afb94a63b45a6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 16 Mar 2002 01:51:14 +0000 Subject: Fix for new VFS interface. Jeremy. --- examples/VFS/audit.c | 25 +++++- examples/VFS/block/Makefile | 2 +- examples/VFS/block/block.c | 194 +++++++++++++++++--------------------------- examples/VFS/skel.c | 162 ++++++++++++++++++++++++++---------- 4 files changed, 218 insertions(+), 165 deletions(-) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index 64f8e1562e7..a319b028965 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -143,11 +143,32 @@ struct vfs_ops audit_ops = { /* VFS initialisation function. Return initialised vfs_ops structure back to SAMBA. */ -BOOL vfs_init(connection_struct *conn) +struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) { + struct vfs_ops tmp_ops; + + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + tmp_ops.connect = audit_connect; + tmp_ops.disconnect = audit_disconnect; + tmp_ops.opendir = audit_opendir; + tmp_ops.mkdir = audit_mkdir; + tmp_ops.rmdir = audit_rmdir; + tmp_ops.open = audit_open; + tmp_ops.close = audit_close; + tmp_ops.rename = audit_rename; + tmp_ops.unlink = audit_unlink; + tmp_ops.chmod = audit_chmod; + tmp_ops.chmod_acl = audit_chmod_acl; + tmp_ops.fchmod = audit_fchmod; + tmp_ops.fchmod_acl = audit_fchmod_acl; + + memcpy(&audit_ops, &tmp_ops, sizeof(struct vfs_ops)); + openlog("smbd_audit", LOG_PID, SYSLOG_FACILITY); syslog(SYSLOG_PRIORITY, "VFS_INIT: vfs_ops loaded\n"); - return True; + return &audit_ops; } /* Implementation of vfs_ops. Pass everything on to the default diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile index dcc7c077936..44b08681d6d 100644 --- a/examples/VFS/block/Makefile +++ b/examples/VFS/block/Makefile @@ -8,7 +8,7 @@ CC = gcc LIBTOOL = libtool -SAMBA_SRC = /usr/local/src/samba/samba-2.2.0-ron/source +SAMBA_SRC = ../../../source SAMBA_INCL = ${SAMBA_SRC}/include UBIQX_SRC = ${SAMBA_SRC}/ubiqx SMBWR_SRC = ${SAMBA_SRC}/smbwrapper diff --git a/examples/VFS/block/block.c b/examples/VFS/block/block.c index 3c4f736e849..fbf3a7cda91 100644 --- a/examples/VFS/block/block.c +++ b/examples/VFS/block/block.c @@ -63,44 +63,77 @@ struct vfs_ops execute_vfs_ops = { block_connect, block_disconnect, - NULL, /* disk free */ + NULL, /* disk free */ /* Directory operations */ block_opendir, - NULL, /* readdir */ - NULL, - NULL, - NULL, /* closedir */ + NULL, /* readdir */ + NULL, /* mkdir */ + NULL, /* rmdir */ + NULL, /* closedir */ /* File operations */ - NULL, - NULL, - NULL, /* read */ - NULL, /* write */ - NULL, /* lseek */ - NULL, - NULL, /* fsync */ - NULL, /* stat */ - NULL, /* fstat */ - NULL, /* lstat */ - NULL, - NULL, - NULL, - NULL, /* chown */ - NULL, - NULL, /* chdir */ - NULL, /* getwd */ - NULL, /* utime */ - NULL, /* ftruncate */ - NULL, /* lock */ - NULL, /* fget_nt_acl */ - NULL, /* get_nt_acl */ - NULL, /* fset_nt_acl */ - NULL, /* set_nt_acl */ - NULL, - NULL + NULL, /* open */ + NULL, /* close */ + NULL, /* read */ + NULL, /* write */ + NULL, /* lseek */ + NULL, /* rename */ + NULL, /* fsync */ + NULL, /* stat */ + NULL, /* fstat */ + NULL, /* lstat */ + NULL, /* unlink */ + NULL, /* chmod */ + NULL, /* fchmod */ + NULL, /* chown */ + NULL, /* fchown */ + NULL, /* chdir */ + NULL, /* getwd */ + NULL, /* utime */ + NULL, /* ftruncate */ + NULL, /* lock */ + NULL, /* symlink */ + NULL, /* readlink */ + NULL, /* link */ + NULL, /* mknod */ + NULL, /* realpath */ + + /* NT ACL operations */ + + NULL, /* fget_nt_acl */ + NULL, /* get_nt_acl */ + NULL, /* fset_nt_acl */ + NULL, /* set_nt_acl */ + + /* POSIX ACL operations. */ + + NULL, /* chmod_acl */ + NULL, /* fchmod_acl */ + NULL, /* sys_acl_get_entry */ + NULL, /* sys_acl_get_tag_type */ + NULL, /* sys_acl_get_permset */ + NULL, /* sys_acl_get_qualifier */ + NULL, /* sys_acl_get_file */ + NULL, /* sys_acl_get_fd */ + NULL, /* sys_acl_clear_perms */ + NULL, /* sys_acl_add_perm */ + NULL, /* sys_acl_to_text */ + NULL, /* sys_acl_init */ + NULL, /* sys_acl_create_entry */ + NULL, /* sys_acl_set_tag_type */ + NULL, /* sys_acl_set_qualifier */ + NULL, /* sys_acl_set_permset */ + NULL, /* sys_acl_valid */ + NULL, /* sys_acl_set_file */ + NULL, /* sys_acl_set_fd */ + NULL, /* sys_acl_delete_def_file */ + NULL, /* sys_acl_get_perm */ + NULL, /* sys_acl_free_text */ + NULL, /* sys_acl_free_acl */ + NULL /* sys_acl_free_qualifier */ }; @@ -297,10 +330,20 @@ BOOL get_parameter_value(char *param, char *value) /* VFS initialisation function. Return initialised vfs_ops structure back to SAMBA. */ -struct vfs_ops *vfs_init(int *vfs_version) +struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) { + struct vfs_ops tmp_ops; + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + /* Override the ones we want. */ + tmp_ops.connect = block_connect; + tmp_ops.disconnect = block_disconnect; + tmp_ops.opendir = block_opendir; + + memcpy(&execute_vfs_ops, &tmp_ops, sizeof(struct vfs_ops)); return(&execute_vfs_ops); } @@ -457,90 +500,3 @@ BOOL dir_search(char *link, char *dir) return FALSE; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index b254c512e18..81317d87021 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -39,17 +39,7 @@ #include extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ -struct vfs_ops skel_ops; - -/* VFS initialisation - return vfs_ops function pointer structure */ - -BOOL vfs_init(connection_struct *conn) -{ - DEBUG(3, ("Initialising default vfs hooks\n")); - - memcpy(&conn->vfs_ops, &skel_ops, sizeof(struct vfs_ops)); - return True; -} +extern struct vfs_ops skel_ops; static int skel_connect(struct connection_struct *conn, char *service, char *user) { @@ -359,7 +349,93 @@ static int skel_sys_acl_free_qualifier(struct connection_struct *conn, void *qua return default_vfs_ops.sys_acl_free_qualifier(conn, qualifier, tagtype); } +/* VFS initialisation - return vfs_ops function pointer structure */ +struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) +{ + struct vfs_ops tmp_ops; + + DEBUG(3, ("Initialising default vfs hooks\n")); + + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + tmp_ops.connect = skel_connect; + tmp_ops.disconnect = skel_disconnect; + tmp_ops.disk_free = skel_disk_free; + + /* Directory operations */ + + tmp_ops.opendir = skel_opendir; + tmp_ops.readdir = skel_readdir; + tmp_ops.mkdir = skel_mkdir; + tmp_ops.rmdir = skel_rmdir; + tmp_ops.closedir = skel_closedir; + + /* File operations */ + + tmp_ops.open = skel_open; + tmp_ops.close = skel_close; + tmp_ops.read = skel_read; + tmp_ops.write = skel_write; + tmp_ops.lseek = skel_lseek; + tmp_ops.rename = skel_rename; + tmp_ops.fsync = skel_fsync; + tmp_ops.stat = skel_stat; + tmp_ops.fstat = skel_fstat; + tmp_ops.lstat = skel_lstat; + tmp_ops.unlink = skel_unlink; + tmp_ops.chmod = skel_chmod; + tmp_ops.fchmod = skel_fchmod; + tmp_ops.chown = skel_chown; + tmp_ops.fchown = skel_fchown; + tmp_ops.chdir = skel_chdir; + tmp_ops.getwd = skel_getwd; + tmp_ops.utime = skel_utime; + tmp_ops.ftruncate = skel_ftruncate; + tmp_ops.lock = skel_lock; + tmp_ops.symlink = skel_symlink; + tmp_ops.readlink = skel_readlink; + tmp_ops.link = skel_link; + tmp_ops.mknod = skel_mknod; + tmp_ops.realpath = skel_realpath; + + tmp_ops.fget_nt_acl = skel_fget_nt_acl; + tmp_ops.get_nt_acl = skel_get_nt_acl; + tmp_ops.fset_nt_acl = skel_fset_nt_acl; + tmp_ops.set_nt_acl = skel_set_nt_acl; + + /* POSIX ACL operations. */ + + tmp_ops.chmod_acl = skel_chmod_acl; + tmp_ops.fchmod_acl = skel_fchmod_acl; + tmp_ops.sys_acl_get_entry = skel_sys_acl_get_entry; + tmp_ops.sys_acl_get_tag_type = skel_sys_acl_get_tag_type; + tmp_ops.sys_acl_get_permset = skel_sys_acl_get_permset; + tmp_ops.sys_acl_get_qualifier = skel_sys_acl_get_qualifier; + tmp_ops.sys_acl_get_file = skel_sys_acl_get_file; + tmp_ops.sys_acl_get_fd = skel_sys_acl_get_fd; + tmp_ops.sys_acl_clear_perms = skel_sys_acl_clear_perms; + tmp_ops.sys_acl_add_perm = skel_sys_acl_add_perm; + tmp_ops.sys_acl_to_text = skel_sys_acl_to_text; + tmp_ops.sys_acl_init = skel_sys_acl_init; + tmp_ops.sys_acl_create_entry = skel_sys_acl_create_entry; + tmp_ops.sys_acl_set_tag_type = skel_sys_acl_set_tag_type; + tmp_ops.sys_acl_set_qualifier = skel_sys_acl_set_qualifier; + tmp_ops.sys_acl_set_permset = skel_sys_acl_set_permset; + tmp_ops.sys_acl_valid = skel_sys_acl_valid; + tmp_ops.sys_acl_set_file = skel_sys_acl_set_file; + tmp_ops.sys_acl_set_fd = skel_sys_acl_set_fd; + tmp_ops.sys_acl_delete_def_file = skel_sys_acl_delete_def_file; + tmp_ops.sys_acl_get_perm = skel_sys_acl_get_perm; + tmp_ops.sys_acl_free_text = skel_sys_acl_free_text; + tmp_ops.sys_acl_free_acl = skel_sys_acl_free_acl; + tmp_ops.sys_acl_free_qualifier = skel_sys_acl_free_qualifier; + + memcpy(&skel_ops, &tmp_ops, sizeof(struct vfs_ops)); + + return &skel_ops; +} /* VFS operations structure */ @@ -394,10 +470,10 @@ struct vfs_ops skel_ops = { skel_unlink, skel_chmod, skel_fchmod, - skel_chown, - skel_fchown, - skel_chdir, - skel_getwd, + skel_chown, + skel_fchown, + skel_chdir, + skel_getwd, skel_utime, skel_ftruncate, skel_lock, @@ -409,36 +485,36 @@ struct vfs_ops skel_ops = { /* NT File ACL operations */ - skel_fget_nt_acl, - skel_get_nt_acl, - skel_fset_nt_acl, - skel_set_nt_acl, + skel_fget_nt_acl, + skel_get_nt_acl, + skel_fset_nt_acl, + skel_set_nt_acl, + + /* POSIX ACL operations */ skel_chmod_acl, skel_fchmod_acl, - /* POSIX ACL operations */ - - skel_sys_acl_get_entry, - skel_sys_acl_get_tag_type, - skel_sys_acl_get_permset, - skel_sys_acl_get_qualifier, - skel_sys_acl_get_file, - skel_sys_acl_get_fd, - skel_sys_acl_clear_perms, - skel_sys_acl_add_perm, - skel_sys_acl_to_text, - skel_sys_acl_init, - skel_sys_acl_create_entry, - skel_sys_acl_set_tag_type, - skel_sys_acl_set_qualifier, - skel_sys_acl_set_permset, - skel_sys_acl_valid, - skel_sys_acl_set_file, - skel_sys_acl_set_fd, - skel_sys_acl_delete_def_file, - skel_sys_acl_get_perm, - skel_sys_acl_free_text, - skel_sys_acl_free_acl, - skel_sys_acl_free_qualifier + skel_sys_acl_get_entry, + skel_sys_acl_get_tag_type, + skel_sys_acl_get_permset, + skel_sys_acl_get_qualifier, + skel_sys_acl_get_file, + skel_sys_acl_get_fd, + skel_sys_acl_clear_perms, + skel_sys_acl_add_perm, + skel_sys_acl_to_text, + skel_sys_acl_init, + skel_sys_acl_create_entry, + skel_sys_acl_set_tag_type, + skel_sys_acl_set_qualifier, + skel_sys_acl_set_permset, + skel_sys_acl_valid, + skel_sys_acl_set_file, + skel_sys_acl_set_fd, + skel_sys_acl_delete_def_file, + skel_sys_acl_get_perm, + skel_sys_acl_free_text, + skel_sys_acl_free_acl, + skel_sys_acl_free_qualifier }; -- cgit From 4377602c885d3ee52aaee4e834c76ea15de5bbfe Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 16 Mar 2002 01:51:21 +0000 Subject: Ensure VFS interface is identical to HEAD. Jeremy. --- source/include/proto.h | 2 +- source/msdfs/msdfs.c | 4 +- source/smbd/service.c | 4 +- source/smbd/vfs.c | 203 +++---------------------------------------------- 4 files changed, 16 insertions(+), 197 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index cf66aaf230a..ae3428ceb46 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4682,7 +4682,7 @@ int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifi /*The following definitions come from smbd/vfs.c */ -BOOL vfs_init(connection_struct *conn); +BOOL smbd_vfs_init(connection_struct *conn); BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); char *vfs_getwd(connection_struct *conn, char *unix_path); diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 729e8d48c6d..d9e7343b20b 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -88,8 +88,8 @@ static BOOL create_conn_struct( connection_struct *conn, int snum) conn->service = snum; conn->connectpath = lp_pathname(snum); - if (!vfs_init(conn)) { - DEBUG(0,("create_conn_struct: vfs init failed.\n")); + if (!smbd_vfs_init(conn)) { + DEBUG(0,("create_conn_struct: smbd_vfs_init failed.\n")); return False; } return True; diff --git a/source/smbd/service.c b/source/smbd/service.c index 515bcc5c792..0917c0dbad6 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -537,8 +537,8 @@ connection_struct *make_connection(char *service,char *user,char *password, int } /* Initialise VFS function pointers */ - if (!vfs_init(conn)) { - DEBUG(0, ("vfs_init failed for service %s\n", lp_servicename(SNUM(conn)))); + if (!smbd_vfs_init(conn)) { + DEBUG(0, ("smbd_vfs_init failed for service %s\n", lp_servicename(SNUM(conn)))); yield_connection(conn, lp_servicename(SNUM(conn))); conn_free(conn); return NULL; diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 7d30ffe590e..b42ededccf2 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -133,7 +133,7 @@ static BOOL vfs_init_default(connection_struct *conn) static BOOL vfs_init_custom(connection_struct *conn) { int vfs_version = -1; - struct vfs_ops *ops, *(*init_fptr)(int *); + struct vfs_ops *ops, *(*init_fptr)(int *, struct vfs_ops *); DEBUG(3, ("Initialising custom vfs hooks from %s\n", lp_vfsobj(SNUM(conn)))); @@ -147,7 +147,7 @@ static BOOL vfs_init_custom(connection_struct *conn) /* Get handle on vfs_init() symbol */ - init_fptr = (struct vfs_ops *(*)(int *))sys_dlsym(conn->dl_handle, "vfs_init"); + init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops *))sys_dlsym(conn->dl_handle, "vfs_init"); if (init_fptr == NULL) { DEBUG(0, ("No vfs_init() symbol found in %s\n", @@ -157,7 +157,9 @@ static BOOL vfs_init_custom(connection_struct *conn) /* Initialise vfs_ops structure */ - if ((ops = init_fptr(&vfs_version)) == NULL) { + conn->vfs_ops = default_vfs_ops; + + if ((ops = init_fptr(&vfs_version, &default_vfs_ops)) == NULL) { DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn)))); return False; } @@ -168,192 +170,9 @@ static BOOL vfs_init_custom(connection_struct *conn) return False; } - /* Fill in unused operations with default (disk based) ones. - There's probably a neater way to do this then a whole bunch of - if statements. */ - - memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops)); - - if (conn->vfs_ops.connect == NULL) - conn->vfs_ops.connect = default_vfs_ops.connect; - - if (conn->vfs_ops.disconnect == NULL) - conn->vfs_ops.disconnect = default_vfs_ops.disconnect; - - if (conn->vfs_ops.disk_free == NULL) - conn->vfs_ops.disk_free = default_vfs_ops.disk_free; - - if (conn->vfs_ops.opendir == NULL) - conn->vfs_ops.opendir = default_vfs_ops.opendir; - - if (conn->vfs_ops.readdir == NULL) - conn->vfs_ops.readdir = default_vfs_ops.readdir; - - if (conn->vfs_ops.mkdir == NULL) - conn->vfs_ops.mkdir = default_vfs_ops.mkdir; - - if (conn->vfs_ops.rmdir == NULL) - conn->vfs_ops.rmdir = default_vfs_ops.rmdir; - - if (conn->vfs_ops.closedir == NULL) - conn->vfs_ops.closedir = default_vfs_ops.closedir; - - if (conn->vfs_ops.open == NULL) - conn->vfs_ops.open = default_vfs_ops.open; - - if (conn->vfs_ops.close == NULL) - conn->vfs_ops.close = default_vfs_ops.close; - - if (conn->vfs_ops.read == NULL) - conn->vfs_ops.read = default_vfs_ops.read; - - if (conn->vfs_ops.write == NULL) - conn->vfs_ops.write = default_vfs_ops.write; - - if (conn->vfs_ops.lseek == NULL) - conn->vfs_ops.lseek = default_vfs_ops.lseek; - - if (conn->vfs_ops.rename == NULL) - conn->vfs_ops.rename = default_vfs_ops.rename; - - if (conn->vfs_ops.fsync == NULL) - conn->vfs_ops.fsync = default_vfs_ops.fsync; - - if (conn->vfs_ops.stat == NULL) - conn->vfs_ops.stat = default_vfs_ops.stat; - - if (conn->vfs_ops.fstat == NULL) - conn->vfs_ops.fstat = default_vfs_ops.fstat; - - if (conn->vfs_ops.lstat == NULL) - conn->vfs_ops.lstat = default_vfs_ops.lstat; - - if (conn->vfs_ops.unlink == NULL) - conn->vfs_ops.unlink = default_vfs_ops.unlink; - - if (conn->vfs_ops.chmod == NULL) - conn->vfs_ops.chmod = default_vfs_ops.chmod; - - if (conn->vfs_ops.fchmod == NULL) - conn->vfs_ops.fchmod = default_vfs_ops.fchmod; - - if (conn->vfs_ops.chown == NULL) - conn->vfs_ops.chown = default_vfs_ops.chown; - - if (conn->vfs_ops.fchown == NULL) - conn->vfs_ops.fchown = default_vfs_ops.fchown; - - if (conn->vfs_ops.chdir == NULL) - conn->vfs_ops.chdir = default_vfs_ops.chdir; - - if (conn->vfs_ops.getwd == NULL) - conn->vfs_ops.getwd = default_vfs_ops.getwd; - - if (conn->vfs_ops.utime == NULL) - conn->vfs_ops.utime = default_vfs_ops.utime; - - if (conn->vfs_ops.ftruncate == NULL) - conn->vfs_ops.ftruncate = default_vfs_ops.ftruncate; - - if (conn->vfs_ops.lock == NULL) - conn->vfs_ops.lock = default_vfs_ops.lock; - - if (conn->vfs_ops.symlink == NULL) - conn->vfs_ops.symlink = default_vfs_ops.symlink; - - if (conn->vfs_ops.readlink == NULL) - conn->vfs_ops.readlink = default_vfs_ops.readlink; - - if (conn->vfs_ops.link == NULL) - conn->vfs_ops.link = default_vfs_ops.link; - - if (conn->vfs_ops.mknod == NULL) - conn->vfs_ops.mknod = default_vfs_ops.mknod; - - if (conn->vfs_ops.fget_nt_acl == NULL) - conn->vfs_ops.fget_nt_acl = default_vfs_ops.fget_nt_acl; - - if (conn->vfs_ops.get_nt_acl == NULL) - conn->vfs_ops.get_nt_acl = default_vfs_ops.get_nt_acl; - - if (conn->vfs_ops.fset_nt_acl == NULL) - conn->vfs_ops.fset_nt_acl = default_vfs_ops.fset_nt_acl; - - if (conn->vfs_ops.set_nt_acl == NULL) - conn->vfs_ops.set_nt_acl = default_vfs_ops.set_nt_acl; - - /* POSIX ACL entries. */ - if (conn->vfs_ops.chmod_acl == NULL) - conn->vfs_ops.chmod_acl = default_vfs_ops.chmod_acl; - - if (conn->vfs_ops.fchmod_acl == NULL) - conn->vfs_ops.fchmod_acl = default_vfs_ops.fchmod_acl; - - if (conn->vfs_ops.sys_acl_get_entry == NULL) - conn->vfs_ops.sys_acl_get_entry = default_vfs_ops.sys_acl_get_entry; - - if (conn->vfs_ops.sys_acl_get_tag_type == NULL) - conn->vfs_ops.sys_acl_get_tag_type = default_vfs_ops.sys_acl_get_tag_type; - - if (conn->vfs_ops.sys_acl_get_permset == NULL) - conn->vfs_ops.sys_acl_get_permset = default_vfs_ops.sys_acl_get_permset; - - if (conn->vfs_ops.sys_acl_get_qualifier == NULL) - conn->vfs_ops.sys_acl_get_qualifier = default_vfs_ops.sys_acl_get_qualifier; - - if (conn->vfs_ops.sys_acl_get_file == NULL) - conn->vfs_ops.sys_acl_get_file = default_vfs_ops.sys_acl_get_file; - - if (conn->vfs_ops.sys_acl_get_fd == NULL) - conn->vfs_ops.sys_acl_get_fd = default_vfs_ops.sys_acl_get_fd; - - if (conn->vfs_ops.sys_acl_clear_perms == NULL) - conn->vfs_ops.sys_acl_clear_perms = default_vfs_ops.sys_acl_clear_perms; - - if (conn->vfs_ops.sys_acl_add_perm == NULL) - conn->vfs_ops.sys_acl_add_perm = default_vfs_ops.sys_acl_add_perm; - - if (conn->vfs_ops.sys_acl_to_text == NULL) - conn->vfs_ops.sys_acl_to_text = default_vfs_ops.sys_acl_to_text; - - if (conn->vfs_ops.sys_acl_init == NULL) - conn->vfs_ops.sys_acl_init = default_vfs_ops.sys_acl_init; - - if (conn->vfs_ops.sys_acl_create_entry == NULL) - conn->vfs_ops.sys_acl_create_entry = default_vfs_ops.sys_acl_create_entry; - - if (conn->vfs_ops.sys_acl_set_tag_type == NULL) - conn->vfs_ops.sys_acl_set_tag_type = default_vfs_ops.sys_acl_set_tag_type; - - if (conn->vfs_ops.sys_acl_set_qualifier == NULL) - conn->vfs_ops.sys_acl_set_qualifier = default_vfs_ops.sys_acl_set_qualifier; - - if (conn->vfs_ops.sys_acl_set_permset == NULL) - conn->vfs_ops.sys_acl_set_permset = default_vfs_ops.sys_acl_set_permset; - - if (conn->vfs_ops.sys_acl_valid == NULL) - conn->vfs_ops.sys_acl_valid = default_vfs_ops.sys_acl_valid; - - if (conn->vfs_ops.sys_acl_set_file == NULL) - conn->vfs_ops.sys_acl_set_file = default_vfs_ops.sys_acl_set_file; - - if (conn->vfs_ops.sys_acl_set_fd == NULL) - conn->vfs_ops.sys_acl_set_fd = default_vfs_ops.sys_acl_set_fd; - - if (conn->vfs_ops.sys_acl_delete_def_file == NULL) - conn->vfs_ops.sys_acl_delete_def_file = default_vfs_ops.sys_acl_delete_def_file; - - if (conn->vfs_ops.sys_acl_get_perm == NULL) - conn->vfs_ops.sys_acl_get_perm = default_vfs_ops.sys_acl_get_perm; - - if (conn->vfs_ops.sys_acl_free_text == NULL) - conn->vfs_ops.sys_acl_free_text = default_vfs_ops.sys_acl_free_text; - - if (conn->vfs_ops.sys_acl_free_acl == NULL) - conn->vfs_ops.sys_acl_free_acl = default_vfs_ops.sys_acl_free_acl; - - if (conn->vfs_ops.sys_acl_free_qualifier == NULL) - conn->vfs_ops.sys_acl_free_qualifier = default_vfs_ops.sys_acl_free_qualifier; + if (ops != &conn->vfs_ops) { + memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops)); + } return True; } @@ -363,7 +182,7 @@ static BOOL vfs_init_custom(connection_struct *conn) Generic VFS init. ******************************************************************/ -BOOL vfs_init(connection_struct *conn) +BOOL smbd_vfs_init(connection_struct *conn) { if (*lp_vfsobj(SNUM(conn))) { #ifdef HAVE_LIBDL @@ -371,13 +190,13 @@ BOOL vfs_init(connection_struct *conn) /* Loadable object file */ if (!vfs_init_custom(conn)) { - DEBUG(0, ("vfs_init: vfs_init_custom failed\n")); + DEBUG(0, ("smbd_vfs_init: vfs_init_custom failed\n")); return False; } return True; #else - DEBUG(0, ("vfs_init: No libdl present - cannot use VFS objects\n")); + DEBUG(0, ("smbd_vfs_init: No libdl present - cannot use VFS objects\n")); return False; #endif } -- cgit From e0cb9c652233008c550e118d43c84da2178611b0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 18 Mar 2002 07:44:57 +0000 Subject: Also set 'amroot' for local mode - this should get the build farm tests going again. Andrew Bartlett --- source/utils/smbpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 2b4ce6dc4f4..051e69de202 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -115,7 +115,7 @@ static void process_options(int argc, char **argv, BOOL amroot) while ((ch = getopt(argc, argv, "c:axdehmnj:r:sw:R:D:U:L")) != EOF) { switch(ch) { case 'L': - local_mode = True; + local_mode = amroot = True; break; case 'c': pstrcpy(servicesf,optarg); -- cgit From 7b477b9753ae9b66bb585c9f8f92fcfc606a195a Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 18 Mar 2002 15:58:10 +0000 Subject: clean this up a bit. --- packaging/SGI/samba.rc | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc index 8906f66c633..2699825d952 100644 --- a/packaging/SGI/samba.rc +++ b/packaging/SGI/samba.rc @@ -4,8 +4,25 @@ # Samba server control # +stop_samba() +{ + if [ -r /usr/samba/var/locks/smbd.pid ]; then + smbd_group=`cat /usr/samba/var/locks/smbd.pid` + ps -p $smbd_group | grep smbd > /dev/null + if [ $? -eq 0 ]; then + /usr/bin/kill -15 -$smbd_group + fi + fi + if [ -r /usr/samba/var/locks/nmbd.pid ]; then + nmbd_group=`cat /usr/samba/var/locks/nmbd.pid` + ps -p $nmbd_group | grep nmbd > /dev/null + if [ $? -eq 0 ]; then + /usr/bin/kill -15 -$nmbd_group + fi + fi +} + IS_ON=/etc/chkconfig -KILL=/usr/bin/kill SAMBAD=/usr/samba/bin/smbd #SAMBA_OPTS=-d2 @@ -25,14 +42,7 @@ fi case $1 in 'profile') if $IS_ON samba && test -x $SAMBAD; then - ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/smbd.pid` - fi - ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` - fi + stop_samba; $ECHO "Samba:\c" $SAMBAD.profile $SAMBA_OPTS; $ECHO " smbd.profile\c" $NMBD.profile $NMBD_OPTS; $ECHO " nmbd.profile\c" @@ -41,14 +51,7 @@ case $1 in ;; 'start') if $IS_ON samba && test -x $SAMBAD; then - ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/smbd.pid` - fi - ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` - fi + stop_samba; $ECHO "Samba:\c" $SAMBAD $SAMBA_OPTS; $ECHO " smbd\c" $NMBD $NMBD_OPTS; $ECHO " nmbd\c" @@ -57,14 +60,7 @@ case $1 in ;; 'stop') $ECHO "Stopping Samba Servers." - ps -p `cat /usr/samba/var/locks/smbd.pid` | grep smbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/smbd.pid` - fi - ps -p `cat /usr/samba/var/locks/nmbd.pid` | grep nmbd > /dev/null - if [ $? -eq 0 ]; then - $KILL -15 `cat /usr/samba/var/locks/nmbd.pid` - fi + stop_samba; exit 0 ;; *) -- cgit From 40b2901325f5ca796d22b11f4c8fbf2fcf35b089 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Mar 2002 22:08:39 +0000 Subject: Looks a big change but isn't. Finally (now it's going away of course... :-) got rid of the horror that is dos_to_unix(XXX,BOOL) - modifying the target. Replaced with dos_to_unix_static that always returns a static string and dos_to_unix which always modifies the string in place. MUCH CLEANER ! Made VFS interfaces const clean. Jeremy. --- source/client/client.c | 2 +- source/client/clitar.c | 2 +- source/include/kanji.h | 108 +- source/include/proto.h | 2085 ++++++++++++++++++------------------ source/include/smb_macros.h | 14 +- source/include/vfs.h | 30 +- source/lib/charcnv.c | 82 +- source/lib/kanji.c | 349 +++--- source/lib/sysacls.c | 4 +- source/lib/username.c | 12 +- source/lib/util_file.c | 2 +- source/libsmb/clirap.c | 8 +- source/libsmb/clistr.c | 6 +- source/libsmb/namequery.c | 2 +- source/libsmb/nmblib.c | 2 +- source/libsmb/pwd_cache.c | 6 +- source/msdfs/msdfs.c | 4 +- source/nmbd/nmbd_synclists.c | 6 +- source/param/loadparm.c | 27 +- source/param/params.c | 2 +- source/passdb/pdb_nisplus.c | 8 +- source/passdb/secrets.c | 4 +- source/printing/nt_printing.c | 18 +- source/printing/pcap.c | 4 +- source/printing/print_cups.c | 6 +- source/printing/print_generic.c | 4 +- source/printing/print_svid.c | 2 +- source/printing/printing.c | 18 +- source/rpc_client/cli_login.c | 6 +- source/rpc_client/cli_netlogon.c | 12 +- source/rpc_server/srv_lsa_nt.c | 8 +- source/rpc_server/srv_spoolss_nt.c | 16 +- source/rpc_server/srv_wkssvc_nt.c | 2 +- source/smbd/close.c | 2 +- source/smbd/connection.c | 4 +- source/smbd/dfree.c | 2 +- source/smbd/dir.c | 4 +- source/smbd/dosmode.c | 4 +- source/smbd/filename.c | 2 +- source/smbd/lanman.c | 8 +- source/smbd/message.c | 2 +- source/smbd/notify_kernel.c | 2 +- source/smbd/open.c | 6 +- source/smbd/password.c | 2 +- source/smbd/posix_acls.c | 10 +- source/smbd/reply.c | 38 +- source/smbd/service.c | 6 +- source/smbd/trans2.c | 20 +- source/smbd/vfs-wrap.c | 200 +--- source/smbd/vfs.c | 18 +- source/utils/status.c | 2 +- source/utils/testparm.c | 2 +- source/web/statuspage.c | 2 +- source/web/swat.c | 15 +- 54 files changed, 1554 insertions(+), 1658 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index 6d907e6ec56..745aec73970 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -192,7 +192,7 @@ static void send_message(void) * DOS before sending. */ - unix_to_dos(msg, True); + unix_to_dos(msg); if (!cli_message_text(cli, msg, l, grp_id)) { printf("SMBsendtxt failed (%s)\n",cli_errstr(cli)); diff --git a/source/client/clitar.c b/source/client/clitar.c index 2beb669de90..50a46c70007 100644 --- a/source/client/clitar.c +++ b/source/client/clitar.c @@ -1718,7 +1718,7 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) SMB_STRUCT_STAT stbuf; extern time_t newer_than; - if (sys_stat(dos_to_unix(argv[Optind],False), &stbuf) == 0) { + if (sys_stat(dos_to_unix_static(argv[Optind]), &stbuf) == 0) { newer_than = stbuf.st_mtime; DEBUG(1,("Getting files newer than %s", asctime(LocalTime(&newer_than)))); diff --git a/source/include/kanji.h b/source/include/kanji.h index 58774a699df..bbe7da3719c 100644 --- a/source/include/kanji.h +++ b/source/include/kanji.h @@ -29,55 +29,55 @@ /* FOR SHIFT JIS CODE */ #define is_shift_jis(c) \ - ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \ - || (0xe0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc)) + ((0x81 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0x9f) \ + || (0xe0 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfc)) #define is_shift_jis2(c) \ - (0x40 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc \ - && ((unsigned char) (c)) != 0x7f) -#define is_kana(c) ((0xa0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xdf)) + (0x40 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfc \ + && ((const unsigned char) (c)) != 0x7f) +#define is_kana(c) ((0xa0 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xdf)) /* case conversion */ #define is_sj_upper2(c) \ - ((0x60 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x79)) + ((0x60 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x79)) #define is_sj_lower2(c) \ - ((0x81 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x9A)) + ((0x81 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x9A)) #define sjis_alph 0x82 -#define is_sj_alph(c) (sjis_alph == (unsigned char) (c)) +#define is_sj_alph(c) (sjis_alph == (const unsigned char) (c)) #define is_sj_upper(c1, c2) (is_sj_alph (c1) && is_sj_upper2 (c2)) #define is_sj_lower(c1, c2) (is_sj_alph (c1) && is_sj_lower2 (c2)) #define sj_toupper2(c) \ - (is_sj_lower2 (c) ? ((int) ((unsigned char) (c) - 0x81 + 0x60)) : \ - ((int) (unsigned char) (c))) + (is_sj_lower2 (c) ? ((const int) ((const unsigned char) (c) - 0x81 + 0x60)) : \ + ((int) (const unsigned char) (c))) #define sj_tolower2(c) \ - (is_sj_upper2 (c) ? ((int) ((unsigned char) (c) - 0x60 + 0x81)) : \ - ((int) (unsigned char) (c))) + (is_sj_upper2 (c) ? ((const int) ((const unsigned char) (c) - 0x60 + 0x81)) : \ + ((const int) (const unsigned char) (c))) #define is_sj_ru_upper2(c) \ - ((0x40 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x60)) + ((0x40 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x60)) #define is_sj_ru_lower2(c) \ - (((0x70 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x7e)) || \ - ((0x80 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x91))) + (((0x70 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x7e)) || \ + ((0x80 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x91))) #define sjis_russian 0x84 -#define is_sj_russian(c) (sjis_russian == (unsigned char) (c)) +#define is_sj_russian(c) (sjis_russian == (const unsigned char) (c)) #define is_sj_ru_upper(c1, c2) (is_sj_russian (c1) && is_sj_ru_upper2 (c2)) #define is_sj_ru_lower(c1, c2) (is_sj_russian (c1) && is_sj_ru_lower2 (c2)) #define sj_ru_toupper2(c) \ - (is_sj_ru_lower2 (c) ? ((int) ((unsigned char) (c) + \ - (((unsigned char)(c) >= 0x4f) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \ - ((int) (unsigned char) (c))) + (is_sj_ru_lower2 (c) ? ((const int) ((const unsigned char) (c) + \ + (((const unsigned char)(c) >= 0x4f) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \ + ((const int) (const unsigned char) (c))) #define sj_ru_tolower2(c) \ - (is_sj_ru_upper2 (c) ? ((int) ((unsigned char) (c) - \ - (((unsigned char)(c) >= 0x80) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \ - ((int) (unsigned char) (c))) + (is_sj_ru_upper2 (c) ? ((const int) ((const unsigned char) (c) - \ + (((const unsigned char)(c) >= 0x80) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \ + ((const int) (const unsigned char) (c))) #ifdef _KANJI_C_ /* FOR EUC CODE */ #define euc_kana (0x8e) -#define is_euc_kana(c) (((unsigned char) (c)) == euc_kana) -#define is_euc(c) (0xa0 < ((unsigned char) (c)) && ((unsigned char) (c)) < 0xff) +#define is_euc_kana(c) (((const unsigned char) (c)) == euc_kana) +#define is_euc(c) (0xa0 < ((const unsigned char) (c)) && ((const unsigned char) (c)) < 0xff) #define euc_sup (0x8f) -#define is_euc_sup(c) (((unsigned char ) (c)) == euc_sup) +#define is_euc_sup(c) (((const unsigned char ) (c)) == euc_sup) /* FOR JIS CODE */ /* default jis third shift code, use for output */ @@ -96,18 +96,18 @@ #define jis_si (0x0f) #define jis_si1 ('(') #define jis_si2 ('J') -#define is_esc(c) (((unsigned char) (c)) == jis_esc) -#define is_so1(c) (((unsigned char) (c)) == jis_so1) -#define is_so2(c) (((unsigned char) (c)) == jis_so2 || ((unsigned char) (c)) == '@') -#define is_si1(c) (((unsigned char) (c)) == jis_si1) -#define is_si2(c) (((unsigned char) (c)) == jis_si2 || ((unsigned char) (c)) == 'B' \ - || ((unsigned char) (c)) == 'H') -#define is_so(c) (((unsigned char) (c)) == jis_so) -#define is_si(c) (((unsigned char) (c)) == jis_si) +#define is_esc(c) (((const unsigned char) (c)) == jis_esc) +#define is_so1(c) (((const unsigned char) (c)) == jis_so1) +#define is_so2(c) (((const unsigned char) (c)) == jis_so2 || ((const unsigned char) (c)) == '@') +#define is_si1(c) (((const unsigned char) (c)) == jis_si1) +#define is_si2(c) (((const unsigned char) (c)) == jis_si2 || ((const unsigned char) (c)) == 'B' \ + || ((const unsigned char) (c)) == 'H') +#define is_so(c) (((const unsigned char) (c)) == jis_so) +#define is_si(c) (((const unsigned char) (c)) == jis_si) #define junet_kana1 ('(') #define junet_kana2 ('I') -#define is_juk1(c) (((unsigned char) (c)) == junet_kana1) -#define is_juk2(c) (((unsigned char) (c)) == junet_kana2) +#define is_juk1(c) (((const unsigned char) (c)) == junet_kana1) +#define is_juk2(c) (((const unsigned char) (c)) == junet_kana2) #define _KJ_ROMAN (0) #define _KJ_KANJI (1) @@ -116,22 +116,22 @@ /* FOR HEX */ #define HEXTAG ':' #define hex2bin(x) \ - ( ((int) '0' <= ((int) (x)) && ((int) (x)) <= (int)'9')? \ - (((int) (x))-(int)'0'): \ - ((int) 'a'<= ((int) (x)) && ((int) (x))<= (int) 'f')? \ - (((int) (x)) - (int)'a'+10): \ - (((int) (x)) - (int)'A'+10) ) + ( ((const int) '0' <= ((const int) (x)) && ((const int) (x)) <= (const int)'9')? \ + (((const int) (x))-(const int)'0'): \ + ((const int) 'a'<= ((const int) (x)) && ((const int) (x))<= (const int) 'f')? \ + (((const int) (x)) - (const int)'a'+10): \ + (((const int) (x)) - (const int)'A'+10) ) #define bin2hex(x) \ - ( (((int) (x)) >= 10)? (((int) (x))-10 + (int) 'a'): (((int) (x)) + (int) '0') ) + ( (((const int) (x)) >= 10)? (((const int) (x))-10 + (const int) 'a'): (((const int) (x)) + (const int) '0') ) /* For Hangul (Korean - code page 949). */ -#define is_hangul(c) ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfd)) +#define is_hangul(c) ((0x81 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfd)) /* For traditional Chinese (known as Big5 encoding - code page 950). */ -#define is_big5_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf9)) +#define is_big5_c1(c) ((0xa1 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xf9)) /* For simplified Chinese (code page - 936). */ -#define is_simpch_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf7)) +#define is_simpch_c1(c) ((0xa1 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xf7)) #else /* not _KANJI_C_ */ @@ -164,9 +164,11 @@ extern char *(*multibyte_strchr)(const char *s, int c); extern char *(*multibyte_strrchr)(const char *s, int c); extern char *(*multibyte_strstr)(const char *s1, const char *s2); extern char *(*multibyte_strtok)(char *s1, const char *s2); -extern char *(*_dos_to_unix)(char *str, BOOL overwrite); -extern char *(*_unix_to_dos)(char *str, BOOL overwrite); -extern char *(*_dos_to_dos)(char *str, BOOL overwrite); +extern char *(*_dos_to_unix)(char *str); +extern char *(*_dos_to_unix_static)(const char *str); +extern char *(*_unix_to_dos)(char *str); +extern char *(*_unix_to_dos_static)(const char *str); +extern char *(*_dos_to_dos_static)(const char *str); extern BOOL (*is_multibyte_char)(char c); extern int (*_skip_multibyte_char)(char c); @@ -174,9 +176,11 @@ extern int (*_skip_multibyte_char)(char c); #define strrchr(s1, c) ((*multibyte_strrchr)((s1), (c))) #define strstr(s1, s2) ((*multibyte_strstr)((s1), (s2))) #define strtok(s1, s2) ((*multibyte_strtok)((s1), (s2))) -#define dos_to_unix(x,y) ((*_dos_to_unix)((x), (y))) -#define unix_to_dos(x,y) ((*_unix_to_dos)((x), (y))) -#define dos_to_dos(x,y) ((*_dos_to_dos)((x), (y))) +#define dos_to_unix(x) ((*_dos_to_unix)(x)) +#define dos_to_unix_static(x) ((*_dos_to_unix_static)(x)) +#define unix_to_dos(x) ((*_unix_to_dos)(x)) +#define unix_to_dos_static(x) ((*_unix_to_dos_static)(x)) +#define dos_to_dos_static(x) ((*_dos_to_dos)(x)) #define skip_multibyte_char(c) ((*_skip_multibyte_char)((c))) #endif /* _KANJI_C_ */ @@ -197,8 +201,8 @@ extern int (*_skip_multibyte_char)(char c); /* For conversion */ -#define EXTSJISC(c) (0xf0 <= ((unsigned char)(c)) \ - && ((unsigned char)(c) <= 0xfc)) +#define EXTSJISC(c) (0xf0 <= ((const unsigned char)(c)) \ + && ((const unsigned char)(c) <= 0xfc)) #define GETAHI (0x81) #define GETALO (0xac) diff --git a/source/include/proto.h b/source/include/proto.h index ae3428ceb46..41949c4d78c 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -34,8 +34,10 @@ int bitmap_find(struct bitmap *bm, unsigned ofs); /*The following definitions come from lib/charcnv.c */ -char *unix2dos_format(char *str,BOOL overwrite); -char *dos2unix_format(char *str, BOOL overwrite); +char *unix2dos_format_static(const char *str); +char *unix2dos_format(char *str); +char *dos2unix_format_static(const char *str); +char *dos2unix_format(char *str); void interpret_character_set(char *str, int codepage); /*The following definitions come from lib/charset.c */ @@ -172,703 +174,269 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from lib/smbrun.c */ +/*The following definitions come from libsmb/cliconnect.c */ -int smbrun(char *cmd, int *outfd); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from lib/snprintf.c */ +/*The following definitions come from libsmb/cli_dfs.c */ +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); -/*The following definitions come from lib/substitute.c */ +/*The following definitions come from libsmb/clidgram.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/sysacls.c */ +/*The following definitions come from libsmb/clientgen.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/system.c */ +/*The following definitions come from libsmb/clierror.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/talloc.c */ +/*The following definitions come from libsmb/clifile.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from lib/time.c */ +/*The following definitions come from libsmb/clilist.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from lib/ufc.c */ +/*The following definitions come from libsmb/cli_lsarpc.c */ -char *ufc_crypt(const char *key,const char *salt); +struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_sids, DOM_SID *sids, + char ***names, uint32 **types, int *num_names); +NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_names, char **names, + DOM_SID **sids, uint32 **types, int *num_sids); +NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, DOM_SID *domain_sid); +NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, + uint32 *num_domains, char ***domain_names, + DOM_SID **domain_sids); +NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, + uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); +NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, + fstring description, uint16 *lang_id_desc); +NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, + uint32 *num_sids, DOM_SID **sids); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/*The following definitions come from lib/username.c */ +/*The following definitions come from libsmb/climessage.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from lib/util.c */ +/*The following definitions come from libsmb/cli_netlogon.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +struct cli_state *cli_netlogon_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, + DOM_CHAL *srv_chal); +NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal); +NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, + unsigned char mach_pwd[16]); +NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 query_level); +NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 database_id, uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 database_id, UINT64_S seqnum, + uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *username, char *password, + int logon_type); -/*The following definitions come from lib/util_file.c */ +/*The following definitions come from libsmb/clioplock.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/*The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from lib/util_seaccess.c */ +/*The following definitions come from libsmb/cli_pipe_util.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, + char *pipe_name, + struct ntuser_creds *creds); +void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/cliprint.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/clirap.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/clireadwrite.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/cli_reg.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +struct cli_state *cli_winreg_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *msg, uint32 timeout, uint16 flags); +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); -/*The following definitions come from lib/util_unistr.c */ - -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); - -/*The following definitions come from lib/wins_srv.c */ - -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); - -/*The following definitions come from libsmb/cli_dfs.c */ - -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); - -/*The following definitions come from libsmb/cli_lsarpc.c */ - -struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); -NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***names, uint32 **types, int *num_names); -NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, char **names, - DOM_SID **sids, uint32 **types, int *num_sids); -NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint16 info_class, - fstring domain_name, DOM_SID *domain_sid); -NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, - uint32 *num_domains, char ***domain_names, - DOM_SID **domain_sids); -NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, - uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); -NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, - fstring description, uint16 *lang_id_desc); -NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, - uint32 *num_sids, DOM_SID **sids); -BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); - -/*The following definitions come from libsmb/cli_netlogon.c */ - -struct cli_state *cli_netlogon_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, - DOM_CHAL *srv_chal); -NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan, - uint32 neg_flags, DOM_CHAL *srv_chal); -NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - unsigned char mach_pwd[16]); -NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 query_level); -NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 database_id, uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 database_id, UINT64_S seqnum, - uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *username, char *password, - int logon_type); - -/*The following definitions come from libsmb/cli_pipe_util.c */ - -struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, - char *pipe_name, - struct ntuser_creds *creds); -void cli_pipe_shutdown(struct cli_state *cli); - -/*The following definitions come from libsmb/cli_reg.c */ - -struct cli_state *cli_winreg_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *msg, uint32 timeout, uint16 flags); -NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); - -/*The following definitions come from libsmb/cli_samr.c */ +/*The following definitions come from libsmb/cli_samr.c */ struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); @@ -937,6 +505,12 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); +/*The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -984,232 +558,57 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from libsmb/clistr.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from libsmb/clitrans.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from libsmb/credentials.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from libsmb/errormap.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from libsmb/clifile.c */ - -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); - -/*The following definitions come from libsmb/clilist.c */ - -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); - -/*The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); - -/*The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - -/*The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/*The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/*The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - -/*The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - -/*The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/*The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/*The following definitions come from libsmb/credentials.c */ - -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/*The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/*The following definitions come from libsmb/namequery.c */ +/*The following definitions come from libsmb/namequery.c */ struct node_status *node_status_query(int fd,struct nmb_name *name, struct in_addr to_ip, int *num_names); @@ -1236,98 +635,701 @@ BOOL lookup_dc_name(const char *srcname, const char *domain, BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); BOOL get_lmb_list(struct in_addr **ip_list, int *count); -/*The following definitions come from libsmb/nmblib.c */ +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/*The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); + +/*The following definitions come from lib/smbrun.c */ + +int smbrun(char *cmd, int *outfd); + +/*The following definitions come from libsmb/smbdes.c */ + +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); + +/*The following definitions come from libsmb/smbencrypt.c */ + +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/*The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/*The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); + +/*The following definitions come from lib/snprintf.c */ + + +/*The following definitions come from lib/substitute.c */ + +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); + +/*The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/*The following definitions come from lib/system.c */ + +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); + +/*The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); + +/*The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/*The following definitions come from lib/ufc.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +char *ufc_crypt(const char *key,const char *salt); -/*The following definitions come from libsmb/nterr.c */ +/*The following definitions come from lib/username.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/*The following definitions come from libsmb/passchange.c */ +/*The following definitions come from lib/util.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/*The following definitions come from libsmb/pwd_cache.c */ +/*The following definitions come from lib/util_file.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/*The following definitions come from libsmb/smbdes.c */ +/*The following definitions come from lib/util_getent.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from lib/util_seaccess.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/*The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/*The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/*The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from lib/util_str.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from lib/util_unistr.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/*The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from locking/brlock.c */ @@ -1415,9 +1417,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1448,6 +1447,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -1961,6 +1963,7 @@ char *lp_writelist(int ); char *lp_printer_admin(int ); char *lp_fstype(int ); char *lp_vfsobj(int ); +char *lp_vfoptions(int ); char *lp_mangled_map(int ); char *lp_veto_files(int ); char *lp_hide_files(int ); @@ -2051,8 +2054,8 @@ BOOL lp_load(char *pszFname, BOOL global_only, BOOL save_defaults, BOOL add_ipc); void lp_resetnumservices(void); int lp_numservices(void); -void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(char *, BOOL)); -void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(char *, BOOL)); +void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(const char *)); +void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(const char *)); int lp_servicenumber(char *pszServiceName); char *volume_label(int snum); int lp_server_role(void); @@ -2325,19 +2328,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ -/*The following definitions come from printing/print_generic.c */ - - -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/*The following definitions come from printing/print_generic.c */ + + /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2362,6 +2360,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2420,6 +2423,39 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4114,39 +4150,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4615,35 +4618,53 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/*The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); void vfswrap_dummy_disconnect(connection_struct *conn); SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -DIR *vfswrap_opendir(connection_struct *conn, char *fname); +DIR *vfswrap_opendir(connection_struct *conn, const char *fname); struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp); -int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode); -int vfswrap_rmdir(connection_struct *conn, char *path); +int vfswrap_mkdir(connection_struct *conn, const char *path, mode_t mode); +int vfswrap_rmdir(connection_struct *conn, const char *path); int vfswrap_closedir(connection_struct *conn, DIR *dirp); -int vfswrap_open(connection_struct *conn, char *fname, int flags, mode_t mode); +int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t mode); int vfswrap_close(files_struct *fsp, int fd); ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n); ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n); SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence); -int vfswrap_rename(connection_struct *conn, char *oldname, char *newname); +int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname); int vfswrap_fsync(files_struct *fsp, int fd); -int vfswrap_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf); +int vfswrap_stat(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf); int vfswrap_fstat(files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf); -int vfswrap_lstat(connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf); -int vfswrap_unlink(connection_struct *conn, char *path); -int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode); +int vfswrap_lstat(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf); +int vfswrap_unlink(connection_struct *conn, const char *path); +int vfswrap_chmod(connection_struct *conn, const char *path, mode_t mode); int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode); -int vfswrap_chown(connection_struct *conn, char *path, uid_t uid, gid_t gid); +int vfswrap_chown(connection_struct *conn, const char *path, uid_t uid, gid_t gid); int vfswrap_fchown(files_struct *fsp, int fd, uid_t uid, gid_t gid); -int vfswrap_chdir(connection_struct *conn, char *path); +int vfswrap_chdir(connection_struct *conn, const char *path); char *vfswrap_getwd(connection_struct *conn, char *path); -int vfswrap_utime(connection_struct *conn, char *path, struct utimbuf *times); +int vfswrap_utime(connection_struct *conn, const char *path, struct utimbuf *times); int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len); BOOL vfswrap_lock(files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); int vfswrap_symlink(connection_struct *conn, const char *oldpath, const char *newpath); @@ -4652,10 +4673,10 @@ int vfswrap_link(connection_struct *conn, const char *oldpath, const char *newpa int vfswrap_mknod(connection_struct *conn, const char *pathname, mode_t mode, SMB_DEV_T dev); char *vfswrap_realpath(connection_struct *conn, const char *path, char *resolved_path); size_t vfswrap_fget_nt_acl(files_struct *fsp, int fd, SEC_DESC **ppdesc); -size_t vfswrap_get_nt_acl(files_struct *fsp, char *name, SEC_DESC **ppdesc); +size_t vfswrap_get_nt_acl(files_struct *fsp, const char *name, SEC_DESC **ppdesc); BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd); -BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent, SEC_DESC *psd); -int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode); +BOOL vfswrap_set_nt_acl(files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd); +int vfswrap_chmod_acl(connection_struct *conn, const char *name, mode_t mode); int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); @@ -4680,24 +4701,6 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/*The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 095d7324de0..2e116ad2fa1 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -238,13 +238,13 @@ copy an IP address from one buffer to another vfs stat wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_stat(conn, fname, st) ((conn)->vfs_ops.stat((conn), dos_to_unix((fname),False),(st))) +#define vfs_stat(conn, fname, st) ((conn)->vfs_ops.stat((conn), dos_to_unix_static((fname)),(st))) /******************************************************************* vfs lstat wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_lstat(conn, fname, st) ((conn)->vfs_ops.lstat((conn), dos_to_unix((fname),False),(st))) +#define vfs_lstat(conn, fname, st) ((conn)->vfs_ops.lstat((conn), dos_to_unix_static((fname)),(st))) /******************************************************************* vfs fstat wrapper that calls dos_to_unix. @@ -256,30 +256,30 @@ copy an IP address from one buffer to another vfs rmdir wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_rmdir(conn,fname) ((conn)->vfs_ops.rmdir((conn),dos_to_unix((fname),False))) +#define vfs_rmdir(conn,fname) ((conn)->vfs_ops.rmdir((conn),dos_to_unix_static((fname)))) /******************************************************************* vfs Unlink wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_unlink(conn, fname) ((conn)->vfs_ops.unlink((conn),dos_to_unix((fname),False))) +#define vfs_unlink(conn, fname) ((conn)->vfs_ops.unlink((conn),dos_to_unix_static((fname)))) /******************************************************************* vfs chmod wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_chmod(conn,fname,mode) ((conn)->vfs_ops.chmod((conn),dos_to_unix((fname),False),(mode))) +#define vfs_chmod(conn,fname,mode) ((conn)->vfs_ops.chmod((conn),dos_to_unix_static((fname)),(mode))) /******************************************************************* vfs chown wrapper that calls dos_to_unix. ********************************************************************/ -#define vfs_chown(conn,fname,uid,gid) ((conn)->vfs_ops.chown((conn),dos_to_unix((fname),False),(uid),(gid))) +#define vfs_chown(conn,fname,uid,gid) ((conn)->vfs_ops.chown((conn),dos_to_unix_static((fname)),(uid),(gid))) /******************************************************************* A wrapper for vfs_chdir(). ********************************************************************/ -#define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),dos_to_unix((fname),False))) +#define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),dos_to_unix_static((fname)))) #endif /* _SMB_MACROS_H */ diff --git a/source/include/vfs.h b/source/include/vfs.h index 71c70e0e622..6ee62f5f4a0 100644 --- a/source/include/vfs.h +++ b/source/include/vfs.h @@ -60,32 +60,32 @@ struct vfs_ops { /* Directory operations */ - DIR *(*opendir)(struct connection_struct *conn, char *fname); + DIR *(*opendir)(struct connection_struct *conn, const char *fname); struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp); - int (*mkdir)(struct connection_struct *conn, char *path, mode_t mode); - int (*rmdir)(struct connection_struct *conn, char *path); + int (*mkdir)(struct connection_struct *conn, const char *path, mode_t mode); + int (*rmdir)(struct connection_struct *conn, const char *path); int (*closedir)(struct connection_struct *conn, DIR *dir); /* File operations */ - int (*open)(struct connection_struct *conn, char *fname, int flags, mode_t mode); + int (*open)(struct connection_struct *conn, const char *fname, int flags, mode_t mode); int (*close)(struct files_struct *fsp, int fd); ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n); ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n); SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence); - int (*rename)(struct connection_struct *conn, char *old, char *new); + int (*rename)(struct connection_struct *conn, const char *old, const char *new); int (*fsync)(struct files_struct *fsp, int fd); - int (*stat)(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf); + int (*stat)(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf); int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf); - int (*lstat)(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf); - int (*unlink)(struct connection_struct *conn, char *path); - int (*chmod)(struct connection_struct *conn, char *path, mode_t mode); + int (*lstat)(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf); + int (*unlink)(struct connection_struct *conn, const char *path); + int (*chmod)(struct connection_struct *conn, const char *path, mode_t mode); int (*fchmod)(struct files_struct *fsp, int fd, mode_t mode); - int (*chown)(struct connection_struct *conn, char *path, uid_t uid, gid_t gid); + int (*chown)(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid); int (*fchown)(struct files_struct *fsp, int fd, uid_t uid, gid_t gid); - int (*chdir)(struct connection_struct *conn, char *path); + int (*chdir)(struct connection_struct *conn, const char *path); char *(*getwd)(struct connection_struct *conn, char *buf); - int (*utime)(struct connection_struct *conn, char *path, struct utimbuf *times); + int (*utime)(struct connection_struct *conn, const char *path, struct utimbuf *times); int (*ftruncate)(struct files_struct *fsp, int fd, SMB_OFF_T offset); BOOL (*lock)(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); int (*symlink)(struct connection_struct *conn, const char *oldpath, const char *newpath); @@ -97,13 +97,13 @@ struct vfs_ops { /* NT ACL operations. */ size_t (*fget_nt_acl)(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc); - size_t (*get_nt_acl)(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc); + size_t (*get_nt_acl)(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc); BOOL (*fset_nt_acl)(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd); - BOOL (*set_nt_acl)(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd); + BOOL (*set_nt_acl)(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd); /* POSIX ACL operations. */ - int (*chmod_acl)(struct connection_struct *conn, char *name, mode_t mode); + int (*chmod_acl)(struct connection_struct *conn, const char *name, mode_t mode); int (*fchmod_acl)(struct files_struct *fsp, int fd, mode_t mode); int (*sys_acl_get_entry)(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 0462668ff84..78544f63e65 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -317,47 +317,61 @@ update_map("\370\253\371\246\372\247\373\256\374\376\375\257\376\361"); /* * Convert unix to dos */ -char *unix2dos_format(char *str,BOOL overwrite) + +char *unix2dos_format_static(const char *str) +{ + const char *p; + char *dp; + + if (!mapsinited) + initmaps(); + + for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++) + *dp = unix2dos[(unsigned char)*p]; + *dp = 0; + return cvtbuf; +} + +char *unix2dos_format(char *str) { - char *p; - char *dp; - - if (!mapsinited) - initmaps(); - - if (overwrite) { - for (p = str; *p; p++) - *p = unix2dos[(unsigned char)*p]; - return str; - } else { - for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++) - *dp = unix2dos[(unsigned char)*p]; - *dp = 0; - return cvtbuf; - } + char *p; + + if (!mapsinited) + initmaps(); + + for (p = str; *p; p++) + *p = unix2dos[(unsigned char)*p]; + return str; } /* * Convert dos to unix */ -char *dos2unix_format(char *str, BOOL overwrite) + +char *dos2unix_format_static(const char *str) +{ + const char *p; + char *dp; + + if (!mapsinited) + initmaps(); + + for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++) + *dp = dos2unix[(unsigned char)*p]; + *dp = 0; + return cvtbuf; +} + +char *dos2unix_format(char *str) { - char *p; - char *dp; - - if (!mapsinited) - initmaps(); - - if (overwrite) { - for (p = str; *p; p++) - *p = dos2unix[(unsigned char)*p]; - return str; - } else { - for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++) - *dp = dos2unix[(unsigned char)*p]; - *dp = 0; - return cvtbuf; - } + char *p; + + if (!mapsinited) + initmaps(); + + for (p = str; *p; p++) + *p = dos2unix[(unsigned char)*p]; + return str; } diff --git a/source/lib/kanji.c b/source/lib/kanji.c index 39e9933842a..8a7494e6d77 100644 --- a/source/lib/kanji.c +++ b/source/lib/kanji.c @@ -59,8 +59,10 @@ char *(*multibyte_strtok)(char *, const char *) = (char *(*)(char *, const char static size_t skip_non_multibyte_char(char); static BOOL not_multibyte_char_1(char); -char *(*_dos_to_unix)(char *, BOOL) = dos2unix_format; -char *(*_unix_to_dos)(char *, BOOL) = unix2dos_format; +char *(*_dos_to_unix)(char *) = dos2unix_format; +char *(*_dos_to_unix_static)(const char *) = dos2unix_format_static; +char *(*_unix_to_dos)(char *) = unix2dos_format; +char *(*_unix_to_dos_static)(const char *) = unix2dos_format_static; size_t (*_skip_multibyte_char)(char) = skip_non_multibyte_char; BOOL (*is_multibyte_char_1)(char) = not_multibyte_char_1; @@ -71,12 +73,15 @@ BOOL (*is_multibyte_char_1)(char) = not_multibyte_char_1; * sj_to_sj in this file. */ -static char *sj_to_sj(char *from, BOOL overwrite); +static char *sj_to_sj(char *from); +static char *sj_to_sj_static(const char *from); static size_t skip_kanji_multibyte_char(char); static BOOL is_kanji_multibyte_char_1(char); -char *(*_dos_to_unix)(char *, BOOL) = sj_to_sj; -char *(*_unix_to_dos)(char *, BOOL) = sj_to_sj; +char *(*_dos_to_unix)(char *) = sj_to_sj; +char *(*_dos_to_unix_static)(const char *) = sj_to_sj_static; +char *(*_unix_to_dos)(char *) = sj_to_sj; +char *(*_unix_to_dos_static)(const char *) = sj_to_sj_static; size_t (*_skip_multibyte_char)(char) = skip_kanji_multibyte_char; int (*is_multibyte_char_1)(char) = is_kanji_multibyte_char_1; @@ -458,12 +463,10 @@ static int sjis2euc (int hi, int lo) return converted buffer ********************************************************************/ -static char *sj_to_euc(char *from, BOOL overwrite) +static char *sj_to_euc_static(const char *from) { char *out; - char *save; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) { if (is_shift_jis (*from)) { int code = sjis2euc ((int) from[0] & 0xff, (int) from[1] & 0xff); @@ -478,12 +481,13 @@ static char *sj_to_euc(char *from, BOOL overwrite) } } *out = 0; - if (overwrite) { - pstrcpy((char *) save, (char *) cvtbuf); - return (char *) save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_euc(char *from) +{ + pstrcpy(from, sj_to_euc_static(from)); + return from; } /******************************************************************* @@ -491,12 +495,10 @@ static char *sj_to_euc(char *from, BOOL overwrite) return converted buffer ********************************************************************/ -static char *euc_to_sj(char *from, BOOL overwrite) +static char *euc_to_sj_static(const char *from) { char *out; - char *save; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3); ) { if (is_euc (*from)) { int code = euc2sjis ((int) from[0] & 0xff, (int) from[1] & 0xff); @@ -511,13 +513,13 @@ static char *euc_to_sj(char *from, BOOL overwrite) } } *out = 0; + return cvtbuf; +} - if (overwrite) { - pstrcpy(save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } +static char *euc_to_sj(char *from) +{ + pstrcpy(from, euc_to_sj_static(from)); + return from; } /******************************************************************* @@ -700,13 +702,11 @@ static int euc3sjis (int hi, int lo, BOOL is_3byte) return converted buffer ********************************************************************/ -static char *sj_to_euc3(char *from, BOOL overwrite) +static char *sj_to_euc3_static(const char *from) { char *out; - char *save; int len; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4);) { if (is_shift_jis (*from)) { int code = sjis3euc ((int) from[0] & 0xff, (int) from[1] & 0xff, &len); @@ -724,24 +724,24 @@ static char *sj_to_euc3(char *from, BOOL overwrite) } } *out = 0; - if (overwrite) { - pstrcpy((char *) save, (char *) cvtbuf); - return (char *) save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_euc3(char *from) +{ + pstrcpy(from, sj_to_euc3_static(from)); + return from; } /******************************************************************* Convert FROM contain EUC codes (with Sup-Kanji) to SHIFT JIS codes return converted buffer ********************************************************************/ -static char *euc3_to_sj(char *from, BOOL overwrite) + +static char *euc3_to_sj_static(const char *from) { char *out; - char *save; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3); ) { if (is_euc_sup (*from)) { int code = euc3sjis((int) from[1] & 0xff, (int) from[2] & 0xff, True); @@ -761,13 +761,13 @@ static char *euc3_to_sj(char *from, BOOL overwrite) } } *out = 0; + return cvtbuf; +} - if (overwrite) { - pstrcpy(save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } +static char *euc3_to_sj(char *from) +{ + pstrcpy(from, euc3_to_sj_static(from)); + return from; } /******************************************************************* @@ -846,14 +846,12 @@ static int jis2sjis(int hi, int lo) return converted buffer ********************************************************************/ -static char *jis8_to_sj(char *from, BOOL overwrite) +static char *jis8_to_sj_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) { if (is_esc (*from)) { if (is_so1 (from[1]) && is_so2 (from[2])) { @@ -887,12 +885,13 @@ normal: } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *jis8_to_sj(char *from) +{ + pstrcpy(from, jis8_to_sj_static(from)); + return from; } /******************************************************************* @@ -900,14 +899,12 @@ normal: return converted buffer ********************************************************************/ -static char *sj_to_jis8(char *from, BOOL overwrite) +static char *sj_to_jis8_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) { if (is_shift_jis (*from)) { int code; @@ -945,26 +942,26 @@ static char *sj_to_jis8(char *from, BOOL overwrite) break; } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_jis8(char *from) +{ + pstrcpy(from, sj_to_jis8_static(from)); + return from; } /******************************************************************* Convert FROM contain 7 bits JIS codes to SHIFT JIS codes return converted buffer ********************************************************************/ -static char *jis7_to_sj(char *from, BOOL overwrite) + +static char *jis7_to_sj_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) { if (is_esc (*from)) { if (is_so1 (from[1]) && is_so2 (from[2])) { @@ -1004,26 +1001,26 @@ static char *jis7_to_sj(char *from, BOOL overwrite) } } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; } +static char *jis7_to_sj(char *from) +{ + pstrcpy(from, jis7_to_sj_static(from)); + return from; +} + /******************************************************************* Convert FROM contain SHIFT JIS codes to 7 bits JIS codes return converted buffer ********************************************************************/ -static char *sj_to_jis7(char *from, BOOL overwrite) + +static char *sj_to_jis7_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) { if (is_shift_jis (*from)) { int code; @@ -1080,12 +1077,13 @@ static char *sj_to_jis7(char *from, BOOL overwrite) break; } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_jis7(char *from) +{ + pstrcpy(from, sj_to_jis7_static(from)); + return from; } /******************************************************************* @@ -1093,14 +1091,12 @@ static char *sj_to_jis7(char *from, BOOL overwrite) return converted buffer ********************************************************************/ -static char *junet_to_sj(char *from, BOOL overwrite) +static char *junet_to_sj_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) { if (is_esc (*from)) { if (is_so1 (from[1]) && is_so2 (from[2])) { @@ -1137,26 +1133,26 @@ static char *junet_to_sj(char *from, BOOL overwrite) } } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *junet_to_sj(char *from) +{ + pstrcpy(from, junet_to_sj_static(from)); + return from; } /******************************************************************* Convert FROM contain SHIFT JIS codes to 7 bits JIS(junet) codes return converted buffer ********************************************************************/ -static char *sj_to_junet(char *from, BOOL overwrite) + +static char *sj_to_junet_static(const char *from) { char *out; int shifted; - char *save; shifted = _KJ_ROMAN; - save = (char *) from; for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) { if (is_shift_jis (*from)) { int code; @@ -1206,23 +1202,26 @@ static char *sj_to_junet(char *from, BOOL overwrite) break; } *out = 0; - if (overwrite) { - pstrcpy (save, (char *) cvtbuf); - return save; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_junet(char *from) +{ + pstrcpy(from, sj_to_junet_static(from)); + return from; } /******************************************************************* HEX <-> SJIS ********************************************************************/ /* ":xx" -> a byte */ -static char *hex_to_sj(char *from, BOOL overwrite) + +static char *hex_to_sj_static(const char *from) { - char *sp, *dp; + const char *sp; + char *dp; - sp = (char *) from; + sp = from; dp = cvtbuf; while (*sp && (dp - cvtbuf < sizeof(cvtbuf)-3)) { if (*sp == hex_tag && isxdigit((int)sp[1]) && isxdigit((int)sp[2])) { @@ -1232,22 +1231,25 @@ static char *hex_to_sj(char *from, BOOL overwrite) *dp++ = *sp++; } *dp = '\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; } +static char *hex_to_sj(char *from) +{ + pstrcpy(from, hex_to_sj_static(from)); + return from; +} + /******************************************************************* kanji/kana -> ":xx" ********************************************************************/ -static char *sj_to_hex(char *from, BOOL overwrite) + +static char *sj_to_hex_static(const char *from) { - unsigned char *sp, *dp; + const unsigned char *sp; + unsigned char *dp; - sp = (unsigned char*) from; + sp = from; dp = (unsigned char*) cvtbuf; while (*sp && (((char *)dp)- cvtbuf < sizeof(cvtbuf)-7)) { if (is_kana(*sp)) { @@ -1268,23 +1270,25 @@ static char *sj_to_hex(char *from, BOOL overwrite) *dp++ = *sp++; } *dp = '\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_hex(char *from) +{ + pstrcpy(from, sj_to_hex_static(from)); + return from; } /******************************************************************* CAP <-> SJIS ********************************************************************/ /* ":xx" CAP -> a byte */ -static char *cap_to_sj(char *from, BOOL overwrite) +static char *cap_to_sj_static(const char *from) { - char *sp, *dp; + const char *sp; + char *dp; - sp = (char *) from; + sp = (const char *) from; dp = cvtbuf; while (*sp && (dp- cvtbuf < sizeof(cvtbuf)-2)) { /* @@ -1300,22 +1304,24 @@ static char *cap_to_sj(char *from, BOOL overwrite) *dp++ = *sp++; } *dp = '\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *cap_to_sj(char *from) +{ + pstrcpy(from, cap_to_sj_static(from)); + return from; } /******************************************************************* kanji/kana -> ":xx" - CAP format. ********************************************************************/ -static char *sj_to_cap(char *from, BOOL overwrite) +static char *sj_to_cap_static(const char *from) { - unsigned char *sp, *dp; + const unsigned char *sp; + unsigned char *dp; - sp = (unsigned char*) from; + sp = from; dp = (unsigned char*) cvtbuf; while (*sp && (((char *)dp) - cvtbuf < sizeof(cvtbuf)-4)) { if (*sp >= 0x80) { @@ -1328,39 +1334,42 @@ static char *sj_to_cap(char *from, BOOL overwrite) } } *dp = '\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *sj_to_cap(char *from) +{ + pstrcpy(from, sj_to_cap_static(from)); + return from; } /******************************************************************* sj to sj ********************************************************************/ -static char *sj_to_sj(char *from, BOOL overwrite) + +static char *sj_to_sj_static(const char *from) { - if (!overwrite) { - pstrcpy (cvtbuf, (char *) from); + pstrcpy (cvtbuf, from); return cvtbuf; - } else { - return (char *) from; - } +} + +static char *sj_to_sj(char *from) +{ + return from; } /******************************************************************* cp to utf8 ********************************************************************/ -static char *cp_to_utf8(char *from, BOOL overwrite) +static char *cp_to_utf8_static(const char *from) { unsigned char *dst; - unsigned char *src; + const unsigned char *src; smb_ucs2_t val; int w; size_t len; - src = (unsigned char *)from; + src = (const unsigned char *)from; dst = (unsigned char *)cvtbuf; while (*src && (((char *)dst - cvtbuf) < sizeof(cvtbuf)-4)) { len = _skip_multibyte_char(*src); @@ -1385,25 +1394,26 @@ static char *cp_to_utf8(char *from, BOOL overwrite) } *dst++='\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *cp_to_utf8(char *from) +{ + pstrcpy(from, cp_to_utf8_static(from)); + return from; } /******************************************************************* utf8 to cp ********************************************************************/ -static char *utf8_to_cp(char *from, BOOL overwrite) +static char *utf8_to_cp_static(const char *from) { - unsigned char *src; + const unsigned char *src; unsigned char *dst; smb_ucs2_t val; int w; - src = (unsigned char *)from; + src = (const unsigned char *)from; dst = (unsigned char *)cvtbuf; while (*src && ((char *)dst - cvtbuf < sizeof(cvtbuf)-4)) { @@ -1425,12 +1435,13 @@ static char *utf8_to_cp(char *from, BOOL overwrite) } } *dst++='\0'; - if (overwrite) { - pstrcpy ((char *) from, (char *) cvtbuf); - return (char *) from; - } else { - return cvtbuf; - } + return cvtbuf; +} + +static char *utf8_to_cp(char *from) +{ + pstrcpy(from, utf8_to_cp_static(from)); + return from; } /************************************************************************ @@ -1443,50 +1454,72 @@ static void setup_string_function(int codes) switch (codes) { default: _dos_to_unix = dos2unix_format; + _dos_to_unix_static = dos2unix_format_static; _unix_to_dos = unix2dos_format; + _unix_to_dos_static = unix2dos_format_static; break; case SJIS_CODE: _dos_to_unix = sj_to_sj; + _dos_to_unix_static = sj_to_sj_static; _unix_to_dos = sj_to_sj; + _unix_to_dos_static = sj_to_sj_static; break; case EUC_CODE: _dos_to_unix = sj_to_euc; + _dos_to_unix_static = sj_to_euc_static; _unix_to_dos = euc_to_sj; + _unix_to_dos_static = euc_to_sj_static; break; case JIS7_CODE: _dos_to_unix = sj_to_jis7; + _dos_to_unix_static = sj_to_jis7_static; _unix_to_dos = jis7_to_sj; + _unix_to_dos_static = jis7_to_sj_static; break; case JIS8_CODE: _dos_to_unix = sj_to_jis8; + _dos_to_unix_static = sj_to_jis8_static; _unix_to_dos = jis8_to_sj; + _unix_to_dos_static = jis8_to_sj_static; break; case JUNET_CODE: _dos_to_unix = sj_to_junet; + _dos_to_unix_static = sj_to_junet_static; _unix_to_dos = junet_to_sj; + _unix_to_dos_static = junet_to_sj_static; break; case HEX_CODE: _dos_to_unix = sj_to_hex; + _dos_to_unix_static = sj_to_hex_static; _unix_to_dos = hex_to_sj; + _unix_to_dos_static = hex_to_sj_static; break; case CAP_CODE: _dos_to_unix = sj_to_cap; + _dos_to_unix_static = sj_to_cap_static; _unix_to_dos = cap_to_sj; + _unix_to_dos_static = cap_to_sj_static; break; + case UTF8_CODE: _dos_to_unix = cp_to_utf8; + _dos_to_unix_static = cp_to_utf8_static; _unix_to_dos = utf8_to_cp; + _unix_to_dos_static = utf8_to_cp_static; break; + case EUC3_CODE: _dos_to_unix = sj_to_euc3; + _dos_to_unix_static = sj_to_euc3_static; _unix_to_dos = euc3_to_sj; + _unix_to_dos_static = euc3_to_sj_static; break; } } @@ -1680,12 +1713,10 @@ void initialize_multibyte_vectors( int client_codepage) (to catalog file encoding) is not needed because they are using same character codes. **************************************************** */ -static char *no_conversion(char *str, BOOL bOverwrite) +static char *no_conversion_static(const char *str) { static pstring temp; - if(bOverwrite) - return str; pstrcpy(temp, str); return temp; } -char *(*_dos_to_dos)(char *, BOOL) = no_conversion; +char *(*_dos_to_dos_static)(const char *) = no_conversion_static; diff --git a/source/lib/sysacls.c b/source/lib/sysacls.c index 743c098bebd..9ce04e596b9 100644 --- a/source/lib/sysacls.c +++ b/source/lib/sysacls.c @@ -1204,7 +1204,7 @@ SMB_ACL_T sys_acl_get_fd(int fd) * can use the relative path. */ - return sys_acl_get_file(dos_to_unix(fsp->fsp_name,False), SMB_ACL_TYPE_ACCESS); + return sys_acl_get_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS); } int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d) @@ -1892,7 +1892,7 @@ int sys_acl_set_fd(int fd, SMB_ACL_T acl_d) * can use the relative path. */ - return sys_acl_set_file(dos_to_unix(fsp->fsp_name,False), SMB_ACL_TYPE_ACCESS, acl_d); + return sys_acl_set_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS, acl_d); } int sys_acl_delete_def_file(const char *path) diff --git a/source/lib/username.c b/source/lib/username.c index 7ad2341d627..1dddcec0e50 100644 --- a/source/lib/username.c +++ b/source/lib/username.c @@ -239,9 +239,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change) /* try in all lower case first as this is the most common case on UNIX systems */ - unix_to_dos(user, True); + unix_to_dos(user); strlower(user); - dos_to_unix(user, True); + dos_to_unix(user); ret = _Get_Pwnam(user); if (ret) @@ -260,9 +260,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change) } /* finally, try in all caps if that is a new case */ - unix_to_dos(user, True); + unix_to_dos(user); strupper(user); - dos_to_unix(user, True); + dos_to_unix(user); if (strcmp(user, orig_username) != 0) { ret = _Get_Pwnam(user); @@ -271,9 +271,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change) } /* Try all combinations up to usernamelevel. */ - unix_to_dos(user, True); + unix_to_dos(user); strlower(user); - dos_to_unix(user, True); + dos_to_unix(user); ret = uname_string_combinations(user, _Get_Pwnam, usernamelevel); diff --git a/source/lib/util_file.c b/source/lib/util_file.c index 526e8b01568..4632e0a84dc 100644 --- a/source/lib/util_file.c +++ b/source/lib/util_file.c @@ -466,7 +466,7 @@ static char **file_lines_parse(char *p, size_t size, int *numlines, BOOL convert if (convert) { for (i = 0; ret[i]; i++) - unix_to_dos(ret[i], True); + unix_to_dos(ret[i]); } return ret; diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c index 2c24e5c8645..2f1423aa1a1 100644 --- a/source/libsmb/clirap.c +++ b/source/libsmb/clirap.c @@ -179,8 +179,8 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co char *cmnt = comment_offset?(rdata+comment_offset-converter):""; pstring s1, s2; - pstrcpy(s1, dos_to_unix(sname, False)); - pstrcpy(s2, dos_to_unix(cmnt, False)); + pstrcpy(s1, dos_to_unix_static(sname)); + pstrcpy(s2, dos_to_unix_static(cmnt)); fn(s1, type, s2, state); } @@ -261,8 +261,8 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY; - pstrcpy(s1, dos_to_unix(sname, False)); - pstrcpy(s2, dos_to_unix(cmnt, False)); + pstrcpy(s1, dos_to_unix_static(sname)); + pstrcpy(s2, dos_to_unix_static(cmnt)); fn(s1, stype, s2, state); } } diff --git a/source/libsmb/clistr.c b/source/libsmb/clistr.c index aa3575571d2..72178967ed5 100644 --- a/source/libsmb/clistr.c +++ b/source/libsmb/clistr.c @@ -65,7 +65,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len if (flags & STR_TERMINATE) len++; if (flags & STR_CONVERT) - unix_to_dos(dest,True); + unix_to_dos(dest); if (flags & STR_UPPER) strupper(dest); return len; @@ -73,7 +73,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len /* the server likes unicode. give it the works */ if (flags & STR_CONVERT) - dos_PutUniCode(dest, unix_to_dos((char *)src,False), dest_len, flags & STR_TERMINATE); + dos_PutUniCode(dest, unix_to_dos_static(src), dest_len, flags & STR_TERMINATE); else unix_PutUniCode(dest, src, dest_len, flags & STR_TERMINATE); @@ -123,7 +123,7 @@ int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len memcpy(dest, src, len); dest[len] = 0; } - safe_strcpy(dest,dos_to_unix(dest,False),dest_len); + safe_strcpy(dest,dos_to_unix_static(dest),dest_len); return len; } diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index a192f2968a7..e251a52de2e 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -188,7 +188,7 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t StrnCpy(name, status[i].name, 15); - dos_to_unix(name, True); + dos_to_unix(name); SAFE_FREE(status); return True; diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index 08748ed0aa0..28347576842 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -811,7 +811,7 @@ void make_nmb_name( struct nmb_name *n, const char *name, int type) extern pstring global_scope; memset( (char *)n, '\0', sizeof(struct nmb_name) ); StrnCpy( n->name, name, 15 ); - unix_to_dos(n->name, True); + unix_to_dos(n->name); strupper( n->name ); n->name_type = (unsigned int)type & 0xFF; StrnCpy( n->scope, global_scope, 63 ); diff --git a/source/libsmb/pwd_cache.c b/source/libsmb/pwd_cache.c index 45fb00e6e16..dde5a02ead2 100644 --- a/source/libsmb/pwd_cache.c +++ b/source/libsmb/pwd_cache.c @@ -132,7 +132,7 @@ void pwd_set_cleartext(struct pwd_info *pwd, char *clr) { pwd_init(pwd); fstrcpy(pwd->password, clr); - unix_to_dos(pwd->password,True); + unix_to_dos(pwd->password); pwd->cleartext = True; pwd->null_pwd = False; pwd->crypted = False; @@ -146,7 +146,7 @@ void pwd_get_cleartext(struct pwd_info *pwd, char *clr) { if (pwd->cleartext) { fstrcpy(clr, pwd->password); - dos_to_unix(clr, True); + dos_to_unix(clr); } else { clr[0] = 0; } @@ -198,7 +198,7 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr) pwd_init(pwd); pstrcpy(dos_passwd, clr); - unix_to_dos(dos_passwd, True); + unix_to_dos(dos_passwd); nt_lm_owf_gen(dos_passwd, pwd->smb_nt_pwd, pwd->smb_lm_pwd); pwd->null_pwd = False; diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index d9e7343b20b..7cebecc0514 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -166,7 +166,7 @@ BOOL is_msdfs_link(connection_struct* conn, char* path, strlower(path); - if (conn->vfs_ops.lstat(conn,dos_to_unix(path,False),&st) != 0) { + if (conn->vfs_ops.lstat(conn,dos_to_unix_static(path),&st) != 0) { DEBUG(5,("is_msdfs_link: %s does not exist.\n",path)); return False; } @@ -808,7 +808,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count) cnt++; } - dirp = conn->vfs_ops.opendir(conn, dos_to_unix(connect_path,False)); + dirp = conn->vfs_ops.opendir(conn, dos_to_unix_static(connect_path)); if(!dirp) return False; diff --git a/source/nmbd/nmbd_synclists.c b/source/nmbd/nmbd_synclists.c index 1132d9a5147..c8dac82aa15 100644 --- a/source/nmbd/nmbd_synclists.c +++ b/source/nmbd/nmbd_synclists.c @@ -101,7 +101,7 @@ static void sync_child(char *name, int nm_type, /* All the cli_XX functions take UNIX character set. */ fstrcpy(unix_workgroup, cli.server_domain?cli.server_domain:workgroup); - dos_to_unix(unix_workgroup, True); + dos_to_unix(unix_workgroup); /* Fetch a workgroup list. */ cli_NetServerEnum(&cli, unix_workgroup, @@ -111,7 +111,7 @@ static void sync_child(char *name, int nm_type, /* Now fetch a server list. */ if (servers) { fstrcpy(unix_workgroup, workgroup); - dos_to_unix(unix_workgroup, True); + dos_to_unix(unix_workgroup); cli_NetServerEnum(&cli, unix_workgroup, local?SV_TYPE_LOCAL_LIST_ONLY:SV_TYPE_ALL, callback, NULL); @@ -260,7 +260,7 @@ static void complete_sync(struct sync_record *s) ptr = line; /* The line is written in UNIX character set. Convert to DOS codepage. */ - unix_to_dos(line,True); + unix_to_dos(line); if (!next_token(&ptr,server,NULL,sizeof(server)) || !next_token(&ptr,type_str,NULL, sizeof(type_str)) || diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 9b55587fe22..0bc8c133e34 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1680,6 +1680,7 @@ FN_LOCAL_STRING(lp_writelist, writelist) FN_LOCAL_STRING(lp_printer_admin, printer_admin) FN_LOCAL_STRING(lp_fstype, fstype) FN_LOCAL_STRING(lp_vfsobj, szVfsObjectFile) +FN_LOCAL_STRING(lp_vfoptions, szVfsOptions) static FN_LOCAL_STRING(lp_volume, volume) FN_LOCAL_STRING(lp_mangled_map, szMangledMap) FN_LOCAL_STRING(lp_veto_files, szVetoFiles) @@ -2271,7 +2272,7 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr) * Convert from UNIX to DOS string - the UNIX to DOS converter * isn't called on the special handlers. */ - unix_to_dos(netbios_name, True); + unix_to_dos(netbios_name); pstrcpy(global_myname, netbios_name); DEBUG(4, @@ -2756,26 +2757,26 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue) case P_STRING: string_set(parm_ptr, pszParmValue); if (parm_table[parmnum].flags & FLAG_DOS_STRING) - unix_to_dos(*(char **)parm_ptr, True); + unix_to_dos(*(char **)parm_ptr); break; case P_USTRING: string_set(parm_ptr, pszParmValue); if (parm_table[parmnum].flags & FLAG_DOS_STRING) - unix_to_dos(*(char **)parm_ptr, True); + unix_to_dos(*(char **)parm_ptr); strupper(*(char **)parm_ptr); break; case P_GSTRING: pstrcpy((char *)parm_ptr, pszParmValue); if (parm_table[parmnum].flags & FLAG_DOS_STRING) - unix_to_dos((char *)parm_ptr, True); + unix_to_dos((char *)parm_ptr); break; case P_UGSTRING: pstrcpy((char *)parm_ptr, pszParmValue); if (parm_table[parmnum].flags & FLAG_DOS_STRING) - unix_to_dos((char *)parm_ptr, True); + unix_to_dos((char *)parm_ptr); strupper((char *)parm_ptr); break; @@ -2819,7 +2820,7 @@ static BOOL do_parameter(char *pszParmName, char *pszParmValue) /*************************************************************************** print a parameter of the specified type ***************************************************************************/ -static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(*dos_to_ext)(char *, BOOL)) +static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(*dos_to_ext)(const char *)) { int i; switch (p->type) @@ -2866,7 +2867,7 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *( case P_UGSTRING: if ((char *)ptr) { if (p->flags & FLAG_DOS_STRING) - fprintf(f, "%s", dos_to_ext((char *)ptr, False)); + fprintf(f, "%s", dos_to_ext((const char *)ptr)); else fprintf(f, "%s", (char *)ptr); } @@ -2876,7 +2877,7 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *( case P_USTRING: if (*(char **)ptr) { if(p->flags & FLAG_DOS_STRING) - fprintf(f,"%s",dos_to_ext(*(char **)ptr, False)); + fprintf(f,"%s",dos_to_ext((const char *)*(const char **)ptr)); else fprintf(f, "%s", *(char **)ptr); } @@ -3034,7 +3035,7 @@ static BOOL is_default(int i) /*************************************************************************** Display the contents of the global structure. ***************************************************************************/ -static void dump_globals(FILE *f, char *(*dos_to_ext)(char *, BOOL)) +static void dump_globals(FILE *f, char *(*dos_to_ext)(const char *)) { int i; fprintf(f, "# Global parameters\n[global]\n"); @@ -3068,7 +3069,7 @@ BOOL lp_is_default(int snum, struct parm_struct *parm) /*************************************************************************** Display the contents of a single services record. ***************************************************************************/ -static void dump_a_service(service * pService, FILE * f, char *(*dos_to_ext)(char *, BOOL)) +static void dump_a_service(service * pService, FILE * f, char *(*dos_to_ext)(const char *)) { int i; if (pService != &sDefault) @@ -3244,7 +3245,7 @@ void lp_add_one_printer(char *name, char *comment) lp_add_printer(name, printers); if ((i = lp_servicenumber(name)) >= 0) { string_set(&ServicePtrs[i]->comment, comment); - unix_to_dos(ServicePtrs[i]->comment, True); + unix_to_dos(ServicePtrs[i]->comment); ServicePtrs[i]->autoloaded = True; } } @@ -3469,7 +3470,7 @@ int lp_numservices(void) /*************************************************************************** Display the contents of the services array in human-readable form. ***************************************************************************/ -void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(char *, BOOL)) +void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(const char *)) { int iService; @@ -3489,7 +3490,7 @@ void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(ch /*************************************************************************** Display the contents of one service in human-readable form. ***************************************************************************/ -void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(char *, BOOL)) +void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(const char *)) { if (VALID(snum)) { diff --git a/source/param/params.c b/source/param/params.c index a7d50601768..a1f9e6bc23c 100644 --- a/source/param/params.c +++ b/source/param/params.c @@ -272,7 +272,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) ) DEBUG(0, ("%s Empty section name in configuration file.\n", func )); return( False ); } - if( !sfunc( unix_to_dos(bufr,True) ) ) /* Got a valid name. Deal with it. */ + if( !sfunc( unix_to_dos(bufr) ) ) /* Got a valid name. Deal with it. */ return( False ); (void)EatComment( InFile ); /* Finish off the line. */ return( True ); diff --git a/source/passdb/pdb_nisplus.c b/source/passdb/pdb_nisplus.c index 1c38d4d290e..f9b15918b7d 100644 --- a/source/passdb/pdb_nisplus.c +++ b/source/passdb/pdb_nisplus.c @@ -299,14 +299,14 @@ static BOOL make_sam_from_nisp_object(SAM_ACCOUNT *pw_buf, nis_object *obj) /* pdb_set_nt_username() -- cant set it here... */ get_single_attribute(obj, NPF_FULL_NAME, full_name, sizeof(pstring)); - unix_to_dos(full_name, True); + unix_to_dos(full_name); pdb_set_fullname(pw_buf, full_name); pdb_set_acct_ctrl(pw_buf, pdb_decode_acct_ctrl(ENTRY_VAL(obj, NPF_ACB))); get_single_attribute(obj, NPF_ACCT_DESC, acct_desc, sizeof(pstring)); - unix_to_dos(acct_desc, True); + unix_to_dos(acct_desc); pdb_set_acct_desc(pw_buf, acct_desc); pdb_set_workstations(pw_buf, ENTRY_VAL(obj, NPF_WORKSTATIONS)); @@ -532,9 +532,9 @@ static BOOL init_nisp_from_sam(nis_object *obj, SAM_ACCOUNT *sampass, slprintf(pwdmchg_t, 13, "MCT-%08X", (uint32)pdb_get_pass_must_change_time(sampass)); safe_strcpy(full_name, pdb_get_fullname(sampass), sizeof(full_name)-1); - dos_to_unix(full_name, True); + dos_to_unix(full_name); safe_strcpy(acct_desc, pdb_get_acct_desc(sampass), sizeof(acct_desc)-1); - dos_to_unix(acct_desc, True); + dos_to_unix(acct_desc); if( old ) { /* name */ diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c index c99d7ceb745..2700c2a0eb2 100644 --- a/source/passdb/secrets.c +++ b/source/passdb/secrets.c @@ -106,7 +106,7 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid) slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain); strupper(key); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ dyn_sid = (DOM_SID *)secrets_fetch(key, &size); if (dyn_sid == NULL) @@ -133,7 +133,7 @@ char *trust_keystr(char *domain) fstring dos_domain; fstrcpy(dos_domain, domain); - unix_to_dos(dos_domain, True); + unix_to_dos(dos_domain); slprintf(keystr,sizeof(keystr)-1,"%s/%s", SECRETS_MACHINE_ACCT_PASS, dos_domain); diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 66378e4980a..3d3f7038efb 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -459,7 +459,7 @@ int write_ntforms(nt_forms_struct **list, int number) (*list)[i].bottom); if (len > sizeof(buf)) break; slprintf(key, sizeof(key)-1, "%s%s", FORMS_PREFIX, (*list)[i].name); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dsize = strlen(key)+1; kbuf.dptr = key; dbuf.dsize = len; @@ -546,7 +546,7 @@ BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR } slprintf(key, sizeof(key)-1, "%s%s", FORMS_PREFIX, (*list)[n].name); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dsize = strlen(key)+1; kbuf.dptr = key; if (tdb_delete(tdb_forms, kbuf) != 0) { @@ -1613,7 +1613,7 @@ static uint32 add_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver) } slprintf(key, sizeof(key)-1, "%s%s/%d/%s", DRIVERS_PREFIX, architecture, driver->cversion, driver->name); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ DEBUG(5,("add_a_printer_driver_3: Adding driver with key %s\n", key )); @@ -1994,7 +1994,7 @@ uint32 del_a_printer(char *sharename) TDB_DATA kbuf; slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, sharename); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dptr=key; kbuf.dsize=strlen(key)+1; @@ -2090,7 +2090,7 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info) slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, info->sharename); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dptr = key; kbuf.dsize = strlen(key)+1; @@ -2603,7 +2603,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen ZERO_STRUCT(info); slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, sharename); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dptr = key; kbuf.dsize = strlen(key)+1; @@ -2874,7 +2874,7 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) ZERO_STRUCT(info); slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, info_ptr->drivername); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dptr = key; kbuf.dsize = strlen(key)+1; @@ -3018,7 +3018,7 @@ static uint32 update_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info) } slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, info->drivername); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ kbuf.dptr = key; kbuf.dsize = strlen(key)+1; @@ -3700,7 +3700,7 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx) Aargh! */ fstrcpy(dos_domain, lp_workgroup()); - unix_to_dos(dos_domain, True); + unix_to_dos(dos_domain); if (secrets_fetch_domain_sid(dos_domain, &owner_sid)) { sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN); diff --git a/source/printing/pcap.c b/source/printing/pcap.c index a2ca0b7dcb4..37de0a9ad84 100644 --- a/source/printing/pcap.c +++ b/source/printing/pcap.c @@ -294,7 +294,7 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) if (*line == '#' || *line == 0) continue; - unix_to_dos(line,True); + unix_to_dos(line); /* now we have a real printer line - cut it off at the first : */ p = strchr(line,':'); @@ -381,7 +381,7 @@ void pcap_printer_fn(void (*fn)(char *, char *)) p = strchr(line,':'); if (p) *p = 0; - unix_to_dos(line,True); + unix_to_dos(line); /* now find the most likely printer name and comment this is pure guesswork, but it's better than nothing */ diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c index 91c3116a53d..77615dfe90f 100644 --- a/source/printing/print_cups.c +++ b/source/printing/print_cups.c @@ -195,9 +195,9 @@ cups_printer_fn(void (*fn)(char *, char *)) /* I - Function to call */ break; if (info == NULL || !info[0]) - (*fn)(unix_to_dos(name,False), make_model); + (*fn)(unix_to_dos_static(name), make_model); else - (*fn)(unix_to_dos(name,False), info); + (*fn)(unix_to_dos_static(name), info); } ippDelete(response); @@ -266,7 +266,7 @@ cups_printername_ok(char *name) /* I - Name of printer */ "requested-attributes", NULL, "printer-uri"); slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s", - dos_to_unix(name, False)); + dos_to_unix_static(name)); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); diff --git a/source/printing/print_generic.c b/source/printing/print_generic.c index 741a4db2391..385d00eacd0 100644 --- a/source/printing/print_generic.c +++ b/source/printing/print_generic.c @@ -82,7 +82,7 @@ static int print_run_command(int snum,char *command, int *outfd, ...) standard_sub_snum(snum,syscmd); /* Convert script args to unix-codepage */ - dos_to_unix(syscmd, True); + dos_to_unix(syscmd); ret = smbrun(syscmd,outfd); DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret)); @@ -195,7 +195,7 @@ static int generic_queue_get(int snum, print_queue_struct **q, print_status_stru /* Convert printer name (i.e. share name) to unix-codepage */ fstrcpy(printer_name, lp_servicename(snum)); - dos_to_unix(printer_name, True); + dos_to_unix(printer_name); print_run_command(snum, lp_lpqcommand(snum), &fd, NULL); diff --git a/source/printing/print_svid.c b/source/printing/print_svid.c index c4c8945ea86..36446a3da7c 100644 --- a/source/printing/print_svid.c +++ b/source/printing/print_svid.c @@ -118,7 +118,7 @@ void sysv_printer_fn(void (*fn)(char *, char *)) if (printers == NULL) populate_printers(); for (tmp = printers; tmp != NULL; tmp = tmp->next) - (fn)(unix_to_dos(tmp->name,False), ""); + (fn)(unix_to_dos_static(tmp->name), ""); } diff --git a/source/printing/printing.c b/source/printing/printing.c index 82bd2f722c4..c1681d0a120 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -259,7 +259,7 @@ static void print_cache_flush(int snum) { fstring key; slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum)); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ tdb_store_int32(tdb, key, -1); } @@ -349,7 +349,7 @@ static void print_queue_update(int snum) /* Convert printer name (i.e. share name) to unix-codepage for all of the * following tdb key generation */ fstrcpy(printer_name, lp_servicename(snum)); - dos_to_unix(printer_name, True); + dos_to_unix(printer_name); /* * Check to see if someone else is doing this update. @@ -622,10 +622,10 @@ static BOOL is_owner(struct current_user *user, int jobid) if ((vuser = get_valid_user_struct(user->vuid)) != NULL) { return strequal(pjob->user, - unix_to_dos(vuser->user.smb_name,False)); + unix_to_dos_static(vuser->user.smb_name)); } else { return strequal(pjob->user, - unix_to_dos(uidtoname(user->uid),False)); + unix_to_dos_static(uidtoname(user->uid))); } } @@ -778,7 +778,7 @@ static BOOL print_cache_expired(int snum) time_t last_qscan_time, time_now = time(NULL); slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum)); - dos_to_unix(key, True); /* Convert key to unix-codepage */ + dos_to_unix(key); /* Convert key to unix-codepage */ last_qscan_time = (time_t)tdb_fetch_int32(tdb, key); /* @@ -812,7 +812,7 @@ static int get_queue_status(int snum, print_status_struct *status) ZERO_STRUCTP(status); slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum)); - dos_to_unix(keystr, True); /* Convert key to unix-codepage */ + dos_to_unix(keystr); /* Convert key to unix-codepage */ key.dptr = keystr; key.dsize = strlen(keystr); data = tdb_fetch(tdb, key); @@ -939,9 +939,9 @@ int print_job_start(struct current_user *user, int snum, char *jobname) fstrcpy(pjob.jobname, jobname); if ((vuser = get_valid_user_struct(user->vuid)) != NULL) { - fstrcpy(pjob.user, unix_to_dos(vuser->user.smb_name,False)); + fstrcpy(pjob.user, unix_to_dos_static(vuser->user.smb_name)); } else { - fstrcpy(pjob.user, unix_to_dos(uidtoname(user->uid),False)); + fstrcpy(pjob.user, unix_to_dos_static(uidtoname(user->uid))); } pjob.snum = snum; @@ -1180,7 +1180,7 @@ int print_queue_status(int snum, */ ZERO_STRUCTP(status); slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum)); - dos_to_unix(keystr, True); /* Convert key to unix-codepage */ + dos_to_unix(keystr); /* Convert key to unix-codepage */ key.dptr = keystr; key.dsize = strlen(keystr); data = tdb_fetch(tdb, key); diff --git a/source/rpc_client/cli_login.c b/source/rpc_client/cli_login.c index 2e90702e66d..0492e73b7a3 100644 --- a/source/rpc_client/cli_login.c +++ b/source/rpc_client/cli_login.c @@ -169,13 +169,13 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam ctr->switch_value = NET_LOGON_TYPE; fstrcpy(dos_wksta_name, cli->clnt_name_slash); - unix_to_dos(dos_wksta_name, True); + unix_to_dos(dos_wksta_name); fstrcpy(dos_username, username); - unix_to_dos(dos_username, True); + unix_to_dos(dos_username); fstrcpy(dos_domain, domain); - unix_to_dos(dos_domain, True); + unix_to_dos(dos_domain); /* Create the structure needed for SAM logon. */ init_id_info2(&ctr->auth.id2, dos_domain, 0, smb_userid_low, 0, diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c index 168828e5388..df77080425a 100644 --- a/source/rpc_client/cli_netlogon.c +++ b/source/rpc_client/cli_netlogon.c @@ -68,7 +68,7 @@ BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level) global_myname, status_level)); /* store the parameters */ - init_q_logon_ctrl2(&q_l, unix_to_dos(cli->srv_name_slash,False), + init_q_logon_ctrl2(&q_l, unix_to_dos_static(cli->srv_name_slash), status_level); /* turn parameters into data stream */ @@ -132,7 +132,7 @@ NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan, credstr(cli->clnt_cred.challenge.data), neg_flags)); /* store the parameters */ - init_q_auth_2(&q_a, unix_to_dos(cli->srv_name_slash,False), cli->mach_acct, + init_q_auth_2(&q_a, unix_to_dos_static(cli->srv_name_slash), cli->mach_acct, sec_chan, global_myname, &cli->clnt_cred.challenge, neg_flags); /* turn parameters into data stream */ @@ -221,7 +221,7 @@ BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_ cli->desthost, global_myname, credstr(clnt_chal->data))); /* store the parameters */ - init_q_req_chal(&q_c, unix_to_dos(cli->srv_name_slash,False), + init_q_req_chal(&q_c, unix_to_dos_static(cli->srv_name_slash), global_myname, clnt_chal); /* turn parameters into data stream */ @@ -286,7 +286,7 @@ BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]) credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); /* store the parameters */ - init_q_srv_pwset(&q_s, unix_to_dos(cli->srv_name_slash,False), + init_q_srv_pwset(&q_s, unix_to_dos_static(cli->srv_name_slash), cli->mach_acct, sec_chan_type, global_myname, &new_clnt_cred, (char *)hashed_mach_pwd); @@ -364,7 +364,7 @@ static NTSTATUS cli_net_sam_logon_internal(struct cli_state *cli, NET_ID_INFO_CT /* store the parameters */ q_s.validation_level = validation_level; - init_sam_info(&q_s.sam_id, unix_to_dos(cli->srv_name_slash,False), + init_sam_info(&q_s.sam_id, unix_to_dos_static(cli->srv_name_slash), global_myname, &new_clnt_cred, &dummy_rtn_creds, ctr->switch_value, ctr); @@ -496,7 +496,7 @@ BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr) memset(&dummy_rtn_creds, '\0', sizeof(dummy_rtn_creds)); - init_sam_info(&q_s.sam_id, unix_to_dos(cli->srv_name_slash,False), + init_sam_info(&q_s.sam_id, unix_to_dos_static(cli->srv_name_slash), global_myname, &new_clnt_cred, &dummy_rtn_creds, ctr->switch_value, ctr); diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 916850e1490..ee00624c2e2 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -263,8 +263,8 @@ static void init_lsa_trans_names(TALLOC_CTX *ctx, DOM_R_REF *ref, LSA_TRANS_NAME /* unistr routines take dos codepage strings */ - unix_to_dos(dom_name, True); - unix_to_dos(name, True); + unix_to_dos(dom_name); + unix_to_dos(name); dom_idx = init_dom_ref(ref, dom_name, &find_sid); @@ -371,10 +371,10 @@ NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INF return NT_STATUS_INVALID_HANDLE; fstrcpy(dos_myname, global_myname); - unix_to_dos(dos_myname, True); + unix_to_dos(dos_myname); fstrcpy(dos_domain, global_myworkgroup); - unix_to_dos(dos_domain, True); + unix_to_dos(dos_domain); switch (q_u->info_class) { case 0x02: diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 66d3c9677be..ce07da2930c 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -312,7 +312,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) /* Printer->dev.handlename equals portname equals sharename */ slprintf(command, sizeof(command)-1, "%s \"%s\"", cmd, Printer->dev.handlename); - dos_to_unix(command, True); /* Convert printername to unix-codepage */ + dos_to_unix(command); /* Convert printername to unix-codepage */ DEBUG(10,("Running [%s]\n", command)); ret = smbrun(command, NULL); @@ -570,7 +570,7 @@ static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) --jerry **************************************************************************/ -static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, +static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer) { @@ -580,7 +580,7 @@ static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CT if (info->flags & PRINTER_MESSAGE_DRIVER) condition = PRINTER_CHANGE_SET_PRINTER_DRIVER; - result = cli_spoolss_routerreplyprinter(cli, mem_ctx, pol, condition, + result = cli_spoolss_routerreplyprinter(pcli, mem_ctx, pol, condition, printer->info_2->changeid); return result; @@ -592,7 +592,7 @@ static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CT **********************************************************************/ static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, - struct cli_state *cli, PRINTER_MESSAGE_INFO *msg, + struct cli_state *pcli, PRINTER_MESSAGE_INFO *msg, NT_PRINTER_INFO_LEVEL *info) { NTSTATUS result; @@ -601,12 +601,12 @@ static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, /* This is a single call that can send information about multiple changes */ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) msg->flags |= PRINTER_MESSAGE_ATTRIBUTES; - result = cli_spoolss_reply_rrpcn(cli, cli->mem_ctx, &Printer->notify.client_hnd, + result = cli_spoolss_reply_rrpcn(pcli, pcli->mem_ctx, &Printer->notify.client_hnd, msg, info); } else { /* This requires that the server send an individual event notification for each change */ - result = srv_spoolss_routerreplyprinter(cli, cli->mem_ctx, &Printer->notify.client_hnd, + result = srv_spoolss_routerreplyprinter(pcli, pcli->mem_ctx, &Printer->notify.client_hnd, msg, info); } @@ -1475,7 +1475,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin fstring unix_printer; fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */ - dos_to_unix(unix_printer, True); + dos_to_unix(unix_printer); if(!spoolss_connect_to_client(&cli, unix_printer)) return False; @@ -4583,7 +4583,7 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) printer->info_2->location, driverlocation, remote_machine); /* Convert script args to unix-codepage */ - dos_to_unix(command, True); + dos_to_unix(command); DEBUG(10,("Running [%s]\n", command)); ret = smbrun(command, &fd); DEBUGADD(10,("returned [%d]\n", ret)); diff --git a/source/rpc_server/srv_wkssvc_nt.c b/source/rpc_server/srv_wkssvc_nt.c index 74753021828..ea3b48887df 100644 --- a/source/rpc_server/srv_wkssvc_nt.c +++ b/source/rpc_server/srv_wkssvc_nt.c @@ -49,7 +49,7 @@ static void create_wks_info_100(WKS_INFO_100 *inf) 0x000001f4, /* platform id info */ lp_major_announce_version(), lp_minor_announce_version(), - my_name, unix_to_dos(domain,False)); + my_name, unix_to_dos_static(domain)); } /******************************************************************* diff --git a/source/smbd/close.c b/source/smbd/close.c index ca030ed1404..b7bd7bca6d3 100644 --- a/source/smbd/close.c +++ b/source/smbd/close.c @@ -170,7 +170,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) if (normal_close && delete_on_close) { DEBUG(5,("close_file: file %s. Delete on close was set - deleting file.\n", fsp->fsp_name)); - if(fsp->conn->vfs_ops.unlink(conn,dos_to_unix(fsp->fsp_name, False)) != 0) { + if(fsp->conn->vfs_ops.unlink(conn,dos_to_unix_static(fsp->fsp_name)) != 0) { /* * This call can potentially fail as another smbd may have * had the file open with delete on close set and deleted diff --git a/source/smbd/connection.c b/source/smbd/connection.c index 3ca4021abe4..aa8b95a1705 100644 --- a/source/smbd/connection.c +++ b/source/smbd/connection.c @@ -51,7 +51,7 @@ BOOL yield_connection(connection_struct *conn,char *name) key.pid = sys_getpid(); key.cnum = conn?conn->cnum:-1; fstrcpy(key.name, name); - dos_to_unix(key.name, True); /* Convert key to unix-codepage */ + dos_to_unix(key.name); /* Convert key to unix-codepage */ kbuf.dptr = (char *)&key; kbuf.dsize = sizeof(key); @@ -159,7 +159,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO key.pid = sys_getpid(); key.cnum = conn?conn->cnum:-1; fstrcpy(key.name, name); - dos_to_unix(key.name, True); /* Convert key to unix-codepage */ + dos_to_unix(key.name); /* Convert key to unix-codepage */ kbuf.dptr = (char *)&key; kbuf.dsize = sizeof(key); diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c index 034e1a093d3..df37a08903f 100644 --- a/source/smbd/dfree.c +++ b/source/smbd/dfree.c @@ -161,5 +161,5 @@ wrap it to get filenames right SMB_BIG_UINT sys_disk_free(char *path, BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize) { - return(disk_free(dos_to_unix(path,False),small_query, bsize,dfree,dsize)); + return(disk_free(dos_to_unix_static(path),small_query, bsize,dfree,dsize)); } diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 789ff919eea..6cbb43d34db 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -622,7 +622,7 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname, pstrcpy(pathreal,path); pstrcat(path,fname); pstrcat(pathreal,dname); - if (conn->vfs_ops.stat(conn,dos_to_unix(pathreal, False), &sbuf) != 0) + if (conn->vfs_ops.stat(conn,dos_to_unix_static(pathreal), &sbuf) != 0) { DEBUG(5,("Couldn't stat 1 [%s]. Error = %s\n",path, strerror(errno) )); continue; @@ -734,7 +734,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) { Dir *dirp; char *n; - DIR *p = conn->vfs_ops.opendir(conn,dos_to_unix(name,False)); + DIR *p = conn->vfs_ops.opendir(conn,dos_to_unix_static(name)); int used=0; if (!p) return(NULL); diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c index bd6744a272c..ee54417c247 100644 --- a/source/smbd/dosmode.c +++ b/source/smbd/dosmode.c @@ -282,7 +282,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times) errno = 0; - if(conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times) == 0) + if(conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times) == 0) return 0; if((errno != EPERM) && (errno != EACCES)) @@ -310,7 +310,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times) current_user.ngroups,current_user.groups)))) { /* We are allowed to become root and change the filetime. */ become_root(); - ret = conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times); + ret = conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times); unbecome_root(); } } diff --git a/source/smbd/filename.c b/source/smbd/filename.c index 601c488fc9c..7c3e6253091 100644 --- a/source/smbd/filename.c +++ b/source/smbd/filename.c @@ -438,7 +438,7 @@ BOOL check_name(char *name,connection_struct *conn) #ifdef S_ISLNK if (!lp_symlinks(SNUM(conn))) { SMB_STRUCT_STAT statbuf; - if ( (conn->vfs_ops.lstat(conn,dos_to_unix(name,False),&statbuf) != -1) && + if ( (conn->vfs_ops.lstat(conn,dos_to_unix_static(name),&statbuf) != -1) && (S_ISLNK(statbuf.st_mode)) ) { DEBUG(3,("check_name: denied: file path name %s is a symlink\n",name)); ret=0; diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index 1724ba85b53..718810726cc 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -460,7 +460,7 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, PACKI(desc,"W",queue->job); /* uJobId */ if (uLevel == 1) { - PACKS(desc,"B21",dos_to_unix(queue->fs_user,False)); /* szUserName */ + PACKS(desc,"B21",dos_to_unix_static(queue->fs_user)); /* szUserName */ PACKS(desc,"B",""); /* pad */ PACKS(desc,"B16",""); /* szNotifyName */ PACKS(desc,"B10","PM_Q_RAW"); /* szDataType */ @@ -470,17 +470,17 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, PACKS(desc,"z",""); /* pszStatus */ PACKI(desc,"D",t); /* ulSubmitted */ PACKI(desc,"D",queue->size); /* ulSize */ - PACKS(desc,"z",dos_to_unix(queue->fs_file,False)); /* pszComment */ + PACKS(desc,"z",dos_to_unix_static(queue->fs_file)); /* pszComment */ } if (uLevel == 2 || uLevel == 3 || uLevel == 4) { PACKI(desc,"W",queue->priority); /* uPriority */ - PACKS(desc,"z",dos_to_unix(queue->fs_user,False)); /* pszUserName */ + PACKS(desc,"z",dos_to_unix_static(queue->fs_user)); /* pszUserName */ PACKI(desc,"W",n+1); /* uPosition */ PACKI(desc,"W",printj_status(queue->status)); /* fsStatus */ PACKI(desc,"D",t); /* ulSubmitted */ PACKI(desc,"D",queue->size); /* ulSize */ PACKS(desc,"z","Samba"); /* pszComment */ - PACKS(desc,"z",dos_to_unix(queue->fs_file,False)); /* pszDocument */ + PACKS(desc,"z",dos_to_unix_static(queue->fs_file)); /* pszDocument */ if (uLevel == 3) { PACKS(desc,"z",""); /* pszNotifyName */ PACKS(desc,"z","PM_Q_RAW"); /* pszDataType */ diff --git a/source/smbd/message.c b/source/smbd/message.c index 0097b15b8b4..8acd4e83eec 100644 --- a/source/smbd/message.c +++ b/source/smbd/message.c @@ -64,7 +64,7 @@ static void msg_deliver(void) if(msgpos > 0) { msgbuf[msgpos] = '\0'; /* Ensure null terminated. */ - pstrcpy(msgbuf,dos_to_unix(msgbuf,False)); + pstrcpy(msgbuf,dos_to_unix_static(msgbuf)); } for (i=0;ivfs_ops.open(conn,dos_to_unix(fname,False),flags,mode); + fd = conn->vfs_ops.open(conn,dos_to_unix_static(fname),flags,mode); /* Fix for files ending in '.' */ if((fd == -1) && (errno == ENOENT) && (strchr(fname,'.')==NULL)) { pstrcat(fname,"."); - fd = conn->vfs_ops.open(conn,dos_to_unix(fname,False),flags,mode); + fd = conn->vfs_ops.open(conn,dos_to_unix_static(fname),flags,mode); } DEBUG(10,("fd_open: name %s, flags = 0%o mode = 0%o, fd = %d. %s\n", fname, @@ -815,7 +815,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", */ if ((flags2 & O_CREAT) && lp_inherit_acls(SNUM(conn)) && - (def_acl = directory_has_default_acl(conn, dos_to_unix(parent_dirname(fname),False)))) + (def_acl = directory_has_default_acl(conn, dos_to_unix_static(parent_dirname(fname))))) mode = 0777; DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n", diff --git a/source/smbd/password.c b/source/smbd/password.c index 4d751c2a419..7e72d265e22 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -651,7 +651,7 @@ static char *validate_group(const char *group,char *password,int pwlen,int snum) #ifdef HAVE_NETGROUP { char *host, *user, *domain; - setnetgrent((char *)group); + setnetgrent(group); while (getnetgrent(&host, &user, &domain)) { if (user) { if (user_ok(user, snum) && diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 8d421a6141d..958d1e3c927 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -1719,7 +1719,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau */ if(default_ace || fsp->is_directory || fsp->fd == -1) { - if (conn->vfs_ops.sys_acl_set_file(conn, dos_to_unix(fsp->fsp_name,False), the_acl_type, the_acl) == -1) { + if (conn->vfs_ops.sys_acl_set_file(conn, dos_to_unix_static(fsp->fsp_name), the_acl_type, the_acl) == -1) { /* * Some systems allow all the above calls and only fail with no ACL support * when attempting to apply the acl. HPUX with HFS is an example of this. JRA. @@ -1878,14 +1878,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) * Get the ACL from the path. */ - posix_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_ACCESS); + posix_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS); /* * If it's a directory get the default POSIX ACL. */ if(fsp->is_directory) - dir_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_DEFAULT); + dir_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_DEFAULT); } else { @@ -2142,7 +2142,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) * No default ACL - delete one if it exists. */ - if (conn->vfs_ops.sys_acl_delete_def_file(conn, dos_to_unix(fsp->fsp_name,False)) == -1) { + if (conn->vfs_ops.sys_acl_delete_def_file(conn, dos_to_unix_static(fsp->fsp_name)) == -1) { DEBUG(3,("set_nt_acl: conn->vfs_ops.sys_acl_delete_def_file failed (%s)\n", strerror(errno))); free_canon_ace_list(file_ace_list); return False; @@ -2170,7 +2170,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) DEBUG(3,("set_nt_acl: chmod %s. perms = 0%o.\n", fsp->fsp_name, (unsigned int)posix_perms )); - if(conn->vfs_ops.chmod(conn,dos_to_unix(fsp->fsp_name, False), posix_perms) == -1) { + if(conn->vfs_ops.chmod(conn,dos_to_unix_static(fsp->fsp_name), posix_perms) == -1) { DEBUG(3,("set_nt_acl: chmod %s, 0%o failed. Error = %s.\n", fsp->fsp_name, (unsigned int)posix_perms, strerror(errno) )); free_canon_ace_list(file_ace_list); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 2227a066ecb..6d35b3fdfec 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -236,9 +236,9 @@ int reply_tcon(connection_struct *conn, * Ensure the user and password names are in UNIX codepage format. */ - pstrcpy(user,dos_to_unix(user,False)); + pstrcpy(user,dos_to_unix_static(user)); if (!doencrypt) - pstrcpy(password,dos_to_unix(password,False)); + pstrcpy(password,dos_to_unix_static(password)); /* * Pass the user through the NT -> unix user mapping @@ -346,9 +346,9 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt * Ensure the user and password names are in UNIX codepage format. */ - pstrcpy(user,dos_to_unix(user,False)); + pstrcpy(user,dos_to_unix_static(user)); if (!doencrypt) - pstrcpy(password,dos_to_unix(password,False)); + pstrcpy(password,dos_to_unix_static(password)); /* * Pass the user through the NT -> unix user mapping @@ -726,7 +726,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int * Incoming user is in DOS codepage format. Convert * to UNIX. */ - pstrcpy(user,dos_to_unix(user,False)); + pstrcpy(user,dos_to_unix_static(user)); if (!doencrypt && (lp_security() != SEC_SERVER)) { smb_apasslen = strlen(smb_apasswd); @@ -812,8 +812,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int * Ensure the plaintext passwords are in UNIX format. */ if(!doencrypt) { - pstrcpy(smb_apasswd,dos_to_unix(smb_apasswd,False)); - pstrcpy(smb_ntpasswd,dos_to_unix(smb_ntpasswd,False)); + pstrcpy(smb_apasswd,dos_to_unix_static(smb_apasswd)); + pstrcpy(smb_ntpasswd,dos_to_unix_static(smb_ntpasswd)); } } else { @@ -823,7 +823,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int /* * Ensure the plaintext password is in UNIX format. */ - pstrcpy(smb_apasswd,dos_to_unix(smb_apasswd,False)); + pstrcpy(smb_apasswd,dos_to_unix_static(smb_apasswd)); /* trim the password */ smb_apasslen = strlen(smb_apasswd); @@ -842,8 +842,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int * Incoming user and domain are in DOS codepage format. Convert * to UNIX. */ - pstrcpy(user,dos_to_unix(user,False)); - fstrcpy(domain, dos_to_unix(p, False)); + pstrcpy(user,dos_to_unix_static(user)); + fstrcpy(domain, dos_to_unix_static(p)); DEBUG(3,("Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n", domain,skip_string(p,1),skip_string(p,2))); } @@ -912,7 +912,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int /* Work out who's who */ slprintf(dom_user, sizeof(dom_user) - 1,"%s%s%s", - dos_to_unix(domain, False), lp_winbind_separator(), user); + dos_to_unix_static(domain), lp_winbind_separator(), user); if (sys_getpwnam(dom_user) != NULL) { pstrcpy(user, dom_user); @@ -1053,7 +1053,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int p = smb_buf(outbuf); pstrcpy(p,"Unix"); p = skip_string(p,1); pstrcpy(p,"Samba "); pstrcat(p,VERSION); p = skip_string(p,1); - pstrcpy(p,global_myworkgroup); unix_to_dos(p, True); p = skip_string(p,1); + pstrcpy(p,global_myworkgroup); unix_to_dos(p); p = skip_string(p,1); set_message(outbuf,3,PTR_DIFF(p,smb_buf(outbuf)),False); /* perhaps grab OS version here?? */ } @@ -1916,7 +1916,7 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype) if (!CAN_WRITE(conn)) return NT_STATUS_MEDIA_WRITE_PROTECTED; - if (conn->vfs_ops.lstat(conn,dos_to_unix(fname,False),&sbuf) != 0) + if (conn->vfs_ops.lstat(conn,dos_to_unix_static(fname),&sbuf) != 0) return NT_STATUS_OBJECT_NAME_NOT_FOUND; fmode = dos_mode(conn,fname,&sbuf); @@ -3427,7 +3427,7 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory) pstrcat(fullname, "/"); pstrcat(fullname, dname); - if(conn->vfs_ops.lstat(conn,dos_to_unix(fullname,False), &st) != 0) { + if(conn->vfs_ops.lstat(conn,dos_to_unix_static(fullname), &st) != 0) { ret = True; break; } @@ -3499,7 +3499,7 @@ BOOL rmdir_internals(connection_struct *conn, char *directory) pstrcat(fullname, "/"); pstrcat(fullname, dname); - if(conn->vfs_ops.lstat(conn,dos_to_unix(fullname, False), &st) != 0) + if(conn->vfs_ops.lstat(conn,dos_to_unix_static(fullname), &st) != 0) break; if(st.st_mode & S_IFDIR) { if(lp_recursive_veto_delete(SNUM(conn))) { @@ -3807,8 +3807,8 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n", return error; } - pstrcpy(zdirectory, dos_to_unix(directory, False)); - pstrcpy(znewname, dos_to_unix(newname,False)); + pstrcpy(zdirectory, dos_to_unix_static(directory)); + pstrcpy(znewname, dos_to_unix_static(newname)); /* * If the src and dest names are identical - including case, @@ -3889,8 +3889,8 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n", continue; } - if (!conn->vfs_ops.rename(conn,dos_to_unix(fname,False), - dos_to_unix(destname,False))) + if (!conn->vfs_ops.rename(conn,dos_to_unix_static(fname), + dos_to_unix_static(destname))) count++; DEBUG(3,("rename_internals: doing rename on %s -> %s\n",fname,destname)); } diff --git a/source/smbd/service.c b/source/smbd/service.c index 0917c0dbad6..4fadce0aa9a 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -255,7 +255,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int if (*user && Get_Pwnam(user,True)) { fstring dos_username; fstrcpy(dos_username, user); - unix_to_dos(dos_username, True); + unix_to_dos(dos_username); return(make_connection(dos_username,user,password, pwlen,dev,vuid,ecode)); } @@ -265,7 +265,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int fstring dos_username; fstrcpy(user,validated_username(vuid)); fstrcpy(dos_username, user); - unix_to_dos(dos_username, True); + unix_to_dos(dos_username); return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode)); } } else { @@ -275,7 +275,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int fstring dos_username; fstrcpy(user,current_user_info.smb_name); fstrcpy(dos_username, user); - unix_to_dos(dos_username, True); + unix_to_dos(dos_username); return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode)); } } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 96239e5eabf..c700436be18 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1367,7 +1367,7 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf SIVAL(pdata,4,255); /* Max filename component length */ /* NOTE! the fstype must *not* be null terminated or win98 won't recognise it and will think we can't do long filenames */ - fstype_len = dos_PutUniCode(pdata+12,unix_to_dos(fstype,False),sizeof(pstring), False); + fstype_len = dos_PutUniCode(pdata+12,unix_to_dos_static(fstype),sizeof(pstring), False); SIVAL(pdata,8,fstype_len); data_len = 12 + fstype_len; SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS); @@ -2055,11 +2055,11 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * #else return(UNIXERROR(ERRDOS,ERRbadlink)); #endif - len = conn->vfs_ops.readlink(conn,dos_to_unix(fullpathname,False), buffer, sizeof(pstring)-1); /* read link */ + len = conn->vfs_ops.readlink(conn,dos_to_unix_static(fullpathname), buffer, sizeof(pstring)-1); /* read link */ if (len == -1) return(UNIXERROR(ERRDOS,ERRnoaccess)); buffer[len] = 0; - unix_to_dos(buffer,True); + unix_to_dos(buffer); pstrcpy(pdata,buffer); /* write '\0' terminated string */ pdata += strlen(buffer)+1; data_size = PTR_DIFF(pdata,(*ppdata)); @@ -2202,10 +2202,10 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in pstrcpy(link_dest, "./"); } - if (conn->vfs_ops.realpath(conn,dos_to_unix(link_dest,False),resolved_name) == NULL) + if (conn->vfs_ops.realpath(conn,dos_to_unix_static(link_dest),resolved_name) == NULL) return -1; - pstrcpy(link_dest, unix_to_dos(resolved_name,False)); + pstrcpy(link_dest, unix_to_dos_static(resolved_name)); pstrcat(link_dest, "/"); pstrcat(link_dest, last_component); @@ -2625,7 +2625,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", 0%o for file %s\n", (double)dev, unixmode, fname )); /* Ok - do the mknod. */ - if (conn->vfs_ops.mknod(conn,dos_to_unix(fname,False), unixmode, dev) != 0) + if (conn->vfs_ops.mknod(conn,dos_to_unix_static(fname), unixmode, dev) != 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); SSVAL(params,0,0); @@ -2687,8 +2687,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", if (ensure_link_is_safe(conn, link_dest, link_dest) != 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); - dos_to_unix(link_dest, True); - dos_to_unix(fname, True); + dos_to_unix(link_dest); + dos_to_unix(fname); DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_LINK doing symlink %s -> %s\n", fname, link_dest )); @@ -2715,8 +2715,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", if (ensure_link_is_safe(conn, link_dest, link_dest) != 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); - dos_to_unix(link_dest, True); - dos_to_unix(fname, True); + dos_to_unix(link_dest); + dos_to_unix(fname); DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_LINK doing hard link %s -> %s\n", fname, link_dest )); diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index c2345f4a503..b2e68c7f30a 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -21,10 +21,6 @@ #include "includes.h" -/* Check for NULL pointer parameters in vfswrap_* functions */ - -#define VFS_CHECK_NULL - /* We don't want to have NULL function pointers lying around. Someone is sure to try and execute them. These stubs are used to prevent this possibility. */ @@ -45,32 +41,18 @@ SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_q { SMB_BIG_UINT result; -#ifdef VFS_CHECK_NULL - if ((path == NULL) || (bsize == NULL) || (dfree == NULL) || - (dsize == NULL)) { - - smb_panic("NULL pointer passed to vfswrap_disk_free() function\n"); - } -#endif - result = sys_disk_free(path, small_query, bsize, dfree, dsize); return result; } /* Directory operations */ -DIR *vfswrap_opendir(connection_struct *conn, char *fname) +DIR *vfswrap_opendir(connection_struct *conn, const char *fname) { DIR *result; START_PROFILE(syscall_opendir); -#ifdef VFS_CHECK_NULL - if (fname == NULL) { - smb_panic("NULL pointer passed to vfswrap_opendir()\n"); - } -#endif - result = opendir(fname); END_PROFILE(syscall_opendir); return result; @@ -82,30 +64,18 @@ struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp) START_PROFILE(syscall_readdir); -#ifdef VFS_CHECK_NULL - if (dirp == NULL) { - smb_panic("NULL pointer passed to vfswrap_readdir()\n"); - } -#endif - result = readdir(dirp); END_PROFILE(syscall_readdir); return result; } -int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode) +int vfswrap_mkdir(connection_struct *conn, const char *path, mode_t mode) { int result; BOOL has_dacl = False; START_PROFILE(syscall_mkdir); -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_mkdir()\n"); - } -#endif - if (lp_inherit_acls(SNUM(conn)) && (has_dacl = directory_has_default_acl(conn, parent_dirname(path)))) mode = 0777; @@ -130,18 +100,12 @@ int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode) return result; } -int vfswrap_rmdir(connection_struct *conn, char *path) +int vfswrap_rmdir(connection_struct *conn, const char *path) { int result; START_PROFILE(syscall_rmdir); -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_rmdir()\n"); - } -#endif - result = rmdir(path); END_PROFILE(syscall_rmdir); return result; @@ -153,12 +117,6 @@ int vfswrap_closedir(connection_struct *conn, DIR *dirp) START_PROFILE(syscall_closedir); -#ifdef VFS_CHECK_NULL - if (dirp == NULL) { - smb_panic("NULL pointer passed to vfswrap_closedir()\n"); - } -#endif - result = closedir(dirp); END_PROFILE(syscall_closedir); return result; @@ -166,18 +124,12 @@ int vfswrap_closedir(connection_struct *conn, DIR *dirp) /* File operations */ -int vfswrap_open(connection_struct *conn, char *fname, int flags, mode_t mode) +int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t mode) { int result; START_PROFILE(syscall_open); -#ifdef VFS_CHECK_NULL - if (fname == NULL) { - smb_panic("NULL pointer passed to vfswrap_open()\n"); - } -#endif - result = sys_open(fname, flags, mode); END_PROFILE(syscall_open); return result; @@ -200,12 +152,6 @@ ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n) START_PROFILE_BYTES(syscall_read, n); -#ifdef VFS_CHECK_NULL - if (data == NULL) { - smb_panic("NULL pointer passed to vfswrap_read()\n"); - } -#endif - result = read(fd, data, n); END_PROFILE(syscall_read); return result; @@ -217,12 +163,6 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n) START_PROFILE_BYTES(syscall_write, n); -#ifdef VFS_CHECK_NULL - if (data == NULL) { - smb_panic("NULL pointer passed to vfswrap_write()\n"); - } -#endif - result = write(fd, data, n); END_PROFILE(syscall_write); return result; @@ -257,7 +197,7 @@ SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int wh **********************************************************/ -static int copy_reg(char *source, const char *dest) +static int copy_reg(const char *source, const char *dest) { SMB_STRUCT_STAT source_stats; int ifd; @@ -331,18 +271,11 @@ static int copy_reg(char *source, const char *dest) return 0; } -int vfswrap_rename(connection_struct *conn, char *oldname, char *newname) +int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname) { int result; START_PROFILE(syscall_rename); - -#ifdef VFS_CHECK_NULL - if ((oldname == NULL) || (newname == NULL)) { - smb_panic("NULL pointer passed to vfswrap_rename()\n"); - } -#endif - result = rename(oldname, newname); if (errno == EXDEV) { /* Rename across filesystems needed. */ @@ -358,7 +291,6 @@ int vfswrap_fsync(files_struct *fsp, int fd) int result; START_PROFILE(syscall_fsync); - result = fsync(fd); END_PROFILE(syscall_fsync); return result; @@ -367,18 +299,11 @@ int vfswrap_fsync(files_struct *fsp, int fd) #endif } -int vfswrap_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf) +int vfswrap_stat(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf) { int result; START_PROFILE(syscall_stat); - -#ifdef VFS_CHECK_NULL - if ((fname == NULL) || (sbuf == NULL)) { - smb_panic("NULL pointer passed to vfswrap_stat()\n"); - } -#endif - result = sys_stat(fname, sbuf); END_PROFILE(syscall_stat); return result; @@ -389,64 +314,37 @@ int vfswrap_fstat(files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) int result; START_PROFILE(syscall_fstat); - -#ifdef VFS_CHECK_NULL - if (sbuf == NULL) { - smb_panic("NULL pointer passed to vfswrap_fstat()\n"); - } -#endif - result = sys_fstat(fd, sbuf); END_PROFILE(syscall_fstat); return result; } -int vfswrap_lstat(connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf) +int vfswrap_lstat(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf) { int result; START_PROFILE(syscall_lstat); - -#ifdef VFS_CHECK_NULL - if ((path == NULL) || (sbuf == NULL)) { - smb_panic("NULL pointer passed to vfswrap_lstat()\n"); - } -#endif - result = sys_lstat(path, sbuf); END_PROFILE(syscall_lstat); return result; } -int vfswrap_unlink(connection_struct *conn, char *path) +int vfswrap_unlink(connection_struct *conn, const char *path) { int result; START_PROFILE(syscall_unlink); - -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_unlink()\n"); - } -#endif - result = unlink(path); END_PROFILE(syscall_unlink); return result; } -int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode) +int vfswrap_chmod(connection_struct *conn, const char *path, mode_t mode) { int result; START_PROFILE(syscall_chmod); -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_chmod()\n"); - } -#endif - /* * We need to do this due to the fact that the default POSIX ACL * chmod modifies the ACL *mask* for the group owner, not the @@ -471,10 +369,10 @@ int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode) int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode) { - int result; + int result; struct vfs_ops *vfs_ops = &fsp->conn->vfs_ops; - START_PROFILE(syscall_fchmod); + START_PROFILE(syscall_fchmod); /* * We need to do this due to the fact that the default POSIX ACL @@ -492,23 +390,16 @@ int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode) errno = saved_errno; } - result = fchmod(fd, mode); - END_PROFILE(syscall_fchmod); - return result; + result = fchmod(fd, mode); + END_PROFILE(syscall_fchmod); + return result; } -int vfswrap_chown(connection_struct *conn, char *path, uid_t uid, gid_t gid) +int vfswrap_chown(connection_struct *conn, const char *path, uid_t uid, gid_t gid) { int result; START_PROFILE(syscall_chown); - -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_chown()\n"); - } -#endif - result = sys_chown(path, uid, gid); END_PROFILE(syscall_chown); return result; @@ -525,18 +416,11 @@ int vfswrap_fchown(files_struct *fsp, int fd, uid_t uid, gid_t gid) return result; } -int vfswrap_chdir(connection_struct *conn, char *path) +int vfswrap_chdir(connection_struct *conn, const char *path) { int result; START_PROFILE(syscall_chdir); - -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_chdir()\n"); - } -#endif - result = chdir(path); END_PROFILE(syscall_chdir); return result; @@ -547,30 +431,16 @@ char *vfswrap_getwd(connection_struct *conn, char *path) char *result; START_PROFILE(syscall_getwd); - -#ifdef VFS_CHECK_NULL - if (path == NULL) { - smb_panic("NULL pointer passed to vfswrap_getwd()\n"); - } -#endif - result = sys_getwd(path); END_PROFILE(syscall_getwd); return result; } -int vfswrap_utime(connection_struct *conn, char *path, struct utimbuf *times) +int vfswrap_utime(connection_struct *conn, const char *path, struct utimbuf *times) { int result; START_PROFILE(syscall_utime); - -#ifdef VFS_CHECK_NULL - if ((path == NULL) || (times == NULL)) { - smb_panic("NULL pointer passed to vfswrap_utime()\n"); - } -#endif - result = utime(path, times); END_PROFILE(syscall_utime); return result; @@ -713,7 +583,6 @@ BOOL vfswrap_lock(files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T BOOL result; START_PROFILE(syscall_fcntl_lock); - result = fcntl_lock(fd, op, offset, count,type); END_PROFILE(syscall_fcntl_lock); return result; @@ -724,12 +593,6 @@ int vfswrap_symlink(connection_struct *conn, const char *oldpath, const char *ne int result; START_PROFILE(syscall_symlink); - -#ifdef VFS_CHECK_NULL - if ((oldpath == NULL) || (newpath == NULL)) - smb_panic("NULL pointer passed to vfswrap_symlink()\n"); -#endif - result = sys_symlink(oldpath, newpath); END_PROFILE(syscall_symlink); return result; @@ -740,12 +603,6 @@ int vfswrap_readlink(connection_struct *conn, const char *path, char *buf, size_ int result; START_PROFILE(syscall_readlink); - -#ifdef VFS_CHECK_NULL - if ((path == NULL) || (buf == NULL)) - smb_panic("NULL pointer passed to vfswrap_readlink()\n"); -#endif - result = sys_readlink(path, buf, bufsiz); END_PROFILE(syscall_readlink); return result; @@ -756,11 +613,6 @@ int vfswrap_link(connection_struct *conn, const char *oldpath, const char *newpa int result; START_PROFILE(syscall_link); - -#ifdef VFS_CHECK_NULL - if ((oldpath == NULL) || (newpath == NULL)) - smb_panic("NULL pointer passed to vfswrap_link()\n"); -#endif result = sys_link(oldpath, newpath); END_PROFILE(syscall_link); return result; @@ -771,11 +623,6 @@ int vfswrap_mknod(connection_struct *conn, const char *pathname, mode_t mode, SM int result; START_PROFILE(syscall_mknod); - -#ifdef VFS_CHECK_NULL - if (pathname == NULL) - smb_panic("NULL pointer passed to vfswrap_mknod()\n"); -#endif result = sys_mknod(pathname, mode, dev); END_PROFILE(syscall_mknod); return result; @@ -786,11 +633,6 @@ char *vfswrap_realpath(connection_struct *conn, const char *path, char *resolved char *result; START_PROFILE(syscall_realpath); - -#ifdef VFS_CHECK_NULL - if ((path == NULL) || (resolved_path == NULL)) - smb_panic("NULL pointer passed to vfswrap_realpath()\n"); -#endif result = sys_realpath(path, resolved_path); END_PROFILE(syscall_realpath); return result; @@ -806,7 +648,7 @@ size_t vfswrap_fget_nt_acl(files_struct *fsp, int fd, SEC_DESC **ppdesc) return result; } -size_t vfswrap_get_nt_acl(files_struct *fsp, char *name, SEC_DESC **ppdesc) +size_t vfswrap_get_nt_acl(files_struct *fsp, const char *name, SEC_DESC **ppdesc) { size_t result; @@ -826,7 +668,7 @@ BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, S return result; } -BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent, SEC_DESC *psd) +BOOL vfswrap_set_nt_acl(files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd) { BOOL result; @@ -836,7 +678,7 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent return result; } -int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode) +int vfswrap_chmod_acl(connection_struct *conn, const char *name, mode_t mode) { int result; diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index b42ededccf2..440cbd16f86 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -210,7 +210,7 @@ BOOL smbd_vfs_init(connection_struct *conn) Check if directory exists. ********************************************************************/ -BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st) +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st) { SMB_STRUCT_STAT st2; BOOL ret; @@ -232,13 +232,13 @@ BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT * vfs mkdir wrapper that calls dos_to_unix. ********************************************************************/ -int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode) +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode) { int ret; pstring name; SMB_STRUCT_STAT sbuf; - pstrcpy(name,dos_to_unix(fname,False)); /* paranoia copy */ + pstrcpy(name,dos_to_unix_static(fname)); /* paranoia copy */ if(!(ret=conn->vfs_ops.mkdir(conn,name,mode))) { /* * Check if high bits should have been set, @@ -261,7 +261,7 @@ char *vfs_getwd(connection_struct *conn, char *unix_path) char *wd; wd = conn->vfs_ops.getwd(conn,unix_path); if (wd) - unix_to_dos(wd, True); + unix_to_dos(wd); return wd; } @@ -269,7 +269,7 @@ char *vfs_getwd(connection_struct *conn, char *unix_path) Check if an object exists in the vfs. ********************************************************************/ -BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf) +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf) { SMB_STRUCT_STAT st; @@ -287,7 +287,7 @@ BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf) Check if a file exists in the vfs. ********************************************************************/ -BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf) +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf) { SMB_STRUCT_STAT st; @@ -330,7 +330,7 @@ ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count) Write data to a fd on the vfs. ****************************************************************************/ -ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N) +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N) { size_t total=0; ssize_t ret; @@ -487,7 +487,7 @@ char *vfs_readdirname(connection_struct *conn, void *p) { static pstring buf; memcpy(buf, dname, NAMLEN(ptr)+1); - unix_to_dos(buf, True); + unix_to_dos(buf); dname = buf; } @@ -564,7 +564,7 @@ static BOOL handle_vfs_option(char *pszParmValue, char **ptr) A wrapper for vfs_chdir(). ********************************************************************/ -int vfs_ChDir(connection_struct *conn, char *path) +int vfs_ChDir(connection_struct *conn, const char *path) { int res; static pstring LastDir=""; diff --git a/source/utils/status.c b/source/utils/status.c index 01d80ad53dd..b7edd3a4198 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -135,7 +135,7 @@ static void print_share_mode(share_mode_entry *e, char *fname) else printf("NONE "); - printf(" %s %s",dos_to_unix(fname,False), + printf(" %s %s",dos_to_unix_static(fname), asctime(LocalTime((time_t *)&e->time.tv_sec))); } } diff --git a/source/utils/testparm.c b/source/utils/testparm.c index a433bb11e1d..2ca79545335 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -283,7 +283,7 @@ Level II oplocks can only be set if oplocks are also set.\n", getc(stdin); } memcpy(DEBUGLEVEL_CLASS,parsed_debuglevel_class,sizeof(parsed_debuglevel_class)); - lp_dump(stdout,True, lp_numservices(), _dos_to_unix); + lp_dump(stdout,True, lp_numservices(), _dos_to_unix_static); } if (argc >= 3) { diff --git a/source/web/statuspage.c b/source/web/statuspage.c index 920d0f3367c..a940a08ebd4 100644 --- a/source/web/statuspage.c +++ b/source/web/statuspage.c @@ -139,7 +139,7 @@ static void print_share_mode(share_mode_entry *e, char *fname) printf(""); printf("%s%s\n", - dos_to_unix(fname,False),tstring(e->time.tv_sec)); + dos_to_unix_static(fname),tstring(e->time.tv_sec)); } diff --git a/source/web/swat.c b/source/web/swat.c index 71dc8630fff..5f44dc73723 100644 --- a/source/web/swat.c +++ b/source/web/swat.c @@ -342,7 +342,8 @@ static BOOL load_config(BOOL save_def) /**************************************************************************** write a config file ****************************************************************************/ -static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(char *, BOOL)) + +static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(const char *)) { fprintf(f, "# Samba config file created using SWAT\n"); fprintf(f, "# from %s (%s)\n", cgi_remote_host(), cgi_remote_addr()); @@ -371,9 +372,9 @@ static int save_reload(int snum) fchmod(fileno(f), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); } - write_config(f, False, _dos_to_unix); + write_config(f, False, _dos_to_unix_static); if (snum) - lp_dump_one(f, False, snum, _dos_to_unix); + lp_dump_one(f, False, snum, _dos_to_unix_static); fclose(f); lp_killunused(NULL); @@ -398,7 +399,7 @@ static void commit_parameter(int snum, struct parm_struct *parm, char *v) /* lp_do_parameter() will do unix_to_dos(v). */ if(parm->flags & FLAG_DOS_STRING) - dos_to_unix(v, True); + dos_to_unix(v); if (snum < 0 && parm->class == P_LOCAL) { /* this handles the case where we are changing a local @@ -499,7 +500,7 @@ static void viewconfig_page(void) } printf("

    ");
    -	write_config(stdout, full_view, _dos_to_dos);
    +	write_config(stdout, full_view, _dos_to_dos_static);
     	printf("
    "); printf("\n"); } @@ -582,7 +583,7 @@ static void shares_page(void) /* add_a_service() which is called by lp_copy_service() will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */ pstring unix_share; - pstrcpy(unix_share, dos_to_unix(share, False)); + pstrcpy(unix_share, dos_to_unix_static(share)); load_config(False); lp_copy_service(GLOBALS_SNUM, unix_share); iNumNonAutoPrintServices = lp_numservices(); @@ -921,7 +922,7 @@ static void printers_page(void) /* add_a_service() which is called by lp_copy_service() will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */ pstring unix_share; - pstrcpy(unix_share, dos_to_unix(share, False)); + pstrcpy(unix_share, dos_to_unix_static(share)); load_config(False); lp_copy_service(GLOBALS_SNUM, unix_share); iNumNonAutoPrintServices = lp_numservices(); -- cgit From b2ce9c26582d9502b9ec8608e105fb3bee2314ea Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Mar 2002 22:09:34 +0000 Subject: Moved to new const VFS interface. Jeremy. --- examples/VFS/audit.c | 32 ++++++++++++++++---------------- examples/VFS/skel.c | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index a319b028965..acc1e8c25dc 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -49,15 +49,15 @@ int audit_connect(struct connection_struct *conn, char *svc, char *user); void audit_disconnect(struct connection_struct *conn); -DIR *audit_opendir(struct connection_struct *conn, char *fname); -int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode); -int audit_rmdir(struct connection_struct *conn, char *path); -int audit_open(struct connection_struct *conn, char *fname, int flags, mode_t mode); +DIR *audit_opendir(struct connection_struct *conn, const char *fname); +int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode); +int audit_rmdir(struct connection_struct *conn, const char *path); +int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode); int audit_close(struct files_struct *fsp, int fd); -int audit_rename(struct connection_struct *conn, char *old, char *new); -int audit_unlink(struct connection_struct *conn, char *path); -int audit_chmod(struct connection_struct *conn, char *path, mode_t mode); -int audit_chmod_acl(struct connection_struct *conn, char *name, mode_t mode); +int audit_rename(struct connection_struct *conn, const char *old, const char *new); +int audit_unlink(struct connection_struct *conn, const char *path); +int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode); +int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode); int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode); int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode); @@ -188,7 +188,7 @@ void audit_disconnect(struct connection_struct *conn) default_vfs_ops.disconnect(conn); } -DIR *audit_opendir(struct connection_struct *conn, char *fname) +DIR *audit_opendir(struct connection_struct *conn, const char *fname) { DIR *result = default_vfs_ops.opendir(conn, fname); @@ -200,7 +200,7 @@ DIR *audit_opendir(struct connection_struct *conn, char *fname) return result; } -int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode) +int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.mkdir(conn, path, mode); @@ -212,7 +212,7 @@ int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode) return result; } -int audit_rmdir(struct connection_struct *conn, char *path) +int audit_rmdir(struct connection_struct *conn, const char *path) { int result = default_vfs_ops.rmdir(conn, path); @@ -224,7 +224,7 @@ int audit_rmdir(struct connection_struct *conn, char *path) return result; } -int audit_open(struct connection_struct *conn, char *fname, int flags, mode_t mode) +int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode) { int result = default_vfs_ops.open(conn, fname, flags, mode); @@ -249,7 +249,7 @@ int audit_close(struct files_struct *fsp, int fd) return result; } -int audit_rename(struct connection_struct *conn, char *old, char *new) +int audit_rename(struct connection_struct *conn, const char *old, const char *new) { int result = default_vfs_ops.rename(conn, old, new); @@ -261,7 +261,7 @@ int audit_rename(struct connection_struct *conn, char *old, char *new) return result; } -int audit_unlink(struct connection_struct *conn, char *path) +int audit_unlink(struct connection_struct *conn, const char *path) { int result = default_vfs_ops.unlink(conn, path); @@ -273,7 +273,7 @@ int audit_unlink(struct connection_struct *conn, char *path) return result; } -int audit_chmod(struct connection_struct *conn, char *path, mode_t mode) +int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.chmod(conn, path, mode); @@ -285,7 +285,7 @@ int audit_chmod(struct connection_struct *conn, char *path, mode_t mode) return result; } -int audit_chmod_acl(struct connection_struct *conn, char *path, mode_t mode) +int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.chmod_acl(conn, path, mode); diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index 81317d87021..619cf187d82 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -59,7 +59,7 @@ static SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path, dfree, dsize); } -static DIR *skel_opendir(struct connection_struct *conn, char *fname) +static DIR *skel_opendir(struct connection_struct *conn, const char *fname) { return default_vfs_ops.opendir(conn, fname); } @@ -69,12 +69,12 @@ static struct dirent *skel_readdir(struct connection_struct *conn, DIR *dirp) return default_vfs_ops.readdir(conn, dirp); } -static int skel_mkdir(struct connection_struct *conn, char *path, mode_t mode) +static int skel_mkdir(struct connection_struct *conn, const char *path, mode_t mode) { return default_vfs_ops.mkdir(conn, path, mode); } -static int skel_rmdir(struct connection_struct *conn, char *path) +static int skel_rmdir(struct connection_struct *conn, const char *path) { return default_vfs_ops.rmdir(conn, path); } @@ -84,7 +84,7 @@ static int skel_closedir(struct connection_struct *conn, DIR *dir) return default_vfs_ops.closedir(conn, dir); } -static int skel_open(struct connection_struct *conn, char *fname, int flags, mode_t mode) +static int skel_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode) { return default_vfs_ops.open(conn, fname, flags, mode); } @@ -109,7 +109,7 @@ static SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T off return default_vfs_ops.lseek(fsp, filedes, offset, whence); } -static int skel_rename(struct connection_struct *conn, char *old, char *new) +static int skel_rename(struct connection_struct *conn, const char *old, const char *new) { return default_vfs_ops.rename(conn, old, new); } @@ -119,7 +119,7 @@ static int skel_fsync(struct files_struct *fsp, int fd) return default_vfs_ops.fsync(fsp, fd); } -static int skel_stat(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf) +static int skel_stat(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf) { return default_vfs_ops.stat(conn, fname, sbuf); } @@ -129,17 +129,17 @@ static int skel_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) return default_vfs_ops.fstat(fsp, fd, sbuf); } -static int skel_lstat(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf) +static int skel_lstat(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf) { return default_vfs_ops.lstat(conn, path, sbuf); } -static int skel_unlink(struct connection_struct *conn, char *path) +static int skel_unlink(struct connection_struct *conn, const char *path) { return default_vfs_ops.unlink(conn, path); } -static int skel_chmod(struct connection_struct *conn, char *path, mode_t mode) +static int skel_chmod(struct connection_struct *conn, const char *path, mode_t mode) { return default_vfs_ops.chmod(conn, path, mode); } @@ -149,7 +149,7 @@ static int skel_fchmod(struct files_struct *fsp, int fd, mode_t mode) return default_vfs_ops.fchmod(fsp, fd, mode); } -static int skel_chown(struct connection_struct *conn, char *path, uid_t uid, gid_t gid) +static int skel_chown(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid) { return default_vfs_ops.chown(conn, path, uid, gid); } @@ -159,7 +159,7 @@ static int skel_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid) return default_vfs_ops.fchown(fsp, fd, uid, gid); } -static int skel_chdir(struct connection_struct *conn, char *path) +static int skel_chdir(struct connection_struct *conn, const char *path) { return default_vfs_ops.chdir(conn, path); } @@ -169,7 +169,7 @@ static char *skel_getwd(struct connection_struct *conn, char *buf) return default_vfs_ops.getwd(conn, buf); } -static int skel_utime(struct connection_struct *conn, char *path, struct utimbuf *times) +static int skel_utime(struct connection_struct *conn, const char *path, struct utimbuf *times) { return default_vfs_ops.utime(conn, path, times); } @@ -214,7 +214,7 @@ static size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security return default_vfs_ops.fget_nt_acl(fsp, fd, ppdesc); } -static size_t skel_get_nt_acl(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc) +static size_t skel_get_nt_acl(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc) { return default_vfs_ops.get_nt_acl(fsp, name, ppdesc); } @@ -224,12 +224,12 @@ static BOOL skel_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_i return default_vfs_ops.fset_nt_acl(fsp, fd, security_info_sent, psd); } -static BOOL skel_set_nt_acl(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd) +static BOOL skel_set_nt_acl(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd) { return default_vfs_ops.set_nt_acl(fsp, name, security_info_sent, psd); } -static BOOL skel_chmod_acl(struct connection_struct *conn, char *name, mode_t mode) +static BOOL skel_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode) { return default_vfs_ops.chmod_acl(conn, name, mode); } -- cgit From 903c747deae576b471dc28638640089af77f03ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Mar 2002 23:24:48 +0000 Subject: Added recycle bin VFS. Originally a patch to the main source code from Brandon Stone, Amherst College, Needs testing --- examples/VFS/Makefile | 2 +- examples/VFS/recycle.c | 262 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+), 1 deletion(-) create mode 100644 examples/VFS/recycle.c diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile index 9c216cd29b8..eaa1ffbb54e 100644 --- a/examples/VFS/Makefile +++ b/examples/VFS/Makefile @@ -13,7 +13,7 @@ SAMBA_INCL = ../../source/include UBIQX_SRC = ../../source/ubiqx SMBWR_SRC = ../../source/smbwrapper CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g -VFS_OBJS = audit.so skel.so +VFS_OBJS = audit.so skel.so recycle.so # Default target diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c new file mode 100644 index 00000000000..9a4e8b860ed --- /dev/null +++ b/examples/VFS/recycle.c @@ -0,0 +1,262 @@ +/* + * Auditing VFS module for samba. Log selected file operations to syslog + * facility. + * + * Copyright (C) 2001, Brandon Stone, Amherst College, . + * Copyright (C) 2002, Jeremy Allison - modified to make a VFS module. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "config.h" +#include +#include +#ifdef HAVE_UTIME_H +#include +#endif +#ifdef HAVE_DIRENT_H +#include +#endif +#include +#ifdef HAVE_FCNTL_H +#include +#endif +#include +#include +#include +#include + +/* VFS operations */ + +extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ + +static int recycle_unlink(connection_struct *, const char *); +static int recycle_connect(struct connection_struct *conn, char *service, char *user); +static void recycle_disconnect(struct connection_struct *conn); + +struct vfs_ops recycle_ops = { + + /* Disk operations */ + + recycle_connect, /* connect */ + recycle_disconnect, /* disconnect */ + NULL, /* disk free */ + + /* Directory operations */ + + NULL, /* opendir */ + NULL, /* readdir */ + NULL, /* mkdir */ + NULL, /* rmdir */ + NULL, /* closedir */ + + /* File operations */ + + NULL, /* open */ + NULL, /* close */ + NULL, /* read */ + NULL, /* write */ + NULL, /* lseek */ + NULL, /* rename */ + NULL, /* fsync */ + NULL, /* stat */ + NULL, /* fstat */ + NULL, /* lstat */ + recycle_unlink, + NULL, /* chmod */ + NULL, /* fchmod */ + NULL, /* chown */ + NULL, /* fchown */ + NULL, /* chdir */ + NULL, /* getwd */ + NULL, /* utime */ + NULL, /* ftruncate */ + NULL, /* lock */ + NULL, /* symlink */ + NULL, /* readlink */ + NULL, /* link */ + NULL, /* mknod */ + NULL, /* realpath */ + NULL, /* fget_nt_acl */ + NULL, /* get_nt_acl */ + NULL, /* fset_nt_acl */ + NULL, /* set_nt_acl */ + + NULL, /* chmod_acl */ + NULL, /* fchmod_acl */ + + NULL, /* sys_acl_get_entry */ + NULL, /* sys_acl_get_tag_type */ + NULL, /* sys_acl_get_permset */ + NULL, /* sys_acl_get_qualifier */ + NULL, /* sys_acl_get_file */ + NULL, /* sys_acl_get_fd */ + NULL, /* sys_acl_clear_perms */ + NULL, /* sys_acl_add_perm */ + NULL, /* sys_acl_to_text */ + NULL, /* sys_acl_init */ + NULL, /* sys_acl_create_entry */ + NULL, /* sys_acl_set_tag_type */ + NULL, /* sys_acl_set_qualifier */ + NULL, /* sys_acl_set_permset */ + NULL, /* sys_acl_valid */ + NULL, /* sys_acl_set_file */ + NULL, /* sys_acl_set_fd */ + NULL, /* sys_acl_delete_def_file */ + NULL, /* sys_acl_get_perm */ + NULL, /* sys_acl_free_text */ + NULL, /* sys_acl_free_acl */ + NULL /* sys_acl_free_qualifier */ +}; + +/* VFS initialisation function. Return initialised vfs_ops structure + back to SAMBA. */ + +struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) +{ + struct vfs_ops tmp_ops; + + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); + tmp_ops.unlink = recycle_unlink; + memcpy(&recycle_ops, &tmp_ops, sizeof(struct vfs_ops)); + return &recycle_ops; +} + +static int recycle_connect(struct connection_struct *conn, char *service, char *user) +{ + extern char *vfs_options(int); + pstring opts_str; + fstring recycle_bin; + char *p; + + pstrcpy(opts_str, (const char *)vfs_options(SNUM(conn))); + if (!*opts_str) + return 0; /* No options. */ + + p = opts_str; + if (next_token(&p,recycle_bin,"=",sizeof(recycle_bin))) { + if (!strequal("recycle", recycle_bin)) + return -1; + } + + if (!next_token(&p,recycle_bin,"=",sizeof(recycle_bin))) + return -1; + + conn->vfs_private = (void *)strdup(recycle_bin); + return 0; +} + +static void recycle_disconnect(struct connection_struct *conn) +{ + SAFE_FREE(conn->vfs_private); +} + +static BOOL recycle_XXX_exist(connection_struct *conn, const char *dname, BOOL isdir) +{ + SMB_STRUCT_STAT st; + + if (default_vfs_ops.stat(conn,dname,&st) != 0) + return(False); + + if (isdir) + return S_ISDIR(st.st_mode) ? True : False; + else + return S_ISREG(st.st_mode) ? True : False; +} + +static BOOL recycle_directory_exist(connection_struct *conn, const char *dname) +{ + return recycle_XXX_exist(conn, dname, True); +} + +static BOOL recycle_file_exist(connection_struct *conn, const char *fname) +{ + return recycle_XXX_exist(conn, fname, False); +} + +static SMB_OFF_T recycle_get_file_size(connection_struct *conn, const char *fname) +{ + SMB_STRUCT_STAT st; + + if (default_vfs_ops.stat(conn,fname,&st) != 0) + return (SMB_OFF_T)-1; + + return(st.st_size); +} + +/******************************************************************** + Check if file should be recycled +*********************************************************************/ + +static int recycle_unlink(connection_struct *conn, const char *fname) +{ + fstring recycle_bin; + char *base, *ext; + pstring bin; + int i=1, len, addlen; + int dir_mask=0700; + SMB_BIG_UINT dfree,dsize,bsize; + + *recycle_bin = '\0'; + if (conn->vfs_private) + fstrcpy(recycle_bin, (const char *)conn->vfs_private); + + if(!*recycle_bin) { + DEBUG(3, ("recycle bin: share parameter not set, purging %s...\n", fname)); + return default_vfs_ops.unlink(conn,fname); + } + + if(recycle_get_file_size(conn, fname) == 0) { + DEBUG(3, ("recycle bin: file %s is empty, purging...\n", fname)); + return default_vfs_ops.unlink(conn,fname); + } + + base = strrchr(fname, '/') + 1; + if(base == (char*)1) + ext = strrchr(fname, '.'); + else + ext = strrchr(base, '.'); + + pstrcpy(bin, recycle_bin); + pstrcat(bin, "/"); + pstrcat(bin, base); + + if(strcmp(fname,bin) == 0) { + DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname)); + return default_vfs_ops.unlink(conn,fname); + } + + len = strlen(bin); + addlen = sizeof(pstring)-len-1; + while(recycle_file_exist(conn,bin)) { + slprintf(bin+len, addlen, " (Copy #%d)", i++); + pstrcat(bin, ext); + } + + DEBUG(3, ("recycle bin: moving source=%s to dest=%s\n", fname, bin)); + default_vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); + if((unsigned int)dfree > 0) { + if(!recycle_directory_exist(conn,recycle_bin)) { + DEBUG(3, ("recycle bin: directory %s nonexistant, creating...\n", recycle_bin)); + default_vfs_ops.mkdir(conn,recycle_bin,dir_mask); + } + DEBUG(3, ("recycle bin: move successful\n")); + return default_vfs_ops.rename(conn, fname, bin); + } else { + DEBUG(3, ("recycle bin: move failed, purging...\n")); + return default_vfs_ops.unlink(conn,fname); + } +} -- cgit From a2313ba7056100857d6ef5162a0c53846fffb985 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 01:20:03 +0000 Subject: Got the recycle bin working ! Jeremy. --- examples/VFS/recycle.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c index 9a4e8b860ed..9a63b1760e5 100644 --- a/examples/VFS/recycle.c +++ b/examples/VFS/recycle.c @@ -131,29 +131,40 @@ struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) *vfs_version = SMB_VFS_INTERFACE_VERSION; memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); tmp_ops.unlink = recycle_unlink; + tmp_ops.connect = recycle_connect; + tmp_ops.disconnect = recycle_disconnect; memcpy(&recycle_ops, &tmp_ops, sizeof(struct vfs_ops)); return &recycle_ops; } static int recycle_connect(struct connection_struct *conn, char *service, char *user) { - extern char *vfs_options(int); pstring opts_str; fstring recycle_bin; char *p; - pstrcpy(opts_str, (const char *)vfs_options(SNUM(conn))); - if (!*opts_str) + DEBUG(3,("recycle_connect: called for service %s as user %s\n", service, user)); + + pstrcpy(opts_str, (const char *)lp_vfs_options(SNUM(conn))); + if (!*opts_str) { + DEBUG(3,("recycle_connect: No options listed (%s).\n", lp_vfs_options(SNUM(conn)) )); return 0; /* No options. */ + } p = opts_str; if (next_token(&p,recycle_bin,"=",sizeof(recycle_bin))) { - if (!strequal("recycle", recycle_bin)) + if (!strequal("recycle", recycle_bin)) { + DEBUG(3,("recycle_connect: option %s is not recycle\n", recycle_bin )); return -1; + } } - if (!next_token(&p,recycle_bin,"=",sizeof(recycle_bin))) + if (!next_token(&p,recycle_bin," \n",sizeof(recycle_bin))) { + DEBUG(3,("recycle_connect: no option after recycle=\n")); return -1; + } + + DEBUG(10,("recycle_connect: recycle name is %s\n", recycle_bin )); conn->vfs_private = (void *)strdup(recycle_bin); return 0; @@ -201,9 +212,10 @@ static SMB_OFF_T recycle_get_file_size(connection_struct *conn, const char *fnam Check if file should be recycled *********************************************************************/ -static int recycle_unlink(connection_struct *conn, const char *fname) +static int recycle_unlink(connection_struct *conn, const char *inname) { fstring recycle_bin; + pstring fname; char *base, *ext; pstring bin; int i=1, len, addlen; @@ -211,6 +223,8 @@ static int recycle_unlink(connection_struct *conn, const char *fname) SMB_BIG_UINT dfree,dsize,bsize; *recycle_bin = '\0'; + pstrcpy(fname, inname); + if (conn->vfs_private) fstrcpy(recycle_bin, (const char *)conn->vfs_private); @@ -249,12 +263,20 @@ static int recycle_unlink(connection_struct *conn, const char *fname) DEBUG(3, ("recycle bin: moving source=%s to dest=%s\n", fname, bin)); default_vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); if((unsigned int)dfree > 0) { + int ret; if(!recycle_directory_exist(conn,recycle_bin)) { DEBUG(3, ("recycle bin: directory %s nonexistant, creating...\n", recycle_bin)); - default_vfs_ops.mkdir(conn,recycle_bin,dir_mask); + if (default_vfs_ops.mkdir(conn,recycle_bin,dir_mask) == -1) { + DEBUG(3, ("recycle bin: unable to create directory %s. Error was %s\n", + recycle_bin, strerror(errno) )); + } } - DEBUG(3, ("recycle bin: move successful\n")); - return default_vfs_ops.rename(conn, fname, bin); + DEBUG(3, ("recycle bin: move %s -> %s\n", fname, bin)); + + ret = default_vfs_ops.rename(conn, fname, bin); + if (ret == -1) + DEBUG(3, ("recycle bin: move error %d (%s)\n", errno, strerror(errno) )); + return ret; } else { DEBUG(3, ("recycle bin: move failed, purging...\n")); return default_vfs_ops.unlink(conn,fname); -- cgit From a562ce2eb58f146940bc20586cf0ded74378f0cd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 01:29:09 +0000 Subject: Get the recycle VFS module working. No real changes here, just stuff I needed to do to get it to debug. Jeremy. --- source/include/proto.h | 2 +- source/include/smb.h | 1 + source/param/loadparm.c | 4 +- source/smbd/reply.c | 165 ++++++++++++++++++++++++------------------------ source/smbd/service.c | 1 + 5 files changed, 89 insertions(+), 84 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 41949c4d78c..07fc188c4d2 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1963,7 +1963,7 @@ char *lp_writelist(int ); char *lp_printer_admin(int ); char *lp_fstype(int ); char *lp_vfsobj(int ); -char *lp_vfoptions(int ); +char *lp_vfs_options(int ); char *lp_mangled_map(int ); char *lp_veto_files(int ); char *lp_hide_files(int ); diff --git a/source/include/smb.h b/source/include/smb.h index 28e58970014..d225a67b9ec 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -460,6 +460,7 @@ typedef struct connection_struct struct vfs_ops vfs_ops; /* Filesystem operations */ /* Handle on dlopen() call */ void *dl_handle; + void *vfs_private; char *user; /* name of user who *opened* this connection */ uid_t uid; /* uid of user who *opened* this connection */ diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 0bc8c133e34..0423c91c31a 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1055,7 +1055,7 @@ static struct parm_struct parm_table[] = { {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, NULL, 0}, - {"VFS options", P_SEP, P_SEPARATOR}, + {"VFS module options", P_SEP, P_SEPARATOR}, {"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, @@ -1680,7 +1680,7 @@ FN_LOCAL_STRING(lp_writelist, writelist) FN_LOCAL_STRING(lp_printer_admin, printer_admin) FN_LOCAL_STRING(lp_fstype, fstype) FN_LOCAL_STRING(lp_vfsobj, szVfsObjectFile) -FN_LOCAL_STRING(lp_vfoptions, szVfsOptions) +FN_LOCAL_STRING(lp_vfs_options, szVfsOptions) static FN_LOCAL_STRING(lp_volume, volume) FN_LOCAL_STRING(lp_mangled_map, szMangledMap) FN_LOCAL_STRING(lp_veto_files, szVetoFiles) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 6d35b3fdfec..fddbd3176ad 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1943,93 +1943,94 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype) NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) { - pstring directory; - pstring mask; - char *p; - int count=0; + pstring directory; + pstring mask; + char *p; + int count=0; NTSTATUS error = NT_STATUS_OK; - BOOL has_wild; - BOOL exists=False; - BOOL bad_path = False; - BOOL rc = True; - SMB_STRUCT_STAT sbuf; + BOOL has_wild; + BOOL exists=False; + BOOL bad_path = False; + BOOL rc = True; + SMB_STRUCT_STAT sbuf; - *directory = *mask = 0; + *directory = *mask = 0; - rc = unix_convert(name,conn,0,&bad_path,&sbuf); + rc = unix_convert(name,conn,0,&bad_path,&sbuf); - p = strrchr(name,'/'); - if (!p) { - pstrcpy(directory,"./"); - pstrcpy(mask,name); - } else { - *p = 0; - pstrcpy(directory,name); - pstrcpy(mask,p+1); - } + p = strrchr(name,'/'); + if (!p) { + pstrcpy(directory,"."); + pstrcpy(mask,name); + } else { + *p = 0; + pstrcpy(directory,name); + pstrcpy(mask,p+1); + } - /* - * We should only check the mangled cache - * here if unix_convert failed. This means - * that the path in 'mask' doesn't exist - * on the file system and so we need to look - * for a possible mangle. This patch from - * Tine Smukavec . - */ + /* + * We should only check the mangled cache + * here if unix_convert failed. This means + * that the path in 'mask' doesn't exist + * on the file system and so we need to look + * for a possible mangle. This patch from + * Tine Smukavec . + */ - if (!rc && is_mangled(mask)) - check_mangled_cache( mask ); + if (!rc && is_mangled(mask)) + check_mangled_cache( mask ); - has_wild = ms_has_wild(mask); + has_wild = ms_has_wild(mask); - if (!has_wild) { - pstrcat(directory,"/"); - pstrcat(directory,mask); + if (!has_wild) { + pstrcat(directory,"/"); + pstrcat(directory,mask); error = can_delete(directory,conn,dirtype); - if (!NT_STATUS_IS_OK(error)) return error; - - if (vfs_unlink(conn,directory) == 0) { - count++; - } - if (!count) - exists = vfs_file_exist(conn,directory,&sbuf); - } else { - void *dirptr = NULL; - char *dname; + if (!NT_STATUS_IS_OK(error)) + return error; - if (check_name(directory,conn)) - dirptr = OpenDir(conn, directory, True); + if (vfs_unlink(conn,directory) == 0) + count++; + if (!count) + exists = vfs_file_exist(conn,directory,&sbuf); + } else { + void *dirptr = NULL; + char *dname; + if (check_name(directory,conn)) + dirptr = OpenDir(conn, directory, True); - /* XXXX the CIFS spec says that if bit0 of the flags2 field is set then - the pattern matches against the long name, otherwise the short name - We don't implement this yet XXXX - */ + /* XXXX the CIFS spec says that if bit0 of the flags2 field is set then + the pattern matches against the long name, otherwise the short name + We don't implement this yet XXXX + */ if (dirptr) { error = NT_STATUS_OBJECT_NAME_NOT_FOUND; - if (strequal(mask,"????????.???")) - pstrcpy(mask,"*"); + if (strequal(mask,"????????.???")) + pstrcpy(mask,"*"); while ((dname = ReadDirName(dirptr))) { - pstring fname; - pstrcpy(fname,dname); + pstring fname; + pstrcpy(fname,dname); - if(!mask_match(fname, mask, case_sensitive)) continue; + if(!mask_match(fname, mask, case_sensitive)) + continue; - slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname); + slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname); error = can_delete(fname,conn,dirtype); - if (!NT_STATUS_IS_OK(error)) continue; - if (vfs_unlink(conn,fname) == 0) count++; - DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname)); - } - CloseDir(dirptr); - } - } + if (!NT_STATUS_IS_OK(error)) + continue; + if (vfs_unlink(conn,fname) == 0) + count++; + DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname)); + } + CloseDir(dirptr); + } + } - if (count == 0 && NT_STATUS_IS_OK(error)) { + if (count == 0 && NT_STATUS_IS_OK(error)) error = map_nt_error_from_unix(errno); - } return error; } @@ -2040,33 +2041,35 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { - int outsize = 0; - pstring name; - int dirtype; + int outsize = 0; + pstring name; + int dirtype; NTSTATUS status; - START_PROFILE(SMBunlink); - dirtype = SVAL(inbuf,smb_vwv0); + START_PROFILE(SMBunlink); - pstrcpy(name,smb_buf(inbuf) + 1); + dirtype = SVAL(inbuf,smb_vwv0); - RESOLVE_DFSPATH(name, conn, inbuf, outbuf); + pstrcpy(name,smb_buf(inbuf) + 1); + + RESOLVE_DFSPATH(name, conn, inbuf, outbuf); - DEBUG(3,("reply_unlink : %s\n",name)); + DEBUG(3,("reply_unlink : %s\n",name)); status = unlink_internals(conn, dirtype, name); - if (!NT_STATUS_IS_OK(status)) return ERROR_NT(status); + if (!NT_STATUS_IS_OK(status)) + return ERROR_NT(status); - /* - * Win2k needs a changenotify request response before it will - * update after a rename.. - */ + /* + * Win2k needs a changenotify request response before it will + * update after a rename.. + */ - process_pending_change_notify_queue((time_t)0); + process_pending_change_notify_queue((time_t)0); - outsize = set_message(outbuf,0,0,True); + outsize = set_message(outbuf,0,0,True); - END_PROFILE(SMBunlink); + END_PROFILE(SMBunlink); return outsize; } diff --git a/source/smbd/service.c b/source/smbd/service.c index 4fadce0aa9a..3c66f5c3be3 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -633,6 +633,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int /* Invoke VFS make connection hook */ if (conn->vfs_ops.connect) { + DEBUG(10,("calling vfs_ops.connect for service %s (options = %s)\n", service, lp_vfs_options(SNUM(conn)) )); if (conn->vfs_ops.connect(conn, service, user) < 0) return NULL; } -- cgit From 57cfd4f2410f77cb22e586b9b7ebd95d626f500d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 01:55:46 +0000 Subject: Enable test for -rdynamic when building binaries. Jeremy. --- source/configure.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/configure.in b/source/configure.in index 7ad049869b9..8ddabe95943 100644 --- a/source/configure.in +++ b/source/configure.in @@ -369,6 +369,23 @@ exit(1); esac +AC_CACHE_CHECK([for dynamic executables],samba_cv_dynamic_executables,[ + + _ldflags=${LDFLAGS} + LDFLAGS="-rdynamic $LDFLAGS" + + AC_TRY_RUN([ +#include +main () { +exit(0); +}], samba_cv_dynamic_executables=yes,samba_cv_dynamic_executables=no,samba_cv_dynamic_executables=cross)]) +if test x"$samba_cv_dynamic_executables" = x"yes"; then + LDFLAGS="-rdynamic $_ldflags" +else + LDFLAGS="$_ldflags" +fi + + AC_INLINE AC_HEADER_STDC AC_HEADER_DIRENT -- cgit From 36c1112fd35fd313376d863a0a32d49577ff44b8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 01:56:42 +0000 Subject: Enable test for building binaries with -rdynamic for VFS. Jeremy. --- source/configure | 1486 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 765 insertions(+), 721 deletions(-) diff --git a/source/configure b/source/configure index 87da3c49551..0735e64e771 100755 --- a/source/configure +++ b/source/configure @@ -1586,22 +1586,66 @@ fi esac +echo $ac_n "checking for dynamic executables""... $ac_c" 1>&6 +echo "configure:1591: checking for dynamic executables" >&5 +if eval "test \"`echo '$''{'samba_cv_dynamic_executables'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + _ldflags=${LDFLAGS} + LDFLAGS="-rdynamic $LDFLAGS" + + if test "$cross_compiling" = yes; then + samba_cv_dynamic_executables=cross +else + cat > conftest.$ac_ext < +main () { +exit(0); +} +EOF +if { (eval echo configure:1612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_dynamic_executables=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_dynamic_executables=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_dynamic_executables" 1>&6 +if test x"$samba_cv_dynamic_executables" = x"yes"; then + LDFLAGS="-rdynamic $_ldflags" +else + LDFLAGS="$_ldflags" +fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1591: checking for inline" >&5 +echo "configure:1635: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1627,7 +1671,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1631: checking how to run the C preprocessor" >&5 +echo "configure:1675: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1642,13 +1686,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1696: \"$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 : @@ -1659,13 +1703,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1713: \"$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 : @@ -1676,13 +1720,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1730: \"$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 : @@ -1707,12 +1751,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1711: checking for ANSI C header files" >&5 +echo "configure:1755: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1720,7 +1764,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1768: \"$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* @@ -1737,7 +1781,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 @@ -1755,7 +1799,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 @@ -1776,7 +1820,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1787,7 +1831,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1815,12 +1859,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:1819: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1863: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1828,7 +1872,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1853,7 +1897,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:1857: checking for opendir in -ldir" >&5 +echo "configure:1901: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1861,7 +1905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1920: \"$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 @@ -1894,7 +1938,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1898: checking for opendir in -lx" >&5 +echo "configure:1942: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1902,7 +1946,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1961: \"$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 @@ -1936,12 +1980,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1940: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1984: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1950,7 +1994,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1971,12 +2015,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1975: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2019: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1992,7 +2036,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2016,17 +2060,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:2020: checking for $ac_hdr" >&5 +echo "configure:2064: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2074: \"$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* @@ -2056,17 +2100,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2060: checking for $ac_hdr" >&5 +echo "configure:2104: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2114: \"$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* @@ -2096,17 +2140,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2100: checking for $ac_hdr" >&5 +echo "configure:2144: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2154: \"$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* @@ -2136,17 +2180,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2140: checking for $ac_hdr" >&5 +echo "configure:2184: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2194: \"$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* @@ -2176,17 +2220,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2180: checking for $ac_hdr" >&5 +echo "configure:2224: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2234: \"$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* @@ -2216,17 +2260,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2220: checking for $ac_hdr" >&5 +echo "configure:2264: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2274: \"$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* @@ -2256,17 +2300,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2260: checking for $ac_hdr" >&5 +echo "configure:2304: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2314: \"$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* @@ -2296,17 +2340,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2300: checking for $ac_hdr" >&5 +echo "configure:2344: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2354: \"$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* @@ -2340,14 +2384,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2369,17 +2413,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2373: checking for $ac_hdr" >&5 +echo "configure:2417: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2427: \"$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* @@ -2409,17 +2453,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2413: checking for $ac_hdr" >&5 +echo "configure:2457: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2467: \"$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* @@ -2449,17 +2493,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2453: checking for $ac_hdr" >&5 +echo "configure:2497: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2507: \"$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* @@ -2489,17 +2533,17 @@ for ac_hdr in 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:2493: checking for $ac_hdr" >&5 +echo "configure:2537: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2547: \"$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* @@ -2529,17 +2573,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:2533: checking for $ac_hdr" >&5 +echo "configure:2577: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2587: \"$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* @@ -2571,17 +2615,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2575: checking for $ac_hdr" >&5 +echo "configure:2619: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2629: \"$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* @@ -2613,17 +2657,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2617: checking for $ac_hdr" >&5 +echo "configure:2661: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2671: \"$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* @@ -2655,17 +2699,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2659: checking for $ac_hdr" >&5 +echo "configure:2703: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2713: \"$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* @@ -2693,7 +2737,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2697: checking size of int" >&5 +echo "configure:2741: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2701,18 +2745,18 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF -if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2760: \"$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 @@ -2732,7 +2776,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2736: checking size of long" >&5 +echo "configure:2780: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2740,18 +2784,18 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF -if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2799: \"$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 @@ -2771,7 +2815,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2775: checking size of short" >&5 +echo "configure:2819: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2779,18 +2823,18 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF -if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2838: \"$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 @@ -2811,12 +2855,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2815: checking for working const" >&5 +echo "configure:2859: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2886,21 +2930,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2890: checking for inline" >&5 +echo "configure:2934: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2926,14 +2970,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2930: checking whether byte ordering is bigendian" >&5 +echo "configure:2974: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2944,11 +2988,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2992: \"$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 < #include @@ -2959,7 +3003,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2979,7 +3023,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3040: \"$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 @@ -3016,14 +3060,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3020: checking whether char is unsigned" >&5 +echo "configure:3064: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3103: \"$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 @@ -3080,12 +3124,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3084: checking return type of signal handlers" >&5 +echo "configure:3128: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3102,7 +3146,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3121,12 +3165,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3125: checking for uid_t in sys/types.h" >&5 +echo "configure:3169: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3155,12 +3199,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3159: checking for mode_t" >&5 +echo "configure:3203: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3188,12 +3232,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3192: checking for off_t" >&5 +echo "configure:3236: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3221,12 +3265,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3225: checking for size_t" >&5 +echo "configure:3269: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3254,12 +3298,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3258: checking for pid_t" >&5 +echo "configure:3302: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3287,12 +3331,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3291: checking for st_rdev in struct stat" >&5 +echo "configure:3335: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3300,7 +3344,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3321,12 +3365,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3325: checking for d_off in dirent" >&5 +echo "configure:3369: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3336,7 +3380,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3357,12 +3401,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3361: checking for ino_t" >&5 +echo "configure:3405: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3390,12 +3434,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3394: checking for loff_t" >&5 +echo "configure:3438: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3423,12 +3467,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3427: checking for offset_t" >&5 +echo "configure:3471: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3456,12 +3500,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3460: checking for ssize_t" >&5 +echo "configure:3504: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3489,12 +3533,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3493: checking for wchar_t" >&5 +echo "configure:3537: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3526,7 +3570,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3530: checking for httpConnect in -lcups" >&5 +echo "configure:3574: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3534,7 +3578,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3593: \"$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 @@ -3580,17 +3624,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3584: checking for $ac_hdr" >&5 +echo "configure:3628: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3638: \"$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* @@ -3629,7 +3673,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3633: checking for dlopen in -ldl" >&5 +echo "configure:3677: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3637,7 +3681,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3696: \"$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 @@ -3676,13 +3720,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3680: checking for immediate structures" >&5 +echo "configure:3724: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3700,7 +3744,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3723,13 +3767,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3727: checking for unix domain sockets" >&5 +echo "configure:3771: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3744,7 +3788,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3765,13 +3809,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3769: checking for socklen_t type" >&5 +echo "configure:3813: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3784,7 +3828,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3805,13 +3849,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3809: checking for sig_atomic_t type" >&5 +echo "configure:3853: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3824,7 +3868,7 @@ 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 +if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3847,20 +3891,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3851: checking for errno declaration" >&5 +echo "configure:3895: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3882,20 +3926,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3886: checking for setresuid declaration" >&5 +echo "configure:3930: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3917,20 +3961,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3921: checking for setresgid declaration" >&5 +echo "configure:3965: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3952,20 +3996,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3956: checking for asprintf declaration" >&5 +echo "configure:4000: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3987,20 +4031,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:3991: checking for vasprintf declaration" >&5 +echo "configure:4035: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4022,20 +4066,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4026: checking for vsnprintf declaration" >&5 +echo "configure:4070: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4057,20 +4101,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4061: checking for snprintf declaration" >&5 +echo "configure:4105: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4094,7 +4138,7 @@ EOF # 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:4098: checking for real setresuid" >&5 +echo "configure:4142: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4103,12 +4147,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4156: \"$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 @@ -4133,7 +4177,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4137: checking for real setresgid" >&5 +echo "configure:4181: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4142,13 +4186,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4196: \"$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 @@ -4171,7 +4215,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4175: checking for 8-bit clean memcmp" >&5 +echo "configure:4219: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4179,7 +4223,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4237: \"$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 @@ -4213,7 +4257,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4217: checking whether to use readline" >&5 +echo "configure:4261: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4225,17 +4269,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4229: checking for $ac_hdr" >&5 +echo "configure:4273: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4283: \"$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* @@ -4265,17 +4309,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4269: checking for $ac_hdr" >&5 +echo "configure:4313: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4323: \"$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* @@ -4306,17 +4350,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4310: checking for $ac_hdr" >&5 +echo "configure:4354: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4364: \"$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* @@ -4339,7 +4383,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4343: checking for tgetent in -l${termlib}" >&5 +echo "configure:4387: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4347,7 +4391,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4406: \"$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 @@ -4380,7 +4424,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4384: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4428: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4388,7 +4432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4447: \"$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 @@ -4450,17 +4494,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4454: checking for $ac_hdr" >&5 +echo "configure:4498: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4508: \"$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* @@ -4490,17 +4534,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4494: checking for $ac_hdr" >&5 +echo "configure:4538: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4548: \"$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* @@ -4531,17 +4575,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4535: checking for $ac_hdr" >&5 +echo "configure:4579: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4589: \"$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* @@ -4564,7 +4608,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4568: checking for tgetent in -l${termlib}" >&5 +echo "configure:4612: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4572,7 +4616,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4631: \"$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 @@ -4605,7 +4649,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4609: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4653: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4613,7 +4657,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4672: \"$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 @@ -4679,12 +4723,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_func" >&5 +echo "configure:4727: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4755: \"$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 @@ -4735,7 +4779,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:4739: checking for printf in -lnsl_s" >&5 +echo "configure:4783: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4743,7 +4787,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4802: \"$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 @@ -4785,7 +4829,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4789: checking for printf in -lnsl" >&5 +echo "configure:4833: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4793,7 +4837,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4852: \"$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 @@ -4835,7 +4879,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4839: checking for connect in -lsocket" >&5 +echo "configure:4883: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4843,7 +4887,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4902: \"$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 @@ -4885,7 +4929,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4889: checking for connect in -linet" >&5 +echo "configure:4933: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4893,7 +4937,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4952: \"$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 @@ -4948,12 +4992,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4952: checking for $ac_func" >&5 +echo "configure:4996: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5024: \"$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 @@ -5002,7 +5046,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5006: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5050: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5010,7 +5054,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5069: \"$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 @@ -5051,12 +5095,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5055: checking for $ac_func" >&5 +echo "configure:5099: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5127: \"$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 @@ -5112,12 +5156,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5116: checking for $ac_func" >&5 +echo "configure:5160: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5188: \"$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 @@ -5167,12 +5211,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5171: checking for $ac_func" >&5 +echo "configure:5215: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5243: \"$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 @@ -5222,12 +5266,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5226: checking for $ac_func" >&5 +echo "configure:5270: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5298: \"$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 @@ -5277,12 +5321,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5281: checking for $ac_func" >&5 +echo "configure:5325: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5353: \"$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 @@ -5332,12 +5376,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5336: checking for $ac_func" >&5 +echo "configure:5380: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5408: \"$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 @@ -5387,12 +5431,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5391: checking for $ac_func" >&5 +echo "configure:5435: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5463: \"$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 @@ -5442,12 +5486,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5446: checking for $ac_func" >&5 +echo "configure:5490: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5518: \"$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 @@ -5497,12 +5541,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5501: checking for $ac_func" >&5 +echo "configure:5545: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5573: \"$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 @@ -5552,12 +5596,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5556: checking for $ac_func" >&5 +echo "configure:5600: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5628: \"$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 @@ -5607,12 +5651,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5611: checking for $ac_func" >&5 +echo "configure:5655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5683: \"$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 @@ -5664,12 +5708,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5668: checking for $ac_func" >&5 +echo "configure:5712: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5740: \"$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 @@ -5720,12 +5764,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:5724: checking for $ac_func" >&5 +echo "configure:5768: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5796: \"$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 @@ -5775,12 +5819,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:5779: checking for $ac_func" >&5 +echo "configure:5823: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5851: \"$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 @@ -5830,12 +5874,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5834: checking for $ac_func" >&5 +echo "configure:5878: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5906: \"$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 @@ -5885,12 +5929,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5889: checking for $ac_func" >&5 +echo "configure:5933: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5961: \"$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 @@ -5940,12 +5984,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:5944: checking for $ac_func" >&5 +echo "configure:5988: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6016: \"$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 @@ -5995,12 +6039,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:5999: checking for $ac_func" >&5 +echo "configure:6043: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6071: \"$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 @@ -6050,12 +6094,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:6054: checking for $ac_func" >&5 +echo "configure:6098: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6126: \"$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 @@ -6105,12 +6149,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:6109: checking for $ac_func" >&5 +echo "configure:6153: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6181: \"$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 @@ -6160,12 +6204,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6164: checking for $ac_func" >&5 +echo "configure:6208: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6236: \"$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 @@ -6215,12 +6259,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:6219: checking for $ac_func" >&5 +echo "configure:6263: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6291: \"$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 @@ -6270,12 +6314,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:6274: checking for $ac_func" >&5 +echo "configure:6318: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6346: \"$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 @@ -6325,12 +6369,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:6329: checking for $ac_func" >&5 +echo "configure:6373: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6401: \"$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 @@ -6380,12 +6424,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:6384: checking for $ac_func" >&5 +echo "configure:6428: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6456: \"$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 @@ -6435,12 +6479,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6439: checking for $ac_func" >&5 +echo "configure:6483: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6511: \"$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 @@ -6494,9 +6538,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6498: checking for stat64 in " >&5 +echo "configure:6542: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6527,9 +6571,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6531: checking for lstat64 in " >&5 +echo "configure:6575: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6560,9 +6604,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6564: checking for fstat64 in " >&5 +echo "configure:6608: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6599,7 +6643,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6603: checking for strcasecmp in -lresolv" >&5 +echo "configure:6647: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6607,7 +6651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6666: \"$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 @@ -6654,12 +6698,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6658: checking for $ac_func" >&5 +echo "configure:6702: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6730: \"$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 @@ -6707,7 +6751,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6711: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6755: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6715,7 +6759,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6774: \"$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 @@ -6756,12 +6800,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6760: checking for $ac_func" >&5 +echo "configure:6804: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6832: \"$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 @@ -6815,12 +6859,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6819: checking for $ac_func" >&5 +echo "configure:6863: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6891: \"$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 @@ -6868,7 +6912,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6872: checking for putprpwnam in -lsec" >&5 +echo "configure:6916: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6876,7 +6920,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6935: \"$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 @@ -6917,12 +6961,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6921: checking for $ac_func" >&5 +echo "configure:6965: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6993: \"$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 @@ -6977,12 +7021,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:6981: checking for $ac_func" >&5 +echo "configure:7025: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7053: \"$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 @@ -7030,7 +7074,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7034: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7078: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7038,7 +7082,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7097: \"$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 @@ -7079,12 +7123,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7083: checking for $ac_func" >&5 +echo "configure:7127: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7155: \"$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 @@ -7138,12 +7182,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:7142: checking for $ac_func" >&5 +echo "configure:7186: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7214: \"$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 @@ -7191,7 +7235,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7195: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7239: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7199,7 +7243,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7258: \"$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 @@ -7240,12 +7284,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7244: checking for $ac_func" >&5 +echo "configure:7288: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7316: \"$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 @@ -7301,12 +7345,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7305: checking for $ac_func" >&5 +echo "configure:7349: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7377: \"$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 @@ -7354,7 +7398,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7358: checking for getspnam in -lgen" >&5 +echo "configure:7402: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7362,7 +7406,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7421: \"$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 @@ -7403,12 +7447,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7407: checking for $ac_func" >&5 +echo "configure:7451: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7479: \"$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 @@ -7463,12 +7507,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7467: checking for $ac_func" >&5 +echo "configure:7511: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7539: \"$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 @@ -7516,7 +7560,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7520: checking for getspnam in -lsecurity" >&5 +echo "configure:7564: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7524,7 +7568,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7583: \"$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 @@ -7565,12 +7609,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7569: checking for $ac_func" >&5 +echo "configure:7613: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7641: \"$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 @@ -7624,12 +7668,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7628: checking for $ac_func" >&5 +echo "configure:7672: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7700: \"$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 @@ -7677,7 +7721,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7681: checking for getspnam in -lsec" >&5 +echo "configure:7725: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7685,7 +7729,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&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_lib_$ac_lib_var=yes" else @@ -7726,12 +7770,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7730: checking for $ac_func" >&5 +echo "configure:7774: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7802: \"$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 @@ -7786,12 +7830,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7790: checking for $ac_func" >&5 +echo "configure:7834: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7862: \"$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 @@ -7839,7 +7883,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7843: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7887: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7847,7 +7891,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7906: \"$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 @@ -7888,12 +7932,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7892: checking for $ac_func" >&5 +echo "configure:7936: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7964: \"$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 @@ -7947,12 +7991,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7951: checking for $ac_func" >&5 +echo "configure:7995: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8023: \"$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 @@ -8000,7 +8044,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8004: checking for bigcrypt in -lsec" >&5 +echo "configure:8048: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8008,7 +8052,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8067: \"$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 @@ -8049,12 +8093,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8053: checking for $ac_func" >&5 +echo "configure:8097: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8125: \"$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 @@ -8109,12 +8153,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8113: checking for $ac_func" >&5 +echo "configure:8157: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8185: \"$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 @@ -8162,7 +8206,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8166: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8210: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8170,7 +8214,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8229: \"$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 @@ -8211,12 +8255,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8215: checking for $ac_func" >&5 +echo "configure:8259: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8287: \"$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 @@ -8270,12 +8314,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8274: checking for $ac_func" >&5 +echo "configure:8318: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8346: \"$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 @@ -8323,7 +8367,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8327: checking for getprpwnam in -lsec" >&5 +echo "configure:8371: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8331,7 +8375,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8390: \"$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 @@ -8372,12 +8416,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8376: checking for $ac_func" >&5 +echo "configure:8420: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8448: \"$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 @@ -8443,7 +8487,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8447: checking ability to build shared libraries" >&5 +echo "configure:8491: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8579,7 +8623,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:8583: checking for $ac_word" >&5 +echo "configure:8627: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8633,15 +8677,15 @@ EOF esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8637: checking linker flags for shared libraries" >&5 +echo "configure:8681: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8640: checking compiler flags for position-independent code" >&5 +echo "configure:8684: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8645: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8689: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8661,7 +8705,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:8665: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8709: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8682,7 +8726,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:8686: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8730: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8705,7 +8749,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8709: checking for long long" >&5 +echo "configure:8753: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8714,12 +8758,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8767: \"$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 @@ -8746,20 +8790,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8750: checking for LL suffix on long long integers" >&5 +echo "configure:8794: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8781,7 +8825,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8785: checking for 64 bit off_t" >&5 +echo "configure:8829: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8790,13 +8834,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8844: \"$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 @@ -8819,7 +8863,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8823: checking for off64_t" >&5 +echo "configure:8867: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8828,7 +8872,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8886: \"$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 @@ -8861,7 +8905,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8865: checking for 64 bit ino_t" >&5 +echo "configure:8909: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8870,13 +8914,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8924: \"$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 @@ -8899,7 +8943,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8903: checking for ino64_t" >&5 +echo "configure:8947: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8908,7 +8952,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8966: \"$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 @@ -8941,7 +8985,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8945: checking for dev64_t" >&5 +echo "configure:8989: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8950,7 +8994,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8983,13 +9027,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8987: checking for struct dirent64" >&5 +echo "configure:9031: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9022,7 +9066,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9026: checking for major macro" >&5 +echo "configure:9070: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9031,7 +9075,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9063,7 +9107,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9067: checking for minor macro" >&5 +echo "configure:9111: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9072,7 +9116,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } 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:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9104,7 +9148,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9108: checking for makedev macro" >&5 +echo "configure:9152: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9113,7 +9157,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } 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:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9145,7 +9189,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9149: checking for unsigned char" >&5 +echo "configure:9193: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9154,12 +9198,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } 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:9207: \"$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 @@ -9182,13 +9226,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9186: checking for sin_len in sock" >&5 +echo "configure:9230: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9197,7 +9241,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9218,13 +9262,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9222: checking whether seekdir returns void" >&5 +echo "configure:9266: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9233,7 +9277,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9254,20 +9298,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9258: checking for __FILE__ macro" >&5 +echo "configure:9302: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9288,20 +9332,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9292: checking for __FUNCTION__ macro" >&5 +echo "configure:9336: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9322,7 +9366,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9326: checking if gettimeofday takes tz argument" >&5 +echo "configure:9370: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9331,14 +9375,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9386: \"$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 @@ -9361,7 +9405,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9365: checking for C99 vsnprintf" >&5 +echo "configure:9409: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9370,7 +9414,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9397,7 +9441,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9420,7 +9464,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9424: checking for broken readdir" >&5 +echo "configure:9468: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9429,7 +9473,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9437,7 +9481,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:9441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9485: \"$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 @@ -9460,13 +9504,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9464: checking for utimbuf" >&5 +echo "configure:9508: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9474,7 +9518,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9498,12 +9542,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9502: checking for $ac_func" >&5 +echo "configure:9546: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9574: \"$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 @@ -9552,13 +9596,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9556: checking for ut_name in utmp" >&5 +echo "configure:9600: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9566,7 +9610,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9587,13 +9631,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9591: checking for ut_user in utmp" >&5 +echo "configure:9635: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9601,7 +9645,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9622,13 +9666,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9626: checking for ut_id in utmp" >&5 +echo "configure:9670: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9636,7 +9680,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9657,13 +9701,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9661: checking for ut_host in utmp" >&5 +echo "configure:9705: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9671,7 +9715,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9692,13 +9736,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9696: checking for ut_time in utmp" >&5 +echo "configure:9740: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9706,7 +9750,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9727,13 +9771,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9731: checking for ut_tv in utmp" >&5 +echo "configure:9775: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9741,7 +9785,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9762,13 +9806,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9766: checking for ut_type in utmp" >&5 +echo "configure:9810: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9776,7 +9820,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9797,13 +9841,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9801: checking for ut_pid in utmp" >&5 +echo "configure:9845: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9811,7 +9855,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9832,13 +9876,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9836: checking for ut_exit in utmp" >&5 +echo "configure:9880: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9846,7 +9890,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9867,13 +9911,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9871: checking for ut_addr in utmp" >&5 +echo "configure:9915: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9881,7 +9925,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9903,13 +9947,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9907: checking whether pututline returns pointer" >&5 +echo "configure:9951: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9917,7 +9961,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9939,13 +9983,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9943: checking for ut_syslen in utmpx" >&5 +echo "configure:9987: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9953,7 +9997,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9974,7 +10018,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9978: checking for Linux kernel oplocks" >&5 +echo "configure:10022: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9983,7 +10027,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -9997,7 +10041,7 @@ main() { } EOF -if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10020,7 +10064,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10024: checking for kernel change notify support" >&5 +echo "configure:10068: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10029,7 +10073,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10043,7 +10087,7 @@ main() { } EOF -if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10066,7 +10110,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10070: checking for kernel share modes" >&5 +echo "configure:10114: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10075,7 +10119,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10091,7 +10135,7 @@ main() { } EOF -if { (eval echo configure:10095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10117,13 +10161,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10121: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10165: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10131,7 +10175,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:10135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10152,7 +10196,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10156: checking for irix specific capabilities" >&5 +echo "configure:10200: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10161,7 +10205,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10176,7 +10220,7 @@ main() { } EOF -if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10224: \"$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 @@ -10204,13 +10248,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10208: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10252: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10220,7 +10264,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10241,13 +10285,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10245: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10289: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10257,7 +10301,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10278,13 +10322,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10282: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10326: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10294,7 +10338,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10315,13 +10359,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10319: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10363: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10331,7 +10375,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10353,13 +10397,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10357: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10401: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10373,7 +10417,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10394,16 +10438,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10398: checking for test routines" >&5 +echo "configure:10442: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10451: \"$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 @@ -10417,7 +10461,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10421: checking for ftruncate extend" >&5 +echo "configure:10465: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10426,11 +10470,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10478: \"$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 @@ -10453,7 +10497,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10457: checking for broken getgroups" >&5 +echo "configure:10501: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10462,11 +10506,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10514: \"$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 @@ -10489,7 +10533,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10493: checking whether getpass should be replaced" >&5 +echo "configure:10537: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10497,7 +10541,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10533,7 +10577,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10537: checking for broken inet_ntoa" >&5 +echo "configure:10581: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10542,7 +10586,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10556,7 +10600,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:10560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10604: \"$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 @@ -10579,7 +10623,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10583: checking for secure mkstemp" >&5 +echo "configure:10627: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10588,7 +10632,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10605,7 +10649,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10628,7 +10672,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10632: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10676: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10637,12 +10681,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10665,7 +10709,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10669: checking for root" >&5 +echo "configure:10713: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10674,11 +10718,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10726: \"$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 @@ -10706,7 +10750,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10710: checking for iface AIX" >&5 +echo "configure:10754: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10715,7 +10759,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10747,7 +10791,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10751: checking for iface ifconf" >&5 +echo "configure:10795: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10756,7 +10800,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10789,7 +10833,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10793: checking for iface ifreq" >&5 +echo "configure:10837: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10798,7 +10842,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10835,7 +10879,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10839: checking for setresuid" >&5 +echo "configure:10883: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10844,7 +10888,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10900: \"$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 @@ -10878,7 +10922,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10882: checking for setreuid" >&5 +echo "configure:10926: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10887,7 +10931,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10943: \"$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 @@ -10920,7 +10964,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10924: checking for seteuid" >&5 +echo "configure:10968: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10929,7 +10973,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10985: \"$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 @@ -10962,7 +11006,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10966: checking for setuidx" >&5 +echo "configure:11010: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10971,7 +11015,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11027: \"$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 @@ -11004,7 +11048,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11008: checking for working mmap" >&5 +echo "configure:11052: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11013,11 +11057,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11040,7 +11084,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11044: checking for ftruncate needs root" >&5 +echo "configure:11088: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11049,11 +11093,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11076,7 +11120,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11080: checking for fcntl locking" >&5 +echo "configure:11124: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11085,11 +11129,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11137: \"$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 @@ -11112,7 +11156,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11116: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11160: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11121,11 +11165,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11150,7 +11194,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11154: checking for 64 bit fcntl locking" >&5 +echo "configure:11198: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11159,7 +11203,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11231: \"$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 @@ -11208,13 +11252,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11212: checking for st_blocks in struct stat" >&5 +echo "configure:11256: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11223,7 +11267,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11246,13 +11290,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11250: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11294: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11289,13 +11333,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11293: checking for broken nisplus include files" >&5 +echo "configure:11337: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11305,7 +11349,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11329,7 +11373,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11333: checking whether to use smbwrapper" >&5 +echo "configure:11377: 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" @@ -11373,7 +11417,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11377: checking whether to use AFS" >&5 +echo "configure:11421: 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" @@ -11399,7 +11443,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11403: checking whether to use DCE/DFS auth" >&5 +echo "configure:11447: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11424,7 +11468,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11428: checking whether to use Kerberos IV" >&5 +echo "configure:11472: 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" @@ -11436,7 +11480,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11440: checking for dn_expand in -lresolv" >&5 +echo "configure:11484: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11444,7 +11488,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11503: \"$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 @@ -11499,7 +11543,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11503: checking whether to use Kerberos 5" >&5 +echo "configure:11547: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11527,7 +11571,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11531: checking whether to use AUTOMOUNT" >&5 +echo "configure:11575: 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" @@ -11552,7 +11596,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11556: checking whether to use SMBMOUNT" >&5 +echo "configure:11600: 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" @@ -11589,7 +11633,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11593: checking whether to use PAM password database" >&5 +echo "configure:11637: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11615,7 +11659,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11619: checking for pam_get_data in -lpam" >&5 +echo "configure:11663: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11623,7 +11667,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11682: \"$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 @@ -11661,7 +11705,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11665: checking whether to use pam_smbpass" >&5 +echo "configure:11709: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11703,12 +11747,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11707: checking for $ac_func" >&5 +echo "configure:11751: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11779: \"$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 @@ -11757,7 +11801,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:11761: checking for crypt in -lcrypt" >&5 +echo "configure:11805: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11765,7 +11809,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11824: \"$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 @@ -11811,7 +11855,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11815: checking for a crypt that needs truncated salt" >&5 +echo "configure:11859: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11820,11 +11864,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11862,7 +11906,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11866: checking whether to use TDB SAM database" >&5 +echo "configure:11910: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11888,7 +11932,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11892: checking whether to use LDAP SAM database" >&5 +echo "configure:11936: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11915,7 +11959,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11919: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11963: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11943,7 +11987,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11947: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11991: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11965,7 +12009,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11969: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12013: 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" @@ -11990,7 +12034,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:11994: checking whether to use SSL" >&5 +echo "configure:12038: 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" @@ -12064,7 +12108,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12068: checking whether to use syslog logging" >&5 +echo "configure:12112: 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" @@ -12089,7 +12133,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12093: checking whether to use profiling" >&5 +echo "configure:12137: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12117,7 +12161,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12121: checking whether to support disk-quotas" >&5 +echo "configure:12165: 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" @@ -12129,13 +12173,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12133: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12177: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12147,7 +12191,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12191,7 +12235,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12195: checking whether to support utmp accounting" >&5 +echo "configure:12239: 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" @@ -12217,7 +12261,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12221: checking whether to support Microsoft Dfs" >&5 +echo "configure:12265: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12243,7 +12287,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12247: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12291: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12272,7 +12316,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12276: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12320: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12299,14 +12343,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12303: checking how to get filesystem space usage" >&5 +echo "configure:12347: 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:12310: checking statvfs64 function (SVR4)" >&5 +echo "configure:12354: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12314,7 +12358,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12376: \"$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 @@ -12361,12 +12405,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12365: checking statvfs function (SVR4)" >&5 +echo "configure:12409: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12374,7 +12418,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12422: \"$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 @@ -12399,7 +12443,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:12403: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12447: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12407,7 +12451,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12420,7 +12464,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12468: \"$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 @@ -12447,7 +12491,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:12451: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12495: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12455,7 +12499,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12522: \"$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 @@ -12501,7 +12545,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:12505: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12549: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12509,7 +12553,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12519,7 +12563,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12567: \"$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 @@ -12546,7 +12590,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:12550: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12594: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12554,7 +12598,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12570,7 +12614,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12618: \"$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 @@ -12597,7 +12641,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:12601: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12645: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12605,7 +12649,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12625,7 +12669,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12673: \"$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 @@ -12658,9 +12702,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12662: checking if large file support can be enabled" >&5 +echo "configure:12706: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12740,7 +12784,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12744: checking whether to support ACLs" >&5 +echo "configure:12788: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12793,7 +12837,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12797: checking for acl_get_file in -lacl" >&5 +echo "configure:12841: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12801,7 +12845,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12860: \"$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 @@ -12840,13 +12884,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12844: checking for ACL support" >&5 +echo "configure:12888: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12854,7 +12898,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12874,13 +12918,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12878: checking for acl_get_perm_np" >&5 +echo "configure:12922: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12888,7 +12932,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12943,7 +12987,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12947: checking whether to build winbind" >&5 +echo "configure:12991: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13033,11 +13077,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else -- cgit From d59a2a23edad2f14b34c8086a544e2e4ea6938fa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 02:11:43 +0000 Subject: Ensure connect and dfree are const. Jeremy. --- source/include/proto.h | 6 +++--- source/include/vfs.h | 4 ++-- source/smbd/dfree.c | 2 +- source/smbd/vfs-wrap.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 07fc188c4d2..5b14aae192f 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4203,7 +4203,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO /*The following definitions come from smbd/dfree.c */ -SMB_BIG_UINT sys_disk_free(char *path, BOOL small_query, +SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); /*The following definitions come from smbd/dir.c */ @@ -4638,9 +4638,9 @@ BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); /*The following definitions come from smbd/vfs-wrap.c */ -int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user); +int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); void vfswrap_dummy_disconnect(connection_struct *conn); -SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize, +SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); DIR *vfswrap_opendir(connection_struct *conn, const char *fname); struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp); diff --git a/source/include/vfs.h b/source/include/vfs.h index 6ee62f5f4a0..bbbe2cb8b2d 100644 --- a/source/include/vfs.h +++ b/source/include/vfs.h @@ -53,9 +53,9 @@ struct vfs_ops { /* Disk operations */ - int (*connect)(struct connection_struct *conn, char *service, char *user); + int (*connect)(struct connection_struct *conn, const char *service, const char *user); void (*disconnect)(struct connection_struct *conn); - SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize, + SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); /* Directory operations */ diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c index df37a08903f..abc3637056d 100644 --- a/source/smbd/dfree.c +++ b/source/smbd/dfree.c @@ -158,7 +158,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query, /**************************************************************************** wrap it to get filenames right ****************************************************************************/ -SMB_BIG_UINT sys_disk_free(char *path, BOOL small_query, +SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize) { return(disk_free(dos_to_unix_static(path),small_query, bsize,dfree,dsize)); diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index b2e68c7f30a..da47fe69ec7 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -25,7 +25,7 @@ is sure to try and execute them. These stubs are used to prevent this possibility. */ -int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user) +int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user) { return 0; /* Return >= 0 for success */ } @@ -36,7 +36,7 @@ void vfswrap_dummy_disconnect(connection_struct *conn) /* Disk operations */ -SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize, +SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { SMB_BIG_UINT result; -- cgit From d9e3f061d28e2b2b9688c49d2119e7b3ded3ef55 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 02:14:43 +0000 Subject: Fixed const cleanness. Jeremy. --- examples/VFS/audit.c | 4 ++-- examples/VFS/block/block.c | 2 +- examples/VFS/recycle.c | 4 ++-- examples/VFS/skel.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index acc1e8c25dc..aad483c295a 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -47,7 +47,7 @@ /* Function prototypes */ -int audit_connect(struct connection_struct *conn, char *svc, char *user); +int audit_connect(struct connection_struct *conn, const char *svc, const char *user); void audit_disconnect(struct connection_struct *conn); DIR *audit_opendir(struct connection_struct *conn, const char *fname); int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode); @@ -174,7 +174,7 @@ struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) /* Implementation of vfs_ops. Pass everything on to the default operation but log event first. */ -int audit_connect(struct connection_struct *conn, char *svc, char *user) +int audit_connect(struct connection_struct *conn, const char *svc, const char *user) { syslog(SYSLOG_PRIORITY, "connect to service %s by user %s\n", svc, user); diff --git a/examples/VFS/block/block.c b/examples/VFS/block/block.c index fbf3a7cda91..f83ab6e07e0 100644 --- a/examples/VFS/block/block.c +++ b/examples/VFS/block/block.c @@ -48,7 +48,7 @@ DIR *block_opendir(struct connection_struct *conn, char *fname); -int block_connect(struct connection_struct *conn, char *service, char *user); +int block_connect(struct connection_struct *conn, const char *service, const char *user); void block_disconnect(struct connection_struct *conn); diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c index 9a63b1760e5..4e032bb8133 100644 --- a/examples/VFS/recycle.c +++ b/examples/VFS/recycle.c @@ -43,7 +43,7 @@ extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ static int recycle_unlink(connection_struct *, const char *); -static int recycle_connect(struct connection_struct *conn, char *service, char *user); +static int recycle_connect(struct connection_struct *conn, const char *service, const char *user); static void recycle_disconnect(struct connection_struct *conn); struct vfs_ops recycle_ops = { @@ -137,7 +137,7 @@ struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) return &recycle_ops; } -static int recycle_connect(struct connection_struct *conn, char *service, char *user) +static int recycle_connect(struct connection_struct *conn, const char *service, const char *user) { pstring opts_str; fstring recycle_bin; diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index 619cf187d82..bb5486e690b 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -41,7 +41,7 @@ extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ extern struct vfs_ops skel_ops; -static int skel_connect(struct connection_struct *conn, char *service, char *user) +static int skel_connect(struct connection_struct *conn, const char *service, const char *user) { return default_vfs_ops.connect(conn, service, user); } @@ -51,7 +51,7 @@ static void skel_disconnect(struct connection_struct *conn) default_vfs_ops.disconnect(conn); } -static SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path, +static SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { -- cgit From 51f942065d2929c08a2c65102dfaf3e349783a25 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 02:35:06 +0000 Subject: Merge in JohnR's page info fixes ! Great job ! Jeremy. --- source/include/printing.h | 1 + source/include/proto.h | 1 + source/include/smb.h | 1 + source/printing/printing.c | 35 +++++++++++++++++++++++++++++++---- source/rpc_server/srv_spoolss_nt.c | 35 +++++++++++++++++++++++++++++++---- 5 files changed, 65 insertions(+), 8 deletions(-) diff --git a/source/include/printing.h b/source/include/printing.h index bde2bfa6bdb..e87865f21bd 100644 --- a/source/include/printing.h +++ b/source/include/printing.h @@ -37,6 +37,7 @@ struct printjob { time_t starttime; /* when the job started spooling */ int status; /* the status of this job */ size_t size; /* the size of the job so far */ + int page_count; /* then number of pages so far */ BOOL spooled; /* has it been sent to the spooler yet? */ BOOL smbjob; /* set if the job is a SMB job */ fstring filename; /* the filename used to spool the file */ diff --git a/source/include/proto.h b/source/include/proto.h index 5b14aae192f..69bd50fa4bd 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2351,6 +2351,7 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode); int print_job_write(int jobid, const char *buf, int size); int print_queue_length(int snum, print_status_struct *pstatus); int print_job_start(struct current_user *user, int snum, char *jobname); +void print_job_endpage(int jobid); BOOL print_job_end(int jobid, BOOL normal_close); int print_queue_status(int snum, print_queue_struct **queue, diff --git a/source/include/smb.h b/source/include/smb.h index d225a67b9ec..7e9260ba99e 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -517,6 +517,7 @@ typedef struct _print_queue_struct { int job; int size; + int page_count; int status; int priority; time_t time; diff --git a/source/printing/printing.c b/source/printing/printing.c index c1681d0a120..78eacd9cf51 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -760,12 +760,21 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode) int print_job_write(int jobid, const char *buf, int size) { - int fd; + int return_code; + struct printjob *pjob = print_job_find(jobid); - fd = print_job_fd(jobid); - if (fd == -1) return -1; + if (!pjob) + return -1; + /* don't allow another process to get this info - it is meaningless */ + if (pjob->pid != local_pid) + return -1; - return write(fd, buf, size); + return_code = write(pjob->fd, buf, size); + if (return_code>0) { + pjob->size += size; + print_job_store(jobid, pjob); + } + return return_code; } /**************************************************************************** @@ -1012,6 +1021,23 @@ to open spool file %s.\n", pjob.filename)); return -1; } +/**************************************************************************** + Update the number of pages spooled to jobid +****************************************************************************/ + +void print_job_endpage(int jobid) +{ + struct printjob *pjob = print_job_find(jobid); + if (!pjob) + return; + /* don't allow another process to get this info - it is meaningless */ + if (pjob->pid != local_pid) + return; + + pjob->page_count++; + print_job_store(jobid, pjob); +} + /**************************************************************************** Print a file - called on closing the file. This spools the job. If normal close is false then we're tearing down the jobs - treat as an @@ -1106,6 +1132,7 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void * ts->queue[i].job = jobid; ts->queue[i].size = pjob.size; + ts->queue[i].page_count = pjob.page_count; ts->queue[i].status = pjob.status; ts->queue[i].priority = 1; ts->queue[i].time = pjob.starttime; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index ce07da2930c..31cbacd6393 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2153,6 +2153,32 @@ static void spoolss_notify_job_size(int snum, data->notify_data.value[1]=0; } +/******************************************************************* + * fill a notify_info_data with page info + ********************************************************************/ +static void spoolss_notify_total_pages(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx) +{ + data->notify_data.value[0]=queue->page_count; + data->notify_data.value[1]=0; +} + +/******************************************************************* + * fill a notify_info_data with pages printed info. + ********************************************************************/ +static void spoolss_notify_pages_printed(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx) +{ + data->notify_data.value[0]=0; /* Add code when back-end tracks this */ + data->notify_data.value[1]=0; +} + /******************************************************************* Fill a notify_info_data with job position. ********************************************************************/ @@ -2273,8 +2299,8 @@ struct s_notify_info_data_table notify_info_data_table[] = { JOB_NOTIFY_TYPE, JOB_NOTIFY_START_TIME, "JOB_NOTIFY_START_TIME", ONE_VALUE, spoolss_notify_start_time }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_UNTIL_TIME, "JOB_NOTIFY_UNTIL_TIME", ONE_VALUE, spoolss_notify_until_time }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_TIME, "JOB_NOTIFY_TIME", ONE_VALUE, spoolss_notify_job_time }, -{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_PAGES, "JOB_NOTIFY_TOTAL_PAGES", ONE_VALUE, NULL }, -{ JOB_NOTIFY_TYPE, JOB_NOTIFY_PAGES_PRINTED, "JOB_NOTIFY_PAGES_PRINTED", ONE_VALUE, NULL }, +{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_PAGES, "JOB_NOTIFY_TOTAL_PAGES", ONE_VALUE, spoolss_notify_total_pages }, +{ JOB_NOTIFY_TYPE, JOB_NOTIFY_PAGES_PRINTED, "JOB_NOTIFY_PAGES_PRINTED", ONE_VALUE, spoolss_notify_pages_printed }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_BYTES, "JOB_NOTIFY_TOTAL_BYTES", ONE_VALUE, spoolss_notify_job_size }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_BYTES_PRINTED, "JOB_NOTIFY_BYTES_PRINTED", ONE_VALUE, NULL }, { END, END, "", END, NULL } @@ -4270,6 +4296,7 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO } Printer->page_started=False; + print_job_endpage(Printer->jobid); return WERR_OK; } @@ -5139,7 +5166,7 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, job_info->status=nt_printj_status(queue->status); job_info->priority=queue->priority; job_info->position=position; - job_info->totalpages=0; + job_info->totalpages=queue->page_count; job_info->pagesprinted=0; make_systemtime(&job_info->submitted, t); @@ -5183,7 +5210,7 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, job_info->position=position; job_info->starttime=0; job_info->untiltime=0; - job_info->totalpages=0; + job_info->totalpages=queue->page_count; job_info->size=queue->size; make_systemtime(&(job_info->submitted), t); job_info->timeelapsed=0; -- cgit From 30dd33f110ed603dc014f38b029d124e2e7226da Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 02:52:36 +0000 Subject: Do dynamic executables the HEAD way :-). Jeremy. --- source/Makefile.in | 19 ++++++++++--------- source/configure.in | 30 +++++++++++++----------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 583e9028cf7..4a8306d95cf 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -15,6 +15,7 @@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ AWK=@AWK@ +DYNEXP=@DYNEXP@ TERMLDFLAGS=@TERMLDFLAGS@ TERMLIBS=@TERMLIBS@ @@ -493,7 +494,7 @@ bin/.dummy: bin/smbd: $(SMBD_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/nmbd: $(NMBD_OBJ) bin/.dummy @echo Linking $@ @@ -501,11 +502,11 @@ bin/nmbd: $(NMBD_OBJ) bin/.dummy bin/swat: $(SWAT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/rpcclient: $(RPCCLIENT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) bin/smbclient: $(CLIENT_OBJ) bin/.dummy @echo Linking $@ @@ -545,11 +546,11 @@ bin/smbcontrol: $(SMBCONTROL_OBJ) bin/.dummy bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/pdbedit: $(PDBEDIT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy @echo Linking $@ @@ -581,7 +582,7 @@ bin/msgtest: $(MSGTEST_OBJ) bin/.dummy bin/smbcacls: $(SMBCACLS_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/locktest: $(LOCKTEST_OBJ) bin/.dummy @echo Linking $@ @@ -597,7 +598,7 @@ bin/nsstest: $(NSSTEST_OBJ) bin/.dummy bin/rpctorture: $(RPCTORTURE_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/debug2html: $(DEBUG2HTML_OBJ) bin/.dummy @echo Linking $@ @@ -634,7 +635,7 @@ bin/smbsh: $(SMBSH_OBJ) bin/.dummy bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) @echo Linking shared library $@ - $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) -lpam $(LIBS) -lc + $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) $(LIBS) -lc nsswitch/libnss_wins.so: $(NSS_OBJ) @echo "Linking $@" @@ -642,7 +643,7 @@ nsswitch/libnss_wins.so: $(NSS_OBJ) bin/winbindd: $(WINBINDD_OBJ) bin/.dummy @echo Linking $@ - @$(LINK) -o $@ $(WINBINDD_OBJ) $(LIBS) + @$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS) nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS) @echo "Linking $@" diff --git a/source/configure.in b/source/configure.in index 8ddabe95943..4ed4efe05fc 100644 --- a/source/configure.in +++ b/source/configure.in @@ -192,6 +192,13 @@ esac AC_VALIDATE_CACHE_SYSTEM_TYPE +DYNEXP= + +# I'm sure gcc supports -rdynamic +if test "$ac_cv_prog_gcc" = yes; then + DYNEXP="-rdynamic" +fi + # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -220,6 +227,7 @@ case "$host_os" in AC_DEFINE(USE_BOTH_CRYPT_CALLS) ;; esac + DYNEXP="-Wl,-E" ;; @@ -266,6 +274,7 @@ case "$host_os" in ;; esac else + DYNEXP="-dc -dp" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" fi ;; @@ -369,23 +378,6 @@ exit(1); esac -AC_CACHE_CHECK([for dynamic executables],samba_cv_dynamic_executables,[ - - _ldflags=${LDFLAGS} - LDFLAGS="-rdynamic $LDFLAGS" - - AC_TRY_RUN([ -#include -main () { -exit(0); -}], samba_cv_dynamic_executables=yes,samba_cv_dynamic_executables=no,samba_cv_dynamic_executables=cross)]) -if test x"$samba_cv_dynamic_executables" = x"yes"; then - LDFLAGS="-rdynamic $_ldflags" -else - LDFLAGS="$_ldflags" -fi - - AC_INLINE AC_HEADER_STDC AC_HEADER_DIRENT @@ -812,6 +804,7 @@ case "$host_os" in *linux*) AC_DEFINE(LINUX) BLDSHARED="true" LDSHFLAGS="-shared" + DYNEXP="-Wl,--export-dynamic" PICFLAG="-fPIC" SONAMEFLAG="-Wl,-soname=" AC_DEFINE(STAT_ST_BLOCKSIZE,512) @@ -869,6 +862,7 @@ case "$host_os" in LDSHFLAGS="-B symbolic -b -z +h \$@" PICFLAG="+z" fi + DYNEXP="-Wl,-E" AC_DEFINE(STAT_ST_BLOCKSIZE,8192) ;; *qnx*) AC_DEFINE(QNX);; @@ -891,6 +885,7 @@ case "$host_os" in AC_DEFINE(HAVE_MEMSET) fi LDSHFLAGS="-G" + DYNEXP="-Bexport" ;; *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX);; esac @@ -902,6 +897,7 @@ case "$host_os" in LDSHFLAGS="-G" ;; esac +AC_SUBST(DYNEXP) AC_MSG_RESULT($BLDSHARED) AC_MSG_CHECKING([linker flags for shared libraries]) AC_MSG_RESULT([$LDSHFLAGS]) -- cgit From 444781f2def01a64092f2952de39362c474aaab3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 02:53:35 +0000 Subject: Do dynamic executables the HEAD way. Jeremy. --- source/configure | 1502 ++++++++++++++++++++++++++---------------------------- 1 file changed, 736 insertions(+), 766 deletions(-) diff --git a/source/configure b/source/configure index 0735e64e771..3a20a7059f5 100755 --- a/source/configure +++ b/source/configure @@ -1325,6 +1325,13 @@ echo "configure:1312: checking config.cache system type" >&5 ac_cv_target_system_type="$target" +DYNEXP= + +# I'm sure gcc supports -rdynamic +if test "$ac_cv_prog_gcc" = yes; then + DYNEXP="-rdynamic" +fi + # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -1333,7 +1340,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:1337: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1344: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1377,6 +1384,7 @@ EOF ;; esac + DYNEXP="-Wl,-E" ;; @@ -1423,6 +1431,7 @@ EOF ;; esac else + DYNEXP="-dc -dp" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" fi ;; @@ -1434,14 +1443,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1438: checking for LFS support" >&5 +echo "configure:1447: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1453,7 +1462,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1480,14 +1489,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1484: checking for LFS support" >&5 +echo "configure:1493: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1525,7 +1534,7 @@ main() { } EOF -if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1546,14 +1555,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1550: checking for LFS support" >&5 +echo "configure:1559: 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 < @@ -1565,7 +1574,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1578: \"$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 @@ -1586,66 +1595,22 @@ fi esac -echo $ac_n "checking for dynamic executables""... $ac_c" 1>&6 -echo "configure:1591: checking for dynamic executables" >&5 -if eval "test \"`echo '$''{'samba_cv_dynamic_executables'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - - _ldflags=${LDFLAGS} - LDFLAGS="-rdynamic $LDFLAGS" - - if test "$cross_compiling" = yes; then - samba_cv_dynamic_executables=cross -else - cat > conftest.$ac_ext < -main () { -exit(0); -} -EOF -if { (eval echo configure:1612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - samba_cv_dynamic_executables=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_dynamic_executables=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$samba_cv_dynamic_executables" 1>&6 -if test x"$samba_cv_dynamic_executables" = x"yes"; then - LDFLAGS="-rdynamic $_ldflags" -else - LDFLAGS="$_ldflags" -fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1635: checking for inline" >&5 +echo "configure:1600: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1671,7 +1636,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1675: checking how to run the C preprocessor" >&5 +echo "configure:1640: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1686,13 +1651,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1661: \"$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 : @@ -1703,13 +1668,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1678: \"$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 : @@ -1720,13 +1685,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1695: \"$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 : @@ -1751,12 +1716,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1755: checking for ANSI C header files" >&5 +echo "configure:1720: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1764,7 +1729,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1733: \"$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* @@ -1781,7 +1746,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 @@ -1799,7 +1764,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 @@ -1820,7 +1785,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1831,7 +1796,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1859,12 +1824,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:1863: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1828: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1872,7 +1837,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1897,7 +1862,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:1901: checking for opendir in -ldir" >&5 +echo "configure:1866: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1905,7 +1870,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1885: \"$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 @@ -1938,7 +1903,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1942: checking for opendir in -lx" >&5 +echo "configure:1907: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1946,7 +1911,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1926: \"$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 @@ -1980,12 +1945,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1984: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1949: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1994,7 +1959,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2015,12 +1980,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2019: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1984: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2036,7 +2001,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2060,17 +2025,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:2064: checking for $ac_hdr" >&5 +echo "configure:2029: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2039: \"$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* @@ -2100,17 +2065,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2104: checking for $ac_hdr" >&5 +echo "configure:2069: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2079: \"$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* @@ -2140,17 +2105,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2144: checking for $ac_hdr" >&5 +echo "configure:2109: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2119: \"$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* @@ -2180,17 +2145,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2184: checking for $ac_hdr" >&5 +echo "configure:2149: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2159: \"$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* @@ -2220,17 +2185,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2224: checking for $ac_hdr" >&5 +echo "configure:2189: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2199: \"$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* @@ -2260,17 +2225,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2264: checking for $ac_hdr" >&5 +echo "configure:2229: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2239: \"$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* @@ -2300,17 +2265,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2304: checking for $ac_hdr" >&5 +echo "configure:2269: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2279: \"$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* @@ -2340,17 +2305,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2344: checking for $ac_hdr" >&5 +echo "configure:2309: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2319: \"$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* @@ -2384,14 +2349,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2413,17 +2378,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2417: checking for $ac_hdr" >&5 +echo "configure:2382: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2392: \"$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* @@ -2453,17 +2418,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2457: checking for $ac_hdr" >&5 +echo "configure:2422: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2432: \"$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* @@ -2493,17 +2458,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2497: checking for $ac_hdr" >&5 +echo "configure:2462: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2472: \"$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* @@ -2533,17 +2498,17 @@ for ac_hdr in 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:2537: checking for $ac_hdr" >&5 +echo "configure:2502: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2512: \"$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* @@ -2573,17 +2538,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:2577: checking for $ac_hdr" >&5 +echo "configure:2542: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2552: \"$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* @@ -2615,17 +2580,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2619: checking for $ac_hdr" >&5 +echo "configure:2584: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2594: \"$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* @@ -2657,17 +2622,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2661: checking for $ac_hdr" >&5 +echo "configure:2626: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2636: \"$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* @@ -2699,17 +2664,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2703: checking for $ac_hdr" >&5 +echo "configure:2668: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2678: \"$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* @@ -2737,7 +2702,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2741: checking size of int" >&5 +echo "configure:2706: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2745,7 +2710,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < int main() @@ -2756,7 +2721,7 @@ int main() return(0); } EOF -if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2725: \"$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 @@ -2776,7 +2741,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2780: checking size of long" >&5 +echo "configure:2745: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2784,7 +2749,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < int main() @@ -2795,7 +2760,7 @@ int main() return(0); } EOF -if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2764: \"$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 @@ -2815,7 +2780,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2819: checking size of short" >&5 +echo "configure:2784: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2823,7 +2788,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < int main() @@ -2834,7 +2799,7 @@ int main() return(0); } EOF -if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2803: \"$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 @@ -2855,12 +2820,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2859: checking for working const" >&5 +echo "configure:2824: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2930,21 +2895,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2934: checking for inline" >&5 +echo "configure:2899: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2970,14 +2935,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2974: checking whether byte ordering is bigendian" >&5 +echo "configure:2939: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2988,11 +2953,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2957: \"$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 < #include @@ -3003,7 +2968,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3023,7 +2988,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3005: \"$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 @@ -3060,14 +3025,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3064: checking whether char is unsigned" >&5 +echo "configure:3029: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3068: \"$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 @@ -3124,12 +3089,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3128: checking return type of signal handlers" >&5 +echo "configure:3093: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3146,7 +3111,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3165,12 +3130,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3169: checking for uid_t in sys/types.h" >&5 +echo "configure:3134: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3199,12 +3164,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3203: checking for mode_t" >&5 +echo "configure:3168: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3232,12 +3197,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3236: checking for off_t" >&5 +echo "configure:3201: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3265,12 +3230,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3269: checking for size_t" >&5 +echo "configure:3234: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3298,12 +3263,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3302: checking for pid_t" >&5 +echo "configure:3267: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3331,12 +3296,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3335: checking for st_rdev in struct stat" >&5 +echo "configure:3300: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3344,7 +3309,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3365,12 +3330,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3369: checking for d_off in dirent" >&5 +echo "configure:3334: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3380,7 +3345,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3401,12 +3366,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3405: checking for ino_t" >&5 +echo "configure:3370: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3434,12 +3399,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3438: checking for loff_t" >&5 +echo "configure:3403: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3467,12 +3432,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3471: checking for offset_t" >&5 +echo "configure:3436: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3500,12 +3465,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3504: checking for ssize_t" >&5 +echo "configure:3469: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3533,12 +3498,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3537: checking for wchar_t" >&5 +echo "configure:3502: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3570,7 +3535,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3574: checking for httpConnect in -lcups" >&5 +echo "configure:3539: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3578,7 +3543,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3558: \"$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 @@ -3624,17 +3589,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3628: checking for $ac_hdr" >&5 +echo "configure:3593: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3603: \"$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* @@ -3673,7 +3638,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3677: checking for dlopen in -ldl" >&5 +echo "configure:3642: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3681,7 +3646,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3661: \"$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 @@ -3720,13 +3685,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3724: checking for immediate structures" >&5 +echo "configure:3689: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3744,7 +3709,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3767,13 +3732,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3771: checking for unix domain sockets" >&5 +echo "configure:3736: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3788,7 +3753,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3809,13 +3774,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3813: checking for socklen_t type" >&5 +echo "configure:3778: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3828,7 +3793,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3849,13 +3814,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3853: checking for sig_atomic_t type" >&5 +echo "configure:3818: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3868,7 +3833,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3891,20 +3856,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3895: checking for errno declaration" >&5 +echo "configure:3860: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3926,20 +3891,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3930: checking for setresuid declaration" >&5 +echo "configure:3895: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3961,20 +3926,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3965: checking for setresgid declaration" >&5 +echo "configure:3930: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3996,20 +3961,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4000: checking for asprintf declaration" >&5 +echo "configure:3965: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4031,20 +3996,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4035: checking for vasprintf declaration" >&5 +echo "configure:4000: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4066,20 +4031,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4070: checking for vsnprintf declaration" >&5 +echo "configure:4035: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4101,20 +4066,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4105: checking for snprintf declaration" >&5 +echo "configure:4070: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4138,7 +4103,7 @@ EOF # 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:4142: checking for real setresuid" >&5 +echo "configure:4107: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4147,12 +4112,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4121: \"$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 @@ -4177,7 +4142,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4181: checking for real setresgid" >&5 +echo "configure:4146: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4186,13 +4151,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4161: \"$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 @@ -4215,7 +4180,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4219: checking for 8-bit clean memcmp" >&5 +echo "configure:4184: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4223,7 +4188,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4202: \"$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 @@ -4257,7 +4222,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4261: checking whether to use readline" >&5 +echo "configure:4226: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4269,17 +4234,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4273: checking for $ac_hdr" >&5 +echo "configure:4238: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4248: \"$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* @@ -4309,17 +4274,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4313: checking for $ac_hdr" >&5 +echo "configure:4278: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4288: \"$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* @@ -4350,17 +4315,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4354: checking for $ac_hdr" >&5 +echo "configure:4319: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4329: \"$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* @@ -4383,7 +4348,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4387: checking for tgetent in -l${termlib}" >&5 +echo "configure:4352: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4391,7 +4356,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4371: \"$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 @@ -4424,7 +4389,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4428: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4393: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4432,7 +4397,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4412: \"$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 @@ -4494,17 +4459,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4498: checking for $ac_hdr" >&5 +echo "configure:4463: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4473: \"$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* @@ -4534,17 +4499,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4538: checking for $ac_hdr" >&5 +echo "configure:4503: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4513: \"$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* @@ -4575,17 +4540,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4579: checking for $ac_hdr" >&5 +echo "configure:4544: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4554: \"$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* @@ -4608,7 +4573,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4612: checking for tgetent in -l${termlib}" >&5 +echo "configure:4577: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4616,7 +4581,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4596: \"$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 @@ -4649,7 +4614,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4653: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4618: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4657,7 +4622,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4637: \"$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 @@ -4723,12 +4688,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4727: checking for $ac_func" >&5 +echo "configure:4692: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4720: \"$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 @@ -4779,7 +4744,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:4783: checking for printf in -lnsl_s" >&5 +echo "configure:4748: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4787,7 +4752,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4767: \"$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 @@ -4829,7 +4794,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4833: checking for printf in -lnsl" >&5 +echo "configure:4798: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4837,7 +4802,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4817: \"$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 @@ -4879,7 +4844,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4883: checking for connect in -lsocket" >&5 +echo "configure:4848: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4887,7 +4852,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4867: \"$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 @@ -4929,7 +4894,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4933: checking for connect in -linet" >&5 +echo "configure:4898: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4937,7 +4902,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4917: \"$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 @@ -4992,12 +4957,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4996: checking for $ac_func" >&5 +echo "configure:4961: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4989: \"$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 @@ -5046,7 +5011,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5050: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5015: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5054,7 +5019,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5034: \"$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 @@ -5095,12 +5060,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5099: checking for $ac_func" >&5 +echo "configure:5064: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5092: \"$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 @@ -5156,12 +5121,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5160: checking for $ac_func" >&5 +echo "configure:5125: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5153: \"$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 @@ -5211,12 +5176,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5215: checking for $ac_func" >&5 +echo "configure:5180: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5208: \"$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 @@ -5266,12 +5231,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5270: checking for $ac_func" >&5 +echo "configure:5235: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5263: \"$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 @@ -5321,12 +5286,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5325: checking for $ac_func" >&5 +echo "configure:5290: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5318: \"$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 @@ -5376,12 +5341,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5380: checking for $ac_func" >&5 +echo "configure:5345: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5373: \"$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 @@ -5431,12 +5396,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5435: checking for $ac_func" >&5 +echo "configure:5400: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5428: \"$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 @@ -5486,12 +5451,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5490: checking for $ac_func" >&5 +echo "configure:5455: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5483: \"$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 @@ -5541,12 +5506,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5545: checking for $ac_func" >&5 +echo "configure:5510: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5538: \"$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 @@ -5596,12 +5561,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5600: checking for $ac_func" >&5 +echo "configure:5565: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5593: \"$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 @@ -5651,12 +5616,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5655: checking for $ac_func" >&5 +echo "configure:5620: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5648: \"$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 @@ -5708,12 +5673,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5712: checking for $ac_func" >&5 +echo "configure:5677: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5705: \"$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 @@ -5764,12 +5729,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:5768: checking for $ac_func" >&5 +echo "configure:5733: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5761: \"$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 @@ -5819,12 +5784,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:5823: checking for $ac_func" >&5 +echo "configure:5788: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5816: \"$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 @@ -5874,12 +5839,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5878: checking for $ac_func" >&5 +echo "configure:5843: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5929,12 +5894,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5933: checking for $ac_func" >&5 +echo "configure:5898: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5926: \"$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 @@ -5984,12 +5949,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:5988: checking for $ac_func" >&5 +echo "configure:5953: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5981: \"$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 @@ -6039,12 +6004,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:6043: checking for $ac_func" >&5 +echo "configure:6008: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6036: \"$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 @@ -6094,12 +6059,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:6098: checking for $ac_func" >&5 +echo "configure:6063: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6091: \"$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 @@ -6149,12 +6114,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:6153: checking for $ac_func" >&5 +echo "configure:6118: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6146: \"$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 @@ -6204,12 +6169,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6208: checking for $ac_func" >&5 +echo "configure:6173: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6201: \"$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 @@ -6259,12 +6224,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:6263: checking for $ac_func" >&5 +echo "configure:6228: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6256: \"$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 @@ -6314,12 +6279,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:6318: checking for $ac_func" >&5 +echo "configure:6283: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6311: \"$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 @@ -6369,12 +6334,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:6373: checking for $ac_func" >&5 +echo "configure:6338: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6366: \"$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 @@ -6424,12 +6389,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:6428: checking for $ac_func" >&5 +echo "configure:6393: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6421: \"$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 @@ -6479,12 +6444,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6483: checking for $ac_func" >&5 +echo "configure:6448: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6476: \"$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 @@ -6538,9 +6503,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6542: checking for stat64 in " >&5 +echo "configure:6507: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6571,9 +6536,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6575: checking for lstat64 in " >&5 +echo "configure:6540: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6604,9 +6569,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6608: checking for fstat64 in " >&5 +echo "configure:6573: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6643,7 +6608,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6647: checking for strcasecmp in -lresolv" >&5 +echo "configure:6612: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6651,7 +6616,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6631: \"$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 @@ -6698,12 +6663,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6702: checking for $ac_func" >&5 +echo "configure:6667: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6695: \"$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 @@ -6751,7 +6716,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6755: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6720: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6759,7 +6724,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6739: \"$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 @@ -6800,12 +6765,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6804: checking for $ac_func" >&5 +echo "configure:6769: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6797: \"$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 @@ -6859,12 +6824,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6863: checking for $ac_func" >&5 +echo "configure:6828: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6856: \"$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 @@ -6912,7 +6877,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6916: checking for putprpwnam in -lsec" >&5 +echo "configure:6881: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6920,7 +6885,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6900: \"$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 @@ -6961,12 +6926,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6965: checking for $ac_func" >&5 +echo "configure:6930: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6958: \"$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 @@ -7021,12 +6986,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:7025: checking for $ac_func" >&5 +echo "configure:6990: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7018: \"$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 @@ -7074,7 +7039,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7078: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7043: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7082,7 +7047,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7062: \"$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 @@ -7123,12 +7088,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7127: checking for $ac_func" >&5 +echo "configure:7092: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7120: \"$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 @@ -7182,12 +7147,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:7186: checking for $ac_func" >&5 +echo "configure:7151: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7179: \"$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 @@ -7235,7 +7200,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7239: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7204: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7243,7 +7208,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7223: \"$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 @@ -7284,12 +7249,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7288: checking for $ac_func" >&5 +echo "configure:7253: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7281: \"$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 @@ -7345,12 +7310,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7349: checking for $ac_func" >&5 +echo "configure:7314: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7342: \"$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 @@ -7398,7 +7363,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7402: checking for getspnam in -lgen" >&5 +echo "configure:7367: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7406,7 +7371,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7386: \"$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 @@ -7447,12 +7412,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7451: checking for $ac_func" >&5 +echo "configure:7416: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7444: \"$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 @@ -7507,12 +7472,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7511: checking for $ac_func" >&5 +echo "configure:7476: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7504: \"$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 @@ -7560,7 +7525,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7564: checking for getspnam in -lsecurity" >&5 +echo "configure:7529: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7568,7 +7533,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7548: \"$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 @@ -7609,12 +7574,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7613: checking for $ac_func" >&5 +echo "configure:7578: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7606: \"$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 @@ -7668,12 +7633,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7672: checking for $ac_func" >&5 +echo "configure:7637: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7665: \"$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 @@ -7721,7 +7686,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7725: checking for getspnam in -lsec" >&5 +echo "configure:7690: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7729,7 +7694,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7709: \"$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 @@ -7770,12 +7735,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7774: checking for $ac_func" >&5 +echo "configure:7739: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7767: \"$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 @@ -7830,12 +7795,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7834: checking for $ac_func" >&5 +echo "configure:7799: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7827: \"$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 @@ -7883,7 +7848,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7887: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7852: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7891,7 +7856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7871: \"$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 @@ -7932,12 +7897,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7936: checking for $ac_func" >&5 +echo "configure:7901: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7929: \"$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 @@ -7991,12 +7956,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7995: checking for $ac_func" >&5 +echo "configure:7960: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7988: \"$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 @@ -8044,7 +8009,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8048: checking for bigcrypt in -lsec" >&5 +echo "configure:8013: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8052,7 +8017,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8032: \"$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 @@ -8093,12 +8058,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8097: checking for $ac_func" >&5 +echo "configure:8062: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8090: \"$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 @@ -8153,12 +8118,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8157: checking for $ac_func" >&5 +echo "configure:8122: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8150: \"$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 @@ -8206,7 +8171,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8210: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8175: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8214,7 +8179,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8194: \"$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 @@ -8255,12 +8220,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8259: checking for $ac_func" >&5 +echo "configure:8224: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8252: \"$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 @@ -8314,12 +8279,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8318: checking for $ac_func" >&5 +echo "configure:8283: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8311: \"$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 @@ -8367,7 +8332,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8371: checking for getprpwnam in -lsec" >&5 +echo "configure:8336: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8375,7 +8340,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8355: \"$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 @@ -8416,12 +8381,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8420: checking for $ac_func" >&5 +echo "configure:8385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8413: \"$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 @@ -8487,7 +8452,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8491: checking ability to build shared libraries" >&5 +echo "configure:8456: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8497,6 +8462,7 @@ EOF BLDSHARED="true" LDSHFLAGS="-shared" + DYNEXP="-Wl,--export-dynamic" PICFLAG="-fPIC" SONAMEFLAG="-Wl,-soname=" cat >> confdefs.h <<\EOF @@ -8587,6 +8553,7 @@ EOF LDSHFLAGS="-B symbolic -b -z +h \$@" PICFLAG="+z" fi + DYNEXP="-Wl,-E" cat >> confdefs.h <<\EOF #define STAT_ST_BLOCKSIZE 8192 EOF @@ -8623,7 +8590,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:8627: checking for $ac_word" >&5 +echo "configure:8594: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8658,6 +8625,7 @@ EOF fi LDSHFLAGS="-G" + DYNEXP="-Bexport" ;; *mips-sni-sysv4*) cat >> confdefs.h <<\EOF #define RELIANTUNIX 1 @@ -8675,17 +8643,18 @@ EOF LDSHFLAGS="-G" ;; esac + echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8681: checking linker flags for shared libraries" >&5 +echo "configure:8650: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8684: checking compiler flags for position-independent code" >&5 +echo "configure:8653: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8689: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8658: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8705,7 +8674,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:8709: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8678: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8726,7 +8695,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:8730: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8699: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8749,7 +8718,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8753: checking for long long" >&5 +echo "configure:8722: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8758,12 +8727,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8736: \"$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 @@ -8790,20 +8759,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8794: checking for LL suffix on long long integers" >&5 +echo "configure:8763: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8825,7 +8794,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8829: checking for 64 bit off_t" >&5 +echo "configure:8798: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8834,13 +8803,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8813: \"$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 @@ -8863,7 +8832,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8867: checking for off64_t" >&5 +echo "configure:8836: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8872,7 +8841,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8855: \"$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 @@ -8905,7 +8874,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8909: checking for 64 bit ino_t" >&5 +echo "configure:8878: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8914,13 +8883,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8893: \"$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 @@ -8943,7 +8912,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8947: checking for ino64_t" >&5 +echo "configure:8916: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8952,7 +8921,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8935: \"$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 @@ -8985,7 +8954,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8989: checking for dev64_t" >&5 +echo "configure:8958: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8994,7 +8963,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9027,13 +8996,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9031: checking for struct dirent64" >&5 +echo "configure:9000: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9066,7 +9035,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9070: checking for major macro" >&5 +echo "configure:9039: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9075,7 +9044,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9107,7 +9076,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9111: checking for minor macro" >&5 +echo "configure:9080: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9116,7 +9085,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9148,7 +9117,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9152: checking for makedev macro" >&5 +echo "configure:9121: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9157,7 +9126,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9189,7 +9158,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9193: checking for unsigned char" >&5 +echo "configure:9162: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9198,12 +9167,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } 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:9176: \"$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 @@ -9226,13 +9195,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9230: checking for sin_len in sock" >&5 +echo "configure:9199: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9241,7 +9210,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9262,13 +9231,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9266: checking whether seekdir returns void" >&5 +echo "configure:9235: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9277,7 +9246,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9298,20 +9267,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9302: checking for __FILE__ macro" >&5 +echo "configure:9271: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9332,20 +9301,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9336: checking for __FUNCTION__ macro" >&5 +echo "configure:9305: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9366,7 +9335,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9370: checking if gettimeofday takes tz argument" >&5 +echo "configure:9339: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9375,14 +9344,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9355: \"$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 @@ -9405,7 +9374,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9409: checking for C99 vsnprintf" >&5 +echo "configure:9378: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9414,7 +9383,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9441,7 +9410,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9464,7 +9433,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9468: checking for broken readdir" >&5 +echo "configure:9437: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9473,7 +9442,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9481,7 +9450,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:9485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9454: \"$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 @@ -9504,13 +9473,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9508: checking for utimbuf" >&5 +echo "configure:9477: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9518,7 +9487,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9542,12 +9511,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9546: checking for $ac_func" >&5 +echo "configure:9515: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9543: \"$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 @@ -9596,13 +9565,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9600: checking for ut_name in utmp" >&5 +echo "configure:9569: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9610,7 +9579,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9631,13 +9600,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9635: checking for ut_user in utmp" >&5 +echo "configure:9604: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9645,7 +9614,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9666,13 +9635,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9670: checking for ut_id in utmp" >&5 +echo "configure:9639: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9680,7 +9649,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9701,13 +9670,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9705: checking for ut_host in utmp" >&5 +echo "configure:9674: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9715,7 +9684,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9736,13 +9705,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9740: checking for ut_time in utmp" >&5 +echo "configure:9709: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9750,7 +9719,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9771,13 +9740,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9775: checking for ut_tv in utmp" >&5 +echo "configure:9744: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9785,7 +9754,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9806,13 +9775,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9810: checking for ut_type in utmp" >&5 +echo "configure:9779: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9820,7 +9789,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9841,13 +9810,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9845: checking for ut_pid in utmp" >&5 +echo "configure:9814: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9855,7 +9824,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9876,13 +9845,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9880: checking for ut_exit in utmp" >&5 +echo "configure:9849: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9890,7 +9859,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9911,13 +9880,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9915: checking for ut_addr in utmp" >&5 +echo "configure:9884: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9925,7 +9894,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9947,13 +9916,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9951: checking whether pututline returns pointer" >&5 +echo "configure:9920: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9961,7 +9930,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9983,13 +9952,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9987: checking for ut_syslen in utmpx" >&5 +echo "configure:9956: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9997,7 +9966,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10018,7 +9987,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10022: checking for Linux kernel oplocks" >&5 +echo "configure:9991: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10027,7 +9996,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10041,7 +10010,7 @@ main() { } EOF -if { (eval echo configure:10045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10064,7 +10033,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10068: checking for kernel change notify support" >&5 +echo "configure:10037: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10073,7 +10042,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10087,7 +10056,7 @@ main() { } EOF -if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10110,7 +10079,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10114: checking for kernel share modes" >&5 +echo "configure:10083: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10119,7 +10088,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10135,7 +10104,7 @@ main() { } EOF -if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10161,13 +10130,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10165: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10134: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10175,7 +10144,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:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10196,7 +10165,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10200: checking for irix specific capabilities" >&5 +echo "configure:10169: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10205,7 +10174,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10220,7 +10189,7 @@ main() { } EOF -if { (eval echo configure:10224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10193: \"$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 @@ -10248,13 +10217,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10252: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10221: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10264,7 +10233,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10285,13 +10254,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10289: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10258: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10301,7 +10270,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10322,13 +10291,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10326: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10295: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10338,7 +10307,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10359,13 +10328,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10363: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10332: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10375,7 +10344,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10397,13 +10366,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10401: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10370: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10417,7 +10386,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10438,16 +10407,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10442: checking for test routines" >&5 +echo "configure:10411: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10420: \"$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 @@ -10461,7 +10430,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10465: checking for ftruncate extend" >&5 +echo "configure:10434: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10470,11 +10439,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10447: \"$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 @@ -10497,7 +10466,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10501: checking for broken getgroups" >&5 +echo "configure:10470: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10506,11 +10475,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10483: \"$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 @@ -10533,7 +10502,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10537: checking whether getpass should be replaced" >&5 +echo "configure:10506: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10541,7 +10510,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10577,7 +10546,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10581: checking for broken inet_ntoa" >&5 +echo "configure:10550: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10586,7 +10555,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10600,7 +10569,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:10604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10573: \"$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 @@ -10623,7 +10592,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10627: checking for secure mkstemp" >&5 +echo "configure:10596: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10632,7 +10601,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10649,7 +10618,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10672,7 +10641,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10676: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10645: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10681,12 +10650,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10709,7 +10678,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10713: checking for root" >&5 +echo "configure:10682: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10718,11 +10687,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10695: \"$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 @@ -10750,7 +10719,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10754: checking for iface AIX" >&5 +echo "configure:10723: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10759,7 +10728,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10791,7 +10760,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10795: checking for iface ifconf" >&5 +echo "configure:10764: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10800,7 +10769,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10833,7 +10802,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10837: checking for iface ifreq" >&5 +echo "configure:10806: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10842,7 +10811,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10879,7 +10848,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10883: checking for setresuid" >&5 +echo "configure:10852: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10888,7 +10857,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10869: \"$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 @@ -10922,7 +10891,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10926: checking for setreuid" >&5 +echo "configure:10895: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10931,7 +10900,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10912: \"$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 @@ -10964,7 +10933,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10968: checking for seteuid" >&5 +echo "configure:10937: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10973,7 +10942,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10954: \"$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 @@ -11006,7 +10975,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11010: checking for setuidx" >&5 +echo "configure:10979: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11015,7 +10984,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10996: \"$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 @@ -11048,7 +11017,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11052: checking for working mmap" >&5 +echo "configure:11021: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11057,11 +11026,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11084,7 +11053,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11088: checking for ftruncate needs root" >&5 +echo "configure:11057: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11093,11 +11062,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11120,7 +11089,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11124: checking for fcntl locking" >&5 +echo "configure:11093: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11129,11 +11098,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11106: \"$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 @@ -11156,7 +11125,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11160: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11129: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11165,11 +11134,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11194,7 +11163,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11198: checking for 64 bit fcntl locking" >&5 +echo "configure:11167: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11203,7 +11172,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11200: \"$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 @@ -11252,13 +11221,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11256: checking for st_blocks in struct stat" >&5 +echo "configure:11225: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11267,7 +11236,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11290,13 +11259,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11294: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11263: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11333,13 +11302,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11337: checking for broken nisplus include files" >&5 +echo "configure:11306: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11349,7 +11318,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11373,7 +11342,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11377: checking whether to use smbwrapper" >&5 +echo "configure:11346: 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" @@ -11417,7 +11386,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11421: checking whether to use AFS" >&5 +echo "configure:11390: 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" @@ -11443,7 +11412,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11447: checking whether to use DCE/DFS auth" >&5 +echo "configure:11416: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11468,7 +11437,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11472: checking whether to use Kerberos IV" >&5 +echo "configure:11441: 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" @@ -11480,7 +11449,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11484: checking for dn_expand in -lresolv" >&5 +echo "configure:11453: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11488,7 +11457,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11472: \"$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 @@ -11543,7 +11512,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11547: checking whether to use Kerberos 5" >&5 +echo "configure:11516: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11571,7 +11540,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11575: checking whether to use AUTOMOUNT" >&5 +echo "configure:11544: 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" @@ -11596,7 +11565,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11600: checking whether to use SMBMOUNT" >&5 +echo "configure:11569: 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" @@ -11633,7 +11602,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11637: checking whether to use PAM password database" >&5 +echo "configure:11606: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11659,7 +11628,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11663: checking for pam_get_data in -lpam" >&5 +echo "configure:11632: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11667,7 +11636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11651: \"$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 @@ -11705,7 +11674,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11709: checking whether to use pam_smbpass" >&5 +echo "configure:11678: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11747,12 +11716,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11751: checking for $ac_func" >&5 +echo "configure:11720: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11748: \"$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 @@ -11801,7 +11770,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:11805: checking for crypt in -lcrypt" >&5 +echo "configure:11774: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11809,7 +11778,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11793: \"$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 @@ -11855,7 +11824,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11859: checking for a crypt that needs truncated salt" >&5 +echo "configure:11828: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11864,11 +11833,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11906,7 +11875,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11910: checking whether to use TDB SAM database" >&5 +echo "configure:11879: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11932,7 +11901,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11936: checking whether to use LDAP SAM database" >&5 +echo "configure:11905: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11959,7 +11928,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11963: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11932: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11987,7 +11956,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11991: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11960: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -12009,7 +11978,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12013: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11982: 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" @@ -12034,7 +12003,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12038: checking whether to use SSL" >&5 +echo "configure:12007: 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" @@ -12108,7 +12077,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12112: checking whether to use syslog logging" >&5 +echo "configure:12081: 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" @@ -12133,7 +12102,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12137: checking whether to use profiling" >&5 +echo "configure:12106: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12161,7 +12130,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12165: checking whether to support disk-quotas" >&5 +echo "configure:12134: 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" @@ -12173,13 +12142,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12177: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12146: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12191,7 +12160,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12235,7 +12204,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12239: checking whether to support utmp accounting" >&5 +echo "configure:12208: 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" @@ -12261,7 +12230,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12265: checking whether to support Microsoft Dfs" >&5 +echo "configure:12234: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12287,7 +12256,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12291: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12260: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12316,7 +12285,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12320: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12289: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12343,14 +12312,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12347: checking how to get filesystem space usage" >&5 +echo "configure:12316: 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:12354: checking statvfs64 function (SVR4)" >&5 +echo "configure:12323: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12358,7 +12327,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12345: \"$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 @@ -12405,12 +12374,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12409: checking statvfs function (SVR4)" >&5 +echo "configure:12378: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12418,7 +12387,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12391: \"$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 @@ -12443,7 +12412,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:12447: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12416: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12451,7 +12420,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12464,7 +12433,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12437: \"$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 @@ -12491,7 +12460,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:12495: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12464: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12499,7 +12468,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12491: \"$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 @@ -12545,7 +12514,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:12549: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12518: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12553,7 +12522,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12563,7 +12532,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12536: \"$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 @@ -12590,7 +12559,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:12594: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12563: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12598,7 +12567,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12614,7 +12583,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12587: \"$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 @@ -12641,7 +12610,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:12645: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12614: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12649,7 +12618,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12669,7 +12638,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12642: \"$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 @@ -12702,9 +12671,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12706: checking if large file support can be enabled" >&5 +echo "configure:12675: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12784,7 +12753,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12788: checking whether to support ACLs" >&5 +echo "configure:12757: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12837,7 +12806,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12841: checking for acl_get_file in -lacl" >&5 +echo "configure:12810: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12845,7 +12814,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12829: \"$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 @@ -12884,13 +12853,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12888: checking for ACL support" >&5 +echo "configure:12857: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12898,7 +12867,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12918,13 +12887,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12922: checking for acl_get_perm_np" >&5 +echo "configure:12891: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12932,7 +12901,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12987,7 +12956,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12991: checking whether to build winbind" >&5 +echo "configure:12960: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13077,11 +13046,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -13278,6 +13247,7 @@ s%@LIBOBJS@%$LIBOBJS%g s%@TERMLIBS@%$TERMLIBS%g s%@TERMLDFLAGS@%$TERMLDFLAGS%g s%@ROFF@%$ROFF%g +s%@DYNEXP@%$DYNEXP%g s%@QUOTAOBJS@%$QUOTAOBJS%g s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g -- cgit From 552928a767ea109195d5c941ce94f34145a4c940 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Mar 2002 07:24:44 +0000 Subject: Use the noduplicates namequery. Jeremy. --- source/include/proto.h | 1964 ++++++++++++++++++++++----------------------- source/libsmb/namequery.c | 74 +- 2 files changed, 1051 insertions(+), 987 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 69bd50fa4bd..1bba61ce5c0 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -174,128 +174,625 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from libsmb/cliconnect.c */ - -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); - -/*The following definitions come from libsmb/cli_dfs.c */ +/*The following definitions come from lib/smbrun.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from lib/snprintf.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from lib/substitute.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from lib/sysacls.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/*The following definitions come from libsmb/clifile.c */ +/*The following definitions come from lib/system.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); + +/*The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); + +/*The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/*The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/*The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/*The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/*The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/*The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/*The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/*The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/*The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/*The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); + +/*The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/*The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from libsmb/clilist.c */ +/*The following definitions come from lib/wins_srv.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); + +/*The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); /*The following definitions come from libsmb/cli_lsarpc.c */ @@ -331,13 +828,6 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/*The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); - /*The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -364,12 +854,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); -/*The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -377,56 +861,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/*The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/*The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -505,12 +939,6 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); -/*The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -549,787 +977,359 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CT NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value); -/*The following definitions come from libsmb/cli_srvsvc.c */ - -struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr); - -/*The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/*The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/*The following definitions come from libsmb/credentials.c */ - -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/*The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/*The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/*The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/*The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/*The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/*The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from libsmb/cli_srvsvc.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from libsmb/cliconnect.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from libsmb/clidgram.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/snprintf.c */ +/*The following definitions come from libsmb/clientgen.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/substitute.c */ +/*The following definitions come from libsmb/clierror.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/sysacls.c */ +/*The following definitions come from libsmb/clifile.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from lib/system.c */ +/*The following definitions come from libsmb/clilist.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from lib/talloc.c */ +/*The following definitions come from libsmb/climessage.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from lib/time.c */ +/*The following definitions come from libsmb/clioplock.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from lib/ufc.c */ +/*The following definitions come from libsmb/cliprint.c */ -char *ufc_crypt(const char *key,const char *salt); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from lib/username.c */ +/*The following definitions come from libsmb/clirap.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from lib/util.c */ +/*The following definitions come from libsmb/clireadwrite.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from lib/util_file.c */ +/*The following definitions come from libsmb/clisecdesc.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/*The following definitions come from lib/util_getent.c */ +/*The following definitions come from libsmb/clistr.c */ -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from lib/util_seaccess.c */ +/*The following definitions come from libsmb/clitrans.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/credentials.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/errormap.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/namequery.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/nmblib.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/*The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/*The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/*The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from lib/util_unistr.c */ +/*The following definitions come from libsmb/smbdes.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/*The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/*The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /*The following definitions come from locking/brlock.c */ @@ -1417,6 +1417,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1447,9 +1450,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2328,14 +2328,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ +/*The following definitions come from printing/print_generic.c */ + + +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/*The following definitions come from printing/print_generic.c */ - - /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2361,11 +2366,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2424,39 +2424,6 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4151,6 +4118,39 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4619,24 +4619,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/*The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4702,6 +4684,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/*The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index e251a52de2e..fc61245a658 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -822,6 +822,10 @@ static BOOL internal_resolve_name(const char *name, int name_type, BOOL allones = (strcmp(name,"255.255.255.255") == 0); BOOL allzeros = (strcmp(name,"0.0.0.0") == 0); BOOL is_address = is_ipaddress(name); + BOOL result = False; + struct in_addr *nodupes_iplist; + int i; + *return_iplist = NULL; *return_count = 0; @@ -849,29 +853,89 @@ static BOOL internal_resolve_name(const char *name, int name_type, while (next_token(&ptr, tok, LIST_SEP, sizeof(tok))) { if((strequal(tok, "host") || strequal(tok, "hosts"))) { if (name_type == 0x20 && resolve_hosts(name, return_iplist, return_count)) { - return True; + result = True; + goto done; } } else if(strequal( tok, "lmhosts")) { if (resolve_lmhosts(name, name_type, return_iplist, return_count)) { - return True; + result = True; + goto done; } } else if(strequal( tok, "wins")) { /* don't resolve 1D via WINS */ if (name_type != 0x1D && - resolve_wins(name, name_type, return_iplist, return_count)) { - return True; + resolve_wins(name, name_type, return_iplist, return_count)) { + result = True; + goto done; } } else if(strequal( tok, "bcast")) { if (name_resolve_bcast(name, name_type, return_iplist, return_count)) { - return True; + result = True; + goto done; } } else { DEBUG(0,("resolve_name: unknown name switch type %s\n", tok)); } } + /* All of the resolve_* functions above have returned false. */ + SAFE_FREE(*return_iplist); return False; + + done: + + /* Remove duplicate entries. Some queries, notably #1c (domain + controllers) return the PDC in iplist[0] and then all domain + controllers including the PDC in iplist[1..n]. Iterating over + the iplist when the PDC is down will cause two sets of timeouts. */ + + if (*return_count && (nodupes_iplist = + (struct in_addr *)malloc(sizeof(struct in_addr) * (*return_count)))) { + int nodupes_count = 0; + + /* Iterate over return_iplist looking for duplicates */ + + for (i = 0; i < *return_count; i++) { + BOOL is_dupe = False; + int j; + + for (j = i + 1; j < *return_count; j++) { + if (ip_equal((*return_iplist)[i], + (*return_iplist)[j])) { + is_dupe = True; + break; + } + } + + if (!is_dupe) { + + /* This one not a duplicate */ + + nodupes_iplist[nodupes_count] = (*return_iplist)[i]; + nodupes_count++; + } + } + + /* Switcheroo with original list */ + + free(*return_iplist); + + *return_iplist = nodupes_iplist; + *return_count = nodupes_count; + } + + /* Display some debugging info */ + + DEBUG(10, ("internal_resolve_name: returning %d addresses: ", + *return_count)); + + for (i = 0; i < *return_count; i++) + DEBUGADD(10, ("%s ", inet_ntoa((*return_iplist)[i]))); + + DEBUG(10, ("\n")); + + return result; } /******************************************************** -- cgit From 03ab58a8a3eaaccfb25f394d79bd401c4bf0a006 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Mar 2002 18:35:14 +0000 Subject: add cleanonly option --- packaging/SGI/mkrelease.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh index 546a89068c5..b3ad32487e3 100755 --- a/packaging/SGI/mkrelease.sh +++ b/packaging/SGI/mkrelease.sh @@ -19,14 +19,14 @@ if [ ! -f ../../source/Makefile ]; then doclean="clean" fi -if [ "$1" = "clean" ]; then +if [ "$1" = "clean" ] || [ "$1" = "cleanonly" ]; then doclean=$1 shift fi export SGI_ABI ISA CC -if [ "$doclean" = "clean" ]; then +if [ "$doclean" = "clean" ] || [ "$doclean" = "cleanonly" ]; then cd ../../source if [ -f Makefile ]; then make distclean @@ -34,6 +34,7 @@ if [ "$doclean" = "clean" ]; then rm -rf bin/*.profile bin/*.noquota cd ../packaging/SGI rm -rf bins catman html codepages swat samba.idb samba.spec + if [ "$doclean" = "cleanonly" ]; then exit 0 ; fi fi # create the catman versions of the manual pages -- cgit From e142102d0774ee3c104b5c7f741baa0d0d9c78dd Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 19 Mar 2002 19:04:59 +0000 Subject: fix core dump if called with no args --- source/utils/masktest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/masktest.c b/source/utils/masktest.c index df12aafca64..2493e94bb76 100644 --- a/source/utils/masktest.c +++ b/source/utils/masktest.c @@ -428,7 +428,7 @@ static void usage(void) dbf = stderr; - if (argv[1][0] == '-' || argc < 2) { + if (argc < 2 || argv[1][0] == '-') { usage(); exit(1); } -- cgit From 7d754837d77ae3180d8dcd66c2fb6aaaec5cd578 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Tue, 19 Mar 2002 20:38:52 +0000 Subject: Port of page count/job size macros from APPLIANCE_HEAD. printing/printing.c add print job page count (%c) and print job file size in bytes (%z) JohnR --- source/printing/print_generic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/printing/print_generic.c b/source/printing/print_generic.c index 385d00eacd0..a1f94d14a83 100644 --- a/source/printing/print_generic.c +++ b/source/printing/print_generic.c @@ -149,6 +149,7 @@ static int generic_job_submit(int snum, struct printjob *pjob) pstring print_directory; char *wd, *p; pstring jobname; + fstring job_page_count, job_size; /* we print from the directory path to give the best chance of parsing the lpq output */ @@ -167,6 +168,8 @@ static int generic_job_submit(int snum, struct printjob *pjob) pstrcpy(jobname, pjob->jobname); pstring_sub(jobname, "'", "_"); + slprintf(job_page_count, sizeof(job_page_count)-1, "%d", pjob->page_count); + slprintf(job_size, sizeof(job_size)-1, "%d", pjob->size); /* send it to the system spooler */ ret = print_run_command(snum, @@ -174,6 +177,8 @@ static int generic_job_submit(int snum, struct printjob *pjob) "%s", p, "%J", jobname, "%f", p, + "%z", job_size, + "%c", job_page_count, NULL); chdir(wd); -- cgit From 9c5f7f0a2b561e8b3f39aeeeb5f35b9839b518d4 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 19 Mar 2002 23:29:01 +0000 Subject: Squelch a bug in winbindd if passed a bad SID when asked to lookup the user related to a SID. Make sure we do not dereference what we do not have. --- source/nsswitch/winbindd_sid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 3efc8833e94..5868f098eba 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -39,7 +39,10 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) /* Lookup sid from PDC using lsa_lookup_sids() */ - string_to_sid(&sid, state->request.data.sid); + if (!string_to_sid(&sid, state->request.data.sid)) { + DEBUG(5, ("%s not a SID\n", state->request.data.sid)); + return WINBINDD_ERROR; + } /* Don't look up BUILTIN sids */ -- cgit From 36b05e645129989cb272e01c496e9eccb6043388 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 20 Mar 2002 00:42:40 +0000 Subject: Merge from app-head: > Don't put two copies of the server name in construct_printer_info_1() --- source/rpc_server/srv_spoolss_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 31cbacd6393..80129caea43 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2846,12 +2846,12 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int if (*ntprinter->info_2->comment == '\0') { init_unistr(&printer->comment, lp_comment(snum)); - slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, ntprinter->info_2->drivername, lp_comment(snum)); } else { init_unistr(&printer->comment, ntprinter->info_2->comment); /* saved comment. */ - slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername, + slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername, ntprinter->info_2->drivername, ntprinter->info_2->comment); } -- cgit From f5ffc036f53432a06a0701481226852e5442f628 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 00:46:39 +0000 Subject: Remove the "stat open" code - make it inline. This should fix the bugs with opening and renaming mp3 files, also the word rename problems that people have had for a while. Needs a make clean :-) make. Jeremy. --- source/include/proto.h | 1929 ++++++++++++++++++++++---------------------- source/include/smb.h | 1 - source/printing/printfsp.c | 1 - source/smbd/close.c | 29 +- source/smbd/dir.c | 27 +- source/smbd/fileio.c | 14 + source/smbd/nttrans.c | 55 +- source/smbd/open.c | 110 +-- source/smbd/posix_acls.c | 2 +- source/smbd/reply.c | 154 ++-- source/smbd/trans2.c | 9 +- source/smbd/vfs-wrap.c | 6 +- 12 files changed, 1106 insertions(+), 1231 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 1bba61ce5c0..ea84eafb94e 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -174,625 +174,128 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/*The following definitions come from lib/snprintf.c */ - - -/*The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/*The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/*The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); - -/*The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); - -/*The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/*The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/*The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/*The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/*The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/*The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/*The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/*The following definitions come from lib/util_sec.c */ +/*The following definitions come from libsmb/cliconnect.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/*The following definitions come from lib/util_sid.c */ +/*The following definitions come from libsmb/cli_dfs.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); -/*The following definitions come from lib/util_sock.c */ +/*The following definitions come from libsmb/clidgram.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int open_pipe_sock(char *path); -int sock_exec(const char *prog); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from lib/util_str.c */ +/*The following definitions come from libsmb/clientgen.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from lib/util_unistr.c */ +/*The following definitions come from libsmb/clierror.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from lib/wins_srv.c */ +/*The following definitions come from libsmb/clifile.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from libsmb/cli_dfs.c */ +/*The following definitions come from libsmb/clilist.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); /*The following definitions come from libsmb/cli_lsarpc.c */ @@ -828,6 +331,13 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/*The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /*The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -854,6 +364,12 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); +/*The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /*The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -861,6 +377,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/*The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/*The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/*The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /*The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -939,6 +505,12 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); +/*The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /*The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -986,350 +558,778 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/cliconnect.c */ +/*The following definitions come from libsmb/clistr.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); + +/*The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/*The following definitions come from libsmb/credentials.c */ + +char *credstr(uchar *cred); +void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/*The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/*The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/*The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); -/*The following definitions come from libsmb/clidgram.c */ +/*The following definitions come from libsmb/nterr.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +char *get_nt_error_msg(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from libsmb/passchange.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); -/*The following definitions come from libsmb/clierror.c */ +/*The following definitions come from libsmb/pwd_cache.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from libsmb/clifile.c */ +/*The following definitions come from lib/smbrun.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/clilist.c */ +/*The following definitions come from libsmb/smbdes.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from libsmb/climessage.c */ +/*The following definitions come from libsmb/smbencrypt.c */ -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/*The following definitions come from libsmb/clioplock.c */ +/*The following definitions come from libsmb/smberr.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -/*The following definitions come from libsmb/cliprint.c */ +/*The following definitions come from libsmb/unexpected.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -/*The following definitions come from libsmb/clirap.c */ +/*The following definitions come from lib/snprintf.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from libsmb/clireadwrite.c */ +/*The following definitions come from lib/substitute.c */ + +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); + +/*The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/*The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); -/*The following definitions come from libsmb/clisecdesc.c */ +/*The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, char *p); -/*The following definitions come from libsmb/clistr.c */ +/*The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/*The following definitions come from libsmb/clitrans.c */ +/*The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/*The following definitions come from libsmb/credentials.c */ +/*The following definitions come from lib/username.c */ -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/*The following definitions come from libsmb/errormap.c */ +/*The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *xmemdup(const void *p, size_t size); +char *xstrdup(const char *s); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/*The following definitions come from libsmb/namequery.c */ +/*The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/*The following definitions come from libsmb/nmblib.c */ +/*The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/*The following definitions come from libsmb/nterr.c */ +/*The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/*The following definitions come from libsmb/passchange.c */ +/*The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/*The following definitions come from libsmb/pwd_cache.c */ +/*The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); -/*The following definitions come from libsmb/smbdes.c */ +/*The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int open_pipe_sock(char *path); +int sock_exec(const char *prog); -/*The following definitions come from libsmb/smbencrypt.c */ +/*The following definitions come from lib/util_str.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -/*The following definitions come from libsmb/smberr.c */ +/*The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrcpy(char *dst, char *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from libsmb/unexpected.c */ +/*The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /*The following definitions come from locking/brlock.c */ @@ -1417,9 +1417,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/*The following definitions come from nmbd/nmbd.c */ - - /*The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1450,6 +1447,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/*The following definitions come from nmbd/nmbd.c */ + + /*The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2328,19 +2328,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /*The following definitions come from printing/print_cups.c */ -/*The following definitions come from printing/print_generic.c */ - - -/*The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /*The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/*The following definitions come from printing/print_generic.c */ + + /*The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2366,6 +2361,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/*The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /*The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2424,6 +2424,39 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/*The following definitions come from rpcclient/cmd_dfs.c */ + + +/*The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/*The following definitions come from rpcclient/cmd_netlogon.c */ + + +/*The following definitions come from rpcclient/cmd_reg.c */ + + +/*The following definitions come from rpcclient/cmd_samr.c */ + +void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); +void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); + +/*The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/*The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/*The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +void init_rpcclient_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password); +struct cli_state *setup_connection(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); + /*The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4118,39 +4151,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/*The following definitions come from rpcclient/cmd_dfs.c */ - - -/*The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/*The following definitions come from rpcclient/cmd_netlogon.c */ - - -/*The following definitions come from rpcclient/cmd_reg.c */ - - -/*The following definitions come from rpcclient/cmd_samr.c */ - -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); - -/*The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/*The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/*The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); - /*The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4261,6 +4261,7 @@ void delete_write_cache(files_struct *fsp); void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size); ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason); void sync_file(connection_struct *conn, files_struct *fsp); +int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst); /*The following definitions come from smbd/filename.c */ @@ -4368,8 +4369,6 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ uint32 desired_access, int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); -files_struct *open_file_stat(connection_struct *conn, char *fname, - SMB_STRUCT_STAT *psbuf, int smb_ofun, int *action); files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf); int close_file_fchmod(files_struct *fsp); files_struct *open_directory(connection_struct *conn, char *fname, @@ -4619,6 +4618,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/*The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /*The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4684,24 +4701,6 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/*The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /*The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/include/smb.h b/source/include/smb.h index 7e9260ba99e..245293d6372 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -410,7 +410,6 @@ typedef struct files_struct BOOL modified; BOOL is_directory; BOOL directory_delete_on_close; - BOOL stat_open; char *fsp_name; } files_struct; diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c index ea50f43d2e2..4f9b649185d 100644 --- a/source/printing/printfsp.c +++ b/source/printing/printfsp.c @@ -69,7 +69,6 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname) fsp->oplock_type = NO_OPLOCK; fsp->sent_oplock_break = NO_BREAK_SENT; fsp->is_directory = False; - fsp->stat_open = False; fsp->directory_delete_on_close = False; fsp->conn = conn; string_set(&fsp->fsp_name,print_job_fname(jobid)); diff --git a/source/smbd/close.c b/source/smbd/close.c index b7bd7bca6d3..38270fbfe31 100644 --- a/source/smbd/close.c +++ b/source/smbd/close.c @@ -91,13 +91,14 @@ static int close_filestruct(files_struct *fsp) connection_struct *conn = fsp->conn; int ret = 0; - if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) - ret = -1; + if (fsp->fd != -1) { + if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) + ret = -1; - delete_write_cache(fsp); + delete_write_cache(fsp); + } fsp->is_directory = False; - fsp->stat_open = False; conn->num_files_open--; SAFE_FREE(fsp->wbmpx_ptr); @@ -160,7 +161,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) GET_DELETE_ON_CLOSE_FLAG(share_entry->share_mode) ) delete_on_close = True; - safe_free(share_entry); + SAFE_FREE(share_entry); /* * NT can set delete_on_close of the last open @@ -262,22 +263,6 @@ static int close_directory(files_struct *fsp, BOOL normal_close) return 0; } -/**************************************************************************** - Close a file opened with null permissions in order to read permissions. -****************************************************************************/ - -static int close_statfile(files_struct *fsp, BOOL normal_close) -{ - close_filestruct(fsp); - - if (fsp->fsp_name) - string_free(&fsp->fsp_name); - - file_free(fsp); - - return 0; -} - /**************************************************************************** Close a directory opened by an NT SMB call. ****************************************************************************/ @@ -286,7 +271,5 @@ int close_file(files_struct *fsp, BOOL normal_close) { if(fsp->is_directory) return close_directory(fsp, normal_close); - else if(fsp->stat_open) - return close_statfile(fsp, normal_close); return close_normal_file(fsp, normal_close); } diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 6cbb43d34db..1cc51e3bb96 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -675,6 +675,7 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) size_t sd_size; files_struct *fsp; int smb_action; + int access_mode; NTSTATUS status; uint32 access_granted; @@ -687,10 +688,12 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) /* Pseudo-open the file (note - no fd's created). */ if(S_ISDIR(ste.st_mode)) - fsp = open_directory(conn, name, &ste, SET_DENY_MODE(DENY_NONE), FILE_OPEN, + fsp = open_directory(conn, name, &ste, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), unix_mode(conn,aRONLY|aDIR, name), &smb_action); else - fsp = open_file_stat(conn,name,&ste,DOS_OPEN_RDONLY,&smb_action); + fsp = open_file_shared1(conn, name, &ste, FILE_READ_ATTRIBUTES, SET_DENY_MODE(DENY_NONE), + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action); + if (!fsp) return False; @@ -704,26 +707,6 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) return se_access_check(psd, current_user.nt_user_token, FILE_READ_DATA, &access_granted, &status); - -#if 0 - /* Old - crappy check :-). JRA */ - - if (ste.st_uid == conn->uid) { - return (ste.st_mode & S_IRUSR) == S_IRUSR; - } else { - int i; - if (ste.st_gid == conn->gid) { - return (ste.st_mode & S_IRGRP) == S_IRGRP; - } - for (i=0; ingroups; i++) { - if (conn->groups[i] == ste.st_gid) { - return (ste.st_mode & S_IRGRP) == S_IRGRP; - } - } - } - - return (ste.st_mode & S_IROTH) == S_IROTH; -#endif } /******************************************************************* diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index 3ac6a041812..d3354b88298 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -646,3 +646,17 @@ void sync_file(connection_struct *conn, files_struct *fsp) conn->vfs_ops.fsync(fsp,fsp->fd); } } + + +/************************************************************ + Perform a stat whether a valid fd or not. +************************************************************/ + +int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst) +{ + if (fsp->fd == -1) + return vfs_stat(fsp->conn, fsp->fsp_name, pst); + else + return vfs_fstat(fsp,fsp->fd, pst); +} + diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 5cd0d391c4a..0f2a13ab106 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -405,13 +405,11 @@ static int map_create_disposition( uint32 create_disposition) Utility function to map share modes. ****************************************************************************/ -static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_options, - uint32 *desired_access, uint32 share_access, uint32 file_attributes) +static int map_share_mode( char *fname, uint32 create_options, + uint32 *desired_access, uint32 share_access, uint32 file_attributes) { int smb_open_mode = -1; - *pstat_open_only = False; - /* * Convert GENERIC bits to specific bits. */ @@ -450,9 +448,6 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt if (smb_open_mode == -1) { - if(*desired_access == WRITE_DAC_ACCESS || *desired_access == READ_CONTROL_ACCESS) - *pstat_open_only = True; - if(*desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS| FILE_EXECUTE|FILE_READ_ATTRIBUTES| FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS| @@ -465,7 +460,6 @@ static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_opt * and map to a stat open. */ - *pstat_open_only = True; smb_open_mode = DOS_OPEN_RDONLY; } else { @@ -650,7 +644,6 @@ int reply_ntcreate_and_X(connection_struct *conn, BOOL bad_path = False; files_struct *fsp=NULL; char *p = NULL; - BOOL stat_open_only = False; time_t c_time; START_PROFILE(SMBntcreateX); @@ -750,7 +743,7 @@ int reply_ntcreate_and_X(connection_struct *conn, */ RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); - if((smb_open_mode = map_share_mode(&stat_open_only, fname, create_options, &desired_access, + if((smb_open_mode = map_share_mode(fname, create_options, &desired_access, share_access, file_attributes)) == -1) { END_PROFILE(SMBntcreateX); @@ -859,26 +852,6 @@ int reply_ntcreate_and_X(connection_struct *conn, END_PROFILE(SMBntcreateX); return(UNIXERROR(ERRDOS,ERRnoaccess)); } -#ifdef EROFS - } else if (((errno == EACCES) || (errno == EROFS)) && stat_open_only) { -#else /* !EROFS */ - } else if (errno == EACCES && stat_open_only) { -#endif - /* - * We couldn't open normally and all we want - * are the permissions. Try and do a stat open. - */ - - oplock_request = 0; - - fsp = open_file_stat(conn,fname,&sbuf,smb_open_mode,&smb_action); - - if(!fsp) { - restore_case_semantics(file_attributes); - END_PROFILE(SMBntcreateX); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } - } else { restore_case_semantics(file_attributes); @@ -1148,7 +1121,6 @@ static int call_nt_transact_create(connection_struct *conn, BOOL bad_path = False; files_struct *fsp = NULL; char *p = NULL; - BOOL stat_open_only = False; uint32 flags; uint32 desired_access; uint32 file_attributes; @@ -1274,7 +1246,7 @@ static int call_nt_transact_create(connection_struct *conn, * and the share access. */ - if((smb_open_mode = map_share_mode( &stat_open_only, fname, create_options, &desired_access, + if((smb_open_mode = map_share_mode( fname, create_options, &desired_access, share_access, file_attributes)) == -1) return ERROR_DOS(ERRDOS,ERRbadaccess); @@ -1347,25 +1319,6 @@ static int call_nt_transact_create(connection_struct *conn, set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } -#ifdef EROFS - } else if (((errno == EACCES) || (errno == EROFS)) && stat_open_only) { -#else /* !EROFS */ - } else if (errno == EACCES && stat_open_only) { -#endif - - /* - * We couldn't open normally and all we want - * are the permissions. Try and do a stat open. - */ - - oplock_request = 0; - - fsp = open_file_stat(conn,fname,&sbuf,smb_open_mode,&smb_action); - - if(!fsp) { - restore_case_semantics(file_attributes); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } } else { restore_case_semantics(file_attributes); diff --git a/source/smbd/open.c b/source/smbd/open.c index 1723aee51f5..e7df394b3af 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -62,7 +62,7 @@ static int fd_open(struct connection_struct *conn, char *fname, int fd_close(struct connection_struct *conn, files_struct *fsp) { if (fsp->fd == -1) - return -1; + return 0; /* what we used to call a stat open. */ return fd_close_posix(conn, fsp); } @@ -89,7 +89,7 @@ static void check_for_pipe(char *fname) ****************************************************************************/ static BOOL open_file(files_struct *fsp,connection_struct *conn, - char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode) + char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode, uint32 desired_access) { extern struct current_user current_user; pstring fname; @@ -152,17 +152,30 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, local_flags &= ~O_TRUNC; /* actually do the open */ - fsp->fd = fd_open(conn, fname, local_flags, mode); - if (fsp->fd == -1) { - DEBUG(3,("Error opening file %s (%s) (local_flags=%d) (flags=%d)\n", - fname,strerror(errno),local_flags,flags)); - check_for_pipe(fname); - return False; - } + if (desired_access == 0 || (desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || + (local_flags & O_CREAT)) { + + fsp->fd = fd_open(conn, fname, local_flags, mode); + + if (fsp->fd == -1) { + DEBUG(3,("Error opening file %s (%s) (local_flags=%d) (flags=%d)\n", + fname,strerror(errno),local_flags,flags)); + check_for_pipe(fname); + return False; + } + } else + fsp->fd == -1; /* What we used to call a stat open. */ if (!VALID_STAT(*psbuf)) { - if (vfs_fstat(fsp,fsp->fd,psbuf) == -1) { + int ret; + + if (fsp->fd == -1) + ret = vfs_stat(conn, fname, psbuf); + else + ret = vfs_fstat(fsp,fsp->fd,psbuf); + + if (ret == -1) { DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); fd_close(conn, fsp); return False; @@ -196,7 +209,6 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, fsp->oplock_type = NO_OPLOCK; fsp->sent_oplock_break = NO_BREAK_SENT; fsp->is_directory = False; - fsp->stat_open = False; fsp->directory_delete_on_close = False; fsp->conn = conn; /* @@ -792,7 +804,8 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ * we can do. We also ensure we're not going to create or tuncate * the file as we only want an access decision at this stage. JRA. */ - fsp_open = open_file(fsp,conn,fname,psbuf,flags|(flags2&~(O_TRUNC|O_CREAT)),mode); + fsp_open = open_file(fsp,conn,fname,psbuf, + flags|(flags2&~(O_TRUNC|O_CREAT)),mode,desired_access); DEBUG(4,("open_file_shared : share_mode deny - calling open_file with \ flags=0x%X flags2=0x%X mode=0%o returned %d\n", @@ -825,10 +838,10 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", * open_file strips any O_TRUNC flags itself. */ - fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode); + fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode,desired_access); if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT) && fcbopen) { - if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode)) == True) + if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode,desired_access)) == True) flags = O_RDONLY; } @@ -985,73 +998,6 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", return fsp; } -/**************************************************************************** - Open a file for permissions read only. Return a pseudo file entry - with the 'stat_open' flag set -****************************************************************************/ - -files_struct *open_file_stat(connection_struct *conn, char *fname, - SMB_STRUCT_STAT *psbuf, int smb_ofun, int *action) -{ - extern struct current_user current_user; - files_struct *fsp = NULL; - - if (!VALID_STAT(*psbuf)) { - DEBUG(0,("open_file_stat: unable to stat name = %s. Error was %s\n", fname, strerror(errno) )); - return NULL; - } - - if(S_ISDIR(psbuf->st_mode)) { - DEBUG(0,("open_file_stat: %s is a directory !\n", fname )); - return NULL; - } - - fsp = file_new(conn); - if(!fsp) - return NULL; - - *action = FILE_WAS_OPENED; - - DEBUG(5,("open_file_stat: opening file %s as a stat entry\n", fname)); - - /* - * Setup the files_struct for it. - */ - - fsp->mode = psbuf->st_mode; - fsp->inode = psbuf->st_ino; - fsp->dev = psbuf->st_dev; - fsp->size = psbuf->st_size; - fsp->vuid = current_user.vuid; - fsp->pos = -1; - fsp->can_lock = False; - fsp->can_read = False; - fsp->can_write = False; - fsp->share_mode = 0; - fsp->print_file = False; - fsp->modified = False; - fsp->oplock_type = NO_OPLOCK; - fsp->sent_oplock_break = NO_BREAK_SENT; - fsp->is_directory = False; - fsp->stat_open = True; - fsp->directory_delete_on_close = False; - fsp->conn = conn; - /* - * Note that the file name here is the *untranslated* name - * ie. it is still in the DOS codepage sent from the client. - * All use of this filename will pass though the sys_xxxx - * functions which will do the dos_to_unix translation before - * mapping into a UNIX filename. JRA. - */ - string_set(&fsp->fsp_name,fname); - fsp->wbmpx_ptr = NULL; - fsp->wcp = NULL; /* Write cache pointer. */ - - conn->num_files_open++; - - return fsp; -} - /**************************************************************************** Open a file for for write to ensure that we can fchmod it. ****************************************************************************/ @@ -1068,7 +1014,7 @@ files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_ if(!fsp) return NULL; - fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0); + fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,0); /* * This is not a user visible file open. diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 958d1e3c927..3a2bbff099d 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -2095,7 +2095,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) if ((file_ace_list == NULL) && (dir_ace_list == NULL)) { /* W2K traverse DACL set - ignore. */ return True; - } + } if (!acl_perms) { DEBUG(3,("set_nt_acl: cannot set permissions\n")); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index fddbd3176ad..e96a982e488 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2927,10 +2927,9 @@ int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size, return ERROR_DOS(ERRDOS,ERRbadfid); } - if(fsp->is_directory || fsp->stat_open) { + if(fsp->is_directory) { /* - * Special case - close NT SMB directory or stat file - * handle. + * Special case - close NT SMB directory handle. */ DEBUG(3,("close %s fnum=%d\n", fsp->is_directory ? "directory" : "stat file open", fsp->fnum)); close_file(fsp,True); @@ -4640,54 +4639,54 @@ int reply_readbmpx(connection_struct *conn, char *inbuf,char *outbuf,int length, int reply_setattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize) { - struct utimbuf unix_times; - int outsize = 0; - files_struct *fsp = file_fsp(inbuf,smb_vwv0); - START_PROFILE(SMBsetattrE); + struct utimbuf unix_times; + int outsize = 0; + files_struct *fsp = file_fsp(inbuf,smb_vwv0); + START_PROFILE(SMBsetattrE); - outsize = set_message(outbuf,0,0,True); + outsize = set_message(outbuf,0,0,True); - CHECK_FSP(fsp,conn); + if(!fsp || (fsp->conn != conn)) { + END_PROFILE(SMBgetattrE); + return ERROR_DOS(ERRDOS,ERRbadfid); + } - /* Convert the DOS times into unix times. Ignore create - time as UNIX can't set this. - */ - unix_times.actime = make_unix_date2(inbuf+smb_vwv3); - unix_times.modtime = make_unix_date2(inbuf+smb_vwv5); + /* + * Convert the DOS times into unix times. Ignore create + * time as UNIX can't set this. + */ + unix_times.actime = make_unix_date2(inbuf+smb_vwv3); + unix_times.modtime = make_unix_date2(inbuf+smb_vwv5); - /* - * Patch from Ray Frush - * Sometimes times are sent as zero - ignore them. - */ + /* + * Patch from Ray Frush + * Sometimes times are sent as zero - ignore them. + */ - if ((unix_times.actime == 0) && (unix_times.modtime == 0)) - { - /* Ignore request */ - if( DEBUGLVL( 3 ) ) - { - dbgtext( "reply_setattrE fnum=%d ", fsp->fnum); - dbgtext( "ignoring zero request - not setting timestamps of 0\n" ); - } - END_PROFILE(SMBsetattrE); - return(outsize); - } - else if ((unix_times.actime != 0) && (unix_times.modtime == 0)) - { - /* set modify time = to access time if modify time was 0 */ - unix_times.modtime = unix_times.actime; - } + if ((unix_times.actime == 0) && (unix_times.modtime == 0)) { + /* Ignore request */ + if( DEBUGLVL( 3 ) ) { + dbgtext( "reply_setattrE fnum=%d ", fsp->fnum); + dbgtext( "ignoring zero request - not setting timestamps of 0\n" ); + } + END_PROFILE(SMBsetattrE); + return(outsize); + } else if ((unix_times.actime != 0) && (unix_times.modtime == 0)) { + /* set modify time = to access time if modify time was 0 */ + unix_times.modtime = unix_times.actime; + } - /* Set the date on this file */ - if(file_utime(conn, fsp->fsp_name, &unix_times)) { - END_PROFILE(SMBsetattrE); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + /* Set the date on this file */ + if(file_utime(conn, fsp->fsp_name, &unix_times)) { + END_PROFILE(SMBsetattrE); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } - DEBUG( 3, ( "reply_setattrE fnum=%d actime=%d modtime=%d\n", - fsp->fnum, (int)unix_times.actime, (int)unix_times.modtime ) ); + DEBUG( 3, ( "reply_setattrE fnum=%d actime=%d modtime=%d\n", + fsp->fnum, (int)unix_times.actime, (int)unix_times.modtime ) ); - END_PROFILE(SMBsetattrE); - return(outsize); + END_PROFILE(SMBsetattrE); + return(outsize); } @@ -4888,44 +4887,47 @@ int reply_writebs(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz int reply_getattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize) { - SMB_STRUCT_STAT sbuf; - int outsize = 0; - int mode; - files_struct *fsp = file_fsp(inbuf,smb_vwv0); - START_PROFILE(SMBgetattrE); + SMB_STRUCT_STAT sbuf; + int outsize = 0; + int mode; + files_struct *fsp = file_fsp(inbuf,smb_vwv0); + START_PROFILE(SMBgetattrE); - outsize = set_message(outbuf,11,0,True); + outsize = set_message(outbuf,11,0,True); - CHECK_FSP(fsp,conn); + if(!fsp || (fsp->conn != conn)) { + END_PROFILE(SMBgetattrE); + return ERROR_DOS(ERRDOS,ERRbadfid); + } - /* Do an fstat on this file */ - if(vfs_fstat(fsp,fsp->fd, &sbuf)) { - END_PROFILE(SMBgetattrE); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } + /* Do an stat on this file */ + + if(fsp_stat(fsp, &sbuf)) { + END_PROFILE(SMBgetattrE); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } - mode = dos_mode(conn,fsp->fsp_name,&sbuf); + mode = dos_mode(conn,fsp->fsp_name,&sbuf); - /* Convert the times into dos times. Set create - date to be last modify date as UNIX doesn't save - this */ - put_dos_date2(outbuf,smb_vwv0,get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)))); - put_dos_date2(outbuf,smb_vwv2,sbuf.st_atime); - put_dos_date2(outbuf,smb_vwv4,sbuf.st_mtime); - if (mode & aDIR) - { - SIVAL(outbuf,smb_vwv6,0); - SIVAL(outbuf,smb_vwv8,0); - } - else - { - SIVAL(outbuf,smb_vwv6,(uint32)sbuf.st_size); - SIVAL(outbuf,smb_vwv8,SMB_ROUNDUP(sbuf.st_size,1024)); - } - SSVAL(outbuf,smb_vwv10, mode); + /* Convert the times into dos times. Set create + * date to be last modify date as UNIX doesn't save + * this. + */ + + put_dos_date2(outbuf,smb_vwv0,get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)))); + put_dos_date2(outbuf,smb_vwv2,sbuf.st_atime); + put_dos_date2(outbuf,smb_vwv4,sbuf.st_mtime); + if (mode & aDIR) { + SIVAL(outbuf,smb_vwv6,0); + SIVAL(outbuf,smb_vwv8,0); + } else { + SIVAL(outbuf,smb_vwv6,(uint32)sbuf.st_size); + SIVAL(outbuf,smb_vwv8,SMB_ROUNDUP(sbuf.st_size,1024)); + } + SSVAL(outbuf,smb_vwv10, mode); - DEBUG( 3, ( "reply_getattrE fnum=%d\n", fsp->fnum)); + DEBUG( 3, ( "reply_getattrE fnum=%d\n", fsp->fnum)); - END_PROFILE(SMBgetattrE); - return(outsize); + END_PROFILE(SMBgetattrE); + return(outsize); } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index c700436be18..28eb849971b 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1560,7 +1560,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level)); - if(fsp && (fsp->is_directory || fsp->stat_open)) { + if(fsp && (fsp->is_directory || fsp->fd == -1)) { /* * This is actually a QFILEINFO on a directory * handle (returned from an NT SMB). NT5.0 seems @@ -2107,11 +2107,6 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close) fsp->directory_delete_on_close = delete_on_close; DEBUG(10, ("set_delete_on_close_internal: %s delete on close flag for fnum = %d, directory %s\n", delete_on_close ? "Added" : "Removed", fsp->fnum, fsp->fsp_name )); - } else if(fsp->stat_open) { - - DEBUG(10, ("set_delete_on_close_internal: %s delete on close flag for fnum = %d, stat open %s\n", - delete_on_close ? "Added" : "Removed", fsp->fnum, fsp->fsp_name )); - } else { files_struct *iterate_fsp; @@ -2261,7 +2256,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char fsp = file_fsp(params,0); info_level = SVAL(params,2); - if(fsp && (fsp->is_directory || fsp->stat_open)) { + if(fsp && (fsp->is_directory || fsp->fd == -1)) { /* * This is actually a SETFILEINFO on a directory * handle (returned from an NT SMB). NT5.0 seems diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index da47fe69ec7..fb9015356b4 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -170,11 +170,13 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n) SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence) { - SMB_OFF_T result; + SMB_OFF_T result = 0; START_PROFILE(syscall_lseek); - result = sys_lseek(filedes, offset, whence); + /* Cope with 'stat' file opens. */ + if (filedes != -1) + result = sys_lseek(filedes, offset, whence); /* * We want to maintain the fiction that we can seek -- cgit From a1ab19535d8e15976e8c33df5a9cd2a1fec4d3b4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 20 Mar 2002 00:48:58 +0000 Subject: Cut&paste bug in sam_io_user_info25() Spotted by "James E. Flemer" --- source/rpc_parse/parse_samr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c index ad8adcdabb4..7fecbfb806c 100644 --- a/source/rpc_parse/parse_samr.c +++ b/source/rpc_parse/parse_samr.c @@ -5611,7 +5611,7 @@ static BOOL sam_io_user_info25(char *desc, SAM_USER_INFO_25 * usr, prs_struct *p if (usr == NULL) return False; - prs_debug(ps, depth, desc, "sam_io_user_info23"); + prs_debug(ps, depth, desc, "sam_io_user_info25"); depth++; if(!prs_align(ps)) -- cgit From f46e50ef8da0e3003debdb505f7d2ea9973e867c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 00:58:27 +0000 Subject: Ensure we get a real fd when opening for set file allocation. Jeremy. --- source/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 28eb849971b..d4c5c5e0665 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2472,7 +2472,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char return -1; } - new_fsp = open_file_shared(conn, fname, &sbuf, + new_fsp = open_file_shared1(conn, fname, &sbuf,FILE_WRITE_DATA, SET_OPEN_MODE(DOS_OPEN_RDWR), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &action); -- cgit From 9936b8caeb14de8687c257dfaa62195164e97c10 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Wed, 20 Mar 2002 01:21:59 +0000 Subject: Don't ignore error returns from string_to_sid ... Beware the jabberwock! --- source/nsswitch/winbindd_sid.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 5868f098eba..39ae6d4af00 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -40,7 +40,7 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) /* Lookup sid from PDC using lsa_lookup_sids() */ if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(5, ("%s not a SID\n", state->request.data.sid)); + DEBUG(5, ("%s not a SID!\n", state->request.data.sid)); return WINBINDD_ERROR; } @@ -109,7 +109,11 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) /* Split sid into domain sid and user rid */ - string_to_sid(&sid, state->request.data.sid); + if (!string_to_sid(&sid, state->request.data.sid)) { + DEBUG(0, ("%s not a SID!\n", state->request.data.sid)); + return WINBINDD_ERROR; + } + sid_split_rid(&sid, &user_rid); /* Find domain this sid belongs to */ @@ -148,7 +152,11 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) /* Split sid into domain sid and user rid */ - string_to_sid(&sid, state->request.data.sid); + if (!string_to_sid(&sid, state->request.data.sid)) { + DEBUG(0, ("%s not a SID!\n", state->request.data.sid)); + return WINBINDD_ERROR; + } + sid_split_rid(&sid, &group_rid); /* Find domain this sid belongs to */ -- cgit From 103c012e2d1c2609ef35c615e5075ce1c9e19bec Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 20 Mar 2002 01:28:59 +0000 Subject: This should actually get samba_2_2 testing green on the build farm! (I hope) Andrew Bartlett --- testsuite/build_farm/basicsmb.fns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/build_farm/basicsmb.fns b/testsuite/build_farm/basicsmb.fns index 592cb62de48..d9ac08639b5 100644 --- a/testsuite/build_farm/basicsmb.fns +++ b/testsuite/build_farm/basicsmb.fns @@ -1,7 +1,7 @@ test_smb_conf_setup() { cat basicsmb.smb.conf.template | \ sed "s|PREFIX|$prefix|g" | \ - sed "s|BUILD_FARM|$pwd|g" | \ + sed "s|BUILD_FARM|$test_root|g" | \ sed "s|WHOAMI|$whoami|g" | \ sed "s|LOGLEVEL|$loglevel|g" \ > $prefix/lib/smb.conf -- cgit From 78a5d81564569734a8399ba82f68982ab5776e53 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 01:43:55 +0000 Subject: Test against W2K that we're doing large read/writes correctly (we are). At least with 14 word writes. Jeremy. --- source/libsmb/clireadwrite.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c index 93333bff951..837685ff8a9 100644 --- a/source/libsmb/clireadwrite.c +++ b/source/libsmb/clireadwrite.c @@ -224,6 +224,14 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 { char *p; + if (size > cli->bufsize) { + cli->outbuf = realloc(cli->outbuf, size + 1024); + cli->inbuf = realloc(cli->inbuf, size + 1024); + if (cli->outbuf == NULL || cli->inbuf == NULL) + return False; + cli->bufsize = size + 1024; + } + memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); @@ -301,6 +309,7 @@ ssize_t cli_write(struct cli_state *cli, break; bwritten += SVAL(cli->inbuf, smb_vwv2); + bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))>>16); } while (received < issued && cli_receive_smb(cli)) -- cgit From 55df1f9a19908cb8871737dc47b2d87373ece9f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 01:47:28 +0000 Subject: Correctly increment offset in cli_smbwrite. Jeremy. --- source/libsmb/clireadwrite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c index 837685ff8a9..ca0b1bb2d51 100644 --- a/source/libsmb/clireadwrite.c +++ b/source/libsmb/clireadwrite.c @@ -367,6 +367,8 @@ ssize_t cli_smbwrite(struct cli_state *cli, size1 -= size; total += size; + offset += size; + } while (size1); return total; -- cgit From 8988e4467974d44f7e927f81fa32c89c5f8d2d51 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 20 Mar 2002 01:57:17 +0000 Subject: we ned to read smb.conf file before init of codepages. Add -d option to set debug level --- source/utils/masktest.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source/utils/masktest.c b/source/utils/masktest.c index 2493e94bb76..001b3a1feb7 100644 --- a/source/utils/masktest.c +++ b/source/utils/masktest.c @@ -419,6 +419,7 @@ static void usage(void) extern char *optarg; extern int optind; extern FILE *dbf; + extern BOOL AllowDebugChange; int opt; char *p; int seed; @@ -426,6 +427,8 @@ static void usage(void) setlinebuf(stdout); + AllowDebugChange = False; + DEBUGLEVEL = 0; dbf = stderr; if (argc < 2 || argv[1][0] == '-') { @@ -444,10 +447,6 @@ static void usage(void) TimeInit(); charset_initialise(); - codepage_initialise(lp_client_code_page()); - - lp_load(servicesf,True,False,False); - load_interfaces(); if (getenv("USER")) { pstrcpy(username,getenv("USER")); @@ -455,8 +454,11 @@ static void usage(void) seed = time(NULL); - while ((opt = getopt(argc, argv, "U:s:hm:f:aoW:M:vE")) != EOF) { + while ((opt = getopt(argc, argv, "d:U:s:hm:f:aoW:M:vE")) != EOF) { switch (opt) { + case 'd': + DEBUGLEVEL = atoi(optarg); + break; case 'E': die_on_error = 1; break; @@ -502,6 +504,9 @@ static void usage(void) argc -= optind; argv += optind; + lp_load(servicesf,True,False,False); + load_interfaces(); + codepage_initialise(lp_client_code_page()); cli = connect_one(share); if (!cli) { -- cgit From 622ccc023969b6e3150d34ed402ce8eea93416f9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Mar 2002 03:07:59 +0000 Subject: i'm assuming this was just a typo. If not, jeremy, please correct. --- source/smbd/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/open.c b/source/smbd/open.c index e7df394b3af..434b8e48177 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -165,7 +165,7 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, return False; } } else - fsp->fd == -1; /* What we used to call a stat open. */ + fsp->fd = -1; /* What we used to call a stat open. */ if (!VALID_STAT(*psbuf)) { int ret; -- cgit From 94d6c092e555ffa865d854adcea8995fabb0d2bf Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Mar 2002 03:10:26 +0000 Subject: fix the parsing for the SPOOLSS_RESETPRINTER call. Noticed by JohnR. Also check the printer handle used in the call to ensure it is valid. --- source/include/rpc_spoolss.h | 2 ++ source/rpc_parse/parse_spoolss.c | 26 +++++++++++++------------- source/rpc_server/srv_spoolss_nt.c | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 8843c94b0de..d60d374f3b6 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1807,6 +1807,8 @@ SPOOL_R_SETPRINTERDATA; typedef struct spool_q_resetprinter { POLICY_HND handle; + uint32 datatype_ptr; + UNISTR2 datatype; uint32 unknown1; DEVMODE_CTR devmode_ctr; diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 7acc9a3a99f..53c39599dbc 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -5,7 +5,7 @@ * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, * Copyright (C) Jean François Micouleau 1998-2000, - * Copyright (C) Gerald Carter 2000, + * Copyright (C) Gerald Carter 2000-2002 * Copyright (C) Tim Potter 2001. * * This program is free software; you can redistribute it and/or modify @@ -4914,12 +4914,9 @@ BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LE init a SPOOL_Q_ADDPRINTERDRIVER struct ******************************************************************/ -BOOL make_spoolss_q_addprinterdriver( - TALLOC_CTX *mem_ctx, - SPOOL_Q_ADDPRINTERDRIVER *q_u, - const char* srv_name, - uint32 level, - PRINTER_DRIVER_CTR *info) +BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, + SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, + uint32 level, PRINTER_DRIVER_CTR *info) { DEBUG(5,("make_spoolss_q_addprinterdriver\n")); @@ -4950,11 +4947,9 @@ BOOL make_spoolss_q_addprinterdriver( return True; } -BOOL make_spoolss_driver_info_3( - TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, - DRIVER_INFO_3 *info3 -) +BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx, + SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, + DRIVER_INFO_3 *info3) { uint32 len = 0; uint16 *ptr = info3->dependentfiles; @@ -5741,8 +5736,13 @@ BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth)) return False; - if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1)) + if (!prs_uint32("datatype_ptr", ps, depth, &q_u->datatype_ptr)) return False; + + if (q_u->datatype_ptr) { + if (!smb_io_unistr2("datatype", &q_u->datatype, q_u->datatype_ptr?True:False, ps, depth)) + return False; + } if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) return False; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 80129caea43..1e56dc36c4b 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -6695,6 +6695,28 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u) { + POLICY_HND *handle = &q_u->handle; + Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + int snum; + + DEBUG(5,("_spoolss_resetprinter\n")); + + /* + * All we do is to check to see if the handle and queue is valid. + * This call really doesn't mean anything to us because we only + * support RAW printing. --jerry + */ + + if (!Printer) { + DEBUG(2,("_spoolss_resetprinter: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); + return WERR_BADFID; + } + + if (!get_printer_snum(p,handle, &snum)) + return WERR_BADFID; + + + /* blindly return success */ return WERR_OK; } -- cgit From a0e77ba8de04ceb6a318dcce940c69dc03faccb0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Mar 2002 03:22:55 +0000 Subject: remove unused member from SPOOL_Q_RESETPRINTER --- source/include/rpc_spoolss.h | 1 - 1 file changed, 1 deletion(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index d60d374f3b6..375c55fd41a 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1809,7 +1809,6 @@ typedef struct spool_q_resetprinter POLICY_HND handle; uint32 datatype_ptr; UNISTR2 datatype; - uint32 unknown1; DEVMODE_CTR devmode_ctr; } SPOOL_Q_RESETPRINTER; -- cgit From 2cbe742c6e6a6502db8feb21ba76d59f87f5b971 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 07:20:43 +0000 Subject: BUFFER_SIZE Should be 128k if large read write tests are to work. Jeremy. --- source/include/smb.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/include/smb.h b/source/include/smb.h index 245293d6372..6144d65c01d 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -25,7 +25,12 @@ #ifndef _SMB_H #define _SMB_H +#if defined(LARGE_SMB_OFF_T) +#define BUFFER_SIZE (128*1024) +#else /* no large readwrite possible */ #define BUFFER_SIZE (0xFFFF) +#endif + #define SAFETY_MARGIN 1024 #define LARGE_WRITEX_HDR_SIZE 65 -- cgit From ccf13e78cf133699813d1a6c843b03df37136b51 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 21:08:00 +0000 Subject: John's patch changed the size of a structure stored in the tdb - we must thus update the versionid of the tdb. Jeremy. --- source/include/printing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/printing.h b/source/include/printing.h index e87865f21bd..4cd1fdc98b5 100644 --- a/source/include/printing.h +++ b/source/include/printing.h @@ -72,6 +72,6 @@ extern struct printif cups_printif; #define MAX_CACHE_VALID_TIME 3600 #define PRINT_SPOOL_PREFIX "smbprn." -#define PRINT_DATABASE_VERSION 2 +#define PRINT_DATABASE_VERSION 3 #endif /* PRINTING_H_ */ -- cgit From 63ceee3ef99dd484c2d5cba79fc29e90033a6beb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 21:55:01 +0000 Subject: Fixup debugs with fn names. Jeremy. --- source/nsswitch/winbindd_sid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 39ae6d4af00..3caf6fd95bf 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -40,7 +40,7 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) /* Lookup sid from PDC using lsa_lookup_sids() */ if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(5, ("%s not a SID!\n", state->request.data.sid)); + DEBUG(5, ("winbindd_lookupsid: %s not a SID!\n", state->request.data.sid)); return WINBINDD_ERROR; } @@ -110,7 +110,7 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) /* Split sid into domain sid and user rid */ if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(0, ("%s not a SID!\n", state->request.data.sid)); + DEBUG(5, ("winbindd_sid_to_uid: %s not a SID!\n", state->request.data.sid)); return WINBINDD_ERROR; } @@ -122,7 +122,7 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) fstring sid_str; sid_to_string(sid_str, &sid); - DEBUG(1, ("Could not find domain for sid %s\n", sid_str)); + DEBUG(1, ("winbindd_sid_to_uid: Could not find domain for sid %s\n", sid_str)); return WINBINDD_ERROR; } @@ -147,13 +147,13 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) uint32 group_rid; struct winbindd_domain *domain; - DEBUG(3, ("[%5d]: sid to gid %s\n", state->pid, + DEBUG(3, ("winbindd_sid_to_gid: [%5d]: sid to gid %s\n", state->pid, state->request.data.sid)); /* Split sid into domain sid and user rid */ if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(0, ("%s not a SID!\n", state->request.data.sid)); + DEBUG(5, ("winbindd_sid_to_gid: %s not a SID!\n", state->request.data.sid)); return WINBINDD_ERROR; } -- cgit From 199ae1509f14fbee3adbd525ddadf7851ab93e4a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 21:56:00 +0000 Subject: Print queue entries *must* have queue names, not numbers - numbers are not identical between different smbds (mr potter, come here and take your medicine.... :-). Jeremy. --- source/include/printing.h | 4 ++-- source/printing/printing.c | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/source/include/printing.h b/source/include/printing.h index 4cd1fdc98b5..53a5df69484 100644 --- a/source/include/printing.h +++ b/source/include/printing.h @@ -43,7 +43,7 @@ struct printjob { fstring filename; /* the filename used to spool the file */ fstring jobname; /* the job name given to us by the client */ fstring user; /* the user who started the job */ - int snum; /* service number of printer for this job */ + fstring queuename; /* service number of printer for this job */ }; /* Information for print interfaces */ @@ -72,6 +72,6 @@ extern struct printif cups_printif; #define MAX_CACHE_VALID_TIME 3600 #define PRINT_SPOOL_PREFIX "smbprn." -#define PRINT_DATABASE_VERSION 3 +#define PRINT_DATABASE_VERSION 4 #endif /* PRINTING_H_ */ diff --git a/source/printing/printing.c b/source/printing/printing.c index 78eacd9cf51..ed70d52a51c 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -168,7 +168,7 @@ static void print_unix_job(int snum, print_queue_struct *q) fstrcpy(pj.filename, ""); fstrcpy(pj.jobname, q->fs_file); fstrcpy(pj.user, q->fs_user); - pj.snum = snum; + fstrcpy(pj.queuename, lp_servicename(snum)); print_job_store(jobid, &pj); } @@ -190,7 +190,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); - if (ts->snum != pjob.snum) { + if (!strequal(lp_servicename(ts->snum), pjob.queuename)) { /* this isn't for the queue we are looking at */ ts->total_jobs++; return 0; @@ -511,7 +511,7 @@ int print_job_snum(int jobid) struct printjob *pjob = print_job_find(jobid); if (!pjob) return -1; - return pjob->snum; + return find_service(pjob->queuename); } /**************************************************************************** @@ -582,6 +582,10 @@ static BOOL print_job_delete1(int jobid) return True; snum = print_job_snum(jobid); + if (snum == -1) { + DEBUG(5,("print_job_delete1: unknown service number for jobid %d\n", jobid)); + return False; + } /* Hrm - we need to be able to cope with deleting a job before it has reached the spooler. */ @@ -638,7 +642,12 @@ BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode) int snum = print_job_snum(jobid); char *printer_name; BOOL owner; - + + if (snum == -1) { + DEBUG(5,("print_job_delete: unknown service number for jobid %d\n", jobid)); + return False; + } + owner = is_owner(user, jobid); /* Check access against security descriptor or whether the user @@ -682,6 +691,10 @@ BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode) if (!pjob->spooled || pjob->sysjob == -1) return False; snum = print_job_snum(jobid); + if (snum == -1) { + DEBUG(5,("print_job_pause: unknown service number for jobid %d\n", jobid)); + return False; + } if (!is_owner(user, jobid) && !print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) { @@ -727,6 +740,10 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode) if (!pjob->spooled || pjob->sysjob == -1) return False; snum = print_job_snum(jobid); + if (snum == -1) { + DEBUG(5,("print_job_resume: unknown service number for jobid %d\n", jobid)); + return False; + } if (!is_owner(user, jobid) && !print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) { @@ -953,7 +970,7 @@ int print_job_start(struct current_user *user, int snum, char *jobname) fstrcpy(pjob.user, unix_to_dos_static(uidtoname(user->uid))); } - pjob.snum = snum; + fstrcpy(pjob.queuename, lp_servicename(snum)); /* lock the database */ tdb_lock_bystring(tdb, "INFO/nextjob"); @@ -1057,6 +1074,10 @@ BOOL print_job_end(int jobid, BOOL normal_close) return False; snum = print_job_snum(jobid); + if (snum == -1) { + DEBUG(5,("print_job_end: unknown service number for jobid %d\n", jobid)); + return False; + } if (normal_close && (sys_fstat(pjob->fd, &sbuf) == 0)) { pjob->size = sbuf.st_size; @@ -1124,7 +1145,8 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void * memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != pjob.snum) return 0; + if (!strequal(lp_servicename(ts->snum), pjob.queuename)) + return 0; if (ts->qcount >= ts->maxcount) return 0; @@ -1160,7 +1182,8 @@ static int traverse_count_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != pjob.snum) return 0; + if (!strequal(lp_servicename(ts->snum), pjob.queuename)) + return 0; ts->count++; -- cgit From 8e832a7de3177e47a570f66764093a5ae38862b8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 Mar 2002 22:33:15 +0000 Subject: Ensure queuename is always stored in UNIX character set. Ensure we don't do lp_servicename()'s in tdb traverse as this allocates lots of memory. Jeremy. --- source/printing/printing.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/printing/printing.c b/source/printing/printing.c index ed70d52a51c..95e6be27cbf 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -109,6 +109,7 @@ static struct printjob *print_job_find(int jobid) memcpy(&pjob, ret.dptr, sizeof(pjob)); SAFE_FREE(ret.dptr); + unix_to_dos(pjob.queuename); return &pjob; } @@ -119,10 +120,14 @@ static struct printjob *print_job_find(int jobid) static BOOL print_job_store(int jobid, struct printjob *pjob) { TDB_DATA d; + BOOL ret; + + dos_to_unix(pjob->queuename); d.dptr = (void *)pjob; d.dsize = sizeof(*pjob); - - return (tdb_store(tdb, print_key(jobid), d, TDB_REPLACE) == 0); + ret = (tdb_store(tdb, print_key(jobid), d, TDB_REPLACE) == 0); + unix_to_dos(pjob->queuename); + return ret; } /**************************************************************************** @@ -189,8 +194,9 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0; memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); + unix_to_dos(pjob.queuename); - if (!strequal(lp_servicename(ts->snum), pjob.queuename)) { + if (ts->snum != lp_servicenumber(pjob.queuename)) { /* this isn't for the queue we are looking at */ ts->total_jobs++; return 0; @@ -1143,9 +1149,10 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void * if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0; memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); + unix_to_dos(pjob.queuename); /* maybe it isn't for this queue */ - if (!strequal(lp_servicename(ts->snum), pjob.queuename)) + if (ts->snum != lp_servicenumber(pjob.queuename)) return 0; if (ts->qcount >= ts->maxcount) return 0; @@ -1180,9 +1187,10 @@ static int traverse_count_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0; memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); + unix_to_dos(pjob.queuename); /* maybe it isn't for this queue */ - if (!strequal(lp_servicename(ts->snum), pjob.queuename)) + if (ts->snum != lp_servicenumber(pjob.queuename)) return 0; ts->count++; -- cgit From b8448f785e0d59bfc5d725979a1d83f663371ed4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Mar 2002 23:05:07 +0000 Subject: merge from APPLIANCE_HEAD --- source/rpc_server/srv_spoolss_nt.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 1e56dc36c4b..9cc0b876853 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -715,7 +715,6 @@ static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) { PRINTER_MESSAGE_INFO msg; - pid_t my_pid = sys_getpid(); if (len < sizeof(msg)) { DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len)); @@ -724,11 +723,6 @@ static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size memcpy(&msg, buf, sizeof(PRINTER_MESSAGE_INFO)); - if (my_pid == src) { - DEBUG(10,("srv_spoolss_receive_message: Skipping message to myself\n")); - return; - } - DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x flags=0x%x\n", msg.printer_name, (unsigned int)msg.low, (unsigned int)msg.high, msg.flags )); @@ -5050,12 +5044,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, fstrcpy(msg.printer_name, printer->info_2->printername); /* only send a notify if something changed */ - if (msg.flags) - { - /* send to myself before replying to SetPrinter() */ - send_spoolss_event_notification(&msg); - - /* send to other smbd's */ + if (msg.flags) { srv_spoolss_sendnotify(msg.printer_name, 0, PRINTER_CHANGE_ADD_PRINTER, msg.flags); } -- cgit From aed5a040f060ec7fde043d55a15827a653a17c1f Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 14:11:40 +0000 Subject: always return . and .. first for readdir. This fixes masktest on IRIX which returns . then all single letter files then .. then other files. --- source/smbd/dir.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 1cc51e3bb96..ce8b992a301 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -730,10 +730,22 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) dirp->pos = dirp->numentries = dirp->mallocsize = 0; dirp->data = dirp->current = NULL; - while ((n = vfs_readdirname(conn, p))) + while (True) { int l; + if (used == 0) { + n = "."; + } else if (used == 2) { + n = ".."; + } else { + n = vfs_readdirname(conn, p); + if (n == NULL) + break; + if ((strcmp(".",n) == 0) ||(strcmp("..",n) == 0)) + continue; + } + l = strlen(n)+1; /* Return value of vfs_readdirname has already gone through -- cgit From 2ef58e4d5c36626ac71c69a852885e4fa76c5bc3 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 14:16:12 +0000 Subject: add rest of torture targets --- source/bin/.cvsignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/bin/.cvsignore b/source/bin/.cvsignore index 17457b33b82..46039754012 100644 --- a/source/bin/.cvsignore +++ b/source/bin/.cvsignore @@ -1,9 +1,13 @@ .dummy .libs debug2html +locktest +locktest2 make_printerdef make_smbcodepage make_unicodemap +masktest +msgtest nmbd nmblookup nsstest -- cgit From d43d3543763ab712f912c07e08151981ebc5d58e Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 18:08:28 +0000 Subject: build tdbbackup by default --- source/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 4a8306d95cf..035f9a00d40 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -91,7 +91,7 @@ WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@ WINBIND_LPROGS = @WINBIND_LTARGETS@ SPROGS = bin/smbd bin/nmbd bin/swat -PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/make_printerdef @RUNPROG@ +PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@ PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ MPROGS = @MPROGS@ LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) -- cgit From dd646500623af51ec04090a0d4a8fe09d6a8ba9d Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 18:10:48 +0000 Subject: merge from HEAD --- source/tdb/tdbbackup.c | 163 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 139 insertions(+), 24 deletions(-) diff --git a/source/tdb/tdbbackup.c b/source/tdb/tdbbackup.c index 9f2fbdab3c1..48c4272d331 100644 --- a/source/tdb/tdbbackup.c +++ b/source/tdb/tdbbackup.c @@ -18,6 +18,29 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* + + This program is meant for backup/restore of tdb databases. Typical usage would be: + tdbbackup *.tdb + when Samba shuts down cleanly, which will make a backup of all the local databases + to *.bak files. Then on Samba startup you would use: + tdbbackup -v *.tdb + and this will check the databases for corruption and if corruption is detected then + the backup will be restored. + + You may also like to do a backup on a regular basis while Samba is + running, perhaps using cron. + + The reason this program is needed is to cope with power failures + while Samba is running. A power failure could lead to database + corruption and Samba will then not start correctly. + + Note that many of the databases in Samba are transient and thus + don't need to be backed up, so you can optimise the above a little + by only running the backup on the critical databases. + + */ + #include #include #include @@ -34,6 +57,20 @@ static int failed; +static char *add_suffix(const char *name, const char *suffix) +{ + char *ret; + int len = strlen(name) + strlen(suffix) + 1; + ret = malloc(len); + if (!ret) { + fprintf(stderr,"Out of memory!\n"); + exit(1); + } + strncpy(ret, name, len); + strncat(ret, suffix, len); + return ret; +} + static int copy_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) { TDB_CONTEXT *tdb_new = (TDB_CONTEXT *)state; @@ -53,36 +90,37 @@ static int test_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) } /* - carefully backup a tdb to %s.bak, validating the contents and + carefully backup a tdb, validating the contents and only doing the backup if its OK + this function is also used for restore */ -static int backup_tdb(const char *fname) +static int backup_tdb(const char *old_name, const char *new_name) { TDB_CONTEXT *tdb; TDB_CONTEXT *tdb_new; - char *tmp_name = NULL; - char *bak_name = NULL; + char *tmp_name; struct stat st; int count1, count2; - asprintf(&tmp_name, "%s.tmp", fname); + tmp_name = add_suffix(new_name, ".tmp"); /* stat the old tdb to find its permissions */ - if (stat(fname, &st) != 0) { - perror(fname); + if (stat(old_name, &st) != 0) { + perror(old_name); return 1; } /* open the old tdb */ - tdb = tdb_open(fname, 0, 0, O_RDWR, 0); + tdb = tdb_open(old_name, 0, 0, O_RDWR, 0); if (!tdb) { - printf("Failed to open %s\n", fname); + printf("Failed to open %s\n", old_name); return 1; } /* create the new tdb */ unlink(tmp_name); - tdb_new = tdb_open(tmp_name, 0, TDB_DEFAULT, O_RDWR|O_CREAT|O_EXCL, + tdb_new = tdb_open(tmp_name, tdb->header.hash_size, + TDB_DEFAULT, O_RDWR|O_CREAT|O_EXCL, st.st_mode & 0777); if (!tdb_new) { perror(tmp_name); @@ -92,7 +130,7 @@ static int backup_tdb(const char *fname) /* lock the old tdb */ if (tdb_lockall(tdb) != 0) { - fprintf(stderr,"Failed to lock %s\n", fname); + fprintf(stderr,"Failed to lock %s\n", old_name); tdb_close(tdb); tdb_close(tdb_new); unlink(tmp_name); @@ -105,7 +143,7 @@ static int backup_tdb(const char *fname) /* traverse and copy */ count1 = tdb_traverse(tdb, copy_fn, (void *)tdb_new); if (count1 < 0 || failed) { - fprintf(stderr,"failed to backup %s\n", fname); + fprintf(stderr,"failed to copy %s\n", old_name); tdb_close(tdb); tdb_close(tdb_new); unlink(tmp_name); @@ -130,43 +168,120 @@ static int backup_tdb(const char *fname) /* traverse the new tdb to confirm */ count2 = tdb_traverse(tdb_new, test_fn, 0); if (count2 != count1) { - fprintf(stderr,"failed to backup %s\n", fname); + fprintf(stderr,"failed to copy %s\n", old_name); tdb_close(tdb_new); unlink(tmp_name); free(tmp_name); return 1; } + /* make sure the new tdb has reached stable storage */ + fsync(tdb_new->fd); + /* close the new tdb and rename it to .bak */ tdb_close(tdb_new); - asprintf(&bak_name, "%s.bak", fname); - unlink(bak_name); - if (rename(tmp_name, bak_name) != 0) { - perror(bak_name); + unlink(new_name); + if (rename(tmp_name, new_name) != 0) { + perror(new_name); free(tmp_name); - free(bak_name); return 1; } - printf("%s : %d records\n", fname, count1); + printf("%s : %d records\n", old_name, count1); free(tmp_name); - free(bak_name); return 0; } + + +/* + verify a tdb and if it is corrupt then restore from *.bak +*/ +static int verify_tdb(const char *fname, const char *bak_name) +{ + TDB_CONTEXT *tdb; + int count = -1; + + /* open the tdb */ + tdb = tdb_open(fname, 0, 0, O_RDONLY, 0); + + /* traverse the tdb, then close it */ + if (tdb) { + count = tdb_traverse(tdb, test_fn, NULL); + tdb_close(tdb); + } + + /* count is < 0 means an error */ + if (count < 0) { + printf("restoring %s\n", fname); + return backup_tdb(bak_name, fname); + } + + printf("%s : %d records\n", fname, count); + + return 0; +} + + +static void usage(void) +{ + printf("Usage: tdbbackup [options] \n\n"); + printf(" -h this help message\n"); + printf(" -s suffix set the backup suffix\n"); + printf(" -v veryify mode (restore if corrupt)\n"); +} + + int main(int argc, char *argv[]) { int i; int ret = 0; + int c; + int verify = 0; + char *suffix = ".bak"; + extern int optind; + extern char *optarg; + + while ((c = getopt(argc, argv, "vhs:")) != -1) { + switch (c) { + case 'h': + usage(); + exit(0); + case 'v': + verify = 1; + break; + case 's': + suffix = optarg; + break; + } + } - if (argc < 2) { - printf("Usage: tdbbackup [options] \n"); + argc -= optind; + argv += optind; + + if (argc < 1) { + usage(); exit(1); } - for (i=1; i Date: Thu, 21 Mar 2002 18:12:54 +0000 Subject: add tdbbackup --- source/bin/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/source/bin/.cvsignore b/source/bin/.cvsignore index 46039754012..50ddb07c561 100644 --- a/source/bin/.cvsignore +++ b/source/bin/.cvsignore @@ -28,6 +28,7 @@ smbstatus smbtorture smbumount swat +tdbbackup testparm testprns wbinfo -- cgit From 40281cf1614d38c5588b4eb560a87870f753134e Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 19:07:39 +0000 Subject: remove all files in bin directory so binaries built with non-default targets also get removed with realclean --- source/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 035f9a00d40..8cd2bff4412 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -732,7 +732,7 @@ ctags: realclean: clean -rm -f config.log $(PROGS) $(SPROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) bin/.dummy - -rm -f bin/debug2html bin/smbfilter bin/smbtorture + -rm -f bin/* -rmdir bin distclean: realclean -- cgit From 2f0dc6cd13aa00bd5c7f56eb620977f804a03d4d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 21 Mar 2002 20:03:08 +0000 Subject: With a 24000 user domain the winbindd cache file can grow to 70mb or more with our current inefficient cachine. So tridge (who is a genius for this :-) suggested using TDB_NOMMAP on this file. Bingo - the working set stays at 5mb at the minor cost of some speed..... Brillient - why didn't I think of this :-). Jeremy. --- source/nsswitch/winbindd_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 87bcda504f3..24688bc5453 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -42,7 +42,7 @@ void winbindd_cache_init(void) /* Open tdb cache */ if (!(cache_tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, - TDB_DEFAULT, O_RDWR | O_CREAT | O_TRUNC, + TDB_NOMMAP, O_RDWR | O_CREAT | O_TRUNC, 0600))) DEBUG(0, ("Unable to open tdb cache - user and group caching disabled\n")); } -- cgit From dc6be390447437b6e769e7dca7c5cc382484e7b2 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 22:17:15 +0000 Subject: update usage message to reflect all options. global "Protocol" was not getting set after a connection so ms_fnmatch used wrong match function. HEAD passes cli->protocol to the ms_fnmatch but I didn't want to change everything so this is a minimal fix to make it work again. --- source/utils/masktest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/utils/masktest.c b/source/utils/masktest.c index 001b3a1feb7..8a00c061400 100644 --- a/source/utils/masktest.c +++ b/source/utils/masktest.c @@ -395,11 +395,15 @@ static void usage(void) "Usage:\n\ masktest //server/share [options..]\n\ options:\n\ + -d debuglevel\n\ -W workgroup\n\ -U user%%pass\n\ -s seed\n\ + -M max protocol\n\ -f filechars (default %s)\n\ -m maskchars (default %s)\n\ + -v verbose mode\n\ + -E die on error\n\ -a show all tests\n\ \n\ This program tests wildcard matching between two servers. It generates\n\ @@ -424,6 +428,7 @@ static void usage(void) char *p; int seed; static pstring servicesf = CONFIGFILE; + extern int Protocol; setlinebuf(stdout); @@ -513,6 +518,7 @@ static void usage(void) DEBUG(0,("Failed to connect to %s\n", share)); exit(1); } + Protocol = cli->protocol; /* need to init seed after connect as clientgen uses random numbers */ DEBUG(0,("seed=%d\n", seed)); -- cgit From d1482d1714a8c695b1dd13d4ba265bd06d780b9d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 22 Mar 2002 00:04:00 +0000 Subject: After consulting with Andrew & others, ported HEAD winbindd into 2.2.x. This winbindd has *much* greater stability and has been more tested than the old 2.2.x one. Big change though.... Jeremy. --- source/Makefile.in | 16 +- source/configure | 1594 +++++++++++++++++---------------- source/configure.in | 34 +- source/include/config.h.in | 6 + source/include/includes.h | 10 + source/include/proto.h | 113 ++- source/include/rpc_lsa.h | 120 ++- source/include/smb.h | 7 + source/include/talloc.h | 43 +- source/lib/replace.c | 42 +- source/lib/talloc.c | 354 +++++++- source/lib/username.c | 2 +- source/lib/util.c | 109 ++- source/lib/util_sock.c | 123 ++- source/lib/util_unistr.c | 14 + source/libsmb/cli_lsarpc.c | 32 +- source/libsmb/cli_netlogon.c | 181 +++- source/libsmb/cliconnect.c | 114 +++ source/libsmb/credentials.c | 8 +- source/libsmb/namequery.c | 2 +- source/libsmb/nterr.c | 5 + source/libsmb/smbdes.c | 9 +- source/libsmb/smbencrypt.c | 10 +- source/nsswitch/hp_nss_common.h | 7 +- source/nsswitch/hp_nss_dbdefs.h | 3 +- source/nsswitch/nss.h | 5 +- source/nsswitch/pam_winbind.c | 712 +++++++++------ source/nsswitch/pam_winbind.h | 23 +- source/nsswitch/wb_client.c | 49 +- source/nsswitch/wb_common.c | 5 +- source/nsswitch/wbinfo.c | 428 +++++---- source/nsswitch/winbind_nss.c | 53 +- source/nsswitch/winbind_nss_config.h | 7 +- source/nsswitch/winbind_nss_solaris.c | 7 +- source/nsswitch/winbindd.c | 219 ++--- source/nsswitch/winbindd.h | 105 ++- source/nsswitch/winbindd_cache.c | 1140 +++++++++++++---------- source/nsswitch/winbindd_cm.c | 431 +++++---- source/nsswitch/winbindd_group.c | 460 +++------- source/nsswitch/winbindd_idmap.c | 267 ++++-- source/nsswitch/winbindd_misc.c | 116 ++- source/nsswitch/winbindd_nss.h | 52 +- source/nsswitch/winbindd_pam.c | 259 ++++-- source/nsswitch/winbindd_proto.h | 157 ++-- source/nsswitch/winbindd_rpc.c | 10 +- source/nsswitch/winbindd_sid.c | 107 +-- source/nsswitch/winbindd_user.c | 439 ++++----- source/nsswitch/winbindd_util.c | 908 ++++--------------- source/nsswitch/winbindd_wins.c | 32 +- source/nsswitch/wins.c | 23 +- source/param/loadparm.c | 4 + source/printing/nt_printing.c | 2 +- source/rpc_parse/parse_lsa.c | 274 +++++- source/rpc_server/srv_util.c | 2 + source/rpcclient/cmd_lsarpc.c | 15 +- source/script/mkproto.awk | 2 +- source/smbd/uid.c | 2 +- source/tdb/tdbutil.c | 93 -- source/utils/smbcacls.c | 75 +- 59 files changed, 5279 insertions(+), 4162 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 8cd2bff4412..1cf60d90afd 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -77,7 +77,7 @@ CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859 ISO8859-13 ISO8859-15 PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DTDB_PASSWD_FILE=\"$(TDB_PASSWD_FILE)\" -FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\" +FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\" FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\" @@ -121,7 +121,7 @@ LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \ lib/util.o lib/util_sock.o lib/util_sec.o smbd/ssl.o \ lib/talloc.o lib/hash.o lib/substitute.o lib/fsusage.o \ lib/ms_fnmatch.o lib/select.o lib/error.o lib/messages.o \ - nsswitch/wb_client.o nsswitch/wb_common.o $(TDB_OBJ) + lib/pam_errors.o nsswitch/wb_client.o nsswitch/wb_common.o $(TDB_OBJ) READLINE_OBJ = lib/readline.o @@ -381,8 +381,8 @@ WINBINDD_OBJ1 = \ nsswitch/winbindd_pam.o \ nsswitch/winbindd_sid.o \ nsswitch/winbindd_misc.o \ - nsswitch/winbindd_wins.o \ - nsswitch/winbindd_cm.o + nsswitch/winbindd_cm.o \ + nsswitch/winbindd_rpc.o NECESSARY_BECAUSE_SAMBA_DEPENDENCIES_ARE_SO_BROKEN_OBJ = \ smbd/password.o smbd/utmp.o smbd/session.o smbd/uid.o smbd/sec_ctx.o \ @@ -403,6 +403,9 @@ WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o @WINBIND_NSS_EXTRA WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) +POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ + popt/popthelp.o popt/poptparse.o + TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ) ###################################################################### @@ -653,10 +656,11 @@ nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy @echo Linking $@ @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) -bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) $(UBIQX_OBJ) bin/.dummy +bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \ + $(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ @$(LINK) -o $@ $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \ - $(UBIQX_OBJ) $(LIBS) + $(UBIQX_OBJ) $(LIBS) @BUILD_POPT@ bin/tdbbackup: $(TDBBACKUP_OBJ) bin/.dummy @echo Linking $@ diff --git a/source/configure b/source/configure index 3a20a7059f5..79e8b7e8189 100755 --- a/source/configure +++ b/source/configure @@ -80,6 +80,8 @@ ac_help="$ac_help --with-acl-support Include ACL support (default=no)" ac_help="$ac_help --with-winbind Build winbind (default, if supported by OS)" +ac_help="$ac_help + --with-included-popt use bundled popt library, not from system" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -775,7 +777,7 @@ fi # 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:779: checking for $ac_word" >&5 +echo "configure:781: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -805,7 +807,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:809: checking for $ac_word" >&5 +echo "configure:811: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -856,7 +858,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:860: checking for $ac_word" >&5 +echo "configure:862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -888,7 +890,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -899,12 +901,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 903 "configure" +#line 905 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:910: \"$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 @@ -930,12 +932,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:934: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:936: checking whether the C compiler ($CC $CFLAGS $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:939: checking whether we are using GNU C" >&5 +echo "configure:941: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -944,7 +946,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:948: \"$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:950: \"$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 @@ -963,7 +965,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:967: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:969: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1025,7 +1027,7 @@ ac_configure=$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:1029: checking for a BSD compatible install" >&5 +echo "configure:1031: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1082,7 +1084,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:1086: checking for $ac_word" >&5 +echo "configure:1088: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1114,10 +1116,10 @@ done 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:1118: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1120: 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:1121: checking whether cc understands -c and -o together" >&5 +echo "configure:1123: 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]/_/'`" @@ -1129,16 +1131,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:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1136: \"$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:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1141: \"$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:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1172,20 +1174,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1176: checking that the C compiler understands volatile" >&5 +echo "configure:1178: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1235,7 +1237,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1239: checking host system type" >&5 +echo "configure:1241: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1256,7 +1258,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1260: checking target system type" >&5 +echo "configure:1262: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1274,7 +1276,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1278: checking build system type" >&5 +echo "configure:1280: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1308,7 +1310,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1312: checking config.cache system type" >&5 +echo "configure:1314: 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" && @@ -1340,7 +1342,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:1344: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1346: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1443,14 +1445,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1447: checking for LFS support" >&5 +echo "configure:1449: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1462,7 +1464,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1489,14 +1491,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1493: checking for LFS support" >&5 +echo "configure:1495: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1534,7 +1536,7 @@ main() { } EOF -if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1555,14 +1557,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1559: checking for LFS support" >&5 +echo "configure:1561: 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 < @@ -1574,7 +1576,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1580: \"$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 @@ -1596,21 +1598,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1600: checking for inline" >&5 +echo "configure:1602: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&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* ac_cv_c_inline=$ac_kw; break else @@ -1636,7 +1638,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1640: checking how to run the C preprocessor" >&5 +echo "configure:1642: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1651,13 +1653,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1663: \"$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 : @@ -1668,13 +1670,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1680: \"$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 : @@ -1685,13 +1687,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1697: \"$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 : @@ -1716,12 +1718,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1720: checking for ANSI C header files" >&5 +echo "configure:1722: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1729,7 +1731,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1735: \"$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* @@ -1746,7 +1748,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 @@ -1764,7 +1766,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 @@ -1785,7 +1787,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1796,7 +1798,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1824,12 +1826,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:1828: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1830: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1837,7 +1839,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1862,7 +1864,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:1866: checking for opendir in -ldir" >&5 +echo "configure:1868: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1870,7 +1872,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1887: \"$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 @@ -1903,7 +1905,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1907: checking for opendir in -lx" >&5 +echo "configure:1909: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1911,7 +1913,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1928: \"$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 @@ -1945,12 +1947,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1949: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1951: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1959,7 +1961,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1980,12 +1982,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1984: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1986: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2001,7 +2003,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2025,17 +2027,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:2029: checking for $ac_hdr" >&5 +echo "configure:2031: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2041: \"$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* @@ -2065,17 +2067,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2069: checking for $ac_hdr" >&5 +echo "configure:2071: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2081: \"$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* @@ -2105,17 +2107,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2109: checking for $ac_hdr" >&5 +echo "configure:2111: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2121: \"$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* @@ -2145,17 +2147,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2149: checking for $ac_hdr" >&5 +echo "configure:2151: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2161: \"$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* @@ -2185,17 +2187,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2189: checking for $ac_hdr" >&5 +echo "configure:2191: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2201: \"$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* @@ -2225,17 +2227,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term 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:2231: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < 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:2241: \"$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 +2267,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ 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:2271: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < 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:2281: \"$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 +2307,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns 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:2311: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < 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:2321: \"$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* @@ -2349,14 +2351,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2378,17 +2380,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_hdr" >&5 +echo "configure:2384: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2394: \"$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* @@ -2418,17 +2420,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2422: checking for $ac_hdr" >&5 +echo "configure:2424: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2434: \"$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* @@ -2458,17 +2460,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2462: checking for $ac_hdr" >&5 +echo "configure:2464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2474: \"$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* @@ -2498,17 +2500,17 @@ for ac_hdr in 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:2502: checking for $ac_hdr" >&5 +echo "configure:2504: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2514: \"$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* @@ -2538,17 +2540,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:2542: checking for $ac_hdr" >&5 +echo "configure:2544: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2554: \"$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* @@ -2580,17 +2582,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2584: checking for $ac_hdr" >&5 +echo "configure:2586: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2596: \"$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* @@ -2622,17 +2624,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2626: checking for $ac_hdr" >&5 +echo "configure:2628: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2638: \"$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* @@ -2664,17 +2666,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2668: checking for $ac_hdr" >&5 +echo "configure:2670: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2678: \"$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* @@ -2702,7 +2704,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2706: checking size of int" >&5 +echo "configure:2708: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2710,18 +2712,18 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2727: \"$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 @@ -2741,7 +2743,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2745: checking size of long" >&5 +echo "configure:2747: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2749,18 +2751,18 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF -if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2766: \"$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 @@ -2780,7 +2782,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2784: checking size of short" >&5 +echo "configure:2786: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2788,18 +2790,18 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF -if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2805: \"$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 @@ -2820,12 +2822,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2824: checking for working const" >&5 +echo "configure:2826: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2895,21 +2897,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2899: checking for inline" >&5 +echo "configure:2901: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2935,14 +2937,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2939: checking whether byte ordering is bigendian" >&5 +echo "configure:2941: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2953,11 +2955,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2959: \"$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 < #include @@ -2968,7 +2970,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2988,7 +2990,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 <&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_c_bigendian=no else @@ -3025,14 +3027,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3029: checking whether char is unsigned" >&5 +echo "configure:3031: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3070: \"$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 @@ -3089,12 +3091,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3093: checking return type of signal handlers" >&5 +echo "configure:3095: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3111,7 +3113,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3115: \"$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_type_signal=void else @@ -3130,12 +3132,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3134: checking for uid_t in sys/types.h" >&5 +echo "configure:3136: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3164,12 +3166,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3168: checking for mode_t" >&5 +echo "configure:3170: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3197,12 +3199,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3201: checking for off_t" >&5 +echo "configure:3203: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3230,12 +3232,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3234: checking for size_t" >&5 +echo "configure:3236: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3263,12 +3265,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3267: checking for pid_t" >&5 +echo "configure:3269: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3296,12 +3298,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3300: checking for st_rdev in struct stat" >&5 +echo "configure:3302: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3309,7 +3311,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3330,12 +3332,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3334: checking for d_off in dirent" >&5 +echo "configure:3336: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3345,7 +3347,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3366,12 +3368,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3370: checking for ino_t" >&5 +echo "configure:3372: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3399,12 +3401,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3403: checking for loff_t" >&5 +echo "configure:3405: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3432,12 +3434,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3436: checking for offset_t" >&5 +echo "configure:3438: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3465,12 +3467,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3469: checking for ssize_t" >&5 +echo "configure:3471: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3498,12 +3500,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3502: checking for wchar_t" >&5 +echo "configure:3504: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3535,7 +3537,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3539: checking for httpConnect in -lcups" >&5 +echo "configure:3541: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3543,7 +3545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3560: \"$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 @@ -3589,17 +3591,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3593: checking for $ac_hdr" >&5 +echo "configure:3595: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3605: \"$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* @@ -3638,7 +3640,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3642: checking for dlopen in -ldl" >&5 +echo "configure:3644: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3646,7 +3648,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3663: \"$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 @@ -3685,13 +3687,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3689: checking for immediate structures" >&5 +echo "configure:3691: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3709,7 +3711,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3732,13 +3734,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3736: checking for unix domain sockets" >&5 +echo "configure:3738: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3753,7 +3755,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3774,13 +3776,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3778: checking for socklen_t type" >&5 +echo "configure:3780: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3793,7 +3795,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3814,13 +3816,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3818: checking for sig_atomic_t type" >&5 +echo "configure:3820: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3833,7 +3835,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3856,20 +3858,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3860: checking for errno declaration" >&5 +echo "configure:3862: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3891,20 +3893,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3895: checking for setresuid declaration" >&5 +echo "configure:3897: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3926,20 +3928,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3930: checking for setresgid declaration" >&5 +echo "configure:3932: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3961,20 +3963,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3965: checking for asprintf declaration" >&5 +echo "configure:3967: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3996,20 +3998,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4000: checking for vasprintf declaration" >&5 +echo "configure:4002: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4031,20 +4033,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4035: checking for vsnprintf declaration" >&5 +echo "configure:4037: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4066,20 +4068,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4070: checking for snprintf declaration" >&5 +echo "configure:4072: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4103,7 +4105,7 @@ EOF # 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:4107: checking for real setresuid" >&5 +echo "configure:4109: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4112,12 +4114,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4123: \"$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 @@ -4142,7 +4144,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4146: checking for real setresgid" >&5 +echo "configure:4148: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4151,13 +4153,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4163: \"$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 @@ -4180,7 +4182,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4184: checking for 8-bit clean memcmp" >&5 +echo "configure:4186: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4188,7 +4190,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4204: \"$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 @@ -4222,7 +4224,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4226: checking whether to use readline" >&5 +echo "configure:4228: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4234,17 +4236,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4238: checking for $ac_hdr" >&5 +echo "configure:4240: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4250: \"$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* @@ -4274,17 +4276,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4278: checking for $ac_hdr" >&5 +echo "configure:4280: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4290: \"$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* @@ -4315,17 +4317,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4319: checking for $ac_hdr" >&5 +echo "configure:4321: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4331: \"$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* @@ -4348,7 +4350,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4352: checking for tgetent in -l${termlib}" >&5 +echo "configure:4354: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4356,7 +4358,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4373: \"$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 @@ -4389,7 +4391,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4393: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4395: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4397,7 +4399,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4414: \"$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 @@ -4459,17 +4461,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4463: checking for $ac_hdr" >&5 +echo "configure:4465: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4475: \"$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* @@ -4499,17 +4501,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4503: checking for $ac_hdr" >&5 +echo "configure:4505: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4515: \"$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* @@ -4540,17 +4542,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4544: checking for $ac_hdr" >&5 +echo "configure:4546: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4556: \"$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* @@ -4573,7 +4575,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4577: checking for tgetent in -l${termlib}" >&5 +echo "configure:4579: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4581,7 +4583,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4598: \"$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 @@ -4614,7 +4616,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4618: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4620: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4622,7 +4624,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4639: \"$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 @@ -4688,12 +4690,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4692: checking for $ac_func" >&5 +echo "configure:4694: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4722: \"$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 @@ -4744,7 +4746,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:4748: checking for printf in -lnsl_s" >&5 +echo "configure:4750: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4752,7 +4754,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4769: \"$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 @@ -4794,7 +4796,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4798: checking for printf in -lnsl" >&5 +echo "configure:4800: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4802,7 +4804,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4819: \"$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 @@ -4844,7 +4846,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4848: checking for connect in -lsocket" >&5 +echo "configure:4850: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4852,7 +4854,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4869: \"$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 @@ -4894,7 +4896,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4898: checking for connect in -linet" >&5 +echo "configure:4900: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4902,7 +4904,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4919: \"$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 @@ -4957,12 +4959,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4961: checking for $ac_func" >&5 +echo "configure:4963: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4991: \"$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 @@ -5011,7 +5013,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5015: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5017: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5019,7 +5021,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5036: \"$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 @@ -5060,12 +5062,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5064: checking for $ac_func" >&5 +echo "configure:5066: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5094: \"$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 @@ -5121,12 +5123,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5125: checking for $ac_func" >&5 +echo "configure:5127: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5155: \"$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 @@ -5173,15 +5175,15 @@ else fi done -for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64 +for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5180: checking for $ac_func" >&5 +echo "configure:5182: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5210: \"$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 @@ -5231,12 +5233,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5235: checking for $ac_func" >&5 +echo "configure:5237: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5265: \"$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 @@ -5286,12 +5288,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5290: checking for $ac_func" >&5 +echo "configure:5292: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5320: \"$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 @@ -5341,12 +5343,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5345: checking for $ac_func" >&5 +echo "configure:5347: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5375: \"$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 @@ -5396,12 +5398,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5400: checking for $ac_func" >&5 +echo "configure:5402: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5430: \"$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 @@ -5451,12 +5453,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5455: checking for $ac_func" >&5 +echo "configure:5457: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5485: \"$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 @@ -5506,12 +5508,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5510: checking for $ac_func" >&5 +echo "configure:5512: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5540: \"$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 @@ -5561,12 +5563,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5565: checking for $ac_func" >&5 +echo "configure:5567: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5595: \"$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 @@ -5616,12 +5618,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5620: checking for $ac_func" >&5 +echo "configure:5622: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5650: \"$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 @@ -5673,12 +5675,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5677: checking for $ac_func" >&5 +echo "configure:5679: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5707: \"$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 @@ -5729,12 +5731,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:5733: checking for $ac_func" >&5 +echo "configure:5735: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5763: \"$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 @@ -5784,12 +5786,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:5788: checking for $ac_func" >&5 +echo "configure:5790: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5818: \"$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 @@ -5839,12 +5841,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5843: checking for $ac_func" >&5 +echo "configure:5845: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5873: \"$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 @@ -5894,12 +5896,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5898: checking for $ac_func" >&5 +echo "configure:5900: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5928: \"$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 @@ -5949,12 +5951,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:5953: checking for $ac_func" >&5 +echo "configure:5955: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -6004,12 +6006,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:6008: checking for $ac_func" >&5 +echo "configure:6010: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6038: \"$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 @@ -6059,12 +6061,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:6063: checking for $ac_func" >&5 +echo "configure:6065: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6093: \"$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 @@ -6114,12 +6116,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:6118: checking for $ac_func" >&5 +echo "configure:6120: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6148: \"$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 @@ -6169,12 +6171,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6173: checking for $ac_func" >&5 +echo "configure:6175: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6203: \"$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 @@ -6224,12 +6226,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:6228: checking for $ac_func" >&5 +echo "configure:6230: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6258: \"$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 @@ -6279,12 +6281,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:6283: checking for $ac_func" >&5 +echo "configure:6285: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6313: \"$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 @@ -6334,12 +6336,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:6338: checking for $ac_func" >&5 +echo "configure:6340: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6368: \"$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 @@ -6389,12 +6391,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:6393: checking for $ac_func" >&5 +echo "configure:6395: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6423: \"$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 @@ -6444,12 +6446,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6448: checking for $ac_func" >&5 +echo "configure:6450: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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_func_$ac_func=yes" else @@ -6503,9 +6505,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6507: checking for stat64 in " >&5 +echo "configure:6509: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6536,9 +6538,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6540: checking for lstat64 in " >&5 +echo "configure:6542: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6569,9 +6571,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6573: checking for fstat64 in " >&5 +echo "configure:6575: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6608,7 +6610,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6612: checking for strcasecmp in -lresolv" >&5 +echo "configure:6614: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6616,7 +6618,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6633: \"$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 @@ -6663,12 +6665,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6667: checking for $ac_func" >&5 +echo "configure:6669: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6697: \"$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 @@ -6716,7 +6718,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6720: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6722: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6724,7 +6726,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6741: \"$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 @@ -6765,12 +6767,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6769: checking for $ac_func" >&5 +echo "configure:6771: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6799: \"$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 @@ -6824,12 +6826,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6828: checking for $ac_func" >&5 +echo "configure:6830: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6858: \"$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 @@ -6877,7 +6879,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6881: checking for putprpwnam in -lsec" >&5 +echo "configure:6883: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6885,7 +6887,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6902: \"$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 @@ -6926,12 +6928,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6930: checking for $ac_func" >&5 +echo "configure:6932: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6960: \"$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 @@ -6986,12 +6988,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:6990: checking for $ac_func" >&5 +echo "configure:6992: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7020: \"$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 @@ -7039,7 +7041,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7043: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7045: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7047,7 +7049,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7064: \"$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 @@ -7088,12 +7090,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7092: checking for $ac_func" >&5 +echo "configure:7094: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7122: \"$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 @@ -7147,12 +7149,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:7151: checking for $ac_func" >&5 +echo "configure:7153: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7181: \"$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 @@ -7200,7 +7202,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7204: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7206: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7208,7 +7210,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7225: \"$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 @@ -7249,12 +7251,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7253: checking for $ac_func" >&5 +echo "configure:7255: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7283: \"$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 @@ -7310,12 +7312,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7314: checking for $ac_func" >&5 +echo "configure:7316: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7344: \"$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 @@ -7363,7 +7365,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7367: checking for getspnam in -lgen" >&5 +echo "configure:7369: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7371,7 +7373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7388: \"$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 @@ -7412,12 +7414,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7416: checking for $ac_func" >&5 +echo "configure:7418: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7446: \"$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 @@ -7472,12 +7474,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7476: checking for $ac_func" >&5 +echo "configure:7478: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7506: \"$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 @@ -7525,7 +7527,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7529: checking for getspnam in -lsecurity" >&5 +echo "configure:7531: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7533,7 +7535,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7550: \"$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 @@ -7574,12 +7576,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7578: checking for $ac_func" >&5 +echo "configure:7580: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7608: \"$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 @@ -7633,12 +7635,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7637: checking for $ac_func" >&5 +echo "configure:7639: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7667: \"$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 @@ -7686,7 +7688,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7690: checking for getspnam in -lsec" >&5 +echo "configure:7692: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7694,7 +7696,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7711: \"$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 @@ -7735,12 +7737,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7739: checking for $ac_func" >&5 +echo "configure:7741: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7769: \"$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 @@ -7795,12 +7797,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7799: checking for $ac_func" >&5 +echo "configure:7801: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7829: \"$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 @@ -7848,7 +7850,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7852: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7854: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7856,7 +7858,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7873: \"$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 @@ -7897,12 +7899,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7901: checking for $ac_func" >&5 +echo "configure:7903: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7931: \"$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 @@ -7956,12 +7958,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7960: checking for $ac_func" >&5 +echo "configure:7962: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7990: \"$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 @@ -8009,7 +8011,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8013: checking for bigcrypt in -lsec" >&5 +echo "configure:8015: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8017,7 +8019,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8034: \"$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 @@ -8058,12 +8060,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8062: checking for $ac_func" >&5 +echo "configure:8064: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8092: \"$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 @@ -8118,12 +8120,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8122: checking for $ac_func" >&5 +echo "configure:8124: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8152: \"$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 @@ -8171,7 +8173,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8175: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8177: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8179,7 +8181,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8196: \"$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 @@ -8220,12 +8222,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8224: checking for $ac_func" >&5 +echo "configure:8226: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8254: \"$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 @@ -8279,12 +8281,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8283: checking for $ac_func" >&5 +echo "configure:8285: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8313: \"$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 @@ -8332,7 +8334,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8336: checking for getprpwnam in -lsec" >&5 +echo "configure:8338: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8340,7 +8342,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8357: \"$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 @@ -8381,12 +8383,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8385: checking for $ac_func" >&5 +echo "configure:8387: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8415: \"$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 @@ -8452,7 +8454,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8456: checking ability to build shared libraries" >&5 +echo "configure:8458: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8590,7 +8592,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:8594: checking for $ac_word" >&5 +echo "configure:8596: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8646,15 +8648,15 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8650: checking linker flags for shared libraries" >&5 +echo "configure:8652: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8653: checking compiler flags for position-independent code" >&5 +echo "configure:8655: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8658: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8660: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8674,7 +8676,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:8678: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8680: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8695,7 +8697,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:8699: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8701: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8718,7 +8720,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8722: checking for long long" >&5 +echo "configure:8724: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8727,12 +8729,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8738: \"$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 @@ -8759,20 +8761,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8763: checking for LL suffix on long long integers" >&5 +echo "configure:8765: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8794,7 +8796,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8798: checking for 64 bit off_t" >&5 +echo "configure:8800: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8803,13 +8805,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8815: \"$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 @@ -8832,7 +8834,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8836: checking for off64_t" >&5 +echo "configure:8838: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8841,7 +8843,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8857: \"$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 @@ -8874,7 +8876,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8878: checking for 64 bit ino_t" >&5 +echo "configure:8880: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8883,13 +8885,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8895: \"$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 @@ -8912,7 +8914,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8916: checking for ino64_t" >&5 +echo "configure:8918: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8921,7 +8923,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8937: \"$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 @@ -8954,7 +8956,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8958: checking for dev64_t" >&5 +echo "configure:8960: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8963,7 +8965,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8996,13 +8998,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9000: checking for struct dirent64" >&5 +echo "configure:9002: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9035,7 +9037,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9039: checking for major macro" >&5 +echo "configure:9041: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9044,7 +9046,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9057: \"$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_DEVICE_MAJOR_FN=yes else @@ -9076,7 +9078,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9080: checking for minor macro" >&5 +echo "configure:9082: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9085,7 +9087,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9117,7 +9119,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9121: checking for makedev macro" >&5 +echo "configure:9123: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9126,7 +9128,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9158,7 +9160,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9162: checking for unsigned char" >&5 +echo "configure:9164: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9167,12 +9169,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9178: \"$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 @@ -9195,13 +9197,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9199: checking for sin_len in sock" >&5 +echo "configure:9201: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9210,7 +9212,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9231,13 +9233,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9235: checking whether seekdir returns void" >&5 +echo "configure:9237: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9246,7 +9248,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9267,20 +9269,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9271: checking for __FILE__ macro" >&5 +echo "configure:9273: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9301,20 +9303,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9305: checking for __FUNCTION__ macro" >&5 +echo "configure:9307: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9335,7 +9337,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9339: checking if gettimeofday takes tz argument" >&5 +echo "configure:9341: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9344,14 +9346,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9357: \"$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 @@ -9374,7 +9376,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9378: checking for C99 vsnprintf" >&5 +echo "configure:9380: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9383,7 +9385,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9410,7 +9412,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9433,7 +9435,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9437: checking for broken readdir" >&5 +echo "configure:9439: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9442,7 +9444,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9450,7 +9452,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:9454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9456: \"$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 @@ -9473,13 +9475,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9477: checking for utimbuf" >&5 +echo "configure:9479: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9487,7 +9489,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9511,12 +9513,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9515: checking for $ac_func" >&5 +echo "configure:9517: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9545: \"$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 @@ -9565,13 +9567,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9569: checking for ut_name in utmp" >&5 +echo "configure:9571: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9579,7 +9581,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9600,13 +9602,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9604: checking for ut_user in utmp" >&5 +echo "configure:9606: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9614,7 +9616,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9635,13 +9637,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9639: checking for ut_id in utmp" >&5 +echo "configure:9641: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9649,7 +9651,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9670,13 +9672,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9674: checking for ut_host in utmp" >&5 +echo "configure:9676: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9684,7 +9686,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9705,13 +9707,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9709: checking for ut_time in utmp" >&5 +echo "configure:9711: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9719,7 +9721,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9740,13 +9742,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9744: checking for ut_tv in utmp" >&5 +echo "configure:9746: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9754,7 +9756,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9775,13 +9777,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9779: checking for ut_type in utmp" >&5 +echo "configure:9781: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9789,7 +9791,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9810,13 +9812,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9814: checking for ut_pid in utmp" >&5 +echo "configure:9816: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9824,7 +9826,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9845,13 +9847,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9849: checking for ut_exit in utmp" >&5 +echo "configure:9851: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9859,7 +9861,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9880,13 +9882,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9884: checking for ut_addr in utmp" >&5 +echo "configure:9886: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9894,7 +9896,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9916,13 +9918,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9920: checking whether pututline returns pointer" >&5 +echo "configure:9922: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9930,7 +9932,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9952,13 +9954,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9956: checking for ut_syslen in utmpx" >&5 +echo "configure:9958: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9966,7 +9968,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9987,7 +9989,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9991: checking for Linux kernel oplocks" >&5 +echo "configure:9993: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9996,7 +9998,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10010,7 +10012,7 @@ main() { } EOF -if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10033,7 +10035,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10037: checking for kernel change notify support" >&5 +echo "configure:10039: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10042,7 +10044,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10056,7 +10058,7 @@ main() { } EOF -if { (eval echo configure:10060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10079,7 +10081,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10083: checking for kernel share modes" >&5 +echo "configure:10085: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10088,7 +10090,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10104,7 +10106,7 @@ main() { } EOF -if { (eval echo configure:10108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10130,13 +10132,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10134: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10136: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10144,7 +10146,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:10148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10165,7 +10167,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10169: checking for irix specific capabilities" >&5 +echo "configure:10171: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10174,7 +10176,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10189,7 +10191,7 @@ main() { } EOF -if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10195: \"$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 @@ -10217,13 +10219,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10221: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10223: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10233,7 +10235,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10254,13 +10256,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10258: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10260: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10270,7 +10272,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10291,13 +10293,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10295: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10297: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10307,7 +10309,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10328,13 +10330,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10332: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10334: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10344,7 +10346,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10366,13 +10368,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10370: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10372: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10386,7 +10388,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10407,16 +10409,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10411: checking for test routines" >&5 +echo "configure:10413: 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 <&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 echo "$ac_t""yes" 1>&6 else @@ -10430,7 +10432,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10434: checking for ftruncate extend" >&5 +echo "configure:10436: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10439,11 +10441,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10449: \"$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 @@ -10466,7 +10468,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10470: checking for broken getgroups" >&5 +echo "configure:10472: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10475,11 +10477,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10485: \"$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 @@ -10502,7 +10504,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10506: checking whether getpass should be replaced" >&5 +echo "configure:10508: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10510,7 +10512,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10546,7 +10548,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10550: checking for broken inet_ntoa" >&5 +echo "configure:10552: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10555,7 +10557,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10569,7 +10571,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:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10575: \"$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 @@ -10592,7 +10594,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10596: checking for secure mkstemp" >&5 +echo "configure:10598: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10601,7 +10603,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10618,7 +10620,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10641,7 +10643,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10645: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10647: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10650,12 +10652,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10678,7 +10680,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10682: checking for root" >&5 +echo "configure:10684: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10687,11 +10689,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10697: \"$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 @@ -10719,7 +10721,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10723: checking for iface AIX" >&5 +echo "configure:10725: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10728,7 +10730,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10760,7 +10762,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10764: checking for iface ifconf" >&5 +echo "configure:10766: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10769,7 +10771,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10802,7 +10804,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10806: checking for iface ifreq" >&5 +echo "configure:10808: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10811,7 +10813,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10848,7 +10850,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10852: checking for setresuid" >&5 +echo "configure:10854: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10857,7 +10859,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10871: \"$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 @@ -10891,7 +10893,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10895: checking for setreuid" >&5 +echo "configure:10897: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10900,7 +10902,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10914: \"$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 @@ -10933,7 +10935,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10937: checking for seteuid" >&5 +echo "configure:10939: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10942,7 +10944,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10956: \"$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 @@ -10975,7 +10977,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10979: checking for setuidx" >&5 +echo "configure:10981: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10984,7 +10986,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10998: \"$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 @@ -11017,7 +11019,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11021: checking for working mmap" >&5 +echo "configure:11023: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11026,11 +11028,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11053,7 +11055,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11057: checking for ftruncate needs root" >&5 +echo "configure:11059: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11062,11 +11064,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11089,7 +11091,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11093: checking for fcntl locking" >&5 +echo "configure:11095: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11098,11 +11100,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11108: \"$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 @@ -11125,7 +11127,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11129: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11131: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11134,11 +11136,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11163,7 +11165,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11167: checking for 64 bit fcntl locking" >&5 +echo "configure:11169: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11172,7 +11174,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11202: \"$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 @@ -11221,13 +11223,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11225: checking for st_blocks in struct stat" >&5 +echo "configure:11227: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11236,7 +11238,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11259,13 +11261,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11263: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11265: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11302,13 +11304,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11306: checking for broken nisplus include files" >&5 +echo "configure:11308: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11318,7 +11320,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11342,7 +11344,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11346: checking whether to use smbwrapper" >&5 +echo "configure:11348: 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" @@ -11386,7 +11388,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11390: checking whether to use AFS" >&5 +echo "configure:11392: 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" @@ -11412,7 +11414,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11416: checking whether to use DCE/DFS auth" >&5 +echo "configure:11418: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11437,7 +11439,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11441: checking whether to use Kerberos IV" >&5 +echo "configure:11443: 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" @@ -11449,7 +11451,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11453: checking for dn_expand in -lresolv" >&5 +echo "configure:11455: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11457,7 +11459,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11474: \"$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 @@ -11512,7 +11514,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11516: checking whether to use Kerberos 5" >&5 +echo "configure:11518: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11540,7 +11542,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11544: checking whether to use AUTOMOUNT" >&5 +echo "configure:11546: 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" @@ -11565,7 +11567,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11569: checking whether to use SMBMOUNT" >&5 +echo "configure:11571: 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" @@ -11602,7 +11604,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11606: checking whether to use PAM password database" >&5 +echo "configure:11608: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11628,7 +11630,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11632: checking for pam_get_data in -lpam" >&5 +echo "configure:11634: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11636,7 +11638,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11653: \"$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 @@ -11674,7 +11676,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11678: checking whether to use pam_smbpass" >&5 +echo "configure:11680: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11716,12 +11718,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11720: checking for $ac_func" >&5 +echo "configure:11722: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11750: \"$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 @@ -11770,7 +11772,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:11774: checking for crypt in -lcrypt" >&5 +echo "configure:11776: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11778,7 +11780,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11795: \"$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 @@ -11824,7 +11826,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11828: checking for a crypt that needs truncated salt" >&5 +echo "configure:11830: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11833,11 +11835,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11875,7 +11877,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11879: checking whether to use TDB SAM database" >&5 +echo "configure:11881: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11901,7 +11903,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11905: checking whether to use LDAP SAM database" >&5 +echo "configure:11907: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11928,7 +11930,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11932: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11934: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11956,7 +11958,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11960: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11962: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11978,7 +11980,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11982: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11984: 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" @@ -12003,7 +12005,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12007: checking whether to use SSL" >&5 +echo "configure:12009: 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" @@ -12077,7 +12079,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12081: checking whether to use syslog logging" >&5 +echo "configure:12083: 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" @@ -12102,7 +12104,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12106: checking whether to use profiling" >&5 +echo "configure:12108: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12130,7 +12132,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12134: checking whether to support disk-quotas" >&5 +echo "configure:12136: 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" @@ -12142,13 +12144,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12146: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12148: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12160,7 +12162,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12204,7 +12206,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12208: checking whether to support utmp accounting" >&5 +echo "configure:12210: 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" @@ -12230,7 +12232,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12234: checking whether to support Microsoft Dfs" >&5 +echo "configure:12236: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12256,7 +12258,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12260: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12262: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12285,7 +12287,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12289: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12291: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12312,14 +12314,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12316: checking how to get filesystem space usage" >&5 +echo "configure:12318: 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:12323: checking statvfs64 function (SVR4)" >&5 +echo "configure:12325: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12327,7 +12329,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12347: \"$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 @@ -12374,12 +12376,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12378: checking statvfs function (SVR4)" >&5 +echo "configure:12380: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12387,7 +12389,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12393: \"$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 @@ -12412,7 +12414,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:12416: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12418: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12420,7 +12422,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12433,7 +12435,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12439: \"$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 @@ -12460,7 +12462,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:12464: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12466: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12468,7 +12470,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12493: \"$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 @@ -12514,7 +12516,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:12518: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12520: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12522,7 +12524,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12532,7 +12534,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12538: \"$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 @@ -12559,7 +12561,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:12563: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12565: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12567,7 +12569,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12583,7 +12585,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12589: \"$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 @@ -12610,7 +12612,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:12614: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12616: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12618,7 +12620,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12638,7 +12640,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12644: \"$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 @@ -12671,9 +12673,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12675: checking if large file support can be enabled" >&5 +echo "configure:12677: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12753,7 +12755,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12757: checking whether to support ACLs" >&5 +echo "configure:12759: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12806,7 +12808,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12810: checking for acl_get_file in -lacl" >&5 +echo "configure:12812: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12814,7 +12816,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12831: \"$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 @@ -12853,13 +12855,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12857: checking for ACL support" >&5 +echo "configure:12859: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12867,7 +12869,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12887,13 +12889,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12891: checking for acl_get_perm_np" >&5 +echo "configure:12893: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12901,7 +12903,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12956,7 +12958,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12960: checking whether to build winbind" >&5 +echo "configure:12962: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13039,6 +13041,80 @@ fi +################################################# +# Check to see if we should use the included popt + +# Check whether --with-included-popt or --without-included-popt was given. +if test "${with_included_popt+set}" = set; then + withval="$with_included_popt" + + case "$withval" in + yes) + INCLUDED_POPT=yes + ;; + no) + INCLUDED_POPT=no + ;; + esac +fi + +if test x"$INCLUDED_POPT" != x"yes"; then + echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 +echo "configure:13064: checking for poptGetContext in -lpopt" >&5 +ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpopt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + INCLUDED_POPT=no +else + echo "$ac_t""no" 1>&6 +INCLUDED_POPT=yes +fi + +fi + +echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 +echo "configure:13107: checking whether to use included popt" >&5 +if test x"$INCLUDED_POPT" = x"yes"; then + echo "$ac_t""$srcdir/popt" 1>&6 + BUILD_POPT='$(POPT_OBJS)' + FLAGS1="-I$srcdir/popt" +else + echo "$ac_t""no" 1>&6 + LIBS="$LIBS -lpopt" +fi + + + ################################################# # final configure stuff echo "checking configure summary" @@ -13046,11 +13122,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -13255,6 +13331,8 @@ s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g +s%@BUILD_POPT@%$BUILD_POPT%g +s%@FLAGS1@%$FLAGS1%g s%@builddir@%$builddir%g CEOF diff --git a/source/configure.in b/source/configure.in index 4ed4efe05fc..3109f6a8705 100644 --- a/source/configure.in +++ b/source/configure.in @@ -674,7 +674,7 @@ else fi AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link) -AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64) +AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64) AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath) @@ -2671,6 +2671,38 @@ AC_SUBST(WINBIND_PAM_TARGETS) AC_SUBST(WINBIND_NSS_EXTRA_OBJS) AC_SUBST(WINBIND_NSS_EXTRA_LIBS) +################################################# +# Check to see if we should use the included popt + +AC_ARG_WITH(included-popt, +[ --with-included-popt use bundled popt library, not from system], +[ + case "$withval" in + yes) + INCLUDED_POPT=yes + ;; + no) + INCLUDED_POPT=no + ;; + esac ], +) +if test x"$INCLUDED_POPT" != x"yes"; then + AC_CHECK_LIB(popt, poptGetContext, + INCLUDED_POPT=no, INCLUDED_POPT=yes) +fi + +AC_MSG_CHECKING(whether to use included popt) +if test x"$INCLUDED_POPT" = x"yes"; then + AC_MSG_RESULT($srcdir/popt) + BUILD_POPT='$(POPT_OBJS)' + FLAGS1="-I$srcdir/popt" +else + AC_MSG_RESULT(no) + LIBS="$LIBS -lpopt" +fi +AC_SUBST(BUILD_POPT) +AC_SUBST(FLAGS1) + ################################################# # final configure stuff echo "checking configure summary" diff --git a/source/include/config.h.in b/source/include/config.h.in index bc956315e6b..8bb313d58b3 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -741,6 +741,12 @@ /* Define if you have the strftime function. */ #undef HAVE_STRFTIME +/* Define if you have the strlcat function. */ +#undef HAVE_STRLCAT + +/* Define if you have the strlcpy function. */ +#undef HAVE_STRLCPY + /* Define if you have the strpbrk function. */ #undef HAVE_STRPBRK diff --git a/source/include/includes.h b/source/include/includes.h index e7d46ca2cff..40c4df396ee 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -684,6 +684,8 @@ extern int errno; #include "rap.h" +#include "popt.h" + #ifndef MAXCODEPAGELINES #define MAXCODEPAGELINES 256 #endif @@ -859,6 +861,14 @@ int rename(const char *zfrom, const char *zto); time_t mktime(struct tm *t); #endif +#ifndef HAVE_STRLCPY +size_t strlcpy(char *d, const char *s, size_t bufsize); +#endif + +#ifndef HAVE_STRLCAT +size_t strlcat(char *d, const char *s, size_t bufsize); +#endif + #ifndef HAVE_FTRUNCATE int ftruncate(int f,long l); #endif diff --git a/source/include/proto.h b/source/include/proto.h index ea84eafb94e..baeda9a6291 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -146,6 +146,13 @@ void message_named_mutex_release(char *name); int ms_fnmatch(const char *pattern, const char *string); +/*The following definitions come from lib/pam_errors.c */ + +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); + /*The following definitions come from lib/pidfile.c */ pid_t pidfile_pid(char *name); @@ -195,6 +202,12 @@ BOOL cli_establish_connection(struct cli_state *cli, struct nmb_name *calling, struct nmb_name *called, char *service, char *service_type, BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, struct in_addr *pdest_ip); @@ -309,9 +322,9 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol); NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***names, uint32 **types, int *num_names); + char ***domains, char ***names, uint32 **types, int *num_names); NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, char **names, + POLICY_HND *pol, int num_names, const char **names, DOM_SID **sids, uint32 **types, int *num_sids); NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint16 info_class, @@ -348,7 +361,8 @@ NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan, uint32 neg_flags, DOM_CHAL *srv_chal); NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - unsigned char mach_pwd[16]); + uint16 sec_chan, + const unsigned char mach_pwd[16]); NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 query_level); NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, @@ -363,6 +377,11 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *username, char *password, int logon_type); +NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *username, const char *domain, const char *workstation, + const uint8 chal[8], + DATA_BLOB lm_response, DATA_BLOB nt_response, + NET_USER_INFO_3 *info3); /*The following definitions come from libsmb/clioplock.c */ @@ -588,9 +607,9 @@ BOOL cli_receive_nt_trans(struct cli_state *cli, /*The following definitions come from libsmb/credentials.c */ -char *credstr(uchar *cred); -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]); +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, DOM_CHAL *cred); int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, @@ -632,7 +651,7 @@ BOOL resolve_srv_name(const char* srv_name, fstring dest_host, BOOL find_master_ip(char *group, struct in_addr *master_ip); BOOL lookup_dc_name(const char *srcname, const char *domain, struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); BOOL get_lmb_list(struct in_addr **ip_list, int *count); /*The following definitions come from libsmb/nmblib.c */ @@ -661,6 +680,7 @@ int name_len(char *s1); /*The following definitions come from libsmb/nterr.c */ char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); char *get_nt_error_c_code(NTSTATUS nt_code); /*The following definitions come from libsmb/passchange.c */ @@ -694,20 +714,20 @@ void E_P16(const unsigned char *p14,unsigned char *p16); void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); void SamOEMhash( unsigned char *data, const unsigned char *key, int val); void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); /*The following definitions come from libsmb/smbencrypt.c */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); BOOL encode_pw_buffer(char buffer[516], const char *new_pass, int new_pw_len, BOOL nt_pass_set); @@ -963,9 +983,14 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); void talloc_destroy_pool(TALLOC_CTX *t); void talloc_destroy(TALLOC_CTX *t); size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, char *p); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); /*The following definitions come from lib/time.c */ @@ -1075,8 +1100,9 @@ int set_maxfiles(int requested_max); BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); int smb_mkstemp(char *template); void *smb_xmalloc(size_t size); -void *xmemdup(const void *p, size_t size); -char *xstrdup(const char *s); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); void *memdup(void *p, size_t size); char *myhostname(void); char *lock_path(char *name); @@ -1084,6 +1110,10 @@ char *parent_dirname(const char *path); BOOL ms_has_wild(char *s); BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); /*The following definitions come from lib/util_file.c */ @@ -1194,7 +1224,9 @@ char *client_name(void); char *client_addr(void); char *get_socket_name(int fd); char *get_socket_addr(int fd); -int open_pipe_sock(char *path); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); int sock_exec(const char *prog); /*The following definitions come from lib/util_str.c */ @@ -1250,6 +1282,7 @@ char *dos_unistr2_to_str(UNISTR2 *str); void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); void unistr_to_ascii(char *dest, const uint16 *src, int len); void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); uint32 buffer2_to_uint32(BUFFER2 *str); char *dos_buffer2_to_str(BUFFER2 *str); char *dos_buffer2_to_multistr(BUFFER2 *str); @@ -1750,9 +1783,10 @@ void expire_workgroups_and_servers(time_t t); /*The following definitions come from nsswitch/wb_client.c */ -BOOL winbind_lookup_name(const char *name, DOM_SID *sid, +BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, enum SID_NAME_USE *name_type); -BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name, +BOOL winbind_lookup_sid(DOM_SID *sid, + fstring dom_name, fstring name, enum SID_NAME_USE *name_type); BOOL winbind_sid_to_uid(uid_t *puid, DOM_SID *sid); BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid); @@ -1829,6 +1863,7 @@ char *lp_template_shell(void); char *lp_winbind_separator(void); BOOL lp_winbind_enum_users(void); BOOL lp_winbind_enum_groups(void); +BOOL lp_winbind_use_default_domain(void); char *lp_codepagedir(void); char *lp_ldap_server(void); char *lp_ldap_suffix(void); @@ -2485,8 +2520,7 @@ BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3, prs_struct *ps, int void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name, uint16 sid_name_use, char *name, uint32 idx); -void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff, - uint32 unknown); +void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff); void init_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS *qos); void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, uint32 attributes, uint32 desired_access, @@ -2533,7 +2567,7 @@ BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s, prs_struct *ps, int depth); void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, - POLICY_HND *hnd, int num_names, char **names); + POLICY_HND *hnd, int num_names, const char **names); BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth); BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, @@ -2557,8 +2591,10 @@ void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *r_u, uint32 enum_context); BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth); BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth); BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth); +void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access); BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth); BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth); +void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd); BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth); BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth); BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth); @@ -2567,6 +2603,15 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth); BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name); +BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth); /*The following definitions come from rpc_parse/parse_misc.c */ @@ -3613,17 +3658,12 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_ prs_struct *ps, int depth); BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth); BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth); -BOOL make_spoolss_q_addprinterdriver( - TALLOC_CTX *mem_ctx, - SPOOL_Q_ADDPRINTERDRIVER *q_u, - const char* srv_name, - uint32 level, - PRINTER_DRIVER_CTR *info); -BOOL make_spoolss_driver_info_3( - TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, - DRIVER_INFO_3 *info3 -); +BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, + SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, + uint32 level, PRINTER_DRIVER_CTR *info); +BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx, + SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, + DRIVER_INFO_3 *info3); BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src); BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); @@ -4822,17 +4862,12 @@ int tdb_reopen_all(void); int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval); void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval); -int tdb_fetch_int_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len); -int tdb_fetch_int(TDB_CONTEXT *tdb, char *keystr); -int tdb_store_int_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int v); -int tdb_store_int(TDB_CONTEXT *tdb, char *keystr, int v); int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len); int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr); int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v); int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v); int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, void *buffer, int len); TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr); -int tdb_change_int_atomic(TDB_CONTEXT *tdb, char *keystr, int *oldval, int change_val); int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val); size_t tdb_pack(char *buf, int bufsize, char *fmt, ...); int tdb_unpack(char *buf, int bufsize, char *fmt, ...); diff --git a/source/include/rpc_lsa.h b/source/include/rpc_lsa.h index a9a28a63ac3..ccdce6f2636 100644 --- a/source/include/rpc_lsa.h +++ b/source/include/rpc_lsa.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. SMB parameters and setup Copyright (C) Andrew Tridgell 1992-1997 Copyright (C) Luke Kenneth Casson Leighton 1996-1997 @@ -39,7 +38,7 @@ enum SID_NAME_USE SID_NAME_UNKNOWN = 8 /* oops. */ }; -/* Opcodes available on this pipe */ +/* Opcodes available on PIPE_LSARPC */ #define LSA_CLOSE 0x00 #define LSA_DELETE 0x01 @@ -91,9 +90,6 @@ enum SID_NAME_USE /* XXXX these are here to get a compile! */ #define LSA_LOOKUPRIDS 0xFD -#define LSA_MAX_GROUPS 96 -#define LSA_MAX_SIDS 128 - /* DOM_QUERY - info class 3 and 5 LSA Query response */ typedef struct dom_query_info { @@ -106,7 +102,7 @@ typedef struct dom_query_info } DOM_QUERY; -/* level 5 is same as level 3. we hope. */ +/* level 5 is same as level 3. */ typedef DOM_QUERY DOM_QUERY_3; typedef DOM_QUERY DOM_QUERY_5; @@ -131,7 +127,6 @@ typedef struct seq_qos_info uint16 sec_imp_level; /* 0x02 - impersonation level */ uint8 sec_ctxt_mode; /* 0x01 - context tracking mode */ uint8 effective_only; /* 0x00 - effective only */ - uint32 unknown; /* 0x2000 0000 - not known */ } LSA_SEC_QOS; @@ -185,6 +180,53 @@ typedef struct lsa_r_open_pol2_info } LSA_R_OPEN_POL2; + +#define POLICY_VIEW_LOCAL_INFORMATION 0x00000001 +#define POLICY_VIEW_AUDIT_INFORMATION 0x00000002 +#define POLICY_GET_PRIVATE_INFORMATION 0x00000004 +#define POLICY_TRUST_ADMIN 0x00000008 +#define POLICY_CREATE_ACCOUNT 0x00000010 +#define POLICY_CREATE_SECRET 0x00000020 +#define POLICY_CREATE_PRIVILEGE 0x00000040 +#define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080 +#define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100 +#define POLICY_AUDIT_LOG_ADMIN 0x00000200 +#define POLICY_SERVER_ADMIN 0x00000400 +#define POLICY_LOOKUP_NAMES 0x00000800 + +#define POLICY_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS |\ + POLICY_VIEW_LOCAL_INFORMATION |\ + POLICY_VIEW_AUDIT_INFORMATION |\ + POLICY_GET_PRIVATE_INFORMATION |\ + POLICY_TRUST_ADMIN |\ + POLICY_CREATE_ACCOUNT |\ + POLICY_CREATE_SECRET |\ + POLICY_CREATE_PRIVILEGE |\ + POLICY_SET_DEFAULT_QUOTA_LIMITS |\ + POLICY_SET_AUDIT_REQUIREMENTS |\ + POLICY_AUDIT_LOG_ADMIN |\ + POLICY_SERVER_ADMIN |\ + POLICY_LOOKUP_NAMES ) + + +#define POLICY_READ ( STANDARD_RIGHTS_READ_ACCESS |\ + POLICY_VIEW_AUDIT_INFORMATION |\ + POLICY_GET_PRIVATE_INFORMATION) + +#define POLICY_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS |\ + POLICY_TRUST_ADMIN |\ + POLICY_CREATE_ACCOUNT |\ + POLICY_CREATE_SECRET |\ + POLICY_CREATE_PRIVILEGE |\ + POLICY_SET_DEFAULT_QUOTA_LIMITS |\ + POLICY_SET_AUDIT_REQUIREMENTS |\ + POLICY_AUDIT_LOG_ADMIN |\ + POLICY_SERVER_ADMIN) + +#define POLICY_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS |\ + POLICY_VIEW_LOCAL_INFORMATION |\ + POLICY_LOOKUP_NAMES ) + /* LSA_Q_QUERY_SEC_OBJ - LSA query security */ typedef struct lsa_query_sec_obj_info { @@ -317,7 +359,8 @@ typedef struct lsa_trans_name_info } LSA_TRANS_NAME; -#define MAX_LOOKUP_SIDS 30 +/* This number purly arbitary - just to prevent a client from requesting large amounts of memory */ +#define MAX_LOOKUP_SIDS 256 /* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */ typedef struct lsa_trans_name_enum_info @@ -570,21 +613,60 @@ typedef struct lsa_r_getsystemaccount } LSA_R_GETSYSTEMACCOUNT; -#endif /* _RPC_LSA_H */ -/* +typedef struct lsa_q_setsystemaccount +{ + POLICY_HND pol; /* policy handle */ + uint32 access; +} LSA_Q_SETSYSTEMACCOUNT; -opnum 11: opensid: query: handle du domaine, sid du user -reply: handle, status +typedef struct lsa_r_setsystemaccount +{ + NTSTATUS status; +} LSA_R_SETSYSTEMACCOUNT; -opnum 12: getlistofprivs: query: handle du user -reply: ptr, nombre, nombre, tableau de 3 uint32: flag+priv.low+priv.high -uint32 0, status -opnum 17: ?? query: handle -reply: uint32 + status +typedef struct lsa_q_lookupprivvalue +{ + POLICY_HND pol; /* policy handle */ + UNIHDR hdr_right; + UNISTR2 uni2_right; +} LSA_Q_LOOKUPPRIVVALUE; +typedef struct lsa_r_lookupprivvalue +{ + LUID luid; + NTSTATUS status; +} LSA_R_LOOKUPPRIVVALUE; -*/ +typedef struct lsa_q_addprivs +{ + POLICY_HND pol; /* policy handle */ + uint32 count; + PRIVILEGE_SET set; +} LSA_Q_ADDPRIVS; + +typedef struct lsa_r_addprivs +{ + NTSTATUS status; +} LSA_R_ADDPRIVS; + + +typedef struct lsa_q_removeprivs +{ + POLICY_HND pol; /* policy handle */ + uint32 allrights; + uint32 ptr; + uint32 count; + PRIVILEGE_SET set; +} LSA_Q_REMOVEPRIVS; + +typedef struct lsa_r_removeprivs +{ + NTSTATUS status; +} LSA_R_REMOVEPRIVS; + + +#endif /* _RPC_LSA_H */ diff --git a/source/include/smb.h b/source/include/smb.h index 6144d65c01d..393d92cfee3 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -418,6 +418,13 @@ typedef struct files_struct char *fsp_name; } files_struct; +/* used to hold an arbitrary blob of data */ +typedef struct data_blob { + uint8 *data; + size_t length; + void (*free)(struct data_blob *data_blob); +} DATA_BLOB; + /* * Structure used to keep directory state information around. * Used in NT change-notify code. diff --git a/source/include/talloc.h b/source/include/talloc.h index 06efbf6952a..64a58830413 100644 --- a/source/include/talloc.h +++ b/source/include/talloc.h @@ -1,10 +1,10 @@ #ifndef _TALLOC_H_ #define _TALLOC_H_ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba temporary memory allocation functions Copyright (C) Andrew Tridgell 2000 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,20 +21,31 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -struct talloc_chunk { - struct talloc_chunk *next; - size_t size; - void *ptr; -}; +/** + * @ingroup talloc + * @{ + * @sa talloc.c + */ -typedef struct { - struct talloc_chunk *list; - size_t total_alloc_size; -} TALLOC_CTX; +/** + * talloc allocation pool. All allocated blocks can be freed in one go. + **/ +typedef struct talloc_ctx TALLOC_CTX; -/* free memory if the pointer is valid and zero the pointer */ -#ifndef SAFE_FREE -#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) -#endif +TALLOC_CTX *talloc_init_named(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2); -#endif +char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap) + PRINTF_ATTRIBUTE(2, 0); + +char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...) + PRINTF_ATTRIBUTE(2, 3); + +char *talloc_vasprintf_append(TALLOC_CTX *t, char *, const char *, va_list ap) + PRINTF_ATTRIBUTE(3, 0); + +char *talloc_asprintf_append(TALLOC_CTX *t, char *, const char *, ...) + PRINTF_ATTRIBUTE(3, 4); + +/** @} */ + +#endif /* ndef _TALLOC_H_ */ diff --git a/source/lib/replace.c b/source/lib/replace.c index 16d7450d69e..dd50ff035e0 100644 --- a/source/lib/replace.c +++ b/source/lib/replace.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. replacement routines for broken systems Copyright (C) Andrew Tridgell 1992-1998 @@ -24,7 +23,6 @@ void replace_dummy(void); void replace_dummy(void) {} - #ifndef HAVE_FTRUNCATE /******************************************************************* ftruncate for operating systems that don't have it @@ -42,6 +40,42 @@ ftruncate for operating systems that don't have it #endif /* HAVE_FTRUNCATE */ +#ifndef HAVE_STRLCPY +/* like strncpy but does not 0 fill the buffer and always null + terminates. bufsize is the size of the destination buffer */ + size_t strlcpy(char *d, const char *s, size_t bufsize) +{ + size_t len = strlen(s); + size_t ret = len; + if (bufsize <= 0) return 0; + if (len >= bufsize) len = bufsize-1; + memcpy(d, s, len); + d[len] = 0; + return ret; +} +#endif + +#ifndef HAVE_STRLCAT +/* like strncat but does not 0 fill the buffer and always null + terminates. bufsize is the length of the buffer, which should + be one more than the maximum resulting string length */ + size_t strlcat(char *d, const char *s, size_t bufsize) +{ + size_t len1 = strlen(d); + size_t len2 = strlen(s); + size_t ret = len1 + len2; + + if (len1+len2 >= bufsize) { + len2 = bufsize - (len1+1); + } + if (len2 > 0) { + memcpy(d+len1, s, len2); + d[len1+len2] = 0; + } + return ret; +} +#endif + #ifndef HAVE_MKTIME /******************************************************************* a mktime() replacement for those who don't have it - contributed by @@ -125,7 +159,7 @@ Corrections by richard.kettlewell@kewill.com /* * Search for a match in a netgroup. This replaces it on broken systems. */ - int innetgr(char *group,char *host,char *user,char *dom) + int innetgr(const char *group,const char *host,const char *user,const char *dom) { char *hst, *usr, *dm; diff --git a/source/lib/talloc.c b/source/lib/talloc.c index fb5c3495fe4..6ac784a9297 100644 --- a/source/lib/talloc.c +++ b/source/lib/talloc.c @@ -1,8 +1,8 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Samba Unix SMB/CIFS implementation. Samba temporary memory allocation functions Copyright (C) Andrew Tridgell 2000 + Copyright (C) 2001, 2002 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* this is a very simple temporary memory allocator. To use it do the following: +/** + @defgroup talloc Simple memory allocator + @{ + + This is a very simple temporary memory allocator. To use it do the following: 1) when you first want to allocate a pool of meomry use talloc_init() and save the resulting context pointer somewhere @@ -31,58 +35,158 @@ talloc does not zero the memory. It guarantees memory of a TALLOC_ALIGN alignment + + @sa talloc.h */ +/** + * @todo We could allocate both the talloc_chunk structure, and the + * memory it contains all in one allocation, which might be a bit + * faster and perhaps use less memory overhead. + * + * That smells like a premature optimization, though. -- mbp + **/ + +/** + * If you want testing for memory corruption, link with dmalloc or use + * Insure++. It doesn't seem useful to duplicate them here. + **/ + #include "includes.h" -/* initialise talloc context. */ +struct talloc_chunk { + struct talloc_chunk *next; + size_t size; + void *ptr; +}; + + +struct talloc_ctx { + struct talloc_chunk *list; + size_t total_alloc_size; + + /** The name recorded for this pool, if any. Should describe + * the purpose for which it was allocated. The string is + * allocated within the pool. **/ + char *name; + + /** Pointer to the next allocate talloc pool, so that we can + * summarize all talloc memory usage. **/ + struct talloc_ctx *next_ctx; +}; + + +/** + * Start of linked list of all talloc pools. + * + * @todo We should turn the global list off when using Insure++, + * otherwise all the memory will be seen as still reachable. + **/ +TALLOC_CTX *list_head = NULL; + + +/** + * Add to the global list + **/ +static void talloc_enroll(TALLOC_CTX *t) +{ + t->next_ctx = list_head; + list_head = t; +} + + +static void talloc_disenroll(TALLOC_CTX *t) +{ + TALLOC_CTX **ttmp; + + /* Use a double-* so that no special case is required for the + * list head. */ + for (ttmp = &list_head; *ttmp; ttmp = &((*ttmp)->next_ctx)) + if (*ttmp == t) { + /* ttmp is the link that points to t, either + * list_head or the next_ctx link in its + * predecessor */ + *ttmp = t->next_ctx; + t->next_ctx = NULL; /* clobber */ + return; + } + abort(); /* oops, this talloc was already + * clobbered or something else went + * wrong. */ +} + + +/** Create a new talloc context. **/ TALLOC_CTX *talloc_init(void) { TALLOC_CTX *t; - t = (TALLOC_CTX *)malloc(sizeof(*t)); - if (!t) return NULL; + t = (TALLOC_CTX *)malloc(sizeof(TALLOC_CTX)); + if (t) { + t->list = NULL; + t->total_alloc_size = 0; + t->name = NULL; + talloc_enroll(t); + } - t->list = NULL; - t->total_alloc_size = 0; + return t; +} + + + +/** + * Create a new talloc context, with a name specifying its purpose. + * Please call this in preference to talloc_init(). + **/ + TALLOC_CTX *talloc_init_named(char const *fmt, ...) +{ + TALLOC_CTX *t; + va_list ap; + t = talloc_init(); + if (t && fmt) { + va_start(ap, fmt); + t->name = talloc_vasprintf(t, fmt, ap); + va_end(ap); + } + return t; } -/* allocate a bit of memory from the specified pool */ + +/** Allocate a bit of memory from the specified pool **/ void *talloc(TALLOC_CTX *t, size_t size) { void *p; struct talloc_chunk *tc; - if (size == 0) return NULL; + if (!t || size == 0) return NULL; p = malloc(size); - if (!p) return p; - - tc = malloc(sizeof(*tc)); - if (!tc) { - SAFE_FREE(p); - return NULL; + if (p) { + tc = malloc(sizeof(*tc)); + if (tc) { + tc->ptr = p; + tc->size = size; + tc->next = t->list; + t->list = tc; + t->total_alloc_size += size; + } + else { + SAFE_FREE(p); + } } - - tc->ptr = p; - tc->size = size; - tc->next = t->list; - t->list = tc; - t->total_alloc_size += size; - return p; } -/* a talloc version of realloc */ +/** A talloc version of realloc */ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size) { struct talloc_chunk *tc; void *new_ptr; /* size zero is equivalent to free() */ - if (size == 0) + if (!t || size == 0) return NULL; /* realloc(NULL) is equavalent to malloc() */ @@ -103,7 +207,8 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size) return NULL; } -/* destroy a whole pool */ +/** Destroy all the memory allocated inside @p t, but not @p t + * itself. */ void talloc_destroy_pool(TALLOC_CTX *t) { struct talloc_chunk *c; @@ -118,27 +223,40 @@ void talloc_destroy_pool(TALLOC_CTX *t) t->list = c; } - t->list = NULL; t->total_alloc_size = 0; } -/* destroy a whole pool including the context */ +/** Destroy a whole pool including the context */ void talloc_destroy(TALLOC_CTX *t) { if (!t) return; + talloc_destroy_pool(t); - memset(t, 0, sizeof(*t)); + talloc_disenroll(t); + memset(t, 0, sizeof(TALLOC_CTX)); SAFE_FREE(t); } -/* return the current total size of the pool. */ +/** Return the current total size of the pool. */ size_t talloc_pool_size(TALLOC_CTX *t) { - return t->total_alloc_size; + if (t) + return t->total_alloc_size; + else + return 0; } -/* talloc and zero memory. */ +const char * talloc_pool_name(TALLOC_CTX const *t) +{ + if (t) + return t->name; + else + return NULL; +} + + +/** talloc and zero memory. */ void *talloc_zero(TALLOC_CTX *t, size_t size) { void *p = talloc(t, size); @@ -149,21 +267,175 @@ void *talloc_zero(TALLOC_CTX *t, size_t size) return p; } -/* memdup with a talloc. */ -void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size) +/** memdup with a talloc. */ +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size) { void *newp = talloc(t,size); - if (!newp) - return 0; - - memcpy(newp, p, size); + if (newp) + memcpy(newp, p, size); return newp; } -/* strdup with a talloc */ -char *talloc_strdup(TALLOC_CTX *t, char *p) +/** strdup with a talloc */ +char *talloc_strdup(TALLOC_CTX *t, const char *p) +{ + if (p) + return talloc_memdup(t, p, strlen(p) + 1); + else + return NULL; +} + +/** + * Perform string formatting, and return a pointer to newly allocated + * memory holding the result, inside a memory pool. + **/ + char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...) +{ + va_list ap; + char *ret; + + va_start(ap, fmt); + ret = talloc_vasprintf(t, fmt, ap); + va_end(ap); + return ret; +} + + + char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap) +{ + int len; + char *ret; + + len = vsnprintf(NULL, 0, fmt, ap); + + ret = talloc(t, len+1); + if (ret) + vsnprintf(ret, len+1, fmt, ap); + + return ret; +} + + +/** + * Realloc @p s to append the formatted result of @p fmt and return @p + * s, which may have moved. Good for gradually accumulating output + * into a string buffer. + **/ + char *talloc_asprintf_append(TALLOC_CTX *t, char *s, + const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + s = talloc_vasprintf_append(t, s, fmt, ap); + va_end(ap); + return s; +} + + + +/** + * Realloc @p s to append the formatted result of @p fmt and @p ap, + * and return @p s, which may have moved. Good for gradually + * accumulating output into a string buffer. + **/ + char *talloc_vasprintf_append(TALLOC_CTX *t, char *s, + const char *fmt, va_list ap) +{ + int len, s_len; + + s_len = strlen(s); + len = vsnprintf(NULL, 0, fmt, ap); + + s = talloc_realloc(t, s, s_len + len+1); + if (!s) return NULL; + + vsnprintf(s+s_len, len+1, fmt, ap); + + return s; +} + + +/** + * Return a human-readable description of all talloc memory usage. + * The result is allocated from @p t. + **/ +char *talloc_describe_all(TALLOC_CTX *rt) { - return talloc_memdup(t, p, strlen(p) + 1); + int n_pools = 0, total_chunks = 0; + size_t total_bytes = 0; + TALLOC_CTX *it; + char *s; + + if (!rt) return NULL; + + s = talloc_asprintf(rt, "global talloc allocations in pid: %u\n", + (unsigned) sys_getpid()); + s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n", + "name", "chunks", "bytes"); + s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n", + "----------------------------------------", + "--------", + "--------"); + + for (it = list_head; it; it = it->next_ctx) { + size_t bytes; + int n_chunks; + fstring what; + + n_pools++; + + talloc_get_allocation(it, &bytes, &n_chunks); + + if (it->name) + fstrcpy(what, it->name); + else + slprintf(what, sizeof what, "@%p", it); + + s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n", + what, + (unsigned) n_chunks, + (unsigned) bytes); + total_bytes += bytes; + total_chunks += n_chunks; + } + + s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n", + "----------------------------------------", + "--------", + "--------"); + + s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n", + "TOTAL", + (unsigned) total_chunks, (unsigned) total_bytes); + + return s; } + + + +/** + * Return an estimated memory usage for the specified pool. This does + * not include memory used by the underlying malloc implementation. + **/ +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks) +{ + struct talloc_chunk *chunk; + + if (t) { + *total_bytes = 0; + *n_chunks = 0; + + for (chunk = t->list; chunk; chunk = chunk->next) { + n_chunks[0]++; + *total_bytes += chunk->size; + } + } +} + + +/** @} */ diff --git a/source/lib/username.c b/source/lib/username.c index 1dddcec0e50..dae47b2b145 100644 --- a/source/lib/username.c +++ b/source/lib/username.c @@ -524,7 +524,7 @@ BOOL user_in_list(char *user,char *list) BOOL ret; /* Check to see if name is a Windows group */ - if (winbind_lookup_name(tok, &g_sid, &name_type) && name_type == SID_NAME_DOM_GRP) { + if (winbind_lookup_name(NULL, tok, &g_sid, &name_type) && name_type == SID_NAME_DOM_GRP) { /* Check if user name is in the Windows group */ ret = user_in_winbind_group_list(user, tok, &winbind_answered); diff --git a/source/lib/util.c b/source/lib/util.c index a56f7276435..1d4125fbcd3 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1746,11 +1746,10 @@ void *smb_xmalloc(size_t size) return p; } -/***************************************************************** +/** Memdup with smb_panic on fail. - *****************************************************************/ - -void *xmemdup(const void *p, size_t size) +**/ +void *smb_xmemdup(const void *p, size_t size) { void *p2; p2 = smb_xmalloc(size); @@ -1758,18 +1757,30 @@ void *xmemdup(const void *p, size_t size) return p2; } -/***************************************************************** +/** strdup that aborts on malloc fail. - *****************************************************************/ - -char *xstrdup(const char *s) +**/ +char *smb_xstrdup(const char *s) { char *s1 = strdup(s); if (!s1) - smb_panic("xstrdup: malloc fail\n"); + smb_panic("smb_xstrdup: malloc fail\n"); return s1; } +/* + vasprintf that aborts on malloc fail +*/ +int smb_xvasprintf(char **ptr, const char *format, va_list ap) +{ + int n; + n = vasprintf(ptr, format, ap); + if (n == -1 || ! *ptr) { + smb_panic("smb_xvasprintf: out of memory"); + } + return n; +} + /***************************************************************** like strdup but for memory *****************************************************************/ @@ -2011,6 +2022,86 @@ BOOL unix_wild_match(char *pattern, char *string) return unix_do_match(p2, s2) == 0; } +/******************************************************************* + free() a data blob +*******************************************************************/ + +static void free_data_blob(DATA_BLOB *d) +{ + if ((d) && (d->free)) { + SAFE_FREE(d->data); + } +} + +/******************************************************************* + construct a data blob, must be freed with data_blob_free() + you can pass NULL for p and get a blank data blob +*******************************************************************/ + +DATA_BLOB data_blob(const void *p, size_t length) +{ + DATA_BLOB ret; + + if (!length) { + ZERO_STRUCT(ret); + return ret; + } + + if (p) { + ret.data = smb_xmemdup(p, length); + } else { + ret.data = smb_xmalloc(length); + } + ret.length = length; + ret.free = free_data_blob; + return ret; +} + +/******************************************************************* + construct a data blob, using supplied TALLOC_CTX +*******************************************************************/ + +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length) +{ + DATA_BLOB ret; + + if (!p || !length) { + ZERO_STRUCT(ret); + return ret; + } + + ret.data = talloc_memdup(mem_ctx, p, length); + if (ret.data == NULL) + smb_panic("data_blob_talloc: talloc_memdup failed.\n"); + + ret.length = length; + ret.free = NULL; + return ret; +} + +/******************************************************************* +free a data blob +*******************************************************************/ +void data_blob_free(DATA_BLOB *d) +{ + if (d) { + if (d->free) { + (d->free)(d); + } + ZERO_STRUCTP(d); + } +} + +/******************************************************************* +clear a DATA_BLOB's contents +*******************************************************************/ +void data_blob_clear(DATA_BLOB *d) +{ + if (d->data) { + memset(d->data, 0, d->length); + } +} + #ifdef __INSURE__ /******************************************************************* diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index fefcdb0cfb2..02608cc4ff6 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -1021,35 +1021,104 @@ char *get_socket_addr(int fd) } /******************************************************************* - opens and connects to a unix pipe socket + Create protected unix domain socket. + + some unixen cannot set permissions on a ux-dom-sock, so we + have to make sure that the directory contains the protection + permissions, instead. ******************************************************************/ -int open_pipe_sock(char *path) +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms) { - int sock; - struct sockaddr_un sa; - - sock = socket(AF_UNIX, SOCK_STREAM, 0); - - if (sock < 0) - { - DEBUG(0, ("unix socket open failed\n")); - return sock; - } - - ZERO_STRUCT(sa); - sa.sun_family = AF_UNIX; - safe_strcpy(sa.sun_path, path, sizeof(sa.sun_path)-1); - - DEBUG(10, ("socket open succeeded. file name: %s\n", sa.sun_path)); - - if (connect(sock, (struct sockaddr*) &sa, sizeof(sa)) < 0) - { - DEBUG(0,("socket connect to %s failed\n", sa.sun_path)); - close(sock); - return -1; - } - - return sock; + struct sockaddr_un sunaddr; + struct stat st; + int sock; + mode_t old_umask; + pstring path; + + /* Create the socket directory or reuse the existing one */ + + if (lstat(socket_dir, &st) == -1) { + + if (errno == ENOENT) { + + /* Create directory */ + + if (mkdir(socket_dir, dir_perms) == -1) { + DEBUG(0, ("error creating socket directory " + "%s: %s\n", socket_dir, + strerror(errno))); + return -1; + } + + } else { + + DEBUG(0, ("lstat failed on socket directory %s: %s\n", + socket_dir, strerror(errno))); + return -1; + } + + } else { + + /* Check ownership and permission on existing directory */ + + if (!S_ISDIR(st.st_mode)) { + DEBUG(0, ("socket directory %s isn't a directory\n", + socket_dir)); + return -1; + } + + if ((st.st_uid != sec_initial_uid()) || + ((st.st_mode & 0777) != dir_perms)) { + DEBUG(0, ("invalid permissions on socket directory " + "%s\n", socket_dir)); + return -1; + } + } + + /* Create the socket file */ + + old_umask = umask(0); + + sock = socket(AF_UNIX, SOCK_STREAM, 0); + + if (sock == -1) { + perror("socket"); + umask(old_umask); + return -1; + } + + snprintf(path, sizeof(path), "%s/%s", socket_dir, socket_name); + + unlink(path); + memset(&sunaddr, 0, sizeof(sunaddr)); + sunaddr.sun_family = AF_UNIX; + safe_strcpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path)-1); + + if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { + DEBUG(0, ("bind failed on pipe socket %s: %s\n", + path, + strerror(errno))); + close(sock); + umask(old_umask); + return -1; + } + + if (listen(sock, 5) == -1) { + DEBUG(0, ("listen failed on pipe socket %s: %s\n", + path, + strerror(errno))); + close(sock); + umask(old_umask); + return -1; + } + + umask(old_umask); + + /* Success! */ + + return sock; } /******************************************************************* diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index d11bb0657bb..eaed4e89db8 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -348,6 +348,20 @@ void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen) *p = 0; } +/******************************************************************* + duplicate a UNISTR2 string into a null terminated char* + using a talloc context +********************************************************************/ +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str) +{ + char *s; + int maxlen = (str->uni_str_len+1)*4; + if (!str->buffer) return NULL; + s = (char *)talloc(ctx, maxlen); /* convervative */ + if (!s) return NULL; + unistr2_to_ascii(s, str, maxlen); + return s; +} /******************************************************************* Return a number stored in a buffer diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c index c7bcc1490ba..30656b726b9 100644 --- a/source/libsmb/cli_lsarpc.c +++ b/source/libsmb/cli_lsarpc.c @@ -75,7 +75,7 @@ NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Initialise input parameters */ if (sec_qos) { - init_lsa_sec_qos(&qos, 2, 1, 0, des_access); + init_lsa_sec_qos(&qos, 2, 1, 0); init_q_open_pol(&q, '\\', 0, des_access, &qos); } else { init_q_open_pol(&q, '\\', 0, des_access, NULL); @@ -131,7 +131,7 @@ NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Initialise input parameters */ if (sec_qos) { - init_lsa_sec_qos(&qos, 2, 1, 0, des_access); + init_lsa_sec_qos(&qos, 2, 1, 0); init_q_open_pol2(&q, cli->clnt_name_slash, 0, des_access, &qos); } else { @@ -215,11 +215,9 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -/** Lookup a list of sids */ - NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***names, uint32 **types, int *num_names) + char ***domains, char ***names, uint32 **types, int *num_names) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_SIDS q; @@ -280,6 +278,12 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, (*num_names) = r.mapped_count; result = NT_STATUS_OK; + if (!((*domains) = (char **)talloc(mem_ctx, sizeof(char *) * r.mapped_count))) { + DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + if (!((*names) = (char **)talloc(mem_ctx, sizeof(char *) * r.mapped_count))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; @@ -293,7 +297,7 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, } for (i = 0; i < r.mapped_count; i++) { - fstring name, dom_name, full_name; + fstring name, dom_name; uint32 dom_idx = t_names.name[i].domain_idx; /* Translate optimised name through domain index array */ @@ -303,13 +307,15 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)- 1); unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name) - 1); - slprintf(full_name, sizeof(full_name) - 1, - "%s%s%s", dom_name, - (dom_name[0] && name[0]) ? - lp_winbind_separator() : "", name); - - (*names)[i] = talloc_strdup(mem_ctx, full_name); + (*names)[i] = talloc_strdup(mem_ctx, name); + (*domains)[i] = talloc_strdup(mem_ctx, dom_name); (*types)[i] = t_names.name[i].sid_name_use; + + if (((*names)[i] == NULL) || ((*domains)[i] == NULL)) { + DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } } else { (*names)[i] = NULL; @@ -327,7 +333,7 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /** Lookup a list of names */ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, char **names, + POLICY_HND *pol, int num_names, const char **names, DOM_SID **sids, uint32 **types, int *num_sids) { prs_struct qbuf, rbuf; diff --git a/source/libsmb/cli_netlogon.c b/source/libsmb/cli_netlogon.c index 1e4f7955d26..2fb5f88d7b1 100644 --- a/source/libsmb/cli_netlogon.c +++ b/source/libsmb/cli_netlogon.c @@ -161,7 +161,8 @@ password ?).\n", cli->desthost )); /* Initialize domain session credentials */ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - unsigned char mach_pwd[16]) + uint16 sec_chan, + const unsigned char mach_pwd[16]) { DOM_CHAL clnt_chal; DOM_CHAL srv_chal; @@ -183,7 +184,7 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, /**************** Long-term Session key **************/ /* calculate the session key */ - cred_session_key(&clnt_chal, &srv_chal, (char *)mach_pwd, + cred_session_key(&clnt_chal, &srv_chal, mach_pwd, cli->sess_key); memset((char *)cli->sess_key+8, '\0', 8); @@ -199,9 +200,8 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, * Receive an auth-2 challenge response and check it. */ - result = new_cli_net_auth2(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? - SEC_CHAN_WKSTA : SEC_CHAN_BDC, 0x000001ff, - &srv_chal); + result = new_cli_net_auth2(cli, sec_chan, 0x000001ff, &srv_chal); + if (!NT_STATUS_IS_OK(result)) { DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n", get_nt_error_msg(result))); @@ -492,3 +492,174 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, done: return result; } + +/** + * Logon domain user with an 'network' SAM logon + * + * @param info3 Pointer to a NET_USER_INFO_3 already allocated by the caller. + **/ + +NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *username, const char *domain, const char *workstation, + const uint8 chal[8], + DATA_BLOB lm_response, DATA_BLOB nt_response, + NET_USER_INFO_3 *info3) + +{ + prs_struct qbuf, rbuf; + NET_Q_SAM_LOGON q; + NET_R_SAM_LOGON r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + DOM_CRED clnt_creds, dummy_rtn_creds; + NET_ID_INFO_CTR ctr; + extern pstring global_myname; + int validation_level = 3; + char *workstation_name_slash; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + workstation_name_slash = talloc_asprintf(mem_ctx, "\\\\%s", workstation); + + if (!workstation_name_slash) { + DEBUG(0, ("talloc_asprintf failed!\n")); + return NT_STATUS_NO_MEMORY; + } + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + gen_next_creds(cli, &clnt_creds); + + q.validation_level = validation_level; + + memset(&dummy_rtn_creds, '\0', sizeof(dummy_rtn_creds)); + dummy_rtn_creds.timestamp.time = time(NULL); + + ctr.switch_value = NET_LOGON_TYPE; + + init_id_info2(&ctr.auth.id2, domain, + 0, /* param_ctrl */ + 0xdead, 0xbeef, /* LUID? */ + username, workstation_name_slash, (const uchar*)chal, + lm_response.data, lm_response.length, nt_response.data, nt_response.length); + + init_sam_info(&q.sam_id, cli->srv_name_slash, global_myname, + &clnt_creds, &dummy_rtn_creds, NET_LOGON_TYPE, + &ctr); + + /* Marshall data and send request */ + + if (!net_io_q_sam_logon("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, NET_SAMLOGON, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + r.user = info3; + + if (!net_io_r_sam_logon("", &r, &rbuf, 0)) { + goto done; + } + + /* Return results */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +#if 0 +/*************************************************************************** +LSA Server Password Set. +****************************************************************************/ + + NTSTATUS cli_net_srv_pwset(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char* machine_name, uint8 hashed_mach_pwd[16]) +{ + prs_struct rbuf; + prs_struct qbuf; + DOM_CRED new_clnt_cred; + NET_Q_SRV_PWSET q_s; + uint16 sec_chan_type = 2; + NTSTATUS nt_status; + char *mach_acct; + + gen_next_creds( cli, &new_clnt_cred); + + prs_init(&qbuf , 1024, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* create and send a MSRPC command with api NET_SRV_PWSET */ + + mach_acct = talloc_asprintf(mem_ctx, "%s$", machine_name); + + if (!mach_acct) { + DEBUG(0,("talloc_asprintf failed!\n")); + nt_status = NT_STATUS_NO_MEMORY; + goto done; + } + + DEBUG(4,("cli_net_srv_pwset: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n", + cli->srv_name_slash, mach_acct, sec_chan_type, machine_name, + credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time)); + + /* store the parameters */ + init_q_srv_pwset(&q_s, cli->srv_name_slash, cli->sess_key, + mach_acct, sec_chan_type, machine_name, + &new_clnt_cred, (char *)hashed_mach_pwd); + + /* turn parameters into data stream */ + if(!net_io_q_srv_pwset("", &q_s, &qbuf, 0)) { + DEBUG(0,("cli_net_srv_pwset: Error : failed to marshall NET_Q_SRV_PWSET struct.\n")); + nt_status = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* send the data on \PIPE\ */ + if (rpc_api_pipe_req(cli, NET_SRVPWSET, &qbuf, &rbuf)) + { + NET_R_SRV_PWSET r_s; + + if (!net_io_r_srv_pwset("", &r_s, &rbuf, 0)) { + nt_status = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + nt_status = r_s.status; + + if (!NT_STATUS_IS_OK(r_s.status)) + { + /* report error code */ + DEBUG(0,("cli_net_srv_pwset: %s\n", nt_errstr(nt_status))); + goto done; + } + + /* Update the credentials. */ + if (!clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &(r_s.srv_cred))) + { + /* + * Server replied with bad credential. Fail. + */ + DEBUG(0,("cli_net_srv_pwset: server %s replied with bad credential (bad machine \ +password ?).\n", cli->desthost )); + nt_status = NT_STATUS_UNSUCCESSFUL; + } + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return nt_status; +} +#endif diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index de1924ee23a..93348e94f95 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -923,6 +923,120 @@ BOOL cli_establish_connection(struct cli_state *cli, return True; } +/* Initialise client credentials for authenticated pipe access */ + +static void init_creds(struct ntuser_creds *creds, char* username, + char* domain, char* password, int pass_len) +{ + ZERO_STRUCTP(creds); + + pwd_set_cleartext(&creds->pwd, password); + + fstrcpy(creds->user_name, username); + fstrcpy(creds->domain, domain); + + if (!*username) { + creds->pwd.null_pwd = True; + } +} + +/**************************************************************************** +establishes a connection right up to doing tconX, password specified. +****************************************************************************/ +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) +{ + struct ntuser_creds creds; + NTSTATUS nt_status; + struct nmb_name calling; + struct nmb_name called; + struct cli_state *cli; + struct in_addr ip; + + if (!output_cli) + DEBUG(0, ("output_cli is NULL!?!")); + + *output_cli = NULL; + + make_nmb_name(&calling, my_name, 0x0); + make_nmb_name(&called , dest_host, 0x20); + +again: + + if (!(cli = cli_initialise(NULL))) + return NT_STATUS_NO_MEMORY; + + if (cli_set_port(cli, port) != port) { + cli_shutdown(cli); + return NT_STATUS_UNSUCCESSFUL; + } + + ip = *dest_ip; + + DEBUG(3,("Connecting to host=%s share=%s\n", dest_host, service)); + + if (!cli_connect(cli, dest_host, &ip)) { + DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n", + nmb_namestr(&called), inet_ntoa(*dest_ip))); + cli_shutdown(cli); + return NT_STATUS_UNSUCCESSFUL; + } + + if (!cli_session_request(cli, &calling, &called)) { + char *p; + DEBUG(1,("session request to %s failed (%s)\n", + called.name, cli_errstr(cli))); + cli_shutdown(cli); + if ((p=strchr(called.name, '.'))) { + *p = 0; + goto again; + } + if (strcmp(called.name, "*SMBSERVER")) { + make_nmb_name(&called , "*SMBSERVER", 0x20); + goto again; + } + return NT_STATUS_UNSUCCESSFUL; + } + + if (!cli_negprot(cli)) { + DEBUG(1,("failed negprot\n")); + nt_status = NT_STATUS_UNSUCCESSFUL; + cli_shutdown(cli); + return nt_status; + } + + if (!cli_session_setup(cli, user, password, pass_len, NULL, 0, + domain)) { + DEBUG(1,("failed session setup\n")); + nt_status = cli_nt_error(cli); + cli_shutdown(cli); + if (NT_STATUS_IS_OK(nt_status)) + nt_status = NT_STATUS_UNSUCCESSFUL; + return nt_status; + } + + if (service) { + if (!cli_send_tconX(cli, service, service_type, + (char*)password, pass_len)) { + DEBUG(1,("failed tcon_X\n")); + nt_status = cli_nt_error(cli); + cli_shutdown(cli); + if (NT_STATUS_IS_OK(nt_status)) + nt_status = NT_STATUS_UNSUCCESSFUL; + return nt_status; + } + } + + init_creds(&creds, user, domain, password, pass_len); + cli_init_creds(cli, &creds); + + *output_cli = cli; + return NT_STATUS_OK; +} /**************************************************************************** Attempt a NetBIOS session request, falling back to *SMBSERVER if needed. diff --git a/source/libsmb/credentials.c b/source/libsmb/credentials.c index 5f65c13edd9..86adf03c402 100644 --- a/source/libsmb/credentials.c +++ b/source/libsmb/credentials.c @@ -24,7 +24,7 @@ /**************************************************************************** represent a credential as a string ****************************************************************************/ -char *credstr(uchar *cred) +char *credstr(const uchar *cred) { static fstring buf; slprintf(buf, sizeof(buf) - 1, "%02X%02X%02X%02X%02X%02X%02X%02X", @@ -42,8 +42,8 @@ Input: 8 byte challenge block Output: 8 byte session key ****************************************************************************/ -void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, - uchar session_key[8]) +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]) { uint32 sum[2]; unsigned char sum2[8]; @@ -54,7 +54,7 @@ void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass, SIVAL(sum2,0,sum[0]); SIVAL(sum2,4,sum[1]); - cred_hash1(session_key, sum2,(unsigned char *)pass); + cred_hash1(session_key, sum2,pass); /* debug output */ DEBUG(4,("cred_session_key\n")); diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index fc61245a658..24018bfb26a 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -1254,7 +1254,7 @@ NT GETDC call, UNICODE, NT domain SID and uncle tom cobbley and all... Get the IP address list of the PDC/BDC's of a Domain. *********************************************************/ -BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count) +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count) { int name_type = pdc_only ? 0x1B : 0x1C; diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c index 25286156ee3..13c2aeee2d3 100644 --- a/source/libsmb/nterr.c +++ b/source/libsmb/nterr.c @@ -559,6 +559,11 @@ char *get_nt_error_msg(NTSTATUS nt_code) return msg; } +char *nt_errstr(NTSTATUS nt_code) +{ + return get_nt_error_msg(nt_code); +} + /***************************************************************************** returns an NT_STATUS constant as a string for inclusion in autogen C code *****************************************************************************/ diff --git a/source/libsmb/smbdes.c b/source/libsmb/smbdes.c index 866fc0c7e0b..440121d1265 100644 --- a/source/libsmb/smbdes.c +++ b/source/libsmb/smbdes.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. a partial implementation of DES designed for use in the SMB authentication protocol @@ -331,7 +330,7 @@ void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char * smbhash(out+8, in+8, p14+7, 1); } -void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key) +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key) { unsigned char buf[8]; @@ -339,7 +338,7 @@ void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key) smbhash(out, buf, key+9, 1); } -void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key) +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key) { unsigned char buf[8]; static unsigned char key2[8]; @@ -349,7 +348,7 @@ void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key) smbhash(out, buf, key2, 1); } -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw) +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw) { static unsigned char key2[8]; diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 1de2ca53084..c87ff61fdfc 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -28,13 +28,13 @@ This implements the X/Open SMB password encryption It takes a password, a 8 byte "crypt key" and puts 24 bytes of encrypted password into p24 */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24) +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24) { uchar p14[15], p21[21]; memset(p21,'\0',21); memset(p14,'\0',14); - StrnCpy((char *)p14,(char *)passwd,14); + StrnCpy((char *)p14,(const char *)passwd,14); strupper((char *)p14); E_P16(p14, p21); @@ -53,13 +53,13 @@ void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24) * Creates the MD4 Hash of the users password in NT UNICODE. */ -void E_md4hash(uchar *passwd, uchar *p16) +void E_md4hash(const uchar *passwd, uchar *p16) { int len; int16 wpwd[129]; /* Password cannot be longer than 128 characters */ - len = strlen((char *)passwd); + len = strlen(passwd); if(len > 128) len = 128; /* Password must be converted to NT unicode - null terminated. */ @@ -138,7 +138,7 @@ void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]) /* Does the NT MD4 hash then des encryption. */ -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24) +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24) { uchar p21[21]; diff --git a/source/nsswitch/hp_nss_common.h b/source/nsswitch/hp_nss_common.h index 7ce67ed81fa..5f39e9abb05 100644 --- a/source/nsswitch/hp_nss_common.h +++ b/source/nsswitch/hp_nss_common.h @@ -2,8 +2,7 @@ #define _HP_NSS_COMMON_H /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. Donated by HP to enable Winbindd to build on HPUX 11.x. Copyright (C) Jeremy Allison 2002. @@ -24,12 +23,8 @@ Boston, MA 02111-1307, USA. */ -#ifdef HAVE_SYNCH_H #include -#endif -#ifdef HAVE_PTHREAD_H #include -#endif typedef enum { NSS_SUCCESS, diff --git a/source/nsswitch/hp_nss_dbdefs.h b/source/nsswitch/hp_nss_dbdefs.h index c6951277356..bd24772e339 100644 --- a/source/nsswitch/hp_nss_dbdefs.h +++ b/source/nsswitch/hp_nss_dbdefs.h @@ -2,8 +2,7 @@ #define _HP_NSS_DBDEFS_H /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. Donated by HP to enable Winbindd to build on HPUX 11.x. Copyright (C) Jeremy Allison 2002. diff --git a/source/nsswitch/nss.h b/source/nsswitch/nss.h index f30f9ca1348..e021b013b50 100644 --- a/source/nsswitch/nss.h +++ b/source/nsswitch/nss.h @@ -1,8 +1,7 @@ #ifndef _NSSWITCH_NSS_H #define _NSSWITCH_NSS_H /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. a common place to work out how to define NSS_STATUS on various platforms @@ -73,7 +72,7 @@ typedef enum #define NSD_MEM_VOLATILE 1 #define NSD_MEM_DYNAMIC 2 -#elif defined(HPUX) && defined(HAVE_NSSWITCH_H) +#elif defined(HPUX) /* HP-UX 11 */ #include "nsswitch/hp_nss_common.h" diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c index 048140fd790..42cc29f3207 100644 --- a/source/nsswitch/pam_winbind.c +++ b/source/nsswitch/pam_winbind.c @@ -1,8 +1,12 @@ /* pam_winbind module Copyright Andrew Tridgell 2000 + Copyright Tim Potter 2000 + Copyright Andrew Bartlett 2002 largely based on pam_userdb by Christian Gafton + also contains large slabs of code from pam_unix by Elliot Lee + (see copyright below for full details) */ #include "pam_winbind.h" @@ -12,6 +16,10 @@ void init_request(struct winbindd_request *req,int rq_type); int write_sock(void *buffer, int count); int read_reply(struct winbindd_response *response); +/* data tokens */ + +#define MAX_PASSWD_TRIES 3 + /* some syslogging */ static void _pam_log(int err, const char *format, ...) { @@ -24,27 +32,71 @@ static void _pam_log(int err, const char *format, ...) closelog(); } -static int ctrl = 0; - static int _pam_parse(int argc, const char **argv) { - /* step through arguments */ - for (ctrl = 0; argc-- > 0; ++argv) { - - /* generic options */ - - if (!strcmp(*argv,"debug")) - ctrl |= PAM_DEBUG_ARG; - else if (!strcasecmp(*argv, "use_authtok")) - ctrl |= PAM_USE_AUTHTOK_ARG; - else if (!strcasecmp(*argv, "unknown_ok")) - ctrl |= PAM_UNKNOWN_OK_ARG; - else { - _pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv); - } - } + int ctrl; + /* step through arguments */ + for (ctrl = 0; argc-- > 0; ++argv) { + + /* generic options */ + + if (!strcmp(*argv,"debug")) + ctrl |= WINBIND_DEBUG_ARG; + else if (!strcasecmp(*argv, "use_authtok")) + ctrl |= WINBIND_USE_AUTHTOK_ARG; + else if (!strcasecmp(*argv, "use_first_pass")) + ctrl |= WINBIND_TRY_FIRST_PASS_ARG; + else if (!strcasecmp(*argv, "try_first_pass")) + ctrl |= WINBIND_USE_FIRST_PASS_ARG; + else if (!strcasecmp(*argv, "unknown_ok")) + ctrl |= WINBIND_UNKNOWN_OK_ARG; + else { + _pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv); + } + } + + return ctrl; +} + +/* --- authentication management functions --- */ + +/* Attempt a conversation */ + +static int converse(pam_handle_t *pamh, int nargs, + struct pam_message **message, + struct pam_response **response) +{ + int retval; + struct pam_conv *conv; - return ctrl; + retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv ) ; + if (retval == PAM_SUCCESS) { + retval = conv->conv(nargs, (const struct pam_message **)message, + response, conv->appdata_ptr); + } + + return retval; /* propagate error status */ +} + + +int _make_remark(pam_handle_t * pamh, int type, const char *text) +{ + int retval = PAM_SUCCESS; + + struct pam_message *pmsg[1], msg[1]; + struct pam_response *resp; + + pmsg[0] = &msg[0]; + msg[0].msg = text; + msg[0].msg_style = type; + + resp = NULL; + retval = converse(pamh, 1, pmsg, &resp); + + if (resp) { + _pam_drop_reply(resp, 1); + } + return retval; } static int winbind_request(enum winbindd_cmd req_type, @@ -55,27 +107,38 @@ static int winbind_request(enum winbindd_cmd req_type, init_request(request, req_type); if (write_sock(request, sizeof(*request)) == -1) { - return -2; + _pam_log(LOG_ERR, "write to socket failed!"); + return PAM_SERVICE_ERR; } /* Wait for reply */ if (read_reply(response) == -1) { - return -2; + _pam_log(LOG_ERR, "read from socket failed!"); + return PAM_SERVICE_ERR; } /* Copy reply data from socket */ if (response->result != WINBINDD_OK) { - return 1; + if (response->data.auth.pam_error != PAM_SUCCESS) { + _pam_log(LOG_ERR, "request failed, PAM error was %d, NT error was %s", + response->data.auth.pam_error, + response->data.auth.nt_status_string); + return response->data.auth.pam_error; + } else { + _pam_log(LOG_ERR, "request failed, but PAM error 0!"); + return PAM_SERVICE_ERR; + } } - return 0; + return PAM_SUCCESS; } /* talk to winbindd */ -static int winbind_auth_request(const char *user, const char *pass) +static int winbind_auth_request(const char *user, const char *pass, int ctrl) { struct winbindd_request request; struct winbindd_response response; + int retval; ZERO_STRUCT(request); @@ -85,7 +148,33 @@ static int winbind_auth_request(const char *user, const char *pass) strncpy(request.data.auth.pass, pass, sizeof(request.data.auth.pass)-1); - return winbind_request(WINBINDD_PAM_AUTH, &request, &response); + retval = winbind_request(WINBINDD_PAM_AUTH, &request, &response); + + switch (retval) { + case PAM_AUTH_ERR: + /* incorrect password */ + _pam_log(LOG_WARNING, "user `%s' denied access (incorrect password)", user); + return retval; + case PAM_USER_UNKNOWN: + /* the user does not exist */ + if (ctrl & WINBIND_DEBUG_ARG) + _pam_log(LOG_NOTICE, "user `%s' not found", + user); + if (ctrl & WINBIND_UNKNOWN_OK_ARG) { + return PAM_IGNORE; + } + return retval; + case PAM_SUCCESS: + /* Otherwise, the authentication looked good */ + _pam_log(LOG_NOTICE, "user '%s' granted acces", user); + return retval; + default: + /* we don't know anything about this return value */ + _pam_log(LOG_ERR, "internal module error (retval = %d, user = `%s'", + retval, user); + return retval; + } + /* should not be reached */ } /* talk to winbindd */ @@ -119,20 +208,6 @@ static int winbind_chauthtok_request(const char *user, const char *oldpass, return winbind_request(WINBINDD_PAM_CHAUTHTOK, &request, &response); } -/* - * Looks up an user name and checks the password - * - * return values: - * 1 = User not found - * 0 = OK - * -1 = Password incorrect - * -2 = System error - */ -static int user_lookup(const char *user, const char *pass) -{ - return winbind_auth_request(user, pass); -} - /* * Checks if a user has an account * @@ -147,27 +222,6 @@ static int valid_user(const char *user) return 1; } -/* --- authentication management functions --- */ - -/* Attempt a conversation */ - -static int converse(pam_handle_t *pamh, int nargs, - struct pam_message **message, - struct pam_response **response) -{ - int retval; - struct pam_conv *conv; - - retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv ) ; - if (retval == PAM_SUCCESS) { - retval = conv->conv(nargs, (const struct pam_message **)message, - response, conv->appdata_ptr); - } - - return retval; /* propagate error status */ -} - - static char *_pam_delete(register char *xx) { _pam_overwrite(xx); @@ -176,48 +230,155 @@ static char *_pam_delete(register char *xx) } /* - * This is a conversation function to obtain the user's password + * obtain a password from the user */ -static int auth_conversation(pam_handle_t *pamh) + +int _winbind_read_password(pam_handle_t * pamh + ,unsigned int ctrl + ,const char *comment + ,const char *prompt1 + ,const char *prompt2 + ,const char **pass) { - struct pam_message msg, *pmsg; - struct pam_response *resp; - int retval; - char * token = NULL; - - pmsg = &msg; - msg.msg_style = PAM_PROMPT_ECHO_OFF; - msg.msg = "Password: "; - - /* so call the conversation expecting i responses */ - resp = NULL; - retval = converse(pamh, 1, &pmsg, &resp); - - if (resp != NULL) { - char * const item; - /* interpret the response */ - if (retval == PAM_SUCCESS) { /* a good conversation */ - token = x_strdup(resp[0].resp); - if (token == NULL) { - return PAM_AUTHTOK_RECOVER_ERR; - } + int authtok_flag; + int retval; + const char *item; + char *token; + + /* + * make sure nothing inappropriate gets returned + */ + + *pass = token = NULL; + + /* + * which authentication token are we getting? + */ + + authtok_flag = on(WINBIND__OLD_PASSWORD, ctrl) ? PAM_OLDAUTHTOK : PAM_AUTHTOK; + + /* + * should we obtain the password from a PAM item ? + */ + + if (on(WINBIND_TRY_FIRST_PASS_ARG, ctrl) || on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) { + retval = pam_get_item(pamh, authtok_flag, (const void **) &item); + if (retval != PAM_SUCCESS) { + /* very strange. */ + _pam_log(LOG_ALERT, + "pam_get_item returned error to unix-read-password" + ); + return retval; + } else if (item != NULL) { /* we have a password! */ + *pass = item; + item = NULL; + return PAM_SUCCESS; + } else if (on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) { + return PAM_AUTHTOK_RECOVER_ERR; /* didn't work */ + } else if (on(WINBIND_USE_AUTHTOK_ARG, ctrl) + && off(WINBIND__OLD_PASSWORD, ctrl)) { + return PAM_AUTHTOK_RECOVER_ERR; + } + } + /* + * getting here implies we will have to get the password from the + * user directly. + */ + + { + struct pam_message msg[3], *pmsg[3]; + struct pam_response *resp; + int i, replies; + + /* prepare to converse */ + + if (comment != NULL) { + pmsg[0] = &msg[0]; + msg[0].msg_style = PAM_TEXT_INFO; + msg[0].msg = comment; + i = 1; + } else { + i = 0; + } + + pmsg[i] = &msg[i]; + msg[i].msg_style = PAM_PROMPT_ECHO_OFF; + msg[i++].msg = prompt1; + replies = 1; + + if (prompt2 != NULL) { + pmsg[i] = &msg[i]; + msg[i].msg_style = PAM_PROMPT_ECHO_OFF; + msg[i++].msg = prompt2; + ++replies; + } + /* so call the conversation expecting i responses */ + resp = NULL; + retval = converse(pamh, i, pmsg, &resp); + + if (resp != NULL) { + + /* interpret the response */ + + if (retval == PAM_SUCCESS) { /* a good conversation */ + + token = x_strdup(resp[i - replies].resp); + if (token != NULL) { + if (replies == 2) { + + /* verify that password entered correctly */ + if (!resp[i - 1].resp + || strcmp(token, resp[i - 1].resp)) { + _pam_delete(token); /* mistyped */ + retval = PAM_AUTHTOK_RECOVER_ERR; + _make_remark(pamh ,PAM_ERROR_MSG, MISTYPED_PASS); + } + } + } else { + _pam_log(LOG_NOTICE + ,"could not recover authentication token"); + } + + } + /* + * tidy up the conversation (resp_retcode) is ignored + * -- what is it for anyway? AGM + */ + + _pam_drop_reply(resp, i); + + } else { + retval = (retval == PAM_SUCCESS) + ? PAM_AUTHTOK_RECOVER_ERR : retval; + } } - /* set the auth token */ - retval = pam_set_item(pamh, PAM_AUTHTOK, token); - token = _pam_delete(token); /* clean it up */ - if ( (retval != PAM_SUCCESS) || - (retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &item)) != PAM_SUCCESS ) { - return retval; + if (retval != PAM_SUCCESS) { + if (on(WINBIND_DEBUG_ARG, ctrl)) + _pam_log(LOG_DEBUG, + "unable to obtain a password"); + return retval; } + /* 'token' is the entered password */ + + /* we store this password as an item */ - _pam_drop_reply(resp, 1); - } else { - retval = (retval == PAM_SUCCESS) - ? PAM_AUTHTOK_RECOVER_ERR:retval ; - } + retval = pam_set_item(pamh, authtok_flag, token); + _pam_delete(token); /* clean it up */ + if (retval != PAM_SUCCESS + || (retval = pam_get_item(pamh, authtok_flag + ,(const void **) &item)) + != PAM_SUCCESS) { + + _pam_log(LOG_CRIT, "error manipulating password"); + return retval; + + } + + *pass = item; + item = NULL; /* break link to password */ - return retval; + return PAM_SUCCESS; } PAM_EXTERN @@ -229,68 +390,39 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int retval = PAM_AUTH_ERR; /* parse arguments */ - ctrl = _pam_parse(argc, argv); + int ctrl = _pam_parse(argc, argv); /* Get the username */ retval = pam_get_user(pamh, &username, NULL); if ((retval != PAM_SUCCESS) || (!username)) { - if (ctrl & PAM_DEBUG_ARG) + if (ctrl & WINBIND_DEBUG_ARG) _pam_log(LOG_DEBUG,"can not get the username"); return PAM_SERVICE_ERR; } - if ((ctrl & PAM_USE_AUTHTOK_ARG) == 0) { - /* Converse just to be sure we have the password */ - retval = auth_conversation(pamh); - if (retval != PAM_SUCCESS) { - _pam_log(LOG_ERR, "could not obtain password for `%s'", - username); - return PAM_CONV_ERR; - } - } + retval = _winbind_read_password(pamh, ctrl, NULL, + "Password: ", NULL, + &password); - /* Get the password */ - retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &password); if (retval != PAM_SUCCESS) { _pam_log(LOG_ERR, "Could not retrive user's password"); return PAM_AUTHTOK_ERR; } - if (ctrl & PAM_DEBUG_ARG) + if (ctrl & WINBIND_DEBUG_ARG) { + + /* Let's not give too much away in the log file */ + +#ifdef DEBUG_PASSWORD _pam_log(LOG_INFO, "Verify user `%s' with password `%s'", username, password); - - /* Now use the username to look up password */ - retval = user_lookup(username, password); - switch (retval) { - case -2: - /* some sort of system error. The log was already printed */ - return PAM_SERVICE_ERR; - case -1: - /* incorrect password */ - _pam_log(LOG_WARNING, "user `%s' denied access (incorrect password)", username); - return PAM_AUTH_ERR; - case 1: - /* the user does not exist */ - if (ctrl & PAM_DEBUG_ARG) - _pam_log(LOG_NOTICE, "user `%s' not found", - username); - if (ctrl & PAM_UNKNOWN_OK_ARG) { - return PAM_IGNORE; - } - return PAM_USER_UNKNOWN; - case 0: - /* Otherwise, the authentication looked good */ - _pam_log(LOG_NOTICE, "user '%s' granted access", username); - return PAM_SUCCESS; - default: - /* we don't know anything about this return value */ - _pam_log(LOG_ERR, "internal module error (retval = %d, user = `%s'", - retval, username); - return PAM_SERVICE_ERR; +#else + _pam_log(LOG_INFO, "Verify user `%s'", username); +#endif } - /* should not be reached */ - return PAM_IGNORE; + + /* Now use the username to look up password */ + return winbind_auth_request(username, password, ctrl); } PAM_EXTERN @@ -312,12 +444,12 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int retval = PAM_USER_UNKNOWN; /* parse arguments */ - ctrl = _pam_parse(argc, argv); + int ctrl = _pam_parse(argc, argv); /* Get the username */ retval = pam_get_user(pamh, &username, NULL); if ((retval != PAM_SUCCESS) || (!username)) { - if (ctrl & PAM_DEBUG_ARG) + if (ctrl & WINBIND_DEBUG_ARG) _pam_log(LOG_DEBUG,"can not get the username"); return PAM_SERVICE_ERR; } @@ -330,15 +462,15 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, return PAM_SERVICE_ERR; case 1: /* the user does not exist */ - if (ctrl & PAM_DEBUG_ARG) + if (ctrl & WINBIND_DEBUG_ARG) _pam_log(LOG_NOTICE, "user `%s' not found", username); - if (ctrl & PAM_UNKNOWN_OK_ARG) + if (ctrl & WINBIND_UNKNOWN_OK_ARG) return PAM_IGNORE; return PAM_USER_UNKNOWN; case 0: /* Otherwise, the authentication looked good */ - _pam_log(LOG_NOTICE, "user '%s' granted access", username); + _pam_log(LOG_NOTICE, "user '%s' granted acces", username); return PAM_SUCCESS; default: /* we don't know anything about this return value */ @@ -352,138 +484,162 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, } -PAM_EXTERN -int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, - const char **argv) +PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags, + int argc, const char **argv) { - int retval; - char *newpw, *oldpw; - const char *user; - - /* Get name of a user */ - - retval = pam_get_user(pamh, &user, "Username: "); - - if (retval != PAM_SUCCESS) { - return retval; - } - - /* XXX check in domain format */ - - /* Perform preliminary check and store requested password for updating - later on */ - - if (flags & PAM_PRELIM_CHECK) { - struct pam_message msg[3], *pmsg[3]; - struct pam_response *resp; - - /* Converse to ensure we have the current password */ - - retval = auth_conversation(pamh); - - if (retval != PAM_SUCCESS) { - return retval; - } - - /* Obtain and verify current password */ - - pmsg[0] = &msg[0]; - msg[0].msg_style = PAM_TEXT_INFO; - msg[0].msg = "Changing password for user %s"; - - pmsg[1] = &msg[1]; - msg[1].msg_style = PAM_PROMPT_ECHO_OFF; - msg[1].msg = "New NT password: "; - - pmsg[2] = &msg[2]; - msg[2].msg_style = PAM_PROMPT_ECHO_OFF; - msg[2].msg = "Retype new NT password: "; - - resp = NULL; - - retval = converse(pamh, 3, pmsg, &resp); - - if (resp != NULL) { - - if (retval == PAM_SUCCESS) { + unsigned int lctrl; + int retval; + unsigned int ctrl = _pam_parse(argc, argv); - /* Check password entered correctly */ + /* */ + const char *user; + char *pass_old, *pass_new; + /* */ - if (strcmp(resp[1].resp, resp[2].resp) != 0) { - struct pam_response *resp2; - - msg[0].msg_style = PAM_ERROR_MSG; - msg[0].msg = "Sorry, passwords do not match"; - - converse(pamh, 1, pmsg, &resp2); - - _pam_drop_reply(resp, 3); - _pam_drop_reply(resp2, 1); - - return PAM_AUTHTOK_RECOVER_ERR; - } - - /* Store passwords */ - - retval = pam_set_item(pamh, PAM_OLDAUTHTOK, resp[1].resp); - _pam_drop_reply(resp, 3); - } - } - - /* XXX What happens if root? */ - /* XXX try first pass and use first pass args */ - - return retval; - } - - if (flags & PAM_UPDATE_AUTHTOK) { - - retval = pam_get_item(pamh, PAM_OLDAUTHTOK, (const void **)&newpw); - if (retval != PAM_SUCCESS) { - return PAM_AUTHTOK_ERR; - } - - retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&oldpw); - if (retval != PAM_SUCCESS) { - return PAM_AUTHTOK_ERR; - } - - fprintf(stderr, "oldpw = %s, newpw = %s\n", oldpw, newpw); - - if (retval == PAM_SUCCESS && - winbind_chauthtok_request(user, oldpw, newpw) == 0) { - return PAM_SUCCESS; - } - - return PAM_AUTHTOK_ERR; - } - - return PAM_SERVICE_ERR; -} - -/* HP added session open and close handlers to always return success */ -PAM_EXTERN -int pam_sm_open_session(pam_handle_t *pamh, int flags, - int argc, const char **argv) -{ - /* parse arguments */ - ctrl = _pam_parse(argc, argv); - if (ctrl & PAM_DEBUG_ARG) - _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_open_session handler") ; - return PAM_SUCCESS; -} + char *Announce; + + int retry = 0; + + /* + * First get the name of a user + */ + retval = pam_get_user(pamh, &user, "Username: "); + if (retval == PAM_SUCCESS) { + if (user == NULL) { + _pam_log(LOG_ERR, "username was NULL!"); + return PAM_USER_UNKNOWN; + } + if (retval == PAM_SUCCESS && on(WINBIND_DEBUG_ARG, ctrl)) + _pam_log(LOG_DEBUG, "username [%s] obtained", + user); + } else { + if (on(WINBIND_DEBUG_ARG, ctrl)) + _pam_log(LOG_DEBUG, + "password - could not identify user"); + return retval; + } -PAM_EXTERN -int pam_sm_close_session(pam_handle_t *pamh, int flags, - int argc, const char **argv) -{ - /* parse arguments */ - ctrl = _pam_parse(argc, argv); - if (ctrl & PAM_DEBUG_ARG) - _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_close_session handler"); - return PAM_SUCCESS; + /* + * obtain and verify the current password (OLDAUTHTOK) for + * the user. + */ + + if (flags & PAM_PRELIM_CHECK) { + + /* instruct user what is happening */ +#define greeting "Changing password for " + Announce = (char *) malloc(sizeof(greeting) + strlen(user)); + if (Announce == NULL) { + _pam_log(LOG_CRIT, + "password - out of memory"); + return PAM_BUF_ERR; + } + (void) strcpy(Announce, greeting); + (void) strcpy(Announce + sizeof(greeting) - 1, user); +#undef greeting + + lctrl = ctrl | WINBIND__OLD_PASSWORD; + retval = _winbind_read_password(pamh, lctrl + ,Announce + ,"(current) NT password: " + ,NULL + ,(const char **) &pass_old); + free(Announce); + + if (retval != PAM_SUCCESS) { + _pam_log(LOG_NOTICE + ,"password - (old) token not obtained"); + return retval; + } + /* verify that this is the password for this user */ + + retval = winbind_auth_request(user, pass_old, ctrl); + + if (retval != PAM_ACCT_EXPIRED + && retval != PAM_NEW_AUTHTOK_REQD + && retval != PAM_SUCCESS) { + pass_old = NULL; + return retval; + } + + retval = pam_set_item(pamh, PAM_OLDAUTHTOK, (const void *) pass_old); + pass_old = NULL; + if (retval != PAM_SUCCESS) { + _pam_log(LOG_CRIT, + "failed to set PAM_OLDAUTHTOK"); + } + } else if (flags & PAM_UPDATE_AUTHTOK) { + + /* + * obtain the proposed password + */ + + /* + * get the old token back. + */ + + retval = pam_get_item(pamh, PAM_OLDAUTHTOK + ,(const void **) &pass_old); + + if (retval != PAM_SUCCESS) { + _pam_log(LOG_NOTICE, "user not authenticated"); + return retval; + } + + lctrl = ctrl; + + if (on(WINBIND_USE_AUTHTOK_ARG, lctrl)) { + ctrl = WINBIND_USE_FIRST_PASS_ARG | lctrl; + } + retry = 0; + retval = PAM_AUTHTOK_ERR; + while ((retval != PAM_SUCCESS) && (retry++ < MAX_PASSWD_TRIES)) { + /* + * use_authtok is to force the use of a previously entered + * password -- needed for pluggable password strength checking + */ + + retval = _winbind_read_password(pamh, lctrl + ,NULL + ,"Enter new NT password: " + ,"Retype new NT password: " + ,(const char **) &pass_new); + + if (retval != PAM_SUCCESS) { + if (on(WINBIND_DEBUG_ARG, ctrl)) { + _pam_log(LOG_ALERT + ,"password - new password not obtained"); + } + pass_old = NULL;/* tidy up */ + return retval; + } + + /* + * At this point we know who the user is and what they + * propose as their new password. Verify that the new + * password is acceptable. + */ + + if (pass_new[0] == '\0') {/* "\0" password = NULL */ + pass_new = NULL; + } + } + + /* + * By reaching here we have approved the passwords and must now + * rebuild the password database file. + */ + + retval = winbind_chauthtok_request(user, pass_old, pass_new); + _pam_overwrite(pass_new); + _pam_overwrite(pass_old); + pass_old = pass_new = NULL; + } else { + retval = PAM_SERVICE_ERR; + } + + return retval; } -/* end HP add */ #ifdef PAM_STATIC @@ -494,16 +650,22 @@ struct pam_module _pam_winbind_modstruct = { pam_sm_authenticate, pam_sm_setcred, pam_sm_acct_mgmt, - pam_sm_open_session, - pam_sm_close_session, + NULL, + NULL, pam_sm_chauthtok }; #endif /* - * Copyright (c) Andrew Tridgell 2000 - * Copyright (c) Tim Potter 2000 + * Copyright (c) Andrew Tridgell 2000 + * Copyright (c) Tim Potter 2000 + * Copyright (c) Andrew Bartlettt 2002 + * Copyright (c) Jan Rêkorajski 1999. + * Copyright (c) Andrew G. Morgan 1996-8. + * Copyright (c) Alex O. Yuriev, 1996. + * Copyright (c) Cristian Gafton 1996. + * Copyright (C) Elliot Lee 1996, Red Hat Software. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/source/nsswitch/pam_winbind.h b/source/nsswitch/pam_winbind.h index 058168c72ec..93d9ec9e735 100644 --- a/source/nsswitch/pam_winbind.h +++ b/source/nsswitch/pam_winbind.h @@ -25,9 +25,9 @@ #define PAM_SM_ACCOUNT #define PAM_SM_PASSWORD -#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) +#if defined(SUNOS5) || defined(SUNOS4) -/* Solaris and HPUX always use dynamic pam modules */ +/* Solaris always uses dynamic pam modules */ #define PAM_EXTERN extern #include @@ -73,9 +73,22 @@ do { \ #define x_strdup(s) ( (s) ? strdup(s):NULL ) #endif -#define PAM_DEBUG_ARG (1<<0) -#define PAM_USE_AUTHTOK_ARG (1<<1) -#define PAM_UNKNOWN_OK_ARG (1<<2) +#define WINBIND_DEBUG_ARG (1<<0) +#define WINBIND_USE_AUTHTOK_ARG (1<<1) +#define WINBIND_UNKNOWN_OK_ARG (1<<2) +#define WINBIND_TRY_FIRST_PASS_ARG (1<<3) +#define WINBIND_USE_FIRST_PASS_ARG (1<<4) +#define WINBIND__OLD_PASSWORD (1<<5) + +/* + * here is the string to inform the user that the new passwords they + * typed were not the same. + */ + +#define MISTYPED_PASS "Sorry, passwords do not match" + +#define on(x, y) (x & y) +#define off(x, y) (!(x & y)) #include "winbind_nss_config.h" #include "winbindd_nss.h" diff --git a/source/nsswitch/wb_client.c b/source/nsswitch/wb_client.c index 843b85c0c7b..efeb26fe45f 100644 --- a/source/nsswitch/wb_client.c +++ b/source/nsswitch/wb_client.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. winbind client code @@ -24,31 +23,29 @@ */ #include "includes.h" +#include "nsswitch/nss.h" NSS_STATUS winbindd_request(int req_type, struct winbindd_request *request, struct winbindd_response *response); -/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the - form DOMAIN/user into a domain and a user */ - -static BOOL parse_domain_user(char *domuser, fstring domain, fstring user) +static BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) { char *p = strchr(domuser,*lp_winbind_separator()); if (!p) - return False; - + return False; + fstrcpy(user, p+1); fstrcpy(domain, domuser); domain[PTR_DIFF(p, domuser)] = 0; strupper(domain); - return True; + return True; } /* Call winbindd to convert a name to a sid */ -BOOL winbind_lookup_name(const char *name, DOM_SID *sid, +BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, enum SID_NAME_USE *name_type) { struct winbindd_request request; @@ -58,19 +55,18 @@ BOOL winbind_lookup_name(const char *name, DOM_SID *sid, if (!sid || !name_type) return False; - /* - * Don't do the lookup if the name has no separator. - */ - - if (!strchr(name, *lp_winbind_separator())) - return False; - /* Send off request */ ZERO_STRUCT(request); ZERO_STRUCT(response); - fstrcpy(request.data.name, name); + if (dom_name == NULL) { + if (!parse_domain_user(name, request.data.name.dom_name, request.data.name.name)) + return False; + } else { + fstrcpy(request.data.name.dom_name, dom_name); + fstrcpy(request.data.name.name, name); + } if ((result = winbindd_request(WINBINDD_LOOKUPNAME, &request, &response)) == NSS_STATUS_SUCCESS) { @@ -83,7 +79,8 @@ BOOL winbind_lookup_name(const char *name, DOM_SID *sid, /* Call winbindd to convert sid to name */ -BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name, +BOOL winbind_lookup_sid(DOM_SID *sid, + fstring dom_name, fstring name, enum SID_NAME_USE *name_type) { struct winbindd_request request; @@ -106,7 +103,8 @@ BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name, /* Copy out result */ if (result == NSS_STATUS_SUCCESS) { - parse_domain_user(response.data.name.name, dom_name, name); + fstrcpy(dom_name, response.data.name.dom_name); + fstrcpy(name, response.data.name.name); *name_type = (enum SID_NAME_USE)response.data.name.type; DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n", @@ -249,7 +247,7 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid) } /* Fetch the list of groups a user is a member of from winbindd. This is - used by winbind_initgroups and winbind_getgroups. */ + used by winbind_getgroups. */ static int wb_getgroups(const char *user, gid_t **groups) { @@ -362,10 +360,11 @@ int winbind_getgroups(const char *user, int size, gid_t *list) int result, i; /* - * Don't do the lookup if the name has no separator. + * Don't do the lookup if the name has no separator _and_ we are not in + * 'winbind use default domain' mode. */ - if (!strchr(user, *lp_winbind_separator())) + if (!(strchr(user, *lp_winbind_separator()) || lp_winbind_use_default_domain())) return -1; /* Fetch list of groups */ @@ -445,7 +444,7 @@ BOOL winbind_nametouid(uid_t *puid, const char *name) DOM_SID sid; enum SID_NAME_USE name_type; - if (!winbind_lookup_name(name, &sid, &name_type)) + if (!winbind_lookup_name(NULL, name, &sid, &name_type)) return False; if (name_type != SID_NAME_USER) @@ -461,7 +460,7 @@ BOOL winbind_nametogid(gid_t *pgid, const char *gname) DOM_SID g_sid; enum SID_NAME_USE name_type; - if (!winbind_lookup_name(gname, &g_sid, &name_type)) + if (!winbind_lookup_name(NULL, gname, &g_sid, &name_type)) return False; if (name_type != SID_NAME_DOM_GRP) diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index d3feaeb4504..6a2143f8f0f 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. winbind client common code @@ -58,6 +57,8 @@ void init_request(struct winbindd_request *request, int request_type) static char *domain_env; static BOOL initialised; + request->length = sizeof(struct winbindd_request); + request->cmd = (enum winbindd_cmd)request_type; request->pid = getpid(); request->domain[0] = '\0'; diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c index fceb0e86342..2c55bc0db72 100644 --- a/source/nsswitch/wbinfo.c +++ b/source/nsswitch/wbinfo.c @@ -1,10 +1,10 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind status program. - Copyright (C) Tim Potter 2000 + Copyright (C) Tim Potter 2000 + Copyright (C) Andrew Bartlett 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,80 +31,108 @@ NSS_STATUS winbindd_request(int req_type, struct winbindd_request *request, struct winbindd_response *response); -/* List groups a user is a member of */ - -static BOOL wbinfo_get_usergroups(char *user) +static char winbind_separator(void) { - struct winbindd_request request; struct winbindd_response response; - NSS_STATUS result; - int i; - - ZERO_STRUCT(response); + static BOOL got_sep; + static char sep; - /* Send request */ + if (got_sep) + return sep; - fstrcpy(request.data.username, user); + ZERO_STRUCT(response); - result = winbindd_request(WINBINDD_GETGROUPS, &request, &response); + /* Send off request */ - if (result != NSS_STATUS_SUCCESS) { - return False; + if (winbindd_request(WINBINDD_INFO, NULL, &response) != + NSS_STATUS_SUCCESS) { + printf("could not obtain winbind seperator!\n"); + /* HACK: (this module should not call lp_ funtions) */ + return *lp_winbind_separator(); } - for (i = 0; i < response.data.num_entries; i++) { - printf("%d\n", (int)((gid_t *)response.extra_data)[i]); - } + sep = response.data.info.winbind_separator; + got_sep = True; - return True; + if (!sep) { + printf("winbind separator was NULL!\n"); + /* HACK: (this module should not call lp_ funtions) */ + sep = *lp_winbind_separator(); + } + + return sep; } -/* Convert NetBIOS name to IP */ - -static BOOL wbinfo_wins_byname(char *name) +static char *get_winbind_domain(void) { - struct winbindd_request request; struct winbindd_response response; + static fstring winbind_domain; - ZERO_STRUCT(request); ZERO_STRUCT(response); - /* Send request */ + /* Send off request */ - fstrcpy(request.data.name, name); - if (winbindd_request(WINBINDD_WINS_BYNAME, &request, &response) != + if (winbindd_request(WINBINDD_DOMAIN_NAME, NULL, &response) != NSS_STATUS_SUCCESS) { - return False; + printf("could not obtain winbind domain name!\n"); + + /* HACK: (this module should not call lp_ funtions) */ + return lp_workgroup(); } - /* Display response */ + fstrcpy(winbind_domain, response.data.domain_name); + + return winbind_domain; + +} + +/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the + form DOMAIN/user into a domain and a user */ - printf("%s\n", response.data.name.name); +static BOOL parse_wbinfo_domain_user(const char *domuser, fstring domain, + fstring user) +{ + + char *p = strchr(domuser,winbind_separator()); + + if (!p) { + fstrcpy(user, domuser); + fstrcpy(domain, get_winbind_domain()); + return True; + } + + fstrcpy(user, p+1); + fstrcpy(domain, domuser); + domain[PTR_DIFF(p, domuser)] = 0; + strupper(domain); return True; } -/* Convert IP to NetBIOS name */ +/* List groups a user is a member of */ -static BOOL wbinfo_wins_byip(char *ip) +static BOOL wbinfo_get_usergroups(char *user) { struct winbindd_request request; struct winbindd_response response; - - ZERO_STRUCT(request); + NSS_STATUS result; + int i; + ZERO_STRUCT(response); /* Send request */ - fstrcpy(request.data.name, ip); - if (winbindd_request(WINBINDD_WINS_BYIP, &request, &response) != - NSS_STATUS_SUCCESS) { + fstrcpy(request.data.username, user); + + result = winbindd_request(WINBINDD_GETGROUPS, &request, &response); + + if (result != NSS_STATUS_SUCCESS) return False; - } - /* Display response */ + for (i = 0; i < response.data.num_entries; i++) + printf("%d\n", (int)((gid_t *)response.extra_data)[i]); - printf("%s\n", response.data.name.name); + SAFE_FREE(response.extra_data); return True; } @@ -121,17 +149,43 @@ static BOOL wbinfo_list_domains(void) /* Send request */ if (winbindd_request(WINBINDD_LIST_TRUSTDOM, NULL, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ if (response.extra_data) { - while(next_token((char **)&response.extra_data, name, ",", - sizeof(fstring))) { + char *extra_data = (char *)response.extra_data; + + while(next_token(&extra_data, name, ",", sizeof(fstring))) printf("%s\n", name); - } + + SAFE_FREE(response.extra_data); + } + + return True; +} + + +/* show sequence numbers */ +static BOOL wbinfo_show_sequence(void) +{ + struct winbindd_response response; + + ZERO_STRUCT(response); + + /* Send request */ + + if (winbindd_request(WINBINDD_SHOW_SEQUENCE, NULL, &response) != + NSS_STATUS_SUCCESS) + return False; + + /* Display response */ + + if (response.extra_data) { + char *extra_data = (char *)response.extra_data; + printf("%s", extra_data); + SAFE_FREE(response.extra_data); } return True; @@ -151,12 +205,11 @@ static BOOL wbinfo_check_secret(void) if (result) { - if (response.data.num_entries == 0) { + if (response.data.num_entries == 0) printf("Secret is good\n"); - } else { + else printf("Secret is bad\n0x%08x\n", response.data.num_entries); - } return True; } @@ -177,10 +230,10 @@ static BOOL wbinfo_uid_to_sid(uid_t uid) /* Send request */ request.data.uid = uid; + if (winbindd_request(WINBINDD_UID_TO_SID, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ @@ -202,10 +255,10 @@ static BOOL wbinfo_gid_to_sid(gid_t gid) /* Send request */ request.data.gid = gid; + if (winbindd_request(WINBINDD_GID_TO_SID, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ @@ -227,10 +280,10 @@ static BOOL wbinfo_sid_to_uid(char *sid) /* Send request */ fstrcpy(request.data.sid, sid); + if (winbindd_request(WINBINDD_SID_TO_UID, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ @@ -250,10 +303,10 @@ static BOOL wbinfo_sid_to_gid(char *sid) /* Send request */ fstrcpy(request.data.sid, sid); + if (winbindd_request(WINBINDD_SID_TO_GID, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ @@ -275,14 +328,16 @@ static BOOL wbinfo_lookupsid(char *sid) /* Send off request */ fstrcpy(request.data.sid, sid); + if (winbindd_request(WINBINDD_LOOKUPSID, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ - printf("%s %d\n", response.data.name.name, response.data.name.type); + printf("%s%c%s %d\n", response.data.name.dom_name, + winbind_separator(), response.data.name.name, + response.data.name.type); return True; } @@ -294,23 +349,17 @@ static BOOL wbinfo_lookupname(char *name) struct winbindd_request request; struct winbindd_response response; - /* - * Don't do the lookup if the name has no separator. - */ - - if (!strchr(name, *lp_winbind_separator())) - return False; - /* Send off request */ ZERO_STRUCT(request); ZERO_STRUCT(response); - fstrcpy(request.data.name, name); + parse_wbinfo_domain_user(name, request.data.name.dom_name, + request.data.name.name); + if (winbindd_request(WINBINDD_LOOKUPNAME, &request, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Display response */ @@ -328,13 +377,6 @@ static BOOL wbinfo_auth(char *username) NSS_STATUS result; char *p; - /* - * Don't do the lookup if the name has no separator. - */ - - if (!strchr(username, *lp_winbind_separator())) - return False; - /* Send off request */ ZERO_STRUCT(request); @@ -357,6 +399,10 @@ static BOOL wbinfo_auth(char *username) printf("plaintext password authentication %s\n", (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); + printf("error code was %s (0x%x)\n", + response.data.auth.nt_status_string, + response.data.auth.nt_status); + return result == NSS_STATUS_SUCCESS; } @@ -367,16 +413,11 @@ static BOOL wbinfo_auth_crap(char *username) struct winbindd_request request; struct winbindd_response response; NSS_STATUS result; + fstring name_user; + fstring name_domain; fstring pass; char *p; - /* - * Don't do the lookup if the name has no separator. - */ - - if (!strchr(username, *lp_winbind_separator())) - return False; - /* Send off request */ ZERO_STRUCT(request); @@ -386,11 +427,14 @@ static BOOL wbinfo_auth_crap(char *username) if (p) { *p = 0; - fstrcpy(request.data.auth_crap.user, username); fstrcpy(pass, p + 1); - *p = '%'; - } else - fstrcpy(request.data.auth_crap.user, username); + } + + parse_wbinfo_domain_user(username, name_domain, name_user); + + fstrcpy(request.data.auth_crap.user, name_user); + + fstrcpy(request.data.auth_crap.domain, name_domain); generate_random_buffer(request.data.auth_crap.chal, 8, False); @@ -409,6 +453,10 @@ static BOOL wbinfo_auth_crap(char *username) printf("challenge/response password authentication %s\n", (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); + printf("error code was %s (0x%x)\n", + response.data.auth.nt_status_string, + response.data.auth.nt_status); + return result == NSS_STATUS_SUCCESS; } @@ -417,6 +465,7 @@ static BOOL wbinfo_auth_crap(char *username) static BOOL print_domain_users(void) { struct winbindd_response response; + char *extra_data; fstring name; /* Send request to winbind daemon */ @@ -424,21 +473,21 @@ static BOOL print_domain_users(void) ZERO_STRUCT(response); if (winbindd_request(WINBINDD_LIST_USERS, NULL, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Look through extra data */ - if (!response.extra_data) { + if (!response.extra_data) return False; - } - while(next_token((char **)&response.extra_data, name, ",", - sizeof(fstring))) { + extra_data = (char *)response.extra_data; + + while(next_token(&extra_data, name, ",", sizeof(fstring))) printf("%s\n", name); - } + SAFE_FREE(response.extra_data); + return True; } @@ -447,25 +496,26 @@ static BOOL print_domain_users(void) static BOOL print_domain_groups(void) { struct winbindd_response response; + char *extra_data; fstring name; ZERO_STRUCT(response); if (winbindd_request(WINBINDD_LIST_GROUPS, NULL, &response) != - NSS_STATUS_SUCCESS) { + NSS_STATUS_SUCCESS) return False; - } /* Look through extra data */ - if (!response.extra_data) { + if (!response.extra_data) return False; - } - while(next_token((char **)&response.extra_data, name, ",", - sizeof(fstring))) { + extra_data = (char *)response.extra_data; + + while(next_token(&extra_data, name, ",", sizeof(fstring))) printf("%s\n", name); - } + + SAFE_FREE(response.extra_data); return True; } @@ -475,10 +525,13 @@ static BOOL print_domain_groups(void) static BOOL wbinfo_set_auth_user(char *username) { char *password; + fstring user, domain; /* Separate into user and password */ - password = strchr(username, '%'); + parse_wbinfo_domain_user(username, domain, user); + + password = strchr(user, '%'); if (password) { *password = 0; @@ -488,9 +541,12 @@ static BOOL wbinfo_set_auth_user(char *username) /* Store in secrets.tdb */ - if (!secrets_init() || - !secrets_store(SECRETS_AUTH_USER, username, strlen(username) + 1) || - !secrets_store(SECRETS_AUTH_PASSWORD, password, strlen(password) + 1)) { + if (!secrets_store(SECRETS_AUTH_USER, username, + strlen(username) + 1) || + !secrets_store(SECRETS_AUTH_DOMAIN, domain, + strlen(domain) + 1) || + !secrets_store(SECRETS_AUTH_PASSWORD, password, + strlen(password) + 1)) { fprintf(stderr, "error storing authenticated user info\n"); return False; } @@ -498,16 +554,28 @@ static BOOL wbinfo_set_auth_user(char *username) return True; } +static BOOL wbinfo_ping(void) +{ + NSS_STATUS result; + + result = winbindd_request(WINBINDD_PING, NULL, NULL); + + /* Display response */ + + printf("'ping' to winbindd %s\n", + (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); + + return result == NSS_STATUS_SUCCESS; +} + /* Print program usage */ static void usage(void) { printf("Usage: wbinfo -ug | -n name | -sSY sid | -UG uid/gid | -tm " - "| -aA user%%password\n"); + "| -a user%%password\n"); printf("\t-u\t\t\tlists all domain users\n"); printf("\t-g\t\t\tlists all domain groups\n"); - printf("\t-h name\t\t\tconverts NetBIOS hostname to IP\n"); - printf("\t-i ip\t\t\tconverts IP address to NetBIOS name\n"); printf("\t-n name\t\t\tconverts name to sid\n"); printf("\t-s sid\t\t\tconverts sid to name\n"); printf("\t-U uid\t\t\tconverts uid to sid\n"); @@ -518,16 +586,51 @@ static void usage(void) printf("\t-m\t\t\tlist trusted domains\n"); printf("\t-r user\t\t\tget user groups\n"); printf("\t-a user%%password\tauthenticate user\n"); - printf("\t-A user%%password\tstore session setup auth password\n"); + printf("\t-p 'ping' winbindd to see if it is alive\n"); + printf("\t--sequence\t\tshow sequence numbers of all domains\n"); } /* Main program */ +enum { + OPT_SET_AUTH_USER = 1000, + OPT_SEQUENCE, +}; + int main(int argc, char **argv) { extern pstring global_myname; int opt; + poptContext pc; + static char *string_arg; + static int int_arg; + BOOL got_command = False; + + struct poptOption long_options[] = { + + /* longName, shortName, argInfo, argPtr, value, descrip, + argDesc */ + + { "help", 'h', POPT_ARG_NONE, 0, 'h' }, + { "domain-users", 'u', POPT_ARG_NONE, 0, 'u' }, + { "domain-groups", 'g', POPT_ARG_NONE, 0, 'g' }, + { "name-to-sid", 'n', POPT_ARG_STRING, &string_arg, 'n' }, + { "sid-to-name", 's', POPT_ARG_STRING, &string_arg, 's' }, + { "uid-to-sid", 'U', POPT_ARG_INT, &int_arg, 'U' }, + { "gid-to-sid", 'G', POPT_ARG_INT, &int_arg, 'G' }, + { "sid-to-uid", 'S', POPT_ARG_STRING, &string_arg, 'S' }, + { "sid-to-gid", 'Y', POPT_ARG_STRING, &string_arg, 'Y' }, + { "check-secret", 't', POPT_ARG_NONE, 0, 't' }, + { "trusted-domains", 'm', POPT_ARG_NONE, 0, 'm' }, + { "sequence", 0, POPT_ARG_NONE, 0, OPT_SEQUENCE }, + { "user-groups", 'r', POPT_ARG_STRING, &string_arg, 'r' }, + { "authenticate", 'a', POPT_ARG_STRING, &string_arg, 'a' }, + { "set-auth-user", 0, POPT_ARG_STRING, &string_arg, OPT_SET_AUTH_USER }, + { "ping", 'p', POPT_ARG_NONE, 0, 'p' }, + { 0, 0, 0, 0 } + }; + /* Samba client initialisation */ if (!*global_myname) { @@ -535,9 +638,8 @@ int main(int argc, char **argv) fstrcpy(global_myname, myhostname()); p = strchr(global_myname, '.'); - if (p) { + if (p) *p = 0; - } } TimeInit(); @@ -550,7 +652,7 @@ int main(int argc, char **argv) CONFIGFILE, strerror(errno)); exit(1); } - + load_interfaces(); /* Parse command line options */ @@ -560,8 +662,26 @@ int main(int argc, char **argv) return 1; } - while ((opt = getopt(argc, argv, "h:i:ugs:n:U:G:S:Y:tmr:a:A:")) != EOF) { + /* Parse options */ + + pc = poptGetContext("wbinfo", argc, (const char **)argv, long_options, 0); + + while((opt = poptGetNextOpt(pc)) != -1) { + if (got_command) { + fprintf(stderr, "No more than one command may be specified at once.\n"); + exit(1); + } + got_command = True; + } + + pc = poptGetContext(NULL, argc, (const char **)argv, long_options, + POPT_CONTEXT_KEEP_FIRST); + + while((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { + case 'h': + usage(); + exit(0); case 'u': if (!print_domain_users()) { printf("Error looking up domain users\n"); @@ -574,55 +694,42 @@ int main(int argc, char **argv) return 1; } break; - case 'h': - if (!wbinfo_wins_byname(optarg)) { - printf("Could not lookup WINS by hostname %s\n", optarg); - return 1; - } - break; - case 'i': - if (!wbinfo_wins_byip(optarg)) { - printf("Could not lookup WINS by IP %s\n", optarg); - return 1; - } - break; case 's': - if (!wbinfo_lookupsid(optarg)) { - printf("Could not lookup sid %s\n", optarg); + if (!wbinfo_lookupsid(string_arg)) { + printf("Could not lookup sid %s\n", string_arg); return 1; } break; case 'n': - if (!wbinfo_lookupname(optarg)) { - printf("Could not lookup name %s\n", optarg); + if (!wbinfo_lookupname(string_arg)) { + printf("Could not lookup name %s\n", string_arg); return 1; } break; case 'U': - if (!wbinfo_uid_to_sid(atoi(optarg))) { - printf("Could not convert uid %s to sid\n", - optarg); + if (!wbinfo_uid_to_sid(int_arg)) { + printf("Could not convert uid %d to sid\n", int_arg); return 1; } break; case 'G': - if (!wbinfo_gid_to_sid(atoi(optarg))) { - printf("Could not convert gid %s to sid\n", - optarg); + if (!wbinfo_gid_to_sid(int_arg)) { + printf("Could not convert gid %d to sid\n", + int_arg); return 1; } break; case 'S': - if (!wbinfo_sid_to_uid(optarg)) { + if (!wbinfo_sid_to_uid(string_arg)) { printf("Could not convert sid %s to uid\n", - optarg); + string_arg); return 1; } break; case 'Y': - if (!wbinfo_sid_to_gid(optarg)) { + if (!wbinfo_sid_to_gid(string_arg)) { printf("Could not convert sid %s to gid\n", - optarg); + string_arg); return 1; } break; @@ -638,47 +745,58 @@ int main(int argc, char **argv) return 1; } break; + case OPT_SEQUENCE: + if (!wbinfo_show_sequence()) { + printf("Could not show sequence numbers\n"); + return 1; + } + break; case 'r': - if (!wbinfo_get_usergroups(optarg)) { + if (!wbinfo_get_usergroups(string_arg)) { printf("Could not get groups for user %s\n", - optarg); + string_arg); return 1; } break; case 'a': { BOOL got_error = False; - if (!wbinfo_auth(optarg)) { + if (!wbinfo_auth(string_arg)) { printf("Could not authenticate user %s with " - "plaintext password\n", optarg); + "plaintext password\n", string_arg); got_error = True; } - if (!wbinfo_auth_crap(optarg)) { + if (!wbinfo_auth_crap(string_arg)) { printf("Could not authenticate user %s with " - "challenge/response\n", optarg); + "challenge/response\n", string_arg); got_error = True; } - + if (got_error) return 1; break; - - } - case 'A': { - if (!(wbinfo_set_auth_user(optarg))) { + } + case 'p': { + + if (!wbinfo_ping()) { + printf("could not ping winbindd!\n"); + return 1; + } + break; + } + case OPT_SET_AUTH_USER: + if (!(wbinfo_set_auth_user(string_arg))) { return 1; } break; - } - /* Invalid option */ - default: + fprintf(stderr, "Invalid option\n"); usage(); return 1; } } - + /* Clean exit */ return 0; diff --git a/source/nsswitch/winbind_nss.c b/source/nsswitch/winbind_nss.c index cbfea3b1027..8d33cd9b2f1 100644 --- a/source/nsswitch/winbind_nss.c +++ b/source/nsswitch/winbind_nss.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Windows NT Domain nsswitch module @@ -108,7 +107,7 @@ winbind_xid_lookup(int xid, struct winbindd_request **requestp) *last = dx->next; result = dx->rq; *requestp = dx->request; - SAFE_FREE(dx); + free(dx); } nsd_logprintf(NSD_LOG_LOW, "entering winbind_xid_lookup xid = %d rq = 0x%x, request = 0x%x\n", @@ -206,12 +205,8 @@ winbind_callback(nsd_file_t **rqp, int fd) return NSD_NEXT; } switch ((int)rq->f_cmd_data) { - case WINBINDD_WINS_BYNAME: - case WINBINDD_WINS_BYIP: - snprintf(result,1023,"%s\n",response.data.name.name); - break; - case WINBINDD_GETPWNAM_FROM_UID: - case WINBINDD_GETPWNAM_FROM_USER: + case WINBINDD_GETPWUID: + case WINBINDD_GETPWNAM: snprintf(result,1023,"%s:%s:%d:%d:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, @@ -221,8 +216,8 @@ winbind_callback(nsd_file_t **rqp, int fd) pw->pw_dir, pw->pw_shell); break; - case WINBINDD_GETGRNAM_FROM_GROUP: - case WINBINDD_GETGRNAM_FROM_GID: + case WINBINDD_GETGRNAM: + case WINBINDD_GETGRGID: if (gr->num_gr_mem && response.extra_data) members = response.extra_data; else @@ -343,7 +338,7 @@ send_next_request(nsd_file_t *rq, struct winbindd_request *request) nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) %d to = %d\n", rq->f_cmd_data, timeout); status = winbindd_send_request((int)rq->f_cmd_data,request); - SAFE_FREE(request); + free(request); if (status != NSS_STATUS_SUCCESS) { nsd_logprintf(NSD_LOG_MIN, @@ -398,32 +393,26 @@ int lookup(nsd_file_t *rq) if (strcasecmp(map,"passwd.byuid") == 0) { request->data.uid = atoi(key); - rq->f_cmd_data = (void *)WINBINDD_GETPWNAM_FROM_UID; + rq->f_cmd_data = (void *)WINBINDD_GETPWUID; } else if (strcasecmp(map,"passwd.byname") == 0) { strncpy(request->data.username, key, sizeof(request->data.username) - 1); request->data.username[sizeof(request->data.username) - 1] = '\0'; - rq->f_cmd_data = (void *)WINBINDD_GETPWNAM_FROM_USER; + rq->f_cmd_data = (void *)WINBINDD_GETPWNAM; } else if (strcasecmp(map,"group.byname") == 0) { strncpy(request->data.groupname, key, sizeof(request->data.groupname) - 1); request->data.groupname[sizeof(request->data.groupname) - 1] = '\0'; - rq->f_cmd_data = (void *)WINBINDD_GETGRNAM_FROM_GROUP; + rq->f_cmd_data = (void *)WINBINDD_GETGRNAM; } else if (strcasecmp(map,"group.bygid") == 0) { request->data.gid = atoi(key); - rq->f_cmd_data = (void *)WINBINDD_GETGRNAM_FROM_GID; - } else if (strcasecmp(map,"hosts.byname") == 0) { - strncpy(request->data.name, key, sizeof(request->data.name) - 1); - rq->f_cmd_data = (void *)WINBINDD_WINS_BYNAME; - } else if (strcasecmp(map,"hosts.byaddr") == 0) { - strncpy(request->data.name, key, sizeof(request->data.name) - 1); - rq->f_cmd_data = (void *)WINBINDD_WINS_BYIP; + rq->f_cmd_data = (void *)WINBINDD_GETGRGID; } else { /* * Don't understand this map - just return not found */ nsd_logprintf(NSD_LOG_MIN, "lookup (winbind) unknown table\n"); - SAFE_FREE(request); + free(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -481,7 +470,7 @@ do_list(int state, nsd_file_t *rq) break; default: nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown state\n"); - SAFE_FREE(request); + free(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -499,7 +488,7 @@ do_list(int state, nsd_file_t *rq) break; default: nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown state\n"); - SAFE_FREE(request); + free(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -508,7 +497,7 @@ do_list(int state, nsd_file_t *rq) * Don't understand this map - just return not found */ nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown table\n"); - SAFE_FREE(request); + free(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -898,8 +887,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, request.data.uid = uid; - ret = winbindd_request(WINBINDD_GETPWNAM_FROM_UID, &request, - &response); + ret = winbindd_request(WINBINDD_GETPWUID, &request, &response); if (ret == NSS_STATUS_SUCCESS) { ret = fill_pwent(result, &response.data.pw, @@ -961,8 +949,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer, request.data.username [sizeof(request.data.username) - 1] = '\0'; - ret = winbindd_request(WINBINDD_GETPWNAM_FROM_USER, &request, - &response); + ret = winbindd_request(WINBINDD_GETPWNAM, &request, &response); if (ret == NSS_STATUS_SUCCESS) { ret = fill_pwent(result, &response.data.pw, &buffer, @@ -1158,8 +1145,7 @@ _nss_winbind_getgrnam_r(const char *name, request.data.groupname [sizeof(request.data.groupname) - 1] = '\0'; - ret = winbindd_request(WINBINDD_GETGRNAM_FROM_GROUP, - &request, &response); + ret = winbindd_request(WINBINDD_GETGRNAM, &request, &response); if (ret == NSS_STATUS_SUCCESS) { ret = fill_grent(result, &response.data.gr, @@ -1221,8 +1207,7 @@ _nss_winbind_getgrgid_r(gid_t gid, request.data.gid = gid; - ret = winbindd_request(WINBINDD_GETGRNAM_FROM_GID, &request, - &response); + ret = winbindd_request(WINBINDD_GETGRGID, &request, &response); if (ret == NSS_STATUS_SUCCESS) { diff --git a/source/nsswitch/winbind_nss_config.h b/source/nsswitch/winbind_nss_config.h index 5612f207774..0de63878be5 100644 --- a/source/nsswitch/winbind_nss_config.h +++ b/source/nsswitch/winbind_nss_config.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -88,7 +87,6 @@ NSS_STATUS _nss_winbind_getgrgid_r(gid_t gid, struct group *result, char *buffer, size_t buflen, int *errnop); -#ifndef _SMB_MACROS_H /* I'm trying really hard not to include anything from smb.h with the result of some silly looking redeclaration of structures. */ @@ -135,7 +133,7 @@ typedef int BOOL; /* zero a structure given a pointer to the structure */ #define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } - + /* Some systems (SCO) treat UNIX domain sockets as FIFOs */ #ifndef S_IFSOCK @@ -146,5 +144,4 @@ typedef int BOOL; #define S_ISSOCK(mode) ((mode & S_IFSOCK) == S_IFSOCK) #endif -#endif /* _SMB_MACROS_H */ #endif diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c index e349acc2131..9c71c75e9d2 100644 --- a/source/nsswitch/winbind_nss_solaris.c +++ b/source/nsswitch/winbind_nss_solaris.c @@ -11,10 +11,11 @@ #include #include #include +#include #include "includes.h" #include "winbind_nss_config.h" -#if defined(HAVE_NSS_COMMON_H) || defined(HPUX) +#ifdef HAVE_NSS_COMMON_H #undef NSS_DEBUG @@ -273,4 +274,6 @@ _nss_winbind_group_constr (const char* db_name, return be; } -#endif /* defined(HAVE_NSS_COMMON_H) || defined(HPUX) */ +#endif /* SUN_NSS */ + + diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index ff2a99e7798..f1020ecb805 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -23,12 +22,13 @@ #include "winbindd.h" -pstring servicesf = CONFIGFILE; - /* List of all connected clients */ struct winbindd_cli_state *client_list; static int num_clients; +BOOL opt_nocache; + +pstring servicesf = CONFIGFILE; /* Reload configuration */ @@ -49,12 +49,14 @@ static BOOL reload_services_file(BOOL test) snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE); lp_set_logfile(logfile); + reopen_logs(); ret = lp_load(servicesf,False,False,True); snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE); lp_set_logfile(logfile); + reopen_logs(); load_interfaces(); @@ -138,7 +140,6 @@ static void print_winbindd_status(void) { winbindd_status(); winbindd_idmap_status(); - winbindd_cache_status(); winbindd_cm_status(); } @@ -146,9 +147,8 @@ static void print_winbindd_status(void) static void flush_caches(void) { - /* Clear cached user and group enumation info */ - - winbindd_flush_cache(); + /* Clear cached user and group enumation info */ + wcache_flush_cache(); } /* Handle the signal by unlinking socket and exiting */ @@ -156,10 +156,9 @@ static void flush_caches(void) static void terminate(void) { pstring path; - - /* Close idmap. */ - winbindd_idmap_close(); + winbindd_idmap_close(); + /* Remove socket file */ snprintf(path, sizeof(path), "%s/%s", WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME); @@ -175,11 +174,11 @@ static void termination_handler(int signum) sys_select_signal(); } -static BOOL do_sigusr1; +static BOOL do_sigusr2; -static void sigusr1_handler(int signum) +static void sigusr2_handler(int signum) { - do_sigusr1 = True; + do_sigusr2 = True; sys_select_signal(); } @@ -195,92 +194,8 @@ static void sighup_handler(int signum) static int create_sock(void) { - struct sockaddr_un sunaddr; - struct stat st; - int sock; - mode_t old_umask; - pstring path; - - /* Create the socket directory or reuse the existing one */ - - if (lstat(WINBINDD_SOCKET_DIR, &st) == -1) { - - if (errno == ENOENT) { - - /* Create directory */ - - if (mkdir(WINBINDD_SOCKET_DIR, 0755) == -1) { - DEBUG(0, ("error creating socket directory " - "%s: %s\n", WINBINDD_SOCKET_DIR, - strerror(errno))); - return -1; - } - - } else { - - DEBUG(0, ("lstat failed on socket directory %s: %s\n", - WINBINDD_SOCKET_DIR, strerror(errno))); - return -1; - } - - } else { - - /* Check ownership and permission on existing directory */ - - if (!S_ISDIR(st.st_mode)) { - DEBUG(0, ("socket directory %s isn't a directory\n", - WINBINDD_SOCKET_DIR)); - return -1; - } - - if ((st.st_uid != sec_initial_uid()) || - ((st.st_mode & 0777) != 0755)) { - DEBUG(0, ("invalid permissions on socket directory " - "%s\n", WINBINDD_SOCKET_DIR)); - return -1; - } - } - - /* Create the socket file */ - - old_umask = umask(0); - - sock = socket(AF_UNIX, SOCK_STREAM, 0); - - if (sock == -1) { - perror("socket"); - return -1; - } - - snprintf(path, sizeof(path), "%s/%s", - WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME); - - unlink(path); - memset(&sunaddr, 0, sizeof(sunaddr)); - sunaddr.sun_family = AF_UNIX; - safe_strcpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path)-1); - - if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { - DEBUG(0, ("bind failed on winbind socket %s: %s\n", - path, - strerror(errno))); - close(sock); - return -1; - } - - if (listen(sock, 5) == -1) { - DEBUG(0, ("listen failed on winbind socket %s: %s\n", - path, - strerror(errno))); - close(sock); - return -1; - } - - umask(old_umask); - - /* Success! */ - - return sock; + return create_pipe_sock( WINBINDD_SOCKET_DIR, + WINBINDD_SOCKET_NAME, 0755); } struct dispatch_table { @@ -293,8 +208,8 @@ static struct dispatch_table dispatch_table[] = { /* User functions */ - { WINBINDD_GETPWNAM_FROM_USER, winbindd_getpwnam_from_user, "GETPWNAM_FROM_USER" }, - { WINBINDD_GETPWNAM_FROM_UID, winbindd_getpwnam_from_uid, "GETPWNAM_FROM_UID" }, + { WINBINDD_GETPWNAM, winbindd_getpwnam, "GETPWNAM" }, + { WINBINDD_GETPWUID, winbindd_getpwuid, "GETPWUID" }, { WINBINDD_SETPWENT, winbindd_setpwent, "SETPWENT" }, { WINBINDD_ENDPWENT, winbindd_endpwent, "ENDPWENT" }, @@ -304,8 +219,8 @@ static struct dispatch_table dispatch_table[] = { /* Group functions */ - { WINBINDD_GETGRNAM_FROM_GROUP, winbindd_getgrnam_from_group, "GETGRNAM_FROM_GROUP" }, - { WINBINDD_GETGRNAM_FROM_GID, winbindd_getgrnam_from_gid, "GETGRNAM_FROM_GID" }, + { WINBINDD_GETGRNAM, winbindd_getgrnam, "GETGRNAM" }, + { WINBINDD_GETGRGID, winbindd_getgrgid, "GETGRGID" }, { WINBINDD_SETGRENT, winbindd_setgrent, "SETGRENT" }, { WINBINDD_ENDGRENT, winbindd_endgrent, "ENDGRENT" }, { WINBINDD_GETGRENT, winbindd_getgrent, "GETGRENT" }, @@ -313,9 +228,7 @@ static struct dispatch_table dispatch_table[] = { /* PAM auth functions */ { WINBINDD_PAM_AUTH, winbindd_pam_auth, "PAM_AUTH" }, -#if ALLOW_WINBIND_AUTH_CRAP { WINBINDD_PAM_AUTH_CRAP, winbindd_pam_auth_crap, "AUTH_CRAP" }, -#endif { WINBINDD_PAM_CHAUTHTOK, winbindd_pam_chauthtok, "CHAUTHTOK" }, /* Enumeration functions */ @@ -323,6 +236,7 @@ static struct dispatch_table dispatch_table[] = { { WINBINDD_LIST_USERS, winbindd_list_users, "LIST_USERS" }, { WINBINDD_LIST_GROUPS, winbindd_list_groups, "LIST_GROUPS" }, { WINBINDD_LIST_TRUSTDOM, winbindd_list_trusted_domains, "LIST_TRUSTDOM" }, + { WINBINDD_SHOW_SEQUENCE, winbindd_show_sequence, "SHOW_SEQUENCE" }, /* SID related functions */ @@ -339,11 +253,10 @@ static struct dispatch_table dispatch_table[] = { /* Miscellaneous */ { WINBINDD_CHECK_MACHACC, winbindd_check_machine_acct, "CHECK_MACHACC" }, - - /* WINS functions */ - - { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" }, - { WINBINDD_WINS_BYIP, winbindd_wins_byip, "WINS_BYIP" }, + { WINBINDD_PING, winbindd_ping, "PING" }, + { WINBINDD_INFO, winbindd_info, "INFO" }, + { WINBINDD_INTERFACE_VERSION, winbindd_interface_version, "INTERFACE_VERSION" }, + { WINBINDD_DOMAIN_NAME, winbindd_domain_name, "DOMAIN_NAME" }, /* End of list */ @@ -475,12 +388,14 @@ static void client_read(struct winbindd_cli_state *state) /* Read data */ do { - n = read(state->sock, state->read_buf_len + (char *)&state->request, - sizeof(state->request) - state->read_buf_len); + + n = read(state->sock, state->read_buf_len + + (char *)&state->request, + sizeof(state->request) - state->read_buf_len); + } while (n == -1 && errno == EINTR); - DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, - sizeof(state->request) - n - state->read_buf_len )); + DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); /* Read failed, kill client */ @@ -677,8 +592,6 @@ static void process_loop(int accept_sock) client_read(state); -#if 0 - /* JRA - currently there's no length field in the request... */ /* * If we have the start of a * packet, then check the @@ -687,19 +600,14 @@ static void process_loop(int accept_sock) * Mock Swedish. */ - if (state->read_buf_len >= sizeof(int) - && *(int *) state->buf != sizeof(state->request)) { - - struct winbindd_cli_state *rem_state = state; - + if (state->read_buf_len >= sizeof(uint32) + && *(uint32 *) &state->request != sizeof(state->request)) { DEBUG(0,("process_loop: Invalid request size (%d) send, should be (%d)\n", - *(int *) rem_state->buf, sizeof(rem_state->request) )); + *(uint32 *) &state->request, sizeof(state->request))); - state = state_next; - remove_client(rem_state); - continue; + remove_client(state); + break; } -#endif /* A request packet might be complete */ @@ -731,9 +639,9 @@ static void process_loop(int accept_sock) do_sighup = False; } - if (do_sigusr1) { + if (do_sigusr2) { print_winbindd_status(); - do_sigusr1 = False; + do_sigusr2 = False; } } } @@ -742,6 +650,17 @@ static void process_loop(int accept_sock) struct winbindd_state server_state; /* Server state information */ + +static void usage(void) +{ + printf("Usage: winbindd [options]\n"); + printf("\t-i interactive mode\n"); + printf("\t-n disable cacheing\n"); + printf("\t-d level set debug level\n"); + printf("\t-s configfile choose smb.conf location\n"); + printf("\t-h show this help message\n"); +} + int main(int argc, char **argv) { extern BOOL AllowDebugChange; @@ -754,9 +673,9 @@ int main(int argc, char **argv) int opt; /* glibc (?) likes to print "User defined signal 1" and exit if a - SIGUSR1 is received before a handler is installed */ + SIGUSR2 is received before a handler is installed */ - CatchSignal(SIGUSR1, SIG_IGN); + CatchSignal(SIGUSR2, SIG_IGN); TimeInit(); @@ -775,35 +694,40 @@ int main(int argc, char **argv) /* Initialise samba/rpc client stuff */ - while ((opt = getopt(argc, argv, "id:s:")) != EOF) { + while ((opt = getopt(argc, argv, "id:s:nh")) != EOF) { switch (opt) { - /* Don't become a daemon */ - + /* Don't become a daemon */ case 'i': interactive = True; break; - /* Run with specified debug level */ + /* disable cacheing */ + case 'n': + opt_nocache = True; + break; + /* Run with specified debug level */ case 'd': DEBUGLEVEL = atoi(optarg); AllowDebugChange = False; break; /* Load a different smb.conf file */ - case 's': pstrcpy(servicesf,optarg); break; + case 'h': + usage(); + exit(0); + default: printf("Unknown option %c\n", (char)opt); exit(1); } } - /* Append to log file by default as we are a single process daemon program. */ @@ -811,6 +735,7 @@ int main(int argc, char **argv) snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE); lp_set_logfile(logfile); + setup_logging("winbindd", interactive); reopen_logs(); @@ -827,6 +752,7 @@ int main(int argc, char **argv) codepage_initialise(lp_client_code_page()); /* Setup names. */ + if (!*global_myname) { char *p; @@ -836,7 +762,7 @@ int main(int argc, char **argv) *p = 0; } - fstrcpy(global_myworkgroup, lp_workgroup()); + fstrcpy(global_myworkgroup, lp_workgroup()); if (!interactive) become_daemon(); @@ -855,10 +781,10 @@ int main(int argc, char **argv) secrets_init(); /* Get list of domains we look up requests for. This includes the - domain which we are a member of as well as any trusted - domains. */ + domain which we are a member of as well as any trusted + domains. */ - get_domain_info(); + init_domain_list(); ZERO_STRUCT(server_state); @@ -870,15 +796,13 @@ int main(int argc, char **argv) if (!winbindd_idmap_init()) return 1; - winbindd_cache_init(); - /* Unblock all signals we are interested in as they may have been blocked by the parent process. */ BlockSignals(False, SIGINT); BlockSignals(False, SIGQUIT); BlockSignals(False, SIGTERM); - BlockSignals(False, SIGUSR1); + BlockSignals(False, SIGUSR2); BlockSignals(False, SIGHUP); /* Setup signal handlers */ @@ -888,8 +812,9 @@ int main(int argc, char **argv) CatchSignal(SIGTERM, termination_handler); CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */ + CatchSignal(SIGUSR1, SIG_IGN); /* Samba messages */ - CatchSignal(SIGUSR1, sigusr1_handler); /* Debugging sigs */ + CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */ CatchSignal(SIGHUP, sighup_handler); /* Create UNIX domain socket */ @@ -903,5 +828,9 @@ int main(int argc, char **argv) process_loop(accept_sock); +#if 0 + uni_group_cache_shutdown(); +#endif + return 0; } diff --git a/source/nsswitch/winbindd.h b/source/nsswitch/winbindd.h index 5d1b43527bd..5b63d236ba1 100644 --- a/source/nsswitch/winbindd.h +++ b/source/nsswitch/winbindd.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -51,11 +50,8 @@ struct getent_state { struct getent_state *prev, *next; void *sam_entries; uint32 sam_entry_index, num_sam_entries; - uint32 dispinfo_ndx; - uint32 grp_query_start_ndx; - BOOL got_all_sam_entries, got_sam_entries; - struct winbindd_domain *domain; - POLICY_HND dom_pol; /* Cached SAMR domain handle. */ + BOOL got_sam_entries; + fstring domain_name; }; /* Storage for cached getpwent() user entries */ @@ -78,15 +74,105 @@ struct winbindd_state { extern struct winbindd_state server_state; /* Server information */ +typedef struct { + char *acct_name; + char *full_name; + uint32 user_rid; + uint32 group_rid; /* primary group */ +} WINBIND_USERINFO; + /* Structures to hold per domain information */ struct winbindd_domain { fstring name; /* Domain name */ + fstring full_name; /* full Domain name (realm) */ DOM_SID sid; /* SID for this domain */ - struct winbindd_domain *prev, *next; /* Linked list info */ + + /* Lookup methods for this domain (LDAP or RPC) */ + + struct winbindd_methods *methods; + + /* Private data for the backends (used for connection cache) */ + + void *private; + + /* Sequence number stuff */ + + time_t last_seq_check; + uint32 sequence_number; + + /* Linked list info */ + + struct winbindd_domain *prev, *next; }; -extern struct winbindd_domain *domain_list; /* List of domains we know */ +/* per-domain methods. This is how LDAP vs RPC is selected + */ +struct winbindd_methods { + /* does this backend provide a consistent view of the data? (ie. is the primary group + always correct) */ + BOOL consistent; + + /* get a list of users, returning a WINBIND_USERINFO for each one */ + NTSTATUS (*query_user_list)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + WINBIND_USERINFO **info); + + /* get a list of groups */ + NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + struct acct_info **info); + + /* convert one user or group name to a sid */ + NTSTATUS (*name_to_sid)(struct winbindd_domain *domain, + const char *name, + DOM_SID *sid, + enum SID_NAME_USE *type); + + /* convert a sid to a user or group name */ + NTSTATUS (*sid_to_name)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + DOM_SID *sid, + char **name, + enum SID_NAME_USE *type); + + /* lookup user info for a given rid */ + NTSTATUS (*query_user)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 user_rid, + WINBIND_USERINFO *user_info); + + /* lookup all groups that a user is a member of. The backend + can also choose to lookup by username or rid for this + function */ + NTSTATUS (*lookup_usergroups)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 user_rid, + uint32 *num_groups, uint32 **user_gids); + + /* find all members of the group with the specified group_rid */ + NTSTATUS (*lookup_groupmem)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 group_rid, uint32 *num_names, + uint32 **rid_mem, char ***names, + uint32 **name_types); + + /* return the current global sequence number */ + NTSTATUS (*sequence_number)(struct winbindd_domain *domain, uint32 *seq); + + /* enumerate trusted domains */ + NTSTATUS (*trusted_domains)(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_domains, + char ***names, + DOM_SID **dom_sids); + + /* find the domain sid */ + NTSTATUS (*domain_sid)(struct winbindd_domain *domain, + DOM_SID *sid); +}; /* Used to glue a policy handle and cli_state together */ @@ -120,6 +206,7 @@ typedef struct { /* Authenticated user info is stored in secrets.tdb under these keys */ #define SECRETS_AUTH_USER "SECRETS/AUTH_USER" +#define SECRETS_AUTH_DOMAIN "SECRETS/AUTH_DOMAIN" #define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD" #endif /* _WINBINDD_H */ diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 24688bc5453..87957c05efc 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -1,10 +1,9 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. - Winbind daemon - caching related functions + Winbind cache backend functions - Copyright (C) Tim Potter 2000 + Copyright (C) Andrew Tridgell 2001 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,659 +22,828 @@ #include "winbindd.h" -#define CACHE_TYPE_USER "USR" -#define CACHE_TYPE_GROUP "GRP" -#define CACHE_TYPE_NAME "NAM" /* Stores mapping from SID to name. */ -#define CACHE_TYPE_SID "SID" /* Stores mapping from name to SID. */ - -/* Initialise caching system */ - -static TDB_CONTEXT *cache_tdb; - -struct cache_rec { - uint32 seq_num; - time_t mod_time; +struct winbind_cache { + struct winbindd_methods *backend; + TDB_CONTEXT *tdb; }; -void winbindd_cache_init(void) -{ - /* Open tdb cache */ +struct cache_entry { + NTSTATUS status; + uint32 sequence_number; + uint8 *data; + uint32 len, ofs; +}; - if (!(cache_tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, - TDB_NOMMAP, O_RDWR | O_CREAT | O_TRUNC, - 0600))) - DEBUG(0, ("Unable to open tdb cache - user and group caching disabled\n")); -} +static struct winbind_cache *wcache; -/* find the sequence number for a domain */ - -static uint32 domain_sequence_number(struct winbindd_domain *domain) +/* flush the cache */ +void wcache_flush_cache(void) { - TALLOC_CTX *mem_ctx; - CLI_POLICY_HND *hnd; - SAM_UNK_CTR ctr; - uint16 switch_value = 2; - NTSTATUS result; - uint32 seqnum = DOM_SEQUENCE_NONE; - POLICY_HND dom_pol; - BOOL got_dom_pol = False; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - - if (!(mem_ctx = talloc_init())) - return DOM_SEQUENCE_NONE; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - goto done; - - /* Get domain handle */ - - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, &dom_pol); + extern BOOL opt_nocache; - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_dom_pol = True; - - /* Query domain info */ - - result = cli_samr_query_dom_info(hnd->cli, mem_ctx, &dom_pol, - switch_value, &ctr); - - if (NT_STATUS_IS_OK(result)) { - seqnum = ctr.info.inf2.seq_num; - DEBUG(10,("domain_sequence_number: for domain %s is %u\n", domain->name, (unsigned)seqnum )); - } else { - DEBUG(10,("domain_sequence_number: failed to get sequence number (%u) for domain %s\n", - (unsigned)seqnum, domain->name )); + if (!wcache) return; + if (wcache->tdb) { + tdb_close(wcache->tdb); + wcache->tdb = NULL; } + if (opt_nocache) return; - done: + wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, + TDB_DEFAULT, O_RDWR | O_CREAT | O_TRUNC, 0600); - if (got_dom_pol) - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - - talloc_destroy(mem_ctx); - - return seqnum; + if (!wcache->tdb) { + DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); + } } -/* get the domain sequence number, possibly re-fetching */ - -static uint32 cached_sequence_number(struct winbindd_domain *domain) +/* get the winbind_cache structure */ +static struct winbind_cache *get_cache(struct winbindd_domain *domain) { - fstring keystr; - TDB_DATA dbuf; - struct cache_rec rec; - time_t t = time(NULL); - - snprintf(keystr, sizeof(keystr), "CACHESEQ/%s", domain->name); - dbuf = tdb_fetch_by_string(cache_tdb, keystr); - - if (!dbuf.dptr || dbuf.dsize != sizeof(rec)) - goto refetch; + extern struct winbindd_methods msrpc_methods; + struct winbind_cache *ret = wcache; - memcpy(&rec, dbuf.dptr, sizeof(rec)); - SAFE_FREE(dbuf.dptr); - - if (t < (rec.mod_time + lp_winbind_cache_time())) { - DEBUG(3,("cached sequence number for %s is %u\n", - domain->name, (unsigned)rec.seq_num)); - return rec.seq_num; + if (ret) return ret; + + ret = smb_xmalloc(sizeof(*ret)); + ZERO_STRUCTP(ret); + switch (lp_security()) { +#ifdef HAVE_ADS + case SEC_ADS: { + extern struct winbindd_methods ads_methods; + ret->backend = &ads_methods; + break; + } +#endif + default: + ret->backend = &msrpc_methods; } - refetch: - rec.seq_num = domain_sequence_number(domain); - rec.mod_time = t; - - tdb_store_by_string(cache_tdb, keystr, &rec, sizeof(rec)); + wcache = ret; + wcache_flush_cache(); - return rec.seq_num; + return ret; } -/* Check whether a seq_num for a cached item has expired */ -static BOOL cache_domain_expired(struct winbindd_domain *domain, - uint32 seq_num) +/* + free a centry structure +*/ +static void centry_free(struct cache_entry *centry) { - uint32 cache_seq = cached_sequence_number(domain); - if (cache_seq != seq_num) { - DEBUG(3,("seq %u for %s has expired (not == %u)\n", (unsigned)seq_num, - domain->name, (unsigned)cache_seq )); - return True; - } - - return False; + if (!centry) return; + SAFE_FREE(centry->data); + free(centry); } -static void set_cache_sequence_number(struct winbindd_domain *domain, - char *cache_type, char *subkey) -{ - fstring keystr; - - snprintf(keystr, sizeof(keystr),"CACHESEQ %s/%s/%s", - domain->name, cache_type, subkey?subkey:""); - tdb_store_int(cache_tdb, keystr, cached_sequence_number(domain)); +/* + pull a uint32 from a cache entry +*/ +static uint32 centry_uint32(struct cache_entry *centry) +{ + uint32 ret; + if (centry->len - centry->ofs < 4) { + DEBUG(0,("centry corruption? needed 4 bytes, have %d\n", + centry->len - centry->ofs)); + smb_panic("centry_uint32"); + } + ret = IVAL(centry->data, centry->ofs); + centry->ofs += 4; + return ret; } -static uint32 get_cache_sequence_number(struct winbindd_domain *domain, - char *cache_type, char *subkey) +/* + pull a uint8 from a cache entry +*/ +static uint8 centry_uint8(struct cache_entry *centry) { - fstring keystr; - uint32 seq_num; - - snprintf(keystr, sizeof(keystr), "CACHESEQ %s/%s/%s", - domain->name, cache_type, subkey ? subkey : ""); - - seq_num = (uint32)tdb_fetch_int(cache_tdb, keystr); - - DEBUG(3,("%s is %u\n", keystr, (unsigned)seq_num)); - - return seq_num; + uint8 ret; + if (centry->len - centry->ofs < 1) { + DEBUG(0,("centry corruption? needed 1 bytes, have %d\n", + centry->len - centry->ofs)); + smb_panic("centry_uint32"); + } + ret = CVAL(centry->data, centry->ofs); + centry->ofs += 1; + return ret; } -/* Fill the user or group cache with supplied data */ - -static void store_cache(struct winbindd_domain *domain, char *cache_type, - void *sam_entries, int buflen) +/* pull a string from a cache entry, using the supplied + talloc context +*/ +static char *centry_string(struct cache_entry *centry, TALLOC_CTX *mem_ctx) { - fstring keystr; - - if (lp_winbind_cache_time() == 0) - return; + uint32 len; + char *ret; - /* Error check */ + len = centry_uint8(centry); - if (!sam_entries || buflen == 0) - return; - - /* Store data as a mega-huge chunk in the tdb */ - - snprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type, - domain->name); - - tdb_store_by_string(cache_tdb, keystr, sam_entries, buflen); + if (len == 0xFF) { + /* a deliberate NULL string */ + return NULL; + } - /* Stamp cache with current seq number */ + if (centry->len - centry->ofs < len) { + DEBUG(0,("centry corruption? needed %d bytes, have %d\n", + len, centry->len - centry->ofs)); + smb_panic("centry_string"); + } - set_cache_sequence_number(domain, cache_type, NULL); + ret = talloc(mem_ctx, len+1); + if (!ret) { + smb_panic("centry_string out of memory\n"); + } + memcpy(ret,centry->data + centry->ofs, len); + ret[len] = 0; + centry->ofs += len; + return ret; } -/* Fill the user cache with supplied data */ - -void winbindd_store_user_cache(struct winbindd_domain *domain, - struct getpwent_user *sam_entries, - int num_sam_entries) +/* the server is considered down if it can't give us a sequence number */ +static BOOL wcache_server_down(struct winbindd_domain *domain) { - DEBUG(3, ("storing user cache %s/%d entries\n", domain->name, - num_sam_entries)); - - store_cache(domain, CACHE_TYPE_USER, sam_entries, - num_sam_entries * sizeof(struct getpwent_user)); + if (!wcache->tdb) return False; + return (domain->sequence_number == DOM_SEQUENCE_NONE); } -/* Fill the group cache with supplied data */ -void winbindd_store_group_cache(struct winbindd_domain *domain, - struct acct_info *sam_entries, - int num_sam_entries) +/* + refresh the domain sequence number. If force is True + then always refresh it, no matter how recently we fetched it +*/ +static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force) { - DEBUG(0, ("storing group cache %s/%d entries\n", domain->name, - num_sam_entries)); + NTSTATUS status; + unsigned time_diff; - store_cache(domain, CACHE_TYPE_GROUP, sam_entries, - num_sam_entries * sizeof(struct acct_info)); -} - -static void store_cache_entry(struct winbindd_domain *domain, char *cache_type, - char *name, void *buf, int len) -{ - fstring keystr; + time_diff = time(NULL) - domain->last_seq_check; - /* Create key for store */ + /* see if we have to refetch the domain sequence number */ + if (!force && (time_diff < lp_winbind_cache_time())) { + return; + } - snprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, - domain->name, name); + status = wcache->backend->sequence_number(domain, &domain->sequence_number); - /* Store it */ + if (!NT_STATUS_IS_OK(status)) { + domain->sequence_number = DOM_SEQUENCE_NONE; + } - tdb_store_by_string(cache_tdb, keystr, buf, len); + domain->last_seq_check = time(NULL); } -/* Fill a name cache entry */ - -void winbindd_store_name_cache_entry(struct winbindd_domain *domain, - char *sid, struct winbindd_name *name) +/* + decide if a cache entry has expired +*/ +static BOOL centry_expired(struct winbindd_domain *domain, struct cache_entry *centry) { - if (lp_winbind_cache_time() == 0) - return; + /* if the server is OK and our cache entry came from when it was down then + the entry is invalid */ + if (domain->sequence_number != DOM_SEQUENCE_NONE && + centry->sequence_number == DOM_SEQUENCE_NONE) { + return True; + } - store_cache_entry(domain, CACHE_TYPE_NAME, sid, name, - sizeof(struct winbindd_name)); + /* if the server is down or the cache entry is not older than the + current sequence number then it is OK */ + if (wcache_server_down(domain) || + centry->sequence_number == domain->sequence_number) { + return False; + } - set_cache_sequence_number(domain, CACHE_TYPE_NAME, sid); + /* it's expired */ + return True; } -/* Fill a SID cache entry */ - -void winbindd_store_sid_cache_entry(struct winbindd_domain *domain, - char *name, struct winbindd_sid *sid) +/* + fetch an entry from the cache, with a varargs key. auto-fetch the sequence + number and return status +*/ +static struct cache_entry *wcache_fetch(struct winbind_cache *cache, + struct winbindd_domain *domain, + const char *format, ...) { - fstring name_domain, name_user; - char *key_name; - - if (lp_winbind_cache_time() == 0) - return; - - /* Store the lowercased username as a key */ + va_list ap; + char *kstr; + TDB_DATA data; + struct cache_entry *centry; + TDB_DATA key; - if (!parse_domain_user(name, name_domain, name_user)) - return; + refresh_sequence_number(domain, False); - strlower(name_user); + va_start(ap, format); + smb_xvasprintf(&kstr, format, ap); + va_end(ap); - if (asprintf(&key_name, "%s\\%s", name_domain, name_user) < 0) - return; + key.dptr = kstr; + key.dsize = strlen(kstr); + data = tdb_fetch(wcache->tdb, key); + free(kstr); + if (!data.dptr) { + /* a cache miss */ + return NULL; + } - /* Store cache entry and update seqnum */ + centry = smb_xmalloc(sizeof(*centry)); + centry->data = data.dptr; + centry->len = data.dsize; + centry->ofs = 0; - store_cache_entry(domain, CACHE_TYPE_SID, key_name, sid, - sizeof(struct winbindd_sid)); + if (centry->len < 8) { + /* huh? corrupt cache? */ + centry_free(centry); + return NULL; + } + + centry->status = NT_STATUS(centry_uint32(centry)); + centry->sequence_number = centry_uint32(centry); - set_cache_sequence_number(domain, CACHE_TYPE_SID, key_name); + if (centry_expired(domain, centry)) { + centry_free(centry); + return NULL; + } - SAFE_FREE(key_name); + return centry; } -/* Fill a user info cache entry */ - -void winbindd_store_user_cache_entry(struct winbindd_domain *domain, - char *user_name, struct winbindd_pw *pw) +/* + make sure we have at least len bytes available in a centry +*/ +static void centry_expand(struct cache_entry *centry, uint32 len) { - if (lp_winbind_cache_time() == 0) - return; - - store_cache_entry(domain, CACHE_TYPE_USER, user_name, pw, - sizeof(struct winbindd_pw)); - - set_cache_sequence_number(domain, CACHE_TYPE_USER, user_name); + uint8 *p; + if (centry->len - centry->ofs >= len) return; + centry->len *= 2; + p = realloc(centry->data, centry->len); + if (!p) { + DEBUG(0,("out of memory: needed %d bytes in centry_expand\n", centry->len)); + smb_panic("out of memory in centry_expand"); + } + centry->data = p; } -/* Fill a user uid cache entry */ - -void winbindd_store_uid_cache_entry(struct winbindd_domain *domain, uid_t uid, - struct winbindd_pw *pw) +/* + push a uint32 into a centry +*/ +static void centry_put_uint32(struct cache_entry *centry, uint32 v) { - fstring uidstr; - - if (lp_winbind_cache_time() == 0) - return; - - snprintf(uidstr, sizeof(uidstr), "#%u", (unsigned)uid); - - DEBUG(3, ("storing uid cache entry %s/%s\n", domain->name, uidstr)); - - store_cache_entry(domain, CACHE_TYPE_USER, uidstr, pw, - sizeof(struct winbindd_pw)); - - set_cache_sequence_number(domain, CACHE_TYPE_USER, uidstr); + centry_expand(centry, 4); + SIVAL(centry->data, centry->ofs, v); + centry->ofs += 4; } -/* Fill a group info cache entry */ +/* + push a uint8 into a centry +*/ +static void centry_put_uint8(struct cache_entry *centry, uint8 v) +{ + centry_expand(centry, 1); + SCVAL(centry->data, centry->ofs, v); + centry->ofs += 1; +} -void winbindd_store_group_cache_entry(struct winbindd_domain *domain, - char *group_name, struct winbindd_gr *gr, - void *extra_data, int extra_data_len) +/* + push a string into a centry + */ +static void centry_put_string(struct cache_entry *centry, const char *s) { - fstring keystr; + int len; - if (lp_winbind_cache_time() == 0) + if (!s) { + /* null strings are marked as len 0xFFFF */ + centry_put_uint8(centry, 0xFF); return; + } - DEBUG(3, ("storing group cache entry %s/%s\n", domain->name, - group_name)); - - /* Fill group data */ - - store_cache_entry(domain, CACHE_TYPE_GROUP, group_name, gr, - sizeof(struct winbindd_gr)); + len = strlen(s); + /* can't handle more than 254 char strings. Truncating is probably best */ + if (len > 254) len = 254; + centry_put_uint8(centry, len); + centry_expand(centry, len); + memcpy(centry->data + centry->ofs, s, len); + centry->ofs += len; +} - /* Fill extra data */ +/* + start a centry for output. When finished, call centry_end() +*/ +struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status) +{ + struct cache_entry *centry; - snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, - domain->name, group_name); + if (!wcache->tdb) return NULL; - tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len); + centry = smb_xmalloc(sizeof(*centry)); - set_cache_sequence_number(domain, CACHE_TYPE_GROUP, group_name); + centry->len = 8192; /* reasonable default */ + centry->data = smb_xmalloc(centry->len); + centry->ofs = 0; + centry->sequence_number = domain->sequence_number; + centry_put_uint32(centry, NT_STATUS_V(status)); + centry_put_uint32(centry, centry->sequence_number); + return centry; } -/* Fill a group info cache entry */ - -void winbindd_store_gid_cache_entry(struct winbindd_domain *domain, gid_t gid, - struct winbindd_gr *gr, void *extra_data, - int extra_data_len) +/* + finish a centry and write it to the tdb +*/ +static void centry_end(struct cache_entry *centry, const char *format, ...) { - fstring keystr; - fstring gidstr; - - snprintf(gidstr, sizeof(gidstr), "#%u", (unsigned)gid); - - if (lp_winbind_cache_time() == 0) - return; + va_list ap; + char *kstr; + TDB_DATA key, data; - DEBUG(3, ("storing gid cache entry %s/%s\n", domain->name, gidstr)); + va_start(ap, format); + smb_xvasprintf(&kstr, format, ap); + va_end(ap); - /* Fill group data */ + key.dptr = kstr; + key.dsize = strlen(kstr); + data.dptr = centry->data; + data.dsize = centry->ofs; - store_cache_entry(domain, CACHE_TYPE_GROUP, gidstr, gr, - sizeof(struct winbindd_gr)); + tdb_store(wcache->tdb, key, data, TDB_REPLACE); + free(kstr); +} - /* Fill extra data */ +/* form a sid from the domain plus rid */ +static DOM_SID *form_sid(struct winbindd_domain *domain, uint32 rid) +{ + static DOM_SID sid; + sid_copy(&sid, &domain->sid); + sid_append_rid(&sid, rid); + return &sid; +} - snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, - domain->name, gidstr); +static void wcache_save_name_to_sid(struct winbindd_domain *domain, NTSTATUS status, + const char *name, DOM_SID *sid, enum SID_NAME_USE type) +{ + struct cache_entry *centry; + uint32 len; + + centry = centry_start(domain, status); + if (!centry) return; + len = sid_size(sid); + centry_expand(centry, len); + centry_put_uint32(centry, type); + sid_linearize(centry->data + centry->ofs, len, sid); + centry->ofs += len; + centry_end(centry, "NS/%s/%s", domain->name, name); + centry_free(centry); +} - tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len); +static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS status, + DOM_SID *sid, const char *name, enum SID_NAME_USE type, uint32 rid) +{ + struct cache_entry *centry; - set_cache_sequence_number(domain, CACHE_TYPE_GROUP, gidstr); + centry = centry_start(domain, status); + if (!centry) return; + if (NT_STATUS_IS_OK(status)) { + centry_put_uint32(centry, type); + centry_put_string(centry, name); + } + centry_end(centry, "SN/%s/%d", domain->name, rid); + centry_free(centry); } -/* Fetch some cached user or group data */ -static BOOL fetch_cache(struct winbindd_domain *domain, char *cache_type, - void **sam_entries, int *buflen) +static void wcache_save_user(struct winbindd_domain *domain, NTSTATUS status, WINBIND_USERINFO *info) { - TDB_DATA data; - fstring keystr; + struct cache_entry *centry; + + centry = centry_start(domain, status); + if (!centry) return; + centry_put_string(centry, info->acct_name); + centry_put_string(centry, info->full_name); + centry_put_uint32(centry, info->user_rid); + centry_put_uint32(centry, info->group_rid); + centry_end(centry, "U/%s/%x", domain->name, info->user_rid); + centry_free(centry); +} - if (lp_winbind_cache_time() == 0) - return False; - /* Parameter check */ +/* Query display info. This is the basic user list fn */ +static NTSTATUS query_user_list(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + WINBIND_USERINFO **info) +{ + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + int i; - if (!sam_entries || !buflen) - return False; + if (!cache->tdb) goto do_query; - /* Check cache data is current */ + centry = wcache_fetch(cache, domain, "UL/%s", domain->name); + if (!centry) goto do_query; - if (cache_domain_expired(domain, get_cache_sequence_number(domain, cache_type, NULL))) - return False; + *num_entries = centry_uint32(centry); - /* Create key */ + if (*num_entries == 0) goto do_cached; + + (*info) = talloc(mem_ctx, sizeof(**info) * (*num_entries)); + if (! (*info)) smb_panic("query_user_list out of memory"); + for (i=0; i<(*num_entries); i++) { + (*info)[i].acct_name = centry_string(centry, mem_ctx); + (*info)[i].full_name = centry_string(centry, mem_ctx); + (*info)[i].user_rid = centry_uint32(centry); + (*info)[i].group_rid = centry_uint32(centry); + } - snprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type, domain->name); - - /* Fetch cache information */ +do_cached: + status = centry->status; + centry_free(centry); + return status; - data = tdb_fetch_by_string(cache_tdb, keystr); - - if (!data.dptr) - return False; +do_query: + *num_entries = 0; + *info = NULL; - /* Copy across cached data. We can save a memcpy() by directly - assigning the data.dptr to the sam_entries pointer. It will - be freed by the end{pw,gr}ent() function. */ - - *sam_entries = (struct acct_info *)data.dptr; - *buflen = data.dsize; - - return True; -} + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } -/* Return cached entries for a domain. Return false if there are no cached - entries, or the cached information has expired for the domain. */ + status = cache->backend->query_user_list(domain, mem_ctx, num_entries, info); + + /* and save it */ + refresh_sequence_number(domain, True); + centry = centry_start(domain, status); + if (!centry) goto skip_save; + centry_put_uint32(centry, *num_entries); + for (i=0; i<(*num_entries); i++) { + centry_put_string(centry, (*info)[i].acct_name); + centry_put_string(centry, (*info)[i].full_name); + centry_put_uint32(centry, (*info)[i].user_rid); + centry_put_uint32(centry, (*info)[i].group_rid); + if (cache->backend->consistent) { + /* when the backend is consistent we can pre-prime some mappings */ + wcache_save_name_to_sid(domain, NT_STATUS_OK, + (*info)[i].acct_name, + form_sid(domain, (*info)[i].user_rid), + SID_NAME_USER); + wcache_save_sid_to_name(domain, NT_STATUS_OK, + form_sid(domain, (*info)[i].user_rid), + (*info)[i].acct_name, + SID_NAME_USER, (*info)[i].user_rid); + wcache_save_user(domain, NT_STATUS_OK, &(*info)[i]); + } + } + centry_end(centry, "UL/%s", domain->name); + centry_free(centry); + +skip_save: + return status; +} -BOOL winbindd_fetch_user_cache(struct winbindd_domain *domain, - struct getpwent_user **sam_entries, - int *num_entries) +/* list all domain groups */ +static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_entries, + struct acct_info **info) { - BOOL result; - int buflen; + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + int i; - result = fetch_cache(domain, CACHE_TYPE_USER, - (void **)sam_entries, &buflen); + if (!cache->tdb) goto do_query; - *num_entries = buflen / sizeof(struct getpwent_user); + centry = wcache_fetch(cache, domain, "GL/%s", domain->name); + if (!centry) goto do_query; - DEBUG(3, ("fetched %d cache entries for %s\n", *num_entries, - domain->name)); + *num_entries = centry_uint32(centry); + + if (*num_entries == 0) goto do_cached; + + (*info) = talloc(mem_ctx, sizeof(**info) * (*num_entries)); + if (! (*info)) smb_panic("enum_dom_groups out of memory"); + for (i=0; i<(*num_entries); i++) { + fstrcpy((*info)[i].acct_name, centry_string(centry, mem_ctx)); + fstrcpy((*info)[i].acct_desc, centry_string(centry, mem_ctx)); + (*info)[i].rid = centry_uint32(centry); + } - return result; -} +do_cached: + status = centry->status; + centry_free(centry); + return status; -/* Return cached entries for a domain. Return false if there are no cached - entries, or the cached information has expired for the domain. */ +do_query: + *num_entries = 0; + *info = NULL; -BOOL winbindd_fetch_group_cache(struct winbindd_domain *domain, - struct acct_info **sam_entries, - int *num_entries) -{ - BOOL result; - int buflen; + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } - result = fetch_cache(domain, CACHE_TYPE_GROUP, - (void **)sam_entries, &buflen); + status = cache->backend->enum_dom_groups(domain, mem_ctx, num_entries, info); + + /* and save it */ + refresh_sequence_number(domain, True); + centry = centry_start(domain, status); + if (!centry) goto skip_save; + centry_put_uint32(centry, *num_entries); + for (i=0; i<(*num_entries); i++) { + centry_put_string(centry, (*info)[i].acct_name); + centry_put_string(centry, (*info)[i].acct_desc); + centry_put_uint32(centry, (*info)[i].rid); + } + centry_end(centry, "GL/%s", domain->name); + centry_free(centry); + +skip_save: + return status; +} - *num_entries = buflen / sizeof(struct acct_info); - DEBUG(3, ("fetched %d cache entries for %s\n", *num_entries, - domain->name)); +/* convert a single name to a sid in a domain */ +static NTSTATUS name_to_sid(struct winbindd_domain *domain, + const char *name, + DOM_SID *sid, + enum SID_NAME_USE *type) +{ + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; - return result; -} + if (!cache->tdb) goto do_query; -static BOOL fetch_cache_entry(struct winbindd_domain *domain, - char *cache_type, char *name, void *buf, int len) -{ - TDB_DATA data; - fstring keystr; - - /* Create key for lookup */ + centry = wcache_fetch(cache, domain, "NS/%s/%s", domain->name, name); + if (!centry) goto do_query; + *type = centry_uint32(centry); + sid_parse(centry->data + centry->ofs, centry->len - centry->ofs, sid); - snprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, domain->name, name); - - /* Look up cache entry */ + status = centry->status; + centry_free(centry); + return status; - data = tdb_fetch_by_string(cache_tdb, keystr); +do_query: + ZERO_STRUCTP(sid); - if (!data.dptr) - return False; - - /* Copy found entry into buffer */ + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + status = cache->backend->name_to_sid(domain, name, sid, type); - memcpy((char *)buf, data.dptr, len < data.dsize ? len : data.dsize); - SAFE_FREE(data.dptr); + /* and save it */ + wcache_save_name_to_sid(domain, status, name, sid, *type); - return True; + return status; } -/* Fetch an individual SID cache entry */ - -BOOL winbindd_fetch_sid_cache_entry(struct winbindd_domain *domain, - char *name, struct winbindd_sid *sid) +/* convert a sid to a user or group name. The sid is guaranteed to be in the domain + given */ +static NTSTATUS sid_to_name(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + DOM_SID *sid, + char **name, + enum SID_NAME_USE *type) { - uint32 seq_num; + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + uint32 rid = 0; - if (lp_winbind_cache_time() == 0) - return False; + sid_peek_rid(sid, &rid); - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_SID, name); + if (!cache->tdb) goto do_query; - if (cache_domain_expired(domain, seq_num)) - return False; - - return fetch_cache_entry(domain, CACHE_TYPE_SID, name, sid, - sizeof(struct winbindd_sid)); -} - -/* Fetch an individual name cache entry */ + centry = wcache_fetch(cache, domain, "SN/%s/%d", domain->name, rid); + if (!centry) goto do_query; + if (NT_STATUS_IS_OK(centry->status)) { + *type = centry_uint32(centry); + *name = centry_string(centry, mem_ctx); + } + status = centry->status; + centry_free(centry); + return status; -BOOL winbindd_fetch_name_cache_entry(struct winbindd_domain *domain, - char *sid, struct winbindd_name *name) -{ - uint32 seq_num; +do_query: + *name = NULL; - if (lp_winbind_cache_time() == 0) - return False; - - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_NAME, sid); + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + status = cache->backend->sid_to_name(domain, mem_ctx, sid, name, type); - if (cache_domain_expired(domain, seq_num)) - return False; + /* and save it */ + refresh_sequence_number(domain, True); + wcache_save_sid_to_name(domain, status, sid, *name, *type, rid); - return fetch_cache_entry(domain, CACHE_TYPE_NAME, sid, name, - sizeof(struct winbindd_name)); + return status; } -/* Fetch an individual user cache entry */ -BOOL winbindd_fetch_user_cache_entry(struct winbindd_domain *domain, - char *user, struct winbindd_pw *pw) +/* Lookup user information from a rid */ +static NTSTATUS query_user(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 user_rid, + WINBIND_USERINFO *info) { - uint32 seq_num; + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; - if (lp_winbind_cache_time() == 0) - return False; + if (!cache->tdb) goto do_query; - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_USER, user); + centry = wcache_fetch(cache, domain, "U/%s/%x", domain->name, user_rid); + if (!centry) goto do_query; - if (cache_domain_expired(domain, seq_num)) - return False; - - return fetch_cache_entry(domain, CACHE_TYPE_USER, user, pw, - sizeof(struct winbindd_pw)); -} + info->acct_name = centry_string(centry, mem_ctx); + info->full_name = centry_string(centry, mem_ctx); + info->user_rid = centry_uint32(centry); + info->group_rid = centry_uint32(centry); + status = centry->status; + centry_free(centry); + return status; -/* Fetch an individual uid cache entry */ +do_query: + ZERO_STRUCTP(info); -BOOL winbindd_fetch_uid_cache_entry(struct winbindd_domain *domain, uid_t uid, - struct winbindd_pw *pw) -{ - fstring uidstr; - uint32 seq_num; - - if (lp_winbind_cache_time() == 0) - return False; - - snprintf(uidstr, sizeof(uidstr), "#%u", (unsigned)uid); - - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_USER, uidstr); + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + + status = cache->backend->query_user(domain, mem_ctx, user_rid, info); - if (cache_domain_expired(domain, seq_num)) - return False; + /* and save it */ + refresh_sequence_number(domain, True); + wcache_save_user(domain, status, info); - return fetch_cache_entry(domain, CACHE_TYPE_USER, uidstr, pw, - sizeof(struct winbindd_pw)); + return status; } -/* Fetch an individual group cache entry. This function differs from the - user cache code as we need to store the group membership data. */ -BOOL winbindd_fetch_group_cache_entry(struct winbindd_domain *domain, - char *group, struct winbindd_gr *gr, - void **extra_data, int *extra_data_len) +/* Lookup groups a user is a member of. */ +static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 user_rid, + uint32 *num_groups, uint32 **user_gids) { - TDB_DATA data; - fstring keystr; - uint32 seq_num; + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + int i; - if (lp_winbind_cache_time() == 0) - return False; - - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_GROUP, group); - - if (cache_domain_expired(domain, seq_num)) - return False; + if (!cache->tdb) goto do_query; - /* Fetch group data */ + centry = wcache_fetch(cache, domain, "UG/%s/%x", domain->name, user_rid); + if (!centry) goto do_query; - if (!fetch_cache_entry(domain, CACHE_TYPE_GROUP, group, gr, sizeof(struct winbindd_gr))) - return False; + *num_groups = centry_uint32(centry); - /* Fetch extra data */ - - snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, - domain->name, group); - - data = tdb_fetch_by_string(cache_tdb, keystr); + if (*num_groups == 0) goto do_cached; - if (!data.dptr) - return False; + (*user_gids) = talloc(mem_ctx, sizeof(**user_gids) * (*num_groups)); + if (! (*user_gids)) smb_panic("lookup_usergroups out of memory"); + for (i=0; i<(*num_groups); i++) { + (*user_gids)[i] = centry_uint32(centry); + } - /* Extra data freed when data has been sent */ +do_cached: + status = centry->status; + centry_free(centry); + return status; - if (extra_data) - *extra_data = data.dptr; +do_query: + (*num_groups) = 0; + (*user_gids) = NULL; - if (extra_data_len) - *extra_data_len = data.dsize; - - return True; + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + status = cache->backend->lookup_usergroups(domain, mem_ctx, user_rid, num_groups, user_gids); + + /* and save it */ + refresh_sequence_number(domain, True); + centry = centry_start(domain, status); + if (!centry) goto skip_save; + centry_put_uint32(centry, *num_groups); + for (i=0; i<(*num_groups); i++) { + centry_put_uint32(centry, (*user_gids)[i]); + } + centry_end(centry, "UG/%s/%x", domain->name, user_rid); + centry_free(centry); + +skip_save: + return status; } -/* Fetch an individual gid cache entry. This function differs from the - user cache code as we need to store the group membership data. */ - -BOOL winbindd_fetch_gid_cache_entry(struct winbindd_domain *domain, gid_t gid, - struct winbindd_gr *gr, - void **extra_data, int *extra_data_len) +static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 group_rid, uint32 *num_names, + uint32 **rid_mem, char ***names, + uint32 **name_types) { - TDB_DATA data; - fstring keystr; - fstring gidstr; - uint32 seq_num; + struct winbind_cache *cache = get_cache(domain); + struct cache_entry *centry = NULL; + NTSTATUS status; + int i; - snprintf(gidstr, sizeof(gidstr), "#%u", (unsigned)gid); - - if (lp_winbind_cache_time() == 0) - return False; + if (!cache->tdb) goto do_query; - seq_num = get_cache_sequence_number(domain, CACHE_TYPE_GROUP, gidstr); + centry = wcache_fetch(cache, domain, "GM/%s/%x", domain->name, group_rid); + if (!centry) goto do_query; - if (cache_domain_expired(domain, seq_num)) - return False; - - /* Fetch group data */ + *num_names = centry_uint32(centry); + + if (*num_names == 0) goto do_cached; - if (!fetch_cache_entry(domain, CACHE_TYPE_GROUP, - gidstr, gr, sizeof(struct winbindd_gr))) - return False; + (*rid_mem) = talloc(mem_ctx, sizeof(**rid_mem) * (*num_names)); + (*names) = talloc(mem_ctx, sizeof(**names) * (*num_names)); + (*name_types) = talloc(mem_ctx, sizeof(**name_types) * (*num_names)); - /* Fetch extra data */ + if (! (*rid_mem) || ! (*names) || ! (*name_types)) { + smb_panic("lookup_groupmem out of memory"); + } - snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, - domain->name, gidstr); + for (i=0; i<(*num_names); i++) { + (*rid_mem)[i] = centry_uint32(centry); + (*names)[i] = centry_string(centry, mem_ctx); + (*name_types)[i] = centry_uint32(centry); + } - data = tdb_fetch_by_string(cache_tdb, keystr); +do_cached: + status = centry->status; + centry_free(centry); + return status; - if (!data.dptr) - return False; +do_query: + (*num_names) = 0; + (*rid_mem) = NULL; + (*names) = NULL; + (*name_types) = NULL; + - /* Extra data freed when data has been sent */ + if (wcache_server_down(domain)) { + return NT_STATUS_SERVER_DISABLED; + } + status = cache->backend->lookup_groupmem(domain, mem_ctx, group_rid, num_names, + rid_mem, names, name_types); + + /* and save it */ + refresh_sequence_number(domain, True); + centry = centry_start(domain, status); + if (!centry) goto skip_save; + centry_put_uint32(centry, *num_names); + for (i=0; i<(*num_names); i++) { + centry_put_uint32(centry, (*rid_mem)[i]); + centry_put_string(centry, (*names)[i]); + centry_put_uint32(centry, (*name_types)[i]); + } + centry_end(centry, "GM/%s/%x", domain->name, group_rid); + centry_free(centry); + +skip_save: + return status; +} - if (extra_data) - *extra_data = data.dptr; +/* find the sequence number for a domain */ +static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq) +{ + refresh_sequence_number(domain, False); - if (extra_data_len) - *extra_data_len = data.dsize; + *seq = domain->sequence_number; - return True; + return NT_STATUS_OK; } -/* Flush cache data - easiest to just reopen the tdb */ - -void winbindd_flush_cache(void) +/* enumerate trusted domains */ +static NTSTATUS trusted_domains(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, + uint32 *num_domains, + char ***names, + DOM_SID **dom_sids) { - tdb_close(cache_tdb); - winbindd_cache_init(); -} + struct winbind_cache *cache = get_cache(domain); -/* Print cache status information */ + /* we don't cache this call */ + return cache->backend->trusted_domains(domain, mem_ctx, num_domains, + names, dom_sids); +} -void winbindd_cache_status(void) +/* find the domain sid */ +static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid) { + struct winbind_cache *cache = get_cache(domain); + + /* we don't cache this call */ + return cache->backend->domain_sid(domain, sid); } + +/* the ADS backend methods are exposed via this structure */ +struct winbindd_methods cache_methods = { + True, + query_user_list, + enum_dom_groups, + name_to_sid, + sid_to_name, + query_user, + lookup_usergroups, + lookup_groupmem, + sequence_number, + trusted_domains, + domain_sid +}; diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 3b0b3fe5b26..03a8e3cdd1e 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Winbind daemon connection manager @@ -73,7 +72,7 @@ struct winbindd_cm_conn { POLICY_HND pol; }; -struct winbindd_cm_conn *cm_conns = NULL; +static struct winbindd_cm_conn *cm_conns = NULL; /* Get a domain controller name. Cache positive and negative lookups so we don't go to the network too often when something is badly broken. */ @@ -87,7 +86,7 @@ struct get_dc_name_cache { struct get_dc_name_cache *prev, *next; }; -static BOOL cm_get_dc_name(char *domain, fstring srv_name) +static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out) { static struct get_dc_name_cache *get_dc_name_cache; struct get_dc_name_cache *dcc; @@ -141,20 +140,22 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name) DLIST_ADD(get_dc_name_cache, dcc); - /* Lookup domain controller name */ - - if (!get_dc_list(False, domain, &ip_list, &count)) { - DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); - return False; + /* Lookup domain controller name. Try the real PDC first to avoid + SAM sync delays */ + if (!get_dc_list(True, domain, &ip_list, &count)) { + if (!get_dc_list(False, domain, &ip_list, &count)) { + DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); + return False; + } } - /* Pick a nice close server */ + /* Pick a nice close server */ /* Look for DC on local net */ for (i = 0; i < count; i++) { if (!is_local_net(ip_list[i])) continue; - + if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { dc_ip = ip_list[i]; goto done; @@ -168,14 +169,15 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name) i = (sys_random() % count); - if (!is_zero_ip(ip_list[i]) && name_status_find(domain, 0x1c, 0x20, - ip_list[i], srv_name)) { + if (!is_zero_ip(ip_list[i]) && + name_status_find(domain, 0x1c, 0x20, + ip_list[i], srv_name)) { dc_ip = ip_list[i]; goto done; } zero_ip(&ip_list[i]); /* Tried and failed. */ - /* Finally return first DC that we can contact */ + /* Finally return first DC that we can contact */ for (i = 0; i < count; i++) { if (is_zero_ip(ip_list[i])) @@ -188,110 +190,141 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name) } /* No-one to talk to )-: */ - return False; /* Boo-hoo */ - + return False; /* Boo-hoo */ + done: - - /* - * We have the netbios name and IP address of a domain controller. - * Ideally we should sent a SAMLOGON request to determine whether - * the DC is alive and kicking. If we can catch a dead DC before - * performing a cli_connect() we can avoid a 30-second timeout. - */ + /* We have the netbios name and IP address of a domain controller. + Ideally we should sent a SAMLOGON request to determine whether + the DC is alive and kicking. If we can catch a dead DC before + performing a cli_connect() we can avoid a 30-second timeout. */ /* We have a name so make the cache entry positive now */ fstrcpy(dcc->srv_name, srv_name); DEBUG(3, ("cm_get_dc_name: Returning DC %s (%s) for domain %s\n", srv_name, - inet_ntoa(dc_ip), domain)); + inet_ntoa(dc_ip), domain)); + + *ip_out = dc_ip; SAFE_FREE(ip_list); + return True; } /* Choose between anonymous or authenticated connections. We need to use an authenticated connection if DCs have the RestrictAnonymous registry entry set > 0, or the "Additional restrictions for anonymous - connections" set in the win2k Local Security Policy. */ + connections" set in the win2k Local Security Policy. + + Caller to free() result in domain, username, password +*/ -void cm_init_creds(struct ntuser_creds *creds) +static void cm_get_ipc_userpass(char **username, char **domain, char **password) { - char *username, *password; - - ZERO_STRUCTP(creds); - - creds->pwd.null_pwd = True; /* anonymoose */ - - username = secrets_fetch(SECRETS_AUTH_USER, NULL); - password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL); - - if (username && *username) { - pwd_set_cleartext(&creds->pwd, password); - pwd_make_lm_nt_16(&creds->pwd, password); - - fstrcpy(creds->user_name, username); - fstrcpy(creds->domain, lp_workgroup()); - - DEBUG(3, ("IPC$ connections done %s\\%s\n", creds->domain, - creds->user_name)); - } else + *username = secrets_fetch(SECRETS_AUTH_USER, NULL); + *domain = secrets_fetch(SECRETS_AUTH_DOMAIN, NULL); + *password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL); + + if (*username && **username) { + if (!*domain || !**domain) { + *domain = smb_xstrdup(lp_workgroup()); + } + + DEBUG(3, ("IPC$ connections done by user %s\\%s\n", *domain, *username)); + } else { DEBUG(3, ("IPC$ connections done anonymously\n")); + *username = smb_xstrdup(""); + *domain = smb_xstrdup(""); + *password = smb_xstrdup(""); + } } /* Open a new smb pipe connection to a DC on a given domain. Cache negative creation attempts so we don't try and connect to broken machines too often. */ -#define OPEN_CONNECTION_CACHE_TIMEOUT 30 /* Seconds between attempts */ +#define FAILED_CONNECTION_CACHE_TIMEOUT 30 /* Seconds between attempts */ -struct open_connection_cache { +struct failed_connection_cache { fstring domain_name; fstring controller; time_t lookup_time; - struct open_connection_cache *prev, *next; + NTSTATUS nt_status; + struct failed_connection_cache *prev, *next; }; -static BOOL cm_open_connection(char *domain, char *pipe_name, +static struct failed_connection_cache *failed_connection_cache; + +/* Add an entry to the failed conneciton cache */ + +static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, NTSTATUS result) { + struct failed_connection_cache *fcc; + + SMB_ASSERT(!NT_STATUS_IS_OK(result)); + + /* Create negative lookup cache entry for this domain and controller */ + + if (!(fcc = (struct failed_connection_cache *) + malloc(sizeof(struct failed_connection_cache)))) { + DEBUG(0, ("malloc failed in add_failed_connection_entry!\n")); + return; + } + + ZERO_STRUCTP(fcc); + + fstrcpy(fcc->domain_name, new_conn->domain); + fstrcpy(fcc->controller, new_conn->controller); + fcc->lookup_time = time(NULL); + fcc->nt_status = result; + + DLIST_ADD(failed_connection_cache, fcc); +} + +/* Open a connction to the remote server, cache failures for 30 seconds */ + +static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name, struct winbindd_cm_conn *new_conn) { - static struct open_connection_cache *open_connection_cache; - struct open_connection_cache *occ; - struct nmb_name calling, called; + struct failed_connection_cache *fcc; extern pstring global_myname; - fstring dest_host; - struct in_addr dest_ip; - BOOL result = False; - struct ntuser_creds creds; + NTSTATUS result; + char *ipc_username, *ipc_domain, *ipc_password; + struct in_addr dc_ip; + + ZERO_STRUCT(dc_ip); fstrcpy(new_conn->domain, domain); fstrcpy(new_conn->pipe_name, pipe_name); /* Look for a domain controller for this domain. Negative results - are cached so don't bother applying the caching for this - function just yet. */ - - if (!cm_get_dc_name(domain, new_conn->controller)) - goto done; + are cached so don't bother applying the caching for this + function just yet. */ + if (!cm_get_dc_name(domain, new_conn->controller, &dc_ip)) { + result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; + add_failed_connection_entry(new_conn, result); + return result; + } + /* Return false if we have tried to look up this domain and netbios - name before and failed. */ + name before and failed. */ - for (occ = open_connection_cache; occ; occ = occ->next) { + for (fcc = failed_connection_cache; fcc; fcc = fcc->next) { - if (!(strequal(domain, occ->domain_name) && - strequal(new_conn->controller, occ->controller))) + if (!(strequal(domain, fcc->domain_name) && + strequal(new_conn->controller, fcc->controller))) continue; /* Not our domain */ - if ((time(NULL) - occ->lookup_time) > - OPEN_CONNECTION_CACHE_TIMEOUT) { + if ((time(NULL) - fcc->lookup_time) > + FAILED_CONNECTION_CACHE_TIMEOUT) { /* Cache entry has expired, delete it */ DEBUG(10, ("cm_open_connection cache entry expired for %s, %s\n", domain, new_conn->controller)); - DLIST_REMOVE(open_connection_cache, occ); - SAFE_FREE(occ); + DLIST_REMOVE(failed_connection_cache, fcc); + free(fcc); break; } @@ -300,118 +333,154 @@ static BOOL cm_open_connection(char *domain, char *pipe_name, DEBUG(10, ("returning negative open_connection_cache entry for %s, %s\n", domain, new_conn->controller)); - goto done; + result = fcc->nt_status; + SMB_ASSERT(!NT_STATUS_IS_OK(result)); + return result; } /* Initialise SMB connection */ - if (!(new_conn->cli = cli_initialise(NULL))) - goto done; - - if (!resolve_srv_name(new_conn->controller, dest_host, &dest_ip)) - goto done; - - make_nmb_name(&called, dns_to_netbios_name(new_conn->controller), 0x20); - make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0); - - cm_init_creds(&creds); - - cli_init_creds(new_conn->cli, &creds); - - if (!cli_establish_connection(new_conn->cli, new_conn->controller, - &dest_ip, &calling, &called, "IPC$", - "IPC", False, True)) - goto done; - - if (!cli_nt_session_open (new_conn->cli, pipe_name)) - goto done; - - result = True; - - done: + cm_get_ipc_userpass(&ipc_username, &ipc_domain, &ipc_password); - /* Create negative lookup cache entry for this domain and controller */ + DEBUG(5, ("connecting to %s from %s with username [%s]\\[%s]\n", + new_conn->controller, global_myname, ipc_domain, ipc_username)); - if (!result) { - if (!(occ = (struct open_connection_cache *) - malloc(sizeof(struct open_connection_cache)))) - return False; + result = cli_full_connection(&(new_conn->cli), global_myname, new_conn->controller, + &dc_ip, 0, "IPC$", + "IPC", ipc_username, ipc_domain, + ipc_password, strlen(ipc_password)); - ZERO_STRUCTP(occ); + SAFE_FREE(ipc_username); + SAFE_FREE(ipc_domain); + SAFE_FREE(ipc_password); - fstrcpy(occ->domain_name, domain); - fstrcpy(occ->controller, new_conn->controller); - occ->lookup_time = time(NULL); - - DLIST_ADD(open_connection_cache, occ); + if (!NT_STATUS_IS_OK(result)) { + add_failed_connection_entry(new_conn, result); + return result; } - - if (!result && new_conn->cli) + + if (!cli_nt_session_open (new_conn->cli, pipe_name)) { + result = NT_STATUS_PIPE_NOT_AVAILABLE; + add_failed_connection_entry(new_conn, result); cli_shutdown(new_conn->cli); + return result; + } - return result; + return NT_STATUS_OK; } /* Return true if a connection is still alive */ static BOOL connection_ok(struct winbindd_cm_conn *conn) { - if (!conn->cli->initialised) + if (!conn) { + smb_panic("Invalid paramater passed to conneciton_ok(): conn was NULL!\n"); return False; + } + + if (!conn->cli) { + DEBUG(0, ("Connection to %s for domain %s (pipe %s) has NULL conn->cli!\n", + conn->controller, conn->domain, conn->pipe_name)); + smb_panic("connection_ok: conn->cli was null!"); + return False; + } + + if (!conn->cli->initialised) { + DEBUG(0, ("Connection to %s for domain %s (pipe %s) was never initialised!\n", + conn->controller, conn->domain, conn->pipe_name)); + smb_panic("connection_ok: conn->cli->initialised is False!"); + return False; + } - if (conn->cli->fd == -1) + if (conn->cli->fd == -1) { + DEBUG(3, ("Connection to %s for domain %s (pipe %s) has died or was never started (fd == -1)\n", + conn->controller, conn->domain, conn->pipe_name)); return False; + } return True; } -/* Return a LSA policy handle on a domain */ +/* Get a connection to the remote DC and open the pipe. If there is already a connection, use that */ -CLI_POLICY_HND *cm_get_lsa_handle(char *domain) +static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_name, struct winbindd_cm_conn **conn_out) { - struct winbindd_cm_conn *conn; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; + struct winbindd_cm_conn *conn, conn_temp; NTSTATUS result; - static CLI_POLICY_HND hnd; - - /* Look for existing connections */ for (conn = cm_conns; conn; conn = conn->next) { if (strequal(conn->domain, domain) && - strequal(conn->pipe_name, PIPE_LSARPC)) { - + strequal(conn->pipe_name, pipe_name)) { if (!connection_ok(conn)) { + if (conn->cli) { + cli_shutdown(conn->cli); + } + conn_temp.next = conn->next; DLIST_REMOVE(cm_conns, conn); - return NULL; + SAFE_FREE(conn); + conn = &conn_temp; /* Just to keep the loop moving */ + } else { + break; } - - goto ok; } } + + if (!conn) { + if (!(conn = (struct winbindd_cm_conn *) malloc(sizeof(struct winbindd_cm_conn)))) + return NT_STATUS_NO_MEMORY; + + ZERO_STRUCTP(conn); + + if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, pipe_name, conn))) { + DEBUG(3, ("Could not open a connection to %s for %s (%s)\n", + domain, pipe_name, nt_errstr(result))); + SAFE_FREE(conn); + return result; + } + DLIST_ADD(cm_conns, conn); + } + + *conn_out = conn; + return NT_STATUS_OK; +} - /* Create a new one */ +/* Return a LSA policy handle on a domain */ - if (!(conn = (struct winbindd_cm_conn *) malloc(sizeof(struct winbindd_cm_conn)))) - return NULL; +CLI_POLICY_HND *cm_get_lsa_handle(char *domain) +{ + struct winbindd_cm_conn *conn; + uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; + NTSTATUS result; + static CLI_POLICY_HND hnd; - ZERO_STRUCTP(conn); + /* Look for existing connections */ - if (!cm_open_connection(domain, PIPE_LSARPC, conn)) { - DEBUG(3, ("Could not connect to a dc for domain %s\n", domain)); + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) { return NULL; } - + result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False, des_access, &conn->pol); - if (!NT_STATUS_IS_OK(result)) - return NULL; + if (!NT_STATUS_IS_OK(result)) { + /* Hit the cache code again. This cleans out the old connection and gets a new one */ + if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */ + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) { + return NULL; + } - /* Add to list */ + result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False, + des_access, &conn->pol); + } - DLIST_ADD(cm_conns, conn); + if (!NT_STATUS_IS_OK(result)) { + cli_shutdown(conn->cli); + DLIST_REMOVE(cm_conns, conn); + SAFE_FREE(conn); + return NULL; + } + } - ok: hnd.pol = conn->pol; hnd.cli = conn->cli; @@ -429,49 +498,39 @@ CLI_POLICY_HND *cm_get_sam_handle(char *domain) /* Look for existing connections */ - for (conn = cm_conns; conn; conn = conn->next) { - if (strequal(conn->domain, domain) && strequal(conn->pipe_name, PIPE_SAMR)) { - - if (!connection_ok(conn)) { - DLIST_REMOVE(cm_conns, conn); - return NULL; - } - - goto ok; - } - } - - /* Create a new one */ - - if (!(conn = (struct winbindd_cm_conn *) - malloc(sizeof(struct winbindd_cm_conn)))) - return NULL; - - ZERO_STRUCTP(conn); - - if (!cm_open_connection(domain, PIPE_SAMR, conn)) { - DEBUG(3, ("Could not connect to a dc for domain %s\n", domain)); + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) { return NULL; } - + result = cli_samr_connect(conn->cli, conn->cli->mem_ctx, des_access, &conn->pol); - if (!NT_STATUS_IS_OK(result)) - return NULL; + if (!NT_STATUS_IS_OK(result)) { + /* Hit the cache code again. This cleans out the old connection and gets a new one */ + if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */ + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) { + return NULL; + } - /* Add to list */ + result = cli_samr_connect(conn->cli, conn->cli->mem_ctx, + des_access, &conn->pol); + } - DLIST_ADD(cm_conns, conn); + if (!NT_STATUS_IS_OK(result)) { + cli_shutdown(conn->cli); + DLIST_REMOVE(cm_conns, conn); + SAFE_FREE(conn); + return NULL; + } + } - ok: hnd.pol = conn->pol; hnd.cli = conn->cli; - return &hnd; + return &hnd; } -#if 0 +#if 0 /* This code now *well* out of date */ /* Return a SAM domain policy handle on a domain */ @@ -490,6 +549,7 @@ CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid) conn->pipe_data.samr.pipe_type == SAM_PIPE_DOM) { if (!connection_ok(conn)) { + /* Shutdown cli? Free conn? Allow retry of DC? */ DLIST_REMOVE(cm_conns, conn); return NULL; } @@ -560,6 +620,7 @@ CLI_POLICY_HND *cm_get_sam_user_handle(char *domain, DOM_SID *domain_sid, conn->pipe_data.samr.rid == user_rid) { if (!connection_ok(conn)) { + /* Shutdown cli? Free conn? Allow retry of DC? */ DLIST_REMOVE(cm_conns, conn); return NULL; } @@ -636,6 +697,7 @@ CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid, conn->pipe_data.samr.rid == group_rid) { if (!connection_ok(conn)) { + /* Shutdown cli? Free conn? Allow retry of DC? */ DLIST_REMOVE(cm_conns, conn); return NULL; } @@ -701,29 +763,46 @@ CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid, NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, struct cli_state **cli) { - struct winbindd_cm_conn conn; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; + struct winbindd_cm_conn *conn; - /* Open an initial conection */ + if (!cli) { + return NT_STATUS_INVALID_PARAMETER; + } - ZERO_STRUCT(conn); + /* Open an initial conection */ - if (!cm_open_connection(domain, PIPE_NETLOGON, &conn)) { - DEBUG(3, ("Could not open a connection to %s\n", domain)); + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_NETLOGON, &conn))) { return result; } - - result = cli_nt_setup_creds(conn.cli, trust_passwd); + + result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); if (!NT_STATUS_IS_OK(result)) { DEBUG(0, ("error connecting to domain password server: %s\n", - get_nt_error_msg(result))); - cli_shutdown(conn.cli); + nt_errstr(result))); + + /* Hit the cache code again. This cleans out the old connection and gets a new one */ + if (conn->cli->fd == -1) { + if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_NETLOGON, &conn))) { + return result; + } + + /* Try again */ + result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); + } + + if (!NT_STATUS_IS_OK(result)) { + cli_shutdown(conn->cli); + DLIST_REMOVE(cm_conns, conn); + SAFE_FREE(conn); return result; + } } - if (cli) - *cli = conn.cli; + *cli = conn->cli; return result; } diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index ad1abfc1f61..c62ce54b591 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2. + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -28,20 +27,20 @@ Empty static struct for negative caching. ****************************************************************/ -static struct winbindd_gr negative_gr_cache_entry; - /* Fill a grent structure from various other information */ -static BOOL fill_grent(struct winbindd_gr *gr, char *gr_name, - gid_t unix_gid) +static BOOL fill_grent(struct winbindd_gr *gr, const char *dom_name, + const char *gr_name, gid_t unix_gid) { + fstring full_group_name; /* Fill in uid/gid */ + fill_domain_username(full_group_name, dom_name, gr_name); gr->gr_gid = unix_gid; /* Group name and password */ - safe_strcpy(gr->gr_name, gr_name, sizeof(gr->gr_name) - 1); + safe_strcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name) - 1); safe_strcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd) - 1); return True; @@ -60,36 +59,35 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, char **names = NULL, *buf; BOOL result = False; TALLOC_CTX *mem_ctx; + NTSTATUS status; - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("fill_grent_mem(%s)", domain->name))) return False; /* Initialise group membership information */ - DEBUG(10, ("fill_grent_mem(): group %s rid 0x%x\n", - domain ? domain->name : "NULL", group_rid)); + DEBUG(10, ("group %s rid 0x%x\n", domain ? domain->name : "NULL", + group_rid)); *num_gr_mem = 0; if (group_name_type != SID_NAME_DOM_GRP) { - DEBUG(1, ("fill_grent_mem(): rid %d in domain %s isn't a " - "domain group\n", group_rid, domain->name)); + DEBUG(1, ("rid %d in domain %s isn't a " "domain group\n", + group_rid, domain->name)); goto done; } /* Lookup group members */ - - if (!winbindd_lookup_groupmem(domain, mem_ctx, group_rid, &num_names, - &rid_mem, &names, &name_types)) { - - DEBUG(1, ("fill_grent_mem(): could not lookup membership " - "for group rid %d in domain %s\n", + status = domain->methods->lookup_groupmem(domain, mem_ctx, group_rid, &num_names, + &rid_mem, &names, &name_types); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(1, ("could not lookup membership for group rid %d in domain %s\n", group_rid, domain->name)); goto done; } - DEBUG(10, ("fill_grent_mem(): looked up %d names\n", num_names)); + DEBUG(10, ("looked up %d names\n", num_names)); if (DEBUGLEVEL >= 10) { for (i = 0; i < num_names; i++) @@ -111,31 +109,27 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, the_name = names[i]; - DEBUG(10, ("fill_grent_mem(): processing name %s\n", - the_name)); + DEBUG(10, ("processing name %s\n", the_name)); /* FIXME: need to cope with groups within groups. These occur in Universal groups on a Windows 2000 native mode server. */ if (name_types[i] != SID_NAME_USER) { - DEBUG(3, ("fill_grent_mem(): name %s isn't a domain " - "user\n", the_name)); + DEBUG(3, ("name %s isn't a domain user\n", the_name)); continue; } /* Don't bother with machine accounts */ if (the_name[strlen(the_name) - 1] == '$') { - DEBUG(10, ("fill_grent_mem(): %s is machine account\n", - the_name)); + DEBUG(10, ("%s is machine account\n", the_name)); continue; } /* Append domain name */ - snprintf(name, sizeof(name), "%s%s%s", domain->name, - lp_winbind_separator(), the_name); + fill_domain_username(name, domain->name, the_name); len = strlen(name); @@ -144,11 +138,9 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, if (!buf) { buf_len += len + 1; /* List is comma separated */ (*num_gr_mem)++; - DEBUG(10, ("fill_grent_mem(): buf_len + %d = %d\n", len + 1, - buf_len)); + DEBUG(10, ("buf_len + %d = %d\n", len + 1, buf_len)); } else { - DEBUG(10, ("fill_grent_mem(): appending %s at index %d\n", - name, len)); + DEBUG(10, ("appending %s at ndx %d\n", name, len)); safe_strcpy(&buf[buf_ndx], name, len); buf_ndx += len; buf[buf_ndx] = ','; @@ -160,7 +152,7 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, if (!buf) { if (!(buf = malloc(buf_len))) { - DEBUG(1, ("fill_grent_mem(): out of memory\n")); + DEBUG(1, ("out of memory\n")); result = False; goto done; } @@ -175,32 +167,31 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, *gr_mem = buf; *gr_mem_len = buf_len; - DEBUG(10, ("fill_grent_mem(): num_mem = %d, len = %d, mem = %s\n", - *num_gr_mem, buf_len, num_gr_mem ? buf : "NULL")); - + DEBUG(10, ("num_mem = %d, len = %d, mem = %s\n", *num_gr_mem, + buf_len, *num_gr_mem ? buf : "NULL")); result = True; done: talloc_destroy(mem_ctx); - DEBUG(10, ("fill_grent_mem(): returning %d\n", result)); + DEBUG(10, ("fill_grent_mem returning %d\n", result)); return result; } /* Return a group structure from a group name */ -enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *state) +enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state) { DOM_SID group_sid; struct winbindd_domain *domain; enum SID_NAME_USE name_type; uint32 group_rid; - fstring name_domain, name_group, name; + fstring name_domain, name_group; char *tmp, *gr_mem; gid_t gid; - int extra_data_len, gr_mem_len; + int gr_mem_len; DEBUG(3, ("[%5d]: getgrnam %s\n", state->pid, state->request.data.groupname)); @@ -216,74 +207,39 @@ enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *sta /* Get info for the domain */ if ((domain = find_domain_from_name(name_domain)) == NULL) { - DEBUG(0, ("getgrname_from_group(): could not get domain " - "sid for domain %s\n", name_domain)); + DEBUG(0, ("could not get domain sid for domain %s\n", + name_domain)); return WINBINDD_ERROR; } - /* Check for cached group entry */ - - if (winbindd_fetch_group_cache_entry(domain, name_group, - &state->response.data.gr, - &state->response.extra_data, - &extra_data_len)) { - - /* Check if this is a negative cache entry. */ - - if (memcmp(&negative_gr_cache_entry, &state->response.data.gr, - sizeof(state->response.data.gr)) == 0) - return WINBINDD_ERROR; - - state->response.length += extra_data_len; - return WINBINDD_OK; - } - - snprintf(name, sizeof(name), "%s\\%s", name_domain, name_group); - /* Get rid and name type from name */ - if (!winbindd_lookup_sid_by_name(name, &group_sid, &name_type)) { + if (!winbindd_lookup_sid_by_name(domain, name_group, &group_sid, + &name_type)) { DEBUG(1, ("group %s in domain %s does not exist\n", name_group, name_domain)); - - winbindd_store_group_cache_entry(domain, name_group, - &negative_gr_cache_entry, NULL, 0); - return WINBINDD_ERROR; } if ((name_type != SID_NAME_ALIAS) && (name_type != SID_NAME_DOM_GRP)) { - DEBUG(1, ("from_group: name '%s' is not a local or domain " - "group: %d\n", name_group, name_type)); - - winbindd_store_group_cache_entry(domain, name_group, - &negative_gr_cache_entry, NULL, 0); - + DEBUG(1, ("name '%s' is not a local or domain group: %d\n", + name_group, name_type)); return WINBINDD_ERROR; } /* Fill in group structure */ + sid_peek_rid(&group_sid, &group_rid); - sid_split_rid(&group_sid, &group_rid); - - if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, &gid)) { - DEBUG(1, ("error sursing unix gid for sid\n")); - - winbindd_store_group_cache_entry(domain, name_group, - &negative_gr_cache_entry, NULL, 0); - + if (!winbindd_idmap_get_gid_from_sid(&group_sid, &gid)) { + DEBUG(1, ("error converting unix gid to sid\n")); return WINBINDD_ERROR; } - if (!fill_grent(&state->response.data.gr, - state->request.data.groupname, gid) || + if (!fill_grent(&state->response.data.gr, name_domain, + name_group, gid) || !fill_grent_mem(domain, group_rid, name_type, &state->response.data.gr.num_gr_mem, &gr_mem, &gr_mem_len)) { - - winbindd_store_group_cache_entry(domain, name_group, - &negative_gr_cache_entry, NULL, 0); - return WINBINDD_ERROR; } @@ -294,27 +250,20 @@ enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *sta state->response.length += gr_mem_len; state->response.extra_data = gr_mem; - /* Update cached group info */ - - winbindd_store_group_cache_entry(domain, name_group, - &state->response.data.gr, - state->response.extra_data, - gr_mem_len); - return WINBINDD_OK; } /* Return a group structure from a gid number */ -enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state - *state) +enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state) { struct winbindd_domain *domain; DOM_SID group_sid; enum SID_NAME_USE name_type; + fstring dom_name; fstring group_name; uint32 group_rid; - int extra_data_len, gr_mem_len; + int gr_mem_len; char *gr_mem; DEBUG(3, ("[%5d]: getgrgid %d\n", state->pid, @@ -330,53 +279,31 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state if (!winbindd_idmap_get_rid_from_gid(state->request.data.gid, &group_rid, &domain)) { - DEBUG(1, ("Could not convert gid %d to rid\n", + DEBUG(1, ("could not convert gid %d to rid\n", state->request.data.gid)); return WINBINDD_ERROR; } - /* Try a cached entry */ - - if (winbindd_fetch_gid_cache_entry(domain, - state->request.data.gid, - &state->response.data.gr, - &state->response.extra_data, - &extra_data_len)) { - - /* Check if this is a negative cache entry. */ - - if (memcmp(&negative_gr_cache_entry, &state->response.data.gr, - sizeof(state->response.data.gr)) == 0) - return WINBINDD_ERROR; - - state->response.length += extra_data_len; - return WINBINDD_OK; - } - /* Get sid from gid */ sid_copy(&group_sid, &domain->sid); sid_append_rid(&group_sid, group_rid); - if (!winbindd_lookup_name_by_sid(&group_sid, group_name, &name_type)) { - DEBUG(1, ("Could not lookup sid\n")); + if (!winbindd_lookup_name_by_sid(&group_sid, dom_name, group_name, &name_type)) { + DEBUG(1, ("could not lookup sid\n")); return WINBINDD_ERROR; } - if (strcmp(lp_winbind_separator(),"\\")) - string_sub(group_name, "\\", lp_winbind_separator(), - sizeof(fstring)); - if (!((name_type == SID_NAME_ALIAS) || (name_type == SID_NAME_DOM_GRP))) { - DEBUG(1, ("from_gid: name '%s' is not a local or domain " - "group: %d\n", group_name, name_type)); + DEBUG(1, ("name '%s' is not a local or domain group: %d\n", + group_name, name_type)); return WINBINDD_ERROR; } /* Fill in group structure */ - if (!fill_grent(&state->response.data.gr, group_name, + if (!fill_grent(&state->response.data.gr, dom_name, group_name, state->request.data.gid) || !fill_grent_mem(domain, group_rid, name_type, &state->response.data.gr.num_gr_mem, @@ -390,13 +317,6 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state state->response.length += gr_mem_len; state->response.extra_data = gr_mem; - /* Update cached group info */ - - winbindd_store_gid_cache_entry(domain, state->request.data.gid, - &state->response.data.gr, - state->response.extra_data, - gr_mem_len); - return WINBINDD_OK; } @@ -408,7 +328,7 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state) { - struct winbindd_domain *tmp; + struct winbindd_domain *domain; DEBUG(3, ("[%5d]: setgrent\n", state->pid)); @@ -426,28 +346,25 @@ enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state) /* Create sam pipes for each domain we know about */ - if (domain_list == NULL) - get_domain_info(); - - for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { + for (domain = domain_list(); domain != NULL; domain = domain->next) { struct getent_state *domain_state; /* Skip domains other than WINBINDD_DOMAIN environment variable */ if ((strcmp(state->request.domain, "") != 0) && - !check_domain_env(state->request.domain, tmp->name)) { - DEBUG(5, ("skipping domain %s because of env var\n", - tmp->name)); + !check_domain_env(state->request.domain, domain->name)) continue; - } /* Create a state record for this domain */ - if ((domain_state = create_getent_state(tmp)) == NULL) { - DEBUG(5, ("error connecting to dc for domain %s\n", - tmp->name)); - continue; - } + + if ((domain_state = (struct getent_state *) + malloc(sizeof(struct getent_state))) == NULL) + return WINBINDD_ERROR; + + ZERO_STRUCTP(domain_state); + + fstrcpy(domain_state->domain_name, domain->name); /* Add to list of open domains */ @@ -480,93 +397,62 @@ static BOOL get_sam_group_entries(struct getent_state *ent) { NTSTATUS status; uint32 num_entries; - struct acct_info *name_list = NULL, *tnl; + struct acct_info *name_list = NULL; TALLOC_CTX *mem_ctx; BOOL result = False; + struct acct_info *sam_grp_entries = NULL; + struct winbindd_domain *domain; - if (ent->got_all_sam_entries) + if (ent->got_sam_entries) return False; -#if 0 - if (winbindd_fetch_group_cache(ent->domain, - &ent->sam_entries, - &ent->num_sam_entries)) - return True; -#endif - - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("get_sam_group_entries(%s)", + ent->domain_name))) return False; /* Free any existing group info */ SAFE_FREE(ent->sam_entries); ent->num_sam_entries = 0; - - /* Enumerate domain groups */ - - do { - struct acct_info *sam_grp_entries = NULL; - CLI_POLICY_HND *hnd; - - num_entries = 0; + ent->got_sam_entries = True; - if (!(hnd = cm_get_sam_handle(ent->domain->name))) - break; - - status = cli_samr_enum_dom_groups( - hnd->cli, mem_ctx, &ent->dom_pol, - &ent->grp_query_start_ndx, - 0x8000, /* buffer size? */ - (struct acct_info **) &sam_grp_entries, &num_entries); - - /* Copy entries into return buffer */ - - if (num_entries) { - - tnl = Realloc(name_list, - sizeof(struct acct_info) * - (ent->num_sam_entries + - num_entries)); + /* Enumerate domain groups */ - if (tnl == NULL) { - DEBUG(0,("get_sam_group_entries: unable to " - "realloc a structure!\n")); - SAFE_FREE(name_list); + num_entries = 0; - goto done; - } else - name_list = tnl; + if (!(domain = find_domain_from_name(ent->domain_name))) { + DEBUG(3, ("no such domain %s in get_sam_group_entries\n", ent->domain_name)); + goto done; + } - memcpy(&name_list[ent->num_sam_entries], - sam_grp_entries, - num_entries * sizeof(struct acct_info)); - } + status = domain->methods->enum_dom_groups(domain, + mem_ctx, + &num_entries, + &sam_grp_entries); + + if (!NT_STATUS_IS_OK(status)) { + result = False; + goto done; + } - ent->num_sam_entries += num_entries; - - if (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES)) - break; + /* Copy entries into return buffer */ - } while (ent->num_sam_entries < MAX_FETCH_SAM_ENTRIES); + if (num_entries) { + name_list = malloc(sizeof(struct acct_info) * num_entries); + memcpy(name_list, sam_grp_entries, + num_entries * sizeof(struct acct_info)); + } + + ent->num_sam_entries = num_entries; -#if 0 - /* Fill cache with received entries */ - - winbindd_store_group_cache(ent->domain, ent->sam_entries, - ent->num_sam_entries); -#endif - /* Fill in remaining fields */ ent->sam_entries = name_list; ent->sam_entry_index = 0; - ent->got_all_sam_entries = (NT_STATUS_V(status) != - NT_STATUS_V(STATUS_MORE_ENTRIES)); result = (ent->num_sam_entries > 0); done: - talloc_destroy(mem_ctx); return result; @@ -617,7 +503,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) tryagain: - DEBUG(10, ("getgrent(): entry_index = %d, num_entries = %d\n", + DEBUG(10, ("entry_index = %d, num_entries = %d\n", ent->sam_entry_index, ent->num_sam_entries)); if (ent->num_sam_entries == ent->sam_entry_index) { @@ -625,8 +511,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) while(ent && !get_sam_group_entries(ent)) { struct getent_state *next_ent; - DEBUG(10, ("getgrent(): freeing state info for " - "domain %s\n", ent->domain->name)); + DEBUG(10, ("freeing state info for domain %s\n", ent->domain_name)); /* Free state information for this domain */ @@ -650,37 +535,46 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) /* Lookup group info */ if (!winbindd_idmap_get_gid_from_rid( - ent->domain->name, + ent->domain_name, name_list[ent->sam_entry_index].rid, &group_gid)) { - DEBUG(1, ("getgrent(): could not look up gid for group %s\n", + DEBUG(1, ("could not look up gid for group %s\n", name_list[ent->sam_entry_index].acct_name)); ent->sam_entry_index++; goto tryagain; } - DEBUG(10, ("getgrent(): got gid %d for group %x\n", group_gid, + DEBUG(10, ("got gid %d for group %x\n", group_gid, name_list[ent->sam_entry_index].rid)); /* Fill in group entry */ - slprintf(domain_group_name, sizeof(domain_group_name) - 1, - "%s%s%s", ent->domain->name, lp_winbind_separator(), + fill_domain_username(domain_group_name, ent->domain_name, name_list[ent->sam_entry_index].acct_name); - + result = fill_grent(&group_list[group_list_ndx], - domain_group_name, group_gid); + ent->domain_name, + name_list[ent->sam_entry_index].acct_name, + group_gid); /* Fill in group membership entry */ if (result) { + struct winbindd_domain *domain; - /* Get group membership */ + if (!(domain = + find_domain_from_name(ent->domain_name))) { + DEBUG(3, ("No such domain %s in winbindd_getgrent\n", ent->domain_name)); + result = False; + goto done; + } + /* Get group membership */ + result = fill_grent_mem( - ent->domain, + domain, name_list[ent->sam_entry_index].rid, SID_NAME_DOM_GRP, &group_list[group_list_ndx].num_gr_mem, @@ -689,19 +583,18 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) if (result) { /* Append to group membership list */ - new_gr_mem_list = Realloc( gr_mem_list, gr_mem_list_len + gr_mem_len); if (!new_gr_mem_list && (group_list[group_list_ndx].num_gr_mem != 0)) { - DEBUG(0, ("getgrent(): out of memory\n")); + DEBUG(0, ("out of memory\n")); SAFE_FREE(gr_mem_list); gr_mem_list_len = 0; break; } - DEBUG(10, ("getgrent(): list_len = %d, mem_len = %d\n", + DEBUG(10, ("list_len = %d, mem_len = %d\n", gr_mem_list_len, gr_mem_len)); gr_mem_list = new_gr_mem_list; @@ -723,7 +616,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) if (result) { - DEBUG(10, ("getgrent(): adding group num_entries = %d\n", + DEBUG(10, ("adding group num_entries = %d\n", state->response.data.num_entries)); group_list_ndx++; @@ -766,7 +659,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) state->response.length += gr_mem_list_len; - DEBUG(10, ("getgrent(): returning %d groups, length = %d\n", + DEBUG(10, ("returning %d groups, length = %d\n", group_list_ndx, gr_mem_list_len)); /* Out of domains */ @@ -781,127 +674,70 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state) { uint32 total_entries = 0; - uint32 num_domain_entries; struct winbindd_domain *domain; - struct getent_state *groups; char *extra_data = NULL; char *ted = NULL; int extra_data_len = 0, i; - void *sam_entries = NULL; DEBUG(3, ("[%5d]: list groups\n", state->pid)); /* Enumerate over trusted domains */ - ZERO_STRUCT(groups); + for (domain = domain_list(); domain; domain = domain->next) { + struct getent_state groups; - if (domain_list == NULL) - get_domain_info(); - - for (domain = domain_list; domain; domain = domain->next) { + ZERO_STRUCT(groups); /* Skip domains other than WINBINDD_DOMAIN environment variable */ - if ((strcmp(state->request.domain, "") != 0) && !check_domain_env(state->request.domain, domain->name)) continue; /* Get list of sam groups */ + ZERO_STRUCT(groups); + fstrcpy(groups.domain_name, domain->name); - if ((groups = create_getent_state(domain)) == NULL) - continue; - - /* - * iterate through all groups - * total_entries: maintains a total count over **all domains** - * num_domain_entries: is the running count for this domain - */ - - num_domain_entries = 0; - - while (get_sam_group_entries(groups)) { - int new_size; - int offset; + get_sam_group_entries(&groups); - offset = sizeof(struct acct_info) * num_domain_entries; - new_size = sizeof(struct acct_info) - * (groups->num_sam_entries + num_domain_entries); - sam_entries = Realloc(sam_entries, new_size); - - if (!sam_entries) { - free_getent_state(groups); - return WINBINDD_ERROR; - } - num_domain_entries += groups->num_sam_entries; - memcpy (((char *)sam_entries)+offset, - groups->sam_entries, - sizeof(struct acct_info) * - groups->num_sam_entries); - - SAFE_FREE(groups->sam_entries); - groups->num_sam_entries = 0; - } - - /* skip remainder of loop if we idn;t retrieve any groups */ - - if (num_domain_entries == 0) + if (groups.num_sam_entries == 0) { + /* this domain is empty or in an error state */ continue; - - /* setup the groups struct to contain all the groups - retrieved for this domain */ - - groups->num_sam_entries = num_domain_entries; - groups->sam_entries = sam_entries; - - sam_entries = NULL; + } /* keep track the of the total number of groups seen so far over all domains */ - - total_entries += groups->num_sam_entries; + total_entries += groups.num_sam_entries; /* Allocate some memory for extra data. Note that we limit - account names to sizeof(fstring) = 128 characters. */ - + account names to sizeof(fstring) = 128 characters. */ ted = Realloc(extra_data, sizeof(fstring) * total_entries); if (!ted) { - DEBUG(0,("winbindd_list_groups: failed to enlarge " - "buffer!\n")); + DEBUG(0,("failed to enlarge buffer!\n")); SAFE_FREE(extra_data); - free_getent_state(groups); return WINBINDD_ERROR; } else extra_data = ted; /* Pack group list into extra data fields */ - - for (i = 0; i < groups->num_sam_entries; i++) { + for (i = 0; i < groups.num_sam_entries; i++) { char *group_name = ((struct acct_info *) - groups->sam_entries)[i].acct_name; + groups.sam_entries)[i].acct_name; fstring name; - /* Convert unistring to ascii */ - - snprintf(name, sizeof(name), "%s%s%s", domain->name, - lp_winbind_separator(), group_name); - - /* Append to extra data */ - + fill_domain_username(name, domain->name, group_name); + /* Append to extra data */ memcpy(&extra_data[extra_data_len], name, strlen(name)); - extra_data_len += strlen(name); - extra_data[extra_data_len++] = ','; } - free_getent_state(groups); + free(groups.sam_entries); } /* Assign extra_data fields in response structure */ - if (extra_data) { extra_data[extra_data_len - 1] = '\0'; state->response.extra_data = extra_data; @@ -919,11 +755,12 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state) enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) { - fstring name_domain, name_user, name; + fstring name_domain, name_user; DOM_SID user_sid; enum SID_NAME_USE name_type; uint32 user_rid, num_groups, num_gids; - DOM_GID *user_groups = NULL; + NTSTATUS status; + uint32 *user_gids; struct winbindd_domain *domain; enum winbindd_result result = WINBINDD_ERROR; gid_t *gid_list; @@ -933,7 +770,8 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: getgroups %s\n", state->pid, state->request.data.username)); - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("winbindd_getgroups(%s)", + state->request.data.username))) return WINBINDD_ERROR; /* Parse domain and username */ @@ -950,44 +788,40 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) goto done; } - slprintf(name, sizeof(name) - 1, "%s\\%s", name_domain, name_user); - /* Get rid and name type from name. The following costs 1 packet */ - if (!winbindd_lookup_sid_by_name(name, &user_sid, &name_type)) { + if (!winbindd_lookup_sid_by_name(domain, name_user, &user_sid, + &name_type)) { DEBUG(1, ("user '%s' does not exist\n", name_user)); goto done; } if (name_type != SID_NAME_USER) { - DEBUG(1, ("name '%s' is not a user name: %d\n", name_user, - name_type)); + DEBUG(1, ("name '%s' is not a user name: %d\n", + name_user, name_type)); goto done; } sid_split_rid(&user_sid, &user_rid); - if (!winbindd_lookup_usergroups(domain, mem_ctx, user_rid, - &num_groups, &user_groups)) - goto done; + status = domain->methods->lookup_usergroups(domain, mem_ctx, user_rid, &num_groups, &user_gids); + if (!NT_STATUS_IS_OK(status)) goto done; /* Copy data back to client */ num_gids = 0; gid_list = malloc(sizeof(gid_t) * num_groups); - if (gid_list == NULL) - goto done; if (state->response.extra_data) goto done; for (i = 0; i < num_groups; i++) { - if (!winbindd_idmap_get_gid_from_rid( - domain->name, user_groups[i].g_rid, - &gid_list[num_gids])) { + if (!winbindd_idmap_get_gid_from_rid(domain->name, + user_gids[i], + &gid_list[num_gids])) { DEBUG(1, ("unable to convert group rid %d to gid\n", - user_groups[i].g_rid)); + user_gids[i])); continue; } diff --git a/source/nsswitch/winbindd_idmap.c b/source/nsswitch/winbindd_idmap.c index 06d442c5655..897d93b0f02 100644 --- a/source/nsswitch/winbindd_idmap.c +++ b/source/nsswitch/winbindd_idmap.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon - user related function @@ -28,6 +27,9 @@ #define HWM_GROUP "GROUP HWM" #define HWM_USER "USER HWM" +/* idmap version determines auto-conversion */ +#define IDMAP_VERSION 2 + /* Globals */ static TDB_CONTEXT *idmap_tdb; @@ -40,7 +42,7 @@ static BOOL allocate_id(uid_t *id, BOOL isgroup) /* Get current high water mark */ - if ((hwm = tdb_fetch_int(idmap_tdb, + if ((hwm = tdb_fetch_int32(idmap_tdb, isgroup ? HWM_GROUP : HWM_USER)) == -1) { return False; } @@ -61,23 +63,20 @@ static BOOL allocate_id(uid_t *id, BOOL isgroup) /* Store new high water mark */ - tdb_store_int(idmap_tdb, isgroup ? HWM_GROUP : HWM_USER, hwm); + tdb_store_int32(idmap_tdb, isgroup ? HWM_GROUP : HWM_USER, hwm); return True; } /* Get an id from a rid */ - -static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id, - BOOL isgroup) +static BOOL get_id_from_sid(DOM_SID *sid, uid_t *id, BOOL isgroup) { TDB_DATA data, key; fstring keystr; BOOL result = False; - /* Check if rid is present in database */ - - slprintf(keystr, sizeof(keystr), "%s/%d", domain_name, rid); + /* Check if sid is present in database */ + sid_to_string(keystr, sid); key.dptr = keystr; key.dsize = strlen(keystr) + 1; @@ -89,34 +88,29 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id, int the_id; /* Parse and return existing uid */ - fstrcpy(scanstr, isgroup ? "GID" : "UID"); fstrcat(scanstr, " %d"); if (sscanf(data.dptr, scanstr, &the_id) == 1) { - /* Store uid */ - if (id) { - *id = the_id; + *id = the_id; } result = True; } SAFE_FREE(data.dptr); - } else { - /* Allocate a new id for this rid */ + /* Allocate a new id for this sid */ if (id && allocate_id(id, isgroup)) { fstring keystr2; /* Store new id */ - slprintf(keystr2, sizeof(keystr2), "%s %d", isgroup ? "GID" : - "UID", *id); + slprintf(keystr2, sizeof(keystr2), "%s %d", isgroup ? "GID" : "UID", *id); data.dptr = keystr2; data.dsize = strlen(keystr2) + 1; @@ -131,24 +125,52 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id, return result; } -/* Get a uid from a user rid */ +/* Get a uid from a user sid */ +BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid) +{ + return get_id_from_sid(sid, uid, False); +} -BOOL winbindd_idmap_get_uid_from_rid(char *domain_name, uint32 user_rid, - uid_t *uid) +/* Get a gid from a group sid */ +BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid) { - return get_id_from_rid(domain_name, user_rid, uid, False); + return get_id_from_sid(sid, gid, True); } -/* Get a gid from a group rid */ +/* Get a uid from a user rid */ +BOOL winbindd_idmap_get_uid_from_rid(const char *dom_name, uint32 rid, uid_t *uid) +{ + struct winbindd_domain *domain; + DOM_SID sid; + + if (!(domain = find_domain_from_name(dom_name))) { + return False; + } -BOOL winbindd_idmap_get_gid_from_rid(char *domain_name, uint32 group_rid, - gid_t *gid) + sid_copy(&sid, &domain->sid); + sid_append_rid(&sid, rid); + + return get_id_from_sid(&sid, uid, False); +} + +/* Get a gid from a group rid */ +BOOL winbindd_idmap_get_gid_from_rid(const char *dom_name, uint32 rid, gid_t *gid) { - return get_id_from_rid(domain_name, group_rid, gid, True); + struct winbindd_domain *domain; + DOM_SID sid; + + if (!(domain = find_domain_from_name(dom_name))) { + return False; + } + + sid_copy(&sid, &domain->sid); + sid_append_rid(&sid, rid); + + return get_id_from_sid(&sid, gid, True); } -BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain, - BOOL isgroup) + +BOOL get_sid_from_id(int id, DOM_SID *sid, BOOL isgroup) { TDB_DATA key, data; fstring keystr; @@ -162,43 +184,41 @@ BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain, data = tdb_fetch(idmap_tdb, key); if (data.dptr) { - char *p = data.dptr; - fstring domain_name; - uint32 the_rid; - - if (next_token(&p, domain_name, "/", sizeof(fstring))) { - - the_rid = atoi(p); - - if (rid) { - *rid = the_rid; - } - - if (domain) { - *domain = find_domain_from_name(domain_name); - if (*domain == NULL) { - DEBUG(1, ("unknown domain %s for rid %d\n", - domain_name, the_rid)); - result = False; - goto done; - } - } - - result = True; - } - done: - SAFE_FREE(data.dptr); + result = string_to_sid(sid, data.dptr); + SAFE_FREE(data.dptr); } return result; } -/* Get a user rid from a uid */ +/* Get a sid from a uid */ +BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid) +{ + return get_sid_from_id((int)uid, sid, False); +} +/* Get a sid from a gid */ +BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid) +{ + return get_sid_from_id((int)gid, sid, True); +} + +/* Get a user rid from a uid */ BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, struct winbindd_domain **domain) { - return get_rid_from_id((int)uid, user_rid, domain, False); + DOM_SID sid; + + if (!get_sid_from_id((int)uid, &sid, False)) { + return False; + } + + *domain = find_domain_from_sid(&sid); + if (! *domain) return False; + + sid_split_rid(&sid, user_rid); + + return True; } /* Get a group rid from a gid */ @@ -206,9 +226,119 @@ BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, struct winbindd_domain **domain) { - return get_rid_from_id((int)gid, group_rid, domain, True); + DOM_SID sid; + + if (!get_sid_from_id((int)gid, &sid, True)) { + return False; + } + + *domain = find_domain_from_sid(&sid); + if (! *domain) return False; + + sid_split_rid(&sid, group_rid); + + return True; } +/* convert one record to the new format */ +static int convert_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, void *ignored) +{ + struct winbindd_domain *domain; + char *p, *dom_name; + DOM_SID sid; + uint32 rid; + fstring keystr; + TDB_DATA key2; + + p = strchr(key.dptr, '/'); + if (!p) return 0; + + *p++ = 0; + dom_name = key.dptr; + + domain = find_domain_from_name(dom_name); + if (!domain) { + /* what do we do about this?? */ + DEBUG(0,("winbindd: convert_fn : Unable to find domain %s\n", dom_name )); + DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n")); + return -1; + } + + rid = atoi(p); + + sid_copy(&sid, &domain->sid); + sid_append_rid(&sid, rid); + + sid_to_string(keystr, &sid); + key2.dptr = keystr; + key2.dsize = strlen(keystr) + 1; + + if (tdb_store(idmap_tdb, key2, data, TDB_INSERT) != 0) { + /* not good! */ + DEBUG(0,("winbindd: convert_fn : Unable to update record %s\n", key2.dptr )); + DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n")); + return -1; + } + + if (tdb_store(idmap_tdb, data, key2, TDB_REPLACE) != 0) { + /* not good! */ + DEBUG(0,("winbindd: convert_fn : Unable to update record %s\n", data.dptr )); + DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n")); + return -1; + } + + tdb_delete(idmap_tdb, key); + + return 0; +} + +/* convert the idmap database from an older version */ +static BOOL idmap_convert(void) +{ + int32 vers = tdb_fetch_int32(idmap_tdb, "IDMAP_VERSION"); + + if (vers == IDMAP_VERSION) + return True; + + if (IREV(vers) == IDMAP_VERSION) { + /* Arrggghh ! Bytereversed - make order independent ! */ + int32 wm; + + wm = tdb_fetch_int32(idmap_tdb, HWM_USER); + + if (wm != -1) + wm = IREV(wm); + else + wm = server_state.uid_low; + + if (tdb_store_int32(idmap_tdb, HWM_USER, server_state.uid_low) == -1) { + DEBUG(0, ("idmap_convert: Unable to byteswap user hwm in idmap database\n")); + return False; + } + + wm = tdb_fetch_int32(idmap_tdb, HWM_GROUP); + if (wm != -1) + wm = IREV(wm); + else + wm = server_state.gid_low; + if (tdb_store_int32(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) { + DEBUG(0, ("idmap_convert: Unable to byteswap group hwm in idmap database\n")); + return False; + } + } + + /* the old format stored as DOMAIN/rid - now we store the SID direct */ + tdb_traverse(idmap_tdb, convert_fn, NULL); + + if (tdb_store_int32(idmap_tdb, "IDMAP_VERSION", IDMAP_VERSION) == -1) { + DEBUG(0, ("idmap_convert: Unable to byteswap group hwm in idmap database\n")); + return False; + } + + return True; +} + + /* Initialise idmap database */ BOOL winbindd_idmap_init(void) @@ -216,23 +346,28 @@ BOOL winbindd_idmap_init(void) /* Open tdb cache */ if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0, - TDB_NOLOCK, O_RDWR | O_CREAT, 0600))) { + TDB_DEFAULT, O_RDWR | O_CREAT, 0600))) { DEBUG(0, ("Unable to open idmap database\n")); return False; } + /* possibly convert from an earlier version */ + if (!idmap_convert()) { + return False; + } + /* Create high water marks for group and user id */ - if (tdb_fetch_int(idmap_tdb, HWM_USER) == -1) { - if (tdb_store_int(idmap_tdb, HWM_USER, server_state.uid_low) == -1) { - DEBUG(0, ("Unable to initialise user hwm in idmap database\n")); + if (tdb_fetch_int32(idmap_tdb, HWM_USER) == -1) { + if (tdb_store_int32(idmap_tdb, HWM_USER, server_state.uid_low) == -1) { + DEBUG(0, ("winbindd_idmap_init: Unable to initialise user hwm in idmap database\n")); return False; } } - if (tdb_fetch_int(idmap_tdb, HWM_GROUP) == -1) { - if (tdb_store_int(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) { - DEBUG(0, ("Unable to initialise group hwm in idmap database\n")); + if (tdb_fetch_int32(idmap_tdb, HWM_GROUP) == -1) { + if (tdb_store_int32(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) { + DEBUG(0, ("winbindd_idmap_init: Unable to initialise group hwm in idmap database\n")); return False; } } @@ -266,11 +401,11 @@ void winbindd_idmap_status(void) /* Get current high water marks */ - if ((user_hwm = tdb_fetch_int(idmap_tdb, HWM_USER)) == -1) { + if ((user_hwm = tdb_fetch_int32(idmap_tdb, HWM_USER)) == -1) { DEBUG(DUMP_INFO, ("\tCould not get userid high water mark!\n")); } - if ((group_hwm = tdb_fetch_int(idmap_tdb, HWM_GROUP)) == -1) { + if ((group_hwm = tdb_fetch_int32(idmap_tdb, HWM_GROUP)) == -1) { DEBUG(DUMP_INFO, ("\tCould not get groupid high water mark!\n")); } diff --git a/source/nsswitch/winbindd_misc.c b/source/nsswitch/winbindd_misc.c index 2718a753856..5678bdaa5af 100644 --- a/source/nsswitch/winbindd_misc.c +++ b/source/nsswitch/winbindd_misc.c @@ -1,10 +1,10 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon - miscellaneous other functions - Copyright (C) Tim Potter 2000 + Copyright (C) Tim Potter 2000 + Copyright (C) Andrew Bartlett 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,18 +31,9 @@ extern pstring global_myname; static BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd, time_t *pass_last_set_time) { - struct machine_acct_pass *pass; - size_t size; - - if (!(pass = secrets_fetch(trust_keystr(domain), &size)) || - size != sizeof(*pass)) + if (!secrets_fetch_trust_account_password(domain, ret_pwd, pass_last_set_time)) { return False; - - if (pass_last_set_time) - *pass_last_set_time = pass->mod_time; - - memcpy(ret_pwd, pass->hash, 16); - SAFE_FREE(pass); + } return True; } @@ -69,6 +60,7 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat /* This call does a cli_nt_setup_creds() which implicitly checks the trust account password. */ + /* Don't shut this down - it belongs to the connection cache code */ result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); if (!NT_STATUS_IS_OK(result)) { @@ -76,12 +68,10 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat goto done; } - cli_shutdown(cli); - /* There is a race condition between fetching the trust account - password and joining the domain so it's possible that the trust - account password has been changed on us. We are returned - NT_STATUS_ACCESS_DENIED if this happens. */ + password and the periodic machine password change. So it's + possible that the trust account password has been changed on us. + We are returned NT_STATUS_ACCESS_DENIED if this happens. */ #define MAX_RETRIES 8 @@ -112,10 +102,13 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state DEBUG(3, ("[%5d]: list trusted domains\n", state->pid)); - if (domain_list == NULL) - get_domain_info(); + /* We need to refresh the trusted domain list as the domains may + have changed since we last looked. There may be a sequence + number or something we should use but I haven't found it yet. */ + + init_domain_list(); - for(domain = domain_list; domain; domain = domain->next) { + for(domain = domain_list(); domain; domain = domain->next) { /* Skip own domain */ @@ -150,3 +143,82 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state return WINBINDD_OK; } + + +enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state) +{ + struct winbindd_domain *domain; + char *extra_data = NULL; + + DEBUG(3, ("[%5d]: show sequence\n", state->pid)); + + extra_data = strdup(""); + + /* this makes for a very simple data format, and is easily parsable as well + if that is ever needed */ + for (domain = domain_list(); domain; domain = domain->next) { + char *s; + + domain->methods->sequence_number(domain, &domain->sequence_number); + + if (DOM_SEQUENCE_NONE == (unsigned)domain->sequence_number) { + asprintf(&s,"%s%s : DISCONNECTED\n", extra_data, + domain->name); + } else { + asprintf(&s,"%s%s : %u\n", extra_data, + domain->name, (unsigned)domain->sequence_number); + } + free(extra_data); + extra_data = s; + } + + state->response.extra_data = extra_data; + state->response.length += strlen(extra_data); + + return WINBINDD_OK; +} + +enum winbindd_result winbindd_ping(struct winbindd_cli_state + *state) +{ + DEBUG(3, ("[%5d]: ping\n", state->pid)); + + return WINBINDD_OK; +} + +/* List various tidbits of information */ + +enum winbindd_result winbindd_info(struct winbindd_cli_state *state) +{ + + DEBUG(3, ("[%5d]: request misc info\n", state->pid)); + + state->response.data.info.winbind_separator = *lp_winbind_separator(); + fstrcpy(state->response.data.info.samba_version, VERSION); + + return WINBINDD_OK; +} + +/* Tell the client the current interface version */ + +enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state) +{ + + DEBUG(3, ("[%5d]: request interface version\n", state->pid)); + + state->response.data.interface_version = WINBIND_INTERFACE_VERSION; + + return WINBINDD_OK; +} + +/* What domain are we a member of? */ + +enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state) +{ + + DEBUG(3, ("[%5d]: request domain name\n", state->pid)); + + fstrcpy(state->response.data.domain_name, lp_workgroup()); + + return WINBINDD_OK; +} diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbindd_nss.h index 255a14e3d62..476dc71ab2d 100644 --- a/source/nsswitch/winbindd_nss.h +++ b/source/nsswitch/winbindd_nss.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -23,7 +22,7 @@ */ #ifndef SAFE_FREE -#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) +#define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0) #endif #ifndef _WINBINDD_NTDOM_H @@ -35,16 +34,22 @@ #define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */ #define WINBINDD_DONT_ENV "_NO_WINBINDD" +/* Update this when you change the interface. */ + +#define WINBIND_INTERFACE_VERSION 4 + /* Socket commands */ enum winbindd_cmd { + WINBINDD_INTERFACE_VERSION, /* Always a well known value */ + /* Get users and groups */ - WINBINDD_GETPWNAM_FROM_USER, - WINBINDD_GETPWNAM_FROM_UID, - WINBINDD_GETGRNAM_FROM_GROUP, - WINBINDD_GETGRNAM_FROM_GID, + WINBINDD_GETPWNAM, + WINBINDD_GETPWUID, + WINBINDD_GETGRNAM, + WINBINDD_GETGRGID, WINBINDD_GETGROUPS, /* Enumerate users and groups */ @@ -83,11 +88,11 @@ enum winbindd_cmd { /* Miscellaneous other stuff */ WINBINDD_CHECK_MACHACC, /* Check machine account pw works */ + WINBINDD_PING, /* Just tell me winbind is running */ + WINBINDD_INFO, /* Various bit of info. Currently just tidbits */ + WINBINDD_DOMAIN_NAME, /* The domain this winbind server is a member of (lp_workgroup()) */ - /* WINS commands */ - - WINBINDD_WINS_BYIP, - WINBINDD_WINS_BYNAME, + WINBINDD_SHOW_SEQUENCE, /* display sequence numbers of domains */ /* Placeholder for end of cmd list */ @@ -97,6 +102,7 @@ enum winbindd_cmd { /* Winbind request structure */ struct winbindd_request { + uint32 length; enum winbindd_cmd cmd; /* Winbindd command to execute */ pid_t pid; /* pid of calling process */ @@ -112,6 +118,7 @@ struct winbindd_request { struct { unsigned char chal[8]; fstring user; + fstring domain; fstring lm_resp; uint16 lm_resp_len; fstring nt_resp; @@ -123,7 +130,10 @@ struct winbindd_request { fstring newpass; } chauthtok; /* pam_winbind passwd module */ fstring sid; /* lookupsid, sid_to_[ug]id */ - fstring name; /* lookupname */ + struct { + fstring dom_name; /* lookupname */ + fstring name; + } name; uint32 num_entries; /* getpwent, getgrent */ } data; fstring domain; /* {set,get,end}{pw,gr}ent() */ @@ -142,12 +152,13 @@ struct winbindd_response { /* Header information */ - int length; /* Length of response */ + uint32 length; /* Length of response */ enum winbindd_result result; /* Result code */ /* Fixed length return data */ union { + int interface_version; /* Try to ensure this is always in the same spot... */ /* getpwnam, getpwuid */ @@ -177,11 +188,24 @@ struct winbindd_response { int type; } sid; struct winbindd_name { - fstring name; /* lookupsid */ + fstring dom_name; /* lookupsid */ + fstring name; int type; } name; uid_t uid; /* sid_to_uid */ gid_t gid; /* sid_to_gid */ + struct winbindd_info { + char winbind_separator; + fstring samba_version; + } info; + fstring domain_name; + + struct auth_reply { + uint32 nt_status; + fstring nt_status_string; + fstring error_string; + int pam_error; + } auth; } data; /* Variable length return data */ diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index 2b6a79694d2..b197bf62e89 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -1,10 +1,11 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. - Winbind daemon - pam auuth funcions + Winbind daemon - pam auth funcions Copyright (C) Andrew Tridgell 2000 + Copyright (C) Tim Potter 2001 + Copyright (C) Andrew Bartlett 2001-2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,99 +24,167 @@ #include "winbindd.h" -/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the - form DOMAIN\user into a domain and a user */ - -static BOOL wb_parse_domain_user(char *domuser, fstring domain, fstring user) -{ - char *p; - char *sep = lp_winbind_separator(); - - p = strchr(domuser,*sep); - - if (!p) - return False; - - fstrcpy(user, p+1); - fstrcpy(domain, domuser); - domain[PTR_DIFF(p, domuser)] = 0; - strupper(domain); - return True; -} - -/* Return a password structure from a username. Specify whether cached data - can be returned. */ +/* Return a password structure from a username. */ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) { - BOOL result, user_exists; + NTSTATUS result; fstring name_domain, name_user; int passlen; + unsigned char trust_passwd[16]; + time_t last_change_time; + uint32 smb_uid_low; + NET_USER_INFO_3 info3; + struct cli_state *cli = NULL; + uchar chal[8]; + TALLOC_CTX *mem_ctx = NULL; + DATA_BLOB lm_resp; + DATA_BLOB nt_resp; + + extern pstring global_myname; DEBUG(3, ("[%5d]: pam auth %s\n", state->pid, state->request.data.auth.user)); - /* Parse domain and username */ + if (!(mem_ctx = talloc_init_named("winbind pam auth for %s", state->request.data.auth.user))) { + DEBUG(0, ("winbindd_pam_auth: could not talloc_init()!\n")); + result = NT_STATUS_NO_MEMORY; + goto done; + } - if (!wb_parse_domain_user(state->request.data.auth.user, name_domain, - name_user)) - return WINBINDD_ERROR; + /* Parse domain and username */ + + if (!parse_domain_user(state->request.data.auth.user, name_domain, + name_user)) { + DEBUG(5,("no domain seperator (%s) in username (%s) - failing auth\n", lp_winbind_separator(), state->request.data.auth.user)); + result = NT_STATUS_INVALID_PARAMETER; + goto done; + } passlen = strlen(state->request.data.auth.pass); + + { + unsigned char local_lm_response[24]; + unsigned char local_nt_response[24]; + + generate_random_buffer(chal, 8, False); + SMBencrypt( (const uchar *)state->request.data.auth.pass, chal, local_lm_response); + + SMBNTencrypt((const uchar *)state->request.data.auth.pass, chal, local_nt_response); + + lm_resp = data_blob_talloc(mem_ctx, local_lm_response, sizeof(local_lm_response)); + nt_resp = data_blob_talloc(mem_ctx, local_nt_response, sizeof(local_nt_response)); + } + + /* + * Get the machine account password for our primary domain + */ + + if (!secrets_fetch_trust_account_password( + lp_workgroup(), trust_passwd, &last_change_time)) { + DEBUG(0, ("winbindd_pam_auth: could not fetch trust account " + "password for domain %s\n", lp_workgroup())); + result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO; + goto done; + } - /* So domain_client_validate() actually opens a new connection - for each authentication performed. This can theoretically - be optimised to use an already open IPC$ connection. */ + /* We really don't care what LUID we give the user. */ - result = domain_client_validate(name_user, name_domain, - state->request.data.auth.pass, - passlen, - state->request.data.auth.pass, - passlen, &user_exists, NULL); + generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False); - return result ? WINBINDD_OK : WINBINDD_ERROR; -} + ZERO_STRUCT(info3); + + /* Don't shut this down - it belongs to the connection cache code */ + result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); + + if (!NT_STATUS_IS_OK(result)) { + DEBUG(3, ("could not open handle to NETLOGON pipe\n")); + goto done; + } + result = cli_netlogon_sam_network_logon(cli, mem_ctx, + name_user, name_domain, + global_myname, chal, + lm_resp, nt_resp, + &info3); + +done: + + state->response.data.auth.nt_status = NT_STATUS_V(result); + fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); + fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + state->response.data.auth.pam_error = nt_status_to_pam(result); + + DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authenticaion for user %s returned %s (PAM: %d)\n", + state->request.data.auth.user, + state->response.data.auth.nt_status_string, + state->response.data.auth.pam_error)); + + if (mem_ctx) + talloc_destroy(mem_ctx); + + return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; +} + /* Challenge Response Authentication Protocol */ -#if ALLOW_WINBIND_AUTH_CRAP enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) { NTSTATUS result; - fstring name_domain, name_user; unsigned char trust_passwd[16]; time_t last_change_time; - uint32 smb_uid_low; NET_USER_INFO_3 info3; - NET_ID_INFO_CTR ctr; - struct cli_state *cli; + struct cli_state *cli = NULL; + TALLOC_CTX *mem_ctx = NULL; + const char *domain = NULL; - DEBUG(3, ("[%5d]: pam auth crap %s\n", state->pid, - state->request.data.auth_crap.user)); + DATA_BLOB lm_resp, nt_resp; - /* Parse domain and username */ + extern pstring global_myname; - if (!wb_parse_domain_user(state->request.data.auth_crap.user, name_domain, - name_user)) - return WINBINDD_ERROR; + DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid, + state->request.data.auth_crap.domain, state->request.data.auth_crap.user)); + if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth.user))) { + DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n")); + result = NT_STATUS_NO_MEMORY; + goto done; + } + + if (*state->request.data.auth_crap.domain) { + domain = talloc_strdup(mem_ctx, state->request.data.auth_crap.domain); + } else if (lp_winbind_use_default_domain()) { + domain = talloc_strdup(mem_ctx, lp_workgroup()); + } else { + DEBUG(5,("no domain specified with username (%s) - failing auth\n", state->request.data.auth.user)); + result = NT_STATUS_INVALID_PARAMETER; + goto done; + } + + if (!domain) { + DEBUG(0,("winbindd_pam_auth_crap: talloc_strdup failed!\n")); + result = NT_STATUS_NO_MEMORY; + goto done; + } + + lm_resp = data_blob_talloc(mem_ctx, state->request.data.auth_crap.lm_resp, state->request.data.auth_crap.lm_resp_len); + nt_resp = data_blob_talloc(mem_ctx, state->request.data.auth_crap.nt_resp, state->request.data.auth_crap.nt_resp_len); + /* * Get the machine account password for our primary domain */ if (!secrets_fetch_trust_account_password( lp_workgroup(), trust_passwd, &last_change_time)) { - DEBUG(0, ("winbindd_pam_auth_crap: could not fetch trust account " + DEBUG(0, ("winbindd_pam_auth: could not fetch trust account " "password for domain %s\n", lp_workgroup())); - return WINBINDD_ERROR; + result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO; + goto done; } - /* We really don't care what LUID we give the user. */ - - generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False); - ZERO_STRUCT(info3); + /* Don't shut this down - it belongs to the connection cache code */ result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); if (!NT_STATUS_IS_OK(result)) { @@ -123,27 +192,39 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) goto done; } - result = cli_nt_login_network(cli, name_domain, name_user, smb_uid_low, - state->request.data.auth_crap.chal, - state->request.data.auth_crap.lm_resp, - state->request.data.auth_crap.nt_resp, - &ctr, &info3); - - cli_shutdown(cli); - - done: + result = cli_netlogon_sam_network_logon(cli, mem_ctx, + state->request.data.auth_crap.user, domain, + global_myname, state->request.data.auth_crap.chal, + lm_resp, nt_resp, + &info3); + +done: + + state->response.data.auth.nt_status = NT_STATUS_V(result); + fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); + fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + state->response.data.auth.pam_error = nt_status_to_pam(result); + + DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n", + state->request.data.auth_crap.domain, + state->request.data.auth_crap.user, + state->response.data.auth.nt_status_string, + state->response.data.auth.pam_error)); + + if (mem_ctx) + talloc_destroy(mem_ctx); + return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } -#endif /* Change a user password */ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state) { + NTSTATUS result; char *oldpass, *newpass; fstring domain, user; - uchar nt_oldhash[16]; - uchar lm_oldhash[16]; + CLI_POLICY_HND *hnd; DEBUG(3, ("[%5d]: pam chauthtok %s\n", state->pid, state->request.data.chauthtok.user)); @@ -153,26 +234,38 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state) if (state == NULL) return WINBINDD_ERROR; - if (!wb_parse_domain_user(state->request.data.chauthtok.user, domain, user)) - return WINBINDD_ERROR; + if (!parse_domain_user(state->request.data.chauthtok.user, domain, + user)) { + result = NT_STATUS_INVALID_PARAMETER; + goto done; + } + + /* Change password */ oldpass = state->request.data.chauthtok.oldpass; newpass = state->request.data.chauthtok.newpass; - nt_lm_owf_gen(oldpass, nt_oldhash, lm_oldhash); + /* Get sam handle */ - /* Change password */ + if (!(hnd = cm_get_sam_handle(domain))) { + DEBUG(1, ("could not get SAM handle on DC for %s\n", domain)); + result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; + goto done; + } -#if 0 + if (!cli_oem_change_password(hnd->cli, user, newpass, oldpass)) { + DEBUG(1, ("password change failed for user %s/%s\n", domain, + user)); + result = NT_STATUS_WRONG_PASSWORD; + } else { + result = NT_STATUS_OK; + } - /* XXX */ +done: + state->response.data.auth.nt_status = NT_STATUS_V(result); + fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); + fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + state->response.data.auth.pam_error = nt_status_to_pam(result); - if (!msrpc_sam_ntchange_pwd(server_state.controller, domain, user, - lm_oldhash, nt_oldhash, newpass)) { - DEBUG(0, ("password change failed for user %s/%s\n", domain, user)); - return WINBINDD_ERROR; - } -#endif - - return WINBINDD_OK; + return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h index 37448bd1987..1674bef3cfd 100644 --- a/source/nsswitch/winbindd_proto.h +++ b/source/nsswitch/winbindd_proto.h @@ -3,59 +3,31 @@ /* This file is automatically generated with "make proto". DO NOT EDIT */ -/*The following definitions come from nsswitch/winbindd.c */ +/* The following definitions come from nsswitch/winbindd.c */ int main(int argc, char **argv); -/*The following definitions come from nsswitch/winbindd_cache.c */ - -void winbindd_cache_init(void); -void winbindd_store_user_cache(struct winbindd_domain *domain, - struct getpwent_user *sam_entries, - int num_sam_entries); -void winbindd_store_group_cache(struct winbindd_domain *domain, - struct acct_info *sam_entries, - int num_sam_entries); -void winbindd_store_name_cache_entry(struct winbindd_domain *domain, - char *sid, struct winbindd_name *name); -void winbindd_store_sid_cache_entry(struct winbindd_domain *domain, - char *name, struct winbindd_sid *sid); -void winbindd_store_user_cache_entry(struct winbindd_domain *domain, - char *user_name, struct winbindd_pw *pw); -void winbindd_store_uid_cache_entry(struct winbindd_domain *domain, uid_t uid, - struct winbindd_pw *pw); -void winbindd_store_group_cache_entry(struct winbindd_domain *domain, - char *group_name, struct winbindd_gr *gr, - void *extra_data, int extra_data_len); -void winbindd_store_gid_cache_entry(struct winbindd_domain *domain, gid_t gid, - struct winbindd_gr *gr, void *extra_data, - int extra_data_len); -BOOL winbindd_fetch_user_cache(struct winbindd_domain *domain, - struct getpwent_user **sam_entries, - int *num_entries); -BOOL winbindd_fetch_group_cache(struct winbindd_domain *domain, - struct acct_info **sam_entries, - int *num_entries); -BOOL winbindd_fetch_sid_cache_entry(struct winbindd_domain *domain, - char *name, struct winbindd_sid *sid); -BOOL winbindd_fetch_name_cache_entry(struct winbindd_domain *domain, - char *sid, struct winbindd_name *name); -BOOL winbindd_fetch_user_cache_entry(struct winbindd_domain *domain, - char *user, struct winbindd_pw *pw); -BOOL winbindd_fetch_uid_cache_entry(struct winbindd_domain *domain, uid_t uid, - struct winbindd_pw *pw); -BOOL winbindd_fetch_group_cache_entry(struct winbindd_domain *domain, - char *group, struct winbindd_gr *gr, - void **extra_data, int *extra_data_len); -BOOL winbindd_fetch_gid_cache_entry(struct winbindd_domain *domain, gid_t gid, - struct winbindd_gr *gr, - void **extra_data, int *extra_data_len); -void winbindd_flush_cache(void); -void winbindd_cache_status(void); - -/*The following definitions come from nsswitch/winbindd_cm.c */ - -void cm_init_creds(struct ntuser_creds *creds); +#if 0 +/* The following definitions come from nsswitch/winbindd_ads.c */ + +ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope, + const char *exp, + const char **attrs, void **res); +ADS_STATUS ads_search_retry(ADS_STRUCT *ads, void **res, + const char *exp, + const char **attrs); +ADS_STATUS ads_search_retry_dn(ADS_STRUCT *ads, void **res, + const char *dn, + const char **attrs); +#endif + +/* The following definitions come from nsswitch/winbindd_cache.c */ + +void wcache_flush_cache(void); +struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status); + +/* The following definitions come from nsswitch/winbindd_cm.c */ + CLI_POLICY_HND *cm_get_lsa_handle(char *domain); CLI_POLICY_HND *cm_get_sam_handle(char *domain); CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid); @@ -67,25 +39,25 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, struct cli_state **cli); void winbindd_cm_status(void); -/*The following definitions come from nsswitch/winbindd_group.c */ +/* The following definitions come from nsswitch/winbindd_group.c */ -enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *state); -enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state - *state); +enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state); enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state); enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state); enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state); enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state); enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state); -/*The following definitions come from nsswitch/winbindd_idmap.c */ +/* The following definitions come from nsswitch/winbindd_idmap.c */ -BOOL winbindd_idmap_get_uid_from_rid(char *domain_name, uint32 user_rid, - uid_t *uid); -BOOL winbindd_idmap_get_gid_from_rid(char *domain_name, uint32 group_rid, - gid_t *gid); -BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain, - BOOL isgroup); +BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid); +BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid); +BOOL winbindd_idmap_get_uid_from_rid(const char *dom_name, uint32 rid, uid_t *uid); +BOOL winbindd_idmap_get_gid_from_rid(const char *dom_name, uint32 rid, gid_t *gid); +BOOL get_sid_from_id(int id, DOM_SID *sid, BOOL isgroup); +BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid); +BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid); BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, struct winbindd_domain **domain); BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, @@ -94,19 +66,28 @@ BOOL winbindd_idmap_init(void); BOOL winbindd_idmap_close(void); void winbindd_idmap_status(void); -/*The following definitions come from nsswitch/winbindd_misc.c */ +/* The following definitions come from nsswitch/winbindd_misc.c */ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state); enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state *state); +enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state); +enum winbindd_result winbindd_ping(struct winbindd_cli_state + *state); +enum winbindd_result winbindd_info(struct winbindd_cli_state *state); +enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state); +enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state); -/*The following definitions come from nsswitch/winbindd_pam.c */ +/* The following definitions come from nsswitch/winbindd_pam.c */ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) ; enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ; enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state); -/*The following definitions come from nsswitch/winbindd_sid.c */ +/* The following definitions come from nsswitch/winbindd_rpc.c */ + + +/* The following definitions come from nsswitch/winbindd_sid.c */ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state); enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state); @@ -115,52 +96,32 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state); enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state); enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state); -/*The following definitions come from nsswitch/winbindd_user.c */ +/* The following definitions come from nsswitch/winbindd_user.c */ -enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *state) ; -enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) ; +enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state); enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state); enum winbindd_result winbindd_endpwent(struct winbindd_cli_state *state); enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state); enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state); -/*The following definitions come from nsswitch/winbindd_util.c */ +/* The following definitions come from nsswitch/winbindd_util.c */ -struct winbindd_domain *find_domain_from_name(char *domain_name); +struct winbindd_domain *domain_list(void); +void free_domain_list(void); +BOOL init_domain_list(void); +struct winbindd_domain *find_domain_from_name(const char *domain_name); struct winbindd_domain *find_domain_from_sid(DOM_SID *sid); -BOOL get_domain_info(void); -void free_domain_info(void); -BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain); -BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *type); +BOOL winbindd_lookup_sid_by_name(struct winbindd_domain *domain, + const char *name, DOM_SID *sid, + enum SID_NAME_USE *type); BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, + fstring dom_name, fstring name, enum SID_NAME_USE *type); -BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, uint32 user_rid, - SAM_USERINFO_CTR **user_info); -BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - uint32 user_rid, uint32 *num_groups, - DOM_GID **user_groups); -BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - uint32 group_rid, uint32 *num_names, - uint32 **rid_mem, char ***names, - uint32 **name_types); -BOOL create_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol); -void close_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol); void free_getent_state(struct getent_state *state); -struct getent_state *create_getent_state(struct winbindd_domain *domain); BOOL winbindd_param_init(void); -NTSTATUS winbindd_query_dispinfo(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, POLICY_HND *pdom_pol, - uint32 *start_ndx, uint16 info_level, - uint32 *num_entries, SAM_DISPINFO_CTR *ctr); BOOL check_domain_env(char *domain_env, char *domain); -BOOL parse_domain_user(char *domuser, fstring domain, fstring user); - -/*The following definitions come from nsswitch/winbindd_wins.c */ - -enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state); -enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state); +BOOL parse_domain_user(const char *domuser, fstring domain, fstring user); +void fill_domain_username(fstring name, const char *domain, const char *user); #endif /* _PROTO_H_ */ diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 5e766cd9eb7..bbb528a60ef 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -324,15 +324,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, int i; *num_groups = 0; - - /* First try cached universal groups from logon */ - *user_gids = uni_group_cache_fetch(&domain->sid, user_rid, mem_ctx, num_groups); - if((*num_groups > 0) && *user_gids) { - return NT_STATUS_OK; - } else { - *user_gids = NULL; - *num_groups = 0; - } + *user_gids = NULL; /* Get sam handle */ if (!(hnd = cm_get_sam_handle(domain->name))) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 3caf6fd95bf..3131e7b1964 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon - sid related functions @@ -33,6 +32,7 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) DOM_SID sid, tmp_sid; uint32 rid; fstring name; + fstring dom_name; DEBUG(3, ("[%5d]: lookupsid %s\n", state->pid, state->request.data.sid)); @@ -40,7 +40,7 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) /* Lookup sid from PDC using lsa_lookup_sids() */ if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(5, ("winbindd_lookupsid: %s not a SID!\n", state->request.data.sid)); + DEBUG(5, ("%s not a SID\n", state->request.data.sid)); return WINBINDD_ERROR; } @@ -55,12 +55,13 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) /* Lookup the sid */ - if (!winbindd_lookup_name_by_sid(&sid, name, &type)) { + if (!winbindd_lookup_name_by_sid(&sid, dom_name, name, &type)) { return WINBINDD_ERROR; } - string_sub(name, "\\", lp_winbind_separator(), sizeof(fstring)); + fstrcpy(state->response.data.name.dom_name, dom_name); fstrcpy(state->response.data.name.name, name); + state->response.data.name.type = type; return WINBINDD_OK; @@ -71,22 +72,26 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) { enum SID_NAME_USE type; - fstring sid_str, name_domain, name_user, name; + fstring sid_str; + char *name_domain, *name_user; DOM_SID sid; - - DEBUG(3, ("[%5d]: lookupname %s\n", state->pid, - state->request.data.name)); + struct winbindd_domain *domain; + DEBUG(3, ("[%5d]: lookupname [%s]\\[%s]\n", state->pid, + state->request.data.name.dom_name, state->request.data.name.name)); - if (!parse_domain_user(state->request.data.name, name_domain, - name_user)) - return WINBINDD_ERROR; + name_domain = state->request.data.name.dom_name; + name_user = state->request.data.name.name; - snprintf(name, sizeof(name), "%s\\%s", name_domain, name_user); + if ((domain = find_domain_from_name(name_domain)) == NULL) { + DEBUG(0, ("could not find domain entry for domain %s\n", + name_domain)); + return WINBINDD_ERROR; + } /* Lookup name from PDC using lsa_lookup_names() */ - - if (!winbindd_lookup_sid_by_name(name, &sid, &type)) + if (!winbindd_lookup_sid_by_name(domain, name_user, &sid, &type)) { return WINBINDD_ERROR; + } sid_to_string(sid_str, &sid); fstrcpy(state->response.data.sid.sid, sid_str); @@ -101,35 +106,19 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) { DOM_SID sid; - uint32 user_rid; - struct winbindd_domain *domain; DEBUG(3, ("[%5d]: sid to uid %s\n", state->pid, state->request.data.sid)); /* Split sid into domain sid and user rid */ - if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(5, ("winbindd_sid_to_uid: %s not a SID!\n", state->request.data.sid)); - return WINBINDD_ERROR; - } - - sid_split_rid(&sid, &user_rid); - - /* Find domain this sid belongs to */ - - if ((domain = find_domain_from_sid(&sid)) == NULL) { - fstring sid_str; - - sid_to_string(sid_str, &sid); - DEBUG(1, ("winbindd_sid_to_uid: Could not find domain for sid %s\n", sid_str)); + DEBUG(1, ("Could not get convert sid %s from string\n", + state->request.data.sid)); return WINBINDD_ERROR; } /* Find uid for this sid and return it */ - - if (!winbindd_idmap_get_uid_from_rid(domain->name, user_rid, - &state->response.data.uid)) { + if (!winbindd_idmap_get_uid_from_sid(&sid, &state->response.data.uid)) { DEBUG(1, ("Could not get uid for sid %s\n", state->request.data.sid)); return WINBINDD_ERROR; @@ -144,35 +133,18 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) { DOM_SID sid; - uint32 group_rid; - struct winbindd_domain *domain; - DEBUG(3, ("winbindd_sid_to_gid: [%5d]: sid to gid %s\n", state->pid, + DEBUG(3, ("[%5d]: sid to gid %s\n", state->pid, state->request.data.sid)); - /* Split sid into domain sid and user rid */ - if (!string_to_sid(&sid, state->request.data.sid)) { - DEBUG(5, ("winbindd_sid_to_gid: %s not a SID!\n", state->request.data.sid)); - return WINBINDD_ERROR; - } - - sid_split_rid(&sid, &group_rid); - - /* Find domain this sid belongs to */ - - if ((domain = find_domain_from_sid(&sid)) == NULL) { - fstring sid_str; - - sid_to_string(sid_str, &sid); - DEBUG(1, ("Could not find domain for sid %s\n", sid_str)); + DEBUG(1, ("Could not cvt string to sid %s\n", + state->request.data.sid)); return WINBINDD_ERROR; } - /* Find uid for this sid and return it */ - - if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, - &state->response.data.gid)) { + /* Find gid for this sid and return it */ + if (!winbindd_idmap_get_gid_from_sid(&sid, &state->response.data.gid)) { DEBUG(1, ("Could not get gid for sid %s\n", state->request.data.sid)); return WINBINDD_ERROR; @@ -185,8 +157,6 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state) { - struct winbindd_domain *domain; - uint32 user_rid; DOM_SID sid; /* Bug out if the uid isn't in the winbind range */ @@ -200,18 +170,12 @@ enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state) state->request.data.uid)); /* Lookup rid for this uid */ - - if (!winbindd_idmap_get_rid_from_uid(state->request.data.uid, - &user_rid, &domain)) { + if (!winbindd_idmap_get_sid_from_uid(state->request.data.uid, &sid)) { DEBUG(1, ("Could not convert uid %d to rid\n", state->request.data.uid)); return WINBINDD_ERROR; } - /* Construct sid and return it */ - - sid_copy(&sid, &domain->sid); - sid_append_rid(&sid, user_rid); sid_to_string(state->response.data.sid.sid, &sid); state->response.data.sid.type = SID_NAME_USER; @@ -222,8 +186,6 @@ enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state) enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state) { - struct winbindd_domain *domain; - uint32 group_rid; DOM_SID sid; /* Bug out if the gid isn't in the winbind range */ @@ -236,19 +198,14 @@ enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: gid to sid %d\n", state->pid, state->request.data.gid)); - /* Lookup rid for this uid */ - - if (!winbindd_idmap_get_rid_from_gid(state->request.data.gid, - &group_rid, &domain)) { - DEBUG(1, ("Could not convert gid %d to rid\n", + /* Lookup sid for this uid */ + if (!winbindd_idmap_get_sid_from_gid(state->request.data.gid, &sid)) { + DEBUG(1, ("Could not convert gid %d to sid\n", state->request.data.gid)); return WINBINDD_ERROR; } /* Construct sid and return it */ - - sid_copy(&sid, &domain->sid); - sid_append_rid(&sid, group_rid); sid_to_string(state->response.data.sid.sid, &sid); state->response.data.sid.type = SID_NAME_DOM_GRP; diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c index 3185e261cd4..d89717ad47c 100644 --- a/source/nsswitch/winbindd_user.c +++ b/source/nsswitch/winbindd_user.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. Winbind daemon - user related functions @@ -26,20 +25,20 @@ /* Fill a pwent structure with information we have obtained */ -static BOOL winbindd_fill_pwent(char *domain_name, char *name, +static BOOL winbindd_fill_pwent(char *dom_name, char *user_name, uint32 user_rid, uint32 group_rid, char *full_name, struct winbindd_pw *pw) { extern userdom_struct current_user_info; - fstring name_domain, name_user; + fstring output_username; pstring homedir; - if (!pw || !name) + if (!pw || !dom_name || !user_name) return False; /* Resolve the uid number */ - if (!winbindd_idmap_get_uid_from_rid(domain_name, user_rid, + if (!winbindd_idmap_get_uid_from_rid(dom_name, user_rid, &pw->pw_uid)) { DEBUG(1, ("error getting user id for rid %d\n", user_rid)); return False; @@ -47,15 +46,17 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name, /* Resolve the gid number */ - if (!winbindd_idmap_get_gid_from_rid(domain_name, group_rid, + if (!winbindd_idmap_get_gid_from_rid(dom_name, group_rid, &pw->pw_gid)) { DEBUG(1, ("error getting group id for rid %d\n", group_rid)); return False; } /* Username */ - - safe_strcpy(pw->pw_name, name, sizeof(pw->pw_name) - 1); + + fill_domain_username(output_username, dom_name, user_name); + + safe_strcpy(pw->pw_name, output_username, sizeof(pw->pw_name) - 1); /* Full name (gecos) */ @@ -65,16 +66,11 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name, defaults are /tmp for the home directory and /bin/false for shell. */ - if (!parse_domain_user(name, name_domain, name_user)) { - DEBUG(1, ("error parsing domain user for %s\n", name_user )); - return False; - } - /* The substitution of %U and %D in the 'template homedir' is done by lp_string() calling standard_sub_basic(). */ - fstrcpy(current_user_info.smb_name, name_user); - fstrcpy(current_user_info.domain, name_domain); + fstrcpy(current_user_info.smb_name, user_name); + fstrcpy(current_user_info.domain, dom_name); pstrcpy(homedir, lp_template_homedir()); @@ -84,28 +80,22 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name, sizeof(pw->pw_shell) - 1); /* Password - set to "x" as we can't generate anything useful here. - Authentication can be done using the pam_ntdom module. */ + Authentication can be done using the pam_winbind module. */ safe_strcpy(pw->pw_passwd, "x", sizeof(pw->pw_passwd) - 1); return True; } -/************************************************************************ - Empty static struct for negative caching. -*************************************************************************/ +/* Return a password structure from a username. */ -static struct winbindd_pw negative_pw_cache_entry; - -/* Return a password structure from a username. Specify whether cached data - can be returned. */ - -enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *state) +enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) { - uint32 user_rid, group_rid; - SAM_USERINFO_CTR *user_info; + uint32 user_rid; + WINBIND_USERINFO user_info; DOM_SID user_sid; - fstring name_domain, name_user, name, gecos_name; + NTSTATUS status; + fstring name_domain, name_user; enum SID_NAME_USE name_type; struct winbindd_domain *domain; TALLOC_CTX *mem_ctx; @@ -116,38 +106,24 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat /* Parse domain and username */ if (!parse_domain_user(state->request.data.username, name_domain, - name_user)) + name_user)) return WINBINDD_ERROR; if ((domain = find_domain_from_name(name_domain)) == NULL) { - DEBUG(5, ("No such domain: %s\n", name_domain)); + DEBUG(5, ("no such domain: %s\n", name_domain)); return WINBINDD_ERROR; } - - /* Check for cached user entry */ - - if (winbindd_fetch_user_cache_entry(domain, name_user, &state->response.data.pw)) { - /* Check if this is a negative cache entry. */ - if (memcmp(&negative_pw_cache_entry, &state->response.data.pw, - sizeof(state->response.data.pw)) == 0) - return WINBINDD_ERROR; - return WINBINDD_OK; - } - - slprintf(name, sizeof(name) - 1, "%s\\%s", name_domain, name_user); /* Get rid and name type from name */ - if (!winbindd_lookup_sid_by_name(name, &user_sid, &name_type)) { + if (!winbindd_lookup_sid_by_name(domain, name_user, &user_sid, &name_type)) { DEBUG(1, ("user '%s' does not exist\n", name_user)); - winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry); return WINBINDD_ERROR; } if (name_type != SID_NAME_USER) { DEBUG(1, ("name '%s' is not a user name: %d\n", name_user, name_type)); - winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry); return WINBINDD_ERROR; } @@ -155,56 +131,52 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat from the winbind_lookup_by_name() call and use it in a winbind_lookup_userinfo() */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init_named("winbindd_getpwnam([%s]\\[%s])", + name_domain, name_user))) { DEBUG(1, ("out of memory\n")); return WINBINDD_ERROR; } sid_split_rid(&user_sid, &user_rid); - - if (!winbindd_lookup_userinfo(domain, mem_ctx, user_rid, &user_info)) { - DEBUG(1, ("pwnam_from_user(): error getting user info for " - "user '%s'\n", name_user)); - winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry); + + status = domain->methods->query_user(domain, mem_ctx, user_rid, + &user_info); + + if (!NT_STATUS_IS_OK(status)) { + DEBUG(1, ("error getting user info for user '[%s]\\[%s]'\n", + name_domain, name_user)); talloc_destroy(mem_ctx); return WINBINDD_ERROR; } - group_rid = user_info->info.id21->group_rid; - - unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name, - sizeof(gecos_name) - 1); - - talloc_destroy(mem_ctx); - user_info = NULL; - - /* Now take all this information and fill in a passwd structure */ - - if (!winbindd_fill_pwent(name_domain, state->request.data.username, - user_rid, group_rid, gecos_name, + /* Now take all this information and fill in a passwd structure */ + if (!winbindd_fill_pwent(name_domain, name_user, + user_rid, user_info.group_rid, + user_info.full_name, &state->response.data.pw)) { - winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry); - /* talloc_destroy(mem_ctx); Surely this is wrong */ + talloc_destroy(mem_ctx); return WINBINDD_ERROR; } - - winbindd_store_user_cache_entry(domain, name_user, &state->response.data.pw); + + talloc_destroy(mem_ctx); return WINBINDD_OK; } /* Return a password structure given a uid number */ -enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state) +enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state) { DOM_SID user_sid; struct winbindd_domain *domain; - uint32 user_rid, group_rid; - fstring user_name, gecos_name; + uint32 user_rid; + fstring dom_name; + fstring user_name; enum SID_NAME_USE name_type; - SAM_USERINFO_CTR *user_info; + WINBIND_USERINFO user_info; gid_t gid; TALLOC_CTX *mem_ctx; + NTSTATUS status; /* Bug out if the uid isn't in the winbind range */ @@ -219,81 +191,61 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state if (!winbindd_idmap_get_rid_from_uid(state->request.data.uid, &user_rid, &domain)) { - DEBUG(1, ("Could not convert uid %d to rid\n", + DEBUG(1, ("could not convert uid %d to rid\n", state->request.data.uid)); return WINBINDD_ERROR; } - /* Check for cached uid entry */ - - if (winbindd_fetch_uid_cache_entry(domain, - state->request.data.uid, - &state->response.data.pw)) { - /* Check if this is a negative cache entry. */ - if (memcmp(&negative_pw_cache_entry, &state->response.data.pw, - sizeof(state->response.data.pw)) == 0) - return WINBINDD_ERROR; - return WINBINDD_OK; - } - /* Get name and name type from rid */ sid_copy(&user_sid, &domain->sid); sid_append_rid(&user_sid, user_rid); - if (!winbindd_lookup_name_by_sid(&user_sid, user_name, &name_type)) { + if (!winbindd_lookup_name_by_sid(&user_sid, dom_name, user_name, &name_type)) { fstring temp; sid_to_string(temp, &user_sid); - DEBUG(1, ("Could not lookup sid %s\n", temp)); - - winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry); + DEBUG(1, ("could not lookup sid %s\n", temp)); return WINBINDD_ERROR; } - if (strcmp("\\", lp_winbind_separator())) - string_sub(user_name, "\\", lp_winbind_separator(), - sizeof(fstring)); - /* Get some user info */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init_named("winbind_getpwuid(%d)", + state->request.data.uid))) { + DEBUG(1, ("out of memory\n")); return WINBINDD_ERROR; } - if (!winbindd_lookup_userinfo(domain, mem_ctx, user_rid, &user_info)) { - DEBUG(1, ("pwnam_from_uid(): error getting user info for " - "user '%s'\n", user_name)); - winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry); + status = domain->methods->query_user(domain, mem_ctx, user_rid, + &user_info); + + if (!NT_STATUS_IS_OK(status)) { + DEBUG(1, ("error getting user info for user '%s'\n", + user_name)); talloc_destroy(mem_ctx); return WINBINDD_ERROR; } - group_rid = user_info->info.id21->group_rid; - unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name, - sizeof(gecos_name) - 1); - - talloc_destroy(mem_ctx); - user_info = NULL; - /* Resolve gid number */ - if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, &gid)) { + if (!winbindd_idmap_get_gid_from_rid(domain->name, user_info.group_rid, &gid)) { DEBUG(1, ("error getting group id for user %s\n", user_name)); + talloc_destroy(mem_ctx); return WINBINDD_ERROR; } /* Fill in password structure */ - if (!winbindd_fill_pwent(domain->name, user_name, user_rid, group_rid, - gecos_name, &state->response.data.pw)) { - winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry); + if (!winbindd_fill_pwent(domain->name, user_name, user_rid, user_info.group_rid, + user_info.full_name, &state->response.data.pw)) { + talloc_destroy(mem_ctx); return WINBINDD_ERROR; } - winbindd_store_uid_cache_entry(domain, state->request.data.uid, &state->response.data.pw); - + talloc_destroy(mem_ctx); + return WINBINDD_OK; } @@ -305,7 +257,7 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state) { - struct winbindd_domain *tmp; + struct winbindd_domain *domain; DEBUG(3, ("[%5d]: setpwent\n", state->pid)); @@ -323,10 +275,7 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state) /* Create sam pipes for each domain we know about */ - if (domain_list == NULL) - get_domain_info(); - - for(tmp = domain_list; tmp != NULL; tmp = tmp->next) { + for(domain = domain_list(); domain != NULL; domain = domain->next) { struct getent_state *domain_state; /* @@ -335,20 +284,20 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state) */ if ((strcmp(state->request.domain, "") != 0) && - !check_domain_env(state->request.domain, tmp->name)) { - DEBUG(5, ("skipping domain %s because of env var\n", - tmp->name)); + !check_domain_env(state->request.domain, + domain->name)) continue; - } /* Create a state record for this domain */ - if ((domain_state = create_getent_state(tmp)) == NULL) { - DEBUG(5, ("error connecting to dc for domain %s\n", - tmp->name)); - continue; - } + if ((domain_state = (struct getent_state *) + malloc(sizeof(struct getent_state))) == NULL) + return WINBINDD_ERROR; + ZERO_STRUCTP(domain_state); + + fstrcpy(domain_state->domain_name, domain->name); + /* Add to list of open domains */ DLIST_ADD(state->getpwent_state, domain_state); @@ -380,118 +329,83 @@ static BOOL get_sam_user_entries(struct getent_state *ent) { NTSTATUS status; uint32 num_entries; - SAM_DISPINFO_1 info1; - SAM_DISPINFO_CTR ctr; + WINBIND_USERINFO *info; struct getpwent_user *name_list = NULL; - uint32 group_rid; BOOL result = False; TALLOC_CTX *mem_ctx; + struct winbindd_domain *domain; + struct winbindd_methods *methods; + int i; - if (ent->got_all_sam_entries) + if (ent->num_sam_entries) return False; - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("get_sam_user_entries(%s)", + ent->domain_name))) return False; - ZERO_STRUCT(info1); - ZERO_STRUCT(ctr); - - ctr.sam.info1 = &info1; - -#if 0 - /* Look in cache for entries, else get them direct */ - - if (winbindd_fetch_user_cache(ent->domain, - (struct getpwent_user **) - &ent->sam_entries, - &ent->num_sam_entries)) { - return True; + if (!(domain = find_domain_from_name(ent->domain_name))) { + DEBUG(3, ("no such domain %s in get_sam_user_entries\n", + ent->domain_name)); + return False; } -#endif - /* For the moment we set the primary group for every user to be the - Domain Users group. There are serious problems with determining - the actual primary group for large domains. This should really - be made into a 'winbind force group' smb.conf parameter or - something like that. */ - - group_rid = DOMAIN_GROUP_RID_USERS; + methods = domain->methods; /* Free any existing user info */ SAFE_FREE(ent->sam_entries); ent->num_sam_entries = 0; - /* Call query_dispinfo to get a list of usernames and user rids */ + /* Call query_user_list to get a list of usernames and user rids */ - do { - int i; - - num_entries = 0; + num_entries = 0; - status = winbindd_query_dispinfo(ent->domain, mem_ctx, &ent->dom_pol, - &ent->dispinfo_ndx, 1, - &num_entries, &ctr); + status = methods->query_user_list(domain, mem_ctx, &num_entries, + &info); - if (num_entries) { - struct getpwent_user *tnl; - - tnl = (struct getpwent_user *)Realloc(name_list, - sizeof(struct getpwent_user) * - (ent->num_sam_entries + - num_entries)); - - if (!tnl) { - DEBUG(0,("get_sam_user_entries: Realloc failed.\n")); - SAFE_FREE(name_list); - goto done; - } else - name_list = tnl; - } - - for (i = 0; i < num_entries; i++) { - - /* Store account name and gecos */ - - unistr2_to_ascii( - name_list[ent->num_sam_entries + i].name, - &info1.str[i].uni_acct_name, - sizeof(fstring)); - - unistr2_to_ascii( - name_list[ent->num_sam_entries + i].gecos, - &info1.str[i].uni_full_name, - sizeof(fstring)); - - /* User and group ids */ - - name_list[ent->num_sam_entries + i].user_rid = - info1.sam[i].rid_user; + if (num_entries) { + struct getpwent_user *tnl; + + tnl = (struct getpwent_user *)Realloc(name_list, + sizeof(struct getpwent_user) * + (ent->num_sam_entries + + num_entries)); + + if (!tnl) { + DEBUG(0,("get_sam_user_entries realloc failed.\n")); + SAFE_FREE(name_list); + goto done; + } else + name_list = tnl; + } - name_list[ent->num_sam_entries + i]. - group_rid = group_rid; + for (i = 0; i < num_entries; i++) { + /* Store account name and gecos */ + if (!info[i].acct_name) { + fstrcpy(name_list[ent->num_sam_entries + i].name, ""); + } else { + fstrcpy(name_list[ent->num_sam_entries + i].name, + info[i].acct_name); + } + if (!info[i].full_name) { + fstrcpy(name_list[ent->num_sam_entries + i].gecos, ""); + } else { + fstrcpy(name_list[ent->num_sam_entries + i].gecos, + info[i].full_name); } - ent->num_sam_entries += num_entries; - - if (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES)) - break; - - } while (ent->num_sam_entries < MAX_FETCH_SAM_ENTRIES); - -#if 0 - /* Fill cache with received entries */ + /* User and group ids */ + name_list[ent->num_sam_entries+i].user_rid = info[i].user_rid; + name_list[ent->num_sam_entries+i].group_rid = info[i].group_rid; + } + + ent->num_sam_entries += num_entries; - winbindd_store_user_cache(ent->domain, ent->sam_entries, - ent->num_sam_entries); -#endif - /* Fill in remaining fields */ ent->sam_entries = name_list; ent->sam_entry_index = 0; - ent->got_all_sam_entries = (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES)); - result = ent->num_sam_entries > 0; done: @@ -510,7 +424,6 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) struct getent_state *ent; struct winbindd_pw *user_list; int num_users, user_list_ndx = 0, i; - char *sep; DEBUG(3, ("[%5d]: getpwent\n", state->pid)); @@ -531,7 +444,6 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) sizeof(struct winbindd_pw)); user_list = (struct winbindd_pw *)state->response.extra_data; - sep = lp_winbind_separator(); if (!(ent = state->getpwent_state)) return WINBINDD_ERROR; @@ -580,13 +492,9 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) /* Lookup user info */ - slprintf(domain_user_name, sizeof(domain_user_name) - 1, - "%s%s%s", ent->domain->name, sep, - name_list[ent->sam_entry_index].name); - result = winbindd_fill_pwent( - ent->domain->name, - domain_user_name, + ent->domain_name, + name_list[ent->sam_entry_index].name, name_list[ent->sam_entry_index].user_rid, name_list[ent->sam_entry_index].group_rid, name_list[ent->sam_entry_index].gecos, @@ -618,8 +526,7 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) { struct winbindd_domain *domain; - SAM_DISPINFO_CTR ctr; - SAM_DISPINFO_1 info1; + WINBIND_USERINFO *info; uint32 num_entries = 0, total_entries = 0; char *ted, *extra_data = NULL; int extra_data_len = 0; @@ -628,20 +535,15 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: list users\n", state->pid)); - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("winbindd_list_users"))) return WINBINDD_ERROR; /* Enumerate over trusted domains */ - ctr.sam.info1 = &info1; - - if (domain_list == NULL) - get_domain_info(); - - for (domain = domain_list; domain; domain = domain->next) { + for (domain = domain_list(); domain; domain = domain->next) { NTSTATUS status; - uint32 start_ndx = 0; - POLICY_HND dom_pol; + struct winbindd_methods *methods; + int i; /* Skip domains other than WINBINDD_DOMAIN environment variable */ @@ -650,63 +552,46 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) !check_domain_env(state->request.domain, domain->name)) continue; - if (!create_samr_domain_handle(domain, &dom_pol)) - continue; + methods = domain->methods; /* Query display info */ + status = methods->query_user_list(domain, mem_ctx, + &num_entries, &info); - do { - int i; - - status = winbindd_query_dispinfo( - domain, mem_ctx, &dom_pol, &start_ndx, - 1, &num_entries, &ctr); - - if (num_entries == 0) - continue; - - /* Allocate some memory for extra data */ + if (num_entries == 0) + continue; - total_entries += num_entries; + /* Allocate some memory for extra data */ + total_entries += num_entries; - ted = Realloc(extra_data, sizeof(fstring) * - total_entries); + ted = Realloc(extra_data, sizeof(fstring) * total_entries); - if (!ted) { - DEBUG(0,("winbindd_list_users: failed to enlarge buffer!\n")); - SAFE_FREE(extra_data); - goto done; - } else - extra_data = ted; + if (!ted) { + DEBUG(0,("failed to enlarge buffer!\n")); + SAFE_FREE(extra_data); + goto done; + } else + extra_data = ted; - /* Pack user list into extra data fields */ + /* Pack user list into extra data fields */ - for (i = 0; i < num_entries; i++) { - UNISTR2 *uni_acct_name; - fstring acct_name, name; - - /* Convert unistring to ascii */ - - uni_acct_name = &ctr.sam.info1->str[i]. - uni_acct_name; - unistr2_to_ascii(acct_name, uni_acct_name, - sizeof(acct_name) - 1); - - slprintf(name, sizeof(name) - 1, "%s%s%s", - domain->name, lp_winbind_separator(), - acct_name); - - /* Append to extra data */ + for (i = 0; i < num_entries; i++) { + fstring acct_name, name; - memcpy(&extra_data[extra_data_len], name, - strlen(name)); - extra_data_len += strlen(name); - - extra_data[extra_data_len++] = ','; - } - } while (NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES)); - - close_samr_domain_handle(domain, &dom_pol); + if (!info[i].acct_name) { + fstrcpy(acct_name, ""); + } else { + fstrcpy(acct_name, info[i].acct_name); + } + + fill_domain_username(name, domain->name, acct_name); + + /* Append to extra data */ + memcpy(&extra_data[extra_data_len], name, + strlen(name)); + extra_data_len += strlen(name); + extra_data[extra_data_len++] = ','; + } } /* Assign extra_data fields in response structure */ diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index 5e700424bc9..06804b3b43f 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -1,5 +1,5 @@ /* - Unix SMB/Netbios implementation. + Unix SMB/CIFS implementation. Winbind daemon for ntdom nss module @@ -36,457 +36,203 @@ * * Correct code should never look at a field that has this value. **/ -static const fstring name_deadbeef = ""; - -/* Globals for domain list stuff */ +static const fstring name_deadbeef = ""; -struct winbindd_domain *domain_list = NULL; +/* The list of trusted domains. Note that the list can be deleted and + recreated using the init_domain_list() function so pointers to + individual winbindd_domain structures cannot be made. Keep a copy of + the domain name instead. */ -/* Given a domain name, return the struct winbindd domain info for it - if it is actually working. */ +static struct winbindd_domain *_domain_list; -struct winbindd_domain *find_domain_from_name(char *domain_name) +struct winbindd_domain *domain_list(void) { - struct winbindd_domain *tmp; + /* Initialise list */ - if (domain_list == NULL) - get_domain_info(); + if (!_domain_list) + init_domain_list(); - /* Search through list */ - - for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { - if (strcmp(domain_name, tmp->name) == 0) - return tmp; - } - - /* Not found */ - - return NULL; + return _domain_list; } -/* Given a domain name, return the struct winbindd domain info for it */ +/* Free all entries in the trusted domain list */ -struct winbindd_domain *find_domain_from_sid(DOM_SID *sid) +void free_domain_list(void) { - struct winbindd_domain *tmp; + struct winbindd_domain *domain = _domain_list; - if (domain_list == NULL) - get_domain_info(); - - /* Search through list */ - - for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { - if (sid_equal(sid, &tmp->sid)) - return tmp; + while(domain) { + struct winbindd_domain *next = domain->next; + + DLIST_REMOVE(_domain_list, domain); + SAFE_FREE(domain); + domain = next; } - - /* Not found */ - - return NULL; } /* Add a trusted domain to our list of domains */ static struct winbindd_domain *add_trusted_domain(char *domain_name, - DOM_SID *domain_sid) + struct winbindd_methods *methods) { - struct winbindd_domain *domain, *tmp; + struct winbindd_domain *domain; - for (tmp = domain_list; tmp != NULL; tmp = tmp->next) { - if (strcmp(domain_name, tmp->name) == 0) { - DEBUG(3, ("domain %s already in domain list\n", domain_name)); - return tmp; + /* We can't call domain_list() as this function is called from + init_domain_list() and we'll get stuck in a loop. */ + + for (domain = _domain_list; domain; domain = domain->next) { + if (strcmp(domain_name, domain->name) == 0) { + DEBUG(3, ("domain %s already in domain list\n", + domain_name)); + return domain; } } - DEBUG(1, ("adding domain %s\n", domain_name)); - /* Create new domain entry */ - - if ((domain = (struct winbindd_domain *)malloc(sizeof(*domain))) == NULL) + + if ((domain = (struct winbindd_domain *) + malloc(sizeof(*domain))) == NULL) return NULL; /* Fill in fields */ ZERO_STRUCTP(domain); + fstrcpy(domain->name, domain_name); - sid_copy(&domain->sid, domain_sid); - + domain->methods = methods; + domain->sequence_number = DOM_SEQUENCE_NONE; + domain->last_seq_check = 0; + /* Link to domain list */ - DLIST_ADD(domain_list, domain); + DLIST_ADD(_domain_list, domain); return domain; } /* Look up global info for the winbind daemon */ -BOOL get_domain_info(void) +BOOL init_domain_list(void) { - uint32 enum_ctx = 0, num_doms = 0; - char **domains = NULL; - DOM_SID *sids = NULL, domain_sid; NTSTATUS result; - CLI_POLICY_HND *hnd; - int i; - fstring level5_dom; - BOOL rv = False; TALLOC_CTX *mem_ctx; - - DEBUG(1, ("getting trusted domain list\n")); + extern struct winbindd_methods cache_methods; + struct winbindd_domain *domain; + DOM_SID *dom_sids; + char **names; + int num_domains = 0; - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("init_domain_list"))) return False; - /* Add our workgroup - keep handle to look up trusted domains */ + /* Free existing list */ - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; + free_domain_list(); - result = cli_lsa_query_info_policy(hnd->cli, mem_ctx, - &hnd->pol, 0x05, level5_dom, &domain_sid); + /* Add ourselves as the first entry */ - if (!NT_STATUS_IS_OK(result)) - goto done; + domain = add_trusted_domain(lp_workgroup(), &cache_methods); - add_trusted_domain(lp_workgroup(), &domain_sid); - - /* Enumerate list of trusted domains */ + /* Now we *must* get the domain sid for our primary domain. Go into + a holding pattern until that is available */ - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; - - result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, - &hnd->pol, &enum_ctx, &num_doms, &domains, &sids); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - /* Add each domain to the trusted domain list */ - - for(i = 0; i < num_doms; i++) - add_trusted_domain(domains[i], &sids[i]); - - rv = True; - - done: - - talloc_destroy(mem_ctx); - - return rv; -} - -/* Free global domain info */ - -void free_domain_info(void) -{ - struct winbindd_domain *domain; - - /* Free list of domains */ - - if (domain_list) { - struct winbindd_domain *next_domain; - - domain = domain_list; - - while(domain) { - next_domain = domain->next; - SAFE_FREE(domain); - domain = next_domain; - } + result = cache_methods.domain_sid(domain, &domain->sid); + while (!NT_STATUS_IS_OK(result)) { + sleep(10); + DEBUG(1,("Retrying startup domain sid fetch for %s\n", + domain->name)); + result = cache_methods.domain_sid(domain, &domain->sid); } -} + + DEBUG(1,("Added domain %s (%s)\n", + domain->name, + sid_string_static(&domain->sid))); -/* Connect to a domain controller using get_any_dc_name() to discover - the domain name and sid */ + DEBUG(1, ("getting trusted domain list\n")); -BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain) -{ - fstring level5_dom; - uint32 enum_ctx = 0, num_doms = 0; - char **domains = NULL; - DOM_SID *sids = NULL; - CLI_POLICY_HND *hnd; - NTSTATUS result; - BOOL rv = False; - TALLOC_CTX *mem_ctx; - - DEBUG(1, ("looking up sid for domain %s\n", domain_name)); - - if (!(mem_ctx = talloc_init())) - return False; - - if (!(hnd = cm_get_lsa_handle(domain_name))) - goto done; - - /* Do a level 5 query info policy if we are looking up the SID for - our own domain. */ - - if (strequal(domain_name, lp_workgroup())) { - - result = cli_lsa_query_info_policy(hnd->cli, mem_ctx, - &hnd->pol, 0x05, level5_dom, - &domain->sid); - - rv = NT_STATUS_IS_OK(result); - goto done; - } - - /* Use lsaenumdomains to get sid for this domain */ - - result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, &hnd->pol, - &enum_ctx, &num_doms, &domains, &sids); - - /* Look for domain name */ - - if (NT_STATUS_IS_OK(result) && domains && sids) { - BOOL found = False; + result = cache_methods.trusted_domains(domain, mem_ctx, &num_domains, + &names, &dom_sids); + + /* Add each domain to the trusted domain list */ + if (NT_STATUS_IS_OK(result)) { int i; - - for(i = 0; i < num_doms; i++) { - if (strequal(domain_name, domains[i])) { - sid_copy(&domain->sid, &sids[i]); - found = True; - break; - } + for(i = 0; i < num_domains; i++) { + domain = add_trusted_domain(names[i], &cache_methods); + if (!domain) continue; + sid_copy(&domain->sid, &dom_sids[i]); + DEBUG(1,("Added domain %s (%s)\n", + domain->name, + sid_string_static(&domain->sid))); + + /* this primes the connection */ + cache_methods.domain_sid(domain, &domain->sid); } - - rv = found; - goto done; } - - rv = False; /* An error occured with a trusted domain */ - - done: talloc_destroy(mem_ctx); - - return rv; -} - -/* Store a SID in a domain indexed by name in the cache. */ - -static void store_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME_USE type) -{ - fstring domain_str; - char *p; - struct winbindd_sid sid_val; - struct winbindd_domain *domain; - - /* Get name from domain. */ - fstrcpy( domain_str, name); - p = strchr(domain_str, '\\'); - if (p) - *p = '\0'; - - if ((domain = find_domain_from_name(domain_str)) == NULL) - return; - - sid_to_string(sid_val.sid, sid); - sid_val.type = (int)type; - - DEBUG(10,("store_sid_by_name_in_cache: storing cache entry %s -> SID %s\n", - name, sid_val.sid )); - - winbindd_store_sid_cache_entry(domain, name, &sid_val); -} - -/* Lookup a SID in a domain indexed by name in the cache. */ - -static BOOL winbindd_lookup_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME_USE *type) -{ - fstring name_domain, name_user; - char *key_name = NULL; - struct winbindd_sid sid_ret; - struct winbindd_domain *domain; - BOOL result = False; - - /* Get name from domain. */ - - if (!parse_domain_user(name, name_domain, name_user)) - goto done; - - if ((domain = find_domain_from_name(name_domain)) == NULL) - goto done; - - strlower(name_user); /* Username in key is lowercased */ - - if (asprintf(&key_name, "%s\\%s", name_domain, name_user) < 0) - goto done; - - if (!winbindd_fetch_sid_cache_entry(domain, key_name, &sid_ret)) - goto done; - - string_to_sid(sid, sid_ret.sid); - *type = (enum SID_NAME_USE)sid_ret.type; - - DEBUG(10, ("winbindd_lookup_sid_by_name_in_cache: Cache hit for name %s. SID = %s\n", name, sid_ret.sid)); - - result = True; - - done: - SAFE_FREE(key_name); - return result; + return True; } -/* Store a name in a domain indexed by SID in the cache. */ +/* Given a domain name, return the struct winbindd domain info for it + if it is actually working. */ -static void store_name_by_sid_in_cache(DOM_SID *sid, fstring name, enum SID_NAME_USE type) +struct winbindd_domain *find_domain_from_name(const char *domain_name) { - fstring sid_str; - uint32 rid; - DOM_SID domain_sid; - struct winbindd_name name_val; struct winbindd_domain *domain; - /* Split sid into domain sid and user rid */ - sid_copy(&domain_sid, sid); - sid_split_rid(&domain_sid, &rid); - - if ((domain = find_domain_from_sid(&domain_sid)) == NULL) - return; + /* Search through list */ - sid_to_string(sid_str, sid); - fstrcpy( name_val.name, name ); - name_val.type = (int)type; + for (domain = domain_list(); domain != NULL; domain = domain->next) { + if (strequal(domain_name, domain->name) || + strequal(domain_name, domain->full_name)) + return domain; + } - DEBUG(10,("store_name_by_sid_in_cache: storing cache entry SID %s -> %s\n", - sid_str, name_val.name )); + /* Not found */ - winbindd_store_name_cache_entry(domain, sid_str, &name_val); + return NULL; } -/* Lookup a name in a domain indexed by SID in the cache. */ +/* Given a domain sid, return the struct winbindd domain info for it */ -static BOOL winbindd_lookup_name_by_sid_in_cache(DOM_SID *sid, fstring name, enum SID_NAME_USE *type) +struct winbindd_domain *find_domain_from_sid(DOM_SID *sid) { - fstring sid_str; - uint32 rid; - DOM_SID domain_sid; - struct winbindd_name name_ret; struct winbindd_domain *domain; - /* Split sid into domain sid and user rid */ - sid_copy(&domain_sid, sid); - sid_split_rid(&domain_sid, &rid); - - if ((domain = find_domain_from_sid(&domain_sid)) == NULL) - return False; - - sid_to_string(sid_str, sid); - - if (!winbindd_fetch_name_cache_entry(domain, sid_str, &name_ret)) - return False; - - fstrcpy( name, name_ret.name ); - *type = (enum SID_NAME_USE)name_ret.type; + /* Search through list */ - DEBUG(10,("winbindd_lookup_name_by_sid_in_cache: Cache hit for SID = %s, name %s\n", - sid_str, name )); + for (domain = domain_list(); domain != NULL; domain = domain->next) { + if (sid_compare_domain(sid, &domain->sid) == 0) + return domain; + } - return True; -} + /* Not found */ -static void store_negative_sid_by_name(char *name) -{ - DOM_SID nullsid; - - ZERO_STRUCT(nullsid); - store_sid_by_name_in_cache(name, &nullsid, SID_NAME_USE_NONE); + return NULL; } /* Lookup a sid in a domain from a name */ -BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *type) +BOOL winbindd_lookup_sid_by_name(struct winbindd_domain *domain, + const char *name, DOM_SID *sid, + enum SID_NAME_USE *type) { - int num_sids = 0, num_names = 1; - DOM_SID *sids = NULL; - uint32 *types = NULL; - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - TALLOC_CTX *mem_ctx; - char **names; + NTSTATUS result; /* Don't bother with machine accounts */ if (name[strlen(name) - 1] == '$') return False; - /* First check cache. */ - if (winbindd_lookup_sid_by_name_in_cache(name, sid, type)) { - if (*type == SID_NAME_USE_NONE) - return False; /* Negative cache hit. */ - return True; - } - - /* Setup for fail. */ - *type = SID_NAME_UNKNOWN; - ZERO_STRUCTP(sid); - /* Lookup name */ + result = domain->methods->name_to_sid(domain, name, sid, type); - if (!(mem_ctx = talloc_init())) - return False; - - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; - - result = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol, - num_names, (char **)&name, &sids, - &types, &num_sids); - - /* JRA. Here's where we add the -ve cache store with a name type of - SID_NAME_USE_NONE. */ - - if (!NT_STATUS_IS_OK(result)) { - store_negative_sid_by_name(name); - *type = SID_NAME_UNKNOWN; - goto done; - } - - if (sids == NULL || types == NULL || ((enum SID_NAME_USE)types[0]) == SID_NAME_UNKNOWN) { - store_negative_sid_by_name(name); - *type = SID_NAME_UNKNOWN; - result = NT_STATUS_NONE_MAPPED; - goto done; - } - - /* Return sid and type */ - - sid_copy(sid, &sids[0]); - *type = (enum SID_NAME_USE)types[0]; - - /* Now we do a reverse lookup of the SID to get the correct - capitalisation of the name. */ - - result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol, 1, - sids, &names, &types, &num_names); - - /* Tests for results being ok. */ - + /* Return rid and type if lookup successful */ if (!NT_STATUS_IS_OK(result)) { *type = SID_NAME_UNKNOWN; - goto done; - } - - if (names == NULL || types == NULL || ((enum SID_NAME_USE)types[0]) == SID_NAME_UNKNOWN) { - *type = SID_NAME_UNKNOWN; - result = NT_STATUS_NONE_MAPPED; - goto done; } - /* Store the forward and reverse map of this lookup in the cache. */ - - store_sid_by_name_in_cache( - names[0], &sids[0], (enum SID_NAME_USE)types[0]); - - store_name_by_sid_in_cache( - &sids[0], names[0], (enum SID_NAME_USE)types[0]); - - done: - - talloc_destroy(mem_ctx); return NT_STATUS_IS_OK(result); } @@ -497,6 +243,8 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty * * @param name On success, set to the name corresponding to @p sid. * + * @param dom_name On success, set to the 'domain name' corresponding to @p sid. + * * @param type On success, contains the type of name: alias, group or * user. * @@ -504,343 +252,45 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty * are set, otherwise False. **/ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, + fstring dom_name, fstring name, enum SID_NAME_USE *type) { - int num_sids = 1, num_names = 0; - uint32 *types = NULL; - char **names; - CLI_POLICY_HND *hnd; + char *names; NTSTATUS result; TALLOC_CTX *mem_ctx; BOOL rv = False; + struct winbindd_domain *domain; - /* First check cache. */ - if (winbindd_lookup_name_by_sid_in_cache(sid, name, type)) { - if (*type == SID_NAME_USE_NONE) { - fstrcpy(name, name_deadbeef); - *type = SID_NAME_UNKNOWN; - return False; /* Negative cache hit. */ - } else - return True; - } + domain = find_domain_from_sid(sid); - /* Default fail. */ - *type = SID_NAME_UNKNOWN; - *name = '\0'; + if (!domain) { + DEBUG(1,("Can't find domain from sid\n")); + return False; + } /* Lookup name */ - if (!(mem_ctx = talloc_init())) + if (!(mem_ctx = talloc_init_named("winbindd_lookup_name_by_sid"))) return False; - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; - - result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol, - num_sids, sid, &names, &types, - &num_names); + result = domain->methods->sid_to_name(domain, mem_ctx, sid, &names, type); /* Return name and type if successful */ if ((rv = NT_STATUS_IS_OK(result))) { - - /* Return name */ - - if (names != NULL) - fstrcpy(name, names[0]); - - /* Return name type */ - - if (types != NULL) - *type = (enum SID_NAME_USE)types[0]; - - if ((*type != SID_NAME_UNKNOWN) && *name) { - store_sid_by_name_in_cache(name, sid, *type); - store_name_by_sid_in_cache(sid, name, *type); - goto done; - } - } - - /* OK, so we tried to look up a name in this sid, and - * didn't find it. Therefore add a negative cache - * entry. */ - - store_name_by_sid_in_cache(sid, "", SID_NAME_USE_NONE); - *type = SID_NAME_UNKNOWN; - fstrcpy(name, name_deadbeef); - rv = False; - - done: - - talloc_destroy(mem_ctx); - return rv; -} - -/* Lookup user information from a rid */ - -BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, uint32 user_rid, - SAM_USERINFO_CTR **user_info) -{ - CLI_POLICY_HND *hnd; - uint16 info_level = 0x15; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - POLICY_HND dom_pol, user_pol; - BOOL got_dom_pol = False, got_user_pol = False; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - goto done; - - /* Get domain handle */ - - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, &dom_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_dom_pol = True; - - /* Get user handle */ - - result = cli_samr_open_user(hnd->cli, mem_ctx, &dom_pol, - des_access, user_rid, &user_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - /* Get user info */ - - result = cli_samr_query_userinfo(hnd->cli, mem_ctx, &user_pol, - info_level, user_info); - - cli_samr_close(hnd->cli, mem_ctx, &user_pol); - - done: - /* Clean up policy handles */ - - if (got_user_pol) - cli_samr_close(hnd->cli, mem_ctx, &user_pol); - - if (got_dom_pol) - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - - return NT_STATUS_IS_OK(result); -} - -/* Lookup groups a user is a member of. I wish Unix had a call like this! */ - -BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - uint32 user_rid, uint32 *num_groups, - DOM_GID **user_groups) -{ - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - POLICY_HND dom_pol, user_pol; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - BOOL got_dom_pol = False, got_user_pol = False; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - goto done; - - /* Get domain handle */ - - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, &dom_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_dom_pol = True; - - /* Get user handle */ - - result = cli_samr_open_user(hnd->cli, mem_ctx, &dom_pol, - des_access, user_rid, &user_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_user_pol = True; - - /* Query user rids */ - - result = cli_samr_query_usergroups(hnd->cli, mem_ctx, &user_pol, - num_groups, user_groups); - - done: - - /* Clean up policy handles */ - - if (got_user_pol) - cli_samr_close(hnd->cli, mem_ctx, &user_pol); - - if (got_dom_pol) - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - - return NT_STATUS_IS_OK(result); -} - -/* Lookup group membership given a rid. */ - -BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - uint32 group_rid, uint32 *num_names, - uint32 **rid_mem, char ***names, - uint32 **name_types) -{ - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 i, total_names = 0; - POLICY_HND dom_pol, group_pol; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - BOOL got_dom_pol = False, got_group_pol = False; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - goto done; - - /* Get domain handle */ - - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, &dom_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_dom_pol = True; - - /* Get group handle */ - - result = cli_samr_open_group(hnd->cli, mem_ctx, &dom_pol, - des_access, group_rid, &group_pol); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - got_group_pol = True; - - /* Step #1: Get a list of user rids that are the members of the - group. */ - - result = cli_samr_query_groupmem(hnd->cli, mem_ctx, - &group_pol, num_names, rid_mem, - name_types); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - /* Step #2: Convert list of rids into list of usernames. Do this - in bunches of ~1000 to avoid crashing NT4. It looks like there - is a buffer overflow or something like that lurking around - somewhere. */ - -#define MAX_LOOKUP_RIDS 900 - - *names = talloc(mem_ctx, *num_names * sizeof(char *)); - *name_types = talloc(mem_ctx, *num_names * sizeof(uint32)); - - for (i = 0; i < *num_names; i += MAX_LOOKUP_RIDS) { - int num_lookup_rids = MIN(*num_names - i, MAX_LOOKUP_RIDS); - uint32 tmp_num_names = 0; - char **tmp_names = NULL; - uint32 *tmp_types = NULL; - - /* Lookup a chunk of rids */ - - result = cli_samr_lookup_rids(hnd->cli, mem_ctx, - &dom_pol, 1000, /* flags */ - num_lookup_rids, - &(*rid_mem)[i], - &tmp_num_names, - &tmp_names, &tmp_types); - - if (!NT_STATUS_IS_OK(result)) - goto done; - - /* Copy result into array. The talloc system will take - care of freeing the temporary arrays later on. */ - - memcpy(&(*names)[i], tmp_names, sizeof(char *) * - tmp_num_names); - - memcpy(&(*name_types)[i], tmp_types, sizeof(uint32) * - tmp_num_names); - - total_names += tmp_num_names; - } - - *num_names = total_names; - - done: - if (got_group_pol) - cli_samr_close(hnd->cli, mem_ctx, &group_pol); - - if (got_dom_pol) - cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - - return NT_STATUS_IS_OK(result); -} - -BOOL create_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol) -{ - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; - TALLOC_CTX *mem_ctx = talloc_init(); - - ZERO_STRUCTP(pdom_pol); - - if (!mem_ctx) - return False; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) { - talloc_destroy(mem_ctx); - return False; + fstrcpy(dom_name, domain->name); + fstrcpy(name, names); + } else { + *type = SID_NAME_UNKNOWN; + fstrcpy(name, name_deadbeef); } - /* Get domain handle */ - result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol, - des_access, &domain->sid, pdom_pol); - + talloc_destroy(mem_ctx); - if (!NT_STATUS_IS_OK(result)) - return False; - return True; + return rv; } -void close_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol) -{ - static POLICY_HND zero_pol; - CLI_POLICY_HND *hnd; - TALLOC_CTX *mem_ctx = talloc_init(); - - if (!mem_ctx) - return; - - if (memcmp(pdom_pol, &zero_pol, sizeof(zero_pol)) == 0) - return; - - if (!(hnd = cm_get_sam_handle(domain->name))) { - talloc_destroy(mem_ctx); - return; - } - - cli_samr_close(hnd->cli, mem_ctx, pdom_pol); - ZERO_STRUCTP(pdom_pol); - - talloc_destroy(mem_ctx); -} /* Free state information held for {set,get,end}{pw,gr}ent() functions */ @@ -855,9 +305,6 @@ void free_getent_state(struct getent_state *state) while(temp != NULL) { struct getent_state *next; - /* Close SAMR cache handle. */ - close_samr_domain_handle(temp->domain, &temp->dom_pol); - /* Free sam entries then list entry */ SAFE_FREE(state->sam_entries); @@ -869,68 +316,23 @@ void free_getent_state(struct getent_state *state) } } -struct getent_state *create_getent_state(struct winbindd_domain *domain) -{ - struct getent_state *state = (struct getent_state *)malloc(sizeof(struct getent_state)); - - if (state == NULL) - return NULL; - - ZERO_STRUCTP(state); - state->domain = domain; - - /* Create and cache a SAMR domain handle. */ - if (!create_samr_domain_handle(state->domain, &state->dom_pol)) { - free_getent_state(state); - return NULL; - } - - return state; -} - /* Initialise trusted domain info */ BOOL winbindd_param_init(void) { - /* Parse winbind uid and winbind_gid parameters */ - - if (!lp_winbind_uid(&server_state.uid_low, &server_state.uid_high)) { - DEBUG(0, ("winbind uid range missing or invalid\n")); - return False; - } - - if (!lp_winbind_gid(&server_state.gid_low, &server_state.gid_high)) { - DEBUG(0, ("winbind gid range missing or invalid\n")); - return False; - } - - return True; -} + /* Parse winbind uid and winbind_gid parameters */ -/* Query display info for a domain. This returns enough information plus a - bit extra to give an overview of domain users for the User Manager - application. */ - -NTSTATUS winbindd_query_dispinfo(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, POLICY_HND *pdom_pol, - uint32 *start_ndx, uint16 info_level, - uint32 *num_entries, SAM_DISPINFO_CTR *ctr) -{ - CLI_POLICY_HND *hnd; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - /* Get sam handle */ - - if (!(hnd = cm_get_sam_handle(domain->name))) - return NT_STATUS_UNSUCCESSFUL; - - /* Query display info */ - - result = cli_samr_query_dispinfo(hnd->cli, mem_ctx, - pdom_pol, start_ndx, info_level, - num_entries, 0xffff, ctr); - - return result; + if (!lp_winbind_uid(&server_state.uid_low, &server_state.uid_high)) { + DEBUG(0, ("winbind uid range missing or invalid\n")); + return False; + } + + if (!lp_winbind_gid(&server_state.gid_low, &server_state.gid_high)) { + DEBUG(0, ("winbind gid range missing or invalid\n")); + return False; + } + + return True; } /* Check if a domain is present in a comma-separated list of domains */ @@ -949,17 +351,43 @@ BOOL check_domain_env(char *domain_env, char *domain) } /* Parse a string of the form DOMAIN/user into a domain and a user */ +extern fstring global_myworkgroup; -BOOL parse_domain_user(char *domuser, fstring domain, fstring user) +BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) { char *p = strchr(domuser,*lp_winbind_separator()); - if (!p) + if (!(p || lp_winbind_use_default_domain())) return False; - fstrcpy(user, p+1); - fstrcpy(domain, domuser); - domain[PTR_DIFF(p, domuser)] = 0; + if(!p && lp_winbind_use_default_domain()) { + fstrcpy(user, domuser); + fstrcpy(domain, global_myworkgroup); + } else { + fstrcpy(user, p+1); + fstrcpy(domain, domuser); + domain[PTR_DIFF(p, domuser)] = 0; + } strupper(domain); return True; } + +/* + Fill DOMAIN\\USERNAME entry accounting 'winbind use default domain' and + 'winbind separator' options. + This means: + - omit DOMAIN when 'winbind use default domain = true' and DOMAIN is + global_myworkgroup + +*/ +void fill_domain_username(fstring name, const char *domain, const char *user) +{ + if(lp_winbind_use_default_domain() && + !strcmp(global_myworkgroup, domain)) { + strlcpy(name, user, sizeof(fstring)); + } else { + slprintf(name, sizeof(fstring) - 1, "%s%s%s", + domain, lp_winbind_separator(), + user); + } +} diff --git a/source/nsswitch/winbindd_wins.c b/source/nsswitch/winbindd_wins.c index 398488f4032..0aab4ddd650 100644 --- a/source/nsswitch/winbindd_wins.c +++ b/source/nsswitch/winbindd_wins.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. Winbind daemon - WINS related functions @@ -95,7 +94,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return NULL; p = wins_srv_ip(); - if( !is_zero_ip(p) ) { + if( !zero_ip(p) ) { ret = name_query(fd,name,0x20,False,True, p, count); goto out; } @@ -126,14 +125,14 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) { char response[1024]; - int i, count, len, size, maxsize; + int i, count, len, size; struct node_status *status; DEBUG(3, ("[%5d]: wins_byip %s\n", state->pid, state->request.data.name)); *response = '\0'; - maxsize = len = sizeof(response) - 1; + len = sizeof(response) - 2; if ((status = lookup_byaddr_backend(state->request.data.name, &count))){ size = strlen(state->request.data.name) + 1; @@ -142,8 +141,8 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) return WINBINDD_ERROR; } len -= size; - safe_strcat(response,state->request.data.name,maxsize); - safe_strcat(response,"\t",maxsize); + safe_strcat(response,state->request.data.name,size); + safe_strcat(response,"\t",1); for (i = 0; i < count; i++) { /* ignore group names */ if (status[i].flags & 0x80) continue; @@ -154,10 +153,11 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) return WINBINDD_ERROR; } len -= size; - safe_strcat(response, status[i].name, maxsize); - safe_strcat(response, " ", maxsize); + safe_strcat(response, status[i].name, size); + safe_strcat(response, " ", 1); } } + response[strlen(response)-1] = '\n'; SAFE_FREE(status); } fstrcpy(state->response.data.name.name,response); @@ -169,7 +169,7 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) { struct in_addr *ip_list; - int i, count, len, size, maxsize; + int i, count, len, size; char response[1024]; char * addr; @@ -177,7 +177,7 @@ enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) state->request.data.name)); *response = '\0'; - maxsize = len = sizeof(response) - 1; + len = sizeof(response) - 2; if ((ip_list = lookup_byname_backend(state->request.data.name,&count))){ for (i = count; i ; i--) { @@ -188,16 +188,18 @@ enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) return WINBINDD_ERROR; } len -= size; - safe_strcat(response,addr,maxsize); - safe_strcat(response," ",maxsize); + if (i != 0) + response[strlen(response)-1] = ' '; + safe_strcat(response,addr,size); + safe_strcat(response,"\t",1); } size = strlen(state->request.data.name) + 1; if (size > len) { SAFE_FREE(ip_list); return WINBINDD_ERROR; } - response[strlen(response)-1] = '\t'; - safe_strcat(response,state->request.data.name,maxsize); + safe_strcat(response,state->request.data.name,size); + safe_strcat(response,"\n",1); SAFE_FREE(ip_list); } else return WINBINDD_ERROR; diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c index 337e530d127..2133f817d1a 100644 --- a/source/nsswitch/wins.c +++ b/source/nsswitch/wins.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. a WINS nsswitch module Copyright (C) Andrew Tridgell 1999 @@ -35,6 +34,8 @@ static int initialised; +extern BOOL AllowDebugChange; + /* Use our own create socket code so we don't recurse.... */ static int wins_lookup_open_socket_in(void) @@ -77,13 +78,14 @@ static void nss_wins_init(void) { initialised = 1; DEBUGLEVEL = 0; + AllowDebugChange = False; /* needed for lp_xx() functions */ charset_initialise(); TimeInit(); setup_logging("nss_wins",False); - lp_load(CONFIGFILE,True,False,False); + lp_load(dyn_CONFIGFILE,True,False,False); load_interfaces(); codepage_initialise(lp_client_code_page()); } @@ -204,7 +206,7 @@ int lookup(nsd_file_t *rq) if ( status = lookup_byaddr_backend(key, &count)) { size = strlen(key) + 1; if (size > len) { - SAFE_FREE(status); + free(status); return NSD_ERROR; } len -= size; @@ -216,7 +218,7 @@ int lookup(nsd_file_t *rq) if (status[i].type == 0x20) { size = sizeof(status[i].name) + 1; if (size > len) { - SAFE_FREE(status); + free(status); return NSD_ERROR; } len -= size; @@ -226,7 +228,7 @@ int lookup(nsd_file_t *rq) } } response[strlen(response)-1] = '\n'; - SAFE_FREE(status); + free(status); } } else if (strcasecmp(map,"hosts.byname") == 0) { if (ip_list = lookup_byname_backend(key, &count)) { @@ -234,7 +236,7 @@ int lookup(nsd_file_t *rq) addr = inet_ntoa(ip_list[i-1]); size = strlen(addr) + 1; if (size > len) { - SAFE_FREE(ip_list); + free(ip_list); return NSD_ERROR; } len -= size; @@ -245,13 +247,13 @@ int lookup(nsd_file_t *rq) } size = strlen(key) + 1; if (size > len) { - SAFE_FREE(ip_list); + free(ip_list); return NSD_ERROR; } strncat(response,key,size); strncat(response,"\n",1); found = True; - SAFE_FREE(ip_list); + free(ip_list); } } @@ -309,7 +311,8 @@ _nss_wins_gethostbyname_r(const char *name, struct hostent *he, host_addresses++; } - SAFE_FREE(ip_list); + if (ip_list) + free(ip_list); memcpy(buffer, name, namelen); he->h_name = buffer; diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 0423c91c31a..c6ed9137360 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -170,6 +170,7 @@ typedef struct char *szWinbindSeparator; BOOL bWinbindEnumUsers; BOOL bWinbindEnumGroups; + BOOL bWinbindUseDefaultDomain; char *szAddShareCommand; char *szChangeShareCommand; char *szDeleteShareCommand; @@ -1074,6 +1075,7 @@ static struct parm_struct parm_table[] = { {"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0}, {"winbind enum users", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0}, {"winbind enum groups", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0}, + {"winbind use default domain", P_BOOL, P_GLOBAL, &Globals.bWinbindUseDefaultDomain, NULL, NULL, 0}, {NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0} }; @@ -1404,6 +1406,7 @@ static void init_globals(void) Globals.bWinbindEnumUsers = True; Globals.bWinbindEnumGroups = True; + Globals.bWinbindUseDefaultDomain = False; /* * This must be done last as it checks the value in @@ -1537,6 +1540,7 @@ FN_GLOBAL_STRING(lp_template_shell, &Globals.szTemplateShell) FN_GLOBAL_STRING(lp_winbind_separator, &Globals.szWinbindSeparator) FN_GLOBAL_BOOL(lp_winbind_enum_users, &Globals.bWinbindEnumUsers) FN_GLOBAL_BOOL(lp_winbind_enum_groups, &Globals.bWinbindEnumGroups) +FN_GLOBAL_BOOL(lp_winbind_use_default_domain, &Globals.bWinbindUseDefaultDomain) FN_GLOBAL_STRING(lp_codepagedir,&Globals.szCodePageDir) #ifdef WITH_LDAP_SAM FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 3d3f7038efb..9dcff5a12ee 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3799,7 +3799,7 @@ BOOL nt_printing_getsec(TALLOC_CTX *ctx, char *printername, SEC_DESC_BUF **secde /* Change sd owner to workgroup administrator */ - if (winbind_lookup_name(lp_workgroup(), &owner_sid, + if (winbind_lookup_name(NULL, lp_workgroup(), &owner_sid, &name_type)) { SEC_DESC_BUF *new_secdesc_ctr = NULL; SEC_DESC *psd = NULL; diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c index 10a9efbe49d..fd82325be73 100644 --- a/source/rpc_parse/parse_lsa.c +++ b/source/rpc_parse/parse_lsa.c @@ -1,6 +1,5 @@ /* - * Unix SMB/Netbios implementation. - * Version 1.9. + * Unix SMB/CIFS implementation. * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, @@ -138,8 +137,7 @@ static BOOL lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, Inits an LSA_SEC_QOS structure. ********************************************************************/ -void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff, - uint32 unknown) +void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff) { DEBUG(5, ("init_lsa_sec_qos\n")); @@ -147,7 +145,6 @@ void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff, qos->sec_imp_level = imp_lev; qos->sec_ctxt_mode = ctxt; qos->effective_only = eff; - qos->unknown = unknown; } /******************************************************************* @@ -178,13 +175,10 @@ static BOOL lsa_io_sec_qos(char *desc, LSA_SEC_QOS *qos, prs_struct *ps, return False; if(!prs_uint8 ("effective_only", ps, depth, &qos->effective_only)) return False; - if(!prs_uint32("unknown ", ps, depth, &qos->unknown)) - return False; if (qos->len != prs_offset(ps) - start) { DEBUG(3,("lsa_io_sec_qos: length %x does not match size %x\n", qos->len, prs_offset(ps) - start)); - return False; } return True; @@ -255,7 +249,11 @@ static BOOL lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, } #endif - if (attr->ptr_sec_qos != 0 && attr->sec_qos != NULL) { + if (attr->ptr_sec_qos != 0) { + if (UNMARSHALLING(ps)) + if (!(attr->sec_qos = (LSA_SEC_QOS *)prs_alloc_mem(ps,sizeof(LSA_SEC_QOS)))) + return False; + if(!lsa_io_sec_qos("sec_qos", attr->sec_qos, ps, depth)) return False; } @@ -277,8 +275,7 @@ void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, r_q->ptr = 1; /* undocumented pointer */ - if (qos == NULL) - r_q->des_access = desired_access; + r_q->des_access = desired_access; r_q->system_name = system_name; init_lsa_obj_attr(&r_q->attr, attributes, qos); @@ -304,10 +301,8 @@ BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, if(!lsa_io_obj_attr("", &r_q->attr, ps, depth)) return False; - if (r_q->attr.ptr_sec_qos == 0) { - if(!prs_uint32("des_access", ps, depth, &r_q->des_access)) - return False; - } + if(!prs_uint32("des_access", ps, depth, &r_q->des_access)) + return False; return True; } @@ -344,8 +339,7 @@ void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name, r_q->ptr = 1; /* undocumented pointer */ - if (qos == NULL) - r_q->des_access = desired_access; + r_q->des_access = desired_access; init_unistr2(&r_q->uni_server_name, server_name, strlen(server_name) + 1); @@ -371,10 +365,8 @@ BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, if(!lsa_io_obj_attr("", &r_q->attr, ps, depth)) return False; - if (r_q->attr.ptr_sec_qos == 0) { - if(!prs_uint32("des_access", ps, depth, &r_q->des_access)) - return False; - } + if(!prs_uint32("des_access", ps, depth, &r_q->des_access)) + return False; return True; } @@ -1052,7 +1044,7 @@ makes a structure. ********************************************************************/ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, - POLICY_HND *hnd, int num_names, char **names) + POLICY_HND *hnd, int num_names, const char **names) { int i; @@ -1078,11 +1070,11 @@ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, } for (i = 0; i < num_names; i++) { - char* name = names[i]; - int len = strlen(name); + int len; + len = strlen(names[i]); init_uni_hdr(&q_l->hdr_name[i], len); - init_unistr2(&q_l->uni_name[i], name, len); + init_unistr2(&q_l->uni_name[i], names[i], len); } } @@ -1608,6 +1600,9 @@ BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_stru if(!smb_io_unistr2("uni2_srvname", &q_c->uni2_srvname, q_c->ptr_srvname, ps, depth)) /* server name to be looked up */ return False; + if (!prs_align(ps)) + return False; + if(!prs_uint32("unk1", ps, depth, &q_c->unk1)) return False; if(!prs_uint32("unk2", ps, depth, &q_c->unk2)) @@ -1660,6 +1655,14 @@ BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_stru return True; } +void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access) +{ + memcpy(&trn->pol, hnd, sizeof(trn->pol)); + + init_dom_sid2(&trn->sid, sid); + trn->access = desired_access; +} + /******************************************************************* Reads or writes an LSA_Q_OPENACCOUNT structure. ********************************************************************/ @@ -1675,7 +1678,7 @@ BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, i if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) return False; - if(!smb_io_dom_sid2("", &r_c->sid, ps, depth)) /* domain SID */ + if(!smb_io_dom_sid2("sid", &r_c->sid, ps, depth)) /* domain SID */ return False; if(!prs_uint32("access", ps, depth, &r_c->access)) @@ -1706,6 +1709,12 @@ BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, } +void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd) +{ + memcpy(&trn->pol, hnd, sizeof(trn->pol)); + +} + /******************************************************************* Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure. ********************************************************************/ @@ -1800,6 +1809,7 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u r_u->set.set=set; r_u->set.count=count; r_u->set.control=control; + DEBUG(10,("init_lsa_r_enum_privsaccount: %d %d privileges\n", r_u->count, r_u->set.count)); } /******************************************************************* @@ -1822,6 +1832,12 @@ BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_str return False; /* malloc memory if unmarshalling here */ + + if (UNMARSHALLING(ps) && r_c->count!=0) { + if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count))) + return False; + + } if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth)) return False; @@ -1873,3 +1889,209 @@ BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_str return True; } + + +/******************************************************************* + Reads or writes an LSA_Q_SETSYSTEMACCOUNT structure. +********************************************************************/ + +BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_setsystemaccount"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) + return False; + + if(!prs_uint32("access", ps, depth, &r_c->access)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes an LSA_R_SETSYSTEMACCOUNT structure. +********************************************************************/ + +BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_setsystemaccount"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} + + +void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name) +{ + int len_name = strlen(name); + memcpy(&trn->pol, hnd, sizeof(trn->pol)); + + if(len_name == 0) + len_name = 1; + + init_uni_hdr(&trn->hdr_right, len_name); + init_unistr2(&trn->uni2_right, name, len_name); +} + +/******************************************************************* + Reads or writes an LSA_Q_LOOKUPPRIVVALUE structure. +********************************************************************/ + +BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_lookupprivvalue"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) + return False; + if(!smb_io_unihdr ("hdr_name", &r_c->hdr_right, ps, depth)) + return False; + if(!smb_io_unistr2("uni2_right", &r_c->uni2_right, r_c->hdr_right.buffer, ps, depth)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes an LSA_R_LOOKUPPRIVVALUE structure. +********************************************************************/ + +BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_lookupprivvalue"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!lsa_io_luid("luid", &r_c->luid, ps, depth)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} + + +/******************************************************************* + Reads or writes an LSA_Q_ADDPRIVS structure. +********************************************************************/ + +BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_addprivs"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) + return False; + + if(!prs_uint32("count", ps, depth, &r_c->count)) + return False; + + if (UNMARSHALLING(ps) && r_c->count!=0) { + if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count))) + return False; + } + + if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes an LSA_R_ADDPRIVS structure. +********************************************************************/ + +BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_addprivs"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes an LSA_Q_REMOVEPRIVS structure. +********************************************************************/ + +BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_removeprivs"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) + return False; + + if(!prs_uint32("allrights", ps, depth, &r_c->allrights)) + return False; + + if(!prs_uint32("ptr", ps, depth, &r_c->ptr)) + return False; + + /* + * JFM: I'm not sure at all if the count is inside the ptr + * never seen one with ptr=0 + */ + + if (r_c->ptr!=0) { + if(!prs_uint32("count", ps, depth, &r_c->count)) + return False; + + if (UNMARSHALLING(ps) && r_c->count!=0) { + if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count))) + return False; + } + + if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth)) + return False; + } + + return True; +} + +/******************************************************************* + Reads or writes an LSA_R_REMOVEPRIVS structure. +********************************************************************/ + +BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_removeprivs"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} + + diff --git a/source/rpc_server/srv_util.c b/source/rpc_server/srv_util.c index a1e85d80f45..67f5e99c3b6 100644 --- a/source/rpc_server/srv_util.c +++ b/source/rpc_server/srv_util.c @@ -76,6 +76,8 @@ rid_name domain_group_rids[] = { 0 , NULL } }; +#define LSA_MAX_GROUPS 96 + int make_dom_gids(TALLOC_CTX *ctx, char *gids_str, DOM_GID **ppgids) { char *ptr; diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 8b3e49051ed..13cab9aaef5 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -95,8 +95,9 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, /* Lookup the names */ - result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, - &argv[1], &sids, &types, &num_names); + result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, + (const char**)(argv + 1), &sids, + &types, &num_names); if (!NT_STATUS_IS_OK(result)) goto done; @@ -123,6 +124,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_SID *sids; + char **domains; char **names; uint32 *types; int num_names, i; @@ -153,8 +155,8 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup the SIDs */ - result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids, - &names, &types, &num_names); + result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids, + &domains, &names, &types, &num_names); if (!NT_STATUS_IS_OK(result)) goto done; @@ -165,8 +167,9 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, fstring sid_str; sid_to_string(sid_str, &sids[i]); - printf("%s %s (%d)\n", sid_str, names[i] ? names[i] : - "*unknown*", types[i]); + printf("%s [%s]\\[%s] (%d)\n", sid_str, + domains[i] ? domains[i] : "*unknown*", + names[i] ? names[i] : "*unknown*", types[i]); } done: diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk index 68720258ec0..8283dc02e9b 100644 --- a/source/script/mkproto.awk +++ b/source/script/mkproto.awk @@ -120,7 +120,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^NTSTATUS|^WERROR|^CLI_POLICY_HND/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^DATA_BLOB/ ) { gotstart = 1; } diff --git a/source/smbd/uid.c b/source/smbd/uid.c index 64dce1679f2..3810360cefc 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -450,7 +450,7 @@ BOOL lookup_name(const char *name, DOM_SID *psid, enum SID_NAME_USE *name_type) *name_type = SID_NAME_UNKNOWN; - if (!winbind_lookup_name(name, psid, name_type) || (*name_type != SID_NAME_USER) ) { + if (!winbind_lookup_name(NULL, name, psid, name_type) || (*name_type != SID_NAME_USER) ) { BOOL ret = False; DEBUG(10, ("lookup_name: winbind lookup for %s failed - trying local\n", name)); diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index 87dabf165d4..e8a6eb593c3 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -52,64 +52,6 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval) tdb_chainunlock(tdb, key); } -/**************************************************************************** - Fetch a value by a arbitrary blob key, return -1 if not found. - JRA. DEPRECATED ! Use tdb_fetch_int32_byblob instead. -****************************************************************************/ - -int tdb_fetch_int_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len) -{ - TDB_DATA key, data; - int ret; - - key.dptr = keyval; - key.dsize = len; - data = tdb_fetch(tdb, key); - if (!data.dptr || data.dsize != sizeof(int)) - return -1; - - memcpy(&ret, data.dptr, sizeof(int)); - SAFE_FREE(data.dptr); - return ret; -} - -/**************************************************************************** - Fetch a value by string key, return -1 if not found. - JRA. DEPRECATED ! Use tdb_fetch_int32 instead. -****************************************************************************/ - -int tdb_fetch_int(TDB_CONTEXT *tdb, char *keystr) -{ - return tdb_fetch_int_byblob(tdb, keystr, strlen(keystr) + 1); -} - -/**************************************************************************** - Store a value by an arbitary blob key, return 0 on success, -1 on failure. - JRA. DEPRECATED ! Use tdb_store_int32_byblob instead. -****************************************************************************/ - -int tdb_store_int_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int v) -{ - TDB_DATA key, data; - - key.dptr = keystr; - key.dsize = len; - data.dptr = (void *)&v; - data.dsize = sizeof(int); - - return tdb_store(tdb, key, data, TDB_REPLACE); -} - -/**************************************************************************** - Store a value by string key, return 0 on success, -1 on failure. - JRA. DEPRECATED ! Use tdb_store_int32 instead. -****************************************************************************/ - -int tdb_store_int(TDB_CONTEXT *tdb, char *keystr, int v) -{ - return tdb_store_int_byblob(tdb, keystr, strlen(keystr) + 1, v); -} - /**************************************************************************** Fetch a int32 value by a arbitrary blob key, return -1 if not found. Output is int32 in native byte order. @@ -203,41 +145,6 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) return tdb_fetch(tdb, key); } -/**************************************************************************** - Atomic integer change. Returns old value. To create, set initial value in *oldval. - Deprecated. Use int32 version. JRA. -****************************************************************************/ - -int tdb_change_int_atomic(TDB_CONTEXT *tdb, char *keystr, int *oldval, int change_val) -{ - int val; - int ret = -1; - - if (tdb_lock_bystring(tdb, keystr) == -1) - return -1; - - if ((val = tdb_fetch_int(tdb, keystr)) == -1) { - if (tdb_error(tdb) != TDB_ERR_NOEXIST) - goto err_out; - - val = *oldval; - - } else { - *oldval = val; - val += change_val; - } - - if (tdb_store_int(tdb, keystr, val) == -1) - goto err_out; - - ret = 0; - - err_out: - - tdb_unlock_bystring(tdb, keystr); - return ret; -} - /**************************************************************************** Atomic integer change. Returns old value. To create, set initial value in *oldval. ****************************************************************************/ diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 382d836a5e8..e89c4c9232e 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -1,7 +1,6 @@ /* - Unix SMB/Netbios implementation. + Unix SMB/CIFS implementation. ACL get/set utility - Version 3.0 Copyright (C) Andrew Tridgell 2000 Copyright (C) Tim Potter 2000 @@ -106,6 +105,7 @@ static BOOL cacls_open_policy_hnd(void) /* convert a SID to a string, either numeric or username/group */ static void SidToString(fstring str, DOM_SID *sid) { + char **domains = NULL; char **names = NULL; uint32 *types = NULL; int num_names; @@ -117,19 +117,23 @@ static void SidToString(fstring str, DOM_SID *sid) /* Ask LSA to convert the sid to a name */ if (!cacls_open_policy_hnd() || - !NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, sid, &names, &types, - &num_names)) || - !names || !names[0]) { + !NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx, + &pol, 1, sid, &domains, &names, + &types, &num_names)) || + !domains || !domains[0] || !names || !names[0]) { return; } /* Converted OK */ - fstrcpy(str, names[0]); + slprintf(str, sizeof(fstring) - 1, "%s%s%s", + domains[0], lp_winbind_separator(), + names[0]); + } /* convert a string to a SID, either numeric or username/group */ -static BOOL StringToSid(DOM_SID *sid, char *str) +static BOOL StringToSid(DOM_SID *sid, const char *str) { uint32 *types = NULL; DOM_SID *sids = NULL; @@ -141,8 +145,9 @@ static BOOL StringToSid(DOM_SID *sid, char *str) } if (!cacls_open_policy_hnd() || - !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, &str, &sids, &types, - &num_sids))) { + !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, + &str, + &sids, &types, &num_sids))) { result = False; goto done; } @@ -265,12 +270,12 @@ static BOOL parse_ace(SEC_ACE *ace, char *str) /* Only numeric form accepted for flags at present */ - if (!(next_token(NULL, tok, "/", sizeof(fstring)) && + if (!(next_token(&p, tok, "/", sizeof(fstring)) && sscanf(tok, "%i", &aflags))) { return False; } - if (!next_token(NULL, tok, "/", sizeof(fstring))) { + if (!next_token(&p, tok, "/", sizeof(fstring))) { return False; } @@ -402,7 +407,7 @@ static SEC_DESC *sec_desc_parse(char *str) static void sec_desc_print(FILE *f, SEC_DESC *sd) { fstring sidstr; - int i; + uint32 i; printf("REVISION:%d\n", sd->revision); @@ -525,18 +530,30 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode, static int ace_compare(SEC_ACE *ace1, SEC_ACE *ace2) { - if (sec_ace_equal(ace1, ace2)) return 0; - if (ace1->type != ace2->type) return ace2->type - ace1->type; - if (sid_compare(&ace1->trustee, &ace2->trustee)) return sid_compare(&ace1->trustee, &ace2->trustee); - if (ace1->flags != ace2->flags) return ace1->flags - ace2->flags; - if (ace1->info.mask != ace2->info.mask) return ace1->info.mask - ace2->info.mask; - if (ace1->size != ace2->size) return ace1->size - ace2->size; + if (sec_ace_equal(ace1, ace2)) + return 0; + + if (ace1->type != ace2->type) + return ace2->type - ace1->type; + + if (sid_compare(&ace1->trustee, &ace2->trustee)) + return sid_compare(&ace1->trustee, &ace2->trustee); + + if (ace1->flags != ace2->flags) + return ace1->flags - ace2->flags; + + if (ace1->info.mask != ace2->info.mask) + return ace1->info.mask - ace2->info.mask; + + if (ace1->size != ace2->size) + return ace1->size - ace2->size; + return memcmp(ace1, ace2, sizeof(SEC_ACE)); } static void sort_acl(SEC_ACL *the_acl) { - int i; + uint32 i; if (!the_acl) return; qsort(the_acl->ace, the_acl->num_aces, sizeof(the_acl->ace[0]), QSORT_CAST ace_compare); @@ -562,7 +579,7 @@ static int cacl_set(struct cli_state *cli, char *filename, { int fnum; SEC_DESC *sd, *old; - int i, j; + uint32 i, j; size_t sd_size; int result = EXIT_OK; @@ -599,7 +616,7 @@ static int cacl_set(struct cli_state *cli, char *filename, for (j=0;old->dacl && jdacl->num_aces;j++) { if (sec_ace_equal(&sd->dacl->ace[i], &old->dacl->ace[j])) { - int k; + uint32 k; for (k=j; kdacl->num_aces-1;k++) { old->dacl->ace[k] = old->dacl->ace[k+1]; } @@ -689,7 +706,6 @@ struct cli_state *connect_one(char *share) { struct cli_state *c; struct nmb_name called, calling; - char *server_n; struct in_addr ip; extern pstring global_myname; @@ -699,8 +715,6 @@ struct cli_state *connect_one(char *share) *share = 0; share++; - server_n = server; - zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); @@ -710,9 +724,8 @@ struct cli_state *connect_one(char *share) zero_ip(&ip); /* have to open a new connection */ - if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) || - !cli_connect(c, server_n, &ip)) { - DEBUG(0,("Connection to %s failed\n", server_n)); + if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, &ip)) { + DEBUG(0,("Connection to %s failed\n", server)); cli_shutdown(c); return NULL; } @@ -779,6 +792,8 @@ static void usage(void) \t-G username change group ownership of a file\n\ \t-n don't resolve sids or masks to names\n\ \t-h print help\n\ +\t-d debuglevel set debug output level\n\ +\t-U username user to autheticate as\n\ \n\ The username can be of the form username%%password or\n\ workgroup\\username%%password.\n\n\ @@ -846,7 +861,7 @@ You can string acls together with spaces, commas or newlines\n\ } } - while ((opt = getopt(argc, argv, "U:nhS:D:A:M:C:G:t")) != EOF) { + while ((opt = getopt(argc, argv, "U:nhdS:D:A:M:C:G:t")) != EOF) { switch (opt) { case 'U': pstrcpy(username,optarg); @@ -901,6 +916,10 @@ You can string acls together with spaces, commas or newlines\n\ talloc_destroy(ctx); exit(EXIT_PARSE_ERROR); + case 'd': + DEBUGLEVEL = atoi(optarg); + break; + default: printf("Unknown option %c (%d)\n", (char)opt, opt); talloc_destroy(ctx); -- cgit From 902a8b775381b381b5f55ec067d55b6444f3a30e Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 22 Mar 2002 00:23:22 +0000 Subject: add a -n maxloops option so this can be run in a script and end after a certain number of iterations. --- source/utils/masktest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/utils/masktest.c b/source/utils/masktest.c index 8a00c061400..e477f09b535 100644 --- a/source/utils/masktest.c +++ b/source/utils/masktest.c @@ -33,6 +33,7 @@ static char *maskchars = "<>\"?*abc."; static char *filechars = "abcdefghijklm."; static int verbose; static int die_on_error; +static int NumLoops = 0; /* a test fn for LANMAN mask support */ int ms_fnmatch_lanman_core(char *pattern, char *string) @@ -382,6 +383,8 @@ static void test_mask(int argc, char *argv[], if (strspn(file+l, ".") == strlen(file+l)) continue; testpair(cli, mask, file); + if (NumLoops && (--NumLoops == 0)) + break; } finished: @@ -396,6 +399,7 @@ static void usage(void) masktest //server/share [options..]\n\ options:\n\ -d debuglevel\n\ + -n numloops\n\ -W workgroup\n\ -U user%%pass\n\ -s seed\n\ @@ -459,8 +463,11 @@ static void usage(void) seed = time(NULL); - while ((opt = getopt(argc, argv, "d:U:s:hm:f:aoW:M:vE")) != EOF) { + while ((opt = getopt(argc, argv, "n:d:U:s:hm:f:aoW:M:vE")) != EOF) { switch (opt) { + case 'n': + NumLoops = atoi(optarg); + break; case 'd': DEBUGLEVEL = atoi(optarg); break; -- cgit From a1b6168ee24e4ff8057755b772bbea16480a1b85 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 22 Mar 2002 05:44:01 +0000 Subject: Make debug statement less confusing. --- source/nsswitch/winbindd_sid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c index 3131e7b1964..a41bf759160 100644 --- a/source/nsswitch/winbindd_sid.c +++ b/source/nsswitch/winbindd_sid.c @@ -76,8 +76,11 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) char *name_domain, *name_user; DOM_SID sid; struct winbindd_domain *domain; - DEBUG(3, ("[%5d]: lookupname [%s]\\[%s]\n", state->pid, - state->request.data.name.dom_name, state->request.data.name.name)); + + DEBUG(3, ("[%5d]: lookupname %s%s%s\n", state->pid, + state->request.data.name.dom_name, + lp_winbind_separator(), + state->request.data.name.name)); name_domain = state->request.data.name.dom_name; name_user = state->request.data.name.name; -- cgit From 1ccf281ea545cde002e3e242f5a58ffb51943005 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Mar 2002 02:57:38 +0000 Subject: Fix the mp3 rename bug - also tidy up our open code and remove the special cases for rename and unlink. Had to add desired_access into the share mode record. Jeremy. --- source/include/proto.h | 4 +- source/include/smb.h | 9 +- source/lib/util_sock.c | 2 +- source/locking/locking.c | 7 +- source/rpc_server/srv_srvsvc_nt.c | 4 +- source/smbd/dir.c | 4 +- source/smbd/nttrans.c | 9 +- source/smbd/open.c | 330 +++++++++++++++++++------------------- source/smbd/reply.c | 81 +++++++--- source/smbd/trans2.c | 2 +- source/utils/status.c | 5 +- 11 files changed, 246 insertions(+), 211 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index baeda9a6291..489b0e6f866 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4411,8 +4411,8 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ int *Access,int *action); files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf); int close_file_fchmod(files_struct *fsp); -files_struct *open_directory(connection_struct *conn, char *fname, - SMB_STRUCT_STAT *psbuf, int share_mode, int smb_ofun, mode_t unixmode, int *action); +files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action); BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op); /*The following definitions come from smbd/oplock.c */ diff --git a/source/include/smb.h b/source/include/smb.h index 393d92cfee3..a1570300963 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -129,11 +129,6 @@ implemented */ #define GET_DELETE_ON_CLOSE_FLAG(x) (((x) & DELETE_ON_CLOSE_FLAG) ? True : False) #define SET_DELETE_ON_CLOSE_FLAG(x) ((x) ? DELETE_ON_CLOSE_FLAG : 0) -/* was delete access requested in NT open ? */ -#define DELETE_ACCESS_REQUESTED (1<<17) -#define GET_DELETE_ACCESS_REQUESTED(x) (((x) & DELETE_ACCESS_REQUESTED) ? True : False) -#define SET_DELETE_ACCESS_REQUESTED(x) ((x) ? DELETE_ACCESS_REQUESTED : 0) - /* open disposition values */ #define FILE_EXISTS_FAIL 0 #define FILE_EXISTS_OPEN 1 @@ -404,6 +399,7 @@ typedef struct files_struct write_cache *wcp; struct timeval open_time; int share_mode; + uint32 desired_access; time_t pending_modtime; int oplock_type; int sent_oplock_break; @@ -571,6 +567,7 @@ typedef struct { uint16 op_port; uint16 op_type; int share_mode; + uint32 desired_access; struct timeval time; SMB_DEV_T dev; SMB_INO_T inode; @@ -1395,7 +1392,7 @@ extern int global_is_multibyte_codepage; #define COPYBUF_SIZE (8*1024) /* - * Integers used to override error codes. + * Values used to override error codes. */ extern int unix_ERR_class; extern int unix_ERR_code; diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 02608cc4ff6..94388c88a37 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -623,7 +623,7 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) /* * A WRITEX with CAP_LARGE_WRITEX can be 64k worth of data plus 65 bytes - * of header. Don't print the error if this fits.... JRA. + * of header. Don't print the error if this fits.... JRA. */ if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { diff --git a/source/locking/locking.c b/source/locking/locking.c index be0987228c0..90ef61ddf51 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -423,8 +423,8 @@ static char *share_mode_str(int num, share_mode_entry *e) static pstring share_str; slprintf(share_str, sizeof(share_str)-1, "share_mode_entry[%d]: \ -pid = %u, share_mode = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f", - num, e->pid, e->share_mode, e->op_port, e->op_type, e->share_file_id, +pid = %u, share_mode = 0x%x, desired_access = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f", + num, e->pid, e->share_mode, (unsigned int)e->desired_access, e->op_port, e->op_type, e->share_file_id, (unsigned int)e->dev, (double)e->inode ); return share_str; @@ -533,6 +533,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t memset(e, '\0', sizeof(share_mode_entry)); e->pid = sys_getpid(); e->share_mode = fsp->share_mode; + e->desired_access = fsp->desired_access; e->op_port = port; e->op_type = op_type; memcpy(x, &fsp->open_time, sizeof(struct timeval)); @@ -543,7 +544,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t /******************************************************************* Check if two share mode entries are identical, ignoring oplock - and port info. + and port info and desired_access. ********************************************************************/ BOOL share_modes_identical( share_mode_entry *e1, share_mode_entry *e2) diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index acf137b130b..1ffb77c3c2a 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -1636,7 +1636,7 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC if (!fsp) { /* Perhaps it is a directory */ if (errno == EISDIR) - fsp = open_directory(conn, filename, &st,0, + fsp = open_directory(conn, filename, &st,FILE_READ_ATTRIBUTES,0, (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action); if (!fsp) { @@ -1742,7 +1742,7 @@ WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_ if (!fsp) { /* Perhaps it is a directory */ if (errno == EISDIR) - fsp = open_directory(conn, filename, &st,0, + fsp = open_directory(conn, filename, &st,FILE_READ_ATTRIBUTES,0, (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action); if (!fsp) { diff --git a/source/smbd/dir.c b/source/smbd/dir.c index ce8b992a301..ac669420826 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -688,7 +688,7 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) /* Pseudo-open the file (note - no fd's created). */ if(S_ISDIR(ste.st_mode)) - fsp = open_directory(conn, name, &ste, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), + fsp = open_directory(conn, name, &ste, 0, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), unix_mode(conn,aRONLY|aDIR, name), &smb_action); else fsp = open_file_shared1(conn, name, &ste, FILE_READ_ATTRIBUTES, SET_DENY_MODE(DENY_NONE), @@ -699,7 +699,7 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) /* Get NT ACL -allocated in main loop talloc context. No free needed here. */ sd_size = conn->vfs_ops.fget_nt_acl(fsp, fsp->fd, &psd); - close_file(fsp, True); + close_file(fsp, False); /* No access if SD get failed. */ if (!sd_size) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 0f2a13ab106..66ffadb8196 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -488,7 +488,6 @@ static int map_share_mode( char *fname, uint32 create_options, */ if(*desired_access & DELETE_ACCESS) { - smb_open_mode |= DELETE_ACCESS_REQUESTED; DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode)); } @@ -776,7 +775,7 @@ int reply_ntcreate_and_X(connection_struct *conn, if(create_options & FILE_DIRECTORY_FILE) { oplock_request = 0; - fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); restore_case_semantics(file_attributes); @@ -844,7 +843,7 @@ int reply_ntcreate_and_X(connection_struct *conn, } oplock_request = 0; - fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); if(!fsp) { restore_case_semantics(file_attributes); @@ -1279,7 +1278,7 @@ static int call_nt_transact_create(connection_struct *conn, * CreateDirectory() call. */ - fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); if(!fsp) { restore_case_semantics(file_attributes); @@ -1312,7 +1311,7 @@ static int call_nt_transact_create(connection_struct *conn, } oplock_request = 0; - fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); if(!fsp) { restore_case_semantics(file_attributes); diff --git a/source/smbd/open.c b/source/smbd/open.c index 434b8e48177..6bb4df33322 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -153,7 +153,7 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, /* actually do the open */ - if (desired_access == 0 || (desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || + if ((desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || (local_flags & O_CREAT)) { fsp->fd = fd_open(conn, fname, local_flags, mode); @@ -204,6 +204,7 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, fsp->can_read = ((flags & O_WRONLY)==0); fsp->can_write = ((flags & (O_WRONLY|O_RDWR))!=0); fsp->share_mode = 0; + fsp->desired_access = desired_access; fsp->print_file = False; fsp->modified = False; fsp->oplock_type = NO_OPLOCK; @@ -365,7 +366,7 @@ static int access_table(int new_deny,int old_deny,int old_mode, check if we can open a file with a share mode ****************************************************************************/ -static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, int share_mode, +static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, int share_mode, uint32 desired_access, const char *fname, BOOL fcbopen, int *flags) { int deny_mode = GET_DENY_MODE(share_mode); @@ -393,12 +394,43 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i return False; } + /* this is a nasty hack, but necessary until we rewrite our open + handling to use a NTCreateX call as the basic call. + NT may open a file with neither read nor write access, and in + this case it expects the open not to conflict with any + existing deny modes. This happens (for example) during a + "xcopy /o" where the second file descriptor is used for + ACL sets + (tridge) + */ + + /* + * This is a bit wierd - the test for desired access not having the + * critical bits seems seems odd. Firstly, if both opens have no + * critical bits then always ignore. Then check the "allow delete" + * then check for either. This probably isn't quite right yet but + * gets us much closer. JRA. + */ + + /* + * If desired_access doesn't contain READ_DATA,WRITE_DATA,APPEND_DATA or EXECUTE + * and the existing desired_acces then share modes don't conflict. + */ + + if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) && + !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) { + DEBUG(5,("check_share_mode: Allowing open on file %s as both desired access (0x%x) \ +and existing desired access (0x%x) are non-data opens\n", + fname, (unsigned int)desired_access, (unsigned int)share->desired_access )); + return True; + } + /* * If delete access was requested and the existing share mode doesn't have * ALLOW_SHARE_DELETE then deny. */ - if (GET_DELETE_ACCESS_REQUESTED(share_mode) && !GET_ALLOW_SHARE_DELETE(share->share_mode)) { + if ((desired_access & DELETE_ACCESS) && !GET_ALLOW_SHARE_DELETE(share->share_mode)) { DEBUG(5,("check_share_mode: Failing open on file %s as delete access requested and allow share delete not set.\n", fname )); unix_ERR_class = ERRDOS; @@ -413,7 +445,7 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i * ALLOW_SHARE_DELETE then deny. */ - if (GET_DELETE_ACCESS_REQUESTED(share->share_mode) && !GET_ALLOW_SHARE_DELETE(share_mode)) { + if ((share->desired_access & DELETE_ACCESS) && !GET_ALLOW_SHARE_DELETE(share_mode)) { DEBUG(5,("check_share_mode: Failing open on file %s as delete access granted and allow share delete not requested.\n", fname )); unix_ERR_class = ERRDOS; @@ -422,9 +454,21 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i return False; } + /* + * If desired_access doesn't contain READ_DATA,WRITE_DATA,APPEND_DATA or EXECUTE + * then share modes don't conflict. Likewise with existing desired access. + */ + + if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || + !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) { + DEBUG(5,("check_share_mode: Allowing open on file %s as desired access (0x%x) doesn't conflict with\ +existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsigned int)share->desired_access )); + return True; + } + { int access_allowed = access_table(deny_mode,old_deny_mode,old_open_mode, - (share->pid == sys_getpid()),is_executable(fname)); + (share->pid == sys_getpid()),is_executable(fname)); if ((access_allowed == AFAIL) || (!fcbopen && (access_allowed == AREAD && *flags == O_RDWR)) || @@ -534,28 +578,12 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou *p_all_current_opens_are_level_II = False; } - - /* this is a nasty hack, but necessary until we rewrite our open - handling to use a NTCreateX call as the basic call. - NT may open a file with neither read nor write access, and in - this case it expects the open not to conflict with any - existing deny modes. This happens (for example) during a - "xcopy /o" where the second file descriptor is used for - ACL sets - This code should be removed once we have a propoer ntcreateX - open functions - (tridge) - */ - if (desired_access == 0 || - (desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE))) { - /* someone else has a share lock on it, check to see - if we can too */ - if (!check_share_mode(conn, share_entry, share_mode, - fname, fcbopen, p_flags)) { - SAFE_FREE(old_shares); - errno = EACCES; - return -1; - } + /* someone else has a share lock on it, check to see if we can too */ + if (!check_share_mode(conn, share_entry, share_mode, desired_access, + fname, fcbopen, p_flags)) { + SAFE_FREE(old_shares); + errno = EACCES; + return -1; } } /* end for */ @@ -663,7 +691,6 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ int flags2=0; int deny_mode = GET_DENY_MODE(share_mode); BOOL allow_share_delete = GET_ALLOW_SHARE_DELETE(share_mode); - BOOL delete_access_requested = GET_DELETE_ACCESS_REQUESTED(share_mode); BOOL delete_on_close = GET_DELETE_ON_CLOSE_FLAG(share_mode); BOOL file_existed = VALID_STAT(*psbuf); BOOL fcbopen = False; @@ -742,16 +769,24 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ switch (GET_OPEN_MODE(share_mode)) { case DOS_OPEN_WRONLY: flags = O_WRONLY; + if (desired_access == 0) + desired_access = FILE_WRITE_DATA; break; case DOS_OPEN_FCB: fcbopen = True; flags = O_RDWR; + if (desired_access == 0) + desired_access = FILE_READ_DATA|FILE_WRITE_DATA; break; case DOS_OPEN_RDWR: flags = O_RDWR; + if (desired_access == 0) + desired_access = FILE_READ_DATA|FILE_WRITE_DATA; break; default: flags = O_RDONLY; + if (desired_access == 0) + desired_access = FILE_READ_DATA; break; } @@ -931,8 +966,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", fsp->share_mode = SET_DENY_MODE(deny_mode) | SET_OPEN_MODE(open_mode) | - SET_ALLOW_SHARE_DELETE(allow_share_delete) | - SET_DELETE_ACCESS_REQUESTED(delete_access_requested); + SET_ALLOW_SHARE_DELETE(allow_share_delete); DEBUG(10,("open_file_shared : share_mode = %x\n", fsp->share_mode )); @@ -1045,8 +1079,8 @@ int close_file_fchmod(files_struct *fsp) Open a directory from an NT SMB call. ****************************************************************************/ -files_struct *open_directory(connection_struct *conn, char *fname, - SMB_STRUCT_STAT *psbuf, int share_mode, int smb_ofun, mode_t unixmode, int *action) +files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action) { extern struct current_user current_user; BOOL got_stat = False; @@ -1145,6 +1179,7 @@ files_struct *open_directory(connection_struct *conn, char *fname, fsp->can_read = False; fsp->can_write = False; fsp->share_mode = share_mode; + fsp->desired_access = desired_access; fsp->print_file = False; fsp->modified = False; fsp->oplock_type = NO_OPLOCK; @@ -1176,6 +1211,9 @@ files_struct *open_directory(connection_struct *conn, char *fname, return fsp; } +#if 0 + +Old code - I have replaced with correct desired_access checking. JRA. /******************************************************************* Check if the share mode on a file allows it to be deleted or unlinked. @@ -1184,149 +1222,107 @@ files_struct *open_directory(connection_struct *conn, char *fname, BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op) { - int i; - int ret = False; - share_mode_entry *old_shares = 0; - int num_share_modes; - SMB_STRUCT_STAT sbuf; - pid_t pid = sys_getpid(); - SMB_DEV_T dev; - SMB_INO_T inode; - - if (vfs_stat(conn,fname,&sbuf) == -1) - return(True); - - dev = sbuf.st_dev; - inode = sbuf.st_ino; - - lock_share_entry(conn, dev, inode); - num_share_modes = get_share_modes(conn, dev, inode, &old_shares); - - /* - * Check if the share modes will give us access. - */ - - if(num_share_modes != 0) - { - BOOL broke_oplock; - - do - { - - broke_oplock = False; - for(i = 0; i < num_share_modes; i++) - { - share_mode_entry *share_entry = &old_shares[i]; - - /* - * Break oplocks before checking share modes. See comment in - * open_file_shared for details. - * Check if someone has an oplock on this file. If so we must - * break it before continuing. - */ - if(BATCH_OPLOCK_TYPE(share_entry->op_type)) - { + int i; + int ret = False; + share_mode_entry *old_shares = 0; + int num_share_modes; + SMB_STRUCT_STAT sbuf; + pid_t pid = sys_getpid(); + SMB_DEV_T dev; + SMB_INO_T inode; -#if 0 + if (vfs_stat(conn,fname,&sbuf) == -1) + return(True); -/* JRA. Try removing this code to see if the new oplock changes - fix the problem. I'm dubious, but Andrew is recommending we - try this.... -*/ + dev = sbuf.st_dev; + inode = sbuf.st_ino; - /* - * It appears that the NT redirector may have a bug, in that - * it tries to do an SMBmv on a file that it has open with a - * batch oplock, and then fails to respond to the oplock break - * request. This only seems to occur when the client is doing an - * SMBmv to the smbd it is using - thus we try and detect this - * condition by checking if the file being moved is open and oplocked by - * this smbd process, and then not sending the oplock break in this - * special case. If the file was open with a deny mode that - * prevents the move the SMBmv will fail anyway with a share - * violation error. JRA. - */ - if(rename_op && (share_entry->pid == pid)) - { - - DEBUG(0,("check_file_sharing: NT redirector workaround - rename attempted on \ -batch oplocked file %s, dev = %x, inode = %.0f\n", fname, (unsigned int)dev, (double)inode)); - - /* - * This next line is a test that allows the deny-mode - * processing to be skipped. This seems to be needed as - * NT insists on the rename succeeding (in Office 9x no less !). - * This should be removed as soon as (a) MS fix the redirector - * bug or (b) NT SMB support in Samba makes NT not issue the - * call (as is my fervent hope). JRA. - */ - continue; - } - else -#endif /* 0 */ - { - - DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \ + lock_share_entry(conn, dev, inode); + num_share_modes = get_share_modes(conn, dev, inode, &old_shares); + + /* + * Check if the share modes will give us access. + */ + + if(num_share_modes != 0) { + BOOL broke_oplock; + + do { + + broke_oplock = False; + for(i = 0; i < num_share_modes; i++) { + share_mode_entry *share_entry = &old_shares[i]; + + /* + * Break oplocks before checking share modes. See comment in + * open_file_shared for details. + * Check if someone has an oplock on this file. If so we must + * break it before continuing. + */ + if(BATCH_OPLOCK_TYPE(share_entry->op_type)) { + + DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \ dev = %x, inode = %.0f\n", share_entry->op_type, fname, (unsigned int)dev, (double)inode)); - /* Oplock break.... */ - unlock_share_entry(conn, dev, inode); - if(request_oplock_break(share_entry) == False) - { - DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \ + /* Oplock break.... */ + unlock_share_entry(conn, dev, inode); + + if(request_oplock_break(share_entry) == False) { + DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (double)inode)); - SAFE_FREE(old_shares); - return False; - } - lock_share_entry(conn, dev, inode); - broke_oplock = True; - break; - } - } - - /* - * If this is a delete request and ALLOW_SHARE_DELETE is set then allow - * this to proceed. This takes precedence over share modes. - */ - - if(!rename_op && GET_ALLOW_SHARE_DELETE(share_entry->share_mode)) - continue; - - /* - * Someone else has a share lock on it, check to see - * if we can too. - */ - - if ((GET_DENY_MODE(share_entry->share_mode) != DENY_DOS) || - (share_entry->pid != pid)) - goto free_and_exit; - - } /* end for */ - - if(broke_oplock) - { - SAFE_FREE(old_shares); - num_share_modes = get_share_modes(conn, dev, inode, &old_shares); - } - } while(broke_oplock); - } - - /* XXXX exactly what share mode combinations should be allowed for - deleting/renaming? */ - /* - * If we got here then either there were no share modes or - * all share modes were DENY_DOS and the pid == getpid() or - * delete access was requested and all share modes had the - * ALLOW_SHARE_DELETE bit set (takes precedence over other - * share modes). - */ - - ret = True; + SAFE_FREE(old_shares); + return False; + } + lock_share_entry(conn, dev, inode); + broke_oplock = True; + break; + } + + /* + * If this is a delete request and ALLOW_SHARE_DELETE is set then allow + * this to proceed. This takes precedence over share modes. + */ + + if(!rename_op && GET_ALLOW_SHARE_DELETE(share_entry->share_mode)) + continue; + + /* + * Someone else has a share lock on it, check to see + * if we can too. + */ + if ((GET_DENY_MODE(share_entry->share_mode) != DENY_DOS) || + (share_entry->pid != pid)) + goto free_and_exit; + + } /* end for */ + + if(broke_oplock) { + SAFE_FREE(old_shares); + num_share_modes = get_share_modes(conn, dev, inode, &old_shares); + } + } while(broke_oplock); + } + + /* + * XXXX exactly what share mode combinations should be allowed for + * deleting/renaming? + */ + + /* + * If we got here then either there were no share modes or + * all share modes were DENY_DOS and the pid == getpid() or + * delete access was requested and all share modes had the + * ALLOW_SHARE_DELETE bit set (takes precedence over other + * share modes). + */ + + ret = True; free_and_exit: - unlock_share_entry(conn, dev, inode); - SAFE_FREE(old_shares); - return(ret); + unlock_share_entry(conn, dev, inode); + SAFE_FREE(old_shares); + return(ret); } +#endif diff --git a/source/smbd/reply.c b/source/smbd/reply.c index e96a982e488..8cf12873338 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1904,6 +1904,41 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, return(outsize); } +/******************************************************************* + Check if a user is allowed to rename a file. +********************************************************************/ + +static NTSTATUS can_rename(char *fname,connection_struct *conn, SMB_STRUCT_STAT *pst) +{ + int smb_action; + int access_mode; + files_struct *fsp; + + if (!CAN_WRITE(conn)) + return NT_STATUS_MEDIA_WRITE_PROTECTED; + + if (S_ISDIR(pst->st_mode)) + return NT_STATUS_OK; + + /* We need a better way to return NT status codes from open... */ + unix_ERR_class = 0; + unix_ERR_code = 0; + + fsp = open_file_shared1(conn, fname, pst, DELETE_ACCESS, SET_DENY_MODE(DENY_ALL), + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action); + + if (!fsp) { + NTSTATUS ret = NT_STATUS_ACCESS_DENIED; + if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare) + ret = NT_STATUS_SHARING_VIOLATION; + unix_ERR_class = 0; + unix_ERR_code = 0; + return ret; + } + close_file(fsp,False); + return NT_STATUS_OK; +} + /******************************************************************* Check if a user is allowed to delete a file. ********************************************************************/ @@ -1912,6 +1947,9 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype) { SMB_STRUCT_STAT sbuf; int fmode; + int smb_action; + int access_mode; + files_struct *fsp; if (!CAN_WRITE(conn)) return NT_STATUS_MEDIA_WRITE_PROTECTED; @@ -1930,9 +1968,22 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype) if ((fmode & ~dirtype) & (aHIDDEN | aSYSTEM)) return NT_STATUS_CANNOT_DELETE; - if (!check_file_sharing(conn,fname,False)) - return NT_STATUS_SHARING_VIOLATION; + /* We need a better way to return NT status codes from open... */ + unix_ERR_class = 0; + unix_ERR_code = 0; + + fsp = open_file_shared1(conn, fname, &sbuf, DELETE_ACCESS, SET_DENY_MODE(DENY_ALL), + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action); + if (!fsp) { + NTSTATUS ret = NT_STATUS_ACCESS_DENIED; + if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare) + ret = NT_STATUS_SHARING_VIOLATION; + unix_ERR_class = 0; + unix_ERR_code = 0; + return ret; + } + close_file(fsp,False); return NT_STATUS_OK; } @@ -3635,21 +3686,6 @@ static BOOL resolve_wildcards(char *name1,char *name2) return(True); } -/******************************************************************* - Check if a user is allowed to rename a file. -********************************************************************/ - -static NTSTATUS can_rename(char *fname,connection_struct *conn) -{ - if (!CAN_WRITE(conn)) - return NT_STATUS_ACCESS_DENIED; - - if (!check_file_sharing(conn,fname,True)) - return NT_STATUS_SHARING_VIOLATION; - - return NT_STATUS_OK; -} - /**************************************************************************** The guts of the rename command, split out so it may be called by the NT SMB code. @@ -3776,7 +3812,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n", * The source object must exist. */ - if (!vfs_object_exist(conn, directory, NULL)) { + if (!vfs_object_exist(conn, directory, &sbuf1)) { DEBUG(3,("rename_internals: source doesn't exist doing rename %s -> %s\n", directory,newname)); @@ -3801,7 +3837,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n", return error; } - error = can_rename(directory,conn); + error = can_rename(directory,conn,&sbuf1); if (!NT_STATUS_IS_OK(error)) { DEBUG(3,("rename_internals: Error %s rename %s -> %s\n", @@ -3871,7 +3907,12 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n", error = NT_STATUS_ACCESS_DENIED; slprintf(fname,sizeof(fname)-1,"%s/%s",directory,dname); - error = can_rename(fname,conn); + if (!vfs_object_exist(conn, fname, &sbuf1)) { + error = NT_STATUS_OBJECT_NAME_NOT_FOUND; + DEBUG(6,("rename %s failed. Error %s\n", fname, get_nt_error_msg(error))); + continue; + } + error = can_rename(fname,conn,&sbuf1); if (!NT_STATUS_IS_OK(error)) { DEBUG(6,("rename %s failed. Error %s\n", fname, get_nt_error_msg(error))); continue; diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index d4c5c5e0665..23579c7c06d 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2097,7 +2097,7 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close) * Only allow delete on close for files/directories opened with delete intent. */ - if (delete_on_close && !GET_DELETE_ACCESS_REQUESTED(fsp->share_mode)) { + if (delete_on_close && !(fsp->desired_access & DELETE_ACCESS)) { DEBUG(10,("set_delete_on_close_internal: file %s delete on close flag set but delete access denied.\n", fsp->fsp_name )); return NT_STATUS_ACCESS_DENIED; diff --git a/source/utils/status.c b/source/utils/status.c index b7edd3a4198..044cd7a6a16 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -101,8 +101,8 @@ static void print_share_mode(share_mode_entry *e, char *fname) static int count; if (count==0) { printf("Locked files:\n"); - printf("Pid DenyMode R/W Oplock Name\n"); - printf("--------------------------------------------------\n"); + printf("Pid DenyMode Access R/W Oplock Name\n"); + printf("--------------------------------------------------------------\n"); } count++; @@ -116,6 +116,7 @@ static void print_share_mode(share_mode_entry *e, char *fname) case DENY_WRITE:printf("DENY_WRITE "); break; case DENY_FCB: printf("DENY_FCB "); break; } + printf("0x%-8x ",(unsigned int)e->desired_access); switch (e->share_mode&0xF) { case 0: printf("RDONLY "); break; case 1: printf("WRONLY "); break; -- cgit From 5916aa803ec48e6f09503208cc6c186972cd7ed9 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sat, 23 Mar 2002 06:42:07 +0000 Subject: Catch a place where reply_sesssetupX returns without ending profiling stuff. --- source/smbd/reply.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 8cf12873338..e6cc9d3a734 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1085,6 +1085,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int delete_nt_token(&ptok); if (sess_vuid == -1) { + END_PROFILE(SMBsesssetupX); return(ERROR_DOS(ERRDOS,ERRnoaccess)); } -- cgit From a7835f6bb5e387ab9d4cdcf08e629d5945f7b626 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Mar 2002 20:13:00 +0000 Subject: Fix build with --with-smbmount. Jeremy. --- source/client/smbmount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client/smbmount.c b/source/client/smbmount.c index 302ec7f2b3f..40e21e1eb1d 100644 --- a/source/client/smbmount.c +++ b/source/client/smbmount.c @@ -450,22 +450,22 @@ static void init_mount(void) if (mount_uid) { slprintf(tmp, sizeof(tmp)-1, "%d", mount_uid); args[i++] = "-u"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_gid) { slprintf(tmp, sizeof(tmp)-1, "%d", mount_gid); args[i++] = "-g"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_fmask) { slprintf(tmp, sizeof(tmp)-1, "0%o", mount_fmask); args[i++] = "-f"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_dmask) { slprintf(tmp, sizeof(tmp)-1, "0%o", mount_dmask); args[i++] = "-d"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (options) { args[i++] = "-o"; -- cgit From ae2fc16ed94799a5ff23ccb6fa6d1f8927160985 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Mar 2002 20:48:34 +0000 Subject: Set default recycle directory permissions as 0770. Unlink on rename fail. Jeremy. --- examples/VFS/recycle.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c index 4e032bb8133..74d3657895a 100644 --- a/examples/VFS/recycle.c +++ b/examples/VFS/recycle.c @@ -177,13 +177,13 @@ static void recycle_disconnect(struct connection_struct *conn) static BOOL recycle_XXX_exist(connection_struct *conn, const char *dname, BOOL isdir) { - SMB_STRUCT_STAT st; + SMB_STRUCT_STAT st; - if (default_vfs_ops.stat(conn,dname,&st) != 0) - return(False); + if (default_vfs_ops.stat(conn,dname,&st) != 0) + return(False); if (isdir) - return S_ISDIR(st.st_mode) ? True : False; + return S_ISDIR(st.st_mode) ? True : False; else return S_ISREG(st.st_mode) ? True : False; } @@ -200,9 +200,9 @@ static BOOL recycle_file_exist(connection_struct *conn, const char *fname) static SMB_OFF_T recycle_get_file_size(connection_struct *conn, const char *fname) { - SMB_STRUCT_STAT st; + SMB_STRUCT_STAT st; - if (default_vfs_ops.stat(conn,fname,&st) != 0) + if (default_vfs_ops.stat(conn,fname,&st) != 0) return (SMB_OFF_T)-1; return(st.st_size); @@ -219,7 +219,7 @@ static int recycle_unlink(connection_struct *conn, const char *inname) char *base, *ext; pstring bin; int i=1, len, addlen; - int dir_mask=0700; + int dir_mask=0770; SMB_BIG_UINT dfree,dsize,bsize; *recycle_bin = '\0'; @@ -274,8 +274,11 @@ static int recycle_unlink(connection_struct *conn, const char *inname) DEBUG(3, ("recycle bin: move %s -> %s\n", fname, bin)); ret = default_vfs_ops.rename(conn, fname, bin); - if (ret == -1) + if (ret == -1) { DEBUG(3, ("recycle bin: move error %d (%s)\n", errno, strerror(errno) )); + DEBUG(3, ("recycle bin: move failed, purging...\n")); + return default_vfs_ops.unlink(conn,fname); + } return ret; } else { DEBUG(3, ("recycle bin: move failed, purging...\n")); -- cgit From 9c38f443059d30cd9d515c1d86e635eddaefc4fe Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 24 Mar 2002 23:28:26 +0000 Subject: Spelling fixes. --- source/lib/util_sec.c | 2 +- source/nsswitch/winbindd_rpc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/util_sec.c b/source/lib/util_sec.c index c559647bf45..af7edd60808 100644 --- a/source/lib/util_sec.c +++ b/source/lib/util_sec.c @@ -415,7 +415,7 @@ main() #endif /**************************************************************************** -Check if we are setuid root. Used in libsmb and smbpasswd parinoia checks. +Check if we are setuid root. Used in libsmb and smbpasswd paranoia checks. ****************************************************************************/ BOOL is_setuid_root(void) { diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index bbb528a60ef..865a0f7c322 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -243,7 +243,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain, *name = names[0]; DEBUG(5,("Mapped sid to [%s]\\[%s]\n", domains[0], *name)); - /* Parinoia */ + /* Paranoia */ if (strcasecmp(domain->name, domains[0]) != 0) { DEBUG(1, ("domain name from domain param and PDC lookup return differ! (%s vs %s)\n", domain->name, domains[0])); return NT_STATUS_UNSUCCESSFUL; -- cgit From 992f6d13b5c53d5f1ba84d038094f814c3c8d467 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Mon, 25 Mar 2002 17:58:09 +0000 Subject: Fix for Explorer problems on older Windows 9X machines. Expanding a DFS tree using the left pane wasn't working. Apparently, older DFS clients can't handle two backslashes in a dfs pathname sent in a referral, although they send two backslashes in requests. Fixed by MS in post-Win2K. We get around this by always sending dfs referrals with only one backslash prepending the request pathname. --- source/msdfs/msdfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 7cebecc0514..7c3c7b1b8e7 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -589,6 +589,13 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) if (!pathname) return -1; + /* Some buggy Dfs clients (seen in Win9X) can't handle replies + containing the exact pathnames they send for referrals. They screw up + if there are two backslashes in front. - kalele 2002.3.21 + */ + while (strlen(pathname) > 1 && pathname[1] == '\\') + safe_strcpy(pathname, &pathname[1], strlen(pathname) - 1); + safe_strcpy(buf, pathname, sizeof(buf)); if (!get_referred_path(buf, &junction, &consumedcnt, &self_referral)) -- cgit From 8c2209fc4844aec41d9d050c16277c26864bc8e2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 25 Mar 2002 23:46:21 +0000 Subject: implement OpenPrinter() opnum == 0x01. Apparently, the Win2k spooler will fail back to this under certain conditions if the OpenPrinterEx() generates an rpc fault. I found this from log files and traces provided by Ed Wilson when tracking down a printing problem with ACT! 2000 from 2000/XP clients. --- source/include/proto.h | 8 ++- source/include/rpc_spoolss.h | 19 +++++- source/lib/util_unistr.c | 25 ++++++-- source/rpc_parse/parse_spoolss.c | 102 ++++++++++++++++++++++------- source/rpc_server/srv_spoolss.c | 31 +++++++++ source/rpc_server/srv_spoolss_nt.c | 127 +++++++++++++++++++++++++++++++++++-- 6 files changed, 277 insertions(+), 35 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 489b0e6f866..d9b479703f1 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1288,7 +1288,8 @@ char *dos_buffer2_to_str(BUFFER2 *str); char *dos_buffer2_to_multistr(BUFFER2 *str); size_t dos_struni2(char *dst, const char *src, size_t max_len); char *dos_unistr(char *buf); -int unistrcpy(char *dst, char *src); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); BOOL load_dos_unicode_map(int codepage); @@ -3495,7 +3496,10 @@ BOOL make_spoolss_q_addprinterex( PRINTER_INFO_CTR *ctr); BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, PRINTER_INFO_2 *info); +BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_deleteprinterdriver( TALLOC_CTX *mem_ctx, SPOOL_Q_DELETEPRINTERDRIVER *q_u, @@ -3503,7 +3507,6 @@ BOOL make_spoolss_q_deleteprinterdriver( const char* arch, const char* driver ); -BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, const POLICY_HND *handle, UNISTR2 *valuename, uint32 size); @@ -4029,6 +4032,7 @@ BOOL api_spoolss_rpc(pipes_struct *p); /*The following definitions come from rpc_server/srv_spoolss_nt.c */ +WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u); WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u); BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode, NT_DEVICEMODE **pp_nt_devmode); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 375c55fd41a..55e52291c41 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -28,7 +28,6 @@ #define STRING 2 /* spoolss pipe: this are the calls which are not implemented ... -#define SPOOLSS_OPENPRINTER 0x01 #define SPOOLSS_GETPRINTERDRIVER 0x0b #define SPOOLSS_READPRINTER 0x16 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c @@ -60,6 +59,7 @@ /* those are implemented */ #define SPOOLSS_ENUMPRINTERS 0x00 +#define SPOOLSS_OPENPRINTER 0x01 #define SPOOLSS_SETJOB 0x02 #define SPOOLSS_GETJOB 0x03 #define SPOOLSS_ENUMJOBS 0x04 @@ -515,6 +515,23 @@ typedef struct _printer_default } PRINTER_DEFAULT; +/* SPOOL_Q_OPEN_PRINTER request to open a printer */ +typedef struct spool_q_open_printer +{ + uint32 printername_ptr; + UNISTR2 printername; + PRINTER_DEFAULT printer_default; +} +SPOOL_Q_OPEN_PRINTER; + +/* SPOOL_R_OPEN_PRINTER reply to an open printer */ +typedef struct spool_r_open_printer +{ + POLICY_HND handle; /* handle used along all transactions (20*uint8) */ + WERROR status; +} +SPOOL_R_OPEN_PRINTER; + /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */ typedef struct spool_q_open_printer_ex { diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index eaed4e89db8..bd0113b972b 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -505,21 +505,34 @@ char *dos_unistr(char *buf) return lbuf; } +/******************************************************************* + returns the length in number of wide characters + ******************************************************************/ +int unistrlen(uint16 *s) +{ + int len; + + if (!s) + return -1; + + for (len=0; *s; s++,len++); + + return len; +} + /******************************************************************* Strcpy for unicode strings. returns length (in num of wide chars) ********************************************************************/ -int unistrcpy(char *dst, char *src) +int unistrcpy(uint16 *dst, uint16 *src) { int num_wchars = 0; - uint16 *wsrc = (uint16 *)src; - uint16 *wdst = (uint16 *)dst; - while (*wsrc) { - *wdst++ = *wsrc++; + while (*src) { + *dst++ = *src++; num_wchars++; } - *wdst = 0; + *dst = 0; return num_wchars; } diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 53c39599dbc..3b9bd1b2953 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -876,17 +876,18 @@ BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 return True; } + /******************************************************************* * read a structure. * called from spoolss_q_open_printer_ex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; - prs_debug(ps, depth, desc, "spoolss_io_q_open_printer_ex"); + prs_debug(ps, depth, desc, "spoolss_io_q_open_printer"); depth++; if (!prs_align(ps)) @@ -903,36 +904,67 @@ BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_ if (!spoolss_io_printer_default("", &q_u->printer_default, ps, depth)) return False; - if (!prs_uint32("user_switch", ps, depth, &q_u->user_switch)) - return False; - if (!spool_io_user_level("", &q_u->user_ctr, ps, depth)) - return False; - return True; } /******************************************************************* - * init a structure. + * write a structure. + * called from static spoolss_r_open_printer_ex (srv_spoolss.c) + * called from spoolss_open_printer_ex (cli_spoolss.c) ********************************************************************/ -BOOL make_spoolss_q_deleteprinterdriver( - TALLOC_CTX *mem_ctx, - SPOOL_Q_DELETEPRINTERDRIVER *q_u, - const char *server, - const char* arch, - const char* driver -) + +BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth) { - DEBUG(5,("make_spoolss_q_deleteprinterdriver\n")); + if (r_u == NULL) return False; + + prs_debug(ps, depth, desc, "spoolss_io_r_open_printer"); + depth++; - q_u->server_ptr = (server!=NULL)?1:0; + if (!prs_align(ps)) + return False; - /* these must be NULL terminated or else NT4 will - complain about invalid parameters --jerry */ - init_unistr2(&q_u->server, server, strlen(server)+1); - init_unistr2(&q_u->arch, arch, strlen(arch)+1); - init_unistr2(&q_u->driver, driver, strlen(driver)+1); + if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth)) + return False; + + if (!prs_werror("status code", ps, depth, &(r_u->status))) + return False; + + return True; +} + + +/******************************************************************* + * read a structure. + * called from spoolss_q_open_printer_ex (srv_spoolss.c) + ********************************************************************/ + +BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + prs_debug(ps, depth, desc, "spoolss_io_q_open_printer_ex"); + depth++; + + if (!prs_align(ps)) + return False; + + if (!prs_uint32("printername_ptr", ps, depth, &q_u->printername_ptr)) + return False; + if (!smb_io_unistr2("", &q_u->printername, q_u->printername_ptr, ps,depth)) + return False; + if (!prs_align(ps)) + return False; + + if (!spoolss_io_printer_default("", &q_u->printer_default, ps, depth)) + return False; + + if (!prs_uint32("user_switch", ps, depth, &q_u->user_switch)) + return False; + if (!spool_io_user_level("", &q_u->user_ctr, ps, depth)) + return False; + return True; } @@ -961,6 +993,32 @@ BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_ return True; } +/******************************************************************* + * init a structure. + ********************************************************************/ +BOOL make_spoolss_q_deleteprinterdriver( + TALLOC_CTX *mem_ctx, + SPOOL_Q_DELETEPRINTERDRIVER *q_u, + const char *server, + const char* arch, + const char* driver +) +{ + DEBUG(5,("make_spoolss_q_deleteprinterdriver\n")); + + q_u->server_ptr = (server!=NULL)?1:0; + + /* these must be NULL terminated or else NT4 will + complain about invalid parameters --jerry */ + init_unistr2(&q_u->server, server, strlen(server)+1); + init_unistr2(&q_u->arch, arch, strlen(arch)+1); + init_unistr2(&q_u->driver, driver, strlen(driver)+1); + + + return True; +} + + /******************************************************************* * make a structure. ********************************************************************/ diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index 67fc7da2624..1bab95ad34f 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -24,6 +24,36 @@ #include "includes.h" +/******************************************************************** + * api_spoolss_open_printer_ex (rarely seen - older call) + ********************************************************************/ + +static BOOL api_spoolss_open_printer(pipes_struct *p) +{ + SPOOL_Q_OPEN_PRINTER q_u; + SPOOL_R_OPEN_PRINTER r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if (!spoolss_io_q_open_printer("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_open_printer: unable to unmarshall SPOOL_Q_OPEN_PRINTER.\n")); + return False; + } + + r_u.status = _spoolss_open_printer( p, &q_u, &r_u); + + if (!spoolss_io_r_open_printer("",&r_u,rdata,0)){ + DEBUG(0,("spoolss_io_r_open_printer: unable to marshall SPOOL_R_OPEN_PRINTER.\n")); + return False; + } + + return True; +} + + /******************************************************************** * api_spoolss_open_printer_ex ********************************************************************/ @@ -1376,6 +1406,7 @@ static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p) struct api_struct api_spoolss_cmds[] = { + {"SPOOLSS_OPENPRINTER", SPOOLSS_OPENPRINTER, api_spoolss_open_printer }, {"SPOOLSS_OPENPRINTEREX", SPOOLSS_OPENPRINTEREX, api_spoolss_open_printer_ex }, {"SPOOLSS_GETPRINTERDATA", SPOOLSS_GETPRINTERDATA, api_spoolss_getprinterdata }, {"SPOOLSS_CLOSEPRINTER", SPOOLSS_CLOSEPRINTER, api_spoolss_closeprinter }, diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 9cc0b876853..1718b4fe34f 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -759,18 +759,137 @@ static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low, return True; } +/******************************************************************** + Copy routines used by convert_to_openprinterex() + *******************************************************************/ + +static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, DEVICEMODE *devmode) +{ + DEVICEMODE *d; + int len; + + if (!devmode) + return NULL; + + DEBUG (8,("dup_devmode\n")); + + /* bulk copy first */ + + d = talloc_memdup(ctx, devmode, sizeof(DEVICEMODE)); + if (!d) + return NULL; + + /* dup the pointer members separately */ + + len = unistrlen(devmode->devicename.buffer); + if (len != -1) { + d->devicename.buffer = talloc(ctx, len*2); + if (unistrcpy(d->devicename.buffer, devmode->devicename.buffer) != len) + return NULL; + } + + + len = unistrlen(devmode->formname.buffer); + if (len != -1) { + d->devicename.buffer = talloc(ctx, len*2); + if (unistrcpy(d->formname.buffer, devmode->formname.buffer) != len) + return NULL; + } + + d->private = talloc_memdup(ctx, devmode->private, devmode->driverextra); + + return d; +} + +static void copy_devmode_ctr(TALLOC_CTX *ctx, DEVMODE_CTR *new_ctr, DEVMODE_CTR *ctr) +{ + if (!new_ctr || !ctr) + return; + + DEBUG(8,("copy_devmode_ctr\n")); + + new_ctr->size = ctr->size; + new_ctr->devmode_ptr = ctr->devmode_ptr; + + if(ctr->devmode_ptr) + new_ctr->devmode = dup_devicemode(ctx, ctr->devmode); +} + +static void copy_printer_default(TALLOC_CTX *ctx, PRINTER_DEFAULT *new_def, PRINTER_DEFAULT *def) +{ + if (!new_def || !def) + return; + + DEBUG(8,("copy_printer_defaults\n")); + + new_def->datatype_ptr = def->datatype_ptr; + + if (def->datatype_ptr) + copy_unistr2(&new_def->datatype, &def->datatype); + + copy_devmode_ctr(ctx, &new_def->devmode_cont, &def->devmode_cont); + + new_def->access_required = def->access_required; +} + +/******************************************************************** + * Convert a SPOOL_Q_OPEN_PRINTER structure to a + * SPOOL_Q_OPEN_PRINTER_EX structure + ********************************************************************/ + +static void convert_to_openprinterex(TALLOC_CTX *ctx, SPOOL_Q_OPEN_PRINTER_EX *q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u) +{ + if (!q_u_ex || !q_u) + return; + + DEBUG(8,("convert_to_openprinterex\n")); + + q_u_ex->printername_ptr = q_u->printername_ptr; + + if (q_u->printername_ptr) + copy_unistr2(&q_u_ex->printername, &q_u->printername); + + copy_printer_default(ctx, &q_u_ex->printer_default, &q_u->printer_default); +} + /******************************************************************** * spoolss_open_printer * * called from the spoolss dispatcher ********************************************************************/ -WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u) +WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u) { -#if 0 - WERROR result = WERR_OK; -#endif + SPOOL_Q_OPEN_PRINTER_EX q_u_ex; + SPOOL_R_OPEN_PRINTER_EX r_u_ex; + + if (!q_u || !r_u) + return WERR_NOMEM; + + ZERO_STRUCT(q_u_ex); + ZERO_STRUCT(r_u_ex); + + /* convert the OpenPrinter() call to OpenPrinterEx() */ + + convert_to_openprinterex(p->mem_ctx, &q_u_ex, q_u); + + r_u_ex.status = _spoolss_open_printer_ex(p, &q_u_ex, &r_u_ex); + + /* convert back to OpenPrinter() */ + + memcpy(r_u, &r_u_ex, sizeof(*r_u)); + + return r_u->status; +} +/******************************************************************** + * spoolss_open_printer + * + * called from the spoolss dispatcher + ********************************************************************/ + +WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u) +{ UNISTR2 *printername = NULL; PRINTER_DEFAULT *printer_default = &q_u->printer_default; /* uint32 user_switch = q_u->user_switch; - notused */ -- cgit From ef961c4283fd6f529d34cfe815a3e8eb2b042e92 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 00:38:17 +0000 Subject: Matched W2K *insane* open semantics.... Jeremy. --- source/smbd/open.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/smbd/open.c b/source/smbd/open.c index 6bb4df33322..5c8783d18b6 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -419,6 +419,24 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) && !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) { + + /* + * Wrinkle discovered by smbtorture.... + * If both are non-io open and requester is asking for delete and current open has delete access + * but neither open has allowed file share delete then deny.... this is very strange and + * seems to be the only case in which non-io opens conflict. JRA. + */ + + if ((desired_access & DELETE_ACCESS) && (share->desired_access & DELETE_ACCESS) && + (!GET_ALLOW_SHARE_DELETE(share->share_mode) || !GET_ALLOW_SHARE_DELETE(share_mode))) { + DEBUG(5,("check_share_mode: Failing open on file %s as delete access requests conflict.\n", + fname )); + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadshare; + + return False; + } + DEBUG(5,("check_share_mode: Allowing open on file %s as both desired access (0x%x) \ and existing desired access (0x%x) are non-data opens\n", fname, (unsigned int)desired_access, (unsigned int)share->desired_access )); -- cgit From 060f8433a69dd4f2f593d0dd9c20ad3bbad0aab0 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Tue, 26 Mar 2002 02:34:16 +0000 Subject: Get Dfs working when mapped using an IP address or alias. --- source/msdfs/msdfs.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 7c3c7b1b8e7..60bfc6fcc4a 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -22,7 +22,7 @@ #include "includes.h" -extern pstring global_myname; +extern fstring local_machine; extern uint32 global_client_caps; #ifdef WITH_MSDFS @@ -346,10 +346,15 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn, parse_dfs_path(pathname, &dp); /* Verify hostname in path */ - if (global_myname && (strcasecmp(global_myname, dp.hostname) != 0)) { + if (local_machine && (strcasecmp(local_machine, dp.hostname) != 0)) { + + /* Hostname mismatch, check if one of our IP addresses */ + if (!ismyip(*interpret_addr2(dp.hostname))) { + DEBUG(3, ("get_referred_path: Invalid hostname %s in path %s\n", - dp.hostname, pathname)); + dp.hostname, pathname)); return False; + } } pstrcpy(jn->service_name, dp.servicename); @@ -662,11 +667,15 @@ BOOL create_junction(char* pathname, struct junction_map* jn) parse_dfs_path(pathname,&dp); - /* check if path is dfs : check hostname is the first token */ - if(global_myname && (strcasecmp(global_myname,dp.hostname)!=0)) { + /* check if path is dfs : validate first token */ + if (local_machine && (strcasecmp(local_machine,dp.hostname)!=0)) { + + /* Hostname mismatch, check if one of our IP addresses */ + if (!ismyip(*interpret_addr2(dp.hostname))) { DEBUG(4,("create_junction: Invalid hostname %s in dfs path %s\n", dp.hostname, pathname)); return False; + } } /* Check for a non-DFS share */ @@ -802,7 +811,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count) jn[cnt].referral_count = 1; slprintf(alt_path,sizeof(alt_path)-1,"\\\\%s\\%s", - global_myname, service_name); + local_machine, service_name); ref = jn[cnt].referral_list = (struct referral*) malloc(sizeof(struct referral)); if (jn[cnt].referral_list == NULL) { DEBUG(0, ("Malloc failed!\n")); -- cgit From e66d49e6ba431c1dff306c95056e459d8ef692d1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 03:07:48 +0000 Subject: Removed unused variable. Jeremy. --- source/smbd/reply.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index e6cc9d3a734..701c0d236ac 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2001,7 +2001,6 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) int count=0; NTSTATUS error = NT_STATUS_OK; BOOL has_wild; - BOOL exists=False; BOOL bad_path = False; BOOL rc = True; SMB_STRUCT_STAT sbuf; @@ -2043,8 +2042,6 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) if (vfs_unlink(conn,directory) == 0) count++; - if (!count) - exists = vfs_file_exist(conn,directory,&sbuf); } else { void *dirptr = NULL; char *dname; -- cgit From c8dd0c1f9772f3ae3d41ec262b387a2b525fa7f5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 26 Mar 2002 03:17:16 +0000 Subject: small merge from HEAD --- source/include/rpc_spoolss.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index 55e52291c41..ce137858df0 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -1333,6 +1333,10 @@ typedef struct spool_r_enumprinterdrivers } SPOOL_R_ENUMPRINTERDRIVERS; +#define FORM_USER 0 +#define FORM_BUILTIN 1 +#define FORM_PRINTER 2 + typedef struct spool_form_1 { uint32 flag; @@ -1856,7 +1860,7 @@ typedef struct spool_q_addform { POLICY_HND handle; uint32 level; - uint32 level2; + uint32 level2; /* This should really be part of the FORM structure */ FORM form; } SPOOL_Q_ADDFORM; -- cgit From 065eded7adaf29bbf94580ac57d4942ce15dc280 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 19:15:09 +0000 Subject: Change back to 2.2.x style init. Jeremy. --- source/nsswitch/wins.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c index 2133f817d1a..c88bd379100 100644 --- a/source/nsswitch/wins.c +++ b/source/nsswitch/wins.c @@ -85,7 +85,7 @@ static void nss_wins_init(void) TimeInit(); setup_logging("nss_wins",False); - lp_load(dyn_CONFIGFILE,True,False,False); + lp_load(CONFIGFILE,True,False,False); load_interfaces(); codepage_initialise(lp_client_code_page()); } @@ -320,4 +320,3 @@ _nss_wins_gethostbyname_r(const char *name, struct hostent *he, return NSS_STATUS_SUCCESS; } #endif - -- cgit From 802db3b4346f56a15486ea4db17d35692f8e2421 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 19:45:54 +0000 Subject: Don't do a zero length malloc (caught with dmalloc library). Jeremy. --- source/nsswitch/winbindd_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index c62ce54b591..4ef57513bb0 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -150,7 +150,7 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, /* Allocate buffer */ - if (!buf) { + if (!buf && buf_len != 0) { if (!(buf = malloc(buf_len))) { DEBUG(1, ("out of memory\n")); result = False; -- cgit From 313b6ebbf7ce51cb3b4235d581dbe5400a116ac7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 22:33:19 +0000 Subject: Ensure we don't hold the mutex for longer than 20 seconds.... Jeremy. --- source/include/proto.h | 2 +- source/lib/messages.c | 33 ++++++++++++++++++++++++++++++--- source/lib/util_file.c | 2 +- source/smbd/password.c | 6 ++++-- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index d9b479703f1..d67f9036db9 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -139,7 +139,7 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, int *n_sent); -BOOL message_named_mutex(char *name); +BOOL message_named_mutex(char *name, unsigned int timeout); void message_named_mutex_release(char *name); /*The following definitions come from lib/ms_fnmatch.c */ diff --git a/source/lib/messages.c b/source/lib/messages.c index 46c2f935859..34b370a7158 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -459,21 +459,48 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, /** @} **/ +static VOLATILE sig_atomic_t gotalarm; + +/*************************************************************** + Signal function to tell us we timed out. +****************************************************************/ + +static void gotalarm_sig(void) +{ + gotalarm = 1; +} /* lock the messaging tdb based on a string - this is used as a primitive form of mutex between smbd instances. */ -BOOL message_named_mutex(char *name) +BOOL message_named_mutex(char *name, unsigned int timeout) { TDB_DATA key; + int ret; - if (!message_init()) return False; + if (!message_init()) + return False; key.dptr = name; key.dsize = strlen(name)+1; - return (tdb_chainlock(tdb, key) == 0); + if (timeout) { + gotalarm = 0; + CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig); + alarm(timeout); + } + + ret = tdb_chainlock(tdb, key); + + if (timeout) { + alarm(0); + CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); + if (gotalarm) + return False; + } + + return (ret == 0); } /* diff --git a/source/lib/util_file.c b/source/lib/util_file.c index 4632e0a84dc..96b18ba5875 100644 --- a/source/lib/util_file.c +++ b/source/lib/util_file.c @@ -52,7 +52,7 @@ BOOL do_file_lock(int fd, int waitsecs, int type) alarm(waitsecs); ret = fcntl(fd, SMB_F_SETLKW, &lock); alarm(0); - CatchSignal(SIGALRM, SIGNAL_CAST SIG_DFL); + CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); if (gotalarm) { DEBUG(0, ("do_file_lock: failed to %s file.\n", diff --git a/source/smbd/password.c b/source/smbd/password.c index 7e72d265e22..d5914a983fa 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1240,11 +1240,13 @@ static BOOL connect_to_domain_password_server(struct cli_state *pcli, two connections where one hasn't completed a negprot yet it will send a TCP reset to the first connection (tridge) */ - if (!message_named_mutex(server)) { - DEBUG(1,("domain mutex failed for %s\n", server)); + if (!message_named_mutex(server, 20)) { + DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); return False; } + DEBUG(10, ("connect_to_domain_password_server: got mutex for server %s\n", server )); + if (!cli_connect(pcli, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); -- cgit From e3bba16d9155e409961a4524695989a89fb58875 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 26 Mar 2002 23:49:06 +0000 Subject: Merge of smb messaging support for winbindd. I thought a debug message was supposed to change the debug level but apparently not. --- source/nsswitch/winbindd.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index f1020ecb805..06d39bfa068 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -509,6 +509,10 @@ static void process_loop(int accept_sock) int maxfd = accept_sock, selret; struct timeval timeout; + /* Handle messages */ + + message_dispatch(); + /* Free up temporary memory */ lp_talloc_free(); @@ -673,8 +677,9 @@ int main(int argc, char **argv) int opt; /* glibc (?) likes to print "User defined signal 1" and exit if a - SIGUSR2 is received before a handler is installed */ + SIGUSR[12] is received before a handler is installed */ + CatchSignal(SIGUSR1, SIG_IGN); CatchSignal(SIGUSR2, SIG_IGN); TimeInit(); @@ -802,6 +807,7 @@ int main(int argc, char **argv) BlockSignals(False, SIGINT); BlockSignals(False, SIGQUIT); BlockSignals(False, SIGTERM); + BlockSignals(False, SIGUSR1); BlockSignals(False, SIGUSR2); BlockSignals(False, SIGHUP); @@ -812,11 +818,17 @@ int main(int argc, char **argv) CatchSignal(SIGTERM, termination_handler); CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */ - CatchSignal(SIGUSR1, SIG_IGN); /* Samba messages */ CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */ CatchSignal(SIGHUP, sighup_handler); + /* Initialise messaging system */ + + if (!message_init()) { + DEBUG(0, ("unable to initialise messaging system\n")); + exit(1); + } + /* Create UNIX domain socket */ if ((accept_sock = create_sock()) == -1) { -- cgit From 8e09532226e08a2bf91bb47794e19f4aaca77c05 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 00:02:55 +0000 Subject: Moved debug messages for grabbing/releasing mutex. Jeremy. --- source/lib/messages.c | 4 ++++ source/smbd/password.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/lib/messages.c b/source/lib/messages.c index 34b370a7158..518b7d51c1e 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -500,6 +500,9 @@ BOOL message_named_mutex(char *name, unsigned int timeout) return False; } + if (ret == 0) + DEBUG(10,("message_named_mutex: got mutex for %s\n", name )); + return (ret == 0); } @@ -514,4 +517,5 @@ void message_named_mutex_release(char *name) key.dsize = strlen(name)+1; tdb_chainunlock(tdb, key); + DEBUG(10,("message_named_mutex: released mutex for %s\n", name )); } diff --git a/source/smbd/password.c b/source/smbd/password.c index d5914a983fa..8046188cb50 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1245,8 +1245,6 @@ static BOOL connect_to_domain_password_server(struct cli_state *pcli, return False; } - DEBUG(10, ("connect_to_domain_password_server: got mutex for server %s\n", server )); - if (!cli_connect(pcli, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); -- cgit From f5887b774ebd834180de9bc7aa07795fd1539872 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 00:39:10 +0000 Subject: In msleep - never sleep for more than 1 second. Cope with time changes. Jeremy. --- source/lib/util.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/source/lib/util.c b/source/lib/util.c index 1d4125fbcd3..28bd700f360 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -570,9 +570,9 @@ SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n) Sleep for a specified number of milliseconds. ********************************************************************/ -void msleep(int t) +void msleep(unsigned int t) { - int tdiff=0; + unsigned int tdiff=0; struct timeval tval,t1,t2; fd_set fds; @@ -582,12 +582,23 @@ void msleep(int t) while (tdiff < t) { tval.tv_sec = (t-tdiff)/1000; tval.tv_usec = 1000*((t-tdiff)%1000); - + + /* Never wait for more than 1 sec. */ + if (tval.tv_sec > 1) { + tval.tv_sec = 1; + tval.tv_usec = 0; + } + FD_ZERO(&fds); errno = 0; sys_select_intr(0,&fds,NULL,NULL,&tval); GetTimeOfDay(&t2); + if (t2.tv_sec < t1.tv_sec) { + /* Someone adjusted time... */ + t1 = t2; + } + tdiff = TvalDiff(&t1,&t2); } } -- cgit From e8506bee52d46878fac6786aec29ffb9daf91546 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 01:56:29 +0000 Subject: Allow hosts allow/deny to use xx.xx.xx.xx/yy syntax. Jeremy. --- source/lib/access.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/lib/access.c b/source/lib/access.c index d61915f0b24..73b4d57e706 100644 --- a/source/lib/access.c +++ b/source/lib/access.c @@ -15,6 +15,8 @@ static char *sep = ", \t"; #define FAIL (-1) +#define ALLONES ((uint32)0xFFFFFFFF) + /* masked_match - match address against netnumber/netmask */ static int masked_match(char *tok, char *slash, char *s) { @@ -27,8 +29,14 @@ static int masked_match(char *tok, char *slash, char *s) *slash = 0; net = interpret_addr(tok); *slash = '/'; - if (net == INADDR_NONE || - (mask = interpret_addr(slash + 1)) == INADDR_NONE) { + + if (strlen(slash + 1) > 2) { + mask = interpret_addr(slash + 1); + } else { + mask = (uint32)((ALLONES >> atoi(slash + 1)) ^ ALLONES); + } + + if (net == INADDR_NONE || mask == INADDR_NONE) { DEBUG(0,("access: bad net/mask access control: %s\n", tok)); return (False); } -- cgit From e1c2311c78d227aea5862cc1cd4c7ee5ab019168 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 02:36:31 +0000 Subject: Removed HAVE_LIBDL from most places (except system.c). Added checks for dlopen & friends into configure.in. This should help building on *BSD where dl*** calls are in libc. Jeremy. --- source/configure | 2 +- source/configure.in | 2 +- source/include/config.h.in | 12 ++ source/lib/system.c | 8 +- source/smbd/conn.c | 2 - source/smbd/vfs.c | 436 +++++++++++++++++++++------------------------ 6 files changed, 219 insertions(+), 243 deletions(-) diff --git a/source/configure b/source/configure index 79e8b7e8189..be698039fcb 100755 --- a/source/configure +++ b/source/configure @@ -5120,7 +5120,7 @@ else RUNPROG="" fi -for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link +for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:5127: checking for $ac_func" >&5 diff --git a/source/configure.in b/source/configure.in index 3109f6a8705..74436e23fe2 100644 --- a/source/configure.in +++ b/source/configure.in @@ -673,7 +673,7 @@ else RUNPROG="" fi -AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link) +AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link) AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64) AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) diff --git a/source/include/config.h.in b/source/include/config.h.in index 8bb313d58b3..a3c1afdde04 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -489,6 +489,18 @@ /* Define if you have the crypt16 function. */ #undef HAVE_CRYPT16 +/* Define if you have the dlclose function. */ +#undef HAVE_DLCLOSE + +/* Define if you have the dlerror function. */ +#undef HAVE_DLERROR + +/* Define if you have the dlopen function. */ +#undef HAVE_DLOPEN + +/* Define if you have the dlsym function. */ +#undef HAVE_DLSYM + /* Define if you have the dup2 function. */ #undef HAVE_DUP2 diff --git a/source/lib/system.c b/source/lib/system.c index a4420f5c6c2..c714f877ba7 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -1172,7 +1172,7 @@ int sys_pclose(int fd) void *sys_dlopen(const char *name, int flags) { -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) return dlopen(name, flags); #else return NULL; @@ -1181,7 +1181,7 @@ void *sys_dlopen(const char *name, int flags) void *sys_dlsym(void *handle, char *symbol) { -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || defined(HAVE_DLSYM) return dlsym(handle, symbol); #else return NULL; @@ -1190,7 +1190,7 @@ void *sys_dlsym(void *handle, char *symbol) int sys_dlclose (void *handle) { -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || defined(HAVE_DLCLOSE) return dlclose(handle); #else return 0; @@ -1199,7 +1199,7 @@ int sys_dlclose (void *handle) const char *sys_dlerror(void) { -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || defined(HAVE_DLERROR) return dlerror(); #else return NULL; diff --git a/source/smbd/conn.c b/source/smbd/conn.c index 7e8a8383213..822ff5abcd4 100644 --- a/source/smbd/conn.c +++ b/source/smbd/conn.c @@ -165,12 +165,10 @@ void conn_free(connection_struct *conn) { /* Free vfs_connection_struct */ -#ifdef HAVE_LIBDL if (conn->dl_handle != NULL) { /* Close dlopen() handle */ sys_dlclose(conn->dl_handle); } -#endif /* HAVE_LIBDL */ DLIST_REMOVE(Connections, conn); diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 440cbd16f86..0a0451146a4 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -119,50 +119,47 @@ struct vfs_ops default_vfs_ops = { static BOOL vfs_init_default(connection_struct *conn) { - DEBUG(3, ("Initialising default vfs hooks\n")); + DEBUG(3, ("Initialising default vfs hooks\n")); - memcpy(&conn->vfs_ops, &default_vfs_ops, sizeof(struct vfs_ops)); - return True; + memcpy(&conn->vfs_ops, &default_vfs_ops, sizeof(struct vfs_ops)); + return True; } /**************************************************************************** initialise custom vfs hooks ****************************************************************************/ -#ifdef HAVE_LIBDL static BOOL vfs_init_custom(connection_struct *conn) { int vfs_version = -1; - struct vfs_ops *ops, *(*init_fptr)(int *, struct vfs_ops *); + struct vfs_ops *ops, *(*init_fptr)(int *, struct vfs_ops *); - DEBUG(3, ("Initialising custom vfs hooks from %s\n", - lp_vfsobj(SNUM(conn)))); + DEBUG(3, ("Initialising custom vfs hooks from %s\n", lp_vfsobj(SNUM(conn)))); - /* Open object file */ + /* Open object file */ - if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) { + if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) { DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), dlerror())); return False; - } + } - /* Get handle on vfs_init() symbol */ + /* Get handle on vfs_init() symbol */ - init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops *))sys_dlsym(conn->dl_handle, "vfs_init"); + init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops *))sys_dlsym(conn->dl_handle, "vfs_init"); - if (init_fptr == NULL) { - DEBUG(0, ("No vfs_init() symbol found in %s\n", - lp_vfsobj(SNUM(conn)))); + if (init_fptr == NULL) { + DEBUG(0, ("No vfs_init() symbol found in %s\n", lp_vfsobj(SNUM(conn)))); return False; - } + } - /* Initialise vfs_ops structure */ + /* Initialise vfs_ops structure */ conn->vfs_ops = default_vfs_ops; - if ((ops = init_fptr(&vfs_version, &default_vfs_ops)) == NULL) { - DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn)))); + if ((ops = init_fptr(&vfs_version, &default_vfs_ops)) == NULL) { + DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn)))); return False; - } + } if (vfs_version != SMB_VFS_INTERFACE_VERSION) { DEBUG(0, ("vfs_init returned wrong interface version info (was %d, should be %d)\n", @@ -174,9 +171,8 @@ static BOOL vfs_init_custom(connection_struct *conn) memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops)); } - return True; + return True; } -#endif /***************************************************************** Generic VFS init. @@ -185,8 +181,6 @@ static BOOL vfs_init_custom(connection_struct *conn) BOOL smbd_vfs_init(connection_struct *conn) { if (*lp_vfsobj(SNUM(conn))) { -#ifdef HAVE_LIBDL - /* Loadable object file */ if (!vfs_init_custom(conn)) { @@ -195,10 +189,6 @@ BOOL smbd_vfs_init(connection_struct *conn) } return True; -#else - DEBUG(0, ("smbd_vfs_init: No libdl present - cannot use VFS objects\n")); - return False; -#endif } /* Normal share - initialise with disk access functions */ @@ -225,7 +215,7 @@ BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_ if(!ret) errno = ENOTDIR; - return ret; + return ret; } /******************************************************************* @@ -258,11 +248,11 @@ int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode) char *vfs_getwd(connection_struct *conn, char *unix_path) { - char *wd; - wd = conn->vfs_ops.getwd(conn,unix_path); - if (wd) - unix_to_dos(wd); - return wd; + char *wd; + wd = conn->vfs_ops.getwd(conn,unix_path); + if (wd) + unix_to_dos(wd); + return wd; } /******************************************************************* @@ -312,7 +302,7 @@ ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count) while (total < byte_count) { ssize_t ret = fsp->conn->vfs_ops.read(fsp, fsp->fd, buf + total, - byte_count - total); + byte_count - total); if (ret == 0) return total; if (ret == -1) { @@ -586,12 +576,11 @@ int vfs_ChDir(connection_struct *conn, const char *path) /* number of list structures for a caching GetWd function. */ #define MAX_GETWDCACHE (50) -struct -{ - SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */ - SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */ - char *dos_path; /* The pathname in DOS format. */ - BOOL valid; +struct { + SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */ + SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */ + char *dos_path; /* The pathname in DOS format. */ + BOOL valid; } ino_list[MAX_GETWDCACHE]; extern BOOL use_getwd_cache; @@ -627,98 +616,87 @@ static void array_promote(char *array,int elsize,int element) char *vfs_GetWd(connection_struct *conn, char *path) { - pstring s; - static BOOL getwd_cache_init = False; - SMB_STRUCT_STAT st, st2; - int i; - - *s = 0; - - if (!use_getwd_cache) - return(vfs_getwd(conn,path)); - - /* init the cache */ - if (!getwd_cache_init) - { - getwd_cache_init = True; - for (i=0;i Date: Wed, 27 Mar 2002 02:40:20 +0000 Subject: Missed the proto for msleep. Jeremy. --- source/include/proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/proto.h b/source/include/proto.h index d67f9036db9..3460d518a7a 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -1058,7 +1058,7 @@ int set_blocking(int fd, BOOL set); ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), ssize_t (*write_fn)(int, const void *, size_t)); SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(int t); +void msleep(unsigned int t); void become_daemon(void); BOOL yesno(char *p); void *Realloc(void *p,size_t size); -- cgit From f676c5ff6b4f104d52e8d9edafb424979574b264 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 27 Mar 2002 17:36:47 +0000 Subject: small fix that will prevent the "failed to marshall R_NET_SAMLOGON" message in the logs. We needed a user_info_3 struct. The real questions is why we have an empty session key here. Don't see the same behavior when logging onto an NT 4.0 SP 1 PDC. --- source/rpc_server/srv_netlog_nt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c index baec307b888..5882f9a5cc7 100644 --- a/source/rpc_server/srv_netlog_nt.c +++ b/source/rpc_server/srv_netlog_nt.c @@ -577,6 +577,12 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * if (!usr_info) return NT_STATUS_NO_MEMORY; ZERO_STRUCTP(usr_info); + + /* store the user information, if there is any. */ + r_u->user = usr_info; + r_u->switch_value = 0; /* indicates no info */ + r_u->auth_resp = 1; /* authoritative response */ + r_u->switch_value = 3; /* indicates type of validation user info */ if (!get_valid_user_struct(p->vuid)) return NT_STATUS_NO_SUCH_USER; @@ -590,12 +596,6 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * r_u->buffer_creds = 1; /* yes, we have valid server credentials */ memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds)); - /* store the user information, if there is any. */ - r_u->user = usr_info; - r_u->switch_value = 0; /* indicates no info */ - r_u->auth_resp = 1; /* authoritative response */ - r_u->switch_value = 3; /* indicates type of validation user info */ - /* find the username */ switch (q_u->sam_id.logon_level) { -- cgit From b1fb521ff151ae013aeb59b568c24d4e3d24962d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 18:49:13 +0000 Subject: After being prompted by Richard as well as Andrewb :-) finally agreed that the dom sids saved in the NTTOKEN should not just add the group rids from our domain sid but should add from the info3 struct. (Already done in HEAD). Jeremy. --- source/smbd/password.c | 823 ++++++++++++++++++++++++------------------------- 1 file changed, 403 insertions(+), 420 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index 8046188cb50..99f976fb2c0 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -864,103 +864,94 @@ and given password ok (%s)\n", user)); static BOOL check_user_equiv(char *user, char *remote, char *equiv_file) { - int plus_allowed = 1; - char *file_host; - char *file_user; - char **lines = file_lines_load(equiv_file, NULL, False); - int i; - - DEBUG(5, ("check_user_equiv %s %s %s\n", user, remote, equiv_file)); - if (! lines) return False; - for (i=0; lines[i]; i++) { - char *buf = lines[i]; - trim_string(buf," "," "); - - if (buf[0] != '#' && buf[0] != '\n') - { - BOOL is_group = False; - int plus = 1; - char *bp = buf; - if (strcmp(buf, "NO_PLUS\n") == 0) - { - DEBUG(6, ("check_user_equiv NO_PLUS\n")); - plus_allowed = 0; - } - else { - if (buf[0] == '+') - { - bp++; - if (*bp == '\n' && plus_allowed) - { - /* a bare plus means everbody allowed */ - DEBUG(6, ("check_user_equiv everybody allowed\n")); - file_lines_free(lines); - return True; - } - } - else if (buf[0] == '-') - { - bp++; - plus = 0; - } - if (*bp == '@') - { - is_group = True; - bp++; - } - file_host = strtok(bp, " \t\n"); - file_user = strtok(NULL, " \t\n"); - DEBUG(7, ("check_user_equiv %s %s\n", file_host ? file_host : "(null)", - file_user ? file_user : "(null)" )); - if (file_host && *file_host) - { - BOOL host_ok = False; + int plus_allowed = 1; + char *file_host; + char *file_user; + char **lines = file_lines_load(equiv_file, NULL, False); + int i; + + DEBUG(5, ("check_user_equiv %s %s %s\n", user, remote, equiv_file)); + + if (! lines) + return False; + + for (i=0; lines[i]; i++) { + char *buf = lines[i]; + trim_string(buf," "," "); + + if (buf[0] != '#' && buf[0] != '\n') { + BOOL is_group = False; + int plus = 1; + char *bp = buf; + if (strcmp(buf, "NO_PLUS\n") == 0) { + DEBUG(6, ("check_user_equiv NO_PLUS\n")); + plus_allowed = 0; + } else { + if (buf[0] == '+') { + bp++; + if (*bp == '\n' && plus_allowed) { + /* a bare plus means everbody allowed */ + DEBUG(6, ("check_user_equiv everybody allowed\n")); + file_lines_free(lines); + return True; + } + } else if (buf[0] == '-') { + bp++; + plus = 0; + } + if (*bp == '@') { + is_group = True; + bp++; + } + file_host = strtok(bp, " \t\n"); + file_user = strtok(NULL, " \t\n"); + DEBUG(7, ("check_user_equiv %s %s\n", file_host ? file_host : "(null)", + file_user ? file_user : "(null)" )); + if (file_host && *file_host) { + BOOL host_ok = False; #if defined(HAVE_NETGROUP) && defined(HAVE_YP_GET_DEFAULT_DOMAIN) - if (is_group) - { - static char *mydomain = NULL; - if (!mydomain) - yp_get_default_domain(&mydomain); - if (mydomain && innetgr(file_host,remote,user,mydomain)) - host_ok = True; - } + if (is_group) { + static char *mydomain = NULL; + if (!mydomain) + yp_get_default_domain(&mydomain); + if (mydomain && innetgr(file_host,remote,user,mydomain)) + host_ok = True; + } #else - if (is_group) - { - DEBUG(1,("Netgroups not configured\n")); - continue; - } + if (is_group) { + DEBUG(1,("Netgroups not configured\n")); + continue; + } #endif - /* is it this host */ - /* the fact that remote has come from a call of gethostbyaddr - * means that it may have the fully qualified domain name - * so we could look up the file version to get it into - * a canonical form, but I would rather just type it - * in full in the equiv file - */ - if (!host_ok && !is_group && strequal(remote, file_host)) - host_ok = True; - - if (!host_ok) - continue; - - /* is it this user */ - if (file_user == 0 || strequal(user, file_user)) - { - DEBUG(5, ("check_user_equiv matched %s%s %s\n", - (plus ? "+" : "-"), file_host, - (file_user ? file_user : ""))); - file_lines_free(lines); - return (plus ? True : False); - } - } - } - } - } - file_lines_free(lines); - return False; + /* is it this host */ + /* the fact that remote has come from a call of gethostbyaddr + * means that it may have the fully qualified domain name + * so we could look up the file version to get it into + * a canonical form, but I would rather just type it + * in full in the equiv file + */ + if (!host_ok && !is_group && strequal(remote, file_host)) + host_ok = True; + + if (!host_ok) + continue; + + /* is it this user */ + if (file_user == 0 || strequal(user, file_user)) { + DEBUG(5, ("check_user_equiv matched %s%s %s\n", + (plus ? "+" : "-"), file_host, + (file_user ? file_user : ""))); + file_lines_free(lines); + return (plus ? True : False); + } + } + } + } + } + file_lines_free(lines); + return False; } /**************************************************************************** @@ -1191,155 +1182,153 @@ use this machine as the password server.\n")); ************************************************************************/ static BOOL connect_to_domain_password_server(struct cli_state *pcli, - char *server, unsigned char *trust_passwd) + char *server, unsigned char *trust_passwd) { - struct in_addr dest_ip; - fstring remote_machine; - - if(!cli_initialise(pcli)) { - DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n")); - return False; - } - - if (is_ipaddress(server)) { - struct in_addr to_ip; - - /* we shouldn't have 255.255.255.255 forthe IP address of - a password server anyways */ - if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) { - DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server)); - return False; - } - - if (!name_status_find("*", 0, 0x20, to_ip, remote_machine)) { - DEBUG(1, ("connect_to_domain_password_server: Can't " - "resolve name for IP %s\n", server)); - return False; - } - } else { - fstrcpy(remote_machine, server); - } - - standard_sub_basic(remote_machine); - strupper(remote_machine); - - if(!resolve_name( remote_machine, &dest_ip, 0x20)) { - DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine)); - cli_shutdown(pcli); - return False; - } + struct in_addr dest_ip; + fstring remote_machine; + + if(!cli_initialise(pcli)) { + DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n")); + return False; + } + + if (is_ipaddress(server)) { + struct in_addr to_ip; + + /* we shouldn't have 255.255.255.255 forthe IP address of a password server anyways */ + if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) { + DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server)); + return False; + } + + if (!name_status_find("*", 0, 0x20, to_ip, remote_machine)) { + DEBUG(1, ("connect_to_domain_password_server: Can't " "resolve name for IP %s\n", server)); + return False; + } + } else { + fstrcpy(remote_machine, server); + } + + standard_sub_basic(remote_machine); + strupper(remote_machine); + + if(!resolve_name( remote_machine, &dest_ip, 0x20)) { + DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine)); + cli_shutdown(pcli); + return False; + } - if (ismyip(dest_ip)) { - DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n", - remote_machine)); - cli_shutdown(pcli); - return False; - } - - /* we use a mutex to prevent two connections at once - when a NT PDC gets - two connections where one hasn't completed a negprot yet it will send a - TCP reset to the first connection (tridge) */ - - if (!message_named_mutex(server, 20)) { - DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); - return False; - } - - if (!cli_connect(pcli, remote_machine, &dest_ip)) { - DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ + if (ismyip(dest_ip)) { + DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n", + remote_machine)); + cli_shutdown(pcli); + return False; + } + + /* we use a mutex to prevent two connections at once - when a NT PDC gets + two connections where one hasn't completed a negprot yet it will send a + TCP reset to the first connection (tridge) */ + + if (!message_named_mutex(server, 20)) { + DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); + return False; + } + + if (!cli_connect(pcli, remote_machine, &dest_ip)) { + DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } - if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) { - DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \ + if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) { + DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \ session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - message_named_mutex_release(server); - return False; - } + message_named_mutex_release(server); + return False; + } - pcli->protocol = PROTOCOL_NT1; + pcli->protocol = PROTOCOL_NT1; - if (!cli_negprot(pcli)) { - DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \ + if (!cli_negprot(pcli)) { + DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } - - if (pcli->protocol != PROTOCOL_NT1) { - DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n", - remote_machine)); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } - - /* - * Do an anonymous session setup. - */ - - if (!cli_session_setup(pcli, "", "", 0, "", 0, "")) { - DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \ + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } + + if (pcli->protocol != PROTOCOL_NT1) { + DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n", + remote_machine)); + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } + + /* + * Do an anonymous session setup. + */ + + if (!cli_session_setup(pcli, "", "", 0, "", 0, "")) { + DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } - - if (!(pcli->sec_mode & 1)) { - DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n", - remote_machine)); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } - - if (!cli_send_tconX(pcli, "IPC$", "IPC", "", 1)) { - DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \ + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } + + if (!(pcli->sec_mode & 1)) { + DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n", + remote_machine)); + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } + + if (!cli_send_tconX(pcli, "IPC$", "IPC", "", 1)) { + DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - cli_shutdown(pcli); - message_named_mutex_release(server); - return False; - } - - message_named_mutex_release(server); - - /* - * We now have an anonymous connection to IPC$ on the domain password server. - */ - - /* - * Even if the connect succeeds we need to setup the netlogon - * pipe here. We do this as we may just have changed the domain - * account password on the PDC and yet we may be talking to - * a BDC that doesn't have this replicated yet. In this case - * a successful connect to a DC needs to take the netlogon connect - * into account also. This patch from "Bjart Kvarme" . - */ - - if(cli_nt_session_open(pcli, PIPE_NETLOGON) == False) { - DEBUG(0,("connect_to_domain_password_server: unable to open the domain client session to \ + cli_shutdown(pcli); + message_named_mutex_release(server); + return False; + } + + message_named_mutex_release(server); + + /* + * We now have an anonymous connection to IPC$ on the domain password server. + */ + + /* + * Even if the connect succeeds we need to setup the netlogon + * pipe here. We do this as we may just have changed the domain + * account password on the PDC and yet we may be talking to + * a BDC that doesn't have this replicated yet. In this case + * a successful connect to a DC needs to take the netlogon connect + * into account also. This patch from "Bjart Kvarme" . + */ + + if(cli_nt_session_open(pcli, PIPE_NETLOGON) == False) { + DEBUG(0,("connect_to_domain_password_server: unable to open the domain client session to \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); - cli_nt_session_close(pcli); - cli_ulogoff(pcli); - cli_shutdown(pcli); - return False; - } - - if (!NT_STATUS_IS_OK(cli_nt_setup_creds(pcli, trust_passwd))) { - DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \ + cli_nt_session_close(pcli); + cli_ulogoff(pcli); + cli_shutdown(pcli); + return False; + } + + if (!NT_STATUS_IS_OK(cli_nt_setup_creds(pcli, trust_passwd))) { + DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \ %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); - cli_nt_session_close(pcli); - cli_ulogoff(pcli); - cli_shutdown(pcli); - return(False); - } + cli_nt_session_close(pcli); + cli_ulogoff(pcli); + cli_shutdown(pcli); + return(False); + } - return True; + return True; } /*********************************************************************** @@ -1348,19 +1337,19 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, unsigned char *trust_passwd) { - fstring dc_name; + fstring dc_name; - /* - * Ignore addresses we have already tried. - */ + /* + * Ignore addresses we have already tried. + */ - if (is_zero_ip(*ip)) - return False; + if (is_zero_ip(*ip)) + return False; - if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name)) - return False; + if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name)) + return False; - return connect_to_domain_password_server(pcli, dc_name, trust_passwd); + return connect_to_domain_password_server(pcli, dc_name, trust_passwd); } /*********************************************************************** @@ -1449,204 +1438,198 @@ BOOL domain_client_validate( char *user, char *domain, char *smb_ntpasswd, int smb_ntpasslen, BOOL *user_exists, NT_USER_TOKEN **pptoken) { - unsigned char local_challenge[8]; - unsigned char local_lm_response[24]; - unsigned char local_nt_response[24]; - unsigned char trust_passwd[16]; - fstring remote_machine; - char *p, *pserver; - NET_ID_INFO_CTR ctr; - NET_USER_INFO_3 info3; - struct cli_state cli; - uint32 smb_uid_low; - BOOL connected_ok = False; - time_t last_change_time; - NTSTATUS status; - - if (pptoken) - *pptoken = NULL; - - if(user_exists != NULL) - *user_exists = True; /* Only set false on a very specific error. */ + unsigned char local_challenge[8]; + unsigned char local_lm_response[24]; + unsigned char local_nt_response[24]; + unsigned char trust_passwd[16]; + fstring remote_machine; + char *p, *pserver; + NET_ID_INFO_CTR ctr; + NET_USER_INFO_3 info3; + struct cli_state cli; + uint32 smb_uid_low; + BOOL connected_ok = False; + time_t last_change_time; + NTSTATUS status; + + if (pptoken) + *pptoken = NULL; + + if(user_exists != NULL) + *user_exists = True; /* Only set false on a very specific error. */ - /* - * Check that the requested domain is not our own machine name. - * If it is, we should never check the PDC here, we use our own local - * password file. - */ - - if(strequal( domain, global_myname)) { - DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n")); - return False; - } - - /* - * Next, check that the passwords given were encrypted. - */ - - if(((smb_apasslen != 24) && (smb_apasslen != 0)) || - ((smb_ntpasslen != 24) && (smb_ntpasslen != 0))) { - - /* - * Not encrypted - do so. - */ - - DEBUG(3,("domain_client_validate: User passwords not in encrypted format.\n")); - generate_random_buffer( local_challenge, 8, False); - SMBencrypt( (uchar *)smb_apasswd, local_challenge, local_lm_response); - SMBNTencrypt((uchar *)smb_ntpasswd, local_challenge, local_nt_response); - smb_apasslen = 24; - smb_ntpasslen = 24; - smb_apasswd = (char *)local_lm_response; - smb_ntpasswd = (char *)local_nt_response; - } else { - - /* - * Encrypted - get the challenge we sent for these - * responses. - */ - - if (!last_challenge(local_challenge)) { - DEBUG(0,("domain_client_validate: no challenge done - password failed\n")); - return False; - } - } - - /* - * Get the machine account password for our primary domain - */ - if (!secrets_fetch_trust_account_password(global_myworkgroup, trust_passwd, &last_change_time)) - { - DEBUG(0, ("domain_client_validate: could not fetch trust account password for domain %s\n", global_myworkgroup)); - return False; - } - - /* Test if machine password is expired and need to be changed */ - if (time(NULL) > last_change_time + lp_machine_password_timeout()) - global_machine_password_needs_changing = True; - - /* - * At this point, smb_apasswd points to the lanman response to - * the challenge in local_challenge, and smb_ntpasswd points to - * the NT response to the challenge in local_challenge. Ship - * these over the secure channel to a domain controller and - * see if they were valid. - */ - - ZERO_STRUCT(cli); - - /* - * Treat each name in the 'password server =' line as a potential - * PDC/BDC. Contact each in turn and try and authenticate. - */ - - pserver = lp_passwordserver(); - if (! *pserver) pserver = "*"; - p = pserver; - - while (!connected_ok && - next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) { - if(strequal(remote_machine, "*")) { - connected_ok = find_connect_pdc(&cli, trust_passwd, last_change_time); - } else { - connected_ok = connect_to_domain_password_server(&cli, remote_machine, trust_passwd); - } - } - - if (!connected_ok) { - DEBUG(0,("domain_client_validate: Domain password server not available.\n")); - cli_shutdown(&cli); - return False; - } - - /* We really don't care what LUID we give the user. */ - generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False); - - ZERO_STRUCT(info3); - - status = cli_nt_login_network(&cli, domain, user, smb_uid_low, (char *)local_challenge, - ((smb_apasslen != 0) ? smb_apasswd : NULL), - ((smb_ntpasslen != 0) ? smb_ntpasswd : NULL), - &ctr, &info3); - - if (!NT_STATUS_IS_OK(status)) { - - DEBUG(0,("domain_client_validate: unable to validate password for user %s in domain \ + /* + * Check that the requested domain is not our own machine name. + * If it is, we should never check the PDC here, we use our own local + * password file. + */ + + if(strequal( domain, global_myname)) { + DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n")); + return False; + } + + /* + * Next, check that the passwords given were encrypted. + */ + + if(((smb_apasslen != 24) && (smb_apasslen != 0)) || + ((smb_ntpasslen != 24) && (smb_ntpasslen != 0))) { + + /* + * Not encrypted - do so. + */ + + DEBUG(3,("domain_client_validate: User passwords not in encrypted format.\n")); + generate_random_buffer( local_challenge, 8, False); + SMBencrypt( (uchar *)smb_apasswd, local_challenge, local_lm_response); + SMBNTencrypt((uchar *)smb_ntpasswd, local_challenge, local_nt_response); + smb_apasslen = 24; + smb_ntpasslen = 24; + smb_apasswd = (char *)local_lm_response; + smb_ntpasswd = (char *)local_nt_response; + } else { + + /* + * Encrypted - get the challenge we sent for these + * responses. + */ + + if (!last_challenge(local_challenge)) { + DEBUG(0,("domain_client_validate: no challenge done - password failed\n")); + return False; + } + } + + /* + * Get the machine account password for our primary domain + */ + + if (!secrets_fetch_trust_account_password(global_myworkgroup, trust_passwd, &last_change_time)) { + DEBUG(0, ("domain_client_validate: could not fetch trust account password for domain %s\n", global_myworkgroup)); + return False; + } + + /* Test if machine password is expired and need to be changed */ + if (time(NULL) > last_change_time + lp_machine_password_timeout()) + global_machine_password_needs_changing = True; + + /* + * At this point, smb_apasswd points to the lanman response to + * the challenge in local_challenge, and smb_ntpasswd points to + * the NT response to the challenge in local_challenge. Ship + * these over the secure channel to a domain controller and + * see if they were valid. + */ + + ZERO_STRUCT(cli); + + /* + * Treat each name in the 'password server =' line as a potential + * PDC/BDC. Contact each in turn and try and authenticate. + */ + + pserver = lp_passwordserver(); + if (! *pserver) + pserver = "*"; + p = pserver; + + while (!connected_ok && + next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) { + if(strequal(remote_machine, "*")) { + connected_ok = find_connect_pdc(&cli, trust_passwd, last_change_time); + } else { + connected_ok = connect_to_domain_password_server(&cli, remote_machine, trust_passwd); + } + } + + if (!connected_ok) { + DEBUG(0,("domain_client_validate: Domain password server not available.\n")); + cli_shutdown(&cli); + return False; + } + + /* We really don't care what LUID we give the user. */ + generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False); + + ZERO_STRUCT(info3); + + status = cli_nt_login_network(&cli, domain, user, smb_uid_low, (char *)local_challenge, + ((smb_apasslen != 0) ? smb_apasswd : NULL), + ((smb_ntpasslen != 0) ? smb_ntpasswd : NULL), + &ctr, &info3); + + if (!NT_STATUS_IS_OK(status)) { + + DEBUG(0,("domain_client_validate: unable to validate password for user %s in domain \ %s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, get_nt_error_msg(status) )); - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); + cli_nt_session_close(&cli); + cli_ulogoff(&cli); + cli_shutdown(&cli); - if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL)) - *user_exists = False; + if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL)) + *user_exists = False; - return False; - } + return False; + } - /* - * Here, if we really want it, we have lots of info about the user in info3. - */ + /* + * Here, if we really want it, we have lots of info about the user in info3. + */ - /* Return group membership as returned by NT. This contains group - membership in nested groups which doesn't seem to be accessible by any - other means. We merge this into the NT_USER_TOKEN associated with the vuid - later on. */ - - if (pptoken && (info3.num_groups2 != 0)) { - NT_USER_TOKEN *ptok; - int i; - DOM_SID domain_sid; + /* Return group membership as returned by NT. This contains group + membership in nested groups which doesn't seem to be accessible by any + other means. We merge this into the NT_USER_TOKEN associated with the vuid + later on. */ - *pptoken = NULL; + if (pptoken && (info3.num_groups2 != 0)) { + NT_USER_TOKEN *ptok; + int i; - if ((ptok = (NT_USER_TOKEN *)malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) { - DEBUG(0, ("domain_client_validate: Out of memory allocating NT_USER_TOKEN\n")); - return False; - } + *pptoken = NULL; - ptok->num_sids = (size_t)info3.num_groups2; - if ((ptok->user_sids = (DOM_SID *)malloc( sizeof(DOM_SID) * ptok->num_sids )) == NULL) { - DEBUG(0, ("domain_client_validate: Out of memory allocating group SIDS\n")); - SAFE_FREE(ptok); - return False; - } + if ((ptok = (NT_USER_TOKEN *)malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) { + DEBUG(0, ("domain_client_validate: Out of memory allocating NT_USER_TOKEN\n")); + return False; + } - if (!secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) { - DEBUG(0, ("domain_client_validate: unable to fetch domain sid.\n")); - delete_nt_token(&ptok); - return False; - } + ptok->num_sids = (size_t)info3.num_groups2; + if ((ptok->user_sids = (DOM_SID *)malloc( sizeof(DOM_SID) * ptok->num_sids )) == NULL) { + DEBUG(0, ("domain_client_validate: Out of memory allocating group SIDS\n")); + SAFE_FREE(ptok); + return False; + } - for (i = 0; i < ptok->num_sids; i++) { - sid_copy(&ptok->user_sids[i], &domain_sid); - sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid); - } - *pptoken = ptok; - } + for (i = 0; i < ptok->num_sids; i++) { + sid_copy(&ptok->user_sids[i], &info3.dom_sid.sid); + sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid); + } + *pptoken = ptok; + } #if 0 - /* - * We don't actually need to do this - plus it fails currently with - * NT_STATUS_INVALID_INFO_CLASS - we need to know *exactly* what to - * send here. JRA. - */ - - if(cli_nt_logoff(&cli, &ctr) == False) { - DEBUG(0,("domain_client_validate: unable to log off user %s in domain \ + /* + * We don't actually need to do this - plus it fails currently with + * NT_STATUS_INVALID_INFO_CLASS - we need to know *exactly* what to + * send here. JRA. + */ + + if(cli_nt_logoff(&cli, &ctr) == False) { + DEBUG(0,("domain_client_validate: unable to log off user %s in domain \ %s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(&cli))); - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); - return False; - } + cli_nt_session_close(&cli); + cli_ulogoff(&cli); + cli_shutdown(&cli); + return False; + } #endif /* 0 */ - /* Note - once the cli stream is shutdown the mem_ctx used - to allocate the other_sids and gids structures has been deleted - so - these pointers are no longer valid..... */ + /* Note - once the cli stream is shutdown the mem_ctx used + to allocate the other_sids and gids structures has been deleted - so + these pointers are no longer valid..... */ - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); - return True; + cli_nt_session_close(&cli); + cli_ulogoff(&cli); + cli_shutdown(&cli); + return True; } -- cgit From 1a020c60894712bd9596abb01b1f532bd634abfd Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 27 Mar 2002 19:07:37 +0000 Subject: don't do checking of local passdb if using -r option --- source/utils/smbpasswd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 051e69de202..96efeff76e5 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -900,7 +900,9 @@ static int process_root(void) goto done; } - if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) { + if(remote_machine) { + printf("Password changed for user %s on %s.\n", user_name, remote_machine ); + } else if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) { SAM_ACCOUNT *sampass = NULL; uint16 acct_ctrl; -- cgit From 5a5d0cb40414ca7840e8363a1cfe038fae82e101 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Wed, 27 Mar 2002 20:51:36 +0000 Subject: Swap around smbprint to smbprint.old and smbprint-new.sh to smbprint. --- examples/printing/smbprint | 104 ++++++++++++++++++++------- examples/printing/smbprint-new.sh | 145 -------------------------------------- examples/printing/smbprint.old | 95 +++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 172 deletions(-) delete mode 100644 examples/printing/smbprint-new.sh create mode 100755 examples/printing/smbprint.old diff --git a/examples/printing/smbprint b/examples/printing/smbprint index 5a00a2a8aa8..68bd66a13fe 100755 --- a/examples/printing/smbprint +++ b/examples/printing/smbprint @@ -25,6 +25,11 @@ # # -t now causes translate to be used when sending files # +# Further modifications by Alfred Perlstein to fix some problems and +# improve the quality of the code (3-Dec-2001). +# +# More hacking by Richard Sharpe to improve portability. 9-Dec-2001. +# # In order for this to work the /etc/printcap entry must include an # accounting file (af=...): # @@ -46,12 +51,10 @@ # service=CJET_371 # password="" -# -# Debugging log file, change to /dev/null if you like. -# -logfile=/tmp/smb-print.log -# logfile=/dev/null +#smbclient=/usr/pkg/bin/smbclient +# Assume that smbclient will be in the same place as smbprint +smbclient="`dirname $0`/smbclient" # # The last parameter to the filter is the accounting file name. @@ -67,29 +70,76 @@ config_file=$spool_dir/.config # server # service # password -eval `cat $config_file` +# username (optional) +# IP (optional) +# debug (optional) +# debugsmb (optional) +# debugfile (optional) +. $config_file + +if [ "x$password" = "x" ] ; then + password="-N" +fi -while getopts t c; do - case $c in - t) - TRANS=1 - ;; +if [ "x$username" == "x" ] ; then + username="$server"; +fi - '?') # Bad parameters, ignore it ... - ;; - esac +while test $# -gt 0; do + case "$1" in + -t) + TRANS=1 + ;; + + *) # Bad Parameters, ignore them ... + ;; + esac + shift done + +command="print - ;" +if [ $TRANS -eq 1 ]; then + command="translate;$command"; +fi + +debugfile="/tmp/smb-print.log" +if [ "x$debug" = "x" ] ; then + debugfile=/dev/null debugargs= +else + if [ $debug -eq 0 ] ; then + debugfile=/dev/null debugargs= + else + set -x; exec >>$debugfile 2>&1 + debugargs="$debugfile." + #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" + fi +fi + +if [ "x$smbconf" != "x" ]; then + + smbconf="-s $smbconf" + +fi + +if [ "x$IP" != "x" ]; then + + IP="-I $IP" + +fi + +if [ "x$debugargs" != "x" ]; then + + debugargs="-l $debugargs" + +fi + +$smbclient \ + "\\\\$server\\$service" \ + $password \ + $smbconf \ + $IP \ + $debugargs \ + -U $username \ + -P \ + -c "$command" # -# Some debugging help, change the >> to > if you want to same space. -# -echo "server $server, service $service" >> $logfile - -( -# NOTE You may wish to add the line `echo translate' if you want automatic -# CR/LF translation when printing. - if [ $TRANS -eq 1 ]; then - echo translate - fi - echo "print -" - cat -) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile diff --git a/examples/printing/smbprint-new.sh b/examples/printing/smbprint-new.sh deleted file mode 100644 index 68bd66a13fe..00000000000 --- a/examples/printing/smbprint-new.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/sh - -# This script is an input filter for printcap printing on a unix machine. It -# uses the smbclient program to print the file to the specified smb-based -# server and service. -# For example you could have a printcap entry like this -# -# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint -# -# which would create a unix printer called "smb" that will print via this -# script. You will need to create the spool directory /usr/spool/smb with -# appropriate permissions and ownerships for your system. - -# Set these to the server and service you wish to print to -# In this example I have a WfWg PC called "lapland" that has a printer -# exported called "printer" with no password. - -# -# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) -# so that the server, service, and password can be read from -# a /usr/var/spool/lpd/PRINTNAME/.config file. -# -# Script further modified by Richard Sharpe to fix some things. -# Get rid of the -x on the first line, and add parameters -# -# -t now causes translate to be used when sending files -# -# Further modifications by Alfred Perlstein to fix some problems and -# improve the quality of the code (3-Dec-2001). -# -# More hacking by Richard Sharpe to improve portability. 9-Dec-2001. -# -# In order for this to work the /etc/printcap entry must include an -# accounting file (af=...): -# -# cdcolour:\ -# :cm=CD IBM Colorjet on 6th:\ -# :sd=/var/spool/lpd/cdcolour:\ -# :af=/var/spool/lpd/cdcolour/acct:\ -# :if=/usr/local/etc/smbprint:\ -# :mx=0:\ -# :lp=/dev/null: -# -# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: -# server=PC_SERVER -# service=PR_SHARENAME -# password="password" -# -# E.g. -# server=PAULS_PC -# service=CJET_371 -# password="" - -#smbclient=/usr/pkg/bin/smbclient -# Assume that smbclient will be in the same place as smbprint - -smbclient="`dirname $0`/smbclient" - -# -# The last parameter to the filter is the accounting file name. -# Extract the directory name from the file name. -# Concat this with /.config to get the config file. -# -TRANS=0 -eval acct_file=\${$#} -spool_dir=`dirname $acct_file` -config_file=$spool_dir/.config - -# Should read the following variables set in the config file: -# server -# service -# password -# username (optional) -# IP (optional) -# debug (optional) -# debugsmb (optional) -# debugfile (optional) -. $config_file - -if [ "x$password" = "x" ] ; then - password="-N" -fi - -if [ "x$username" == "x" ] ; then - username="$server"; -fi - -while test $# -gt 0; do - case "$1" in - -t) - TRANS=1 - ;; - - *) # Bad Parameters, ignore them ... - ;; - esac - shift -done - -command="print - ;" -if [ $TRANS -eq 1 ]; then - command="translate;$command"; -fi - -debugfile="/tmp/smb-print.log" -if [ "x$debug" = "x" ] ; then - debugfile=/dev/null debugargs= -else - if [ $debug -eq 0 ] ; then - debugfile=/dev/null debugargs= - else - set -x; exec >>$debugfile 2>&1 - debugargs="$debugfile." - #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" - fi -fi - -if [ "x$smbconf" != "x" ]; then - - smbconf="-s $smbconf" - -fi - -if [ "x$IP" != "x" ]; then - - IP="-I $IP" - -fi - -if [ "x$debugargs" != "x" ]; then - - debugargs="-l $debugargs" - -fi - -$smbclient \ - "\\\\$server\\$service" \ - $password \ - $smbconf \ - $IP \ - $debugargs \ - -U $username \ - -P \ - -c "$command" -# diff --git a/examples/printing/smbprint.old b/examples/printing/smbprint.old new file mode 100755 index 00000000000..5a00a2a8aa8 --- /dev/null +++ b/examples/printing/smbprint.old @@ -0,0 +1,95 @@ +#!/bin/sh + +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /usr/var/spool/lpd/PRINTNAME/.config file. +# +# Script further modified by Richard Sharpe to fix some things. +# Get rid of the -x on the first line, and add parameters +# +# -t now causes translate to be used when sending files +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# server=PC_SERVER +# service=PR_SHARENAME +# password="password" +# +# E.g. +# server=PAULS_PC +# service=CJET_371 +# password="" + +# +# Debugging log file, change to /dev/null if you like. +# +logfile=/tmp/smb-print.log +# logfile=/dev/null + + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +TRANS=0 +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# server +# service +# password +eval `cat $config_file` + +while getopts t c; do + case $c in + t) + TRANS=1 + ;; + + '?') # Bad parameters, ignore it ... + ;; + esac +done +# +# Some debugging help, change the >> to > if you want to same space. +# +echo "server $server, service $service" >> $logfile + +( +# NOTE You may wish to add the line `echo translate' if you want automatic +# CR/LF translation when printing. + if [ $TRANS -eq 1 ]; then + echo translate + fi + echo "print -" + cat +) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile -- cgit From 1ab6a46ea2a9ba379412453f0061dd4eb0e2eee2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2002 22:35:59 +0000 Subject: Added sys_adminlog() stuff. This is an alternate log method, for people who don't want debug info, but want to log specific "administrator" events. Used in the HP PSA - will be useful for other appliance vendors. Jeremy. --- source/include/includes.h | 33 +++++++++++++++++++++++++++++++++ source/include/proto.h | 2 ++ source/lib/system.c | 28 ++++++++++++++++++++++++++++ source/param/loadparm.c | 5 +++++ 4 files changed, 68 insertions(+) diff --git a/source/include/includes.h b/source/include/includes.h index 40c4df396ee..f9e0f92d3b6 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -975,6 +975,39 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define S_IXOTH 00001 /* execute permission: other */ #endif +/* For sys_adminlog(). */ +#ifndef LOG_EMERG +#define LOG_EMERG 0 /* system is unusable */ +#endif + +#ifndef LOG_ALERT +#define LOG_ALERT 1 /* action must be taken immediately */ +#endif + +#ifndef LOG_CRIT +#define LOG_CRIT 2 /* critical conditions */ +#endif + +#ifndef LOG_ERR +#define LOG_ERR 3 /* error conditions */ +#endif + +#ifndef LOG_WARNING +#define LOG_WARNING 4 /* warning conditions */ +#endif + +#ifndef LOG_NOTICE +#define LOG_NOTICE 5 /* normal but significant condition */ +#endif + +#ifndef LOG_INFO +#define LOG_INFO 6 /* informational */ +#endif + +#ifndef LOG_DEBUG +#define LOG_DEBUG 7 /* debug-level messages */ +#endif + /* NetBSD doesn't have these */ #ifndef SHM_R #define SHM_R 0400 diff --git a/source/include/proto.h b/source/include/proto.h index 3460d518a7a..7aca60ec66e 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -974,6 +974,7 @@ void *sys_dlopen(const char *name, int flags); void *sys_dlsym(void *handle, char *symbol); int sys_dlclose (void *handle); const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); /*The following definitions come from lib/talloc.c */ @@ -1912,6 +1913,7 @@ BOOL lp_strip_dot(void); BOOL lp_encrypted_passwords(void); BOOL lp_update_encrypted(void); BOOL lp_syslog_only(void); +BOOL lp_admin_log(void); BOOL lp_timestamp_logs(void); BOOL lp_debug_hires_timestamp(void); BOOL lp_debug_pid(void); diff --git a/source/lib/system.c b/source/lib/system.c index c714f877ba7..3bb11f11b81 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -1205,3 +1205,31 @@ const char *sys_dlerror(void) return NULL; #endif } + +/************************************************************************** + Wrapper for Admin Logs. +****************************************************************************/ + +void sys_adminlog(int priority, const char *format_str, ...) +{ + va_list ap; + int ret; + char **msgbuf = NULL; + + if (!lp_admin_log()) + return; + + va_start( ap, format_str ); + ret = vasprintf( msgbuf, format_str, ap ); + va_end( ap ); + + if (ret == -1) + return; + +#if defined(HAVE_SYSLOG) + syslog( priority, "%s", *msgbuf ); +#else + DEBUG(0,("%s", *msgbuf )); +#endif + SAFE_FREE(*msgbuf); +} diff --git a/source/param/loadparm.c b/source/param/loadparm.c index c6ed9137360..5961397c48b 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -260,6 +260,7 @@ typedef struct BOOL bReadPrediction; BOOL bReadbmpx; BOOL bSyslogOnly; + BOOL bAdminLog; BOOL bBrowseList; BOOL bNISHomeMap; BOOL bTimeServer; @@ -801,6 +802,8 @@ static struct parm_struct parm_table[] = { #endif /* WITH_SSL */ {"Logging Options", P_SEP, P_SEPARATOR}, + + {"admin log", P_BOOL, P_GLOBAL, &Globals.bAdminLog, NULL, NULL, 0}, {"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, {"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0}, {"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, @@ -1295,6 +1298,7 @@ static void init_globals(void) Globals.bStripDot = False; Globals.syslog = 1; Globals.bSyslogOnly = False; + Globals.bAdminLog = False; Globals.bTimestampLogs = True; Globals.bDebugHiresTimestamp = False; Globals.bDebugPid = False; @@ -1594,6 +1598,7 @@ FN_GLOBAL_BOOL(lp_strip_dot, &Globals.bStripDot) FN_GLOBAL_BOOL(lp_encrypted_passwords, &Globals.bEncryptPasswords) FN_GLOBAL_BOOL(lp_update_encrypted, &Globals.bUpdateEncrypt) FN_GLOBAL_BOOL(lp_syslog_only, &Globals.bSyslogOnly) +FN_GLOBAL_BOOL(lp_admin_log, &Globals.bAdminLog) FN_GLOBAL_BOOL(lp_timestamp_logs, &Globals.bTimestampLogs) FN_GLOBAL_BOOL(lp_debug_hires_timestamp, &Globals.bDebugHiresTimestamp) FN_GLOBAL_BOOL(lp_debug_pid, &Globals.bDebugPid) -- cgit From c40918faa47bc98819faa969bb11c1cae0df55ac Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Mar 2002 01:00:34 +0000 Subject: Ensure that setting file length can return disk full on failure. Jeremy. --- source/smbd/trans2.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 23579c7c06d..b3c46163798 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2800,6 +2800,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", if(size != sbuf.st_size) { + int ret; + DEBUG(10,("call_trans2setfilepathinfo: file %s : setting new size to %.0f\n", fname, (double)size )); @@ -2825,11 +2827,14 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", if (new_fsp == NULL) return(UNIXERROR(ERRDOS,ERRbadpath)); - vfs_set_filelen(new_fsp, size); + ret = vfs_set_filelen(new_fsp, size); close_file(new_fsp,True); } else { - vfs_set_filelen(fsp, size); + ret = vfs_set_filelen(fsp, size); } + + if (ret == -1) + return (UNIXERROR(ERRHRD,ERRdiskfull)); } SSVAL(params,0,0); -- cgit From dbcd30c1a7fec16767bc1e918a0fb776a49e1eb9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Mar 2002 02:43:35 +0000 Subject: a dodgy fix for a dodgy race condition in smbtorture child startup --- source/utils/torture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/torture.c b/source/utils/torture.c index 5bb89bf8555..ac3416188c7 100644 --- a/source/utils/torture.c +++ b/source/utils/torture.c @@ -4540,7 +4540,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) child_status[i] = getpid(); - while (child_status[i]) msleep(2); + while (child_status[i] && end_timer() < 5) msleep(2); child_status_out[i] = fn(i); _exit(0); -- cgit From 3d655840f33c53aa1304af7e16079bf948939b7d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 28 Mar 2002 16:44:00 +0000 Subject: fixup error codes for failures in GetPrinterData() --- source/rpc_server/srv_spoolss_nt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 1718b4fe34f..cedabfb1e13 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1563,7 +1563,12 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO *data = NULL; } - return WERR_INVALID_PARAM; + /* error depends on handle type */ + + if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) + return WERR_INVALID_PARAM; + else + return WERR_BADFILE; } if (*needed > *out_size) -- cgit From 41aea8e4e0eb33c2e19a425b294a76e874781a0a Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Thu, 28 Mar 2002 17:16:53 +0000 Subject: Trim dfs pathnames sent for referrals so that they begin with only one backslash. Some clients send two backslashes in referral requests, but can't handle them in replies. --- source/msdfs/msdfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 60bfc6fcc4a..05f3059122d 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -587,21 +587,21 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) BOOL self_referral = False; pstring buf; int reply_size = 0; + char *pathnamep = pathname; ZERO_STRUCT(junction); /* get the junction entry */ - if (!pathname) + if (!pathnamep) return -1; - /* Some buggy Dfs clients (seen in Win9X) can't handle replies - containing the exact pathnames they send for referrals. They screw up - if there are two backslashes in front. - kalele 2002.3.21 + /* Trim pathname sent by client so it begins with only one backslash. + Two backslashes confuse some dfs clients */ - while (strlen(pathname) > 1 && pathname[1] == '\\') - safe_strcpy(pathname, &pathname[1], strlen(pathname) - 1); + while (strlen(pathnamep) > 1 && pathnamep[1] == '\\') + pathnamep++; - safe_strcpy(buf, pathname, sizeof(buf)); + safe_strcpy(buf, pathnamep, sizeof(buf)); if (!get_referred_path(buf, &junction, &consumedcnt, &self_referral)) return -1; @@ -610,7 +610,7 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) { if( DEBUGLVL( 3 ) ) { int i=0; - dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathname); + dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathnamep); for(i=0;i Date: Fri, 29 Mar 2002 00:44:21 +0000 Subject: make spacing in comment line match head. --- source/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk index 8283dc02e9b..af230400935 100644 --- a/source/script/mkproto.awk +++ b/source/script/mkproto.awk @@ -24,7 +24,7 @@ END { # use_ldap_define = 0; # } print "" - print "/*The following definitions come from ",FILENAME," */" + print "/* The following definitions come from",FILENAME," */" print "" current_file=FILENAME } -- cgit From d651051d6d43c13bb64ad8d9f762a1f0559c421c Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 29 Mar 2002 00:55:26 +0000 Subject: readd WINS support to winbindd that was accidently removed. fixed a few improper sizes in safe_strcat --- source/nsswitch/wbinfo.c | 70 ++++++++++++++++++++++++++++++++++++++++ source/nsswitch/winbind_nss.c | 39 +++++++++++++++------- source/nsswitch/winbindd.c | 5 +++ source/nsswitch/winbindd_nss.h | 8 +++++ source/nsswitch/winbindd_proto.h | 19 +++-------- source/nsswitch/winbindd_wins.c | 68 +++++++++++++++++++------------------- 6 files changed, 149 insertions(+), 60 deletions(-) diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c index 2c55bc0db72..a9cf309ebf0 100644 --- a/source/nsswitch/wbinfo.c +++ b/source/nsswitch/wbinfo.c @@ -137,6 +137,58 @@ static BOOL wbinfo_get_usergroups(char *user) return True; } +/* Convert NetBIOS name to IP */ + +static BOOL wbinfo_wins_byname(char *name) +{ + struct winbindd_request request; + struct winbindd_response response; + + ZERO_STRUCT(request); + ZERO_STRUCT(response); + + /* Send request */ + + fstrcpy(request.data.winsreq, name); + + if (winbindd_request(WINBINDD_WINS_BYNAME, &request, &response) != + NSS_STATUS_SUCCESS) { + return False; + } + + /* Display response */ + + printf("%s\n", response.data.winsresp); + + return True; +} + +/* Convert IP to NetBIOS name */ + +static BOOL wbinfo_wins_byip(char *ip) +{ + struct winbindd_request request; + struct winbindd_response response; + + ZERO_STRUCT(request); + ZERO_STRUCT(response); + + /* Send request */ + + fstrcpy(request.data.winsreq, ip); + + if (winbindd_request(WINBINDD_WINS_BYIP, &request, &response) != + NSS_STATUS_SUCCESS) { + return False; + } + + /* Display response */ + + printf("%s\n", response.data.winsresp); + + return True; +} + /* List trusted domains */ static BOOL wbinfo_list_domains(void) @@ -578,6 +630,8 @@ static void usage(void) printf("\t-g\t\t\tlists all domain groups\n"); printf("\t-n name\t\t\tconverts name to sid\n"); printf("\t-s sid\t\t\tconverts sid to name\n"); + printf("\t-N name\t\t\tconverts NetBIOS name to IP (WINS)\n"); + printf("\t-I IP\t\t\tconverts IP address to NetBIOS name (WINS)\n"); printf("\t-U uid\t\t\tconverts uid to sid\n"); printf("\t-G gid\t\t\tconverts gid to sid\n"); printf("\t-S sid\t\t\tconverts sid to uid\n"); @@ -615,6 +669,8 @@ int main(int argc, char **argv) { "help", 'h', POPT_ARG_NONE, 0, 'h' }, { "domain-users", 'u', POPT_ARG_NONE, 0, 'u' }, { "domain-groups", 'g', POPT_ARG_NONE, 0, 'g' }, + { "WINS-by-name", 'N', POPT_ARG_STRING, &string_arg, 'N' }, + { "WINS-by-ip", 'I', POPT_ARG_STRING, &string_arg, 'I' }, { "name-to-sid", 'n', POPT_ARG_STRING, &string_arg, 'n' }, { "sid-to-name", 's', POPT_ARG_STRING, &string_arg, 's' }, { "uid-to-sid", 'U', POPT_ARG_INT, &int_arg, 'U' }, @@ -706,6 +762,20 @@ int main(int argc, char **argv) return 1; } break; + case 'N': + if (!wbinfo_wins_byname(string_arg)) { + printf("Could not lookup WINS by name %s\n", + string_arg); + return 1; + } + break; + case 'I': + if (!wbinfo_wins_byip(string_arg)) { + printf("Could not lookup WINS by IP %s\n", + string_arg); + return 1; + } + break; case 'U': if (!wbinfo_uid_to_sid(int_arg)) { printf("Could not convert uid %d to sid\n", int_arg); diff --git a/source/nsswitch/winbind_nss.c b/source/nsswitch/winbind_nss.c index 8d33cd9b2f1..0a49f5ec968 100644 --- a/source/nsswitch/winbind_nss.c +++ b/source/nsswitch/winbind_nss.c @@ -107,7 +107,7 @@ winbind_xid_lookup(int xid, struct winbindd_request **requestp) *last = dx->next; result = dx->rq; *requestp = dx->request; - free(dx); + SAFE_FREE(dx); } nsd_logprintf(NSD_LOG_LOW, "entering winbind_xid_lookup xid = %d rq = 0x%x, request = 0x%x\n", @@ -178,9 +178,9 @@ winbind_callback(nsd_file_t **rqp, int fd) struct winbindd_gr *gr = &response.data.gr; nsd_file_t *rq; NSS_STATUS status; - char result[1024]; + fstring result; char *members; - int i; + int i, maxlen; dequeue_request(); @@ -204,10 +204,17 @@ winbind_callback(nsd_file_t **rqp, int fd) rq->f_status = NS_NOTFOUND; return NSD_NEXT; } + + maxlen = sizeof(result) - 1; + switch ((int)rq->f_cmd_data) { + case WINBINDD_WINS_BYNAME: + case WINBINDD_WINS_BYIP: + snprintf(result,maxlen,"%s\n",response.data.winsresp); + break; case WINBINDD_GETPWUID: case WINBINDD_GETPWNAM: - snprintf(result,1023,"%s:%s:%d:%d:%s:%s:%s\n", + snprintf(result,maxlen,"%s:%s:%d:%d:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, @@ -222,7 +229,7 @@ winbind_callback(nsd_file_t **rqp, int fd) members = response.extra_data; else members = ""; - snprintf(result,1023,"%s:%s:%d:%s\n", + snprintf(result,maxlen,"%s:%s:%d:%s\n", gr->gr_name, gr->gr_passwd, gr->gr_gid, members); break; case WINBINDD_SETGRENT: @@ -244,7 +251,7 @@ winbind_callback(nsd_file_t **rqp, int fd) members = (char *)response.extra_data + (response.data.num_entries * sizeof(struct winbindd_gr)); for (i = 0; i < response.data.num_entries; i++) { - snprintf(result,1023,"%s:%s:%d:%s\n", + snprintf(result,maxlen,"%s:%s:%d:%s\n", gr->gr_name, gr->gr_passwd, gr->gr_gid, &members[gr->gr_mem_ofs]); nsd_logprintf(NSD_LOG_MIN, " GETGRENT %s\n",result); @@ -270,7 +277,7 @@ winbind_callback(nsd_file_t **rqp, int fd) return NSD_ERROR; } for (i = 0; i < response.data.num_entries; i++) { - snprintf(result,1023,"%s:%s:%d:%d:%s:%s:%s", + snprintf(result,maxlen,"%s:%s:%d:%d:%s:%s:%s", pw->pw_name, pw->pw_passwd, pw->pw_uid, @@ -338,7 +345,7 @@ send_next_request(nsd_file_t *rq, struct winbindd_request *request) nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) %d to = %d\n", rq->f_cmd_data, timeout); status = winbindd_send_request((int)rq->f_cmd_data,request); - free(request); + SAFE_FREE(request); if (status != NSS_STATUS_SUCCESS) { nsd_logprintf(NSD_LOG_MIN, @@ -407,12 +414,20 @@ int lookup(nsd_file_t *rq) } else if (strcasecmp(map,"group.bygid") == 0) { request->data.gid = atoi(key); rq->f_cmd_data = (void *)WINBINDD_GETGRGID; + } else if (strcasecmp(map,"hosts.byname") == 0) { + strncpy(request->data.winsreq, key, sizeof(request->data.winsreq) - 1); + request->data.winsreq[sizeof(request->data.winsreq) - 1] = '\0'; + rq->f_cmd_data = (void *)WINBINDD_WINS_BYNAME; + } else if (strcasecmp(map,"hosts.byaddr") == 0) { + strncpy(request->data.winsreq, key, sizeof(request->data.winsreq) - 1); + request->data.winsreq[sizeof(request->data.winsreq) - 1] = '\0'; + rq->f_cmd_data = (void *)WINBINDD_WINS_BYIP; } else { /* * Don't understand this map - just return not found */ nsd_logprintf(NSD_LOG_MIN, "lookup (winbind) unknown table\n"); - free(request); + SAFE_FREE(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -470,7 +485,7 @@ do_list(int state, nsd_file_t *rq) break; default: nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown state\n"); - free(request); + SAFE_FREE(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -488,7 +503,7 @@ do_list(int state, nsd_file_t *rq) break; default: nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown state\n"); - free(request); + SAFE_FREE(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } @@ -497,7 +512,7 @@ do_list(int state, nsd_file_t *rq) * Don't understand this map - just return not found */ nsd_logprintf(NSD_LOG_MIN, "do_list (winbind) unknown table\n"); - free(request); + SAFE_FREE(request); rq->f_status = NS_NOTFOUND; return NSD_NEXT; } diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 06d39bfa068..688026d2635 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -258,6 +258,11 @@ static struct dispatch_table dispatch_table[] = { { WINBINDD_INTERFACE_VERSION, winbindd_interface_version, "INTERFACE_VERSION" }, { WINBINDD_DOMAIN_NAME, winbindd_domain_name, "DOMAIN_NAME" }, + /* WINS functions */ + + { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" }, + { WINBINDD_WINS_BYIP, winbindd_wins_byip, "WINS_BYIP" }, + /* End of list */ { WINBINDD_NUM_CMDS, NULL, "NONE" } diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbindd_nss.h index 476dc71ab2d..023d72306b7 100644 --- a/source/nsswitch/winbindd_nss.h +++ b/source/nsswitch/winbindd_nss.h @@ -94,6 +94,11 @@ enum winbindd_cmd { WINBINDD_SHOW_SEQUENCE, /* display sequence numbers of domains */ + /* WINS commands */ + + WINBINDD_WINS_BYIP, + WINBINDD_WINS_BYNAME, + /* Placeholder for end of cmd list */ WINBINDD_NUM_CMDS @@ -107,6 +112,7 @@ struct winbindd_request { pid_t pid; /* pid of calling process */ union { + fstring winsreq; /* WINS request */ fstring username; /* getpwnam */ fstring groupname; /* getgrnam */ uid_t uid; /* getpwuid, uid_to_sid */ @@ -160,6 +166,8 @@ struct winbindd_response { union { int interface_version; /* Try to ensure this is always in the same spot... */ + fstring winsresp; /* WINS response */ + /* getpwnam, getpwuid */ struct winbindd_pw { diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h index 1674bef3cfd..9ad8a7717cb 100644 --- a/source/nsswitch/winbindd_proto.h +++ b/source/nsswitch/winbindd_proto.h @@ -7,20 +7,6 @@ int main(int argc, char **argv); -#if 0 -/* The following definitions come from nsswitch/winbindd_ads.c */ - -ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope, - const char *exp, - const char **attrs, void **res); -ADS_STATUS ads_search_retry(ADS_STRUCT *ads, void **res, - const char *exp, - const char **attrs); -ADS_STATUS ads_search_retry_dn(ADS_STRUCT *ads, void **res, - const char *dn, - const char **attrs); -#endif - /* The following definitions come from nsswitch/winbindd_cache.c */ void wcache_flush_cache(void); @@ -124,4 +110,9 @@ BOOL winbindd_param_init(void); BOOL check_domain_env(char *domain_env, char *domain); BOOL parse_domain_user(const char *domuser, fstring domain, fstring user); void fill_domain_username(fstring name, const char *domain, const char *user); + +/* The following definitions come from nsswitch/winbindd_wins.c */ + +enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state); +enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state); #endif /* _PROTO_H_ */ diff --git a/source/nsswitch/winbindd_wins.c b/source/nsswitch/winbindd_wins.c index 0aab4ddd650..af624170eb4 100644 --- a/source/nsswitch/winbindd_wins.c +++ b/source/nsswitch/winbindd_wins.c @@ -94,7 +94,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return NULL; p = wins_srv_ip(); - if( !zero_ip(p) ) { + if( !is_zero_ip(p) ) { ret = name_query(fd,name,0x20,False,True, p, count); goto out; } @@ -124,43 +124,42 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) { - char response[1024]; - int i, count, len, size; + fstring response; + int i, count, maxlen, size; struct node_status *status; DEBUG(3, ("[%5d]: wins_byip %s\n", state->pid, - state->request.data.name)); + state->request.data.winsreq)); *response = '\0'; - len = sizeof(response) - 2; + maxlen = sizeof(response) - 1; - if ((status = lookup_byaddr_backend(state->request.data.name, &count))){ - size = strlen(state->request.data.name) + 1; - if (size > len) { + if ((status = lookup_byaddr_backend(state->request.data.winsreq, &count))){ + size = strlen(state->request.data.winsreq); + if (size > maxlen) { SAFE_FREE(status); return WINBINDD_ERROR; } - len -= size; - safe_strcat(response,state->request.data.name,size); - safe_strcat(response,"\t",1); + safe_strcat(response,state->request.data.winsreq,maxlen); + safe_strcat(response,"\t",maxlen); for (i = 0; i < count; i++) { /* ignore group names */ if (status[i].flags & 0x80) continue; if (status[i].type == 0x20) { - size = sizeof(status[i].name) + 1; - if (size > len) { + size = sizeof(status[i].name) + strlen(response); + if (size > maxlen) { SAFE_FREE(status); return WINBINDD_ERROR; } - len -= size; - safe_strcat(response, status[i].name, size); - safe_strcat(response, " ", 1); + safe_strcat(response, status[i].name, maxlen); + safe_strcat(response, " ", maxlen); } } + /* make last character a newline */ response[strlen(response)-1] = '\n'; SAFE_FREE(status); } - fstrcpy(state->response.data.name.name,response); + fstrcpy(state->response.data.winsresp,response); return WINBINDD_OK; } @@ -169,42 +168,43 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) { struct in_addr *ip_list; - int i, count, len, size; - char response[1024]; + int i, count, maxlen, size; + fstring response; char * addr; DEBUG(3, ("[%5d]: wins_byname %s\n", state->pid, - state->request.data.name)); + state->request.data.winsreq)); *response = '\0'; - len = sizeof(response) - 2; + maxlen = sizeof(response) - 1; - if ((ip_list = lookup_byname_backend(state->request.data.name,&count))){ + if ((ip_list = lookup_byname_backend(state->request.data.winsreq,&count))){ for (i = count; i ; i--) { addr = inet_ntoa(ip_list[i-1]); - size = strlen(addr) + 1; - if (size > len) { + size = strlen(addr); + if (size > maxlen) { SAFE_FREE(ip_list); return WINBINDD_ERROR; } - len -= size; - if (i != 0) - response[strlen(response)-1] = ' '; - safe_strcat(response,addr,size); - safe_strcat(response,"\t",1); + if (i != 0) { + /* Clear out the newline character */ + response[strlen(response)-1] = ' '; + } + safe_strcat(response,addr,maxlen); + safe_strcat(response,"\t",maxlen); } - size = strlen(state->request.data.name) + 1; - if (size > len) { + size = strlen(state->request.data.winsreq) + strlen(response); + if (size > maxlen) { SAFE_FREE(ip_list); return WINBINDD_ERROR; } - safe_strcat(response,state->request.data.name,size); - safe_strcat(response,"\n",1); + safe_strcat(response,state->request.data.winsreq,maxlen); + safe_strcat(response,"\n",maxlen); SAFE_FREE(ip_list); } else return WINBINDD_ERROR; - fstrcpy(state->response.data.name.name,response); + fstrcpy(state->response.data.winsresp,response); return WINBINDD_OK; } -- cgit From 547152a049d46518366eeb25ec7b250dac148a56 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 29 Mar 2002 00:56:07 +0000 Subject: readd wins support to winbindd --- source/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Makefile.in b/source/Makefile.in index 1cf60d90afd..deff458a17b 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -382,6 +382,7 @@ WINBINDD_OBJ1 = \ nsswitch/winbindd_sid.o \ nsswitch/winbindd_misc.o \ nsswitch/winbindd_cm.o \ + nsswitch/winbindd_wins.o \ nsswitch/winbindd_rpc.o NECESSARY_BECAUSE_SAMBA_DEPENDENCIES_ARE_SO_BROKEN_OBJ = \ -- cgit From 3915b3c5e5f3989d5ca950eb5995ab89253938f6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2002 00:57:37 +0000 Subject: Fix to stop PERMANENT_NAMES being added when nmbd starts up and WINS server is down. Keep adding refreshible names instead. Jeremy. --- source/nmbd/nmbd_mynames.c | 39 ++++++++++++++++++++++++++++++++++----- source/nsswitch/winbindd_pam.c | 2 +- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/source/nmbd/nmbd_mynames.c b/source/nmbd/nmbd_mynames.c index b1b3f48b62a..07745e793a1 100644 --- a/source/nmbd/nmbd_mynames.c +++ b/source/nmbd/nmbd_mynames.c @@ -80,6 +80,35 @@ Exiting.\n", global_myworkgroup, subrec->subnet_name)); initiate_myworkgroup_startup(subrec, work); } +/******************************************************************* + Utility function to add a name to the unicast subnet, or add in + our IP address if it already exists. +******************************************************************/ + +static void insert_refresh_name_into_unicast( struct subnet_record *subrec, + struct nmb_name *nmbname, uint16 nb_type ) +{ + struct name_record *namerec; + + if (!we_are_a_wins_client()) { + insert_permanent_name_into_unicast(subrec, nmbname, nb_type); + return; + } + + if((namerec = find_name_on_subnet(unicast_subnet, nmbname, FIND_SELF_NAME)) == NULL) + { + /* The name needs to be created on the unicast subnet. */ + (void)add_name_to_subnet( unicast_subnet, nmbname->name, + nmbname->name_type, nb_type, + MIN(lp_max_ttl(), MAX_REFRESH_TIME), SELF_NAME, 1, &subrec->myip); + } + else + { + /* The name already exists on the unicast subnet. Add our local + IP for the given broadcast subnet to the name. */ + add_ip_to_name_record( namerec, subrec->myip); + } +} /**************************************************************************** Add my workgroup and my given names to the subnet lists. @@ -115,13 +144,13 @@ BOOL register_my_workgroup_and_names(void) struct nmb_name nmbname; make_nmb_name(&nmbname, my_netbios_names[i],0x20); - insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type); + insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type); make_nmb_name(&nmbname, my_netbios_names[i],0x3); - insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type); + insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type); make_nmb_name(&nmbname, my_netbios_names[i],0x0); - insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type); + insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type); } } @@ -138,10 +167,10 @@ BOOL register_my_workgroup_and_names(void) struct nmb_name nmbname; make_nmb_name(&nmbname, global_myworkgroup, 0x0); - insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP); + insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP); make_nmb_name(&nmbname, global_myworkgroup, 0x1e); - insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP); + insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP); } /* diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index b197bf62e89..68fce67da32 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -188,7 +188,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); if (!NT_STATUS_IS_OK(result)) { - DEBUG(3, ("could not open handle to NETLOGON pipe\n")); + DEBUG(3, ("could not open handle to NETLOGON pipe (%s)\n", nt_errstr(result))); goto done; } -- cgit From d57d354f7115d4781d49c030c3571cf498619cad Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 29 Mar 2002 15:42:38 +0000 Subject: fix "smbpasswd -j DOMAIN -r * -U Admin%XXXX" so that it doesn't try to connect to a server named '*' --- source/utils/smbpasswd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 96efeff76e5..6c6f1bd3603 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -326,7 +326,7 @@ static int join_domain_byuser(char *domain, char *remote, * If we are given a remote machine assume this is the PDC. */ - if(remote == NULL) { + if(remote == NULL || !strcmp(remote, "*")) { struct in_addr *ip_list; int addr_count; if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) { @@ -587,7 +587,7 @@ machine %s in domain %s.\n", global_myname, domain); * If we are given a remote machine assume this is the PDC. */ - if(remote == NULL) { + if(remote == NULL || !strcmp(remote, "*")) { struct in_addr *ip_list; int addr_count; if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) { -- cgit From 0e9c338e67f1c9c6b27556eda1b63d01a29381b3 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 29 Mar 2002 16:26:42 +0000 Subject: ancient file - superceded and last updated for version 1.9.16 --- source/change-log | 1878 ----------------------------------------------------- 1 file changed, 1878 deletions(-) delete mode 100644 source/change-log diff --git a/source/change-log b/source/change-log deleted file mode 100644 index e7a97ebcd72..00000000000 --- a/source/change-log +++ /dev/null @@ -1,1878 +0,0 @@ -SUPERCEDED Change Log for Samba -^^^^^^^^^^ - -Unless otherwise attributed, all changes were made by -Andrew Tridgell. All bugs to samba@samba.org. - -NOTE: THIS LOG IS IN CHRONOLOGICAL ORDER - -NOTE: From now on the cvs.log file will be used to give a complete log of -changes to samba. This change-log is now obsolete. - -1.5.00 announced to mailing list - -1.5.01 1/12/93 - - configuration through makefile only - - fixed silly bug that made the client not accept dir's from - the server - - tested and updated include files for ultrix, aix and solaris - - several things fixed thanks to pierson@ketje.enet.dec.com - who provided invaluable help and advice. - -1.5.02 1/12/93 - - added username option to services file so connection - as non guest from lanmanager is possible - - made server abort when it can't read/write on a socket - - added logging to client - -1.5.03 2/12/93 - - printing now works - - fixed a minor bug to do with hidden and system attributes - -1.5.04 2/12/93 - - added reduce_name() call to fill in security hole. - - cleanup up debug stuff a little - -1.5.05 2/12/93 - - fixed bug in reduce_name that affects services with base paths - that have a soft link in them. - -1.5.06 3/12/93 - - used the reserved server field in the search status to hold the - directory pointer. This allows lots of directories to be open - at once by clients without stuffing things up. - - preserved all the client reserved bytes in the search status - in case they actually use them. Hopefully this will fix the annoying - empty directory dir bug. (it does) - -1.5.07 3/12/93 - - fixed silly bug that caused volume ids to appear twice - - fixed a wrote-too-few bug in smb_send() - -1.5.08 3/12/93 - - did the SMBsearch properly. It can now handle recursive searches. - In order to keep the required dir info I encode the dirptr and - the current dir offset (from telldir) into 5 bytes by using a table - on the last 7 bits of the first byte. The first bit is always on - as this byte must by != 0 - This is all put in the "server reserved" search field. - -1.5.09 5/12/93 - - added a prototype nameserver. It's broken but can at least interpret - incoming packets. - - minor fixes to the server and client - - -1.5.10 5/12/93 - - fixed silly unsigned/signed char bug that made dosshell noot see all files - - added nmbd to Makefile - -1.5.11 6/12/93 - - made the volume label appear as the service name, rather than "Remote" - - made the nmbd actually work (a little) for lanman for dos - -1.5.12 7/12/93 - - fixed broadcasting in the nameserver - - the smbd now correctly sets the pid and uid - - nmbd now seems to work enough to satisfy the MS client. - - -1.5.13 7/12/93 - - fixed a silly bug that truncated filenames - - added -B option to nameserver to specify bcast address - - added -R option to nameserver to prevent name registering - - fixed minor read() bug. Does this fix the "cmp" bug? - -1.5.14 8/12/93 - - fixed a bug in send_login() in the client. Thanks to - tim.hudson@gslmail.mincom.oz.au for pointing this out. - - changed name_mangle() to pad to minimum of 32 bytes with spaces - - changed the returned buffer size in reply_connect() to not - count the 4 byte length field. This fixes the "can execute" bug - and the "comp" bug - - once again re-wrote the directory pointer handling code. - now "tree" works correctly - -1.5.15 9/12/93 - - fixed name mangle bug introduced in 1.5.14 which stopped - nameserver from working - -1.5.16 9/12/93 - - arrgh. another silly bug in name_mangle() causes the client to die. - - -1.5.17 13/12/93 - - some cosmetic cleanups to the code - - changed make_connection not to lower case the password (thanks - to bryan@alex.com) - - fixed accept() bug not initialising in_addrlen (thanks to - bogstad@cs.jhu.edu) - - fixed cd bug in client.c (thanks to joergs@toppoint.de) - - lots of fixes to the nameserver to read_socket and - associated routines. It should now correctly reply to the originating - address and use the correct broadcast. - (thanks to troyer@saifr00.ateng.az.honeywell.com) - - SVR4 patches from mark@scot1.ucsalf.ac.uk - - changed the default BUFFER_SIZE to 0xFFFF - -1.5.18 15/12/93 - - minor fix to reply_printqueue() to zero data buffer array. - - added print command to client. - - fixed minor bug in cmd_put() in client where a handle could - be closed without being previously opened. - - minor cleanups to the client - - minor solaris fixes from lonnie@itg.ti.com - - SYSV, shadow password and dfree() fixes from mark@scot1.ucsalf.ac.uk - - fixed reply_delete() to not delete read-only files - - fixed infinite loop in reply_delete on "del ." - Thanks to mark@scot1.ucsalf.ac.uk for pointing this out. - - posix mode definitions and changes from mark@scot1.ucsalf.ac.uk - - -1.5.19 18/12/93 - - another very minor fix to dfree(). - - minor change to SVR4 makefile entry from rossw@march.co.uk - - changed reply_open not to open directories, this fixes the - "copy .." bug pointed out by mark@scot1.ucsalf.ac.uk - - changed dos_mode() so it doesn't return hidden and system info - on directories. - - changed get_dir_entry() not to descend into proc/self under linux - control this with the DONT_DESCEND define in includes.h - - changed smb_setlen() to add in the SMB id. (thanks - to troyer@saifr00.ateng.az.honeywell.com) - - fixed minor bug in reply_dir() so it won't return a ACCESS_DENIED - when searching a directory that is unreadable - - removed second stat() from get_dir_entry() (speed up) - - made null searches close the dirptr (fixes big filesystem problem) - - fixed clean_name for cd .. (from magnus@axiom.se) - - -1.5.20 28/12/93 - - added debug statement in case of SMBcreate with volid set (leefi@microsoft.com) - - fixed a bug in dptr_close() so it sets the next_key to a better - value, this fixes a annoying dir bug - - LOTS of changes from jeremy@netcom.com (Jeremy Allison). This - makes it possible to at least connect to a NT server with the client - and also fixes up much of the socket/process code. This also includes - stuff for compiling on a sun386 - - got the client working with the Syntax server (a commercial - smb-based server). This required a few minor changes so the xmit - sizes were negotiated properly. - - added support for OSF1, tested on a DEC3000/400 alpha. - - fixed the ifconf support under ultrix - -1.5.21 31/12/93 - - minor cosmetic change to reduce_name() - - changes for HPUX from ppk@atk.tpo.fi (Pasi Kaara) - - minor fix to nameserver - - revamped configuration file format. It now takes a Windows-style - (.INI style) configuration file. See the file services for - full details of the format. New files: loadparm.c, loadparm.h, - params.c, params.h, testparm.c. Several changes to smb.h, local.h, - server.c, Makefile. The services structure is no longer visible - to the rest of the system. (Karl Auer) - - added ability to specify a print command on a per service basis - and globally via the configuration file. Also allows guest account - to be specified in the configuration file. Made appropriate changes - to server.c so that these data items are obtained from the config - module rather than from hardcoded strings (though the hardcoded - strings are still the source of the defaults). (Karl Auer) - - renamed old-style configuration file to services.old (Karl Auer) - - changed README to reflect new configuration details. (Karl Auer) - - removed an item from the bugs wishlist (now supplied!) (Karl Auer) - - protected smb.h against multiple compilation. (Karl Auer) - - protected local.h against multiple compilation. (Karl Auer) - - made config stuff do dynamic allocation - - added "homes" capability - - added create_mask to each service in config - -1.5.22 3/1/94 - - added "root dir" option for extra security - - added -n option to client (useful for OS/2) - - changed operation of -n to nameserver to be more useful - - patches from Jeremy Allison (jeremy@netcom.com) - fixing bug in set_message(), fixing up wait3() for SYSV, - making cd check the path in the client, allowing fetching to stdin - in client, and enhancing prompt in client to include directory. - - made the -D become_daemon() actually detach from the tty. This - may need tuning for different flavors of unix. - - added "dont descend" option to each service to prevent infinite - loops on recursive filesystems. - - updated README to add "running as a daemon" and a simple - smb.conf file. - - HP/UX fixes from ppk@atk.tpo.fi - - made lock calls only if opened with write enabled, as pointed out - by gadams@ddrive.demon.co.uk - -1.5.23 4/1/94 - - minor fix to logging of data in receive_smb(). It used to - miss the last 4 bytes of packets. - - added the pid,uid and mid fields to the negotiation phase of - the client. - - made client able to print from stdin - - added password on command line for client - - created a sample printcap input filter "smbprint" - - several fixes to client to work with OS/2 - - added mput, mget, prompt and lcd to client - -1.5.24 5/1/94 - - a resend of 1.5.23 as I managed to not include the new - prompt, mput and mget code. - -1.5.25 7/1/94 - - change -B on nameserver so it can override the broadcast address - - minor changes to printing in client so OS/2 server can handle it. - - fixed reply_access() where OK was not being initialised - - added "max xmit" to global parameters. - - changed create to open with O_RDWR instead of O_WRONLY - - added printmode command to client - - made help return extra help on a specified command in client - - fixed return code in chkpath - - added "recurse" and "lowercase" options to client - - fixed some error codes from server - - added -I option to client - - fix for become_daemon() for HPUX from ppk@atk.tpo.fi - - added "hosts allow" and "hosts deny" to server - - added keepalives to server - - added "access" feature to testparam - - NetBSD patches from sreiz@aie.nl - -1.5.26 8/1/94 - - changed semantics of hosts access code to do more sensible defaults - when either of "hosts allow" or "hosts deny" is blank - - added the SO_KEEPALIVE option to configurations of sockets in the - server - - made some of the SVAL fns into macros to keep fussy compilers from - complaining - - fixed several null pointer bugs in check_access(). These bugs - made 1.5.25 unuseable for many people. - - fixed null pointer reference of lp_dontdescend() - - reload services file after each new connection. - -1.5.27 11/1/94 - - fixed opening mode for reply_open() in server - - patches from Jeremy Allison (jeremy@netcom.com) to support the - "core+" protocol. The patches also inclued some other features, such - as a new read_with_timeout() call (used by SMBreadbraw), and auto - detection of the need to create a socket. - - changed the default KEEPALIVE value to 0, as it caused - problems with Lanmanager. - - added tar capability to client when getting files - - altered unix_mode() to return x bits for directories - - fixed bug in trim_string() - -1.5.28 12/1/94 - - cleaned up the debug levels a little so debug level 1 is a practical - level for general use - - fixed a bug in add_a_service() where a freed pointer was referenced. Thanks - to bryan@alex.com for finding the bug. - - fixed bug in time structure handling in server and client. Thanks to - bryan@alex.com for pointing out the bug. - - -1.5.29 15/1/94 - - fixed a silly bug in reply_open(). Thanks to - jeremy@netcom.com for pointing this out. - - fixed debug levels in client to be more sensible - - added raw read to client - - added -B option to client - - fixed several bugs in the client, mostly to do with the tar option - - added -E option to client - -1.5.30 16/1/94 - - added lots of prototypes so compilers don't complain - - fixed minor bug in reply_rename() (thanks to ppk@atk.tpo.fi) - - added more support for LANMAN1.0 protocol. - - added SESSION SETUP AND X call - - added READ AND X call - - added TREE CONNECT AND X call - - added support for setbuffer for HPUX (thanks to ppk@atk.tpo.fi) - -1.5.31 29/1/94 - - added support for user level security in smbclient eg: - smbclient "\\SERVER\SHARE" -U USERNAME%PASSWORD - - added error message decode as per SMB File Sharing - protocol extensions. (thanks to merik@blackadder.dsh.oz.au) - - added selection masks to smbclient that recurse down directory - tree. eg: mget *.* with recurse and mask *.c on will retrieve all - *.c files in the tree. - - patches for FreeBSD from kuku@acds.physik.rwth-aachen.de - - changed reduce_name() to trim ./ from front of strings and / from - back - - fixed a nasty bug in trim_string(). - - numerous small changes to lots of stuff that I didn't - document while I was doing them. Sorry :-( - - slightly updated sockspy - - - The following was done by Karl Auer (Karl.Auer@anu.edu.au) - - added processing in configuration file of a [printers] section. Allows - connection to any printer specified in /etc/printcap (or the file - specified in the global parameter 'printcap name'). - - added full processing of 'available' flag to configuration file. A - service can now be 'turned off' by specifying 'available = no'. Of - dubious utility. - - added 'printcap =' parameter to [global] section in the configuration - file. This allows the normal /etc/printcap to be bypassed when - checking printer names for dynamic printer connections via [printers]. - - added 'printer name =' parameters to both the [global] section and - services sections of the configuration file. This allows the printer - name only to be set, without having to specify an entire print - command. - - added some synonyms: 'writable' and 'write ok' have the opposite sense - to 'read only'. 'public' may be used instead of 'guest ok'. 'printer' - may be used instead of 'printer name'. 'printable' is the same as - 'print ok'. 'root' may be used instead of 'root dir' or 'root - directory'. - - added lots more detail to the sample configuration file to take - account of the above. - - many minor fixes to internal documentation in the configuration - sources. - - also - Man pages! - - -1.5.32 3/2/94 - - addition of smbd, smbclient and testparm man pages - from Karl Auer - - zombie process fix from lendecke@namu01.gwdg.de - - added capability to nmbd to serve names available - via gethostbyname(). - -1.5.33 3/2/94 - - fixed up getting of netmask so it works on more unix variants - - added -N option to nmbd - - changed GMT diff calculation. need to check it's right for - lots of OSes - - fixed a bug in read_and_X() and chain_reply() chaining now - seems to work correctly - -1.5.34 4/2/94 - - fixed bug in client that meant it couldn't get/put files from WfWg - - fixed a bug in the server that caused lpr to return -1 under sunos - - fixed a few errors in the hosts allow section of the - smb.conf.5 manual page and added examples - -1.5.35 6/2/1994 - - minor bugfix in reduce_name(). - - changed width of "size" in client during a dir - - patches for NEXT (among other things) from lendecke@namu01.gwdg.de - - added -a switch to server, and made default action to append - to log file - - added deadtime options to [global] section for timing out - dead connections to the smbd. - - HPUX changes from Pasi.Kaara@atk.tpo.fi - - made use of unsigned char more consistent - - changed the way of getting the default username and host in the - client - - made LANMAN1 default to on in the client, off in server. - Use -DLANMAN1=1 to make it on in both. - - lots of casts and cleanups for various operating systems - - changes to the Makefile from Karl to auto-instal the man pages - - added a short history of the project to the distribution - -1.5.36 15/2/94 - - fixed minor bug in Debug() (thanks to Pasi.Kaara@atk.tpo.fi) - - fixed bug in server.c so -a wasn't accepted. - - minor fixes to the client - - added hosts file to name server (-H option) - - added -G option for groups to nameserver - - cleanups and additions from Jeremy Allison, taking us - closer to LANMAN1.0. In particular the locking code was cleaned up - considerably. - -1.5.37 16/2/94 - - fixed bug introduced in 1.5.36 which disabled SMBcreate - -1.5.38 18/2/94 - - fixed get_broadcast() for ultrix (fix from iversen@dsfys1.fi.uib.no) - - added automatic group registration - - fixed bug in registration code - - made nmbd work better with WfWg, and probably others - - updated the man pages to include the new nmbd options. - - minor updates to the README - - fixed double log_out() in send_packet(). - - fixed bug in smbclient so that "dir" didn't work correctly - with pathworks - - possibly fixed bug in server that led to "abort retry ignore" from - pathworks client when doing a "dir". - - changed behaviour of smbclient login slightly, to try a - blank password in SMBtcon if the right password fails, and a - session setup has succeeded. Some clients seem to use a blank - one if a session setup has succeeded. - - ISC patches from imb@asstdc.scgt.oz.au - - the client now tries to do name registration using a unicast. - Let me know if this helps anyone. - - tried to add a "contributed" line to each OS in the Makefile. - -1.5.39 18/2/94 - - fixed silly C code that only worked with some compilers - - fixed another silly bug in nameserv.c that caused it to seg fault - -1.5.40 21/2/94 - - removed the from (IP) message so people don't worry about 0.0.0.0, - it's redundant anyway. - - changed the client so the crypt key isn't printed - - changed the structure of switch_message() to use a list of functions. - This improves the debug info. - - made SMBopen ignore supplied attribute as per X/Open spec - - made SMBopen fail if file doesn't exist in all cases. Let me know - if this breaks something. It is implied in the X/Open spec. This - fixes the pkzip bug. - - added dptr_demote() to replace dptr_close() to try and fix - pathworks dir bug. This has the potential disadvantage of - leaving lots of open file descriptors. - - changed mask_match to disallow two .s in a name - -1.5.41 2/3/94 - - added "dfree command" global option to smbd to support an - external "disk free" executable (typically a script). This gets - around the problem of getting disk free info reliably on lots - of systems. - - added ffirst and fclose to client - - simple SYSVR4 patch from mark@scot1.ucsalf.ac.uk - - added better uid/gid reporting for debugging purposes - - several changes to the logon procedure for the client, so hopefully - it will connect correctly to a wider range of servers. - - server should no longer crash if it can't open the debug - file (thanks to MGK@newton.npl.co.uk) - - added the THANKS file. - -1.5.42 6/3/94 - - lots of changes from Jeremy Allison, implementing more of - the LANMAN1.0 protocol, and fixing a few bugs. - - fixed delete bug, so hopefully wildcards are correct now - - pcap changes from Martin Kiff so non-aliased printers in - /etc/printcap are recognised - - wrote announce file ready for 1.6 - - re-wrote browse code in client (still doesn't work) - - updates to man-pages from Karl Auer - - made raw packet dumps mode 0600 and only if -dA is given - - changed socket code to use utility functions in util.c - -1.6.00 17/3/94 - - made server always return to original directory (rather than /) - - fixed bug in params.c that caused a seg fault if no parms in a - section - - minor clean ups for clean compile under solaris - - solaris fix for running from inetd from Karl Auer - - fixes for dfree() under solaris - - minor changes that might help BSDI - - changes to the Makefile, manual-pages and sample config file from - Karl Auer - - fixed dfree for Ultrix - -1.6.01 19/3/94 - - fixed setatr bug that allowed directories to be unusable - -1.6.02 27/3/94 - - added timestamps to connection message in log - - added idle timeout of 10 minutes to name server - - made HAVE_SYSCONF==0 the default in includes.h - - made the client not register by default - - ISC patches from imb@asstdc.scgt.oz.au - - GetWd() cache code from Martin Kiff - - rewrote the locking code in terms of fcntl() calls. - - fixed "can't delete directory" bug - - added code to close old dirptrs for duplicate searches - - removed exchange_uids() and the access() call and replaced them. - -1.6.03 28/3/94 - - tried to clean up the time handling a little (local vs gmt time) - - added debug level global to server config - - added protocol level global to server config - - added SMBecho command to server - - included Karl Auers SMBGuide in the distribution. - -1.6.04 31/3/94 - - fixed time zeroing bug in smb_close and smb_setatr - - re-wrote the username/password handling to be more flexible - - added "guest only" service setting to smb.conf - - updated man pages for new username/password handling - - fixed parse bug in reply_tconX - - improved error return code from tcon - - several changes to fix printing from WfWg - -1.6.05 2/4/94 - - changed the name of the whole package to Samba - - removed SMBexit call from client to stop exiting error message - - added interpret_addr() call to replace inet_addr() so - a hostname can be used whenever a IP is required - -1.6.06 8/4/94 - - added random tid choice to reduce problem of clients not - detecting a server disconnection. - - made client not report spurious time from CORE or COREPLUS server. - - minor HPUX fix from gunjkoa@dep.sa.gov.au - - turned off GETWD_CACHE until we track down a minor bug in it - -1.6.07: 10/4/94 - - added helpful error messages to connection failure in client. - - fixed problem with mput in client - - changed server to allow guest-only sesssetup messages with any - password. Control this with GUEST_SESSION_SETUP in local.h. - - minor change to session setup handling in make_connection() - - added check for right number of \s in the client. - - made the server not exit on last close if the deadtime is != 0 - - added malloc and realloc wrappers. enable them with -DWRAP_MALLOC=1 - - if smbd is started with a debug level of 10 or greater it creates - a log file ending in the process number - -1.6.08: 18/4/94 - - updated the THANKS file - - changes from marcel@fanout.et.tudelft.nl (Marcel Mol) for AMPM - times and error report on connect(). - - made the get_myname() routine discard any part after the first '.' - - added a wrapper for free from Martin Kiff - - added simpleminded code to handle trapdoor uid systems (untested) - - added Martin Kiffs "paranoid" getwd code. - - added default MAXPATHLEN if undefined of 1024 - - made get_broadcast() continue to get netmask if it can't get - broadcast (suggestion from Hannu Martikk) - - replaced fchmod() calls with chmod() to satisfy some unixes - - - -1.6.09: 4/5/94 - - changed perror() calls to strerror() in server.c - - fix for dfree on OSF1 from - Maximilian Errath (errath@balu.kfunigraz.ac.at) - - fixed server time reporting for protocol >= LANMAN1 - - fixed TimeDiff() for machines without TIMEZONE or TIMELOCAL - (thanks to Vesa S{rkel{ ) - - added SYSV defs to AIX and HPUX to fix "memory" problem - (actually a signal problem). - - added version to client banner in log file - - Ultrix patches from Vesa S{rkel{ - - added ! command to client for executing shell commands - - fixed ERRnofids bug in server - - fixed name_equal bug - (thanks to cjkiick@flinx.b11.ingr.com (Chris Kiick)) - - wrapped gethostbyname() with Get_Hostbyname() to prevent - case sensitive problems on name lookups - - limit printer tmp filename to 14 chars - (from Paul Thomas Mahoney ) - - added ability to understand 64 bit file times - (thanks to davidb@ndl.co.uk (David Boreham)) - - added Gwt_Pwnam() wrapper to cover server case-sensitivity - problems (suggestion from J.M.OConnor@massey.ac.nz (John O'Connor)) - - changed the setuid() calls to try and work for more systems - without breaking the ones it currently works for - - added version number to usage() - (suggestion from peter@prospect.anprod.csiro.au) - - added "security=" option for share or user level security - - allowed multiple usernames in "user=" field - - changed display method for recursive dorectory listings - - switched client to use long filenames where supported - - added speed reporting to client transfers - - several NT fixes to server from jra@vantive.com (Jeremy Allison) - - ISC fixes from ptm@xact.demon.co.uk (Paul Mahoney) - - fix to README from grif@cs.ucr.edu (Michael A. Griffith) - - default netmask and broadcast from Ian A Young - - changed default of is_locked() on fcntl() error. - - fixed bug in read_with_timeout() that could cause a runaway - smbd process. - - fixed findnext bug for long filenames in client - - changed default protocol level to LANMAN1 - - change default reported security level to SHARE. - - changed password_ok() so that if pwdauth() fails it tries - with standard crypt. - - added "translate" command to the client to do CR/LF translation - for printing, and add a form feed at the end. - (thanks to mh2620@sarek.sbc.com (Mark A. Horstman ) ) - - added "locking=yes/no" toggle for each service - - SCO unix patches from Heinz Mauelshagen (mauelsha@ez.da.telekom.de) - -1.6.10: 7/5/94 - - fixed important bug in readbraw/writebraw - - added -A option to client - - fixed delete bug on long filenames (untested). Thanks to - Stefan Wessels - - neatened up the byte swapping code - -1.6.11: 3/6/94 - - fixed bug in client in receive_trans2_response() that caused - some strange behaviour with LANMAN2. - - fixed some offset/alignment problems with lockingX (thanks to - Jeremy Allison) - - allow locking on O_RDONLY files. Thanks to Martin N Dey - - fixed del bug in client thanks to paulzn@olivetti.nl (Paul van der Zwan) - - fixed multiple user= bug thanks to MDGrosen@spectron.COM (Mark Grosen) - - added translate ability for all files. Thanks to mh2620@sarek.sbc.com (Mark A. Horstman ) - - mask out negative lock offsets. Thanks to bgm@atml.co.uk (Barry G Merrick) - - more attempts to get the structure alignment better for some machines - - cleaned up the machine dependencies a little - - ISC fixes from Paul Thomas Mahoney - - enabled printing with a SMBclose and SMBwrite for NT - thanks to jkf@frisky.Franz.COM (Sean Foderaro) - - SGI changes from Michael Chua - - CLIX patches from cjkiick@ingr.com - - NEXT2 and NEXT3_0 patches from Brad Greer (brad@cac.washington.edu) - - BSDI changes from tomh@metrics.com (Tom Haapanen) - - SCO patches from John Owens (john@micros.com) - - fix psz bug in pcap.c (thanks to Karl Auer) - - added widelinks option (global and per service). Suggestion from - Karl Auer. Defaults to True. - - made locking able to be global or local (default is give by global) - - added check_name() to dir listings - - added "packet size" option to globals. default to 32767. This - "fixes" a WfWg bug (thanks to Karl Auer) - - fixes for getattrE and setattrE and minor fix in util.c from Jeremy Allison. - - Karl updated the man pages o be current - - disabled writebraw and readbraw until a possible bug can be investigated further - -1.7.00: 14/7/94 - - added session_users list, to overcome problem of missing usernames in SMBTconX. - - added term support to the client - - added "default service" - - fork for print so user is not root - - added name mangling to 8.3 (rudimentary) - - fixed bug in in_group() - - changed to use gid in place of egid - - fixed client connection to OS/2 (1.3 + lanman2.2) and long filenames - - added patches from mcochran@wellfeet.com (Marc Cochran) - these implement scope ids and fix some udp bugs. It means - the -L option to nmbd now works. - - made nmbd respond to incoming port rather than only 137 - - made wide links refuse .. components - - fixed "dir foo." bug to stop it showing "foo.???" - - improved name mangling (added stack) - - added valid FNUM check to most calls - - fixed important do_put bug in the client - - added magic scripts to the server - - re-enabled getwd_cache code - - added optional agressive password checking - - removed dptr_closepath from SMBsearch to try and stop "dos for loop" - bug - - DGUX patches from ross@augie.insci.com (ross andrus) - - updated the README and THANKS file. - - added node status request to -L option of nmbd - - stripped trailing spaces in mask_match() (thanks to mike hench hench@cae.uwm.edu) - - added COREPLUS style print queue reporting and "lpq command" - in globals. - - cleaned up date handling and fixed byte order dependancy on dates - in SMBgetattrE. - - cleaned up the password handling and added "password level" with - the possability of checking all case combinations up to N upper - case chars. - - changed to use recvfrom only on udp ports (fixed read raw!) - - added TCB password support for SCO (thanks to lance@fox.com) - - updated README, THANKS and announce files. - - fixed timezone reporting to be signed (thanks to noses@oink.rhein.de) - - disabled max packet as it could cause problems with WfWg (no longer - needed now readraw is "fixed") - - changed from creat() to open() in mktemp and mknew. - - changed umask handling - - sped up nmbd by making it cache names - - changed idle timeout on nmbd to 2 mins - - Netbsd changes from noses@oink.rhein.de - - released alpha2 - - added name timeout to nmbd - - changed bind port retry in nmbd - - added Limitations sections to README - - fixed two . in is_83() - - fixed compilations warnings in util.c (thanks to njw@cpsg.com.au) - - made [homes] honour multiple user list - - fixed mask match bug introduced in alpha1 - - added "mangled stack" option for stack size - - added mangled stack promotion - - released alpha3 - - netbsd-1.0 fix for statfs(). - - added null_string to util.c to reduce memory usage - - changed the way directory structures are put together - - added smbrun for system() requests - - changed maxmux to 0 in hope of avoiding mpx commands problem - - fixed zero response length for session keepalives - - removed called name from session users list - - added F_RDLCK support to try and handle locks on readonly files - - made directory creation honour the lowercase flag in client (thanks - to charlie@edina.demon.co.uk) - - made checksum for mangling independant of extension if extension is - lowercase - - added ability to rename files with different extension, preserving - root name - - released alpha4 - - better command line error checking in client - - changed all debug statements to new format - - fixed delete error code reporting - - released alpha5 - - added mangled name support to wildcard delete in server - - fixed mask bug in SMBsearch - - cleaned up prototypes - - released alpha6 - - fixed important bug in session_setup which made WfWg freeze - (maxmux was 0 - this bug was introduced in alpha4) - - released alpha7 - - two printing bug fixes thanks to bgm@atml.co.uk (Barry G Merrick) - - uid fix to smbrun (thanks to larry@witch.mitra.com) - - man page updates from Karl Auer - - FAQ file from Karl Auer - - released alpha8 - - fixed read-only flag in dos_mode() for non writeable services - - fixed error code reporting in open() and openX(). - - minor secureware fix from (thanks to lance@fox.com) - - released alpha9 - - casting cleanups for memcpy(). - - cleaned up error code names to be more consistant - -1.7.01: 17/7/94 - - minor man page fix from baeder@cadence.com (Scott Baeder) - - changed usage() error message in client - - made nmbd not exit if can't register own name - - made nmbd only register if running as a daemon - - fixed stdout problem in smbrun by closing stdin/stdout/stderr - - minor fix to lmhosts parsing - - -1.7.02: 20/7/94 - - made nmbd not call get_broadcast if both -B and -N are used (thanks - to Chris Woodrow ) - - disabled GETWD_CACHE again - - fixed INCLUDES list in Makefile to add version.h (thanks to - jimw@PE-Nelson.COM (Jim Watt)) - - made checkname do a become user if it hasn't already done so. - - added consistancy check to become_user(). - - removed mask extension expansion from SMBsearch - - small change to chkpth - - fix to snum select for lpq status (thanks to Rafi Sadowsky - rafi@tavor.openu.ac.il) - - changed daemon to is_daemon for NetBSD (thanks to noses@oink.rhein.de) - - removed STAFS3 stuff for NETBSD_1_0 - - -1.7.03: 29/7/94 - - updated docs for new distribution structure - - made getatr return 0 size for directories (thanks to Bernd Esser - esser@pib1.physik.uni-bonn.de) - - added valid dos filename checks from Stefan Wessels - (swessels@cs.up.ac.za) - - added trimming of . in hostnames to -S mode of nmbd - - removed become_user() and OPEN_CNUM calls. Now make them - in switch_message instead which simplifies a lot of code. - - added GETFNUM macro to make chain_fnum more consistant and - reliable. - - added flags to protocol structures to simplify CAN_WRITE and AS_USER - checking - - added getwd cache boolean option to globals - - added fclose() to lpq status routine thanks to - dgb900@durras.anu.edu.au (David Baldwin) - - added "only user" option, to limit connection usernames to those - in the user= line - - changed to badpath from badfile in chkpath despite specs (following - what WfWg does). This fixes "file not found" error in copy command. - Thanks to rwa@aber.ac.uk for pointing out the bug - - changes for apollo from Stephen C. Steel - - more changes for Apollo from jmi@csd.cri.dk (John Mills) - - released alpha release - - added FTRUNCATE_CAN_EXTEND=0 as default to fix problem with word6. - Possibly not needed on many OSes? Thanks to Charlie Hussey - charlie@edina.demon.co.uk - - started adding max connections code - - much improved group handling contributed by - Ian Heath (ih@ecs.soton.ac.uk) - -1.7.04: 29/7/94 - - fixed one line bug in SMBopenX that got error code wrong. - -1.7.05: 2/8/94 - - added UNIXERROR() macro to get error code from unix errno. - - fixed lpq status for MSTCPB3 - - added @ option for user= line to lookup groups in group file - - added become_user optimisation and process timeout (thanks to - Jeanette Pauline Middelink (middelin@calvin.iaf.nl) - - added malloc optimisation in readbraw - - released alpha - - patches for OSF1 enhanced security from Udo Linauer - - made level 2 a more useful debug level (less guff) - - added "max connections" and "lock dir" options to allow - limiting of the number of connections to a service at one time. - - released alpha2 - - updated man pages - - released alpha3 - - added read prediction code for better read performance - - released alpha4 - - minor tuning to receive_smb() - - changed the order of mangled stack checking - - bug fix in read_predict(). - - released alpha5 - - minor search optimisation - - fixed keep alive bug in writebraw and in readbraw in the client - - released alpha6 - - disabled writeraw by default pending a bug fix - - added profiling code (off by default) - - minor delete tuning - - -1.7.06: 4/8/94 - - OSF1 crypt fix thanks to Udo Linauer - - ifdef'd EDQUOT in case you don't have it (thanks to Paul Blackman ) - - tidied up UNIXERROR stuff to work on more systems. - - made Makefile more sophisticated and added "make revert" - -1.7.07: 4/8/94 - - fixed one line fatal bug in receive_smb. Thanks to bruce@pixar.com - -1.7.08: 2/9/94 - - initgroups call for SCO from lance@fox.com - - code cleanups from cap@isac.hces.com (Simon Casady) - - use full pathname in print command construction - - ISC includes fix from Martin Tomes - - added GID_TYPE define to cope with ultrix. Thanks to - brad@cac.washington.edu - - added umask call to main in server - - fixed several minor problems with the max connections - code. Thanks to lehmann@klizix.mpi-stuttgart.mpg.de (Arno Lehmann). - - fixed filetime in writeclose. Thanks to Andreas Bahrdt - <100321.2431@compuserve.com> - - df fix for large disks from Andreas Bahrdt - - getpwanam support from horn@mickey.jsc.nasa.gov - - clean name change from Bernd Esser - - - released alpha1 - - more locking changes to fix Excel problem - - released alpha3 - - another minor locking change - - smarter masking in the locking code. Excel now apparently works. - - minor FAQ updates - - changed max connections refusal error to access denied. - - added queue command to client to show the print queue - - changed some print queue reporting stuff - -1.8.0: 14/10/94 - - added international chars to valid_dos_char(). Thanks - to Daniel.Grandjean@dgr.epfl.ch - - volume label fix - - released alpha1 - - important off by 4 fix in the server - - readbraw size adaption in the client - - released alpha2 - - wait3 cast for NeXt fixed. Thanks to dbrandon@politics.tamu.edu. - - man page fix for max xmit. Thanks to mmoore@wexford (Mike Moore) - - is_8_3() fixes from Jochen Roderburg - - list_match() fix from jkf@soton.ac.uk - - statfs3 fix for BSDI from dan@supra.com - - changed file open/close/read in server in preparation for mmap() - based IO. - - added mmap() support for reading files in the server. Optional - at compile time. Thanks to suggestion from Roger Binns - - mmap bug fixes - - added __SAMBA__ name in nmbd - - major changes for support of lanman2 and long filenames from - Jeremy Allison (jeremy@netcom.com) - - lseek optimisation. Thanks to Linus Torvalds. - - released alpha4 - - date patches for lanman2 from Jeremy Allison - - added protocol aliases to handle WfWg (untested) - - allow for zero params or data in reply_trans2 - - small lanman2 patches from jeremy - - more prototype additions for clean compilation - - postscript patches from tim@fsg.com - - more lanman2 patches from Jeremy - - added null ioctl support - - kanji patches from fujita@ainix.isac.co.jp - - released alpha6 - - disallowed null password access (thanks to Birger Kraegelin krg@iitb.fhg.de) - - Makefile fix for ultrix from andrew@d2bsys.demon.co.uk (Andrew Stirling) - - added per-service mangled names - - totally re-vamped loadparm.c - - added "mangling char" parameter - - released alpha7 - - added "default case = lower|upper" service option - - change mangling char to a service parameter - - ultrix enhanced security patch from steven@gopher.dosli.govt.nz - - more changes to loadparm.c - - printer name always set in [printers] - - string_free() fix thanks to jef_iwaniw@pts.mot.com - - changed group handling to be faster and work for large numbers - of groups - - added dynamic gid_t type determination - - released alpha8 - - fixed become_user() problem for services with invalid - directories - - added "invalid users" list on per service basis - - fixed pointer problems in alpha8 (thanks to murnaghant@a1uproar.yuppy.rdgmts.MTS.dec.com) - - fixed some date setting problems - - trans2 fixes from jeremy to stop infinite directory listings of - long filenames - - "standard input" lpq patch from root@tlspu.demon.co.uk (Adrian Hungate) - - changed password checking to check session list and validated ids - before user list - - split off password functions into password.c - - added hosts equiv and rhosts code (thanks to Tim Murnaghan ) - - released alpha11 - - added "newer" command to the client - - attempt at aix trapdoor uid workaround - - released alpha12 - - minor trans2 bugfix - - added ufc crypt (fast crypt) support. Thanks to suggestion from - forrest d whitcher - - socket() fix for getting bcast and netmask thanks to - Brian.Onn@Canada.Sun.COM - - added beginnings of IPC and named pipe support in the server - - changed file structure a bit, creating reply.c - - finished print queue support for lanman1 - - changed default protocol to LANMAN2 - - released alpha13 - - logged IPC connects at a higher debug level - - added netgroup support to hosts equiv search - - disallowed root access though hosts.equiv (thanks to Colin.Dean@Smallworld.co.uk) - - kanji and password handling fixes from fujita@ainix.isac.co.jp - - several bug fixes for lanman and other things from - esser@pib1.physik.uni-bonn.de (Bernd Esser) - - updated man pages, README and announce files. - - released 1.8.00alpha1 - - reply_close() time change fix from Andreas Bahrdt <100321.2431@compuserve.com> - - added valid users list to compliment invalid users list. - - aix fixes from tomc@osi.curtin.edu.au (Tom Crawley) - - changed testparm output format - - support for getting time from the server (nearly untested) - - fixed device type error for wild device ???? - - fixed groups problem when in 0 groups - - more IPC fixups - - added support for "net view \\server" command to list - available services (like browsing) - - released 1.8.00alpha2 - - changed port choice for nmbd -L - - added -L option to client to view share list on a host - - bug fixes for NetShareEnum code - - added "server string" option - - changed default print file name to include remote machine name. - - added hooks for browsing in nmbd - - added browsing to nmbd - - freebsd fixed from Steve Sims SimsS@Infi.Net - - got rid of tell() - - added subnet browsing with the S option in lmhosts - - made smbd prime nmbd with a 1 byte dgram - - added REUSADDR to open_socket_in() thanks to peter@ifm.liu.se - - -1.8.01: 18/10/94 - - - auto add group "LANGROUP" if no group specified in nmbd - - made nmbd more responsive at startup - - lots of cleanups and consistancy checks - - added -C option to nmbd to set "machine comment". - - fixed postscript option - - force print_file in print_open() - - restructured the browsing a little - - casesignames fix for lanman-dos - - auto-load home directory from session setup - - changed to StrnCpy() for safety - - fixed "out of file descriptors" bug in the client (a WfWg bug?) - - -1.8.02: 22/10/94 - - fixed uppercase username problem - - added "hide dot files" option - - changed auto debug log in nmbd - - added LMHOSTS to Makefile - - added M flag in lmhosts to specify own netbios name - - added "load printers" option to auto-load all printers - - substitution of %p in lpq command - - substitution of %h and %v in server string and -C option of - nmbd - - string substitions substitute all occurances of a pattern - - added casesignames global option - - fix for man pages thanks to David Gardiner - - changed debug options a bit - - added default for lpq command and lpr command - - changed default shell path to /bin/sh - - forced lpq under api to run as root - should speed things up - - added "group" option to force group of a connection - - added "read list" and "write list" options - - added max mux option - seems to fix NT browsing? - - added "mangled map" option thanks to - Martin.Tomes@uk.co.eurotherm.controls - - separated mangling functions into mangle.c - - allowed all dos chars in mangled names - - apollo changes from Helmut Buchsbaum - - password changing code from Bob Nance - it doesn't quite work yet, but it's a start (disabled by default) - - -1.8.03: 25/10/94 - - made auto loaded services browsable as per default service - so you can hide homes but keep home directories. - - changed check_name() to handle "direct to network" printing - - auto 3 minute deadtime if all connections are closed. This - prevents restart when polling the print queue. - - fix for newer command in client from Rich-Hoesly@uai.com - - changed connection recording method - - added the program smbstatus - - changed timeout mechanism - - "null passwords" option from Pim Zandbergen - - made new files with casesignames=False set their case to the default - case. - - fixed problem of uppercasing first letter of printers in printcap - - debug level fixes in trans2 from jimw@PE-Nelson.COM (Jim Watt) - - made null printer default to lp - -1.8.04: 27/10/94 - - added OS2.txt from riiber@oslonett.no - - another "auto services" fix. A silly strtok() bug :-( - - fixed the status locking and max connections (broken in 1.8.03) - - released alpha1 - - added gets_slash so lines can be continued in smb.conf and - lmhosts - - browse list bugfix - - default to "load printers=yes" - - rewrote pcap.c - - intergraph bugfix from tarjeij@ulrik.uio.no - - changed properties flags in nmbd (to fix NT print browsing) - - allowed very long lines in printcap parsing. - -1.8.05: 28/10/94 - - lanman2 fix from Jeremy - -1.9.00: 22/1/95 - - only add home if not already there. - - added ulogoffX support - - PTR_DIFF() cleanups - - fixed a bug that caused STATUS..LCK to grow very large - - changed mangling to handle names ending in . a little better - - added "strip dot" option - - SGI and setgroups() fix from bill@sg25.npt.nuwc.navy.mil - - fixed password preservation in password_ok() (again?) - - unink fix from emer@vssad.enet.dec.com (Joel S. Emer) - - changed username part of spool filename to max 10 chars (from 6) - - magic script fix from beverly@datacube.com (Beverly Brown) - - reply_special() fix from Peter Brouwer - - stopped nmbd from listening on 138. It didn't seem to help much. - - clix fixes from ttj@sknsws61.sjo.statkart.no - - fixed select behaviour under Linux - - man page fix from Robin Cutshaw - - ISC block size fix from ralf@rbsoft.sdata.de (Ralf Beck) - - ISC fixes from Martin.Tomes@controls.eurotherm.co.uk - - attrib bit fix in smbclient (pointed out by Rich-Hoesly@uai.com) - - japanese extensions from fujita@ainix.isac.co.jp (Takashi - Fujita) and ouki@gssm.otuska.tsukuba.ac.jp. - - SCO patches from Stephen.Rothwell@pd.necisa.oz.au - - changed the system commands to redirect stderr - - changed default printername to service name for all print ops - - added ability to delete print queue entries - - added warning if you try to print without -P in smbclient - - INTERACTIVE patches from cardinal@settimo.italtel.it - - patch to handle spaces in group names from GJC@vax1.village.com - (GEORGE J. CARRETTE) - - lockingX fix from stefank@esi.COM.AU (Stefan Kjellberg) - - some fairly radical changes to filename handling. We can now - handle mixed case filenames properly - - released alpha2 - - added sysv printing support and improved bsd support - - changed the user that does print queues and lprm jobs - - return code support in the client from doylen@nbslib.isc-br.com (Doyle Nickless) - - added "strict locking" option. Defaults to no. - - - added -I switch to nmbd - - fixed DEV bug thanks to Dirk.DeWachter@rug.ac.be - - use pw_encrypt() for shadow passords in Linux (from begemot@begemot.iko.kharkov.ua (Dmitry Gorodchanin)) - - disabled read prediction by default - - added varient handling code to ipc.c for printQ and printDel. - - released alpha5 - - AUX patches from root@dolphin.csudh.edu - - struct timeval fix from gkb1@york.ac.uk - - patches to merge ISC and INTERACTIVE from pim@cti-software.nl - - changed to "printing =" - - fixed problem with long print queues. - - fixed node status request in nmbd to go to non bcast - - made default path in services /tmp if not specified - - added %u in passwd program - - fixed up the password changing code for Linux - - no guest sess setup when user level security - - changed timeouts to kill dirptrs so cdroms can be unmounted - - added auto-reload of smb.conf if changed - - added SIGHUP to reload the config files - - added -M option to nmbd to search for a master browser - - added support for continue bit in trans2findnext - - changed to dynamic strings in some more structures - - changed default deadtime to 30 minutes - - cleaned up the memory swapping code a bit - - updated the man pages somewhat - - added %m and %u in the "path=" of services - - released alpha6 - - simple testing and fixups for solaris, sunos, aix, ultrix and - osf/1 (this is all I have access to). - - fixed chdir bug - - added hashing to cnum selection - - released alpha7 - - fixed printing bug - - reduced chance of "hung" smbd with dead client - - fixed do_match() bug (recently introduced) - - released alpha8 - - nameserver fix from W.J.M.vGeest@et.tudelft.nl (W.J.M. van Geest) - - rewrote readbraw to try and overlap reads with writes - - client optimisations - - rewrote getwd cache and enabled it by default - - added partial smb packet reads (hopefully faster writes) - - added log file and log level options (with subs) - - added "read size" option - - tried setting some more socket options - - can use subs in "config file=" and will auto-reload - - added "include" options, with some subs - - finally got print manager working with NT - - auto-respond in nmbd to non-broadcast (auto WINS server, no -A - needed) - - released alpha10 - - auto-delet unused services when reloading - - fixed auto-deletion - - fixed long names in printing - - fixed double loading of services file - - added printer file name support - - reformatted man pages for better www conversion - - renamed to 1.9.00. - - added support for RNetServerGetInfo and NetWkstaGetInfo API's - - updated the docs a bit - - released alpha1 - - added -M - - - changed nmbd announce interval to 10 mins in outgoing packets - - hopefully fixed idle timeout reconnects - - strupper all command lines in nmbd - - added %a substitution for "remote architecture" - - added "Samba" protocol (same as lanman2) - - added "security = SERVER" - - released alpha2 - - lowercase password fix - - fixed connect path length bug (thanks to JOHN YTSENG - ) - - added subs on "password server". - - fixed printing filename bug from smbclient - - disk quotas and hpux printing support from Dirk.DeWachter@rug.ac.be - - Makefile patches from pappinm@ayr_srv2.nth.dpi.qld.gov.au - - AFS patches from Mike Allard (mgrmja@nextwork.rose-hulman.edu) - - fixed grp name = server name problem - - man page updates from Charlie Brady (charlieb@budge.apana.org.au) - - fixed file search bug by adding "finished" flag - - added "max log size". Suggestion from Mark Hastings - - released alpha3 - - changed the read/write routines to handle partial read/writes - - released alpha4 - - changed "guest account" to per-service - - changed so "guest ok" allows access to the guest account, - not the "user=" line - - changed default readsize to 2048 - - try bind to 137 in nmbd if possible - - added server lookup to -L option in smbclient (gets list of servers) - - added -M switch to smbclient for sending winpopup messages - - released alpha5 - - FAQ updates from Paul Blackman ictinus@lake.canberra.edu.au - -1.9.01: 23/1/95 - - changed comment in print Q info to service rather than server comment - - fixed smbclient -L to NT when in user level security mode - - hopefully finally fixed NT print manager problems - - added informative messages during smbclient -M - - added node status replies to nmbd - - changed the lock offset fixup calculation to be more friendly - to dumb lockd daemons. - - added sigbus and sigsegv handlers to catch any silly errors and - print a message - - added message receipt to smbd and "message command =" option - -1.9.02: 25/1/95 - - added argv/argc mangling for people who start the server the - wrong way. - - some man page updates - - added "revalidate" option - - added hosts allow/deny access check to messaging access - - added timeouts in the client - - added check for existance of smbrun binary - - man page updates from Colin.Dean@Smallworld.co.uk - - freebsd patches from dfr@render.com - - added mask sanity check in SMBsearch - - added more useful substitutions (%S, %P, %I and %T) - - added "exec =" option to execute commands on each connection - -1.9.03: 13/3/95 - - added "socket options" option - - close base fd's (0,1 and 2) - - use dup(0) for inetd operation - - better detection of is_daemon - - hopefully finally fixed silly put bug that gave the wrong - date on files. - - fixed segv in readbraw bug - - added improved checing for invalid (or null) print file name - - several patches from ad@papyrus.hamburg.com (Andreas Degert) - - fixed slow logout bug in smbclient - - fixed automounter problems - - added subs on lock dir - - BSDI patch from John.Terpstra@Aquasoft.com.au - - added separate nmb and smb logfile entries in the Makefile - - fixed return code error in open calls - - added simple status display of printer in lpq parsing - - rewrote the directory handling to avoid seekdir (added dir.c) - - added uid=65535 check (thanks to grant@gear.torque.net) - - enhanced transfer_file() to add header (used in readbraw) - - reply_special bugfix from ferret@pc8871.seqeb.gov.au - - added HAVE_PATHCONF - - RiscIX patches from Jim Barry and - Charles Gay-Jones - - CLIX patches from ttj@sknsws61.sjo.statkart.no - - fixed aix lpq parser from kvintus@acd.com - - added substitutions to "include=" - - M88K_S3 patches from tonyb@plaza.ds.adp.com (Tony D. Birnseth) - - fixed mangled stack problem - - added code to handle broken readdir() setups on solaris - - initgroups() fix from jarit@to.icl.fi - - dgux dfree fix from listwork@cloud9.net - - dnix support from Peter Olsson - - getgrgid() patch from tpg@bailey.com (Tom Gall) - - Makefile patch from obrien@Sea.Legent.com (David O'Brien) - - password changing fixes from Dirk.DeWachter@rug.ac.be - - minor man page updates - - tried to enhance the read prediction code a little bit - -1.9.04: 16/3/95 - - a bit better handling of global include lists - - fixed GSTRING bug in loadparm.c (affected "socket options =") - - fixed broken lpq parsing code (recent bug). - Thanks to Dirk.DeWachter@rug.ac.be - -1.9.05: 20/3/95 - - improved mget in client to take multiple arguments and default - to *.* - - socket option fixes for both nmbd and smbd - - changed the byteorder handling scheme to be more portable (and - faster) - - lint cleanups from kast@kcs.planet.net (Robert Kast) - - added crude segv, sigbus and sighup recovery to nmbd - - rewrote lanman2_match to be closer to NT and WfWg behaviour - - Cray support from velo@sesun3.epfl.ch (Martin Ouwehand) - - "admin users" patch from Tim Leamy - - released alpha1 - - added samba.7 man page - - no chdir when doing non AS_USER protocols - - become_guest() returns true in trapdoor uid system - - added more sophisticated segv/sigbus reporting (Linux only) - - released alpha2 - - minor code cleanups (output of -Wall) - - smbprint fix from James Dryfoos - - improved testparm a little - - updated INSTALL.txt a little - - -1.9.06: 21/3/95 - - added %S substitution to users, valid users and invalid - users. This is useful for [homes]. - - split off printing routines into printing.c and more dir - commands into dir.c - - postexec patch from jpm@gin.Mens.DE (Jan-Piet Mens) - - smbstatus updates from jpm@gin.Mens.DE (Jan-Piet Mens) - - reload sighup after use - - fixed name ptr offset bug - - added %f in print commands - - fixed byte ordering in nmbd which caused browsing to fail in - 1.9.05 - -1.9.07: 22/3/95 - - important directory listing fix - - allowed path= in [homes] section - - printer status patches from Dirk.DeWachter@rug.ac.be - -1.9.08: 24/3/95 - - fixed . and .. in root dir for lanman2 - - better default comment in [homes] - - added time stamping to directory entries - - check directory access at connection time - - rlimit code from loebach@homer.atria.com (Thomas M. Loebach) - - fixed home dir default comment - - totally rewrote dptr handling to overcome a persistant bug - - added [globals] as well as [global] - -1.9.09: 30/3/95 - - fixed static string bug in nmbd - - better null password handling - - split CFLAGS in Makefile - - fixed typo in smbclient messaging - - made home dir not inherit path from [global] - - standard input printing patch from xiao@ic.ac.uk - - added O_CREAT to all print opens (bug in Win95) - - use /proc for process_exists under Linux and solaris - - fixed another segv problem in readbraw - - fixed volume label problem - - lots of changes to try and support the NT1 protocol - - released alpha1 - - fixed session setup bug with NT in NT1 protocol - - released alpha2 - - fixed "get" bug in smbclient that affected NT3.5 - - added SO_KEEPALIVE as a default socket option in smbd - - changed some error codes to match those that NT 3.5 produces - - updated trans2 with some new calls for Win95 and WinNT (better - long file support) - - released alpha3 - - fixed "nmbd -D -b" timeouts - - added IS_LONG_NAME flag to getattr in NT1 - - added the NT qfileinfo trans2 commands - - merged qpathinfo with qfileinfo - - changed idling technique to try and be more friendly to - clients - - merged setfileinfo with setpathinfo and updated them with the NT fns - - improved read prediction a lot - - added read prediction to readbraw - - improved fault reporting (last packet dump) - -1.9.10: 30/3/95 - - fixed read prediction+readbraw bug for read/write files - -1.9.11: 9/4/95 - - fixed trans2 qpathinfo bug - - fixed bug with % in service name when doing print queue requests - - default readsize now 16K - - minor read prediction changes - - fixed status initialisation in print queue reporting - - fixed const compile problem for hpux - - minor SMBread fix from Volker Lendecke - - removed space after -P in print commands (for fussy systems) - - disabled level2 of setfilepathinfo - - changed to a single read dir model, saving all dir names in - the Dir structure - - disabled NT protocols in the client due to reported problems - - fixed QUERY_FS_VOLUME_INFO which caused Win95 to hang on drive - properties - - minor lseek bug fix - - fixed up keepalives - - new timezone handling code (hopefully better!) - from steve@qv3pluto.LeidenUniv.nl - - BSDI interface patch from jrb@csi.compuserve.com - - gettimeofday changes from Roger Binns - - added smbrun option - - added "root preexec" and "root postexec" options - -1.9.12: 12/4/95 - - hopefully fixed some recently introduced NT problems - - fixed a unlink error code problem - - minor testparm fix - - fixed silly error messages about comments in config files - - added "valid chars" option for other languages - -1.9.13: 28/4/95 - - patches from David O'Brien (obrien@Sea.Legent.com) improving the - netgroup suport, and adding the "map archive" option, as well as - other minor cleanups. - - tried to add info level 3 and 4 support for OS/2 - - default deadtime set to 0 as in docs - - cleaned up the trans2 code a little - - cleaned up the Makefile a little - - added charset.c and charset.h - - expanded "valid chars" option to handle case mapping - - lots of changes to try and get timezones right - - released alpha1 - - win95 fixups - - released alpha2 - - added %H substitution (gives home directory) - - nameserv.c cleanups and minor bug fixes - - redid the browse hook logic - - fixed daylight saving time offset for logfile messages - - added name cacheing to nmbd - - added send counts to node status in nmbd - - added STRICT_TIMEZONES compile time option (very computationally - expensive) - - removed the partial read code - - cleaned up the permission checking a lot - - added share modes (DENY_READ, DENY_WRITE, DENY_ALL, DENY_NONE, - DENY_FCB and DENY_DOS) - - added "share modes" option - - cleaned up the file open calls - - released alpha4 - - fixed important one line bug in open_file() - - trans2 client fix from lendecke@namu01.gwdg.de - - netgroup patche from David O'Brien (obrien@Sea.Legent.com) - - case sensitive fix from lenneis@statrix2.wu-wien.ac.at (Joerg Lenneis) - - got long filenames working from Win95 dos prompt - - added "workgroup=" option - - added "username map" option including multiple maps, group maps etc - - fixed password server for NT1 protocol and made it more robust - - changed unix_mode() to add IWUSR to read-only directories. This - is much closer to what clients expect. - - added preservation of unused permission bits when a chmod() is - called from a client. - - made static those fns that could be - - fixed typo in access.c (thanks to Andrew J Cole - ) - - added %d substitution for process id - (thanks to lenneis@statrix2.wu-wien.ac.at (Joerg Lenneis)) - - changed share error code to ERRbadshare - - added locked files list to smbstatus if share modes is enabled - - changed DENY_DOS to allow read by other tasks - - added shared_pending checks to server - - preserverd all possible permission bits during a chmod, and - fixed a trans2 chmod bug - - open /dev/null to use up first 3 fds, in an attempt to stop rogue - library routines from causing havoc - - fixed NT username problem when in server security - - added "force user" and "force group" options - - cleaned up some of the IPC calls a bit - - added writeraw to the client and cleaned up write raw in the server - - osf1 big-crypt bugfix from Udo Linauer - - hopefully better disk-full checking - - next uid bugfix from patrick@graphics.cornell.edu - - changed share modes so lock directory doesn't need to be world - writeable - - enabled write-raw by default - - added server_info() in client - - added level checks in some ipc calls - - added defines for the important timeouts in local.h - - added print queue deletion to smbclient (untested) - - removed the sysconf() calls - - optimised writebraw a bit - - fixed some file deletion problems - - added total_data check for extended attribs in trans2 (for OS/2) - - fixed broadcast reply bug in nmbd - - added careful core dumping code - - added faster password level searches (suggestion - by lydick@cvpsun104.csc.ti.com (Dan Lydick)) - - -1.9.14: 22/9/95 - - fixed up level 3 and 4 trans2 requests for OS/2 - - minor optimisations in a few places - - cleaned up the closing of low fds a bit - - added SO_REUSEADDR to socket as a daemon - - override aDIR bit for directories in dos_chmod() - - SGI5 fixes from ymd@biosym.com (Yuri Diomin) - - bsize sanity check and removed sunos force to 1k - - force the create mode to be at least 0700 - - SCO and freebsd include changes from Peter Olsson - - - check with FQDN in access.c (thanks to Arne Ansper ) - - default broadcast for dnix from Peter Olsson - - solaris patches from Ronald Guilmette - - added EXDEV handling - - small AFS Makefile patch from mgrlhc@nextwork.rose-hulman.edu - - hopefully fixed the Win95 dates to work in other than my - timezone - - attempted alignment fixups (to speed up memcpy) - - added some DCE/DFS support (thanks to Jim Doyle ) - - added fix so that root doesn't have special privilages to open - readonly files for writing (but admin users do). This fixes the MS - office install problem. - - fixed trans2 response bug in client - - got dual names working for NT - - enabled lock_and_read in NT protocol - - added %L macro for "local machine" - - changed dfree reporting to use "sectors per unit" - - fixed "not enough memory" bug in MS print manger by limiting - share name length in share enum. - - "short preserve case" option from Rabin Ezra (rabin@acm.org) - - added archive option to client - - changed openX in client to be able to open hidden and system files - - added "sync always" option - - rewrote writebmpx and readbmpx - - added auto string_sub_basic to all loadparm strings - - lots of nmbd fixups (add registration, refresh etc) - - released alpha1 - - added smbtar patches from Ricky Poulten (poultenr@logica.co.uk) - - added a lpq cache and the "lpq cache time" option - - released alpha 2 - - sun includes fix from Kimmo Suominen - - change nmbd -L lookup type to workstation from server - - added min print space option - - added user and group names to smbstatus (thanks to - davide.migliavacca@inferentia.it) - - fixed %f in print command bug (thanks to huver@amgraf.com) - - added wildcard support to SMBmv - - misc patches from David Elm (delm@hookup.net) - - changed default of "share modes" to yes - - changed default of "status" to yes - - aix qconfig parsing from Jean-Pierre.Boulard@univ-rennes1.fr - - more long_date fixups - - added wildcards to nmbd - - extensive changes to ipc.c and miscellaneous other changes - from ad@papyrus.hamburg.com (Andreas Degert). Should especially - help OS/2 users - - added name release to nmbd - - relesed alpha4 - - fixed "SOLARIS" to SUNOS5 in Makefile - - several minor fixups to get it to compile on aix, osf1, ultrix, - solaris and sunos - - released alpha5 - - minor bug fixes and cleanups in ipc.c - - fixed "only user" bug - - changed lpq to report guest queue entries as sesssetup_user to - allow for deletion by windows - - released alpha6 - - added __SAMBA__ as type 0 in nmbd (was type 20) - - fixed null print job bug - - added 8 char warnings to testparm and smbclient - - changed to 8 char limit for names in pcap.c - - added linked list of config files to detect all date changes - that require a reload - - simplified pcap guessing heuristics - - added space trimming to the name mapping - - updated Get_Pwnam to add allow_change field for username mapping - - fixed MemMove bug (thanks to mass@tanner.com (Massimo - Sivilotti)) - - released alpha7 - - rewrote MemMove to be a little more efficient - - ipc va_arg bug fix from djg@tas.com (Dave Gesswein) - - added check for illegal chars in long filenames - - fixed name cache init bug in nmbd - - Convex patches from Victor Balashov - - timestring() bugfix from staale@spacetec.no - - changed %H to give path of forced user if one is set - - added quoting to smbclient to allow spaces in filenames - - convex and other patches from Ulrich Hahn - - - released alpha8 - - fixed rename directory bug - - nmbd wins fix from Maximilian Errath - - client and AFS changes + password.c reorganisation + "more" and - "pwd" commands in client from Todd j. Derr (tjd@smi.med.pitt.edu) - - fixed several nmbd bugs - - released alpha9 - - fixed another "cd" bug in smbclient - - password encryption from Jeremy Allison - - added "passwd chat" option and chat interpretation code - - added "smb passwd file" option - - released alpha10 - - cleaned up chgpasswd.c a little - - portability changes to the encryption handling code - - added password encryption to smbclient - - fixed a share level security encryption bug - - added "ENCRYPTION.txt" document - - released alpha11 - - added code to detect a password server loop - - fixed typo in chkpath in client.c that broken cd (again) - - LINUX_BIGCRYPT from marsj@ida.liu.se - - AFS password fixup from jbushey@primenet.com (Jeffrey G. Bushey) - - iso/8859-1 charcnv patches from Dan.Oscarsson@malmo.trab.se - - strtok/user_in_list fix from roderich@nodebonn.muc.bmw.de - - NETGROUP patches from J.W.Schilperoort@research.ptt.nl - - trim_string patch from J.W.Schilperoort@research.ptt.nl - - fixed problem with files with no extension getting mixed up - - ipc bugfix for print job deletion from Rainer Leberle - - released alpha12 - - pwlen fix in NETGROUP from Andrew J Cole - - lots of uid and encryption changes from Jeremy Allison. WinDD - should now work. - - released alpha13 - - fixed max_xmit bug in client - - select fix in server (fixed critical drive errors under ISC) - - released alpha14 - - wildcard fix from Jeremy - - changes to make IPC code more robust - - small select loop change to reduce cleaning of share files - - vtp, altos and mktime patches from Christian A. Lademann - - - EEXIST bugfix in server.c - - changed mangled map to apply in all cases - - released alpha15 - - fixed fcb open permissions (should mean apps know when a file is - read only) - - released alpha16 - - client help formatting fix and docs fix from Peter Jones - - - added a directory cache - - use /proc whenever possible for pid detection - - TCSANOW fix in getsmbpasswd from roderich@nodebonn.muc.bmw.de - - fixed default printing mode for sysv systems - - make client always expand mask - - more minor IPC fixups - - pyramid makefile entry from jeffrey@itm.org - - client fixups for passlen, maxvcs and session redirect from - Charles Hoch - - finally fixed important IPC bug (varargs bug with int16) - - quota patches from Dirk.DeWachter@rug.ac.be - - print queue cache changes (per service) and print queue priority - additions from Dirk.DeWachter@rug.ac.be - - new japanese patches (incomplete) from - fujita@ainix.isac.co.jp (Takashi Fujita) - - moved a lot more functions into system.c via wrappers - - changed a lot of the connection refused error codes to be more - informative (or at least different) - - released alpha17 - - changed error return code from cannor chdir() in make_connection - - fixed realloc() bug in printing.c - - fixed invalid username bug in sesssetupX - - released alpha18 - - made default service change name to asked for service (idea - from Ian McEwan ) - - fixed "guest only" bug - - sambatar patches from Ricky - - printing.c patches from Dirk.DeWachter@rug.ac.be - - rewrote become_user() - - sunos5 patch from Niels.Baggesen@uni-c.dk - - more japanese extensions patches from fujita@ainix.isac.co.jp - - released alpha20 - - added force_user to conn struct - - -1.9.15: 14/11/95 - - removed bcast override from workgroup announce in nmbd - - aix patch, added NO_SYSMOUNTH, from - lionel leston <102624.346@compuserve.com> - - quick fix in lp_string() to try and stop some core dumps - - added uid cache in connections structure - to make user level security faster - - changed dos_mode() to show read-only on read-only shares only if - user w bit not set - - added check to stop exit_server() looping - - core dump fix in string_sub() - - fix client bug for long dirs in NT1 mode. - Thanks to Erwin Authried (erwin@ws1.atv.tuwien.ac.at) - - switched to a safer (but probably slower) readbraw implementation - - released p1 - - readbraw fix from Stefaan.Eeckels@eunet.lu - - fixed groups bug when user is in 1 group - - fixed NT1 dir bug - - changed default protocol in client to NT1 - - changed trans2 to not return both names in long listing if long - name is 8.3 - - made stat of "" return RONLY if not writeable drive - - wrapped strcpy() to stop nulls propogating (hack) - - made rename and unlink look at share locks on file - - clitar memory leak fix from jjm@jjm.com - - added -p option to smbstatus to list smbd processes - - added rename to the client - - released p2 - - fixed SMBmv for case where the destination exists - - man page patch from michal@ellpspace.math.ualberta.ca (Michal Jaegermann) - - once again redid the time handling, but finally explained what - is going on, this is written up in TIME.txt. The "kludge-GMT" used - by NT is a bastard and led to a lot of the confusion - - kanji patch from fujita@ainix.isac.co.jp (Takashi Fujita) - - is08859-1 patches from eauth@mail.cso.co.at - - starting rewriting nmbd, new nmbd is nmbd2, old one still around - for time being - - released p3 - - rewrote more of nmbd2 to use new structures - - CLIX patches from Jason.J.Faultless@bechtel.btx400.co.uk - - DirCacheFlush() bugfix from Michael Joosten - . This bug explains a lot of the crashes. - - fixed a bug in ChDir() that caused reversion to / in some - situations - - ipc fix from Magnus Hyllander - - released p4 - - smbpasswd fix from Jeremy - - compilation fixes from Magnus Hyllander - - added NetServerEnum to ipc.c (needed for master browser stuff) - - Makefile fix from Gunther Mayer - - cleanups for clean compile on several OSes - - added browse mastering code - - started integration with smb.conf for nmbd2 - - released p5 - - fixed death_time (should be t+ttl*3) - - fixed non-removal of dead servers - - added smbstatus -u patch from oskarh@spornet.is (Oskar Hannesson) - - NETGROUP fix from J.W.Schilperoort@research.kpn.com - - select and NO_SETGROUPS patches from lennylim@netcom.com (Lenny - Lim) - - added LINKS_READ_ONLY define in dos_mode() for LM/X - compatability - - "dir a.c" bug fixed thanks to roderich@nodebonn.muc.bmw.de - (Roderich Schupp) - - job cancel fix in client from peo@mtek.chalmers.se - - changed nmbd2 to nmbd - - fixed "dir a*" under trans2 lookups - - added StrnCaseCmp() - - updated docs a bit for new browsing stuff - - updated INSTALL.txt - - hopefully fixed server level security with WfWg - -1.9.15 (patches): - - major/minor fix for solaris from Jeroen Schipper - - - fixed critical bug in directory listings - - released p1 - - fixed one of the causes of "out of memory" while browsing - - fixed manpage install script (Paul Blackman) - - added DNS failures to name cache - - fixed writebmpx bug (affects OS/2) - - misc OS/2 fixes, mostly for EA handling - - added SMBcopy - - added "max ttl" option - - arch detection patch from Bas Laarhoven - - released p2 - - another OS/2 fix - the level 4 getpathinfo for EAs - - added "alternate permissions" option - - changed client to parse destination names into name + domain - - fixed problem with PrimaryGroup and lmhosts loading - - added domain master ability to nmbd - - added "domain master" option - - added "domain controller" option and code - - pwd fix to client from Erik Devriendt (de@te6.siemens.be) - - fixed problem in smbmv that led to ar not working in mks - - added transs2 - - released p3 - - updated email addresses - - fix for innetgr from Olaf Seibert (rhialto@polder.ubc.kun.nl) - - client translate fix from bandc@dircon.co.uk - - netbsd bcast fix from from Olaf Seibert (rhialto@polder.ubc.kun.nl) - - syslog code from Alex Nash - - strip dot fix from Arne Ansper - - added addtosmbpass + man page from - michal@ellpspace.math.ualberta.ca (Michal Jaegermann) - - pcap fix for AIX from Jon Christiansen - - fixed servertype bug in remote announcements - - fixed up illegal name checks (should also be faster) - - kanji patches from fujita@ainix.isac.co.jp (Takashi Fujita) - - fixed bug handling non-encrypted passwords - - released p4 - - fixed makefile for addtosmbpass - - DCE/DFS fixes from John Brezak (brezak@ch.hp.com) - - client patch for partial command matching from Andrew Wiseman - - - made is_8_3() handle full paths - - rewrote open_file_shared() with help from Charles Hoch - - - changed syslog to handle interactive programs - - fixed syslog problem with full path in argv[0] - - illegal name fixup for kanji from fujita@ainix.isac.co.jp - - fixed server level security to allow fallback to encryption - - changed reply_read() and reply_lockread() to ignore clients - smb_bufsize in order to handle broken lanman clients - - fixed NT wildcard problem with old style programs - - man page patches from "John M. Sellens" - - - partially documented the "character set" option - - changed default for MAXDIR to 64 - - changed default DPTR idle time to 120 - - released p5 - - QNX patches from eldo@invisa.satlink.net (Eldo Loguzzo) - - made nmbd use the "max log size" option and changed log handling - code a bit - - sunos patches, remote protocol (%R) addition and arch detection - changes to stop compiler warning from Timothy Hunt - - fixed become_user() bug that led to incorrect permissions in - some situations. - - released p6 - - is_8_3() fix from Charles Hoch - - nmblib bugfix from gmk@mhcnet.att.com (George Kull) - - aix pcap fix from Jon Christiansen - - added explicit sig_pipe() in server.c - - added domain logins option (not fully implemented) - - added HAVE_GMTOFF code - - got rid of PM_MAXLINE - - minor client fix from goggi@eflir (Garðar Georg Nielsen) - - added SIGCLD_IGNORE for HPUX (from Tor Lillqvist - ) - - OSF/1 lpq patch from scooter@GENE.COM (Scooter Morris) - - NeXT patches from pmarcos@next.com (Paul Marcos) - - dstdiff patch to stop infinite loop from Erwin Authried (eauth@cso.co.at) - - password server option can now take a list of password servers - - patches to let samba run on OS/2 from Jason Rumney - - added domain logon and logon script suport - - SCO openserver 5 patches from Scott Michel - - Makefile changes from Marty Leisner - - chgpasswd changes from Roman Dumych - for SVR4 - - GUEST_SESSSETUP change from David.Chappell@mail.cc.trincoll.edu - - released p7 - - moved SO_REUSEADDR before bind() (thanks to Thomas Bellman - ) - - added more flexible GUEST_SESSSETUP to local.h and restored - pre-p7 behaviour as default - - released p8 - -1.9.16: - - Makefile fix from Marty Leisner - - added %g and %G substitutions - - changed IDLE_CLOSED_TIMEOUT to 60 - - fixed the "admin user" status in domain logons - - hpux 10 "trusted security" patches from David-Michael Lincke - (dlincke@sgcl1.unisg.ch) - - added nmb lookups to client from Adrian Hill - - svr4 pause/resume printing patch from Brendan O'Dea (bod@tyndall.com.au) - - fixed master announcement thanks to Luke Leighton - - changed srcdir usage in Makefile to be friendly to more systems - - NT4 alignment patches from Jeremy Allison (jra@vantive.com) - - updated share mode code for new spec - - minor client bugfix (for smbclient '\\\') - - fix for level 260 when magling disabled. From Martin Tomes - - - SMBtranss2 fix for OS/2 from Jeremy Allison - - profiles fixup from Timm Wetzel - - man page updates from Dirk.DeWachter@rug.ac.be - - nmbsync fix from Andy Whitcroft - - Lynx patches from Manfred Woelfel - - new smbtar stuff from Ricky - - changed to share mode DENY_NONE for tar - - fixed -D option of smbclient when in tar mode - - added aARCH to open modes - - added code to cope with select/read errors - - fixed blank browse entries after smb.conf reread - - integrated new browse stuff from Luke into ipc.c - - added workgroup list to smbclient -L - - improved archive attribute handling in close_file() and - write_file() - - smbtar fixes from Martin.Kraemer@mch.sni.de - - Linux quota patch from xeno@mix.hsv.no - - try to work around NT passlen2 problem in session setup - - released alpha1 - -NOTE: From now on the cvs.log file will be used to give a complete log of -changes to samba. This change-log is now obsolete. - - -========== -todo: - - -64 bit longs and IP addresses may give problems with unsigned longs? - -set archive bit whenever file is modified?? - -fix man page dates - -reply only to own workgroup in server enum - -patch to compile with g++ and possibly solaris c++ - -nmbd needs to keep browse list uptodate by talking to the master if it loses -an election as others may still think its a valid backup and use it to get -lists. - -leftover lock files can end up belonging to non-smbd processes after a reboot. - -hosts allow in nmbd - -hosts allow cache - -add password command in smbclient - -drag long filename to samba under os/2 gives short name - -document max ttl option - -dup/close 0 for getopt? - -implement SMBmove ?? - -add option to print more info about locked files (full path, share name -etc) - -very slow listing CD, perhaps because of order of stat and readdir or add -masking to opendir? - -protocol drop back in client to avoid openX etc. - -handle exported fat drives to a long filename capable client - -add check for existance of lpq commands etc (use stat?) - -get rid of the silly +4 and -4 by removing NBT stuff - -write-only shares - -document cnvchar stuff - -allow smbd to serve user and group lists to win95 - -document homes behaviour with WinDD - -add "hide file = *.o" "hide dir = .Foo*" "show file = xx*" type options. - -ALLOW_PASSWORD_CHANGE only compiles/works on some systems - -weird foooooooo/open.exe bug on NT - -%a detection can't detect Win95 versus WinNT - -reverse mangled maps, so (*.html *.htm) works for new files. - -install problems with w95. could be some sort of race? - -more efficient Files[] structure to handle thousands of open files - -lpd stuff: - Tony Aiuto (tony@ics.com) - -make max disk size local - -- cgit From be4a8cd1dd6b5154d1af8e95fb8d22c9c35c39b0 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 29 Mar 2002 17:35:48 +0000 Subject: Small optimization to receive_smb to allow us to specify negative timeouts and thus tell the smblib stuff that it is OK if a packet does not arrive. --- source/libsmb/clientgen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index ca78ad8dde5..25510da43ce 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -43,7 +43,7 @@ BOOL cli_receive_smb(struct cli_state *cli) if (cli->fd == -1) return False; again: - ret = client_receive_smb(cli->fd,cli->inbuf,cli->timeout); + ret = client_receive_smb(cli->fd,cli->inbuf,abs(cli->timeout)); if (ret) { /* it might be an oplock break request */ @@ -64,7 +64,7 @@ BOOL cli_receive_smb(struct cli_state *cli) /* If the server is not responding, note that now */ - if (!ret) { + if (!ret && cli->timeout > 0) { close(cli->fd); cli->fd = -1; } -- cgit From 1aaf438c65e884296060bd2b12eb73f73b3cd9ca Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2002 20:28:15 +0000 Subject: If we're going to return invalid handle make sure the return struct is in a parseable state. Jeremy. --- source/rpc_server/srv_lsa_nt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index ee00624c2e2..4b6ee5f0b6d 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -481,12 +481,12 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_ LSA_TRANS_NAME_ENUM *names = NULL; uint32 mapped_count = 0; - if (!find_policy_by_hnd(p, &q_u->pol, NULL)) - return NT_STATUS_INVALID_HANDLE; - ref = (DOM_R_REF *)talloc_zero(p->mem_ctx, sizeof(DOM_R_REF)); names = (LSA_TRANS_NAME_ENUM *)talloc_zero(p->mem_ctx, sizeof(LSA_TRANS_NAME_ENUM)); + if (!find_policy_by_hnd(p, &q_u->pol, NULL)) + return NT_STATUS_INVALID_HANDLE; + if (!ref || !names) return NT_STATUS_NO_MEMORY; @@ -509,12 +509,12 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP DOM_RID2 *rids; uint32 mapped_count = 0; - if (!find_policy_by_hnd(p, &q_u->pol, NULL)) - return NT_STATUS_INVALID_HANDLE; - ref = (DOM_R_REF *)talloc_zero(p->mem_ctx, sizeof(DOM_R_REF)); rids = (DOM_RID2 *)talloc_zero(p->mem_ctx, sizeof(DOM_RID2)*MAX_LOOKUP_SIDS); + if (!find_policy_by_hnd(p, &q_u->pol, NULL)) + return NT_STATUS_INVALID_HANDLE; + if (!ref || !rids) return NT_STATUS_NO_MEMORY; -- cgit From f918b3f8d765c7678773114bdb4c11024adc23ce Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2002 20:48:37 +0000 Subject: We still have to do the init_ after setting invalid handle. Jeremy. --- source/rpc_server/srv_lsa_nt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 4b6ee5f0b6d..dee80408316 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -485,10 +485,10 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_ names = (LSA_TRANS_NAME_ENUM *)talloc_zero(p->mem_ctx, sizeof(LSA_TRANS_NAME_ENUM)); if (!find_policy_by_hnd(p, &q_u->pol, NULL)) - return NT_STATUS_INVALID_HANDLE; + r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !names) - return NT_STATUS_NO_MEMORY; + if (!ref || !names && NT_STATUS_OK(r_u->status)) + r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup SIDs response */ init_lsa_trans_names(p->mem_ctx, ref, names, num_entries, sid, &mapped_count); @@ -513,10 +513,10 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP rids = (DOM_RID2 *)talloc_zero(p->mem_ctx, sizeof(DOM_RID2)*MAX_LOOKUP_SIDS); if (!find_policy_by_hnd(p, &q_u->pol, NULL)) - return NT_STATUS_INVALID_HANDLE; + r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !rids) - return NT_STATUS_NO_MEMORY; + if (!ref || !rids && NT_STATUS_OK(r_u->status)) + r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup RIDs response */ init_lsa_rid2s(ref, rids, num_entries, names, &mapped_count, p->endian); -- cgit From d8d9f05160ac22b8acde06564b5562a922809160 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2002 20:50:38 +0000 Subject: Typo. Jeremy. --- source/rpc_server/srv_lsa_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index dee80408316..4fd47d0da46 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -487,7 +487,7 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_ if (!find_policy_by_hnd(p, &q_u->pol, NULL)) r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !names && NT_STATUS_OK(r_u->status)) + if (!ref || !names && NT_STATUS_IS_OK(r_u->status)) r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup SIDs response */ @@ -515,7 +515,7 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP if (!find_policy_by_hnd(p, &q_u->pol, NULL)) r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !rids && NT_STATUS_OK(r_u->status)) + if (!ref || !rids && NT_STATUS_IS_OK(r_u->status)) r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup RIDs response */ -- cgit From db4c05bb775f3c917a9c9d5b38988764dbc5b3ac Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 29 Mar 2002 21:35:31 +0000 Subject: add a sample add user script --- packaging/SGI/smb.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf index 932b5a58af4..03f2a4c9f81 100644 --- a/packaging/SGI/smb.conf +++ b/packaging/SGI/smb.conf @@ -101,6 +101,9 @@ ; winbind cache time = 10 ; password server = * +; Sample add user command for automatically adding machine accounts +; add user script = /usr/sbin/passmgmt -a -h/dev/null -g20 -s/usr/bin/false %u + [homes] comment = Home Directories browseable = no -- cgit From 74e0ed797fb7e9481141b3520a0c2769937ab3a1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2002 21:50:04 +0000 Subject: Don't core dump listing thousands of users in usrmgr. Jeremy. --- source/rpc_server/srv_samr_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index 18caa252369..68f010beea7 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -975,10 +975,10 @@ NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_ } /* calculate the size and limit on the number of entries we will return */ - temp_size=(enum_context+max_entries)*struct_size; + temp_size=max_entries*struct_size; if (temp_size>max_size) { - max_entries=max_size/struct_size; + max_entries=MIN((max_size/struct_size),max_entries); DEBUG(5, ("samr_reply_query_dispinfo: buffer size limits to only %d entries\n", max_entries)); } -- cgit From 9058408c4071d2144a8417e3689db03e8b8f29c0 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 29 Mar 2002 22:12:25 +0000 Subject: make usage message format same as HEAD --- source/utils/smbpasswd.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 6c6f1bd3603..fc99d3571cc 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -69,11 +69,11 @@ static char *strdup_x(const char *s) **********************************************************/ static void usage(void) { - if (getuid() == 0) { - printf("smbpasswd [options] [username] [password]\n"); - } else { - printf("smbpasswd [options] [password]\n"); - } + printf("When run by root:\n"); + printf(" smbpasswd [options] [username] [password]\n"); + printf("otherwise:\n"); + printf(" smbpasswd [options] [password]\n\n"); + printf("options:\n"); printf(" -c smb.conf file Use the given path to the smb.conf file\n"); printf(" -s use stdin for password prompt\n"); @@ -81,20 +81,20 @@ static void usage(void) printf(" -U USER remote username\n"); printf(" -r MACHINE remote machine\n"); - if (getuid() == 0 || local_mode) { - printf(" -L local mode\n"); - printf(" -R ORDER name resolve order\n"); - printf(" -j DOMAIN join domain name\n"); - printf(" -a add user\n"); - printf(" -x delete user\n"); - printf(" -d disable user\n"); - printf(" -e enable user\n"); - printf(" -n set no password\n"); - printf(" -m machine trust account\n"); + printf("extra options when run by root or in local mode:\n"); + printf(" -L local mode\n"); + printf(" -R ORDER name resolve order\n"); + printf(" -j DOMAIN join domain name\n"); + printf(" -a add user\n"); + printf(" -x delete user\n"); + printf(" -d disable user\n"); + printf(" -e enable user\n"); + printf(" -n set no password\n"); + printf(" -m machine trust account\n"); #ifdef WITH_LDAP_SAM - printf(" -w ldap admin password\n"); + printf(" -w ldap admin password\n"); #endif - } + exit(1); } -- cgit From b510991742d235c80facd5361b7ab6647a161271 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 30 Mar 2002 00:45:30 +0000 Subject: Hack to share pipe handles between lsa and samr pipes as NT4.x usrmgr insists on re-using an lsa handle opened on a pipe then closed - this keeps them around so long as a samr pipe is also open. Jeremy. --- source/rpc_server/srv_lsa_hnd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c index 5504e4cf9c1..59bbc5263fa 100644 --- a/source/rpc_server/srv_lsa_hnd.c +++ b/source/rpc_server/srv_lsa_hnd.c @@ -28,6 +28,16 @@ #define MAX_OPEN_POLS 1024 #endif +/**************************************************************************** + Hack as handles need to be persisant over lsa pipe closes so long as a samr + pipe is open. JRA. +****************************************************************************/ + +static BOOL is_samr_lsa_pipe(const char *pipe_name) +{ + return (strstr(pipe_name, "samr") || strstr(pipe_name, "lsa")); +} + /**************************************************************************** Initialise a policy handle list on a pipe. Handle list is shared between all pipes of the same name. @@ -39,7 +49,8 @@ BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name) struct handle_list *hl = NULL; for (plist = get_first_pipe(); plist; plist = get_next_pipe(plist)) { - if (strequal( plist->name, pipe_name)) { + if (strequal( plist->name, pipe_name) || + (is_samr_lsa_pipe(plist->name) && is_samr_lsa_pipe(pipe_name))) { if (!plist->pipe_handles) { pstring msg; slprintf(msg, sizeof(msg)-1, "init_pipe_handles: NULL pipe_handle pointer in pipe %s", -- cgit From 928eaf1ba743f32239f2f51dd8daf8fbc3d70927 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 30 Mar 2002 01:38:35 +0000 Subject: Gcc found logic bug. Jeremy. --- source/rpc_server/srv_lsa_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 4fd47d0da46..6c33d47bb06 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -487,7 +487,7 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_ if (!find_policy_by_hnd(p, &q_u->pol, NULL)) r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !names && NT_STATUS_IS_OK(r_u->status)) + if ((!ref || !names) && NT_STATUS_IS_OK(r_u->status)) r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup SIDs response */ @@ -515,7 +515,7 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP if (!find_policy_by_hnd(p, &q_u->pol, NULL)) r_u->status = NT_STATUS_INVALID_HANDLE; - if (!ref || !rids && NT_STATUS_IS_OK(r_u->status)) + if ((!ref || !rids) && NT_STATUS_IS_OK(r_u->status)) r_u->status = NT_STATUS_NO_MEMORY; /* set up the LSA Lookup RIDs response */ -- cgit From de315aef73670531f346942ec46fee288b19da6a Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Sun, 31 Mar 2002 06:27:12 +0000 Subject: if local_host isn't defined when doing %L substitution use global_myname instead. This gets rid of messages about not finding "smb.conf." file. It also allows smbd to respond with the proper workgroup name if workgroup is specified in a %L included file. There is still a remaining problem with include = /smb.conf.%L Only one entry is placed in the file_list struct for smb.conf.%L and the subfname keeps getting changed with each name used to access the server. This causes the modtime to get reset to 0 on non-existing file names causing lp_file_list_changed to think smb.conf needs to be reparsed every time. --- source/lib/substitute.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/lib/substitute.c b/source/lib/substitute.c index 387b07bc512..127698ef41f 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -168,6 +168,7 @@ static char *automount_server(char *user_name) void standard_sub_basic(char *str) { + extern pstring global_myname; char *p, *s; fstring pidstr; struct passwd *pass; @@ -197,7 +198,21 @@ void standard_sub_basic(char *str) string_sub(p,"%D", tmp_str,l); break; case 'I' : string_sub(p,"%I", client_addr(),l); break; - case 'L' : string_sub(p,"%L", local_machine,l); break; + case 'L' : + if (*local_machine) + string_sub(p,"%L", local_machine,l); + else { + char *s = p; + + string_sub(p,"%L", global_myname,l); + while (*s) + { + if (isupper(*s)) + *s = tolower(*s); + s++; + } + } + break; case 'M' : string_sub(p,"%M", client_name(),l); break; case 'R' : string_sub(p,"%R", remote_proto,l); break; case 'T' : string_sub(p,"%T", timestring(False),l); break; -- cgit From 53dc51578f16d9d6b36ff6b2e8c1051d1cb5948d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 1 Apr 2002 15:04:19 +0000 Subject: * added GPL copyight to Samba-HOWTO-Collection.pdf * fixed title of BDC howto --- docs/Samba-HOWTO-Collection.pdf | 4383 +++++++++++++++-------------- docs/docbook/projdoc/Samba-BDC-HOWTO.sgml | 2 +- docs/docbook/projdoc/samba-doc.sgml | 9 +- docs/htmldocs/Samba-BDC-HOWTO.html | 4 +- docs/htmldocs/Samba-HOWTO-Collection.html | 588 ++-- docs/htmldocs/printer_driver2.html | 6 +- 6 files changed, 2510 insertions(+), 2482 deletions(-) diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf index c6dfde6038a..8179f6261a4 100644 --- a/docs/Samba-HOWTO-Collection.pdf +++ b/docs/Samba-HOWTO-Collection.pdf @@ -1,6 +1,6 @@ %PDF-1.2 %âãÏÓ -1 0 obj<>endobj +1 0 obj<>endobj 2 0 obj<>endobj 3 0 obj<>endobj 4 0 obj<>endobj @@ -16,228 +16,230 @@ 14 0 obj<>endobj 15 0 obj<>endobj 16 0 obj<>endobj -17 0 obj[14 0 R +17 0 obj<>endobj +18 0 obj<>endobj +19 0 obj[14 0 R 16 0 R +18 0 R ]endobj -18 0 obj<>endobj -19 0 obj<>endobj -20 0 obj[19 0 R +20 0 obj<>endobj +21 0 obj<>endobj +22 0 obj[21 0 R ]endobj -21 0 obj<>endobj -22 0 obj<>endobj -23 0 obj<>endobj -24 0 obj<>endobj -25 0 obj<>endobj -26 0 obj<>endobj -27 0 obj[22 0 R -24 0 R +23 0 obj<>endobj +24 0 obj<>endobj +25 0 obj<>endobj +26 0 obj<>endobj +27 0 obj<>endobj +28 0 obj<>endobj +29 0 obj[24 0 R 26 0 R +28 0 R ]endobj -28 0 obj<>endobj -29 0 obj<>endobj 30 0 obj<>endobj -31 0 obj<>endobj -32 0 obj[29 0 R -31 0 R +31 0 obj<>endobj +32 0 obj<>endobj +33 0 obj<>endobj +34 0 obj[31 0 R +33 0 R ]endobj -33 0 obj<>endobj -34 0 obj<>endobj -35 0 obj[34 0 R +35 0 obj<>endobj +36 0 obj<>endobj +37 0 obj[36 0 R ]endobj -36 0 obj<>endobj -37 0 obj<>endobj -38 0 obj<>endobj -39 0 obj<>endobj -40 0 obj[37 0 R -39 0 R +38 0 obj<>endobj +39 0 obj<>endobj +40 0 obj<>endobj +41 0 obj<>endobj +42 0 obj[39 0 R +41 0 R ]endobj -41 0 obj<>endobj -42 0 obj<>endobj -43 0 obj<>endobj -44 0 obj<>endobj -45 0 obj<>endobj -46 0 obj<>endobj -47 0 obj[42 0 R -44 0 R +43 0 obj<>endobj +44 0 obj<>endobj +45 0 obj<>endobj +46 0 obj<>endobj +47 0 obj<>endobj +48 0 obj<>endobj +49 0 obj[44 0 R 46 0 R +48 0 R ]endobj -48 0 obj<>endobj -49 0 obj<>endobj -50 0 obj[49 0 R +50 0 obj<>endobj +51 0 obj<>endobj +52 0 obj[51 0 R ]endobj -51 0 obj<>endobj -52 0 obj<>endobj -53 0 obj<>endobj -54 0 obj<>endobj -55 0 obj<>endobj -56 0 obj<>endobj +53 0 obj<>endobj +54 0 obj<>endobj +55 0 obj<>endobj +56 0 obj<>endobj 57 0 obj<>endobj -58 0 obj<>endobj -59 0 obj<>endobj -60 0 obj<>endobj -61 0 obj<>endobj -62 0 obj<>endobj -63 0 obj[52 0 R -54 0 R +58 0 obj<>endobj +59 0 obj<>endobj +60 0 obj<>endobj +61 0 obj<>endobj +62 0 obj<>endobj +63 0 obj<>endobj +64 0 obj<>endobj +65 0 obj[54 0 R 56 0 R 58 0 R 60 0 R 62 0 R +64 0 R ]endobj -64 0 obj<>endobj -65 0 obj<>endobj -66 0 obj<>endobj -67 0 obj<>endobj -68 0 obj<>endobj -69 0 obj<>endobj -70 0 obj[65 0 R -67 0 R +66 0 obj<>endobj +67 0 obj<>endobj +68 0 obj<>endobj +69 0 obj<>endobj +70 0 obj<>endobj +71 0 obj<>endobj +72 0 obj[67 0 R 69 0 R +71 0 R ]endobj -71 0 obj<>endobj -72 0 obj<>endobj -73 0 obj<>endobj -74 0 obj<>endobj -75 0 obj<>endobj -76 0 obj<>endobj -77 0 obj<>endobj -78 0 obj<>endobj -79 0 obj<>endobj +73 0 obj<>endobj +74 0 obj<>endobj +75 0 obj<>endobj +76 0 obj<>endobj +77 0 obj<>endobj +78 0 obj<>endobj +79 0 obj<>endobj 80 0 obj<>endobj -81 0 obj<>endobj -82 0 obj[71 0 R -73 0 R +81 0 obj<>endobj +82 0 obj<>endobj +83 0 obj<>endobj +84 0 obj[73 0 R 75 0 R 77 0 R 79 0 R 81 0 R +83 0 R ]endobj -83 0 obj<>endobj -84 0 obj<>endobj -85 0 obj[84 0 R +85 0 obj<>endobj +86 0 obj<>endobj +87 0 obj[86 0 R ]endobj -86 0 obj<>endobj -87 0 obj<>endobj -88 0 obj<>endobj -89 0 obj<>endobj -90 0 obj<>endobj -91 0 obj<>endobj +88 0 obj<>endobj +89 0 obj<>endobj +90 0 obj<>endobj +91 0 obj<>endobj 92 0 obj<>endobj -93 0 obj<>endobj -94 0 obj[87 0 R -89 0 R +93 0 obj<>endobj +94 0 obj<>endobj +95 0 obj<>endobj +96 0 obj[89 0 R 91 0 R 93 0 R +95 0 R ]endobj -95 0 obj<>endobj -96 0 obj<>endobj -97 0 obj<>endobj -98 0 obj<>endobj +97 0 obj<>endobj +98 0 obj<>endobj 99 0 obj<>endobj -100 0 obj<>endobj -101 0 obj<>endobj -102 0 obj<>endobj -103 0 obj[96 0 R -98 0 R +100 0 obj<>endobj +101 0 obj<>endobj +102 0 obj<>endobj +103 0 obj<>endobj +104 0 obj<>endobj +105 0 obj[98 0 R 100 0 R 102 0 R +104 0 R ]endobj -104 0 obj<>endobj -105 0 obj<>endobj -106 0 obj[105 0 R +106 0 obj<>endobj +107 0 obj<>endobj +108 0 obj[107 0 R ]endobj -107 0 obj<>endobj -108 0 obj<>endobj -109 0 obj<>endobj -110 0 obj<>endobj -111 0 obj<>endobj -112 0 obj<>endobj -113 0 obj[108 0 R -110 0 R +109 0 obj<>endobj +110 0 obj<>endobj +111 0 obj<>endobj +112 0 obj<>endobj +113 0 obj<>endobj +114 0 obj<>endobj +115 0 obj[110 0 R 112 0 R +114 0 R ]endobj -114 0 obj<>endobj -115 0 obj<>endobj -116 0 obj<>endobj -117 0 obj<>endobj -118 0 obj<>endobj -119 0 obj<>endobj -120 0 obj[115 0 R -117 0 R +116 0 obj<>endobj +117 0 obj<>endobj +118 0 obj<>endobj +119 0 obj<>endobj +120 0 obj<>endobj +121 0 obj<>endobj +122 0 obj[117 0 R 119 0 R +121 0 R ]endobj -121 0 obj<>endobj -122 0 obj<>endobj -123 0 obj<>endobj -124 0 obj<>endobj -125 0 obj<>endobj -126 0 obj<>endobj -127 0 obj<>endobj -128 0 obj<>endobj -129 0 obj[122 0 R -124 0 R +123 0 obj<>endobj +124 0 obj<>endobj +125 0 obj<>endobj +126 0 obj<>endobj +127 0 obj<>endobj +128 0 obj<>endobj +129 0 obj<>endobj +130 0 obj<>endobj +131 0 obj[124 0 R 126 0 R 128 0 R +130 0 R ]endobj -130 0 obj<>endobj -131 0 obj<>endobj -132 0 obj<>endobj -133 0 obj<>endobj -134 0 obj<>endobj -135 0 obj<>endobj -136 0 obj<>endobj -137 0 obj<>endobj -138 0 obj[131 0 R -133 0 R +132 0 obj<>endobj +133 0 obj<>endobj +134 0 obj<>endobj +135 0 obj<>endobj +136 0 obj<>endobj +137 0 obj<>endobj +138 0 obj<>endobj +139 0 obj<>endobj +140 0 obj[133 0 R 135 0 R 137 0 R +139 0 R ]endobj -139 0 obj<>endobj -140 0 obj<>endobj 141 0 obj<>endobj -142 0 obj<>endobj -143 0 obj<>endobj -144 0 obj<>endobj -145 0 obj<>endobj -146 0 obj<>endobj -147 0 obj<>endobj -148 0 obj<>endobj -149 0 obj<>endobj -150 0 obj<>endobj -151 0 obj<>endobj -152 0 obj<>endobj -153 0 obj<>endobj -154 0 obj<>endobj -155 0 obj<>endobj -156 0 obj<>endobj -157 0 obj<>endobj -158 0 obj<>endobj -159 0 obj<>endobj -160 0 obj<>endobj -161 0 obj<>endobj -162 0 obj<>endobj -163 0 obj<>endobj -164 0 obj<>endobj -165 0 obj<>endobj -166 0 obj<>endobj -167 0 obj<>endobj -168 0 obj<>endobj -169 0 obj<>endobj -170 0 obj<>endobj -171 0 obj<>endobj -172 0 obj<>endobj -173 0 obj<>endobj -174 0 obj<>endobj -175 0 obj<>endobj -176 0 obj<>endobj -177 0 obj<>endobj -178 0 obj<>endobj -179 0 obj<>endobj -180 0 obj<>endobj -181 0 obj<>endobj -182 0 obj<>endobj -183 0 obj[140 0 R -142 0 R +142 0 obj<>endobj +143 0 obj<>endobj +144 0 obj<>endobj +145 0 obj<>endobj +146 0 obj<>endobj +147 0 obj<>endobj +148 0 obj<>endobj +149 0 obj<>endobj +150 0 obj<>endobj +151 0 obj<>endobj +152 0 obj<>endobj +153 0 obj<>endobj +154 0 obj<>endobj +155 0 obj<>endobj +156 0 obj<>endobj +157 0 obj<>endobj +158 0 obj<>endobj +159 0 obj<>endobj +160 0 obj<>endobj +161 0 obj<>endobj +162 0 obj<>endobj +163 0 obj<>endobj +164 0 obj<>endobj +165 0 obj<>endobj +166 0 obj<>endobj +167 0 obj<>endobj +168 0 obj<>endobj +169 0 obj<>endobj +170 0 obj<>endobj +171 0 obj<>endobj +172 0 obj<>endobj +173 0 obj<>endobj +174 0 obj<>endobj +175 0 obj<>endobj +176 0 obj<>endobj +177 0 obj<>endobj +178 0 obj<>endobj +179 0 obj<>endobj +180 0 obj<>endobj +181 0 obj<>endobj +182 0 obj<>endobj +183 0 obj<>endobj +184 0 obj<>endobj +185 0 obj[142 0 R 144 0 R 146 0 R 148 0 R @@ -258,256 +260,255 @@ 178 0 R 180 0 R 182 0 R +184 0 R ]endobj -184 0 obj<>endobj -185 0 obj<>endobj -186 0 obj<>endobj -187 0 obj<>endobj +186 0 obj<>endobj +187 0 obj<>endobj 188 0 obj<>endobj -189 0 obj<>endobj -190 0 obj[185 0 R -187 0 R +189 0 obj<>endobj +190 0 obj<>endobj +191 0 obj<>endobj +192 0 obj[187 0 R 189 0 R +191 0 R ]endobj -191 0 obj<>endobj -192 0 obj<>endobj -193 0 obj<>endobj -194 0 obj<>endobj -195 0 obj[192 0 R -194 0 R +193 0 obj<>endobj +194 0 obj<>endobj +195 0 obj<>endobj +196 0 obj<>endobj +197 0 obj[194 0 R +196 0 R ]endobj -196 0 obj<>endobj -197 0 obj<>endobj -198 0 obj[197 0 R +198 0 obj<>endobj +199 0 obj<>endobj +200 0 obj[199 0 R ]endobj -199 0 obj<>endobj -200 0 obj<>endobj -201 0 obj<>endobj -202 0 obj<>endobj -203 0 obj<>endobj -204 0 obj<>endobj -205 0 obj<>endobj -206 0 obj<>endobj -207 0 obj[200 0 R -202 0 R +201 0 obj<>endobj +202 0 obj<>endobj +203 0 obj<>endobj +204 0 obj<>endobj +205 0 obj<>endobj +206 0 obj<>endobj +207 0 obj<>endobj +208 0 obj<>endobj +209 0 obj[202 0 R 204 0 R 206 0 R +208 0 R ]endobj -208 0 obj<>endobj -209 0 obj<>endobj -210 0 obj<>endobj -211 0 obj<>endobj -212 0 obj<>endobj -213 0 obj<>endobj -214 0 obj<>endobj -215 0 obj<>endobj -216 0 obj<>endobj -217 0 obj<>endobj -218 0 obj<>endobj -219 0 obj<>endobj -220 0 obj<>endobj -221 0 obj<>endobj -222 0 obj<>endobj -223 0 obj<>endobj -224 0 obj[209 0 R -211 0 R +210 0 obj<>endobj +211 0 obj<>endobj +212 0 obj<>endobj +213 0 obj<>endobj +214 0 obj<>endobj +215 0 obj<>endobj +216 0 obj<>endobj +217 0 obj<>endobj +218 0 obj<>endobj +219 0 obj<>endobj +220 0 obj<>endobj +221 0 obj<>endobj +222 0 obj<>endobj +223 0 obj<>endobj +224 0 obj<>endobj +225 0 obj<>endobj +226 0 obj[211 0 R 213 0 R 215 0 R 217 0 R 219 0 R 221 0 R 223 0 R +225 0 R ]endobj -225 0 obj<>endobj -226 0 obj<>endobj -227 0 obj<>endobj -228 0 obj<>endobj -229 0 obj[226 0 R -228 0 R +227 0 obj<>endobj +228 0 obj<>endobj +229 0 obj<>endobj +230 0 obj<>endobj +231 0 obj[228 0 R +230 0 R ]endobj -230 0 obj<>endobj -231 0 obj<>endobj -232 0 obj[231 0 R +232 0 obj<>endobj +233 0 obj<>endobj +234 0 obj[233 0 R ]endobj -233 0 obj<>endobj -234 0 obj<>endobj -235 0 obj<>endobj -236 0 obj<>endobj -237 0 obj<>endobj -238 0 obj<>endobj -239 0 obj<>endobj -240 0 obj<>endobj -241 0 obj<>endobj -242 0 obj<>endobj -243 0 obj<>endobj -244 0 obj<>endobj -245 0 obj[234 0 R -236 0 R +235 0 obj<>endobj +236 0 obj<>endobj +237 0 obj<>endobj +238 0 obj<>endobj +239 0 obj<>endobj +240 0 obj<>endobj +241 0 obj<>endobj +242 0 obj<>endobj +243 0 obj<>endobj +244 0 obj<>endobj +245 0 obj<>endobj +246 0 obj<>endobj +247 0 obj[236 0 R 238 0 R 240 0 R 242 0 R 244 0 R +246 0 R ]endobj -246 0 obj<>endobj -247 0 obj<>endobj -248 0 obj<>endobj -249 0 obj<>endobj -250 0 obj<>endobj -251 0 obj<>endobj +248 0 obj<>endobj +249 0 obj<>endobj +250 0 obj<>endobj +251 0 obj<>endobj 252 0 obj<>endobj -253 0 obj<>endobj -254 0 obj[247 0 R -249 0 R +253 0 obj<>endobj +254 0 obj<>endobj +255 0 obj<>endobj +256 0 obj[249 0 R 251 0 R 253 0 R +255 0 R ]endobj -255 0 obj<>endobj -256 0 obj<>endobj -257 0 obj<>endobj -258 0 obj<>endobj -259 0 obj<>endobj -260 0 obj<>endobj -261 0 obj<>endobj -262 0 obj<>endobj -263 0 obj<>endobj -264 0 obj<>endobj -265 0 obj<>endobj -266 0 obj<>endobj -267 0 obj<>endobj -268 0 obj<>endobj -269 0 obj[256 0 R -258 0 R +257 0 obj<>endobj +258 0 obj<>endobj +259 0 obj<>endobj +260 0 obj<>endobj +261 0 obj<>endobj +262 0 obj<>endobj +263 0 obj<>endobj +264 0 obj<>endobj +265 0 obj<>endobj +266 0 obj<>endobj +267 0 obj<>endobj +268 0 obj<>endobj +269 0 obj<>endobj +270 0 obj<>endobj +271 0 obj[258 0 R 260 0 R 262 0 R 264 0 R 266 0 R 268 0 R +270 0 R ]endobj -270 0 obj<>endobj -271 0 obj<>endobj -272 0 obj[271 0 R +272 0 obj<>endobj +273 0 obj<>endobj +274 0 obj[273 0 R ]endobj -273 0 obj<>endobj -274 0 obj<>endobj -275 0 obj[274 0 R +275 0 obj<>endobj +276 0 obj<>endobj +277 0 obj[276 0 R ]endobj -276 0 obj<>endobj -277 0 obj<>endobj -278 0 obj[277 0 R +278 0 obj<>endobj +279 0 obj<>endobj +280 0 obj[279 0 R ]endobj -279 0 obj<>endobj -280 0 obj<>endobj -281 0 obj[280 0 R +281 0 obj<>endobj +282 0 obj<>endobj +283 0 obj[282 0 R ]endobj -282 0 obj<>endobj -283 0 obj<>endobj -284 0 obj[283 0 R +284 0 obj<>endobj +285 0 obj<>endobj +286 0 obj[285 0 R ]endobj -285 0 obj<>endobj -286 0 obj<>endobj -287 0 obj<>endobj -288 0 obj<>endobj -289 0 obj<>endobj -290 0 obj<>endobj -291 0 obj<>endobj -292 0 obj<>endobj -293 0 obj<>endobj -294 0 obj<>endobj -295 0 obj<>endobj -296 0 obj<>endobj -297 0 obj[286 0 R -288 0 R +287 0 obj<>endobj +288 0 obj<>endobj +289 0 obj<>endobj +290 0 obj<>endobj +291 0 obj<>endobj +292 0 obj<>endobj +293 0 obj<>endobj +294 0 obj<>endobj +295 0 obj<>endobj +296 0 obj<>endobj +297 0 obj<>endobj +298 0 obj<>endobj +299 0 obj[288 0 R 290 0 R 292 0 R 294 0 R 296 0 R +298 0 R ]endobj -298 0 obj<>endobj -299 0 obj<>endobj -300 0 obj<>endobj -301 0 obj<>endobj -302 0 obj[299 0 R -301 0 R +300 0 obj<>endobj +301 0 obj<>endobj +302 0 obj<>endobj +303 0 obj<>endobj +304 0 obj[301 0 R +303 0 R ]endobj -303 0 obj<>endobj -304 0 obj<>endobj -305 0 obj<>endobj -306 0 obj<>endobj -307 0 obj<>endobj -308 0 obj<>endobj -309 0 obj<>endobj -310 0 obj<>endobj -311 0 obj[304 0 R -306 0 R +305 0 obj<>endobj +306 0 obj<>endobj +307 0 obj<>endobj +308 0 obj<>endobj +309 0 obj<>endobj +310 0 obj<>endobj +311 0 obj<>endobj +312 0 obj<>endobj +313 0 obj[306 0 R 308 0 R 310 0 R +312 0 R ]endobj -312 0 obj<>endobj -313 0 obj<>endobj -314 0 obj[313 0 R +314 0 obj<>endobj +315 0 obj<>endobj +316 0 obj[315 0 R ]endobj -315 0 obj<>endobj -316 0 obj<>endobj -317 0 obj<>endobj -318 0 obj<>endobj -319 0 obj<>endobj -320 0 obj<>endobj -321 0 obj[316 0 R -318 0 R +317 0 obj<>endobj +318 0 obj<>endobj +319 0 obj<>endobj +320 0 obj<>endobj +321 0 obj<>endobj +322 0 obj<>endobj +323 0 obj[318 0 R 320 0 R +322 0 R ]endobj -322 0 obj<>endobj -323 0 obj<>endobj -324 0 obj[323 0 R +324 0 obj<>endobj +325 0 obj<>endobj +326 0 obj[325 0 R ]endobj -325 0 obj<>endobj -326 0 obj<>endobj -327 0 obj<>endobj -328 0 obj<>endobj -329 0 obj<>endobj -330 0 obj<>endobj -331 0 obj<>endobj -332 0 obj<>endobj -333 0 obj<>endobj -334 0 obj<>endobj -335 0 obj<>endobj -336 0 obj<>endobj -337 0 obj<>endobj -338 0 obj<>endobj -339 0 obj<>endobj -340 0 obj<>endobj -341 0 obj<>endobj -342 0 obj<>endobj -343 0 obj<>endobj -344 0 obj<>endobj -345 0 obj<>endobj -346 0 obj<>endobj -347 0 obj<>endobj -348 0 obj<>endobj -349 0 obj<>endobj -350 0 obj<>endobj -351 0 obj<>endobj -352 0 obj<>endobj -353 0 obj<>endobj -354 0 obj<>endobj -355 0 obj<>endobj -356 0 obj<>endobj -357 0 obj<>endobj -358 0 obj<>endobj -359 0 obj<>endobj -360 0 obj<>endobj -361 0 obj<>endobj -362 0 obj<>endobj -363 0 obj<>endobj -364 0 obj<>endobj -365 0 obj<>endobj -366 0 obj<>endobj -367 0 obj<>endobj -368 0 obj<>endobj -369 0 obj<>endobj -370 0 obj[325 0 R -326 0 R -327 0 R +327 0 obj<>endobj +328 0 obj<>endobj +329 0 obj<>endobj +330 0 obj<>endobj +331 0 obj<>endobj +332 0 obj<>endobj +333 0 obj<>endobj +334 0 obj<>endobj +335 0 obj<>endobj +336 0 obj<>endobj +337 0 obj<>endobj +338 0 obj<>endobj +339 0 obj<>endobj +340 0 obj<>endobj +341 0 obj<>endobj +342 0 obj<>endobj +343 0 obj<>endobj +344 0 obj<>endobj +345 0 obj<>endobj +346 0 obj<>endobj +347 0 obj<>endobj +348 0 obj<>endobj +349 0 obj<>endobj +350 0 obj<>endobj +351 0 obj<>endobj +352 0 obj<>endobj +353 0 obj<>endobj +354 0 obj<>endobj +355 0 obj<>endobj +356 0 obj<>endobj +357 0 obj<>endobj +358 0 obj<>endobj +359 0 obj<>endobj +360 0 obj<>endobj +361 0 obj<>endobj +362 0 obj<>endobj +363 0 obj<>endobj +364 0 obj<>endobj +365 0 obj<>endobj +366 0 obj<>endobj +367 0 obj<>endobj +368 0 obj<>endobj +369 0 obj<>endobj +370 0 obj<>endobj +371 0 obj<>endobj +372 0 obj[327 0 R 328 0 R 329 0 R 330 0 R @@ -550,54 +551,54 @@ 367 0 R 368 0 R 369 0 R +370 0 R +371 0 R ]endobj -371 0 obj<>endobj -372 0 obj<>endobj -373 0 obj<>endobj -374 0 obj<>endobj -375 0 obj<>endobj -376 0 obj<>endobj -377 0 obj<>endobj -378 0 obj<>endobj -379 0 obj<>endobj -380 0 obj<>endobj -381 0 obj<>endobj -382 0 obj<>endobj -383 0 obj<>endobj -384 0 obj<>endobj -385 0 obj<>endobj -386 0 obj<>endobj -387 0 obj<>endobj -388 0 obj<>endobj -389 0 obj<>endobj -390 0 obj<>endobj -391 0 obj<>endobj -392 0 obj<>endobj -393 0 obj<>endobj -394 0 obj<>endobj -395 0 obj<>endobj -396 0 obj<>endobj -397 0 obj<>endobj -398 0 obj<>endobj -399 0 obj<>endobj -400 0 obj<>endobj -401 0 obj<>endobj -402 0 obj<>endobj -403 0 obj<>endobj -404 0 obj<>endobj -405 0 obj<>endobj -406 0 obj<>endobj -407 0 obj<>endobj -408 0 obj<>endobj -409 0 obj<>endobj -410 0 obj<>endobj -411 0 obj<>endobj -412 0 obj<>endobj -413 0 obj<>endobj -414 0 obj<>endobj -415 0 obj[371 0 R -372 0 R -373 0 R +373 0 obj<>endobj +374 0 obj<>endobj +375 0 obj<>endobj +376 0 obj<>endobj +377 0 obj<>endobj +378 0 obj<>endobj +379 0 obj<>endobj +380 0 obj<>endobj +381 0 obj<>endobj +382 0 obj<>endobj +383 0 obj<>endobj +384 0 obj<>endobj +385 0 obj<>endobj +386 0 obj<>endobj +387 0 obj<>endobj +388 0 obj<>endobj +389 0 obj<>endobj +390 0 obj<>endobj +391 0 obj<>endobj +392 0 obj<>endobj +393 0 obj<>endobj +394 0 obj<>endobj +395 0 obj<>endobj +396 0 obj<>endobj +397 0 obj<>endobj +398 0 obj<>endobj +399 0 obj<>endobj +400 0 obj<>endobj +401 0 obj<>endobj +402 0 obj<>endobj +403 0 obj<>endobj +404 0 obj<>endobj +405 0 obj<>endobj +406 0 obj<>endobj +407 0 obj<>endobj +408 0 obj<>endobj +409 0 obj<>endobj +410 0 obj<>endobj +411 0 obj<>endobj +412 0 obj<>endobj +413 0 obj<>endobj +414 0 obj<>endobj +415 0 obj<>endobj +416 0 obj<>endobj +417 0 obj[373 0 R 374 0 R 375 0 R 376 0 R @@ -639,55 +640,55 @@ 412 0 R 413 0 R 414 0 R +415 0 R +416 0 R ]endobj -416 0 obj<>endobj -417 0 obj<>endobj -418 0 obj<>endobj -419 0 obj<>endobj -420 0 obj<>endobj -421 0 obj<>endobj -422 0 obj<>endobj -423 0 obj<>endobj -424 0 obj<>endobj -425 0 obj<>endobj -426 0 obj<>endobj -427 0 obj<>endobj -428 0 obj<>endobj -429 0 obj<>endobj -430 0 obj<>endobj -431 0 obj<>endobj -432 0 obj<>endobj -433 0 obj<>endobj -434 0 obj<>endobj -435 0 obj<>endobj -436 0 obj<>endobj -437 0 obj<>endobj -438 0 obj<>endobj -439 0 obj<>endobj -440 0 obj<>endobj -441 0 obj<>endobj -442 0 obj<>endobj -443 0 obj<>endobj -444 0 obj<>endobj -445 0 obj<>endobj -446 0 obj<>endobj -447 0 obj<>endobj -448 0 obj<>endobj -449 0 obj<>endobj -450 0 obj<>endobj -451 0 obj<>endobj -452 0 obj<>endobj -453 0 obj<>endobj -454 0 obj<>endobj -455 0 obj<>endobj -456 0 obj<>endobj -457 0 obj<>endobj -458 0 obj<>endobj -459 0 obj<>endobj -460 0 obj<>endobj -461 0 obj[416 0 R -417 0 R -418 0 R +418 0 obj<>endobj +419 0 obj<>endobj +420 0 obj<>endobj +421 0 obj<>endobj +422 0 obj<>endobj +423 0 obj<>endobj +424 0 obj<>endobj +425 0 obj<>endobj +426 0 obj<>endobj +427 0 obj<>endobj +428 0 obj<>endobj +429 0 obj<>endobj +430 0 obj<>endobj +431 0 obj<>endobj +432 0 obj<>endobj +433 0 obj<>endobj +434 0 obj<>endobj +435 0 obj<>endobj +436 0 obj<>endobj +437 0 obj<>endobj +438 0 obj<>endobj +439 0 obj<>endobj +440 0 obj<>endobj +441 0 obj<>endobj +442 0 obj<>endobj +443 0 obj<>endobj +444 0 obj<>endobj +445 0 obj<>endobj +446 0 obj<>endobj +447 0 obj<>endobj +448 0 obj<>endobj +449 0 obj<>endobj +450 0 obj<>endobj +451 0 obj<>endobj +452 0 obj<>endobj +453 0 obj<>endobj +454 0 obj<>endobj +455 0 obj<>endobj +456 0 obj<>endobj +457 0 obj<>endobj +458 0 obj<>endobj +459 0 obj<>endobj +460 0 obj<>endobj +461 0 obj<>endobj +462 0 obj<>endobj +463 0 obj[418 0 R 419 0 R 420 0 R 421 0 R @@ -730,301 +731,307 @@ 458 0 R 459 0 R 460 0 R +461 0 R +462 0 R ]endobj -462 0 obj<>endobj -463 0 obj<>endobj -464 0 obj<>endobj -465 0 obj<>endobj -466 0 obj<>endobj -467 0 obj<>endobj -468 0 obj[462 0 R -463 0 R -464 0 R +464 0 obj<>endobj +465 0 obj<>endobj +466 0 obj<>endobj +467 0 obj<>endobj +468 0 obj<>endobj +469 0 obj<>endobj +470 0 obj[464 0 R 465 0 R 466 0 R 467 0 R +468 0 R +469 0 R ]endobj -469 0 obj<>endobj -470 0 obj<>endobj -471 0 obj<>endobj -472 0 obj<>endobj -473 0 obj<>endobj -474 0 obj<>endobj -475 0 obj<>endobj -476 0 obj<>endobj -477 0 obj<>endobj -478 0 obj<>endobj -479 0 obj<>endobj -480 0 obj<>endobj -481 0 obj<>endobj -482 0 obj<>endobj -483 0 obj<>endobj -484 0 obj<>endobj -485 0 obj<>endobj -486 0 obj<>endobj -487 0 obj<>endobj -488 0 obj<>endobj -489 0 obj<>endobj -490 0 obj<>endobj -491 0 obj<>endobj -492 0 obj<>endobj -493 0 obj<>endobj -494 0 obj<>endobj -495 0 obj<>endobj -496 0 obj<>endobj -497 0 obj<>endobj -498 0 obj<>endobj -499 0 obj<>endobj -500 0 obj<>endobj -501 0 obj<>endobj -502 0 obj<>endobj -503 0 obj<>endobj -504 0 obj<>endobj -505 0 obj<>endobj -506 0 obj<>endobj -507 0 obj<>endobj -508 0 obj<>endobj -509 0 obj<>endobj -510 0 obj<>endobj -511 0 obj<>endobj -512 0 obj<>endobj -513 0 obj<>endobj -514 0 obj<>endobj -515 0 obj<>endobj -516 0 obj<>endobj -517 0 obj<>endobj -518 0 obj<>endobj -519 0 obj<>endobj -520 0 obj<>endobj -521 0 obj<>endobj -522 0 obj<>endobj -523 0 obj<>endobj -524 0 obj<>endobj -525 0 obj<>endobj -526 0 obj<>endobj -527 0 obj<>endobj -528 0 obj<>endobj -529 0 obj<>endobj -530 0 obj<>endobj -531 0 obj<>endobj -532 0 obj<>endobj -533 0 obj<>endobj -534 0 obj<>endobj -535 0 obj<>endobj -536 0 obj<>endobj -537 0 obj<>endobj -538 0 obj<>endobj -539 0 obj<>endobj -540 0 obj<>endobj -541 0 obj<>endobj -542 0 obj<>endobj -543 0 obj<>endobj -544 0 obj<>endobj -545 0 obj<>endobj -546 0 obj<>endobj -547 0 obj<>endobj -548 0 obj<>endobj -549 0 obj<>endobj -550 0 obj<>endobj -551 0 obj<>endobj -552 0 obj<>endobj -553 0 obj<>endobj -554 0 obj<>endobj -555 0 obj<>endobj -556 0 obj<>endobj -557 0 obj<>endobj -558 0 obj<>endobj -559 0 obj<>endobj -560 0 obj<>endobj -561 0 obj<>endobj -562 0 obj<>endobj -563 0 obj<>endobj -564 0 obj<>endobj -565 0 obj<>endobj -566 0 obj<>endobj -567 0 obj<>endobj -568 0 obj<>endobj -569 0 obj<>endobj -570 0 obj<>endobj -571 0 obj<>endobj -572 0 obj<>endobj -573 0 obj<>endobj -574 0 obj<>endobj -575 0 obj<>endobj -576 0 obj<>endobj -577 0 obj<>endobj -578 0 obj<>endobj -579 0 obj<>endobj -580 0 obj<>endobj -581 0 obj<>endobj -582 0 obj<>endobj -583 0 obj<>endobj -584 0 obj<>endobj -585 0 obj<>endobj -586 0 obj<>endobj -587 0 obj<>endobj -588 0 obj<>endobj -589 0 obj<>endobj -590 0 obj<>endobj -591 0 obj<>endobj -592 0 obj<>endobj -593 0 obj<>endobj -594 0 obj<>endobj -595 0 obj<>endobj -596 0 obj<>endobj -597 0 obj<>endobj -598 0 obj<>endobj -599 0 obj<>endobj -600 0 obj<>endobj -601 0 obj<>endobj -602 0 obj<>endobj -603 0 obj<>endobj -604 0 obj<>endobj -605 0 obj<>endobj -606 0 obj<>endobj -607 0 obj<>endobj -608 0 obj<>endobj -609 0 obj<>endobj -610 0 obj<>endobj -611 0 obj<>endobj -612 0 obj<>endobj -613 0 obj<>endobj -614 0 obj<>endobj -615 0 obj<>endobj -616 0 obj<>endobj -617 0 obj<>endobj -618 0 obj<>endobj -619 0 obj<>endobj -620 0 obj<>endobj -621 0 obj<>endobj -622 0 obj<>endobj -623 0 obj<>endobj -624 0 obj<>endobj -625 0 obj<>endobj -626 0 obj<>endobj -627 0 obj<>endobj -628 0 obj<>endobj -629 0 obj<>endobj -630 0 obj<>endobj -631 0 obj<>endobj -632 0 obj<>endobj -633 0 obj<>endobj +472 0 obj<>endobj +473 0 obj<>endobj +474 0 obj<>endobj +475 0 obj<>endobj +476 0 obj<>endobj +477 0 obj<>endobj +478 0 obj<>endobj +479 0 obj<>endobj +480 0 obj<>endobj +481 0 obj<>endobj +482 0 obj<>endobj +483 0 obj<>endobj +484 0 obj<>endobj +485 0 obj<>endobj +486 0 obj<>endobj +487 0 obj<>endobj +488 0 obj<>endobj +489 0 obj<>endobj +490 0 obj<>endobj +491 0 obj<>endobj +492 0 obj<>endobj +493 0 obj<>endobj +494 0 obj<>endobj +495 0 obj<>endobj +496 0 obj<>endobj +497 0 obj<>endobj +498 0 obj<>endobj +499 0 obj<>endobj +500 0 obj<>endobj +501 0 obj<>endobj +502 0 obj<>endobj +503 0 obj<>endobj +504 0 obj<>endobj +505 0 obj<>endobj +506 0 obj<>endobj +507 0 obj<>endobj +508 0 obj<>endobj +509 0 obj<>endobj +510 0 obj<>endobj +511 0 obj<>endobj +512 0 obj<>endobj +513 0 obj<>endobj +514 0 obj<>endobj +515 0 obj<>endobj +516 0 obj<>endobj +517 0 obj<>endobj +518 0 obj<>endobj +519 0 obj<>endobj +520 0 obj<>endobj +521 0 obj<>endobj +522 0 obj<>endobj +523 0 obj<>endobj +524 0 obj<>endobj +525 0 obj<>endobj +526 0 obj<>endobj +527 0 obj<>endobj +528 0 obj<>endobj +529 0 obj<>endobj +530 0 obj<>endobj +531 0 obj<>endobj +532 0 obj<>endobj +533 0 obj<>endobj +534 0 obj<>endobj +535 0 obj<>endobj +536 0 obj<>endobj +537 0 obj<>endobj +538 0 obj<>endobj +539 0 obj<>endobj +540 0 obj<>endobj +541 0 obj<>endobj +542 0 obj<>endobj +543 0 obj<>endobj +544 0 obj<>endobj +545 0 obj<>endobj +546 0 obj<>endobj +547 0 obj<>endobj +548 0 obj<>endobj +549 0 obj<>endobj +550 0 obj<>endobj +551 0 obj<>endobj +552 0 obj<>endobj +553 0 obj<>endobj +554 0 obj<>endobj +555 0 obj<>endobj +556 0 obj<>endobj +557 0 obj<>endobj +558 0 obj<>endobj +559 0 obj<>endobj +560 0 obj<>endobj +561 0 obj<>endobj +562 0 obj<>endobj +563 0 obj<>endobj +564 0 obj<>endobj +565 0 obj<>endobj +566 0 obj<>endobj +567 0 obj<>endobj +568 0 obj<>endobj +569 0 obj<>endobj +570 0 obj<>endobj +571 0 obj<>endobj +572 0 obj<>endobj +573 0 obj<>endobj +574 0 obj<>endobj +575 0 obj<>endobj +576 0 obj<>endobj +577 0 obj<>endobj +578 0 obj<>endobj +579 0 obj<>endobj +580 0 obj<>endobj +581 0 obj<>endobj +582 0 obj<>endobj +583 0 obj<>endobj +584 0 obj<>endobj +585 0 obj<>endobj +586 0 obj<>endobj +587 0 obj<>endobj +588 0 obj<>endobj +589 0 obj<>endobj +590 0 obj<>endobj +591 0 obj<>endobj +592 0 obj<>endobj +593 0 obj<>endobj +594 0 obj<>endobj +595 0 obj<>endobj +596 0 obj<>endobj +597 0 obj<>endobj +598 0 obj<>endobj +599 0 obj<>endobj +600 0 obj<>endobj +601 0 obj<>endobj +602 0 obj<>endobj +603 0 obj<>endobj +604 0 obj<>endobj +605 0 obj<>endobj +606 0 obj<>endobj +607 0 obj<>endobj +608 0 obj<>endobj +609 0 obj<>endobj +610 0 obj<>endobj +611 0 obj<>endobj +612 0 obj<>endobj +613 0 obj<>endobj +614 0 obj<>endobj +615 0 obj<>endobj +616 0 obj<>endobj +617 0 obj<>endobj +618 0 obj<>endobj +619 0 obj<>endobj +620 0 obj<>endobj +621 0 obj<>endobj +622 0 obj<>endobj +623 0 obj<>endobj +624 0 obj<>endobj +625 0 obj<>endobj +626 0 obj<>endobj +627 0 obj<>endobj +628 0 obj<>endobj +629 0 obj<>endobj +630 0 obj<>endobj +631 0 obj<>endobj +632 0 obj<>endobj +633 0 obj<>endobj +634 0 obj<>endobj +635 0 obj<>endobj -634 0 obj<>>>/Annots 17 0 R>>endobj -635 0 obj<>stream -xuSÉnÛ0½ë+rrT&%Yv|ª“tE‹¤µŠž)i¼U]’ªá¿ïVêÄE!hÎöޛѯHBð%1Mæ¨Ú趈Æïn+öäi†¢†ˆ…à“j´\|¹]àÑèU÷ºê[êœr[ݽ*v!Ur†O}=ñŒ“‡œ‚TëCÞWÃd"ٛͦüðm«“#ÍãüÒq*»ÉCé3®EiQ•;È!å"™Å‰ñYY‡ïûZ9:ÅdCÌs=áSß •“ùd6)îî VAHÍd’<öJŒŠÍÖ¢Ôú'ø­Pé¦a%˜>ô -~|\×TÃi,U[*ÔÏU‚þMnC8’26ÆG8sôÁÔÙžUpå šfè+Ó~Å®ª7†Õ¾FÙ;XÝ’Û¶dC±¦QfÍÅwºôUQGØ“± ®b³U[Õ¶‹‚û·š1TqE0&;ppLÐ÷>͉·ƒGéßÞGRz2™±ü-9õ3 Vƒ¥ßÁæäb6Oüˆ’ç¬û®³ }ås³ÆhãÜ~>‡ØzcmÖã—±!ÁÇ2ÇÀÿêÅ*^a¯ÖÄ<R–`‰öaø,—>ÓC&$o[‹iàŒ'&ÿcn"áèçÿÃŽŒ9¾ù ó?(ãp~^¢» ±à×Ùš¯Ñµùgendstream -endobj -636 0 obj -501 -endobj -637 0 obj<>>>/Annots 20 0 R>>endobj -638 0 obj<>stream +636 0 obj<>>>/Annots 19 0 R>>endobj +637 0 obj<>stream +x}SMsÚ0½ó+vr"3‰±lÇN%iK;“4´8ÓK.²-ÀÔ¶\I.åß÷I6Ði‡Á kwõ¾ôsÀÈLJÑ8 0¦¬Ü%ƒÑÇ[ +|JV؉È’œ|Ï÷ñ&.gw3Z(¹™¡÷2k+Qn +Y_&[×ÊÐa[¯Ç¾7Asß“^Ù’ÉÓèæ†a7šŒñ?ÀW ZuaìÅçg¨¢ÛØ>⚥Ú(ž™DLŒõ ‚‰X\znrnDWõ5CšÒ£¬iÖ(‚þd§AL÷Ë*ø­™ ö¬ÃdShJ¥üAøå”ɲ„ OrEŸž¾'Oxç"'#iÉ«”S~ªÉ_B‘ÙÚ ®´GŸÉ¨½-µn¡‚ÙpC¼,ûsYØáçØÊZ¥ ö¥­!-+aŠJh7Ì)¹ZcøV¦v +Õ‚¡4ÀeXV¼€UEí%8¿’PD‰  ˜tÏÁ€ =»ó é€õÄìãÛ|À˜•!bä¯(`cë¡[•´´Ùñ±¼9óæÀßHá³lëœÀÒQ´“g¨5 7Æ4ÓÑh·ÛyÚ +èIµ½­u ¶ÿ‹7Q¼ †¯x.JÁµ -p`ë̇\òH"Ÿ!m/·80ù ¸ùªOïÃV(µ÷ +ó(=÷þ,DYÜå±iÊ d¸€·êc2ÿòLsQ ÅKZ´iYdôPÀ4ÐzÎ/—ôj_Ê3d²ÙÛ4"dý¹‡¡Ù5â°¢ÎÊÖÆtW˜“° «–­ÊÄ RqjSôj ¬¯Ë ãîÒõ×:Œ&. ×;¤nõAÃèö,,'æ¯ôÊYߣ֣uSzæ·;Îàø@NîèýF ÏWäÌéÍþ:ø®c´endstream +endobj +638 0 obj +652 +endobj +639 0 obj<>>>/Annots 22 0 R>>endobj +640 0 obj<>stream xV]sÛ6|ׯ¸¦‰:cS¢>,Éov§NóÐfë¥ ЍH€À(šéïÞ‘´å4êÔeK{»{ þ5JiŠŸ”V3šßPVî·£ÉÆfSÚøæfµ¦mNÓd:Å'Ùø§R5Q{JúÅ):zoCTUEÊæ´Õ!Òãݯ÷w?nÿ”:颫s=O“*Ó[£nhzKµÊ)–šje©Q{º} JÓ~ßlÅ»¶çk(7!z³k£ÎéhbÙI™³QKT¹ÈÔ]´[8œ¢"h©«†ïu¤“k ð=*%Dï þ€!Lé:w€sgßF:Xt[v{Fý„˜ñ[ŠþD\­ciìž*sз]/`÷©—›täã¨û*í¿[®¹f¨wy²¦¿©v^˺Ÿ·#¦_4ïøïã»Ñl³J6´\ඦùf“Lûw=v">“¸\αì\Æí·õ™ª˜#_«hœ%…ƒg,Ó žhwU½StÔ; &ê+¡é%.¿§1•16·“ÉñxLïHœßóÚmHCXŽ¿´\ÌñºX¯ð:Ã/N/öYN7¢Æ³a§ÞGé-Ý·¦Ê™wöÒ½±Ê›ËVr”³L¸¢ÂxÖ·Ðïö^Õ½8ËAœdcfßözLfǰ–ì숄/½Î¢ó§„¶¨O¡tm•“j£cj3Œ \òTM|6ZÇ/d`zröØ„¦Â)D]'½=©TŸ4µ¶ ­ªˆ¬Öy`VÌ\«\J}u>ûнsñû/mxÞéõµÌIW`hc1ë=ÜQ‡S‚Ötäá Î ¹†]NGk«v•Æxm¤þ¬³–Ûz´ZôE,2ÖÆ2j‘c×; ¡6Ódâ[hÑf°z@tÔ©ào‰¨èÙø¿d1"è/áwøé—¼&a‰ig%öú£>á5`^Ú:Gžó§ ßÄæPdõEe„úëu*3Ä‹ÌüæD,øÆHêJê´ P™Ç@a"õ'ãÚ@Ÿ´MœêÝœ°pµÙ—Q²–í.-1ÏÃì0xý.¹TÎ5^ª!þÙi$Uõp§(z“ È86j˧w"‰]öŽv*;ð±]r|“o¥o íj/“ÖSUܵœ`C‡  w¢BLøïøØ.k)­‘šÿ¬›…ÜIçÁ:ïƒuvË#K|¹›ºq>*‹)ÇÕýoQå’¾‹(ŒÄ^wiÔ"^ ³’ßú «P‘€EÔ€Äìyʽ±Ù …hê¶’ìK莂L³çÇ ¶Þ0†3M‡Qñb žh¹ŒMë Êâq!;œ®ð¡#‚sÞïM'ÉP¤DÒ×"®{èò¶¯sÈ¥†šp¨¤M—»râÁ4ì,N~°$å&ë³û%×ð«¢ëi²Áƒ?:õÒþ>úµ¶è!endstream endobj -639 0 obj +641 0 obj 1091 endobj -640 0 obj<>>>>>endobj -641 0 obj<>stream +642 0 obj<>>>>>endobj +643 0 obj<>stream xV]oÓH}ï¯¸Ë A¢ÎG“4©´ÀªÛ¦ÚEtµÛc{¨=fÆ-ù÷{îŒÝÓò° BZ_ßÏsνߎ¦4Áß)ÎèdIYsôrsôzs4IV+ÚØ?Lh¾^&+š¯Nñý”¿ZIl'ðqÿÑÙ.WëdÞÙÎ`Lá|üfMÓ9m „].É’6yx{B›l4Mæ ]z¹¥“3ze¥ð’|%É5)eFªl­ðÊh*T-“g›¯p8§é4:<žÂÝhSI„øçD³­å¯:R:x–߃‰#rmš++3o쮚+ç­J[™Ð9lÊR:O;Ó¢"‘³‹†³˜Ðñô$™qô ‹¶®wäL0Ì„&'%Uæ.„4[vç¨4äM)áÂr<ÚZ‘y•ItÖ\vƒ7·¢D—%Qׇ¯‡âv¶DŸcÑä—‹üZÇ)G‹¹uV>”¥Ú”˜£$cûT;T< ¥>!áÂÙ FŒº}0éÂd¢pœôÁð ¡¾ÂãKѤ‚”.,r*"X^^|üëòüÃÛÄ÷ƒÀ \z¡jwý¬E‡™}T~0~³è˜4j¡´óèP|Ô“l„ÆˆÚøþ9:DÑBˆ8]¦ëðÕ@Zú òh)ACYä¸òÄT±NÖ¨ˆ_;@ö{NƵ 3ÓnÛÆÆô1‚ô|ß%mkÎc·•™*bEºòdÏœÓ0Ïë³/—…hkÔ‰‘ÂtÍM—YOuî-R‡ïãqëì¸6™¨ÇH)ãZ¥ãA”ëgC ¿»Æ N¥á¹‰B'RƒŠÌZ«<4Ez๠œ%u$"W±âÿÂIp¡`XBa¸“µÔCd\}8ÿûßËׯ®.Î7Ÿ9!Ÿ þ:™­ïµþ1ýž­‡ê½èÔ{~F›N'm§BqNUäñ ø ʹç(7[c½ñîyôüZ(èVÔ*çn˜"ÀfØ~Þ°c.7¦ÏÒkJ+š„è¼ØÿÖ¶Ú &þñ' yê5DH©6"Ì:^;,‹‚"K:ËRÝb'i’Öò˜¥sö!öPGO(4ïpŸSî8ÍsF‹K.• `Mr#‘HÝÛ, 2ôã„дብ[Ô/»Ã0ƒŒº+&¡ Ë3o#•µµÝY†0ˆ°ŽVR€9ÊØÃÇI¬¾_¸F¿±y”¬ˆ‘¸é˜‘šï Ý |•s¡‡apa‰ v°:6hU#à\ä·>¥ !9vå~T ËA£Äf?#~t )¸ 1©Y "œAv_€ƒIÇã]AMVº­Š\­ÊÊ㎠Ëà[«²ü€–·J+¯D8íº£…EàI‡ò½˜?ÂöU·£§ËÓ„Ï~œÝ÷÷å‹÷/_Ð'k¾â ±âÞ‹ˆs=ŽoÇ×þϵ>_M’5N3öuúóè?Ŭendstream endobj -642 0 obj +644 0 obj 1435 endobj -643 0 obj<>>>>>endobj -644 0 obj<>stream +645 0 obj<>>>>>endobj +646 0 obj<>stream x•WaOã8ýί¸×ÕÒ´iK[¸O¬v¹Cºe9èiµÒJ'7qZC÷l‡¶ÿþÞØM[²ôX@ E±Çã÷Þ¼™þ{S¿1zÔRR}˜}šu£ñ˜v3Ã?]÷¢1 Æ#| ¢I–â¿áîM¿ ÄÂKÄß>§suNñ€&ŽŽñ!õï»4IZq4Œâˆî\Й¸Àaœ*g”]*¥K£D—Ù»ÉÃQçj@qâ´{#ÄiÝ|™|ú&sd¥ó\/yçRå9M%¥*ˤ‘¥#•­uE••ts}OÚðŸ÷ä4YgÔ´r2%+Í“J¤¥B,lÄ'v©ÝâÖ8éO­I8Žc(d}6­ŽtI§Þý<ÓVDôuŽ}ÊR*3\(å( mÅýóŽK]gTj7çä÷–‘›Ë’DŠ ”c#r“UÜzœ6Ù‹pb¼‡Í&g 7UÚ¶­-©>íyz{´ªP¹0ùP¬uªtáa³s]å)ÍÅ“$Q5kŸÌë'—¶Žtðܹr$Sõ?Ð’A é ä–ÚcdÉêB(.`¸¨K笜žN©ñ³d!EAàÜ,Ò3Z;êTÖtrˆ¼cE1©*;¶˜B=ü¨éA1=øTXÒ™Ax†ø•à%Çõç¶q‘¾/–¿\‰Ä‘]—N¬Hg/*ô0ŒOÂ(è~*ÝRBsU©VÒFTkB$èSÏ=¯Tå^m’WŒ¨ï¾‘æ¬R©lV×+Šm!‘çtÔÅÒâ𞺠Xÿ,úÞB0›¼/•Æ&ÚÈïï8€ÊÏÖâ7]5ò,* ý©p=–Დ4–“7ƒÃPÃs á…) ‚³Y®ý2P_J,.×à‹ @@ -1033,11 +1040,11 @@ E sWÓ–»0\íR±ŸÍšÃT¯¦¦]æM)œz’ä¡ò2…ºÀ!¥Bº|ž9Ï¡§À0jÖü` övíóÀÀá͈¸áó… m£k Ð=1Ð̘€p|íÞ{ùÓá_ÏókmŒáõ^þËqhÍóù-ùpCoôÂâœÞ²×SºÙ»›XwÝÚK÷x”\ɤrbšKŒ­nÞTr2/`1ô~Èø¦k3ë}ƒ|Ö‡gß ÀmezOš® ²G5 ˆC6Þ<÷J²&'Œ¹&‰üøÂ7] Ž¢Ãý(Ì=÷—Ÿ?\Ò­ÑðTú¨ïbÐ[;,ozø¾é;À`ÜÎñ=Ûúœê寣ÿR0ƨendstream endobj -645 0 obj +647 0 obj 1365 endobj -646 0 obj<>>>>>endobj -647 0 obj<>stream +648 0 obj<>>>>>endobj +649 0 obj<>stream x­V]OëF}çWL¥V q’‡J÷SºÒ½Ð6iQÕôaco’%ö®ïîÈ¿¿gvíKH€>´ ÀÁöÌ™3çÌìדõñ= qJç#ÊÊ“·ó“ÞÇ! 4_áÎh2¦yNý¤ßïÓ<ëÌ mUQòä¤ÎIÄN­µ(ÈòI•5™tN::ß"ÜE®Cº\æñmŠ „9xÎ?–ð#}ꦣdD«ëù‡)}ZÑÎÔT;Ïþü}HÎï IJ3Äó²ä[šÂƒ¥ØQ¡¶xÚPaÌ–„ç»1=xhªîΓ”³ÈQV…t=wg‡]ç…õuuX€Ë¬ªÇP)z&Ê¥ Ò+AŽ$Ôða~6it>JF4œŒqâÇJZEò/i€ ùý4™<¡ŒšyYÑhJsËÅ8¯ô:Tï6‚sq'T!–àÀh.ÚZeï¤=ª2åÞv~lØ´]ûY¡¤öÔýÜÜ;oï…€ã¼eC[ÛɽæüÅYÝÆÔENkéi)2PÀ’YáÎ1Ј4MÚ¾æFÿ¤É™Rú —ªˆÍŒµ2óÅ®‘EÛ0'Ñ „èÊx–Dh/^àwMN™Ð$ @@ -1045,11 +1052,11 @@ gh)Y39 ±ôYè/B‹5.#;î õ¢ãêlCÂÑÍêf½8=Tl£Õlc äŠô– y' Èj«ü.ê”õÌ2])ø"–eå×Z:S%œ»76G+¸ÐÚ=»’ÕÀQÅÊÀÊ µâö3v‹%E…´ í‡F®5¤i,åÒCX.¡E‡12ñÿ,¤g?5É["ï8¯ý¸‡íyÞª×T^A°Ý?~jÇHfJÈXË„æô1T© Ê5vKøè7¤îF†¢zÜâ”ëh|6¼¸ÄÀxÝgÃô^ÜsƒdÒøl}–­¡7’2‹µV"q{ä_­ßxôU¯ÇVmÕ\‹Ê^¶Ø|W©LEPMÓдué~¨ÃžÞWÂ\»˜ÉלNÐ÷WiŒ»¢€Ib„Ç!þÜtF{ZY}Gñ| ˜#b\´¦zFê ©7âNBnp²+½'Ù–á0$èÉê°º•*X+˜ŒÌAtY(RÅMq[£È_ÐßÌ÷û/H©b¸6ËÄòzü#|Òì ŠeÈ…€—X*¬¼€¯0kÔÛ€»+‹‚™üØ$¿«äôR»_™Û½^ÈÓ ñ8@c†t’b¯½n†t8 öqç’ËÆ “#3¬¬)áð÷׳³0öð[éˇðçj~Fü1Ýž1fsöYçzÖKÏHú,I’'jGï’°œ¸“¥©up^®ÜóG®_&åÝt±¸ùtõþúf¶XüÒH÷ûfÓØE|Vȧ´ÀWœ,xÍú‹tïãhŒ¤²Xé˜ÿ†¢òƒ)㨌)ž˜Omë_¯2 Äþ(dPþ‹½“…\ZáåA¶á8‡i hY¯q©Œõ?ìig„™ø¬t&ÍÔŒÆ $qNÜ;0ÎÞ|yû†~µæ.£÷&«Kœ,ŽƒCüV7¾ÖùÏç›á¤Ÿ\âÜŠsͰÿÛÉ7ã7endstream endobj -648 0 obj +650 0 obj 1189 endobj -649 0 obj<>>>>>endobj -650 0 obj<>stream +651 0 obj<>>>>>endobj +652 0 obj<>stream xWÙnã8|ÏW4ò²`+¶ã\ƒ=à\‰'3öÂX /´DÙœP¤G¤âøï·š”r(³‚ŠE²««««é{êãg@§C::¡´Ø»˜ïÞœÓ`DóoNÎðQ?é÷û4O;ƒdÐOh±ž&9Í×ʬ]Yó‹§…-ÿ8˜Çþ qoxŠý¬5ÖójÚb™#a2ÚÙŠœ¥'o‰_>Òþvmi[Z/‰?q´QZ’Íɗ­÷ñ™44!W­VÒùpBfqˆÜÐÄJ(CœÍ0úÔ%CÞ<WZ‡M©Ðevk’zåð$áD;sÀÀ µZ{*¥È8(åŒãj2þ<ý2›ÌÿìC üŠnÆ_fƒ·‰R‡q¾J#`_îÂ!…Pš)Ð @@ -1061,11 +1068,11 @@ i ™¤Öäïsî„©ÂÚ•/"GÁG=\+øÁ‡–<ü¸ÄLë“À?…ønKåw/ßÎdbÈêL–·v0¾à³qˆ°háúÑAr[Õ–f$ €eÌ”2™±V…ŠÊ”Y÷¶¥æ Á ÑÂ:®X˜V°m™A‘!=c·ØëÆâ£ÄŠpcŠ:ÛxaÞ›¦œŠ5z׊[J [à ²'´®XÁ»0ÿš"¯@Í,†1a—.­àÑèw¶÷E¾X¡ÄÒÉò æ˜NXÀ!áz*kÒ0°Q°F»]FòyNA}£AªŸ†¸„jc‚@Á£wC¯¿„a€Èm2¤ÓJõ/ºÄI¤œ+³öÆsö›SÀ/:î·ýÆz4äⵕÂrdòÞ0‡œ[Âü5¢g I[vÜ’Œ(ÃVùu#8˜Ã •«O¯–ÖnÄEíÕÓ9êTþ=?æ{Nps?›ÉxŸh:ꡃU€k*Á¤¡ÊŒ¦`ÆêËR;½).—ŸhþÚ³›RÁÚT²ââ³4TrS„ ÿªÉè¶ÑÖç—÷‡“{By¹ ›1Õ¿U©¨€ «„n€1 ›Š—G-y†O¥_ÊJµÏåkZbO¸WBf?nM+räv¸$ðκéXÙU!–è7µ¾¬VªÃ›³úv089Mønð³ñÝŘ-ü;<7þ7w(Ž×‹‹{§C|MÈþ×ׄÑY?9ÇW ,?æ#p›øº÷7¡‚ñ¡endstream endobj -651 0 obj +653 0 obj 1513 endobj -652 0 obj<>>>>>endobj -653 0 obj<>stream +654 0 obj<>>>>>endobj +655 0 obj<>stream x•WßoÓH~ï_1êË©õ%iš–RZtèhË5©mì5Y°½fwÝÿþ¾™]‡`¸“N)µ½óã›ï›™ýz0¦þé|B§3ÊëƒËåÁõò`”hvñ4›Òôâ¿'øï4•üú÷Oi<¥e‰ƒ³³³lFË‚p`4¢e~4ÎÆ£lšÑkgš`šOT:[Ó›Û—S°¤èyetèõó'ËÏ05¥ñ8š:™œÃÐÑÒRç5>lÙ€vÖ*ñ¤•©ÔªÒôhÞûzu²R^D^»G|)žuùFkëmmGSUÔh|÷¹­[ a­ÙýˆNƧلÝÂZ#kýäTÑ{œÆ‡Íî´i|P°†‡äsgÚ@tˆƒéaF÷ZÁ ^ò‡®Ëƒ± ~s¤ò •ÖQmÝÐw¡Ró¥˜&3àÎP¬50çÔ+ÏÐ-Þ/Þ’[$Ü 6…Õžê._SŒLÕœ CŸ#Z$ÞûÏüÖ?fô2‡.¿©ÏØ}ªýÙì ÿïÚŸŽ»AíÏ2zeó/ðÿ/¾kP^§mÖA{[ë`jä+TÞSp¶ã2#ñ*’ÈP¬ KaÛâ”-û¯“ݾæ+MÔjìk`±Ú27—‰3d*[àïÐéܺ¢·t8 I  Ú ŠB‰0àljN5Ÿ4G²Ú„„Ò+²-T‚t‰/MÁΘ)‡…n¶àD¡ý!€éœ•ounJ£‹ŸüÖkÄØö›û2@šµ‚sYÐÈŽB/[¢Â”%8=Šv~Ì>xgšùfôV;F{B†ƒÀª^)Zi€¬Ñ+&´V(ŽC ,;4gÛ¨`ðœÊ¼ ÕÃÑÓ¨UÐ2èZØÊ_›º­tÍAAЍ¥¯ÊÀ÷J‡.ßs‰ÑÄê îåùæ @@ -1076,27 +1083,27 @@ x ÛüúN·KDŽ/dì#ч#Ï+3¡ÀꞀIMb޽1£”:ˆzuè\ƒŽ‚a¼·N 0f-ˆô ä¯v4“n!ÐâH9Ýý9Tä²Hó?¯¨¾·´à±¿HÏG ‘¨-³˜·L4iKƒlyà•„ ðe3Líjƒ½ °cì6&•³~úžM"9»ç0ø@XÕhÛù$qÌ@ Y9hÞO&–®òÒH>¯®oß¼½»½>&ùy=¿J?ßÝ¿\^c‹pñÍüÕ+É4¡”l@˜Æ¼°#Ó•©LH{ÒÀOÚq£©Ï/E°ñ¯+ŒÍôu¿9ö¼í)+4‹ûWÏÐýG‰¥‘¦œ+ JT•v¸Öêџʪ‚Q‹÷p¥ÄÍ&W̱ÝÆ}ƒY3úèqÌ‚óÅòãâùýõÇ›»«ëÀjûÛ¿¿i¥ÔÜÀ±H#24‰bXw^t¢’’߸ö• =4êQ¢*¨Ö˜Ù[h&¶‡…£WÖØíp6én0âÊ÷««ÁEºËgçß(qÜ».æ7—s\ ígÞº®lÞñŽ'4fã'ñÔI<öÿ®‘Ó‹Qö·QÜ™f)пþ'íÕƒendstream endobj -654 0 obj +656 0 obj 1764 endobj -655 0 obj<>>>>>endobj -656 0 obj<>stream +657 0 obj<>>>>>endobj +658 0 obj<>stream x“_OÛ0Åßû)ŽúT¤ÕKš6i‰4¦fo¼熘&vf»|û]'tƒJC(Še+÷ïïœüš¤HøIQ,åPÝ䢜|¾Ú ]¢¬ùK¾æM…D$I‚RÍR‘&"¸‘}¯Í~zrFväÏÊGN\"MÇÄù¢àÄÙug»G#„J×592ûc¬Ah·—ÒT{£ŸÀrñÌrGh­ÝA†!fz,NöÓØ<Á<ÍÄ"6µ}ÐÖ`K4Dûî^(kj6èå¡¶©[/bö×rÂ3"Ï2^—ë‚׿Ž#O‘¬6›¡Í ”Bà;ßÖᲑNªÀ»-…pé½o©óŒ%"­uKRüÖ¡TŠ‘³QÇÂzÀÖánÖjf~#ÇÓ}ÂV ¬;²U XyÐÌà_-üÝÙúšV¶ëˆ¥ˆ²½!~­®†D?FÆñ"áFeëí ×I÷·ê ¥â8,‡ÚEEÆ‘@O²ë[òì¾K°îùµ>«lõ}Ö/ÎKóBD;³[_Ùv{~sqŽ[g¹&¾XµçƒŒ6‰Yó1í}“/׉ØðŸÁ>+^œócòp›ûendstream endobj -657 0 obj +659 0 obj 452 endobj -658 0 obj<>>>>>endobj -659 0 obj<>stream +660 0 obj<>>>>>endobj +661 0 obj<>stream x¥V]sê6}çWì#™)66ÞhÚLïL“¹í¥s_ò"ljlɵdÿ¾gå0é¶sÃLléh÷œÝ³úkÑŸˆ1Íæ”£7£Ÿ7£i°\Òå_µÇ,[̃%%˾Ç1¾V’v¼/ÓÿÃòðéâ)mv@Ÿ/–´Éü{ Â#>`2‹‚˜ßÆAÐz/uÖ®I(ŠÚ5ñ‚Wl ©Lj§vgrIoòL»Z§N-r*dzZÙÂ’ÙýCD'9CR‹m.=B&ËÜœ `ò–>>DÍš¨„%d¡=¨<9ÄÇ@Bg¡©,–¹Ho(xÙ„ñ¬:D¤Mnöç #bx*¾JГç$O¢PZ®ø54œÄíûQH`[“ל)0Êšý¡Õ)üUéúD›ÇÏá§Ï„„Žª2Ú§Á@ð±²1åßøÙçs Œüj+3/¹Ò±’s Bú[Ô_Ì;m+¨Ï‹;IÀœÎè€W ½aš¬óÜû7xÄb³ýÞÚ#x!†‡Î>z«•i])w&S2]ƒ“)5z§öÌ]ƒ»ƒnVÊ"—ւضˆAò Ëäã-J«»‚!aWí÷ÍÖdqÑsÍ™ël"r£%N¯Žè¡æ¼)*«%ÚùA¯×z ÉˆfÁ)LÐÃ}Ê™)”+d±í1[ý·sžÈÑÀIÑR\«~uÂO 0²v•Éó¼8mà½åL)AË$Á ÀÎ_®›}¶xæ¨Ì‹ŸÄÊÉåïÿRí0•Í—˜Q ÎVí·æ*“•¡E³²yNh2%l‚%Êp€óf´lP´°ôÒXÉfÒ,ìjñ›d 5Œ¶-+sÄ4Už‹ëaÑB²5/[¼¥Ì6¶Žfp¦Ë³s•l „@µè¨¾[/Íl§R¤oÒ!G#¡©x„²©ñ`.g«@M7BÈU ¥©Q.ÎX¾ŠZc“>¨£ƒƒi[»Û +¤Â3†Oy–vÑ:MÙÈ[›êbÿàòÏëÇî7®+ƒBÌÂÎÏD³˜¶ ùÀ#r©÷ý½¥¿ â8Mw.9/l)Q‹Ø *1Aw¦®èuœ¼ÞaÎ¥ª@æ¤köãE¥Àm ;¶g¨–AŠ×1‚,e¥Lözç‹™|q­Q›w%àd.=EáµMÔfX'-Bàö‹KJ.Ç‹ ej¯péBn#¾¡ÝÊ«°S\ftÓvDÉtµ”«©XEñj–¬îç¼3|Z^®m˜€h¡ÿye¼\Ã’å4xhÌvÉØ0¤ßF£<öendstream endobj -660 0 obj +662 0 obj 1213 endobj -661 0 obj<>>>>>endobj -662 0 obj<>stream +663 0 obj<>>>>>endobj +664 0 obj<>stream xWÉrÛ8½û+ºr¥Ê¢Û’œ99[Uª&‰'Qj.¾@$("&-ëïç5ÀML25–7’zy¯_7\,hŽÏ‚ÖKºZQZ]¼Þ^¼Û^̓͆ú_v ,›ß&+ºÞ¬ñÿr™lÈJÊyâ˜î–ÏÞ_ÓbAÛ§¯6kÚfáùœ¶éäÝ“´'ÒÒ}$¥½´¹©¤ªvž ñ$Ihúx÷†D–Yé\BwΙT /3:*_‰ásò…„+•8ÑN’Ñø±/·ß/æ4]\%KŸT >Ü·'Jœ¹ ›”£OŸ ‘”Â+£]¡8Ä¥ÔìE¿WÙ¹ÙKeI®N Ω½®¤öndXÀ®°;åb6–2åR+ÙßPš´ðµ•ÑsTä`'œJ©”O² 6ºd¥¦ªj­Òè+yñ(JN^í”ÞŒrˆ‡ }U+ùnŸˆ˜uäm_š: ü¨%¢CÀ{©¥ w­¬„ÒŽrõ r„‚§‘Áƒ°^¥u)lƒ+<» qõ"“2[…0œÔNåÖTÈsKJh±—œY:Hë2õêI&#»^_0FZŠ[LŠhŽã!uúŒ ϺT0«*†¨?ìrdÔ ¾yu{|ð (x£À¹¶F3/ºûr{‡òÔº¿\%×ÌÎ f „sH¬€q“‚øt`yC=ð2V€ÐGZ>-B°Í›Ô”¤ªC’ˆBÈ,86¦fð•ýzÑ¢E%_°/ @@ -1105,11 +1112,11 @@ f 8‹)~÷ÎrÖriž®ŽÜ‡"2R·,þpgr”Ч³¶€T ,Ô6RΞU!»LǃSpMdõ ½Øltyú“í)”ÖQ7âÖÕ+kãßÖ/åù«óïÐ(bÙÒA¤€)J”fŒF¶ÛuÍ ^ae£?KLÀZ¢¤é³x‹lvP¿/ .®‹ÜÔ: ô&-‚ß´zžý¥týLMEBà=p ‘xÆį«ºŠÂÆuЍF‘s<ñ ¼óÿŽÚƒâcl›üw¹`ÉAÑèX(¤Çž5£ÇÍÿ÷¦[1L̓æà Y‚„r¶¹I ïuu îpˆ³n 9`x èêŒ{ˆ|VÜ—%jq,fè‚Ôhq,®öŒÁØ çxŸ„*ŮѦ0iÍéjsƒaª™«0[ïa¬š½¿¥QW7<ÇôCÔ2áOC„E³lˆì>%¬®‘'ý(6]ò(6é³ãeYÆÂ¸\ª ÷ŠÁp8m»0¬nµÓðdÀ¬ê0k‘àÞ[½w£i£âÓ5Æ0˜M–«uó°u“Ÿuƒ[kìaâ F°Èé΂EöºÂÔeCHj'˜@ÀátKØ´€b¹½z{ Ä^Æü§ƒ±Ö?jQª\aG.²Èùt˜×³hÚIówýœ=;(…YË z3JŸ˜Š_¥ÅÀÜÛ̸Â=F%Ä8JVŸúN§jÞ íbY£.Íc’ø?14]^Ý€–ÿMÐå|FísŠ^ýš¢œÞAÛæ4"A;A,jéú|(ãfB«$‚cÉðÏI~¾çÉk\àfxOyŽaRf }S˸{¦V&Æ”0X ¦™[b›¡‘ö¾Œ«Šm£—¥2CgnûÓéÊ` ¸è¼­S~/€v‡úc±¿e%X E7qj¤æ+Ú ÑåNé¬= ïo\aí²ª.½B?Œ¸·Ùœò«ø’„¤jÚAËÚvÁê««fº/¥À¨neÎC_(âýqé¸Òá®òÚâh¼ûH4ŽÒ…†Ö0k}Ý¿Qž)ߦQŠÅjðë)‹EO­¯w_ßñ˜ò¢\Òš‡‹Ð¶8¼iÜ5Û&VމÀ+¯7óä6*Ñ-_í¿/þ0WÈendstream endobj -663 0 obj +665 0 obj 1684 endobj -664 0 obj<>>>>>endobj -665 0 obj<>stream +666 0 obj<>>>>>endobj +667 0 obj<>stream xWÛnã6}ÏW ܇zÑD¶¼Þ8»oIÛè^ŠèK€‚’h‹‰TIÊŽÿ¾gHÉV”¸ÛHli8sævføÏEJsü¦´ZÐÛkÊë‹»õÅïë‹yrsC§?v‹/sZ¦i² åÍ Ÿé Ÿ­¤ Á[è9þüìã{J—´Þ@ýõ >áýœÖùt‘,’eBoÖß/fÓNl:“>ŸiçöÊçe’½‰KJÓ¨çj±‚žéºTŽ6ª’!oMåÈ—’Dî[Q‘µ.gªÖ+£É »•Þ%´†L<æÊEU¨.Êî¤%“}—¹'×È\m ÀÇ Ç0æt•¾…Ã0¿1UeöîCD7§÷ .¥«Å»„ÝœR÷ó½î«BhŸ‰ö&ÆÏé {s/íNåøBÃ^oÔ¶µ`ð(9w¾{¾H“롽F ÌŇ)4Öðç”Ðmå¥Õ0·“$q%c)¨1¶ Ñ"Úw1#aeˆÎkžÆCGÛÑrp‘F^«B4´W:Sº8È•¢0ûÿ‰~kMÛœdŸ»:ŽKiœwa.²«ÐÇ2x‘£sáam/Êñ?cóÜ~´Ë!0Î/T¢®UAEÖùq ×9tZú½±G§8ÄG½gªC"™öx‚‚õpæL>k¼Éц]äŽ6ÎÈÛ&ÄøÇú],ÿ^ýs<³=?\q^ÇýºA€Zëä%I‘—d6LNR-óR`Í}ÿO«@x#|d®4V ÏL!rU)ϵ.t1C¹÷8¸¾¡ÞZ°EuèìØ¡oNYôM L>ZJÓVe’´ñ²ˆ–["ƒêr€Içg5‹-0·¨#œí/iýë·Ù§o½4C¡jŸ S«žN}V·z@j®…z%ø«sÕ€9$pŸxTzKFƒ÷hjØÉ‡=Œý¹u&Äé˜f™Óçhܪ"Qô‡Òí¹¶iŒõ,ä“—šEpC!Þª»¨Rä}Rzc…ó¶›³c&iäT´ç•‚Ó.å‰ 3ÊMæ…ÒÃ!×>ßÓ_à07}‘þîÓ×ûЛ ÂI·Ebp’'…¡-+ð4#Ë›Vç<Jã@1ZÊ"¨æ3ä¢  ò%‰AEa!æ QT‹Çp F}ÑÃTÉÝH|×M¼)KŒôrV© ŸÿUºÄ–:µÂôáMœwð¨­<'âIìKhŽŽ{ŒB Ëv‚0t§lg¤œ @@ -1118,11 +1125,11 @@ M 99îvL­­/#ÚôÚ—#WÂ\(R,l…0Jñ Ô)âä@E Ì,nYÌî¨ZNzŒ*ÏõÓ&w²"¼À[w+tŒàÈøÐNƒØr‘¡ áìqôÑ8–,Bd% p€ûq ò6Ò<ÜC"Ì‘eø†Ed§˜'ÁA!»qØÍBìx¯‘‘x- l³Ýçˆ3ó="ØÀâ%¢¿ÌÜt¬Ÿ^¯’×¶4^Sîo?ßÝÒ7kÂýè7“‡9bÇȯ¢øÕjÛ]Ñßî^¿ü,WKè r霃¿þ¼ø&wÂendstream endobj -666 0 obj +668 0 obj 1574 endobj -667 0 obj<>>>>>endobj -668 0 obj<>stream +669 0 obj<>>>>>endobj +670 0 obj<>stream x¥X]S7}çWÜÉéÔÆëP ´3@œÔS ›Ix‘we[aWÚHZ ÿ¾çJ«µ³™iši°¥ûqî¹çÞåËAF#üÏètLoN(¯.“ÅÁhxvF»»Æ/#úåô ¯Çg§xÍÆüŽ•´â+øvºœ?ú0¢·´XÁö l-Šðñˆù!µÿîµúÒHº–þbz3§kQI÷ëëÅçƒ 28Ç¥îlº3;¿ücz=¹>ŸMÞF¿Óo4—öIÚðMå’”#Ûh­ôšŒ¦½ã?bø þ(µ´*§™È7J#NÄG‡)\_^ÿ€Õq÷Jè™Ð)j‡àÿOÔŸnîþüxwsû.[rÌïM%ÒΓ k¶ðÐÆ8Ά'û~´¦©ÿê;7£¯  X¹VìN´|!Q–TÉj)­#³¢îæw€êνËò½D.öÖ”%[;b¦”f²Æš»ÿn³`›W&e›°!ÙÆT#S-}dÃt¦û‚•£Ç”eLùAFƒñÉpÌhO=¹iJ€#I”üFø€S¢Ræ¶PâˆT–ÌV1Ï G5*Š÷I,Í“Òbªó—¦'”;añ&ºÍ8¼MÞÐâòöhzK8é<Ê#¼2ÚÑvƒ’ŠßÀ/Á¼{A1+E¥4êj…7–¶ e¥B"y¼.Óáì‘ôùÑÆ8ßÁغǕöÈûë9‹¥p>‘yLˆ¼ çL®ƒ²U~C@BEa¥sÃÄÜ“á1cyÏ«ÆKµQÚ3ÃòRXµRyH«õÏ!L6Ãz«søuÔ»²ÒJ•Js‰$qäVæÆŽ õ£Úš'UÈÖ|8•’“#ÿR3D+c«ì!ñÙœ>)] '´’Úî¬%ÜÒ¨S ~z܆¹`É%}àû=¯•x¡À)) Y é\“|U pÑ·ìˆoD 7¡äé}ÑVp8» Rf)é9íÇQI;$p{…„¢³j‚×Ö‘!—@a@Ñ öz P›ÁbÑ€Á(ßäï÷bÁºÏ@-â–Ä?òsXÈ0ºû—&èši¡rüz†–[ì%©0dP#S6a(W’AQ®Â´£y&[\„HF}VeKλv»¶„Ŧ@ã`™mç=·ÁžJ†0,Bôáa«ßÉ‹q|tï=¸}xK–Ë?cgç=s÷¤:¾f±ó:×¼2\bµ=³[¡ŠãS^RÏQÍ=±èp’ÈàùH3™ñ„d0’–Íj:uìæLömäÌåL>£€´‹æÇô¶WÌvÏÂL"#At‹¥ž’ºðΩm_xMà‡¡$Qð%¬Í£:A˜À°yÊFƒì—žgìlç » ¢GVèúÖqÞoyf™¥ÇÉiï6ŠavÞWÖT!áTÎèr¤€*eCkƒ7°­¬7½XQCˆ¼ª¨5Vˆâ߸×Þn+}8åÅ4€i.â"ÍvcHáÍCµ”¼n }X“1j—¸‡í(^ß~ÜÃù\+DÄ^>œµ ÙÉéÿ*rŸÇç糋sºµæ3V <ÁçØdµs™ï âñÁé<)¿KÉãÓcüé$œÍ26€øëàí¯ˆendstream endobj -669 0 obj +671 0 obj 1999 endobj -670 0 obj<>>>>>endobj -671 0 obj<>stream +672 0 obj<>>>>>endobj +673 0 obj<>stream x•WïOã8ýÎ_1*Ž•hi»,¿´:©”rW ºÍÞj¥J'7q[‰ ÷×ß;i §À-H¥$¶gæÍ{3ã{=êâ·G§}úxBq¶wí¢½nç쌶Åÿt©ßÇÇñÙ)~:ïô©´àx‰c6X~t}L½E œ~rvJQâßw)Š„Nh‘–v%ñ·0¹•¤XÄ+yÈ_5‘Ð$œ“YîÈ’ÏñJè¥$A™´VàÛ“r+¬Ž2ìSšŸ¤)Í%Ùrþ·Œaã‡èï½.µ{ái”8•ɶ)%2kÛ!%/hì~±¤E&IYRz×k`п*¤5ié”k©1eÌÙ2Ž¥LiŽS9ˆÚ™XèWƵq@ËæF'ŠV0†5ì/(­+„SzI SPiea©íÏTŽÝ„ø ;Y(ëTLfá­å…q&6i§²Õ?és <¹Ò7¥ód Ž§Ê­\"Mù™|™Ò0ŠªÓ&Ò]Ž¿L)„ìÓÁÆcì@žZzÅÞKšŠl.^…(”êQ¤R»p$6¿8 ›ìZÞ_O2p£×Ev§˜]5£Ž®Ï©‡h˜?ŸNC`[õ;Èiðäæö÷/ÓhJ •Jvh—xí>xÀ~Ïî”¶DDkä1!ç;XM":†Hõ»à´òy<º†D*2oè4¼˜Í¾'“h6›~ŸF£ÛýÙìê~üçè~:›¢áKo@ê„b£PÈ0]Æw4HÐ9ÆË]Jj0ÊAÉ+¨s¡ ˜3¬ÔþP…Çkã>ü\`Xf©Îµ·Âƒ'¢ò$yÎ\4…B*eòš]cP}+æ£h,¥êA^ÔŽœsÒzÔî l¤êgŸ†&_j¹r4;ˆg¨w~~F·*.Œ5 ‡×E^+Î8u›Í5¯Ÿ-!¯‚¬Èräx—,¦„æÌ}Hbc ʰ4L9>¸RÑhÁ<Ê‚¢áÝÑøNCñƒj¥¯ó³¦MσÏ>#>„Ü{ä-Ëg›i9A fl²¼D à¤ÙƳ7ñÀW¿²C4B$[¬É®L™IÕòGB¡P*0J-“à ·õlç°<q²;üMËL*.9›44:›¢*̾Ý`Ñk~ÖJágn£µ2G eÁƒ h©pÑ qØ®³â˜K­ýÖ¶â6ž Î-¥–…×çÒ”Hzé颾¢|›, \³2¼DKü¨¾Í‰œKÀ6ûИŒFÇ^”;F e~aøž¹ÁÍ`B·B£›Ôïá>Çœ7ù줶˜/Ü~_K¶Ñq/öý»ûÑ;+®¾Ü^|NL†Búë;KÇ“áÍ׫}f·Yïm¸ý6žü5¸‰F÷“Aôž'£ÉÕÿ];›uŸµF¹ÑF·óBißð7sKž›ÂÍ>4EÔôœ®7à ½®d^M2¾ÆT³F¬zаÔb˜[aЉØÛx:§7”Ðe#/ÀK‘x±ã ¿ö]Ä º\C Q¦îÐoSL–¢ùxž‹6G†A @@ -1149,11 +1156,11 @@ h R Í¡»NÙ–õFL‘ HF'mu 屑 ]ŸU——ÞÉI§G'ç½Î ÏÖÓÁíå€î ãïËW&.¹Xø;!ïk÷NN±¼}ÚÇ¥=9xãÊu|zŒiݯêõy+îvìý Ì£Åîendstream endobj -672 0 obj +674 0 obj 1741 endobj -673 0 obj<>>>>>endobj -674 0 obj<>stream +675 0 obj<>>>>>endobj +676 0 obj<>stream x•W]OÛH}çW\%›• $!å£o@Ân$HYânµ’¥jbÉ´öŒ;cù÷{îØqZïBiilïç¹çžü8Ò?C:ÑÉ)EÙÁUp0 ýósÚþ²¸ÐÉè¢Jãó3þ|zÞ“•”ð+x ;Í/œ?¾Ð lŸÂVûÇ ¢Õº´”$–©¤ÂÀ’ˆ©XIJ³•q…£Dá+£H:—”iºîS°R޾Ë5á¿RÇÒþ|;ÐÑ‘ÂÃŽá0ÌD´RZ†¡[»Bfa•ÖJ]DFÖ¤Nx$í“‚ý0L…΄ækiÃ0Vd²O4\;„ Œv+a¥kõ©´ßÊGå @@ -1167,11 +1174,11 @@ l šG ßcùy¥@+ÊUý\y›5=Õð•繉Ñúu{›¯ û†Îƒf¦í98P&ñ}ƒ!H´\Z샨£° ²ôyòMÍ‘ðwŸŽ—ªÇ5uWŠÈ3*Òå,]¹ü&#!¨J†yE›ü>óUõ-¤nN¢?÷*ÏŒ+}¼õœïhÆÅaÍ'<‘·w· ·Pã2úÎXGïÐq–¼;…8¯¥³Ø”à•KàýU9xøV•¾ãÙ¨”´² …—a|Ï,yÁÝël—Ooc=ÜÚìzbAcM™ió:ŠÅeÞ¥ß-ì{^óÞðô¬Ï߬ñ¥wçÛïâòîê’î­ñ]™˜¨dnðXçôª·Žª×z¿dëñÙ3Ìf{Ã~ ᯃ§Ç•Ìendstream endobj -675 0 obj +677 0 obj 1654 endobj -676 0 obj<>>>>>endobj -677 0 obj<>stream +678 0 obj<>>>>>endobj +679 0 obj<>stream xWËnÛ8Ýç+.ºrD¶\ÇN t‘ôhÓ ìA1@6´DGlhR©8þû9—¤YMÁ4¨a‹ä}žs.õë$§ þrZLéÍœŠíÉÕêäÓêd’]\ÐóGs:ÏgÙŒf |ŸN³ j$m°+‹9~Æ•|Ša¶°‡~KùŒVø_àKÖ'´*FÓìMvžÑë›%}µö¡­_¯~žŒ?Ï(Ï㉳é'F—qÏÝè‡2¥Ý9º6^6Fzº[IKÙ<Êæî59|Q…$åÈW’ä¯V= i<ÙMx@ͦÈ'“|Œ)¹Zj£dI7W7Kv=¡³üM6e—w£鯮¿/]d”baW²!çm#ë±8¦¤ë[e‰‡¾ž*ÔÈ{å7®÷$(%3p\hÅ“Š!¯>ÜŽaÎIßÖT Gk) Ý«G|®–Â!=#c…b%ØÿeôŸ%ëÓ9Z‰´V– k6ê¾E@K±] ò69nCJ‹«·±ZÛ2÷T‹©!r2R–œmÔ·«ó¸¶’áƒáµË C qÆnœÑÁx¹äÐ)®7Îu傊[îA粟q£,ûX‚ŽVZa_‘z½°úrœÞat'ÆfÀE¡ ×ê©®‘ºô†]FjçëÌx’r·T—[Ȭ Wüª>«6ÜièªÉ1 xÓdbQî“BÄrýxÍ QâÌnÐ ·À†|_½~þ÷µî‡Ì 8p 1BWLm¾¤° E;ksÂή8§¾*#σâô>z÷ä¾È"¹ÆÙ èÜܾ|m‚ 2¹œX,l‹Í“+‚h}+Ó-©·_£óÜe“L.¾õtòØÝ(y…íZ ¸c œX*ÓÈLƒ Ë01˜U±¾ÒÍ@†Ábøº3’$O§¬ß­ù.ßãè:φn¸ð–Ë yJkž{ÃQÆ‘ÊÎK¥ÆRÐ_ÛÏÃåqW™CY¸ÃÔˆá¬nGE«%†|ÿoÂYñ¾wþ?@WÒÿ9–óØž¦²ÖÉÿ®×èx“`Õ¼DIß{ß±e‘EÜiôª´ö¹=ô»­ÄR|§e&Ë`Âý¿Âÿ$pý•#¡;-ÿ5àµò_g±ù2ak\4 ~5>ð7Œévû8ûýKôŒ}]½_ÇÕ2]®’ÿYY„úéíÃÝ[úÁÙ_ ìto³¶‚ƒþ†4 ǧ«™l£ÿï½ þó›Ø|Å€é‚Z~¼øÚÚèÙendstream endobj -681 0 obj +683 0 obj 2036 endobj -682 0 obj<>>>>>endobj -683 0 obj<>stream +684 0 obj<>>>>>endobj +685 0 obj<>stream x½WMoÛ8½çW |r‹F±ÇNÈ¡Ý6ØštÝ´DÙLDQ%©8þ÷û†”äXMŶ-RÙ"çãÍ›7“G)Mð7¥Å”Nç”é£Ë£OË£Ir~Nûv8vzšÌiv¾Àól–ÌÈJ*pŸ¦i2mß„Cá lá%ô?`èäjJiJË~çç Zæáý„–Ù¸qÒVBK*å“,ß,ŽN®fíé1ÕÂâ—–”#+¬,w„sURæ2Oøü„ާsD¶Ìǘ-ÞÚw¸çÜÖØœLEwןÿ"·s^jG¦ð¸­Å£$xÆGÒêYæ” |Ê6p—Á›Kˆ–¸ÔRTŽüFxRÁ ")Œmݦ§@nÛ²ìKÐ7Uåfëè♲RÉÊ“7”™ª’Yxt+ôJ. R\TÕ'¥°äå³'Ñø n©Lxeªwð-)¢Òa8î’Dñ*€ºqžVî‚w¶¦Å³Ò¦ªÑ+Žº ¦®ñ (¥g´·•mZ¿ó®™iÊ<Ʋ¯À]ĬD:л6^ÜAâÇÐfsËÈů¼¹âœEI?ÝÐqøÄñevWûûñý›£ü D^',œÓV•%Èëš’K9ˆ*¤®*'+‡ždŸ ²r”)¬Ñ}q¹Ü=G‚eQ:³7O¥©Ö€±4kÐÆ+a(T~àz#Ü&RD×MÀ Þ¥Õ`Æĺ¢“ó–)#ªœÈÛ¿Ô ž¤Õ.ü×€<% Ò£„À»4à(~?þ™¸À$3z¥ªÖY!TyÿfØVKTl%A$Ss8\‘ã™­ãYVbU¢¦ ‘±žû_…šÁk·#JB#¸AÛÀu ™'è5~ƒö€ã7V¢-MU¨ucCŒTçÔJ•(P Þ:Ï€êÇ¿±Ñ p:;MYº‚œMñÔiÖÉÕ¥V¨ÙÅ"´õ^£¦ÉY’&t‰ørÛ“àzÉ5 ãA˶Üf§{%cbÝ·ªâ7& ŸLùÔÒ_ä‘ý}Á S–fË¥îEé2¸ô*aX¨P¥ ž\Mè‚Háê,Ê!µZP^Ôâ’þ–®¢Ï¡u§Ì«üŽ._¤‚ÒÁ¹®²]3_ÒèZúŸon¿³ 7Å÷¯qÌáÍ£löU'¿5´»»ÊYþŠgÆ [h”¥Ê@ƒÎ†ièßGP ÍB5žD© úáxB7è Ö—.ÑV®@+kŒU¬h&umÍ|£«`ƒí±óåE/;¶F]¬Éð!j´ ²7¢]ŽPZûSÏe&—¯5¦FuìAô‹ÞÐ8äï€ÿÜsH À ÂSl®hV g0³â” ÚYËùΆ½VŒ­ÌºAøH"ŽdN¡û¶?Í_ªˆŒ•še¾½ÏÚôà>„i‡0;[ßl¤·ª‡øÐIøWbþ°A…Œ@ˉv(ò7¡Ð±p½Š|‹*BÐðX÷ÞÅÀ;ñ‘Lƒa°H1“Ö ´Ö~$r2à öÃQ×yÞgJÈ•Õö¦Ý°ÄwqÛ÷ºÂ¬çä±òG£ KL'ü4<¼¡ó€L`¡¹«Ô3‰ ³«K-“Qf"¦öÕ ã ÈÂЊ£cŠÃnmy‘ò<£˜/<=Ø'¬àì ™‹[ĻUÑéÙ¬_ý~¥¢Óé$ˆÐ¡ŠNú»Wd'†”ìvC§ÐÖ^†r£QNèßêiÐÒ¸:0:%åýîÖÑ} ¯è(öÔǵ5M Áq¿@¼ôó•[}÷´ÝwIo!(-s$*‹¤ÑÛ†íºÑíz:Efg‚︰®2câ"cãÉì-æhƒî¬áâ ¬s d¸8ÒvÈšóÞ²U îå®—ÃîùübùŽ<Ço¼§¯Öýûh²q)Æå8?^Lñ«O>þ¯kÅl1ÃÄ&Ò9ÛE[þyôøfhendstream endobj -684 0 obj +686 0 obj 1525 endobj -685 0 obj<>>>/Annots 32 0 R>>endobj -686 0 obj<>stream +687 0 obj<>>>/Annots 34 0 R>>endobj +688 0 obj<>stream xVïoÛ6ýî¿âÐ|ñ€Z²äŸí–I“t»›C7 ´DÛl%Ñi;þï÷Ž”,ÇHV` àXy¼{÷Þ;~oEÔÅoD£˜zCJòÖõ¼u;ouƒñ˜šr…‡.ûAŸú㾇ø(%-±´KñÉ›¨‡}þbá-8~ Px×§(¢ù’ŽG4OÝ‚.Í“ö´ »–t?£ÏªHõÞÐdN©Î…*(Ñ…-u–É’¶F+rKg²Üá?÷¢+üiJ‚r‘¬U!I$‰Þ––ºäÅ?Í¿¶ºÔ‰zAŒSÛ3‘/ ~Þ%UnЍþGÕû:w~݉‡À&òѾ&ísÿ¨Ší#™ƒ±2'ù(“­•o«Ýƒ*z›L¾Øcö)uJútóîŸÉÕý-u¾ÒÍôþêÃÄ=>“@JÛϤӉǨé˜Ðƒ‘¤—(YÊuêÄV%Â*¤šjiÐ¥ï[….â jZH|ÆŠ"eJ…z<àgôC—)¾X}†*ªR«Q¶*&‰‹~ ²‡H¼oÒ‘)-®™¥Ìµ•ÇÞß¼ ˆæ\DÝÈDØ~vâ"ÓÉ7Aþ›RîP$ez¥ œt Ò\¢cç ­’La[”Š•!³Mք쌴–Ù…õªØ‰ U˜µÌ2.¹âPxÉ8 Ÿ°)”6 }O}ãjª´ '•‡€ÿë¤U+"bYüñ¾Õï ƒ74ŽÐœú£XåŸ2š± »xäþž*å fV–Ú¹s½óÀsên £Qkˆ;f˜Ÿ‚È“>—ù¨xîpiE_¦#l£[—*ÄÛFÈ”ÙÔBƒA€¼{œ¶{hÒ ž$=…TwJî]¦àŽáà”¬Å5ùÕoÓÏó)„Ñ'ÌÚ iÐïïFqmF+¼{Cd¹„¯ ¢®Shc0q0z½ÓÅR­¶ ½Ç}G¿O8Éñè>>>>>endobj -689 0 obj<>stream +690 0 obj<>>>>>endobj +691 0 obj<>stream x•Tßo›0~Ï_qêöÐIÃByLÛU{é-H}©49Æ$nÁN±IÖÿ~w’(ê4 $ØwßÝ÷Ýç·Qc¼#˜Å0IAÔ£«|ô-Y–ÁñѬñc ÓyÆH²¾O&,…FBI¸ˆiÜÞÎ!Š /1{šÍ /ºõ1äâ2fS6a1ƒ»%<)]˜½…ûî¸Ø(-a!„iµ³_ò—Qx›ÒqŠèyq™o¤•À¼‘o­jdFWï°ßH K^¯8( ­Åÿ܇ÂÔ\ia´kLUɆü”¥lÀp郂ǛëàûÃSþ¥i} A„…fm®Ž«Ê2_ÙæÔ_A<õ…A}"ð†•ÒaÉ+,9( ,ä.ÔmUÁEíûý¥y-/žŸ?ˆH;!“m¹µ{Ìõ?1¶^ a‚ú  :•QÓlŽx^Óu$íDºIÀé4=0epm´¨Z«Œþ@)üÒK±mÌN’„(+ù[­* µäÚùf‹<9Ó2ÖÑŠCxÐyKÇuðÊàX £;T,€{v+…âpáŸÔÖR¨7”eÝpMéE#);©{ýX±Ó¬ç½ÊÃâÄÀýCÐ׎ÙÝÞ4¯P™5ÂÑ.%¤ýÚõ¡ôšðôzb_ô…˜ø‚• …ûœg€Ø>ÎZ}R°j(mä¦}í:ð3nJÀ´òÔ:>d¿QbCLTF 3~°ÏÐNüÔuœø }Û h{x+zÇ3ŒÉmŽZ>Çé¬_IËÁ4öӺЧ%¡›'ìw˜à>>>>>endobj -692 0 obj<>stream +693 0 obj<>>>>>endobj +694 0 obj<>stream xW[oÛ6~ϯ8@6ÌùçÒ{h»õi:Ä{ Ñmq•H—¤â¸¿~ß!EKV4,› (5ÅsûÎw¿Íi†sº]ÐÕ åõÙ‡ÕÙ¯«³YvwGÝËnñcF7 ¼–w·xÏ—ó솬¤ öÎh±¼ÊéÓõ"[ÆOP†¯°p|AÓôÓ[ZÌhµá›Û;Zá;VòÉÇRì¼´t•ÑG£7jÛX¥·ôåýgÚK…rÞªuãeAx¿Yýu6£ËÅ:&¹ÔÞŠª:ÕB‹-¶ˆÆ—XU¹ðÊhÞͶçØÎ¶/¯æð’WÙ<£{Q¯ ]°±¸uIóy»uqËß“nê5Ü3úC«grçeíèa"·ïè¾Ñto*a•{xsAÂÑ^Vÿ…DÏx>ÜÿBQ+xɦ~Sºy¾ möÔxU©ï’·¶aÍRXýR5Û­XW’ÞŸÄCôÙM%Ù<|~xÍ9”øyC;kžT! ˆ p¸ °`¬úp žXéLcó¡íÜTS‘“öIåÒeôÅ*$BLŠ?MÎø2*ðS!såx û'4ü@^5 >!FCA<ÂG;áÜÞØbw!¼X H?Lb>ÀºÉTú|¤‚ÌôSÊÔ ÐÞ4Uþ}køÉn,‚?p±çˆ ¤b„°ck2éKáØ!ìô‡g÷M^"Þ¼4@§µ¬ô“©å‰ÕS³À±äѬpï(y‚¬ÌVµœ=†w1ܱ¢ðbüÛ¿Ð5 ˜fíÒâÌÌCÙ…( @@ -1241,11 +1248,11 @@ x â|µŽ3ŽPV“i<"ÏåÎæPÜ™ST{¡ïDý¸Ûë̵{ŽôIcR½åSaŽƒç:ÖÉùàåå<›¥`prrýœw8›Û%%´ŽöÏîO©ÅU ~syPïiÛB{ÊPzhCààZ^#®Mðè¥ðy87’%J-öÄv<5»—ÜC-õü®…ª^J¾Æå6_ä@mœ¥uq=€ ®ç¹i´oÍØœò8–ÃðyUËó'rãA÷èÒÃÚ½|¦g,Uã’ç C_v ¬ myzéðùñ<†ÇÌæE[)æ8²èíáç«`éL~…óÔ»Óø’Kä¦bиQyfïÂ@€sØÊ]%òÐJê8Çd(ÃÓˆ>=Aäbl§¥óª)ä;vx¬ éZé)Š|ЧéLz_ýJpƒx˜ÏÌM!ǵJÕʧM¡÷RÌB:ß=2Gƒ$/XáÝéްÎÔ˜–~F‚/[œg}oXs…ñ74ôàäHD]é¶Yc¼ùÚÅZ>>>/Annots 35 0 R>>endobj -695 0 obj<>stream +696 0 obj<>>>/Annots 37 0 R>>endobj +697 0 obj<>stream xÕXÛnÛF}÷W PQ‹”]ì}pàºPi­¾hWäRÜ„ä2»¤dõë{f—)*6ŒZeqw®gfÎèËÅ”&øÒjFo–åïÖ?®/&ÁÕu/f‹&4›¿ f4¿Záýj\‘‘”àì„Þ\-ñúµ'‹é"Xž=\ƒêã T„w°dJë-¯V´ŽÝó ­£Q)ò?l¾)…µÕ¯×Ÿ.»yszDûTE)ÕVZªRI"ߢXTb#¬lGº¨„*ü‘{muRÑýíœd™CYɘXÁ^›˜5LhÈÞû ÒáL> @@ -1256,21 +1263,21 @@ K ‚×Å–àœ[9÷”GrûÖ7X&öàj8ÚH‚(ˬ!ÍWαNµ0†‰€3Þ­¦©Ø1Ýh95œ(QÃpMÄ;ܱnw…*p®B æFè‰Ýw7Q¥ é¶ÝÎXoxwÕ,µÓå {ñòzê÷¯‡›ûw7ôÁèOXåè¶¿ ò½±?>^Íð…K>>>/Annots 40 0 R>>endobj -698 0 obj<>stream +699 0 obj<>>>/Annots 42 0 R>>endobj +700 0 obj<>stream xUÁnã6¼û+Þ­°b$Ù–=8ÍîžRlk{É…–(‹[ŠtI*^ÿý)9¼Z1DÓä̼7óôï,£­sZTu³ÇrvÿiIYFeƒb³¦²¦”¥iJe5ß û*+A/óíÓî厤&g¨á–¸#²¢î+/&ÓÐIÖ‚¸œ´ð'cÿ!ÞûVh/+ã-oY±»òÛìc9ë‚å´Ü¬ñœãß jJ”-GJËœáqBjÁŒ¾lŸé£yèípàÖíY…/¯ -”…¿?ϲ"ÙWv”=¤l1®í~*F¶ºA.[ŠÒ‡äcT5A¥Š+%jѧ·w”gAà€°¦kì){˜ì¢-‘÷•¼=Ð…ü-+³g:òåsÞÊØH\¯ˆO¸bΈ ‚£”9I}bk:B«ÈèDI-¨ꈟX|)ãEÉd T¯¬çWí»¯Ûò·ˆEI^ÄrÍ¿¢ë´ãÝž£©y@= ä Í÷Jĺþx4ÖÃ^’  wÿ ÝŠnœS’œ¤oH WŸÎ_î>DnPmy'¼°°ŸR€¼5j$t¡{jäY‚"müH͵¦W5ÅâÁL¿ ©Uezí Ý­É ç‚³;®ùAtð1ÕÒ ÷U8‹X‹†÷ÊÓ^´üU{ƒ ÝPÛ»Aj(g¥’ãÅw› £Õ9ÂâɃ6(×øj¤„Ã?bô§ñ(iË}€F¦òu(øj±ÂgG‹,eëq5Ú;Å2$`§¡S\ø™À]lOà|bØ=8¥â…иS$஫EÀ®±[lÞ8ÆÝÉ»›A¸ž}7™·J`­Êž¶p#¨vô;Åd#ˡѡ]c%“àÍîaÖt¦î•€•¹º87£ ¹×qFinËÖ‰ªåZºÃQÔ˜c8Ò¡–7îÙ=?Ò›Ž‹0rHIzMÛÓàÂ_Çô¬.éyw* ÚŒMÃL % S¼;€7ã=Y±fá}×Ádï¶Ï[úbÍ7$‚žLÕ‡„Ä9nǼ§’áØüÿ ìåzÉ6xa¾äÙÈñ¯ÙÊçFendstream endobj -699 0 obj +701 0 obj 822 endobj -700 0 obj<>>>/Annots 47 0 R>>endobj -701 0 obj<>stream +702 0 obj<>>>/Annots 49 0 R>>endobj +703 0 obj<>stream x¥WÛnÛF}÷W Ї*€D‹º;@ ØIÕä!(Z«ŠªKr%nBrU.)Eß3C.))M‹ à˜ÜÙ¹ž93üë.¤1þ…´œÐtAq~÷´¹ûqs7V+ê•{<Œi2›3š­–øûa…?KM;¾C¨é~Aü~ý@“1mvоX®h“È9Þăש:Tº¤Y@o­«L±'EïM\Zgw½1®*MTW:¡µÉô‹ÍÇ»1&3(<Ÿ]¥sªJ­Éô¬òH±Û !ÁöFÓ0˜°ð,zW@]WÆ®‘œQ¶’“%ËmRý…Uj-m¶¤7;·}A‡ÒM¢¼Íµ*Ù‘ÓU* ¢‚šÌîM¬2:}âóÀ…"¡Ä”:®li´¸7Ãiãf•ªŠj§KÇêÒÒ"B(SqUC×!=;QšÙ–k†€Ó¨€³uòÁw¨ÐÕÉ–ŸxE*ËìÉÑ!¤fŸê²Í¥·¬ŽÊd*2™©ÎCr¹µPQ’ƒ›j¯I> LS E*SEÌÓUÐzs ˜&rñTdkqç†pnm•e«*’¡òëOŒšÏçHCN³E¶=ß]<æ¨WÌ/¯ 'Ê¡XHF{¨õ¨Jl\纨ÄIICW. jó3YÜ ãÈßätdÊ û©=!*üçbµÃ£¢ß ó™(Wqj @@ -1280,19 +1287,19 @@ P ¡ÆèšO¤ïœKØæÆ2va]2›hv,v™ÉM³‚JðÑõœ“ª#,þ® u´&Ÿ%H°GÏ °gå‘ÁD–,áÒ½pE ó¦%›U nd~Ú²Í7~ùoOjâ7[ÎÀMø¨J“ ¿ÀÖñËÝßgc!uendstream endobj -702 0 obj +704 0 obj 1534 endobj -703 0 obj<>>>>>endobj -704 0 obj<>stream +705 0 obj<>>>>>endobj +706 0 obj<>stream xuTËnÛ0¼û+æVˆUKvý8&MskÑ¢.zñ…&鈉Eª$eAß¡$'¨‘Z0 ˆ\ÎÎcùg’cÎ'ǺÀbYMîw“Kä9vG®¬6kìæÙ|>ÇNN§S‡ #š±Ô]up'#q2ö% :ÔÎØ˜^Ò2¬Ž­ó/¥ð: s Zaã-„UQøˆŸ¢:ˆìf÷<™cV¬²%1§¿‚öÎâáf¢e1äÉh¤°°®ÅÁ»6膛½&+n&ûôgí!"öü…„³ß«cÈp'¥ÁØ' èù"+z"#à|¿xÀ~Ú–F–u­Ï PÆk7ä4RÚÛßQ¼ðsÓ36R³qð®öFDj7h2´|ÕÁ¨[/Ë—Ý„`U,¨Ír³æ{Á?%9Žm‘S´äاÍ6[ýãÙ2Ëùà›‹:$Œ7iù¬HO«¨å«ÂVk•>h‚K`ލ½>ת\cÓ‚uvFM60•Pš[Ó7xSÇ+rg#5èLt‚(1Ò¥Vt©š°Ìwªá‘ÔŽG§ÄT”†ñ¢Ç Ÿaà%ÇÜÎÖÙ'÷Åj=®_r–_sö¹ñž©J•Úë˜ jôFFÓ;ÃôT¡'ì§`ÀŠŠþ†Ò5'DÒéäZí¥úÝn8=jú¿V.­>2oAËÆ›Ø¡n|í‚·Õ1n ØcË & }ýûÃeÆÎJqÖp­¥Î¥©YiÕ•µö•á8K:œé†–|¥Jód™S5F9Í]WæØ‹u=úf˜¼Ëdtï qáúªÅ˜íåvËD¿—mZÙßFùj¥›*Iùv#ý¼ûz‡ïÞ=sñàdSÑM‘¬K\gCÕl(›^ÏÂr½dzsŠEÚÏn~Lþ©pendstream endobj -705 0 obj +707 0 obj 687 endobj -706 0 obj<>>>/Annots 50 0 R>>endobj -707 0 obj<>stream +708 0 obj<>>>/Annots 52 0 R>>endobj +709 0 obj<>stream x•XMoÛF½ûW rb›–dYŠ{s ; P$iì´=ø²"Wæ6ä.³$­êß÷Í,—¢hEaÀEr>ß{3«'sšáoNë]¬(«NÞ?œœß]ÑbF[ÜY­ßÑCN³t6Ã7YrS¨ºÕž.Súöéã_ôEûÊ4q–Þ›¶!esúÓØÜíúôðöáï“-–°‘\g™nºq¶õ®¤ßLÓ6ü»›ã vwv1Oüðe:Oé£wÆ>‰Ñ¬Pö‰/Äm=¸m¨køë¶ÐpHÔè¬ó¦Ý÷®ç«”Hr£J÷Ôû[Ò|Þû[¬ùî'½#cÅÆ½ª6Šé,]’×¥V&ÓÈ-µ1%,ÓÖù!Gö™•F[äÞ:Ä¢ùQãɪÖ<ë!|h[Ä) ÏùEÈ3ÄE÷¿NÏÈXÒ­\n¶{qÛÙ\ûrÿZîi,ð Ñr®eÿªÅ?ÆÇLy½íJ²÷e®ª½Cç4‰X5r[¹–"®i)Ô|g-Çàì)GëÛçÑ´¦,Émônñ‰Û±5¥¦C§`¡Ô\I„§z»¤òÊX Á«UÍ”åBIZ·'Œ:ÍùÓ×'‹õ,]ÓòêºZÑâjÎû«’î»3\^I˘ýh{o¡« Qµqh™ë­êÊ–žUÙé˜>ÕÊ«J3Ð9O„2vUÑÅâ"½9_ãîêj2†uœ‰¢ó»E˜Ó4l²¨SVRÓÕµó­|0#¥3Ì ª¡Ö–„+:§-Z̯ßâ‚ø³àl€ßV•ìÇo%­ï¦OR¼VÊšº+u°sèv#¬é¼E¸·ÙÇJšKËõ%zµ|·NgL9޶Q¢$,—,‡n^¦‹”~u;†±ÐE`v°ÀÕýqr,FÂø;”0fú.á8P9á¥>Ãeöv¦-#Þ<-’uLïM×¶œ,üXhcÈÍ× ¼g‰èÆ ¶ÕSªäž…¡„^xõÛ§à­-Rú³@ó”•¶Õ®nκú”ƒC4ì‘ï…„V}C“/Þ¡è­ÑmKš„pD µCÔ·hpÅ#JÑKÆÆ³HQWËcÖùJ•=‘GH–Å”XµN¹¡RcåùÙ±$ É*²ÐµVm  .ˆ5§1ÒÁÖÕŒ&ÿp™dx?Rôó»¦)ÝH]¤,ˆ\¬ƒÚ{ׂëF3Å=þ‡ž5§SÓ_cä'É‹GéºË +ø‹YO&!ÞYí›ÂÔ“‡_–üE?â&ÂNËQž@£X{ U¯êIÓ5xô£Ó  G5Àˆâ[”ˆÅ¿ÐeŽÎ…Ñ`&qœ£n¨ºÖÊ“ ÃÎð9¼ÎdÒ\uû”a¬",v…É @@ -1302,11 +1309,11 @@ x zö:|ñâ…]àµtß ð 1p6¦=’™6²é²d»Ìá]áÈíl¨ô$ÓJ󹕀 îh?)ÅÈÌGmúE»ZE¿÷ƒóè¦7÷·_ÿ¸ýúø(PzL~cub;o'±^‚LcP›qˆ'ÁÐ4_F ãQ·ï?~¾˃½D;Ÿµr3˜ãx~bLB•\£šË¶&_£hüÖˆÊC ¹³²¹M#?Êú'>sÝdÞÔa¥myFÉWì¨ü™sì+Fp¼ÅðËû­zÓ‡ÛckXŠú>…­^5ÍÎùœr5ÇæýøöHåcÑbÝ”B8¹ŸÐà¤#ìyèC Tà€AâŽ÷½Ãn–¼ÜÁÆ,†Y¬«ÌÆC\³’×÷ª8Þ$ p.èTè×1ÛQSßÜ3{gõ¤É4=æJ-ZIÔwMŸ_gx *c†u)ˆ‘Y†ÅRÚ-ä:ˆJHVxäõ.·ô˜Èæ„bÃKftnšºTXSâô`àÓI©p.hõŒà‹…Kôr¸®ÅŸ&8…쀣ê 2Z\V9ÔÉÖ"”…ÏáÀÉF²S'Ã|ÅPåE,lÂØЧ“¤Õ³2¥ÚðÆÈ“£8ôgXè¼s²ëqƹ§tc¯<¡ H¡öX—€OÜ2P±YVu8çñ©¹?ãç0 -6“ígQ`t_^Ìò¡¼ý¶âö+s6iS`y~÷®ˆAKW|b½ù_¿'ÐÏ~CX®yªáŠ>>>>>endobj -710 0 obj<>stream +711 0 obj<>>>>>endobj +712 0 obj<>stream x•XÁrÛ6½û+vx3£Ð’lËN/Û±;î$N«I¾@$h¡& €,«_ß·)‘T’™Nf2²»oß¾}ð?GSšàß”Îgt2§´<ºZßžÒtJ‹+ó‹sZd4I&“ -Òx±’F’²$*º_PºÒ›ŠR]–¢ÊÈ­„£* ÚhóŒOnE¢\ ÂöŒDQè Z[iÂâeVªJYg„Ó†j£^T!Ÿä›ÅßGz;=If¸ý7ƽ×éš †pà&‡ò6l{>Ã_²øÿ½OÏOñöô_œñix·þqô©B6¦endstream endobj -711 0 obj +713 0 obj 1783 endobj -712 0 obj<>>>>>endobj -713 0 obj<>stream +714 0 obj<>>>>>endobj +715 0 obj<>stream x•WÁrÛ6½û+vtRfÙRlÉéÍ©›i&Ý6ê´_ ”“¦õ÷}»€$ r:ÓñØÖˆÀâí¾·ËïgSºÄÏ”3z7§¬:û°<»øxEÓ)- <™ß,h™Óåäòò’–Ùx¹ÑäufëÿZ²åÆé¬µnKv•ñÞØÚÓFyª-9­Jª´ªM½&25µØÿ×ý§Ž÷Ö•9)ÄtºqÚëºõo–ßÎ.éíôÝdcÞÇ_]|¼ŽØÆ42õF;Óê|í`¢·Õ"ø– SjÊ ;¨7íxÈøA½í%žD³ùäŠA|UÕJ‘ßÖ@ãמÓñz·Q‡%(¬£û%­¶„´ÚÎI PUó×·?ÿöZ1’´+›k,ã¨Ö}HaŸBH– ‹<üF9M!°¢Í³–~YžAšÏÞ!‘«›>Ïð‹µE ü=M‘!~}ó~2?¢üzr=¡/67Å–Y”*"µWy?æüÍX>ãd73ýêvB¨7Uªøc¶QõšeäÆ7¥Ú&uŽªÊ*í:©ßʾœ‹°(+Mö´ `î•ôðù÷˜V]ÛÚzB¿Ú^?kwÎÇ£Z\]*MeZÕŠÌ#5×üèа´Âž—Ú"®Jo`¦nµSYˆ"b” }‹Ú(—G^r¢Jù'ÖNŽOMÉ ÷î¾¢Jmë ‹¡ÆÁ0øT`InÕ“®¡X^e¶«ÛTåŸ @@ -1334,20 +1341,20 @@ Sj N"“:G–¿]Ìð&›ÿïkÍÕâ ÇÈÖÙœãð?Îþ²ãÓcendstream endobj -714 0 obj +716 0 obj 1613 endobj -715 0 obj<>>>/Annots 63 0 R>>endobj -716 0 obj<>stream +717 0 obj<>>>/Annots 65 0 R>>endobj +718 0 obj<>stream x¥XMÛ6½ï¯ä²°«•ü½zHФŠ4mãc.\™^3+‰Ž$¯×ùõ}3¤$Jv¢E€$’Èá|¼yóèoW Åø“ÐbL“9¥ùÕÛÕÕÝû1% ­6ø2_.hµ¦8Šã˜VéhcËTÓÚ”:­my¤J§ûÒÔGÊíZ¿^}Åæi»ùv<¦Ø>úT`“¢}¥KJ3“>UäÖÎüÚÑ«O¿½êoQmIívÙ‘ê­&Úé27UelQÑg•?(ÊÕ®’oæY½¦àÍl0¦ÛdÙ >þî±´ûÝÝÁ–Ùš¨¼;ܽP]š]¦J}CªX³É‚&Ë(ÝêôIŽH·ªxÔëÞ!È‚¢Áfõ¨LQÕ²öÁÔ[#S°ïVWœ>É!%ü¿¿~½Jæði>aÏrZŽÛ‡Œ>s øÉT¼îRÏYðö‚ 9%ñ2š{[Íöþyå#u5õ'­•TÕ“d®5"î‹‘¦¶#Ú©RåºÖeDoŠ#IÌõVÕD]jdÎåK^)¼(l-9A]®“k¤©2Ug†xQ¦75}+N¶…S™-€Ù£]¾4Dâ,µ`{WUº¨Ê²ã }×¥uÎùݼ¸KƨïºÃ﫞ð¢Ó‰V5 *Ôœ‹k7MÐÚÑ8ãóÔˆÙ½éÒ¯ìfjë½nÀéæÈÑJB9'õÖVüwwJgç9jp1^Σ{šÍ¦Q XM¯Ä?5ÀÀã¬×Ð6miô˽ijé¸^mðÀ!£vìG…ÂÓ³Êö€}EòŠƒÎÃqþ|~r~‹)i„0çûþ¥’wW IYká"*Ù×]iŸc¥[g¼ETjóªÍƒÉ˜»¦ÞzNG1(‹[±ChË;>Û´Q©ß‡ðÁ4¥]ïS½ŽhÎáú6TwRd¤ÙyQ[Ð!¨&[À sËË}¿[8¾x±Xø9ó³j>‹!”©ü랺ÊÇL3!™ÿ®_j·0cÓ¦uCgÕõ˜N"¨.ÄAx~NSÁcß›¶Š§8@(dè+¹ÉÓô«0@ÓåRà.ÃÆ=´1O—÷½ˆ›)ÕòE܆ð@n§Ü–Ú²ÔÕÎòÜðLã[å<Í ÏI,gH<ƒÍ í\Æ>ëgI¦²g¥ŽƒZêþܦ0Ñ 2È‚Qê€lŠGøë@€×–¬¶Ì–ÙA[þ@„×¶¸n`ëÚrŠ ¶dÂB g䞺Æ÷øÂöÿQsV0JÃ3áÁâ>š„Ïr<‹ÁWÔ€Ü7ôßÕˆfó©³t’@cHhžë¨Ol§ÌÖ›”ÌymHlÂîîÿ±f™x Kè ˆ°´q'íÓg;&»8öÅÊ ¢þ-yt³›á8gmçÞ5úÖËÙÄ ?„ÛÚv–1X’™à#Ç–’úÛQ8‘¢dîýbË5”’Ï[£Šß‹~ì´´Sµ"<Á½@I.'ȸµxƒÅâ—gîZWiiX<Øgh"1%ü¬_R½«!I¸;ôA±Úh†©8+êÏd‘e®VkÖ?ƒd¶É—ií>¶¬ã”Í`‡ë„6W[{\• ,öÏ9û—í «rU­ƒPÎd¦K-=Q¢ÚgDË}Ì:}íÄo)iÏ$C´¨[Ûæ4TÏîÞ2´6Hpçÿ™ûZ é/û?ðìT  9tàbƒ¢Lv"ÑZ"xÓ©–Z£C_¯ùM;~ðWŒ+/Št!î»yîÑ•»ô(¨µun "S¸SŠ7Ìd2]gW[ðS“UC‚¨j¾oŠzä¾å«*Kë–Y)¢8'r«0 \ãòh÷¾ÏNíw|‰awÀØ-çVþÔÍžo¾–um&—.GîžNN¼@€pΔ¢UÁNÅzP‘ÑFËW—ÕUq]{E§p{DçÔ&Ýgªôw*()‘B"nø—MNÃÆ²Æfw:ü³oÈÎÝ·)™$¸焉º—‡FSœ™Ùø Äÿâ‘LÆØê*ˆÍ—ÑìËké°Ë³Zh¸)ŒËrµÓ©Ù˜”Yœ~â$u}‚QÑÀ°c+¾}þ,*€Ôs´†…ƒUMÞÃi~`òÜæ^oüîýÒ§)™/pµ›ßO¨Ñç7ß¾¡?JûÁÑ/6Ý縀˴b—p™çÅ·‹1~AZfÑ,¢râJ²Ð/ÝÑÌ+Þ>]L¡ÿdëxÁ/Pß?¯þÑ)œKendstream endobj -717 0 obj +719 0 obj 1658 endobj -718 0 obj<>>>>>endobj -719 0 obj<>stream +720 0 obj<>>>>>endobj +721 0 obj<>stream x­•MSÛ0†ïù;œÂ qãHÚôc¦Óii3í‹"+X`K©$“É¿ï»ò®n.1’vß}ö]é÷$¥9þRZ-èü’d5¹Î&o>-)M)Ûbår½¢,§y2ŸÏ)“Ó+O¹òÒéÊÏHºÕFÐ"™'K …¢p¢RA9OïN³G[ôÁf‹KìÊò©tJE•ðO¼gNýÊÖ:©¨[·¹­çÚ)¬;¼~x°¥=?,¨Ï´WNQíUŽ*|P"'»Wk/kÏ{ ìNXËÇlt±\& Z®Wøâ ±¶ »·”¢Ffw‘2”!½‹d•Ðg:Bm íu(bR„É…Ë[ž[]*!€s P(v·Óæ¡úÒÙ‚»3mz€=ž¼­TWȇ›ÛAŒžî§¾– O'hANdMy8¹?ƒ`£»oŸÑN¹J{…žƒ b= e…öm?Òs”Ô•؃Æ€†hÝ$­Ù–Z|…½R¦áÚ¥¨Å«@ÏZ4å+Y;D¹¥} Ð8vh”ClqãˆX ,¡öDç¼£h/øˆöQ°/ìžêáSw•R@ÆRd9 )•÷D°gÌf÷F9Ò ,KêbôX#U0Éåù虾ôÅCÕHèÎ Y¨ ¥lõ¶l 5Šð44PáCf¬Ü,µ>>>/Annots 70 0 R>>endobj -722 0 obj<>stream +723 0 obj<>>>/Annots 72 0 R>>endobj +724 0 obj<>stream x•WËvÚHÝû+j‘9Ç$0†ìœ‡g2c;N '‹qÔ@g$µ¢–ÀÎ×Ï­~ð2™™ÛÇ GwÕ­[÷V?‹©Ÿ˜.Œ(-Î^ÏÎz×Jú4[àÎèrL³ŒúQ¿+içÍJT¬iÑ}­ÊF•Kš¶U¥ë†TISQÌ%Q=¾œ}³+ÅC·RwG Öꌢ8¢÷eSë¬M¥K÷äâØ?™\òs¯åR•%o°QÍŠš•´ ÷©–¹FžûÝŒÛÞ}¤ZKú¢ÊLo Ýͨ q2]‰R™Â*ª\²ldÆ»÷©\tk%ˆn§ÝO÷oè¡£"Ùe§÷>ÜL§TŠBfT©J>¼Œȵҭ¡µ¬ R1¤äãÒeþD>8¼s#Ê[Qn£9Ú6yn"1E-ë̲È2Å ‰œmiñ¹jž°^« ÏŸ\ârƒ}˜~[”$ÍÛLšW¼2 Ü K‡š-tMªÌµÈj ê›Õ@±&Z¨\jôÐÉEo2îÝÍz 3"Í@4ÔVº¤L¢Ì"â½zש¯g÷2ƒHHç!]ú›¡Ø|o ýç*DÀ¨ S`*{•eŽ…ˆô‹ú!ê %»ºÿòð’–}ú}aâtNF6Ü»ÙÚ²šbþôé·³ËatA–è?Žþ[NSî  w-IvíðЩå» [»ÃUë%uVMS½êõ@8¦¡‰ŒnëTö¥ŒJÎ.û‰ßbr€1ôgHžª.Ãà›ÂÓÚFÂÅ&Ë:p4]‘04mDݼÕé=G*ëszW¶ÅznÏ9É&"pþ¡3•¨ÖõXÆÃ ø:PL@7šD±ÿ¶ƒn8æRï+Éíôí¨—¶Ü†hZH4ÿba²2*TZk£M”ê¢wû@bbº–h|,Ü؃á€8 ’ŸuâÕý{ðçøÜŸ?˜D#¦ù~k1IÓTCo4+^N7Ê _@Ó77؆‘-8¤çßdŠ{'¶þ_íÃT×kBh~† ,þ½•­$ô§ªÚÜ(jÝ.²¶F²tA líYn2ш9tÖX,M…z¦–ßôœ>ü¿¶›ŒÑPÝ€Ül%Q°¨8—²$£ .äѤº\´,±$æºmh³[ šÈB*¤€öB}p]¢Ä@³¦RÓð‹ðŒï­ª­äs:–5;å (9Õ³z7ÅUilHy[/ë+m¬Õé:sà¶‹p[-j]le*H$çŠæíòhgù>`ƒïì# …ž,D¶ïd‡’R@‚iíÌ×Èš•»Ò¥ãÔ×ð‹c—óòÎ á7}þˆqÆhâw¡£Š-¾ºLaJK¡ÊómŽÇn‚FL(,}”n®!9‰¶œòø2f‡ÈãeT’]? éFZp^§M{‘rü® ά̸&ù¸RsõÜÚa”a,˜<îêrÅ X)f;UdÄgùDNˆµåmŒW#"mœ|‡8Ë VÈ?[É'`wÛ¨\ý@&P=#‚÷oo¥áÅ 6xXå¹Þ0L·Súó5ÖiTš#Ô!€¨h\Û++™W¤ô¤[»W&Qz¼e‘ ©ïûö+/6#ïÕú]oÔQÕö|Ö¸Åî4}FEˆç8Y ;–0‡÷7áEœÓÂ8¼a<ˆ0[ÚoÞvægæ×»ÓAì(´s\ï§¾éŽÌÀ_íý=ïyŒLïc<žôâ^ÿ"ºšÞïbòî ÿ)¹H àìTøŒ?Tkæá0Å&ñøÈÇFvYÝjÙÖVYy“Þõ…Ç4ž$ȹ›LØþ²ü}ñ•Ö&"÷EÖ/¾ž C ‡´V<^".;‘ì€J(¾¸<êähê$¢–pNØ.OÐT0 °bvºñvXè3¾ÂCÅßPf«pÏ»Û7ç Û¬ :‘ÖR°ºv^h=ÖjÖUÿš]߆rË$tj¸ï”Í0X{»Èш®©·Ø.'¥~Z6Od];š gÌ·Œl{ôð3·6 b)ÆÉ£5 æ–+…ãêkÏF…ß™åôù ªÃ²4?–^«©ÖÇ*¬îÊ {‡ÖãiSÉT-ÜA",j2¬®~3wJ:U¶ªþX÷ña¡lWLØïQ~)+—rЀ ¬;èçóлL.(˜Ë¡bÉj!Kx#ªûœ¬No­Ü•⦷7ŠÑq¶Í¼œ¸³kÍÂk†kT¯k½ë±/°÷ß_;Bq.ñç§dÂÐ Øgÿ<­ÉÆendstream endobj -723 0 obj +725 0 obj 1754 endobj -724 0 obj<>>>/Annots 82 0 R>>endobj -725 0 obj<>stream +726 0 obj<>>>/Annots 84 0 R>>endobj +727 0 obj<>stream xXÛŽÛF}Ÿ¯¨##Hê#ÀÚÎÎÂv6™Y,™<´È–D›d+Ýä(úû=UݼH#g7<ÓÓ·ªS§ªN󛈦ø?¢eLÉ‚ÒòæÃÓÍߟn¦“ÕŠúìƒ)%Ód² Ùj‰ß£Õl²"«iË[0‹sº°þþaFQDO[Ši±šÓS&óSzJGO{í4”U¥®µuw”WiÑdyµ£·O_oîâ°wt°y…%”Ùü?¶y¡ýŠöôQÎ)سÑ|L¦V§¹ªuFªÊÈíMSdT™š°‚/[«#6ý×Ü$ëédM‹%\§’fÉr² £‚ÙQ8³Œ09t§q¸$¯¨ÒGüpµ* Uç¦r¢c©40+¯¶Æ–òw2ÕûÜQºWÕNßLÓZhõ~Ö+´€;‡vÀªÅª³1XÕ#/ŽþÖ‘K[?ç;ëp:e#Š~»ü†í#2[ž'+¾l%“>Äì̤M©«zò FÙñ“óx2ÚÌæ` x¼ñÔ¹6ÓB0¿Š”¹YÔýLŒÓ[âÝ?¬)š1Ípcv h¶˜Ä“hB­†ÇàÄoB¦7¿³Ù==§4Ž—ìÛ§ŠŒÍ<ø®9Œ­%Í¡0J¸i¶tÁG!$øË,Wclñojªm¾k`¤’.S³߳Π··Ø"+d ÷ôð›ÀlÎpfæiö¨Êºu`£R…#gH,åó ë‘)'ÊKö@U5=û,zÃSÌ*§íKžJ ®oNDÿΫÌ}yòÞÊzd)“ò`ÍKžáˆ€8ý @@ -1383,11 +1390,11 @@ t ].Z,‘ ´y{>¾ÿüá=ýÓš¯‹~ Ÿ0äSˆ„Ù//cþ†0ú«O³%ù’eÉ”÷" ~¹ù/)¹¦endstream endobj -726 0 obj +728 0 obj 2102 endobj -727 0 obj<>>>/Annots 85 0 R>>endobj -728 0 obj<>stream +729 0 obj<>>>/Annots 87 0 R>>endobj +730 0 obj<>stream xWmoâFþž_1E•Ž“ó 퇊¼õÂ÷R5UµØ ìÅör^;U|ŸÙµ 8½HmPx±wwfžyæ™ñד5ñjQ¿MùÑÉåüäf~ÒôÚ¿%+ühR¯ÓÆ{wÐçï=¼%’–¼7qLù†åÛ&]Ð|‰£{8jØÛMšûõß7‰ŠÓÿ8ã¿·ó/'M:kÁÕ)ÿûûìS§ýyÐ+~ãógª}Rq ·†Æsú6èÕ¾¿w4î6¶î½8o\ ^ÙÚiï&ï†åîc³Ãp³?O^=á~4™•‡ãÓn³Ù|u÷drµß\Ù=Ñ[™L®ìþÆí9µZãNßëÒY{àµÄá|~3žÆ?MoÞMo®ir3½Íf¸:cÜlŽ’6ý•ÓHç^/Ïqë"Ç3Îqã¶››kÓy¿ƒ‡IŤ“@&”jò³$‘qîH Šå–‚D=»»;ÑLD AkmÒS"KÒKJ·Ø©ã@¥Jdž¢Ì¤X”&™ü‰}AÏÚ=k¸>_K¾¯³8¥ÌH¬²»cé§ü5Åí½ÊOÏØD™ Ø^“ëÊ“®$Z§Åio‰m5ný<Ú³>¨ âõÇv¯oo×bÚ¼N¯……ç(‘EÔmu£ûVìðºŽeü¾,þOD Ž'’ÑÐ2„ˆ:Oî¡}xsÞE&¼ÙW« À–l;¹¥ê¢-\˜B^#³¥ý)ö›=¥ IBeR¯ g§Óòú@÷Ür$.Óü°'²ÄÈSøÁFº‹Ü[š˜T…!m´1Ò¾Å`Óo©Bi08&[*Á :Q¸º±éš @@ -1399,11 +1406,11 @@ vQ Ý–Á©Ug,Ô:”IÅç¬û‹×Ú*ïV`Ö€ù™6²Â“Xo9NüA\W¡òŸ gºÆˆ°¿Âíe™fe/Lo€dÁlšÓwRµµ³pŽÇV`Ö²¥A¢Û~ðtˆ‘8Þaq8Y}`ÒÁGÈï6W«q‹,M¡=€*<Ú;Kºè ¯LP{áéª,¡™ y€¬¶SXô&ÛXe-RˆœQœFNiÑÐ,[yö(!eúï^L"/»½[•9d´ÌSd=ŽCwõãšÆZ•°EgvhH3Üðm¡ú(sºg@,ePÉ!,Z)à¬Ì0| :j”ŠE1ónðØq«hŠ “ar[Ykn’('*K¶ãYØyåP¡Ñ\Šb (ÒZîò€þźÉüu%¨ ¯î06îA¥ÒÝháTÆÅB{á<-Á6?Ôvñu¡Jæv§u °}Ô½±ã bg¹cMÖa;%q:´k8yÆ’ìEòºäM¿ìWV!yd±±m›%ÊM†¢òõH>>>/Annots 94 0 R>>endobj -731 0 obj<>stream +732 0 obj<>>>/Annots 96 0 R>>endobj +733 0 obj<>stream xµXïoÛ6ýž¿âl˜ ÄŠ$;¶ œ5m3´I»í»‰²ÕJ¢FÊq²¿~ï(Ñ–dh6EÐüqïŽïÞóÏA@>þ4 ©7 (?8Ÿ\L|o4¢í‡^`àS8ð½>õGÃÍïZRÂ[0‹s6XüºOA@ÓÇFCšÆvÞ§iÔªZJMiQI-M• 2i, ßKJ UKQѧ´ˆÕÚÐÕ”¢,•Ee(V¼„VFb‰¤Éûs*µ=…ÌRhyDw«Š´°§G¢x1ýràS7èy!tìZŠS-£*{$ª‰âqs„*0¬‘µl/•a‹Œñý¤{{ó‡G4]¤J(R+ ,˜U.ذý”YÞ_»AKÁKá­Œ¤1B[÷i&8 xNËœca©ïy;߸k1HŠe"VYE¥ÔyjLª ³gÐÒE!cº{l”=wgÑ"½·à%Þp4ÛçqØðáŽԪ‡´–YÖýZ¨uA ­V¥Ç6-ipÕ½7pMAŽ_ŸRÐoèà‡Þh‡/ôzMVe©th™Ð h•ß&tã¶õ®Í¬nÈÌê\L³bZ€9`¡S# ŠWð¨],ïe¦ÊL¢K$<ù ü°´ãKA°à³i°ÄÑÑ`޺Ȕˆ÷ã›(MïÿféàPâv>XÂpàZTß|b3FårÍ8I¬¿®…®í‰Gç,5ö_&”+þà„¥Tâ&ÏN¶Û7Á`ètÒ!3s ƒ‘7lFMljbxŠÉv6@$ÙP›‘’98e>²`š‹mŸ @@ -1413,11 +1420,11 @@ x mž¿€Y.8qžð Í+ŽKw·su ⼓zÒ³åÐ|Ô ]`mú“=n/ºó^³rêì¿4R;ßNG¶0o_M—h5yÆÝEC9÷bï3½Ûöù˜MÎB˜|;]^ °¡Éí`Û¾îžoíÖ>b6ï¢Ë\lÞX̽j’Dö÷Æ{ŸFuS´õù›¾|…WÚRÜ#.Ù¹Ù ™‚׿›ÔB‹*õ•ìbÓ–cFÊ×éÒ¡â¡y4•Ì©N¹:›œ„µ’óXVѱ݉r/ç8EE ë˜GÃI žy9.v_éYQL¶OE[`ÛÉѧ%9õë”3 ­rD¡nŸ aÖ.õ[ªÛ×25èÄì‹ÚŠêQƒÈõæ¬Ò¶CÞÒ²Sk¤66Y;ì­ƒHò7­ð¸˜B67Ý{ûD…–¥à—t÷ÝP?[-˜Ð.¨Dw¯(SG˜1(oάu,À‹Ê^)ÿ’]›€8Ù¿QÔOü¢ùÉøýùÅB}ÌÓ+áy_TPfekŽ{1 C›àßõzíYí¾^È üæ^endstream endobj -732 0 obj +734 0 obj 1839 endobj -733 0 obj<>>>/Annots 103 0 R>>endobj -734 0 obj<>stream +735 0 obj<>>>/Annots 105 0 R>>endobj +736 0 obj<>stream x¥WMsÛ6½ûWìø¤ÌØ´(Ê”•KÇùpë™ÄueÒC. IHHB@Ûʯï[€ h%v;ÓIb‡Âî¾÷öíêûQJcüIi6¡,§¢>zµ8:»šRšÒb…'ùÅŒ%“ñxL‹bdª*j´£R®T#Ë Ic´!½¢ãË¢ÖÒÙ(Y“²d¤k ^$§Ém$•’Kˆn´“¸#œ¿ýbñ']à‰²¤­Q“†é4Í’ rm^Q‡ÄLGJ>È¢uÕ6¥4!šÆ ŽsóÁuÓÈ¿b¥9ñ…àRFU;d4jE¡[$É1Þ.ޏz¥ü¿¿¥é,É(ŸæÉ”jJó,9ï®*úÈ¹é ‡Ø-6ÒHÎSP¡ëm%k¡š5ua†ÇÔ4Ió>:¼ÆÓ|òSÈÇYš5íñŒù¦TÊJ‚…hN«MéïOóÕûÓö`¯@·‘µ¾ãôQ…QÒÒÊèÚ£||ˆ³I’ÓJW`c€%åYžä4½˜%cšàPYáÍ)f^xãIrñ¾ˆìSþ‹[“G¤¶Áð]ý®_Ò§ï<É œ(\ kƒœîÞã˜/1H5¨¹ /Cík¥ù {T>ŸzìF/ß¿ºÄTÖ_á½ôf8 øs§áõÓÙÄÝ¿£™Î¦Ñ³ŒO@÷þuô)ÅHendstream endobj -735 0 obj +737 0 obj 1730 endobj -736 0 obj<>>>>>endobj -737 0 obj<>stream +738 0 obj<>>>>>endobj +739 0 obj<>stream xW]s7}÷¯¸“'2 0œ—Žãĉ'qãÖtÒ‡}»/ÒFÒB˜Nÿ{Ï•´|¬=Ó™Ú Öê~œs ¨ïM†t1¦|}önvöavÖïM§tx±K|èÓÅàª7¤Ñt‚÷ƒ>¿·’|§°³Áóç·# h¶€ùñtB³"œ÷i–w”£B-•e¹#§–ZD%裮>Òv¥òåBÓ\Rípè m¤U‹ù•ðT‰üI,%f«K# ¾›"÷u0éW’Œ–¯gßÏúÔ\ ÐYѱr!­Å³JÃŒ¤»ue•öˆEx1Nöˆî<â‹ç·ã‡´ññOMJ$ž›õZjöbò+\t2¯­ò;ÊW2"Ž¿PNÌKYôØB@xŒ/€`Äqˆw Šç·W4%̆Œï1jãÞEoÔ£‡®ƒ'¼2šnJ%u+@¤=dÌ;÷Æ•^»ŽO[¹¶PzyŠ:¶˜‹ÓP%'P‹8€þDíÝÍn §ûéë·Ù×^åÚÀ-T°•—5C·U~Q ÎÔ6— Å5NfÜ.E'$ß<úRÌ`EºëÖgí‚ h{oC€&OfA̠ЕJKz¶$—[UA1èŽ'é°‘ŸíA€‚gŸ!SAK+*(Y”ÇK»H B鞸®þ§ëîp ‰ìóbl^‚$ë@ðs Ùkª¬Ù¨8 ZK¡1?jiwÏtÑÔ0³(A6A‚á9*,(+_ñM é²O• 7!qZ›B–¤3#meYòïÆ9cÒT21)‰TaÜ:”3ªdm|»¨Åz.­oJà rùm=§£ZC*oÅÂ(¹tÐNÏ2$çe…8Žr$Âç[0[aaMè–˦]¸õ<P[úl¨õ¬­òŸ ¢=¿íÓwƒH¾Œü¥@wÌ:®®*c}ð{‰îÇ„ ¢%PÓÁË^7|¡¡³Šÿn}&þ ûí£yKQ"Ü$‘¨5 Rx´âŠ›-:šŸ7v’a$»Á¿€,¾ K4¼äsŸ{´ÞÒŸÑ>_‘7‹ÐAÚ^.N£½s®fqiº.Ї(»÷A9Yz¿ìþñpÓŠàŸôy8è´Öc‚ÉS‹~YãRnNË2Cƒ&@ƹ¤2à‡C±ËœŽã`úŠöƒŒÏôÚµ#©sh mƒ›ä \¢Aâ>?Ût\Dbк@ØUÅ'\jä0%Y­ŒL`š„sé·6i#¬25æÖ^K©õ {”0·P•ü)8†7t\iJ‡NÎÕœ8c罺®ðlËïôEû äî…úm.½é+:©à«K ÿ²D¢sõó” ¡ö’—hŸè¹ÉWÉéñÈ€†V®Ý•Ù2uÜ¡,–‰”q´‹s±‘<¸OÔ;’‰5•x×H×ùü‚åÉlUY¶r…øåzŽ30/LKƒTÒ(~t¯ ÞB‰Ò,Q;؉ö¨&9,4”j§åúG­°|”Æ<ÁPð|ìz„…ÃíÐÚÖˆ~‰†Bi}8šë |Ÿ>¹Ï²Çp!ËnjlPÚßí­)¥ÇŸâû, 9eÙ½QÖh–jkTõ` î7Ó1às„(·bçxñ‹j\‰ô l$<ã] ?HŠ~ÕJ@`ŸÉ>8¥{qÝ=Ú3¨á­‚E$ÿŸÌ¡Û7§Oa)vĨ0Ýâ#… Qó–ò@}ƒ[ÔË’7Þ©9óÀÚ!ñPÐjô‹ŒÙ‰’Å·‹RM#S¿¾ ~ÀÉåãxäc¢UqÈ#£R­±„‡%ŸP)Ò¤YDyh2Iý içY@\0žç~‡VÒ G˜‚W—çWÓ–šã  GXÍ”æ:TÖùãEzÊô¥=zš†ñ`<éñ?7¼½þÿx¼¾w͵÷ƒŒÞ›¼fn _7ÞêÆkÿÞ»G“Q³!^ŒØöüßÏþ­°5Œendstream endobj -738 0 obj +740 0 obj 1527 endobj -739 0 obj<>>>/Annots 106 0 R>>endobj -740 0 obj<>stream +741 0 obj<>>>/Annots 108 0 R>>endobj +742 0 obj<>stream x­WMoÛ8½çWÌÞ –-ÙñGo ºéöÐEwc  Z¢-¶’¨%é8ù÷û†mEIEP}‘œyïÍ›ñ¿W)Mñ/¥eF³åõÕÝæjr¿¦tN›=Þ,V¸(hšL§SÚä£E2OèzóýjôUŒpJ7ä4í®éAÔ;AY2MžùY–dÉ3:¹ŸSš†ýÆÙû>«'‰…¥pÔÕ8i¨0xf¨8ÈZ6ŽJa)/EsmG'I¥n%©º5úIÛkR ñ)„[ÃûhCFVRXi?Pãã¦4NgøGûPECòYY§šYéŽm0åxC{]Uú„ØWTÔ WÚ„þF’ÀŸ+%µÚZµ«$Ù\6G[¬2t9õ# HÇ ãs¿ìéE©ÐÔhG…´ªÛª‘'zTM¡O–þÜP$Âam«ûÀ‹J޶‘²°íNb¯F&D·UuÎfl+Œ¨%àµtÒæ‡ÝâIàprŸwÄŒ—ÉŠ"BÛl±ô_ˆã×ÃLN!'~—â ·`Žôž³ˆ¬ò Ý¹âú@T€•ÖÏÝ Ë™Œ{¼ñIžÑòŒ}ð·`û),=óÉ '÷µ—Ü(†b“Bîû(ÇíUÅ>–P£­w çdÝ:KœY¥sá!¬°Z™s/‡NÄP$ßn>Ý‘h Ú UYRŽè¤@Rat‹ìO¾dŽ–éì-öBè¼PTÕ0a­Îâ) ÈÈêöÑopbHì&&]ƒ“:ÞIÛi]…De5Цˆœ“Ù‰üÇIH,×5„¯vªRî…y à3bb5×#W#gÓÈg‡*þ~)ÆwÅv“AR(‹Ÿ‰m±èj¬$`"ÊY'>jI&‚¡ÌLgF¥¶v¡y@uð³½f)/³žÊTêàk!C/ïÖÈ\²É¡ÐÃyºÒH¨½L>o{á¥#è¨C£70ÕäÕ±ÀwCfýúX(^spUf6úªF£›ü ¶Ù:é7¬±¾ï…ÝÏuÒ©å§e~ß/Áüh Ûµnª²º:rSˆEyË:ÚPª‘D6ŠÛo\j‘aFOCyÙ3Ø ;>ó‚Ç~ìÔÀ׿Fµ(Š!¨¡¼BŽç²@‰ç•B°áùŘÔÁ·¦Íßýç?€x”¾ ”xhÐMX+áß\qóô”R¾úû3úB2¥ù|ލ)]fɺ»«è;ð`…9psžÏo|É\šqé\ûq2áŽÈQ$ÂÏ%|I#݄Ͽl寰\µé• ê–ý/dþJgQG=EÓõ,™ÑxáË÷6/ݱ9üö&URÅÿ4OSôÞùj‰ëtKt>Ÿç¥Á`üXÝ â/ÉmphÄ\Z!ijXAd’ëæŸ÷*;5>±ª@ßFÉjò-Sr){eÎ}‰÷<ÌjÝ€àO¡CA¯ÂËðÖk6:îB¯H÷>2¹Ï:î7þ®°bsË%}Þ^¿;f¬W–÷óý7öçÁ†ÛÑÃÿ¶Wtø+›qÓ,e3ü®WwÞò;¥lµòÖôšá’Û÷Nò0x耵Oaá»Jœ+yÔ¬^,A£6ÔG>>>/Annots 113 0 R>>endobj -743 0 obj<>stream +744 0 obj<>>>/Annots 115 0 R>>endobj +745 0 obj<>stream x•WÑnÛF|÷W,P`‹)Y²ƒ´€Ç… Øicµ/uŽäIdLòÔ;Ò²þ¾³w<Š’í‡ IÇÝÙÙÙÙã'Mð'¢ELÓ9¥ÕÉÕòd|sAñ„–+ü2_œÓ2£I8™à›4øœ‹M#5-B22muÑìèÊT%Ššð÷AT‰ 8|ù°ünE3h4¡‚E…ô»*ê¢^“¨é~I×îñmÑä}€Ø˜Quâ?~iL[IÚ©–rñ,IôO¼‘~6Gнl®n¿>P-p^­ÈD±6`@_¾ýf (#¡%}?ØÕ—в”Ùaœ ¢©«ìúëÝQ¸SÚæEš©Ð?®?¿‰í p…ÓGÑ,¸f«(éS»ñ¬§ªn´2mÈÅï*çÇð˜sÌ]]~“†Ã:w2îø¾viâyˆVgÁmMJghC£,‹Ô䲃zJ«B›†L£6.»ÖeBVªx&_·µ}"UU…ÏQ ŸG+ÕüÔ¡‰|SM•l„1ÛŒFß ˆi¤ùfžF¹XSø2« BÓhÑ(ý³}ÈÝ!_ß !z¸…ÞâØWfs1|þг­ÈEã›Dÿ¤êrG•Hó¢–îw–Æc„Èi*m¡^Vƒ,—w”‰F$ÂÈÇD…éª i‰èzü#õâ.Õók‡…aðäØº0´ÀªÚºÈ›QÖ’+zG´ÑÅsQÊ5ªT$²ÌÍõÙtn¤B¢Û>DaŽršÖ²jK²ã¾- #™7I²kù¾LfáŽ?=›ÂñݧÎñ¡ØÉÙËß«í):Á‡J!%m-–Kr"ö¾¤Vì—$³¢qàmu¯6Àø¦ @ˆ+Ýê18{oì§6pÒà*ûûR9ZŽ˜¬Ázà ß뙸ÀÍœæ3쿊¢ùÔèi˜ŸÙ ÞÁ»ûèc€Æ`ÅãBbÛÓ;Áñ.À« îã½Á7‡ä8Ýà…ãD¿ ‡´”|ÁÂÜrSþY—*å¿ )xÉàmÀ)©ãšeÈšíF÷¬»A,Þ=aý Ãßœw§¡Ùé߀èi¶˜áw«,˜Î;êþ<ùˆ›¾endstream endobj -744 0 obj +746 0 obj 1500 endobj -745 0 obj<>>>/Annots 120 0 R>>endobj -746 0 obj<>stream +747 0 obj<>>>/Annots 122 0 R>>endobj +748 0 obj<>stream xW]oÛF|÷¯Øú%jaÓ"eKr€ ðG]¨´VuNäIbBò˜»£eýûÎÞiŠ6š¢HàYÜ]};ˆiŒ1ÍšL)-.¿,ÆÑ¯ó—˜¿üñëÁì4Jh:ŸFc*)>Fóð[A÷üÐÉÍ)Å1-V7Ïh‘¹çÇ´HGwòÉRºÕZ’ÝHúqñ…“ô£ æÙ$:Ý9@¡×tr“„,Ï~"Ú*ýu­USÓ;NòÀýä´0GT䕤¼rþZj)Š¿ÉÈÔæ /*ÒRdoØ“›³öØå=N¦ÀºÈF½|týá–sö‰èÞ' ²ä†ðŸ ¨D)I­ÜÏ™*@l% -é‹Ê«¼ZGGgI4£é˜ù.)‰“(¿ÞÁöx†?öùþS5T6Æ’(Œ¢xô´×B#¯•º Þ‡à³8:ß—Á^â€l˜œd•ê]m©Æ€ŸÌ|¿FZ&ÜÓÍ9vÒ„—ž{¦%¬”¦j45Fj°ªøácê8ž@¬hhÀveóTXP ßw úx}ñÛYƒñüžMgxœ3Ûþ·Žß³éÜE{ÖóM^‰¢Ø‘È2zI©²|µ{ø‘DËm?¸MæÑy/pÿwüuræ÷ÓþóóVÇ8D¬ÁÑÿïg­SwÛé./ÏHæo—×Wqøžøþ¶ÍS`±‘ÆëŸ§£Öy)ôŽD•ÑR¤_1ÍaHRUY­Š‚;~/Ê¥ ÚæEAÂZYBrh1¿E¤–çÚ ¯õeÀ¹UˆSO‚¹Xd‘ºHŠtf=³äþˆ0aÐ!•bG[Q9 ìZ»ÃÈ9f±}b™LÍNCªÁÃ(¿‡–¨Pø‰RUëWhp:î1yQ`¾+aóGÉÍWœfÊeÆ…!>,‡‡¦Œ ¡d'tÉT8Óµw¥>áxlñà JØ|ÔѲ¸"Gâãù¥¤·^­Ÿö ¿TÑOþ½¯ Qáe•Ñv“£E[xlÎòÈšTfL·WH£é, @@ -1475,11 +1482,11 @@ b _¡à1wßÉA•ÎQBJ7hN@m,c_O¯ˆ‚Œ•µñp3§yÑ9[B®,ÏÀNè Ÿ’œòÖÍ' ‹²düÒuº’̶'©ï±|JeíNetÝIÑe<¼÷·&W¬¥>¤•V¥ã l 3Q˺lÒËÝ€2Æ|x 'ë5dZ…mü (1zP2]©²n°±Ì!ÝÞ^áøºÍS­ŒZYò™h¼«2ª¸Çꢱ9Zƒ…ñí’|ÇÂpòyÿ|ñÍ¢IDŸ7;À£`L%Ò¨»‚x£¤wÁ~æª^q³«FkÀãÅúÔ= I»Æ†©ÞXÐ&¥Û¤Ž?6?gw8p`à0³BaÓ§*ê.`æ € fݡÇÎŽÄSîîg¯€°ÔJ)°*\71¼$?:¼ÍqÙ=<cöâB÷)ØžB‚A©\¾jâˆqC¹lX°[ÃR™gRýrá„&xd 9^°c iv˜Ÿ2”çýïäf>bĸûñyêŸ7²ÑýÅíå}Ôê d‡½§•ðpU1æcÿæãY‚Ï´Ùè?î´S|^œã#1ž˜Ì8 TøûÁ?»Û¯–endstream endobj -747 0 obj +749 0 obj 1709 endobj -748 0 obj<>>>/Annots 129 0 R>>endobj -749 0 obj<>stream +750 0 obj<>>>/Annots 131 0 R>>endobj +751 0 obj<>stream x}WMsÛ6½ûWìQ‘i}KîLNœt<Ó8n¬Œ{è"! 0iÙýõ} @$D7eÁ°oß¾ýà‹)Mð3¥õŒæ+JË‹wÛ‹Û‹I2ÁÿùcÊ_~¿˜M–É5­6«dB%Í«dV=ò©« šNi»Ç}«Íš¶™»`BÛtô,ëW²ªT…¨©1Ôä’L‘ÉšE¹deÚÖªy¥Òd’~Ù~c ± X\.Ï,Æk<ÝÌ’é9ž õN.œcëÿ†¯5 ²ýþ´û†Ó£1Ñ1—µ ˜¦-2ª„µp§6í!g·øì¥7t9ñ6‰t£RÑ(£©–?ZiæAГҙ9Z¢ûm°NJ;~¬(%Å+ í»^’©»S×›2u¶äDäfÊ‘›3𒦳93åV!rˆ×|á ö{(¤°X÷RˆXˆK|î[N’ùà¾sñ€»€`hÎïà?Åê§´Ó+ÏÒó ¡˜WÛÈÒqØ6†Ÿ¤¢(^ lYuÐôõþî/jUî`àÀ_ã‚ã°tLøý·¸Ü·A8…¨V6!ÚæÊRÊÒÄ_ñ, ã]…¦L>ËÂT%ÂK»Zè4—–ŒCå¥ágc'©>>»¶¡£* ÚñŽg™±#µôœw÷XctNÎVÉ‚µ´Å"{ºɧ2‡ú²` ½”³ÉèaÿìËh I=€ÌÎDa}yxOi.´†e\*_DÚÀsÞىס:’·Ï›ÌjÏ,•RhëÓj`Õ'¤%mŽI(«J4žz®¦n‘KàÎ‰Ãæª² æ¿ÑtIfá"ý=R‰LÆôjZJQdÙÀü©:qUàkÁ7´WKkÚ:•F§°\<#çq²Bñm_›2>|:ýpû>HsÒ „Ѥ©i!++¶¡îdÅEe 95¹Kø«ËP‡G]Y+[_§GÑ 0{/)²NŸ^®RŽÚŸ¿KYzjêÔÕ0SIT)WÈ”EQúpªiœÃ¸«0øßÉÚ ö @@ -1489,11 +1496,11 @@ a$ âø ¼qD¯Þ!ø®\Ä1CH`p-­àG´zq™;/¡:fÍT ``º÷@›¼u 8©86¬¼~C'k;ÔÙ *è^i®¯°à,BÔåyÉ%ÀÅ÷,ÑcÌ|„½p6}ºûÊ`]ZsPÞ‚|æTÀаÝ81é –”t¥›Tƽvê¶qç°mšs‡è7?ÞÝú …*böú §ƒký‰ê½>pZŒI6iB7(ãxŒ€Å¦\uc¨[+¼G±—/ÔŠgàoß6-&ŠPYÖÝ0Ä~….Ã5sR ÿPf¹ß‘¨ªB¡ípÉdB(  ¯qmrØH_µz íÔw:y9 L{ÌnëA"¸\s݃žêŠCŒ}5o'Òï¾êñÆ'NÞ';°…[fc*ÅwV85Ê=|¯ŠO ˪À€Ädzå…Z)õ³ªæÎ‹¬ ¢Îùå˜á6>0ÜõÙ««n„½>>>/Annots 138 0 R>>endobj -752 0 obj<>stream +753 0 obj<>>>/Annots 140 0 R>>endobj +754 0 obj<>stream xXMsÓH½çWtqY§*Vüm‡[>ÈB-„@̲‡Tm¥±= iÄHŠ×ÿ~_÷H²¬À!+ÒôÇëׯ{øq2¤þ i>¢ñŒÂääjyr~{A£-×x3›/hÑ  ð—°w½UY¡-zkwTXº¶éÚlJ§éA%+E£`D*'uºüv2 þh‚ó½{gåötceR>S8ÇÚñWìoˆÏØ_<ÄyœXÀîvúGirShú¬UdÒ?1¡á°:1šó÷WzmÃÞ–ºIKMΟ x,¶&§ÐFY¬U®)Qß5å:Þ«B+<…6±B­bM;SlÙ¢ä÷´R¹ «ä†cìÚÄ:§\»'âüåÉ*àS¤Òˆ¶)ŠEþ‹Š“šœ‘ÌTžï¬‹ˆtº}V›²A3 Znu›ÅβÓ7Ë®…„†üëóŸ'Ãá Ót¶&”Ðp1 .ª§˜¸¢<^àe»’…ÍLˆ:I¾OÀ9ò8i’䎸 ß‚'‚y¯Nî±7}<­¢Í^'Á´CcQ‹uë»1¢Bi¦6ZP,¶>4@Ð6g“Ù³„g‚œÕñu]¼9€^Ñã8ý:ØÙµgÑÛ_—AaÐ7äb‡ºÐtºf4ỸaÒºn©šâÓÑ$8nªE0 èJ…ß7ΖiÄöÎo§Úh˾§ø-ôk©Îùí¬®ÅeYl­û#'yëÖ°ö@Ð>²a™è´ üVLî•I•ÐŒsºQO&‚÷4µ)̼:tñý͵`Aýšç’ú+©FõÝݲîéÛËO¯@×+‹~©=zzåe¦]®#0lµ÷ÚT l}Én&Ôìý¯€gÎQù(2g¬c‘qÚw,‹ËVEà…Û ‰˜B•©•‰Ma¸G,©°õ¡¯&ì°,i‚B P'­ƒ=ööã)2ùÊß  Îh"¢¢ª‰3`V¦¡FÀk„ƒT3(A>:ôóbëŽãÈËal7œöÚÙ¤sJ ®S(£ßÃØ –¹(Ô&„NÙ²ˆMÊ  M ,YN©†å,»§ã¹­h>GÖlBî0üN¨r8\·ê É„ê;‹ ?Â‚Ç @@ -1501,30 +1508,30 @@ VW Êù5F i«?¶µæ2ƨú€séãŽ"UÅõ‘ŸñØ4Â5àV%*ÜbY"iaìŒ!Ö8´2§ûÍâbâUkò²Bð ˜#ØÚåy4=¤,2ø‰ ýD‘.”‰qE,Ã-sZfG-§g] <#]„A€¹;6Œ;ãpa­9V¯f&Þs-Âä™ –QYO[ÐÀgRù†©½X‚Ø©‚·'Ûðœj\5ý–‡õ$ÔYµkâÐÎÄ1¸À.ÏoÕ<…óñT.4/øÏÎ>ÞùÉœoHRÅñ{úõéäòñ…endstream endobj -753 0 obj +755 0 obj 1781 endobj -754 0 obj<>>>/Annots 183 0 R>>endobj -755 0 obj<>stream +756 0 obj<>>>/Annots 185 0 R>>endobj +757 0 obj<>stream x•XMsÚH½ûWôek‰kI 6•Úr’u’Ã:ÙØ·8‡A  D_ &Þ_¿¯{HÄ@bW µ43ýúuOw¾]øäáß§8 QDI~ñòîâï» o0™Ðþb–<Šñ„ÂIŒÛ0Ž!M ž—XfwÁðáuH¾Ow ¬Mbº›Ë{î’^® ›–…žSYd43©^àw¥<»ûâôcTº*·Ê†×SòÃfé0Œöâ“Áh@¯Êb‘.×&-–dWšnU>SôºÌUZðKkÊ,Ó†•µöڻÌEjjKµÕaJb´²¼˜¢Mi¾ò[òÃëW”ÖdK¢u1ט£Š¹¨¬”Q¹¶xD…Nt]+óÈKÕùlÞ€èmÒ,Û[ÜPè3ß\Œ¦Ñ`D‘烅œBŒ_'et+¬C ð°m~QZRÖê¼²ŒÊè¾þ^el6óÐÅl“ô•~$…û¼ÄÅ®æÏõ·µ²>IÊŒ›3ðgP'ƒ¨…ª-ãmwÞv"EÌD¤lÍ<´DoÙ¢\{¢h<™ r 8 °ãd<™v©ÔRóÔ}xÊ4÷àƒëÒÀÈâA©.ýÇ4©M3­ ÊÒâ+˜Ø¤v%ƒTb×*Ûù“æºNLZqdK{Ôx  Þ2×Uþ®ò*ÓÂæð;OöHok'ÝGd€Ez˜Oˆ·?Ý`æ;·Œ–Oˬœ©ì³K}Ÿ¹rÂßsz©ê4¡Zø?–—¬y$6{ÀKc?Ä5'ìî°¶”îöõÖeÍ„1&tbOÛYZ"Þøb7qÇ8½h,üÞ‡÷oÞw`x#ÀÎ)樋pó'$8<^(ïó oÕ¥)×ÕÏ‚¹¹úxóîŠGï–î>¬t×™Mõª\gsöM³‰hî² ïÿ¬L¹Bú0Hoå¼· a]#£1;ᨑb[¦9Мé-Ùã‰ÈÏQØQyâ^ß›röéŒÎˆ-oû·2z¡ §gÚqZu'¶Âp*Nl¯gt]ðî}Ù°û«ŠGlmÔ¡g‡¨P­RÕöäYsŸŒ•Z'¨Cöq·éè¾—¯Q[Ö sa"ÂôçÛ6þíúDZ3 ~û$x¤DóXYx¼Ruý4GâºÂòmÍ¥Ü%)NMmð£8”ºå#¯„ä¤ÓèG1W¸6úFý^ùq3šˆ{ÒŠz]U¥±Ûš•˲èÄç(ô÷ñé„3PÑvprý!>÷k?½)OÁÜHIFÑ®-—b‰Ê”‹4Óõ_j±‡9} ?Šh$¸¨Ý.Ip‚W»:Né=þ~»¹¿ßb€´æÑOrìÀsà¿×´*sMsÄHsÐb /ºAMêL­¨>,T3îDÖÇœ²³ƒˆûAlfnpÚì ŠÊ™=7éÉõV*ì¶.c.¯ ÙN8£uìªþ>6œVæã4Ù<ÂUè“TוNÒ¥¥.´AYw \ûávc–‰$Êшt{»‚ŸÄUFgèkÑá\^¾~{y)Á}#7‹Ÿ meåϨvØõ ~ÇŠÏíZ“Xΰâžô…}œ0Hò99ˆ¼ç­ÎZŠíM¥@S×êò[ìÍjäG®R„œµœpÚ ?îVŠÓ{i¸®ÍPŠÉ°æ³È0KgÃ-¿h¨™Xé|ÎàOˆÅYŬ޳zPŸý›¾&ÆpFi89H(Ô8¹v»ú':¿ÂªyžJW¬ÛzîOÜÊI‘ÛàNZ ÷áýi›ª¤ÞƪÆPNPâZÎXç¢3ÎÅ õeˆ&~XØCÛ©Ó‘£—{Z¹?­Ê³]\~£EÙVˆ)½¿s"}J‚öÇ­rAU™VŽê8¯púg2w,V3sù( ›#ÜðzÒÐ|”_$Ø‘Ðp{õÏË+ú`Ê/¨nø®¬¹’‰ÌHß ïÇçˆÞ¯~’Ñ:áë O · ÿ{ñ?DІmendstream endobj -756 0 obj +758 0 obj 1576 endobj -757 0 obj<>>>/Annots 190 0 R>>endobj -758 0 obj<>stream +759 0 obj<>>>/Annots 192 0 R>>endobj +760 0 obj<>stream x­WÛnÛF}÷W Ü•‹º[vßd§nSÄIš¨(Šº(VäÊbBî*Ü¥eõë{f/4©(iŠ$ˆx›Ë™3gf?Œhˆ?#širAiyr½<ÜNi4¢åšo]\Îi™Ñ0‡´L{?¨´Úo­Ìh+ŒÙé*3TÖÆÒJ’TbUÈ,!ºÕ•º’”I+òÂV´Ñ;"«)Ód7¹9§J®e…;gË'?,OØ…óC#þõîÇ“ÉE2¤‹ù8¹¤’FãËḫ‚Þs _T.àùïwB~}óî÷·Ë—o^'[ìîùK÷ _öâƒÛ4äÞŸÃÌh’Œa«w?¾˜‡ç~Ü_$S~¾ÜH2²zD> So·º²Èµ¹¢B?heH¨ŒD0ÐÄ=úCIë^øÓôÈl <*ñå˜ḃ1¡@a†Ja,¢]Uz‡À A¢”ø±Få~ËU†ÛDi‘Ke¹h…N…õBžù8(©=¾¸AéßRÙ×ù|U®k|--(ó‘®Ùm®MZ—ð!lŠä*-ê ÜÚåvãXBYnl•¯j÷Á¸ ü:Z¼Xœ#ÅëƒLcêϘZ€raè½(W‚Ƹ›iiHiKzÍü”êr[HdŸóÿÏÑê5=TºÞR)¶[Nf…ì¤T ~¯—þWy,ŸŽg õìrâ”4]6W‘Ôx8r¬znº_UþMÝ÷¸{+)ŠbOŸê±¹ s.RÆõ’OÛ‚™‡¿Ú…fsÀTÒd˜LÂÇÞº,i6K®ZϸYqÉ ·;Sd%t v7]I¦\%©VkÈM%JTÁS4WàBéYƒ:¤ÀÂr N_øŽ[°esJÆî I"Mu­¬IÚYÌæ@yz9GFcüC§­½ú]ÑM½†.ÎÆhN;âËdšÐMôv'ÒM®$-+VÀEðâúüg+èÆµášp÷ùð8Œg•BGXd{ 0É´Î`›k-Aã-»–ïׯ×[Ô°®¬#SÖ7n4wß«žCl7‚ ¯ªû3ùs÷†}#ø&G;¿|¦3°¨Zµ?÷͉>*½ƒIŽðôRs…Éip;q âØ@{á›a7a‘Zh,«,‚Ô5¶Nžð³FµÀø²Vœ1KGPŒ6ÂÀ5*ÓV¶ÒE!+¤´ ýƒÆ`K¹ÝÓôa›À`[ÉG=U+†UWùß FÚ82 # ÚõË7ïIñźÒå¨ 8“ ¼<ЛÌ”SGŽð+3ðªJmqd =æYìKìpà3FÚÁó"ÚXºzj `Cíàå'©RyŽ¢DwÍKÌ4XX aUR)Ë•<ÔbWÐÇJ¦¹PÎ30èéVÃÙ~¡êðŒÜìsbƒÚ+}PúüA¶Á!4"Vø€t‹&Ÿ·/n XK I4ZSÒP,™\­Â;ùÀ#h€¡ açœ×Fäü œ·ïì@4QYT©®ÁLÌÃïݨÇÎÕ¬Ña Â¹>‹!:ºÉÌCÌ¢WBÝq›M¦é7€ºAæ÷=p¾Ë=‡>¸›H«] ºî³Ì¿Ñl$÷g ºGh…ÂÂ8ûD¼ïa21Œ‡Ô±MLêΚµ@Ó#v³Õ*ãöqs±Çî·P‰®¦nŠ=H›Žæ–™ÛÚ©@%Ýc *EA°(ó°ý°½~ )%½þú —µiïËî°,c¯‘&¹?;¶á}‘°»L®ÜhâÕÂÅ‹"V+Ú‰½“7Ñ§Çæ‰ùž³hó t©E¦¨V ]k·5•FY»Èw w޽njV{´¯Â!ÀCßY§ÿÓÞzúFõÁœþºØŸ¶Bzæ]7©8ÜÝ”¬-Æ?OAfA+"?Ô02a˜ãjUÐæPnÜŽ3“í°jûºò¯0ŽXŽãÌxüÖžGRñöŠ5e£3®ìò3w]ÛF±ö|ŠjâÆðieÃ'*W¦RtÛ8c›òG*]òRûõ=g4Å^óÙž3J(ãÆ-<ÐHüÝÑÇ…ðúùÓ:¯°á´±eÝŠ9„Êò <ÎR®Æq÷ýP©ÏDà ¦AØŸì?4d\ RH'ªiìuµ;£x³x`{Ì·»nº=œñýNdN«ïÜ~â'š_Õ/¬ÌK¤Ö6 u¨:Æì®Ó[<þŠnF°è„(ŸŸFÜB$èU®ê'Záà•qö œëôŽÄGšTZÛo:MjƒÚT³Ê~ÈŠSé?ÐËF?£A&ª† öÓðÝ$Br[’°}ä]Èm~ƒÛÆ2õ ØðZƵàà6~ÞÂ!Øù‹MÀþíA)™cáô}4/òÔ/ƒýšïç~w6á 3¢‹+\d½÷‹»ë½­ô™Zìñ­s+Õ÷/÷çc'rÿß9a:ŸâêŒNGì }ýËÉ?IïnHendstream endobj -759 0 obj +761 0 obj 1878 endobj -760 0 obj<>>>/Annots 195 0 R>>endobj -761 0 obj<>stream +762 0 obj<>>>/Annots 197 0 R>>endobj +763 0 obj<>stream xWkoÛ6ýž_q—vˆ IJå·Óm@Ó.[‡¥Ýð -Ñ6[‰tE)Ž÷ëw.)Ê$0±-‘¼ÏsϽü|S1{ÔQ’Ÿ\ÎN¾Ÿt£É„vÅ]šö£ &cüìóÏBÒ[»4Âc¯^‰{xáV ‹ß|@Nçj@qL³ÔŽ&cš¥n½K³¤5[Iz1ûxÒ¹‚InO«#ˤ³ÖnR¿N·Hê²ØÒFeeÊ–Tât.’•Ò’´È%a­\‘ Óç§$Ök©S™žÓÆè³’VâNbÉI6¿f9ü–Õt©³G³´%HWX±+‰O¡SÒ†he >U…LJSl#º2É{‘¯3ºoDJg©Y¯·gÐ[ei­Wz¹§î?ýÍÔ' W•½2¦̘ڽa4`‹¾ç÷Ãîÿq½±Gnc«¶îo­’O¦1­‹N*ï:ìòEg®tg!2[o ‘o³®‘Ϋ¹¹“çuÒz!i«ç[”MsDJo)•6)ÔºTH‡KÚ¡äL&™B‚ÏIE2:§KaeŽç×&_W¥,"ouиÀFwãÚN¯˜[“áx¶¥¼b`«z'ËË·ïo¼~³ØSO¥áM 0•òoOM.”Žˆfx¶Ø”}jÉqáØ´Àå‘Ï…¡6%ê'1K­þñ©&a÷`UÐp¤T$‰©téÂ[…wf“…¯Ä…´k£S¥—ô›V÷T*-ü”š’BŠ’«„Õò¾$[Ê5)Ë^øErkÞÞpI;2ˆÏûRbt‰€±R~»A!µ?i³Ñ„—¥5ã\k¬ ÅéB jؤ^ÙZëu„ˆ&f¶ùðƒã¥a<Må4áË?dt÷ã$·ßÓ°!¦aÌö©ÉæsÏB·­Éí çlÃjNÖµâ&Ï™-8uvÅήd!›š Ødª0¦|V×Q°£Õ(¥¶ v^/÷”Ù¨ïA`ÃzŸ,Ð'[.×HS]Ggö [bícì¾rARškB—ÈK”=r5—ù\6 |Ï%7$XŽ+™ª„ÖLK8-—…Ä«âKÁk Ä\” @@ -1532,11 +1539,11 @@ x tš¯\½zV£~<ù©kÊÀwð€©ß6Àݺ:WSŠÁÿ,s] Eèz¢ ÷ƒöÒt#ø3Éj)¡ˆFãô×È„èÇ»wøÐ)o”N$Iø^«}ÔT¸‡ŠEEêŸ&­s†£/tžfDUbb(UÂlÁjmWýa7S< Ã9fñ)¾ýSèXxôÞ.— c°Ç~WÖó“­ÖkðcúqÁëÆdm¡–XºÎ< ©íÛ×k¦ÝköŸsă€s–[›ÞºkpïØ‘¦¾hüè²ÒµE"à©\½ì®m/¶ÖÑ0#v‹ÅìÐÚ ÄŽ}ýŒår‰aýY‚*_~!§ n`ð§H4|q×´öZð¥dD#ô{Ã-Áƒ>ÈôGÐ0Ó?+]Ý“ÝbÞÊöòx´ÿs™™¹ÈþraÂ74®B"zFßDQTHM™-QÈkQ€1,[¬|÷ðÈQèé[êT¶èXû™Çx½Rs! ö’bÌVmK»«µ¯éë*À†Yi2|‚”&õÜÆ_8qåÛ»ûݼº¾=æ#.UôÆ$Ïû›lzÛŸjûc­ÿObƒñAcÝ­A%£=ù5»€Jendstream endobj -762 0 obj +764 0 obj 1656 endobj -763 0 obj<>>>>>endobj -764 0 obj<>stream +765 0 obj<>>>>>endobj +766 0 obj<>stream x¥WÛnÛF}÷WL– ‹¶.±œháÈ1 MSXEP@/+r%mLî*»¤ý}ÏÌ’2EÄAƒú™\ÎåÌ93Ã/'ºÂ÷€&C]SZœ¼›Ÿ\Þ¿¡Á˜æ+ܹ¾Á‡Œ®’««+š§½›dœŒúÝkìšÊ¦in´-©tòß+”±çóÏ03¦Á šé'0Ó›ãøÖ»Tg•×´rž>׆¥Gf21COÊhgÊXÒ>gɭ蓱™Û…$ºº®]!‰þð:á {õ "öx*­Oõ'É ’ÙÅðzBÇÑò½gmÅs´'ë´ œ*Ç-ןÃVƒ¾hBãT‹-Îs¢¤,©4u R6£­ aç|ƾ¯¨?%Cާ܍’LÀ£æÉäz­³#oÑCBtKô Š¥"•(E(½*Í“>¸XôL¢“ RͱڵØß¨Ðqë+éÙi `̵>:€_œSQ…’–šPoíÚ‘ƒä¶šCÀs;“ç´R&'³â¬‘¤±Êï‰!ìømAÆk„o‘™p¤G+7¸Û WåÇ@A é»Y­€m@EHpŒºîBp©Q%Bç;—÷ ¾0´G—ºL/åy)É3y{œ­ß_H,A§•7åžÈkœ ‰ꣂ ë8þ ƒÐôQÏH¾P-ŬRø±o©ßoI~œ¹ƒLËZm„ ×^ •nŒÕTz®TƒZ" ßk•jÎ 1.Îön•#c×-WµÍä @@ -1546,11 +1553,11 @@ b m«Hã†&\ÃF…u÷±ªÐ´¬J(›,+$ÝèôQê¹t_ét* AdS½‚&è¶ÖYÝî¤%§D3ŽDNU€ÍÆi˧ ÈUþv–xú9N ÖýG:b þèf­ú ‚øŸ1l¥SCHCîxÿ »6xõÌèHEV;•£³(©¥C[d54äq@Ô4Ƚ«b[ Õv›ïŸæQ_íø:ˆ‡§CÝæu¶8èßÏO0.i4&×4¾™àó¿<ðºÓutuƒas<__'̦ô£wË\Ü2zï½óÒ¶/ï† Öxe™¡Æ¦y•aÐÙ«3ü‡ K¸õ´üqÞÒYÛŽ˜^ôÊý‚Þ0¢¶ õ;ý´Ó«8®8ácÐj»Õ6ÓYB÷^ëwwl¹­ÎEq(¸'ÜÆ$؇8ý†(vΞ•u;@î2µe{8‚ÇŒZÆÞÝRÊ<®' :Ï`gÁ‡ZÈ ÔÚ«â ÁB=¢Ëâ|=œM1’ •AÜh˜ìâÚ¯°0äû„\T7™VŒ†Mrå8CvVÃúº™SOf»‹H7ËU¬38m…£2ÌܸžÁZBú9µÛ¸¼]g‹-í²Þ¬Ü<"%I7ðÒÆ×8.…ð¬ùRiú›7£ÙýTÇÚ°³ìŒÖ2¬1¹Oÿfrl¯,”:k/G[d‚/´Nh÷té-kWTù…d‚Æ/ ^å¢6MDÐ-æW¹IQ^#eÆòÄb€0YÙÅŽu,3„/>K&ŽÑZíßÒN30^Z#GoÐdñŸ6ÂìÐ ‹¥‚Ó£ë%§´Â)™tlÊ sÞ¬²Ž*¶P]ôt²N`ÒÊ(Ãn©¡ö®(lʺèåÙÇé+\?Úý>ÞMë¥låòÜí ýIÊËCÇ«×7\4²ºdD­"‡·fÑbÊôíbñiöáÃ|±ø5òü@}¶'Ôû™.;;ZËÀ}å¡ï ÀËr½± ºX‚·èEJÔºö®Úžiìß,~SàÎ$í +_ˆÌëdÌŠ`›W™Eo©22™VÀ’oÊŠÀ@åP­5PˈXf $„è• ®Ðطα2D0nê>0 ’^ÎÞ0¹nÿxwËÓâ3DDw.­°Ý”²ïðSýÁõ‡û“¡¼ñüÀÜx2nÞ“Æ#6…Ñö×ɿԽt(endstream endobj -765 0 obj +767 0 obj 1534 endobj -766 0 obj<>>>>>endobj -767 0 obj<>stream +768 0 obj<>>>>>endobj +769 0 obj<>stream xW]OÛJ}çWŒªVM¥à|&—+(Л[¸Š¤jmoÛ›î® ù÷÷Ìî:qÝÒJ7­ÅöìÌ™sÎŒ¿ ¨š éhLIqp6?¸˜ô£é”ö?ôW£>MÑFý÷Ñ1 ‡Ñ”´¤?Ñú³ûÛ{—# h¾à°ã鄿©»¡Oó¤“Y¢TIC¥²Tk¥¦ÍJØ.ÆJá·(S²zKb)²2¢wóo½ËqˆØ§Ãá8!dg¾’d¶ÆÊ‚Qºx¹ZÒVU¤Jzè|èã38>{xáãÃ$!Ìá Ÿ´ó0OÂuÖ|mwÊŒ¾©¬”H Ç¥ª@Ndª$‘Æ,ª<ßR\Y .£Z/µH³rId *åß>Im2$¤.Ä(bA‰J%Íh)-ɹ¢²Á FN‚‹¥ìÒ«F*²K7¹FzìˆÁ#¥qRiªÜ2,š^|^ã8‘Y™«…Uúº!KâÆkËÅ àªB+8Ï}2C*I*müS ŒîfçdÈ!>ÈæhÑ¡µÎž„•½ûëÛOo¯¿ÜD¸ßßTw¡CNÉJ”K™FD—(F>‹bËn«n¹–…zBñèÒ"Ë¥c‘ø¾>ÕqÚ>CT=µY"¸—”h‰´Œoh$qðµvœ ¼Ùˆõš1‰EòèŽX(mW­tbi7Ö­74ŒúѤKó«žÝHòï‹Ósе(“•gÃC‡¡e¢ŠB–©LÁ["&ò@n±E+ZG%Jã G"`ªâblh™–}ˆÒÙ2+E^ó—¸9€³Y`v’g²´´Ðª¨‰Ù J¸‰ª%Ëâê,D²‚vÀÈÊ@$I¢*Ž“í Y¢Òuőڦ÷¶€>ƒŽœ!îbTð($‘¡¼ÿ­ã{fõ̉èpòšPÒNŠ´ç¥WP§þûÜ[½áÄ_.äUD÷°½·àøF«rù—ÓH[\ž&¢2S €7ç2+ñÄ|ð¤Ì Oýè`Òl±£qeœ®½ñô.‡{o­H¤)á8M&ÑÙÚ¶USH»R°DCusA=ÆÙµw£ªœÅŸB\–•),ÁýWÂ÷t£ô#„Ýín¡q‰¡5äì)dãí¬à§Q„'`µÓ„*!è' Ídûš²T†à¹Î õB”•È\€ªtðƬco @@ -1562,11 +1569,11 @@ Y ŸP5hý½Êxq&ÀZê"³‘q àþëaŽø«ÆûFÀ³V;~à=u#4Ï.ÐÉf±³x¾Á¥ìÓgnö.¹Ý†þò¡. ‹‹È}:ÍW—µò{ñbØMÿTI§vz·g³_C» Ÿà>>>/Annots 198 0 R>>endobj -770 0 obj<>stream +771 0 obj<>>>/Annots 200 0 R>>endobj +772 0 obj<>stream xXMsÛ6½ûWìMJÇ¢õ-+—Œ“8§ušÆJ3í𑄘T‚´¬ß·IALÚi›Œ5¢ì.Þ¾}»ôŸ#âÿˆcšÌ)É/^¯.nWÃhHóëe4¥éõßÇø)$mxùêÝ’FSZmpp>›EsZ¥„Ã!­’þu4èáhK™ÓG“©DIKB§ô±0•Iûbõ&¦4yƒñú÷U²#³¡r'Ié)rQ*£IËDZ+Š#•†T¾Ïd.uù]ŸÌ“Ò[úleÑzƒ-ô òµ`ÇCŒ&ј¦&XTÖ¹´"—$ø»( Þéä‹m"*+ÉmR¸™õf¿(šƒ¥+š o1"úÝTdw¦ÊRöéáÌ€ˆFüñéÇ‹åQ̇#|æ4šÍ£Eý”у h‡¼%„¶"uÁv‚öb‹ÖB0¸œœ ŸsÆÑ$p>cuºŒ–ájðŒÕ9‡ìçPÃçœ&Ãy4 VÃg¬Ž'Ñ,\ ž±:YœEÅ 0X'ØŠ-Õ°u‘¹kxÁ¹jˆæY×P©>O—£CëÀyƒ>‰'¡2±ÎÀöÂät¯’ÂX³)#>0p ÆsT8ô^¢(~¬aú¤©bΊŒRYŠ}Ég®ÞÍk²£ÂÚ£_˜hbmª2ŒËUÌ‘naȯüé¤>=XD×(9¸Çó…Kü©Žx­µ½2”€,àˆ,a«Þ ú¹¢ëë21z£¶ÑÞdÞIS}:‚¼yeKªÀxG7ÐûAO\UŒfÞemuÖX…1vÉgÙ5 Æ¢¼Ql¼¡ÒIV¥2¥ƒ*w\Gµ£5`ñ6ìúÚ”¼á‹)mé´¡ã…·ÚqBPÒâ>>>/Annots 207 0 R>>endobj -773 0 obj<>stream +774 0 obj<>>>/Annots 209 0 R>>endobj +775 0 obj<>stream x•XÛrÛÈ}×Wôé*$Hš’ö%å‹”¸J²“^ïVée ȱ€.f ZµÉ¿çt HHI%å2%âÒ×Ó§Ï苘¦øÓåŒæKJŠ‹÷ë‹›õÅ4šâ:Äüñõ¯³ømtMË«e4¥‚Ë+ü¬¿å´â·&· ŠcZglhyuIëT,Li ?ä&y¤.5G©;ØÜ©”ÂN“*“yÒ)e&×ôfý£ï¼ÜÒ0 û_&|F…IJç]¢Ä“~ÉÍfr¿º»ýtw³š|¾ùíÛ*ºùíæÜ¤CSϖѱ ×ðýÝXÄâéóšÈçI—Þ8K.“Èß¼.é^YµÅÏÌ•D]¡ŒõR6¥ÁJ—x¥}‘žzR&W›\s¨d¼\DsZ.Ø+ê6_F¨Ž|kêÆÕZ\JL]½²ÒtߦJOF’'’ëç©Iƒþ¯­¾þºþòåîX¦³~+Åý•hW—ø}†ÿH/«[}M1Š˜¡žËé,º:ëõUtÑ÷ äÐß]Ï÷”(KŸh«Ã_8ú+܆ ·ƒ«‡ÿ…²Ïä]U&Ús+ŒEé ¸3Çêâªôˆo?…¾äÆn)7>ø}½ý0ðÒ¥Ô%U¡mIiÏ£»ÆÆ0 ¥‰&ìĸWÅFQ @@ -1592,11 +1599,11 @@ _ µÕKFˆ2è}«ñ2ÇÚ…íp¹XQ4iáR¯ºH}¤_qFóÅõ¨Q§|ñͤ›Ÿ—#‚÷D¼x¦ïgMg…Ã{ Û3Vg•¦ÀA¶>÷ÖÒñt°Nb˜ð#|XúÝU=²â­FóE¤¿Î0ÜÏ÷| o:p:ð§Ý>¤…Î(òLJ›'ÆßÞ Wïîß¿ƒîr?08¾Ÿœ9Òq 2Ç"¼œ 6þ‡£ëâr<½X² ì‡\ü‡,b¯endstream endobj -774 0 obj +776 0 obj 2019 endobj -775 0 obj<>>>/Annots 224 0 R>>endobj -776 0 obj<>stream +777 0 obj<>>>/Annots 226 0 R>>endobj +778 0 obj<>stream xÕXMoã6½çWLEÜ"–-ÙñG/E7Û ›ÝíÚÅ¢€/´DÛj$QKRqréoïRòW’nºè¡E€À²¨!gæ½yOþ|R! #ê (ÎO.g'ë>…!Í–üÕ`4¤YBÝ ÛíÒ,nÝ©ME–=Ò£ªh“fR&d¥…±¸C§ï¤Ý(}G· ‹•¦™R™!Q$t±’…=%RÙµ¤w3šJ}/u@XD‰Â·©¡ïfœ`ëv4úؼõF!úÔ m©¬M‹•ÁÇ+UX­2ú @@ -1609,22 +1616,22 @@ $ ›àóW%uG¿á¨ïH×Ñõl£ó#²]Ï>ø¡Ë)¨Œóôö’L)ãZž²¶EK7ˆñ?ÈÓX+£–H )ÔIw½êpO¿"©Ýˆ=xaú ByC+x²æsUÉ,sæG.ã^矕±h4ùÂ^è[?`û«'Uƒ9{ÑQë½Sà™+¨¨òª¶•0-yJ&tpª€ÞàM^½„W*ÛÙîmÚ©Ëš4nüî¿ÔÕ¢ç^  ðÅî)_›óF¦UY*ýD¾Ø1þísµX?›©ßb«…^†x^DcèÁ˜%d;ï¡¢î¢.8Ê<îÐë€ü\!=gXÝ^ÜdÑ«éìÝL°¿)j㜰ghÛbžáP¶è†Ç¼²¡fZºÍùwÈ­ãæîµ™]¢ŠS‹÷whÃî˜b¡*ëØæâ´¨$1 ‚S–"¯ïÀÔqå…úshæ…ß W’ƒ¨Â™$Žå¤2“Âà»…ûn“é[Ui hGãëp÷ÛÃ<¤Á`à Ýš^Ü^^Эþàßu&µqqÖ’ÏÖC,o#7>GÁîŠí‡wŽŽ‡1,‰£¥£^º_ÇþC ÷¿žü‡äŒendstream endobj -777 0 obj +779 0 obj 1869 endobj -778 0 obj<>>>/Annots 229 0 R>>endobj -779 0 obj<>stream +780 0 obj<>>>/Annots 231 0 R>>endobj +781 0 obj<>stream x¥X]sÛº}÷¯Ø>YéH´$ȹ/wœÏúÁŽo¬ÛL§îH‚bÐA+ê¯ïÙiɬÛÉÌLñÀâìÙ³üãhFSü™ÑbN§TÔGï–G'ŸÎh6£eÅw/.´,išM§SZ£+»U»†‚®uë@q­"þÑTê'mýF‡†TÐôämë¢Æå˜ïä&9i£LIÊ•é¶Ã°ðfùýhJ“Ùi6Çb£U«‚âÁ=m‚/ÛB“ÂÀMÑZ¨Ò*¶Xk¿|M­3ºr;â_dÓ)žã\7‘V­nšc^nr°ƒÈÖÆ­¨öð'ŸŠ† И_dgÛÃü|Ú=îQÂÓÉéÛì‚wðÔÚEãml°á _Q£ê\ÑηGÛðŠ¼º¼GŒžŠ|¯Ù5Q×d"níD­+uÈ蘩YûÖ–ŒS®r»Ãž±QÎ’dõ€¤FNÃ!`ñ@Mg…wUÆê1ÃhµJÆàøMJÆÑ?W‹Øaz QU…yéîÃ{jÚÍÆ‡ø'€»v¤ÊÒjÈ:Çßá6&#Q“Ï£B>KºŸŒ"zÿ÷{êÁª¨¦v²Åž†û)ÖºxÄ$&’o_¸§áÿHuÏ„e©‘»Z=ê„ê`—l šAæÁèjLÖ#“ßz·z®ˆ0ú1 ­tDY»ƒdçº+S½pm¾Þð{HvЪ¤¿}ðî¥å‘Ãu¬-iWøÓ×à»Z¡FŠ…ràƒåÌÞ‚ ƒÅ<ªËƒ3Ô˜ka OøðæÏä6åL&ï4ã×¾ÑäLwt|}\ã>­½5%´åOAø&¥ñ¹XtgœÀn¸ôQƒÈ™Ðf…g/R£\³…FÕÊ@VRÍkûøÉŒ'‹à›F Îè›L#ÄjŠ5™Fˆ+R“ÊúÅ9Aì~}Õ¾ñôž&óó½ú›ß0ºñU"á þu²Šî’ÝÕÅbà®øÙ¤_zéIø&Ûp,D0¢þ [š©½ÃÅÆxœš¤]ËÔdjm»”[;ÐÖÄŒcû¸m•ǵùé"›Òé”|MóóËlÑ]u íur<ÏððLLÿ±Œ¾  t@‹DÛB§à©Ù`<M@¿|Öc5™Í9Ï´9”ÕÔ{1ì(5½FZØ€æÓkœˆÂ]ë{ °Ó£ ‚•º"ÓJå  D²?ÃÀÌ"9ì»Zgù‡Xf˜ô‚/*@‡ñ(?î‹k“e4µCûv§ ØÙ%ã9Ç_H~•Ngoi†£H…Š™Ï¹jöÐ]f—¬ ãX›bðVšà7ãJ¿mèí“›¼ÆÉ§ž ídÎG¼Ñ­ú—Añ–Ø^å­õ[–·î! ktÍ«k3>˜•qÊÂŒ~¹¹º¾Í"ZŸ/p4ÑOÆ·Ý @êÚ*Î?ÜÛ…]le¸#ö]¢Õ‚Á¬ðV9zcÉô %Å{ §þ± ¾¥ÑýFÊ‹Z‘é˜1¦ßåü%Ë&Pž‹bLù޾ÂÒ±™¸Ç¿-º0¸º£àTN æÊS°-áq|»‘³þ†fÂü@esc{ÁÕ¡–Ã:%¡< 7xˆ­3Ü¥Á¹*ÀÀÃãv´QÜJX:x¹6âÀúµX¦ ÀÙà” ·ÙE`´j¸ZbîdòXht²“†“_T!Ì”6ÓE†€®l㥿¨@ È/ãºI‡xáÎXœaãàlQøÑí€ETµNNûÊœ®PG)DŽ,èIŠ´ ÏOp2Â"+o‚=ØEb’P½ûúåÛýõíg.댮ñQ!}w@ÆaÈuÉŸy€iOfá®° ˆ!༇„¢Š™äv°áþûß>ùtÙu¬ÙÅ"›á Ô¹ôÔÑýÕÍ»+º þ;^?t–L`àq“ôúd!¢8úi-<[œõöãì’'Bûíè?ˆ>ôendstream endobj -780 0 obj +782 0 obj 2245 endobj -781 0 obj<>>>>>endobj -782 0 obj<>stream +783 0 obj<>>>>>endobj +784 0 obj<>stream xW]oÓH}ﯸ+m‘Ó¤!iØÕJý (…. }™Øãf¨í13ã–üû=÷ޤ¦íRMÆž{ï¹çÜoC:ÆÏ¦#:™PZœ/^^i8¤eŽ“Éé”–'ÇÇÇ´LçÞ7Ú“Ó… :£`)¬5ySÝzPØ;[Q¥Ã£u÷TÚL¤œ¦Ìø´ñÏ› ÏO^§ÁØ*!Z¨r¥È7um]ð”ÙR™êÅòëÁ1 †'ÉÖå^´½9Úñ©3uÀתʨñÚQíln @@ -1639,11 +1646,11 @@ M ŽÜ\^H8joÆh»a×óþèÂå]Fvº¸éFr]¥nSwó#ËšçH+y>c'20"öò*mW·Á:ÃÊ–ÞŽ&Si·»àøl»]u[ÒþpÄ‹˜Œß<Íó$S*ÈP˜\ƒÝC¥) ðÿÉè`tŠunžÂ€ˆº„ ¥ÝLÙµTá-ŒÀäƒO‘•éñåÕ«6âáä8Áô+²ƒaÅlœ ÙC%G%Ö+Ô.LoÀLò†ûmüçã[áÜd¢EÊ gpœ[<ݱ0Ϥ”í(=â9V¶Âœþˆ‚\²še`‘1,ÂÚÅ-{³A‘«És¿@\ΈPÜñpV-ð #‹ðLc×d1Û³V{UÍðVÎætœ:X‘ìEÍÙ{¶×ÑÈÊ-Ð^ʺÍ" Îb‹s<µ=AUTni¥³l5 |XœãqTäâ (+ôé<ËQùPt€žnó7Eþ¦#&íÓÅÙõùÝ8ûÍ….±}3¤²HuNø­A|íð‰~<wZÏøRÄø÷Á¿Ag~iendstream endobj -783 0 obj +785 0 obj 1909 endobj -784 0 obj<>>>>>endobj -785 0 obj<>stream +786 0 obj<>>>>>endobj +787 0 obj<>stream x­WïoÛ6ýž¿â–!˜8Ší8N\`’&i,n»ë†z(h‰²ØH¢+Rqýßï)ɶ’}Û¤¶EÞwïî¾ô©‡ÿût1 ³…ÙÁõìàvvÐ ./iû§Xâ ŽõFø;¼¼àÏü)$Å|a¦ùƒã§w8Ò§YL]žÓ,rÏ{4 ;Ÿ¦·Ç³o§wÃêL' š%’tžnÈȰ,”ÝP¦#I´NT˜à•¦”kKk]þù"©}/¢L‘á·ÒXô, %¬Ò9ò¦éÃ5•F”Êg™6 ¸ØÑ` 9¢«Ð–l£K6Ae À‘Maª„}«däऑ\ËÈHi8 ]8 §"[Ê8–Ðä³:*§L+ ÎzŠE¡×^ŒÛÊW†e¡ËÛE+Y —|IÁÐÍ[Tôs¢Rga1Õ¥B|p·Òƨ£Š¡Îcµ,A&Ñr ‡Ï𠓦 æ#2$›vÉä¢Uä©^2 LÙµ¦H„Z¸ŒTËBæ–â¿t3?îrpi%h©uÔò¯")8B£‘Îߺ$“è2PÇLf Dbat7o=’…\©{"ÉÓççþ‚&Ò^ߘå"“Žì®x|•]žìÍ'˜ -6ôYåpGeb7KªC.(׋QnŸˆ´Kǧ¾,•I·]KÔÈ_!畦{ðpЊëxåÛ©Æ5Ø M«Z|͓٣Fµ™ÊzMÙ‰^ÓB„O5#=guÜÔÝqk 9"}Äõ¿†U‡sN‡uÃÒ¯®Uä}Œƒ.ˆVN‰¯rC.×lx£ÜrÃ7r÷u±;æLUÄ@»¦„•\:ÚŠÿ½”ÆnA ê)Ôfn,B&Øa4êéf"LTîš‘±ÊQfà5=\ cðCTu8?¦§œ«Ÿiî….­v}5ÿ+ñ€Æã#ÄlתLVã‡QC#ê¶Av¶Ði* ÊåÚC·69¯ÏsaZp×¥q Ð!çå¦Ã!­DFsKÔ£ÆH@ƒáÍ0Ù«8k&OfµŸyÇ‘‚ц(¦å÷•ºT¨eb›óYn­š‰3PIb€É†»Ô[èõðrS®1íʈ¡ãƒ@WF2V¹r“€™<ø`žØ <´¢º%†]À"ç#èÒf;NDº›ª:hšÎTÕ|¾aëùë'ž“§×{üøŽ%™†Ã>tŒ? ÎGÁ%˜KÓ/߯>ÚÞÉ*•÷ÇR\sÏÎÁ¨z²+ÿ§wcêCžb¬gãKxÚ•{|½­¦¼W¼ûÜØ¢ôƒø M¥uÚ5yÔ"c?±Ø|,t qE?½;¯7ŠÁbx2³ ~EŽó ¸Ç{ÌYe \ÚØRNïFµ:;»p‚ºÝJ&f·?±™µ¤‰fUZ­tá&ËVR\Q@ßñ_<\y$Of;•3®ƒ›ˆWïb¬kÏOŒï°„Bˆý @@ -1651,11 +1658,11 @@ x ¡:¦zJcPÅeÊg”îZ+¤ZEZäTÙ*…žAÑ‘˜±blÚ«‡·V+‘‘ÈT°°q¥ÞI{ŸÇºžu{WÓ!-¹çÑð>>>>>endobj -788 0 obj<>stream +789 0 obj<>>>>>endobj +790 0 obj<>stream x¥WïO9ýÎ_1é•Â’„R?@9¤ê åŽTí©©*gãM\víÔö6Ô?þÞØ»ÉfÛJÕY{~¼yófòù O=|÷é|@§#J‹ƒëÉÁ“ƒ^2Óî—]àŸöɘ†ãs¼ðK+)ÃÙõɰz‚—½ø¶ð¶¿`èäöŒú}šdìp4>§É<èÑ$=º7^^ҳɧƒ“Ûauìè}þ”æ4‰rq1¢cZKZŠ/’æÊ¥æ‹´rN‚VÖÌrYÐz‰7è­Òs³v”æJj¿BS!”öø!Áö{tÜ?Mð~”­eê•Ñä ù¥¤÷KSH÷ÜRÀ®Ì¤_K©)7 ¥]B4ùîTQ:O÷¯'lÀÊÌXÉnŽ~f’J‡`9Ž7S¹¤•ðËä °÷h4¼ØÜ@òäö¢gú{°“q2À÷6ï‹wôÂèL-J+8±}DÓ`„z!÷‰!W®VÆz¾‹kb]Ú˜’BNˆ9€ÒAò€ˆ¡é l+ é¥MèQ3Š8Òf ¤S¦¾"OÇ` @@ -1666,11 +1673,11 @@ u ÷|Þ†@c8d„õw»†½Ž ƶ΀[ºTZvi{†•Ö[“ÓƒÐ2§oøë†Ù ‹ü1–ýzÓîÇ·ðÎÏ}ËSЋ°Ý‡1r§RkœÉ°‚Ç玾q¾Íý94Ø1¡ÃWf¶KC5½1LØCd>>>>>endobj -791 0 obj<>stream +792 0 obj<>>>>>endobj +793 0 obj<>stream x•W]sÛF|ׯ˜â å*’–d}ú%%Ëv¢:YñÅô¹RA*µäš–Ù]ˆâ¿¿žY,HùK¥¤QÄîÌt÷ô þ<:¥üœÒÕ½º¤¼>z3?zùþœNOi^â›Ëë+št2;99¡y~ü¹)´£/¦)ìÖÓÍÅ„>:[šJ{RNþÛTVº ÒÙšÂJãS+·£»´ÍŒîKÚÙ–VêIÿ5)ÿbþõ脦§¯fgˆ|<¾«Œn•ÖÑ£}ÒUE:l­[ûñ„/hä–MŸESPÅ‘ÈçÎlm Ž,¾O Iô7~ÒîI»Ù ôßeJ㄃”ö—é¤èCP*›«Šj•¯L£i:ˆ¬ha©¥2R_n›\£[’³ª6Í’RÉ2Rå×TëTÅÙåìœü`KÝR âpŸŠ—~0¹³Þ–¡‡”I2 -ì3!bàøô[ëµ›ÐFyØ‹ H®ñÅïÄÉiUpN_[5 Žý>#šï6§¤ ¯ê…"Ü àǾ»“UkÊŽÁµjvdA¯K_­‘?ŽZÒÏÆ‡ -ÚZ•Ã…ƒÈ@ç HξjY1Áä*@¢{€MŸÂÙ„ìwr6ˆ °ÀˆÂ t§<©Š|»ÙX<™½˜$"r þ„ºªCÖ~Ý‚“œZ)Z!ußæ¹ö¾l«jGOª2"}pД½®„wÓ wji:I|éJçÆ;íÇÿ³ÄÔE7”ÇfÏm Ci7à- ò-´_»™H ~eÛªà¦V‹ @@ -1679,11 +1686,11 @@ x ‰+ñˆ—y^cžƒñ.†5ïæвã:Ž ¬ó*_cÁ`”½V“˜×À³ø%ªÑ/P<[S?½º™]rK½Ú7Â¥ücÎ(Ê$èß§tYòÊ5²_?%ž¢eÇûñ²2E‘ߦZ²É^ˆõÌÞÞÎÙC…A‚\÷4‹«mù½ “„•—uóbÔtÛþÜcÚmB¸°[ŒºIØ•} b559Zç°³_úýyÊ˵2Ù]îtÐgºŒNÓÑ êQ×:ßCœ|N'«×µ-Þ|»]upü"~~ùþºë«Óó³Ù)]^ÝÌ®™ÁO·ÞܲJ¾2IomÞB^AøT$ûò O¯Î$™ëÙõ æwg›Ò,['Ñ=^»\›óÿv\7ÔõK÷bø™ßxºn“×éó«sD—/Î8Ì»ùÑ¿þ ÍÂK¢endstream endobj -792 0 obj +794 0 obj 1803 endobj -793 0 obj<>>>>>endobj -794 0 obj<>stream +795 0 obj<>>>>>endobj +796 0 obj<>stream x¥X]oÛH|÷¯h8œHŒäoûpÞu‚3°ñåÖ:‹Õ‘C‘ÉáÎ ­èß_uÏ’iìÓ%0 ÑätwuUuÓž,hŽÿ º>£ó+J듟–'?_ÐbAËœ/]Ý\Ó2£y2ŸÏi™ž¦…N·ä M©i¼n¼#“Ë÷Öš¼¬4µÊ´:uZÓ¤2ÓÈ• eÚ¥¶\ëŒH­Í«^}˜’j2\¯´×rDç´Mî—dì‡å÷“9ÍçÉâŸÊo¾Ü?‘„ÈîŸÕj[6R´Vé¶k©ÌÉê?»Òê,!>h†rú“®â¥³Kšß&W|úcNªªHWNS®ÊÊM©lR«¾;U¯ÕßÒ\wBATéWÜIÞÐZûÖ K!‹y(è#Ò'Û5H¨EBÚ“·*0Öl¬ªG•¹.-HḴͺºågíkÓ$ú‡VÆl‰kVÍž´µ|¼nõ.‰‡]%±½é¨P¯šTšj'iª†ž–l_µ2p `´Îã’'àeªÀØA'ÕHÈDZˆ&7‚øpN¹‡õ‹Ú"䛂§\‹þÁg‡öòçVr@ÅqÔ×2-v%ˆ3¥3‹v…„…—•y®­nP%)‹Ûøq&&·þUUàfh^€_þ´<“éòzŽÆ_Ü\ãó~ðt˜™{@Ž›7Ô¿In’³ä2¡oe“™ã\¿»u^ùø\$sNñ ð·oÌ7]Ó8b\XÆ4Rq¢ôªï ¢ ò(1;=ó›–(9vn„PeÒY ¬55fG®Õi™—€ÛÖt›Ù¡¶ @@ -1697,11 +1704,11 @@ W ö®ÐFK*·5Ìw”t+ò¢ƒ‘ÏzåÎ@ð}øíª×I×TüÆ2q-ýžþ)a£— »oÇzi•s;c3‡›÷ÚM¢Ø5!ù§§ŸýíëòñßO‰ÿá1ñ ˆãaùŒ!úÃF¥„{ l•e€+žÉ(Ë>-‡ÂÊÆ+ù'Ì3`F&\Ä´a‰Ø•l¦“Ž|ZŽ©‚J†× VR|…ýo ¥sÌí_ @(Mm*‚`û`ß<öM7FŒ#K7!V~%”Û­e4÷oδÞ3/3b7I+xïÌc§9D ûøù&¾',ÎÉ9XÈ Ôéóý—Ÿî £à;ûÖƒI1ͱŽ3$Rÿâê·Ï®Ïð†ì4¼e±ÛEó¶“åÛès|€#þ_]ÿËôDî¹ «‹ë D—/Ï9 ^ýþsò?B$“endstream endobj -795 0 obj +797 0 obj 2000 endobj -796 0 obj<>>>>>endobj -797 0 obj<>stream +798 0 obj<>>>>>endobj +799 0 obj<>stream x…W]O#G|çW´.á$¼ØÆŸHyàŽ\Bt‚}º‡8BãÝY<ÇîÌffãŸê™õ¾païzº»ºº«öŸ£µñÛ¡a—Δ–GfGgŸzÔéÐ,ç£!Í2j'ív›féÉ_ÅSZP·/êÇñZT+)5e)µwde*Õ³ÌH,Líi2£Êš\Ò]_âFá$™<¼o®¼Ÿ};jS«sžtèä¡ÞKë wñ—顬 P8~2«´ÉÕ匌=¥ÜXT oìzôtsßÍåäï„ý:;B%4œãµ7ⵋ?”ÇÊÇMå¸ç¼2Ú•>JFI7$ôUé̬—7•öYZ>z‡ªé’W3[Jœ­iã—J?’7伩hmjr•LU¾æ…FÒÂ/Q²ðáb¡žêbØ @@ -1714,11 +1721,11 @@ P  9"ñþ<€Œ°:g s)e3&a<öLŸvviVqDð¤ÂžÉ¢ Ö »îÝnÑn·Ã"è1äíUﶉK—²~ÁŽsسO£} P|T;™^Þ|¸d+üê•Ik~6 Æ—¿Õê„›[Ã.žç²“è¡yÀsõXC]ø1ãZ¡:å÷PÞ©ô*HÓ½%£ìBÁáS{ÃØNì÷øLÊŸGÿVCendstream endobj -798 0 obj +800 0 obj 1723 endobj -799 0 obj<>>>>>endobj -800 0 obj<>stream +801 0 obj<>>>>>endobj +802 0 obj<>stream xW]OÛH}çWÜ—ª©(+Q +´"°ÄUÊËØ'SlwfœÔûë÷Ü;¸&ZU•hÏǽçžsîõ?3:¿ÓÉ%ÅÁ×è`úí”f3Š2<9»8§(¥£ÉÑÑEÉÈ­EIn-‰^T™ê­¥yD‹«ûɧèÇÁŸMN±aÔ*ÍFJ°1–¤JëDžË”„%©p”!AU.TI™Ê%‰2¥Ê¨Ò‘ —£—‡§¿þ|zx~¤­6¯Øï”.I›öÎÙÉä˜ï ë—Ÿð„݈ÙQ%ŒS‰ª„“AÐ.øÊk]:£sZŽnî¯îæTÈ"–fLFÂ4ݺ$¬Ëí»{¿Šäµ®Þ¯\~šP¨¬(·%gjI‚{XLéE˜Š>Å1ݨ•,ô(ÜÚçèaЫ •‹a²•Ñi8;& I:£íZ%kr/Õ=™Š\—+Úù^ ‡å‹4¢l¨’ºBM‡Å_i ÛÕ€dµUåjLVS.ÝGN°!§)É¥0ž$B™áÉ·àBÓ»™lc,P€_kÛÕ\ûZ¹R–/H…±°2`»û™ „‚‚S(¨B¹ê‚¤Ò&F„ÈÈ(§D®þ lR%*S„Ï\#F• ¥œµï%Éjµ9.`¼ŸKõ“n„,ti¥'™©K,ˆ… ƒÛ{’åF]8j†ÈæÞ\?BU•«$„iuæ¶ÂH”^â/Ï ÉÁ­iSŠ;ò¼¡\‹TĨg®b#v(q¬ÀUVÒ«+]Nèb‰{¤þcl ¨ÚÁÍ’+íÖ H| @@ -1731,31 +1738,34 @@ $ ½’ùYãMS~°ÍB;>#V¾Â)|êéùéäïÀ8ñógþá6:øûà?Q$$¤endstream endobj -801 0 obj +803 0 obj 1722 endobj -802 0 obj<>>>>>endobj -803 0 obj<>stream +804 0 obj<>>>>>endobj +805 0 obj<>stream xmR»nÛ0Ýõgt³’¬HB7; C“´Q·, ue1¡H•¤äï{i…÷ò<õ'+óW )±©¡¦l×eßn+º'uÛ ë‘‹<ÏÑ©ÕÖL.DÐ;ùOôn’ÚâCƒQ¾îoðèõ$yx½ ¯œÞCÏ«Çë«ç »ÐSÐ^¾B%CJ5ž#^t¯YŽu±%+XñyÍd~g ;©ÞóyvGžBY‹*!t#@Ú¼˜–,fé£Vz–‘À^<ÍF+µ³pCZÁÓözå‹ „àÎÔ~±¨íþ‹èà6ž¥$-Xwt uWnšÙÒq+Ž,CÇÀRö:Dÿ)èM—q¨Ë ›©Ú†ï%O–ÊÚSeE݈T'·uV{Øm¹÷J*rdê01ÛÑfB_/¯Ö˳U+ZQ puƒÞü’Æe1•’ ßñD1²ßdä—“SºþÜ1S ÚPH¨US‰–ÿ!Îþ²>™ø™ý³Á•endstream endobj -804 0 obj +806 0 obj 383 endobj -805 0 obj<>>>/Annots 232 0 R>>endobj -806 0 obj<>stream -xWÛnÛ8}÷W З°Ë—Ø.PqÒnûÐ6[Èmh‰¶¹‘D…”âúï÷ IÙŽÜî‹A$‘s9sæÌä©S?1M4¼¢$ïÌ—÷ËN?šNéøËlðЧÁp]Ñh:ÁßÃ!þ4’Ö|aæð Ç/?ÌhЧåÖ¯&SZ¦î;Þ$7[QVÒÐ,¢zG•&Awµ‘Ùž"_ ºÑEet–ÉôõòïNŸzƒ \Üê\¨‚_±õïØzoGþ<‹âˆîŒ4ò©VVU’¾I‘ªbãoŒ(ŽÃÁ„ÏÏåZ#½®)CUÔ ¹¤ -ª¶ÊRâCíR™Ia%åâQ’E¬ø,*wWà!Ñ9lUb•IÚ©jË×jSx'Áþ¦ H1#õíN<âÐÇÓPæ4£ixÊhápÅãOÑóÝÝÞ°”J›µ’©X’ìPçÕ¸p—z¸Ôûøõ~ùõå)W8>#¥ñ$F4¾ÖÔ»)õ)ôãáËÂ΢ADs‘Þ Úz³|Õ1òäøýÑr…G/¸Ô…LßrÀ]ž%ˆøSÔíÑÒV!â­„5ãL²ÿBäÒ(…µð‘¾Pµ/}‘™”ÚxŒˆ–[ùŸ,3%­ç¥ré5’as°ÕuupÕ%|!ùSäà¼{[f"AΈÔ?s¨¶å·4z­páÙ -m•z ÜQZ×YF.9xfüøuD×xëºì4˜ƒ†Ñ(§T ¿ÐƒÎp˻սD°^Ðâú³c1‹ÆUäd !pnÓj§é,°ŒÀym˜3ÌŽ÷s l˜sþغ†´¨\˜ýùÅV0?.Ðg?^»BjPhæ,4Üuy~ÝÒ‹9߈¸žÄÍz©§ð"–Õ2ÑåžãæW'YØÝP9|§-䔄‚€vZT”’Su°úïÌGK íbæ™»ÚZIJ‘N+Yt!;DШçoSôíþ¢§YÊ}ŽÂ©nOÐÿv’@Dµ©¶{R^&‚(0Å÷œlK\³Õˆêž OGÔ9a1spºB< •±ÎDtë•›Qhå[)´hÑÀêng†•ÚZ¦Í‰´4#¼Ó“Œ%ÑëøK AË]ªgkcÉ©]¾Mö…*Ы4 ¤”ÏÏ ½^«DÁÇã«,1¬0<Ü<õ ACÁSŽ!©¡.EEþÝ@=ŠÊvÑIV7óôº:ècª1äÝ1“j%VkëúÀlbAp ;¿Æy÷ê ò ßEÁ«n «QRÜF[8¥gÓß7™^‰ì¡g!œ{h›¯"žÆ 1ÃèÜXY½a«—ú4ã †ZŒ½Z°´óø*é-·Ùüºqmˆ·†BhÊ·´—м<á¸ha%œ8N»»òCiÁãGd¤‘, –2…-CÐ÷-Rµ~fÐ÷BVÎæÙ-sMdVCöŒ%2³ƶáÖ>>>>>endobj -809 0 obj<>stream +807 0 obj<>>>/Annots 234 0 R>>endobj +808 0 obj<>stream +xWÛnÛ8}÷W З°Ë—Ø.PqÒlóÐ6[Èmh‰¶¹‘DE”êúï{†¤dEIw‹A%‘s9sæÌø±ÒÿBšh|AQÚ[®{ï×½a0ŸÓéO±ÃÃFãYpA“ù ÿñßBÒ–oà#Ì4püüfA£!­·°~1›Ó:¶ßñ&:»Ú‹¼”-ú TjºŒJ†-EôPåt­S¡²×ë¿{CŒ&¸}v¥³²ÐI‚{*ÃÉ»ªÉ‘V"Ýj>Æ­«Bˆ»Â`#6³€î +YÈÇJUJú"E¬²;;¿™Pú£Ÿ_Ê­F–G]Q„TVIdmopå^Š\>}Ê)Œ¤Tú´öŽºßËLþ€=A•qfù*û¡Öñû“å> +Ÿ^p©3!¾ÕqéÈÞJñǨۃ¡½BÄ{ k…5Éþ3‘J{"ÆÀGÜ|¡ò˜»"3)uQÀc@´ÞËõXÈá ÉŸ"çíÛ<rF¤î™C5¿y¡· +çž)ÑV±Ê¥m•$d“ƒgÆ_t‰·¶ËÚÁ4jF£\|œbþBZÃïF"‰iuùѲ˜Åå"°ò8·iyÐôFàym¬øÀÝ„û96Ì9wì ]BZT*Šãó‹`¾¡Ï¾½¶…Ô 0ÐLYhž`‹†¾-ùFÀõ$îlÖ#¨$8…©0,©‘Î7¿jeÙ°»¦²ÿN{È( Ëv­]T”’uÖÂê¾3 Õ´cˆ™göjmh#)F:dÑ…ìA£ž¿Mѵû“žæ)àrVu:ƒæw“"ªKµƒ8’r2áE)~äd;²`›­B|P÷H` 8:¢Î‹¹œƒËÐâ‡P ëL@×N¹…N¾¥B‹f5¬ápfX®aÚ´¤¥áµO2–tB¯Oà/ht©~¸XkKVí|ð]²¯T†^…¤È  |n^èíVE +>Ž_yŽa…áaG±  +žr QuÉÊFÿ® YiúèÇ(©êyŠþj˜çuu4ÄTcÈÿºc&ÕRþäáoªúÃ{€lbA° »¼ÄyûªQùzi¯úDŒFrQà6ÚÂ*=›þºKôF$ßÒȹûV1é&ài 3ŒÖ‘å¶z~3¤ï!ÔbêÔ‚¥ÇWNo¹Í–—µ{¬L¼5ø|S¾¥£l(òô„å¢â4 ìî ¥‘F<°0J¶ A_÷HÕ|w3ƒ¾f²´6¿“Ù3×Db4ÄáÈX"#ÛðÞ#Ì# ê¬Ï¼ÁÉW×¾¾Bî”U`ò“,—·ŸWä(Âî`j¯¾ +#W¾rûi…†a=GI6(Z¡E Â4všhŒ0òF­r‚í¢ŽÃ*SØ‚šÀì˜õAl^ ÂÙ¶çx« WáÆI öÖ‡BÚ`㔎¿§ €48ù"¬ð¬S¨P…ÉÌk¿|dG÷ë=ÔÛ 6¦“<£iû´q›HÇçGÚèmY—Nñr”sŒ]ùw[d|‡ú}ç{¬ /Z5/xN>Û£x qno§éï–áyó«¿þÇ¡ÖÀ Ïùñ3™M Eìîl:ó1þÙûù§g~endstream +endobj +809 0 obj +1563 +endobj +810 0 obj<>>>>>endobj +811 0 obj<>stream x¥WÛnÛ8|ÏW`6lùÇv ,Š\ÔM»ˆÅy¡%Êf#‘®HÅõ~ýÎ!)[U’vEÑÄŽ¤s™33‡úv2¢!þh6¦³)¥åÉÕòäýòd˜ÌçtüQ­ñeHã1~Læ³æc%)çp Q?p÷àö‚FZæ>ãCæ¯i™ž^$gÉ(¡fG™‘–}1Õ£uÂ)£)W:#å,®•BiJv•) Y½{³üz2¸Ðh÷Ç3>½¤»%íZ!ð”ÛÈ&ÀýåÇ«KüA8Ú À‚ @@ -1768,22 +1778,22 @@ d# <¥Ä¾jØ—Íâî´:.x{v@Õ'ï,õü2a›k'Q)t0èF qd–e)2Ù#(—‡EØÐ—åx·¸Ç=~_Dîp±|3›Žq¢“ް{c¸”`u¶£R"=ß n +¬‹Ì*X%µ©×^g‡\þz'Yð<+𠀉4•–Ïi¶3C>åò,½›q—9 ©®ä‹|9ƒ8¾Æ—)Kß³%xÒaÇ(Ç?(Õ–«8í#™>ÝN¯žÞž\Þ'WP¬«Tú¸‡b$Ú¶Z~‡¤qĦz±µÆt_k­‘Ê¥Þ#˜ó‡U²&Ê­šym ÅIp(°°ÓÔ“HÔlZ©-¦Ç £±xr¢×v0¼L`ÇóË/\g°µpJ +Šq8`ÝÉv°_æ/BÔ@ðDýñ'•~Ã[¥9¿?¹y5!Ê ¶9¿p5­cœßš_»Üy8ø?W;¸Ò¿|àúçþÐsÊ‚3ül<Ü8&7šN“Þ=-ýI>Wæ+h€£PŠwœÛ˜üT4áæþlŒÅìÿ½(NfÅÇ9ŸspÉÿ<ù1M©5endstream endobj -810 0 obj +812 0 obj 1589 endobj -811 0 obj<>>>>>endobj -812 0 obj<>stream +813 0 obj<>>>>>endobj +814 0 obj<>stream x•TMoã6¼ûW< ‡¤‹Z‘GvE‘ìnкM==ÐÒ“Å­D*$Wÿ¾óhÉqÜöP,ê}ͼ¾Ì2JñËhµ ëœŠvv¿™}ÞÌÒd½¦·‡Ûá%¥|u“,h¹^áÿb‘¬É1U’(s| üê!¥[ÚT(£Ô¦ŒŸSÚ—¥m•6Ô*ØÑ÷dì·›¯³”æ"r hì΀½D\=,)ˤæ<£ù"Ç(F¥P3ý¾kìV5Ì=A[C¶Šç¾Ý&…5Õô~ÿécB›Z{ôÿ“}ŒÁYÓ €³Óq(©hTËô|÷ÓýÝ7Y1Mx}hº×¡Ž©¿=~y&Ïî•ÝX•¥ÎÙmÃ-©C‡wµ!оp¸üù™vÎöÝ¡Y¨U-+(i›nù8 —´¨µàIkxŠZ–1˜:å0¾ð{ñOº/¨²®8o¬´;V?;r°¥}­‹Z )ê~éù"âÃäŽ#¥4ˆü<9Ý*7ЧÃÎ?Zœm°%M¢Ð «4MòIVÖ¤ª«‡[Ê–²ð”nò<ŠãMF·ÉM’%ô£ÝSiéY]£ „&ì½SÞï1Šnø‡÷úÖ+ϯcÎ{Áœ$Ê:<¯ƒ~µjY©%,£Ö÷5Æö©Àv©ýA)iUÉ«è{\ägÄÔƒª MaJëʱ€4Œ…G]¿ÇAÊ”'!—SÛ(ïçsåLqÚìþ…ŠãØ*°‘î†! ¥McÃiXByywÐòÙD0W€¤Wþ+¼aâ—^¿ª†Mðß‘Ôö>ÀAè­:bS¸¡ P´±»3ùíµE½edïÕ `=#¹;Yó#¼_9ÛF Opö¸19Ðá ÄÇ}Ðp½L1v©€·$ÜûQ÷Á)ã;ëBÏtðÜT1,"Š3¡…* î}[åáÅÔ åò°}€`ÁŽwrZÄ':†Ý&‘œºfyÿ‡kÖã5™å«Dnvܺ'×o´3=9û7%ŒYô-6¡äÒ”!懬ù!íò»l¹Z¨ÒòòæV Âä¿Ìþ¶þÄendstream endobj -813 0 obj +815 0 obj 812 endobj -814 0 obj<>>>/Annots 245 0 R>>endobj -815 0 obj<>stream +816 0 obj<>>>/Annots 247 0 R>>endobj +817 0 obj<>stream xXMs㸽ûWtíeå*‰’(É©ÊÁ¯7®šÝqÆÚtHHBL\€´Fÿ>¯B¤d;›¤¦ì1Eýõúõƒþ¸˜Òÿ¦tÒ슲òâoË‹ñÃ-¥Znðæêú†–9M’ÉŸdƒO;QÕÒÒt’Ðsm¬Ò[zåZüèè7'íø‘í”–—Ë]Lh”α{p—e¦Ñ5)½1¶µ2“Ðôùþî‰î••Î:ð&6>Å.6>šM“”€µiBO­ŒóGæ4¶«Òk^³Ü)G¹ÉšRÂT.]fÕZ:Ú™=Õ†'óhà¹~¼Î’xëpÐt<ª­È"Šâà9ÇTï$¹r] çöùj°X]ÒF2!zDüŽð9̱NÔ~±•"g‹ÿq ÀZ §2j4Þ¸ZèY>³o6!w™Ñ™¬jlÒy»yoì —¥‹!½öl(C‹Bæðê (•'µAy¸0g&…EekTª±H+Û‹…SÒ ©*¤@Ž­ÜÀΙؘ¢0{vÆa§KøÄŸ–Œ&)šò__¾˜N&ÉŒéMrC%¥ÈòmûTÐ3cà\¤·xÛã—Jj y_Oµ[ìêºúËx¼ßïƒÅE.ªÄØíøt¹÷ËÇY‹ªÑ5Lðù`•^]ûÓá÷t1OàÇtß%Íð?¼ôO­—,ÙßéÖõýUO…в>æí@Ï¡2濪üÆ›]&*™d¦ëûÿ3Ÿ%sšßÜÏ%ÝÌ’Iûð&¼¸xÔw4ð«©eÀp[ÒÞ%MgÈèéqg%G²ƒý7'ùñ«TÜSOͺP\ ¬m,Ö€Û)bˆ´mT¯Lè ní烫eIwy©´rèY´:6íT¶k›…«eÎQŒ¼G£ØáV@硢ݤ°ÜéMYJ;?NRg&¹+d’hoHä‘-¢œil†Ž fKq ÊšWïèZÒNÕ¦)HXOl@Ù‚a5O™hÊÛE²hŸºV˜§ó³‚,Ñm§8ð­Å=àéyôtÿiĽ2úû—oË/§K»”–Bé?`¨õ·ZdÊÐ'ÓTR4‰·ð§Mr=g`²'¾•hìðôYh’9³xo¾p¿.©T[‹çÓ8óÛÆšò£ïºûüÏbòT‹ômQCæ^C¥Ðb+=Ù*ÛZÄÈî`Cx< ´ !‡aZNr¢k zÙƒ7jÛ‡ßMR<¦O&œŸÙ͵oþâNnâŽCp¶#§k>¤6Mè‘íçMÆYbw™Ÿ€à+š¥‹ôäMûô&õ° ØòpíÎ]ögÚx•úsx´Ò;\=KQî`“­ôŸñv>=}Û{ÆÛ« ÀÝíÏ{(ú_¿1¨so:³‡ª&?kÍý•ÒýðP´¨TxÉøºÇKˆ6UoÂÇQY üäž(^1 ±ÑW5=ÎïÑ¢”CúüËxŽ>2ëìü´d§)Û $ÖªäyªFñ±)ÄòE¼F1Q´–( «–Nr¼ ¨§@Þ £­¼qc8 y ('òWØ‚¯ü gÉR¯ ê‚Xâ9N{Uï{¼bëµI!,bÑM¹†paÒd5åh5ðú¯s·Þ™Æ!V·ºô$ @@ -1792,11 +1802,11 @@ x FŠæ~¸{zl5ŒBRÁ :Ðk89Ü2}çCЗFƒœüý©mXà ;QækT€ÞðÂjPYùª©âœ€=‘°g™¿àùí\ì‡;a¾xP@b“3Ä3êxoýôû3ÕVJfeÈ‹¶ÁRˆÙ€Ðã|“kªÊØ:â\‚§k‘½HÀt5É61-7ñôñU ËC‹u#0 ¯¯óõÛå¸][Ð?È›²ÂMÛOÒèd,KÍ· ix!‡òÌ_\0a( ßí÷Íà®hjÃÊLÅ“` ±ø9îœÉ¨‰g÷HûyÊxŽû¹F܉Ü4º¯IŽ÷=þ2A#pQ¨úÐ žÇ¸¥8 8Pàñ»^½¡ƒiâcüpÓÖ-7[ÿo¿×¡ÿ廜9®í5újÂqC£þãâ߃Íendstream endobj -816 0 obj +818 0 obj 2085 endobj -817 0 obj<>>>/Annots 254 0 R>>endobj -818 0 obj<>stream +819 0 obj<>>>/Annots 256 0 R>>endobj +820 0 obj<>stream x•XasÚHýî_Ñ•J•I•H`ÀûéXg}g{}×ÞUùË 0±¤ÑjF&üû{=#„ Nv/¡Ñôë×ݯ{üçYH}ü„4Žh0¢8;ûuqöyqÖ&:¼•k\ô)öƒ! 'c|‚ •’Vünb›æ Ë{7C CZ¬°ûh2¦Eâî÷iwb­tiÅ2•´UvC•QùšDN&[˜mB+•Ê 2*+ÒÌ©ˆ%}hîð~¸›M)Q¥Œ­.wHå$Ò”ìF~Z|=ëS7ŒwW™Ì­°JçA}3ÁÜ\l$<ü¢•ÜR¡Un YMÆ–ÒK]YÚn„å­‰ïÝDµƒn—½è¦‰(ŒÈüͽ÷J´4”kKE©ßT""Ø#‡ÜTE&N°–r%ËR& ±E»Q;µ|8ì«ò8­ù ï‚v÷^M)“"7¤W ЖJ¾1Ë•‘%‰8ÖUn±;‘9NhUêŒ8¨<Ñ[CQAÆV½Iší)&<þ&Ë æ ®9莑 nÒy‰Fãúæž¾×⇕Aõ¤{>òÿ×ÎÝh‚ð63¯FÆ:OHY™Q o–*¼E)³§Ë]n.ó9\NèqzO™NªTÄçîËãÁKƒ\qü!Æe”+}®‡œðO_΢0 ty9DYd4èO‚«ú*¥¹+\^•@ª–¥@HÌ£^Z¡ràsaxœÎîh®WvËIùÒq Ò”—³‹ël¬-~éõ¶ÛmPˆ$ àfïx©«I^úò ~ý¦·n]¸”J$,¦Î=0¶RëªD(NRÑ9N…ˆ_Å`ÍRî˜`ÎJëBr~¥§«.O]¶VŒŸð¼ŒÞÍ…¨=–‡áÕØÕèA Â~0h¸PÍ]âØ—nÄâÂ%\—”È’%Å:‘\;QÀ¡ÙØ2§î§Àœ¸ [i,>zõa~/dîl1TŸènaœ*HÇ 5Më‚FéKo×lt•"Óy,q¨â­._½b=HkbQÈsÓª)ïZËÍgÿ @@ -1805,11 +1815,11 @@ CZ µX\²Øµ¥ÌTËLùùùP×-©ÂKÿO„ÿo©.Æþý üOäagf°9<¸Ãs•a>fc‡|l8¶:YQRÉbÃØ8Cæ€5Áë_§5ºú;û©·Cx®Üá£O¢ËKñ±9DàÓníóÃí€÷Fw$ÎôXÑ`Aãl…Ž…çÄ#!ä~m÷Ó©#ˆe4Q8ÂTµ¸:dÍá (Úó%å6GO¬zÞ9ò½)áž‚æå O_×ä§ÚŸâlPh-m±ÍEö‚cÄI`L ¸—.øXÊUÄíÇ'¶½l]Ä•2W)Rk# ÛÌ¢·ù¶7¬r ISˆs¾ªr@uÎn¬q(ŽmºÛ‡™“‘h˜‚O¬¶K9¯Ì&ÎßÚUä¾â9ò ZÑwb€Ñ]`P¶5Ó,ÿ|N#¦ôÄæ¶x¸sjó9îæÒº³hsŒIÅ;‡”Áß*rŒÀ}¸¬b‹ÙM‘½›I­9áh„ø«ÊÄÚùôþ×)=–š§šµÿHÀ»~yw¹óù_­†ã!„Û-…ü<ôþßgÿ7´ˆSendstream endobj -819 0 obj +821 0 obj 2114 endobj -820 0 obj<>>>>>endobj -821 0 obj<>stream +822 0 obj<>>>>>endobj +823 0 obj<>stream xV]oâ8}çW\©¥R „ï>¶3ÛU¥Ýîì–yC™Ä€g“8µþýž›8Rf&•¢_ßsνö{'¤þBš i4¥(í<-:¿-:ƒ`>§ÓËlð1 ‡)^ãù ïp: †d$­a; Ñp‚O¿4ããÜÿòn¦óTÆCl.½ nÿùÂ1-ÖÈh:™SZÄåî-¢n8&}ÒÙZm £² ½‰t%h§Ü–þøüøånñ½3 ÞÖqeôW.3^¤ÈoNéŒMûÏc @@ -1817,11 +1827,11 @@ x @í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ u<¡:ÒkŽn%¥d¶’5Wq ›•„Š!¯Ÿgð¨·î“zhóRn77ÔÓ± f–ýÛ…e“Zv#$S+Øù^ sbZ˜Q$nyWW€Äê®»’NO+|ÙFý†kï¡‘F&eŒ0ÜÑÍnþåP-a°2Ýk„ÿ‚«æ4ùXz‘E:M%F—ÛòI­é  Ú þ“ÇúldÚÔ:G¯s h1^™Þ&<Ä[˜ ±Ò¢b]c(­$s:‹kª>l® ¯EºÂÄÏ1ÑSñ•ÙæÇÌ¢¬Qõuo©äˆ_=FUÐò67 ÜÚ.ß¹æþ¶Ngßùútºu½=þùôH_Œ.o<ŸuTð9^¢zÕ®^µíÇîhãÙS½¼¥M‡Œ2ü»ó? endstream endobj -822 0 obj +824 0 obj 1030 endobj -823 0 obj<>>>/Annots 269 0 R>>endobj -824 0 obj<>stream +825 0 obj<>>>/Annots 271 0 R>>endobj +826 0 obj<>stream x¥WM“ÚF½ó+ºv+A[µć‡=à¬×v•í8^n!‡A@ö !3’1ÿÞoZÀZqœ¬]Å2ôL÷ëî×Ý3wà@ÑF!Ż΋Eçå¢3ð§S:}˜ Ø6šúSO#|M"?$#iíŽ@ =Íö÷fŒi±†úpŠ/ Ë´ˆ½`àOü¡O¿éln “fz»•¸Y|êôÆåÁÞ0ÂAo±…­”>¸{aÄNæÒX°/¾ˆT‰•’”fdw+?†VÒ™:Ò!Í·TêV:½^ÏýÚS‰Ø[±»4èÑAX¨‰U‘È„» ê#èÄz·OUƒ×wbWí~àbðñUg"FaúcÚBU E³åŽÂ™?:“]Ä’•!–ÈLDPuDçY«ay·?®<îEÈžxËaq8€¸Ä7pnÕøxqÂWɦc¤9ld­øN)sHcŽÕ)Ý%Ri¾Hó °“™£`¶\4`k˜9£“ìl¹£ÙôBöïŽLf`ákÙ ‘ì@³${Ž#QˆŒÔŽðâäH%›ŽíI#û °‘Kówpm±^§_Ÿ6!ÿ5X^œÀV²hæ4id?6t¤úì:U¨êç€ Nõ6áÅ l%‹&.²ì'ÀN‚¶ÊÛk“ÿ?¨J9¤ÉpÌt¢ÀEW,ÊiÁä"Ph…=}/‘66é @@ -1829,11 +1839,11 @@ x „ÌÑ!/ÑԽë[âÒ›,o.÷ÔÍ£ÈÐW7М%d5ZŸR”éœV=~/E;[i¤OôZ$Jù–¡ƒî•d¥§Y$äÓõmC s/†•·÷ó”¤Fƹ6GŠu¡{˜0$¬SÕÐÌõÿ€zC—-´®ëkêÖô•Ž…êÃìJôUºê×¶jYnûŸ¥WBýõägrÿ¬Œ1qò#Ý9\%ݾ:É[d›ã>GD¬=h“Xì=J‡Y0 ˜¼oÍd¾Jµ¥ # »óÇ׋—¯~o3 MŸ7F{ì{?ÿøþͼÚu¡ðš¸Ï©8æ§a×¾9‘ë4“œÿû÷”ë2Ö[™Ñ*Í7¨ð›cÇ)äp髽¹püšÜ¨­ÝæÜåÛÔTãÓñÁ"k%åêЃ,JË‚xÌkÚ–‰d%þÐÁêâ<J¨wh†4çÝCŠŒÌ÷çrïë\aûΡ¶_3ôýÖ®ªŠR—õódÅ„Ü7kŽÈÕEC¿¢/BM’Ÿ„%ÞŠl#í-"M€Ê2‘ q©ÀG¾¸;Ã9¥.lWqvÇWz'2ž¹ÕÅÝ^j”Ómß1ÃÝm6Wí™'»—qº>²/\Ueb»–¶ÚæLÈ¥~ˆBåÖtÅãDUhCXª>±+ŸQø€ÐŽàþĽÇÇ·¤÷yª3:8òá–¡ÂÛø×ž¸¥×Õëu÷¼È…É)W ôŽ®ÎºÔø±¼ùx«€¼9ßú¬`\ wqqí©bKGk'UŽ^ˆ»ó­I&\Ç€@gW?@ÉVïh4µ¿S þBŸ*x+`²½rí׺i‡’ÛÉŒÖù¸­s˳‡J<åK£<†Zßš‚CÂõQ 3_né¨ ²[žm;¸*u¿È¯©u5Q‡ªzTð#¸€r­3.‘B•sóÂÈsÌý"—–;MÿaZÝôƒ0ÂU"ÄEŒ‡àãüÝ‹9}0ÚŘîu\8Ù†Ð+·÷¢!?­~“£1tò¾pä#/t¾˰Ùöendstream endobj -825 0 obj +827 0 obj 1429 endobj -826 0 obj<>>>/Annots 272 0 R>>endobj -827 0 obj<>stream +828 0 obj<>>>/Annots 274 0 R>>endobj +829 0 obj<>stream x­W[sÛ6~÷¯8ã>¬²#Ñ’,Krfü ¦u›[ñVšéìŒ_ ”% ¥èßïw’¢Ù¤ÍÃ&3–(‚À¹|—Ã?®&4Æÿ -¦t;§8¿úq{õóöj-—tùcö¸À²ûûhJ³åßg³hFFRÊOà&¶iÿ`ùÍãŒ&Ú¦Ø}¾\Ð6ñ÷Ç´Ï">¨BZq¬«Âá 6ÊE!ö2¡“rrIVä;± KHï>ËØÅ™°vHŸ+ë(Sÿ•TYi.ûDô«>É£4CRîöÝöóÕ˜F“[½MUINÓYWüa68Ì´í¢ ”¨4•FŽœ‘’têzúiõB…È¥-E,ßûßìAWYÂQôκÖÕÃ/FW¥&ñC™ U|Ö’¿k³¿n ½_C¢Hˆy‘ºÌü²o?âSŽè_¨AïÐX©ÚW¨%’4´ÞlüÆ/«g_i“¨bŸéuPÙJdÙU*|¥o¤‹o²D”oAÍ>Â)]Pª2ùú.ªÏšÎÑvócAî Ia%M£it;ôÛù¤ê~æ\F{¶Næ¤,í°4!ìZj«¾ÔéG´=à^.¹ î \غ—].|¿îÄïá«Ü…GDÚP¡O>[šÖÛ‘GL®Ž(`ÎÇø:Øgz'²Þ©R¦c‘Õ±Ö•ðÓÝò6ZÖ„˜‚ nïi‚:1úïîúú'ãhÑFÆ•Qîì;ÔE:Ÿß%ÏhÊäl@¤ç‰;iRy©(m©ˆ62—ùN:d Û¸²÷¥²Íq(]÷4B{ŒzÉ'Ê€tÚœ}÷oç5¥¡£kæÛÛ ˆ…w=Jv–¿€µ'mÐxCT¸öR8,ÛUNÒQd¢ÐØ ¡ªElÎ¥X<ï@R 0FNŠë@F ”ŸË;xÎõÍ&J¾×’ÿ«a‚úp#‘ä¨@PÔ’ŽJž¾ü_Äþ]¡5š8š.¡Im Ñ\0¨lªt?øfÇ —!'¿8’T @@ -1844,11 +1854,11 @@ Q në_­>‹cêYFµ——2VÆÑÚ¿%†ew.ñHûúôf]wðc†½1Èxiñå°¶{¡ÍÝaæRå~Ç£WëçÕú‚ÂÉ|´;ƒòlØÍ…@^ì3Z †Ár ”×Þ™’hÚV¿—äP4V9L88ïWg‰æ5¦3é4Hõ“NãKoáq©áà½Ï¡ïÓÔ$Q¿}GüÔ‰¸—Ëÿ!þò”< ë6Ò¿Þ¼‰ŸEã®Ü£°Nå|Q‹ N0ˆÉýb쌚ØTi@ßl/TowŒå›íøÄã9ÞNypßÛ¿e­4“ÛetOóù}P‘Íêùǽͯ¼ô“Ž+~Cñøá G“ù"‚è,¦~òýŽ÷‰Ù‚G'¿z>ã-0ˆýûêÅôqendstream endobj -828 0 obj +830 0 obj 1781 endobj -829 0 obj<>>>/Annots 275 0 R>>endobj -830 0 obj<>stream +831 0 obj<>>>/Annots 277 0 R>>endobj +832 0 obj<>stream xÅX]oÛÆ}÷¯¸¨XŒH}Ú@dKŽ 4Mo¢"¹¸ìÊ\I“\•KFñ¿¿gvIJ¢4)nÓ‘»3sfæÌÙýã§þú4¨?¢(½¸]\Ì=o2¡ýG¾ÆzøLÆøõ½€rI+^€gØ¥ùÀÛ/ﱩO‹ï:šŒiÛz´ˆ:"ŠŠûD¬Í‹Å§‹—÷ƒêÍÎ ™"WÙšôŠŠ6"Q!sC¦Ìs]f±ŒiùLæRÀôOŸdaè¿¿\ÙæÒȬàõ0€· ZÕFzÔõÙáEÜ1e´!aè7 ;¥‘yøâŠ>„ΟL! ¥3þåcØÉ4m…1x“ü²UyóPd1Ñ,ìÄʈe"ãð…G.”¨ @@ -1863,11 +1873,11 @@ Ee(1 Àòœ É ƒ{i—®–gΠŠoÜQÉ­@˜5@ø®{â<‡s®Ý½¦ °#½µgsõæííª<Ù#wòG>n Ü}ßì€WíuÎËûkòq5±â›¡`l9ûÛ¿ç]{4wÍD?ÏïiNäc&Ÿ­Ä]:@ëV@ÒpØ1§X‡q›_ÃútÖ¿ô‡·CÐÌçn\=Ù«74ò|ܾÙ`ÞOßÜN1,5C†a3wáÅ«ºþhŒ—»ãÀj‘ïN2âhvíhÈ¢Æþ}ñ?õ,endstream endobj -831 0 obj +833 0 obj 1836 endobj -832 0 obj<>>>/Annots 278 0 R>>endobj -833 0 obj<>stream +834 0 obj<>>>/Annots 280 0 R>>endobj +835 0 obj<>stream xUYÛ6~÷¯˜Gˆe’’uX >·²É&VÑEh‰–å•D•¢°q‹þ÷%_a¶Ûµ ˜áßÌ|óç€Á‹BÀÀõ!)óx°ŠÄ C¸ÞT†\F^à;sC'%`‡Ê&Qäø'Q:^/Ac(D—Z¯ DïЫ^â´ˆ“aýœ~äÞ=Jð "ʼwña@`D1Ô2“Uœ—b ÄÉíA$zQð¦™BÃË-Ÿ%‰l+méµy:…¬f–ä)Ožän×›gÔ ¼Ðõ½ÀÒâI¢×ÏÐËï¿üçß–š‰ôm) ñ­ÓÆ‚W‹=¯²sªãµ”ìFFÌÇj ñ« ‹B>çUy¼‚Ëk•VG)h#ÚJ½ڷРv @@ -1875,11 +1885,11 @@ x ¯Ìòj³E1…ñ6¯Æ[Þì-oêï,OÏaТxÛ¸½@ ̵ºÌ‘-ØËR,s…Ä Õ“1ßcÙh‘Éñ©}­Ì^˜½BéCÛèóhþ'MTúZË0—!¡žOüÅrÆ"?fž‡­J݉»^t Ó/Ò,e.eÈ­É"•Ž×Pœ½26 ýÞr'Ò#þa!Ëç¾1 õöNôK ½0×Åfæ%¸$ÂgÿUÀÆÐÿ•dÐÍ„Zn Á%Ï àEÉÉF™q•šÑ{ä Ÿ?ÿ-¡CöÂÿ]¸†¡Ôñ§nbœ3A\´º}a´€ØXKeÒviÁ3o™IC[§\‹]œkçöt¨Ä®ÀbwD·1;˜ÃìBw®Èc¦wZhß!žx–úc¶#®§›=µ™=Ìgð¨¤Y7°<Çu.+c}ÔŸõdž/T÷ :6F‡~ÇûXª/ƒµNXendstream endobj -834 0 obj +836 0 obj 860 endobj -835 0 obj<>>>>>endobj -836 0 obj<>stream +837 0 obj<>>>>>endobj +838 0 obj<>stream x¥WMoÛF½ûW zrP[¶dGrzK‚0Ð8n­ =ä²"—âÖä.Ã%Ũ¿¾ïí’M‚"Ž“»óñæÍ›áד¹\âß\V ¹ZJRž¼[Ÿ\ܾ‘Å¥¬3¼Y®ndÊåìòO’Ó÷¹ª]Ë|>“OÖdF§ò‡Û:ëe£›Nk+ŸM]çå~ýjýÏÉ¥œ/®aâTÙT>Ýßý-­7vËSäú›ã ý_Íg ‡¸x»ñM­’&»†ÛþØbÅCw¶ÑÛZ5ÆYqY4O?LR;ï²fŒ4yíÚm.¢¤í#/¹äŠÁ#òi˜T×ÈIÉ/¹+öë¦ø¥Od~c3¸£‚Ûj«]ë7˪m˜—¶;S;[jÛxÉ\ K…ÃóÆ”z&ŸµTµöx)1¥eŸÒ©tc@†LOÏpŸÆåäØäZU¹Q“˜|k-Og7….Xô.¨ŽæµP)SVx ÇaŸ8=âü×Ã{ITQø3y(ÚíVÁ¬¼m­mLïpi[hœ`‰˜Ç½*ò£®w&AVi’œqÂŽë†ÒM\Þ¯%u¥B iíÃñªÒ @ê«4è£È½'!ý>¥R%¹±¨Ä:7^*…ó’jŸÔfƒ¼Ô¨ ãPr¿÷.ÏD« @@ -1888,11 +1898,11 @@ x H¡ñØvd@¼‹Îr`UÁ󠘤œŒeËuŒ´ãžç"þÊ÷w¿2fžœx$›q7`sî,&ßx#žêåÖ5’ÂNÌÉ “Á>IÌá‚„8º˜ -Ç%£w†ÚƒOãæÇºDR3—¹'ì/F ôJKNæ³`ãk«±ØbrÅŽ3:àŸhšŽFxa `Ó r}èPÈMü*Š[ê•Fù‰±ÍDÞéD! ss¶ÂxîE^€ŸŸæÜN"_NwF…ÈîÚ1ñòˆßXÙ¸³¸Lå½fS«zÿåþøÈ9ÅX ›#ä¡#=Féâ,Û“^£Âí±¾Â`¶M¨ðÅíÍñSíê2~5ýÔ§c zÏ^"ß7,S»^]3l¹â¬Ìžük~Õ­endstream endobj -837 0 obj +839 0 obj 1670 endobj -838 0 obj<>>>>>endobj -839 0 obj<>stream +840 0 obj<>>>>>endobj +841 0 obj<>stream x…WMsÓH½çWtíÉT%Æ_$áhÈn-‡„,1‡\ZÒX"͘ÉZí¯ß×3’?IJ@ÖLw¿~ïuûûÅœfø5§›-¯)­.Þm.^ÿ±¢ùœ6[|r}{C›ŒfÓÙlF›tòÙ+çɪ EŸ>|¥ŠÓBE)‡‡†¯èa#9b“Qîl³#2\)OìådG­mÊ,¼ú›áZïÕoñ¶ðÖôÕæÛÅŒ®æËéÑ'9!÷§…m mu‰›È[\Åu¼"|¦2J:‰žÙŠuÈEÒu¤öÊPis<«åœ¢óì%QטQ`Ž/}½ú¢Mf[òÊ{âQŸ†^\OW}ÂÀ¨ìÈ&{mO8®SÔ€Cθ/Á3Òž¥M.H„ÿÅ’FØEèj~Q!ó­uÕ(Ñ»÷ëÏχƒ4< èOiS ~•¢vÔ kâ²´­?äl2U+WIGc.NeÚ©4æn‰G‘{ SkjgË=G”–Mz(pÚ±«uÚ”ì°/ ƒ Ý:-¨v—Wûkx8µUN™Tecl×Y¦%dÞ]ß9»×™ ÝiÐ_ƒ˜pðp¯Ó¡œH?z<–MžsR*ZŸUyo³FH÷&êÉk`)Ý>yG4ãk‹‹9`AËzŸ'½ìhùó«Ð¤ß7ð z³œãçêö?øƒ(Ûh+oiyˆ­¬ÞÞie>Ÿ.§s À.W5}†ÔŒS/ºZˆMN´S‡—‘?$e]ÎÀ!ô\p£‚÷¨Ù©¿µ¯!ô#a‘ÚÀ7³uìA´ng EOLxΨ­öElyƒÅû€õ‹¯û »P þ8=вÕ@>>>>>endobj -842 0 obj<>stream +843 0 obj<>>>>>endobj +844 0 obj<>stream x…XMsÛ6½ûWìøäÎØ´%»²›ã439Øu+eÚ["A‰1H0hUýõ}»%ŠJëÉd¢ˆÀ~¾}û¨ï'ºÂŸ ÝNézFy}òqqrùùž&7´(ñdv‡]eWWW´ÈÏ&“ì&›fô¬jMsíÞªÿnª¯Z|ÃÕšLâÕ‹é-®ž-ÖúG§ÏÉ:zžÏÏ©ò¤¨Ô*tNSX«ÀßPë´× >7T«fK_Ÿ¿üI¶ÕN…ªY‘ßú kŸÑ—@Ê»ñìþŠ.&×Ù”ÝÆ„û¥u5.Ù†|—¯IyZ[$àÏa»20P)¯FSPçµ;¸DÁÒR±æMT:[SQ•¥vˆoìÕv.×ë3²Ó«º5úéùÛÊØFSÌdcÝ+¾”°jµíͧ¼‡0¡]…mIT5v\V}°!"Õ€ª›+CòDª•Ñ5:°kF€2lqÐy3 ®mà¬SÊ?ˆi”µD8ðvNRJÄÐPnߨ¥ç/s*TPKԚДãRã;EŸžçœëÚ §úf|úš¥GÓYÆ`ˆ›ÏIµ­©òXãÖÙ•SuÍØ©š ]©ÜˆÚTͲBï9éî‚צd´ ôÒU.}DÕ‡BÎ9UŽ} lS‚7)ËÊÙ®Dèä=Ôï"K$9òi—AUMGŶ =/úâužý?Íy$ |pzö­*9°$¦òÜv7ÝtµÌ˜mú²öõU F$;KR3ÕÒ)·0Óx®šh-ŽÓsg€"1P«|DÈuMƒ€GiöáÉôZvl kȼ°ç†ZÓ±·-×%Šþ{ô2¬m·ZsP[Ú`€ÓŒD›#ßì3õ*=¬uU-‰Û&8ÇLð Ncã+—ŸA­Â†gt©C~Ùx/T™a*Êx¢çË3ƒ'ÕeÞZ½2;Vß; vjañÔXûÚµ1*þH}cø[Ö8 wã‘d`•›³YW`N°h¾¨jSضôxܹ«.ÎÅPO†Ýi«PˆâôÐ @@ -1913,11 +1923,11 @@ Nc qRm‹Îð܃¸£­ð€„Küöþ’]yÏ~UŸ¡C¼Bqy¹ø‰&M –+Ûëm¦-wl•„u7Š¼Ø¢™`ec¶1~ ˆÍÀÂO¹`¡x°1…|šcDv“£²krÞ¢èsÕŠá áÓ`—I63úµa#Ê~²€ÁÝ¢çïwÁ¹çè˜O!nð†ƒþï`p{í»É€eͳçùžyº±ñ¶¤•3ñ6øûÁ¦×˜c¾Œ…V;P!xn´.8óQÄÀu!ò!ÀHÛ…1RFå÷óG$Â8ˆ(éÁ{ÆE‹&S§1îxnÌ÷ èHä¤ò: òUƒh°Ä#Ìv ¤ˆa³«!rî[ÉeGï‘]¤W¿,N ti:»†’¸¹»åÏø Ú)ÇÂx:½ÏfÇÒø:£Ó­Vj‰‰|è¸¡× O2§BYûáãaüÞ5ÈHã-½6vƒòzzyx‚J@7¡ODÞEÂ^úà&»_ºGÂ#Lð몢D¢ óuc]53.@,³›ž`*Qæ­õ¾âìPQ¡Ør»—Ø×C§µ† àp9ßIè>üÁàÄa¶À(­ÕçgNç¶n¡sa ŠáyTqr1¸FXegD>Žœî¶€ÔLîÐÎ(G­…VŒcwP–‘”ßW[“W¢[´mÀiÀœÝŒ¼²¶ˆ›K Ò¹Ì [()öÄ[QCËŠÀÊ‘AKTaoY°; )±… †âz䥃cž^Ë¢š‡(½Œù©çÄ©mÜLÕ¨•,Q¡å]œÈ~÷@ú°ØðÍšÒ;èQXpÖ+ÖX !7•te„tÜñ½L?º±Ï Ÿ’nB,QPò|/ÇN ñŠ_A.ò;Þ +¼˜ E/IÖ}ŠR’£¼3¼þ»,‹\ÁZ¾VÍJ YD¬kÐ9àðhØdì ‘ùýÈ:Òx‘Ì&ðÀOzwÅ1 #Õ±_* øQùàZ–x”ù r|¿Ó§q­¢ÿћžacG2µUuVñ:o¤Á²îÅ#利yŸ"£€Td7 t‡,1X¿µÂÛ ë.ðàŽaË©æÏÓ¸<Æèï’ÊšÌn³ ~±¸ç—ÀùÃÓÇ´Ó~ãò~²9Þk’øã[ñðÅí?kïý¬qs{“ÝáלœÝóu,ŠßNþÕ骛endstream endobj -843 0 obj +845 0 obj 1820 endobj -844 0 obj<>>>/Annots 281 0 R>>endobj -845 0 obj<>stream +846 0 obj<>>>/Annots 283 0 R>>endobj +847 0 obj<>stream xWÛrÛ6}÷W웕›–(Ù’ßêÄMâ¶¹4Q&}ÈL"! 6 ()Yß³ R¢é4íxr±ìåìÙ³‹ï'#âgDÓ”ÆW”•'/ç'¯'4Ñ|‰o®fSšç4L†Ã!ͳAa^ù=Î=ª7T­M Êœ­¼+hi M•£\WÚ—ÆjÚ­UE¥ËëBþ¦p*—W5‘ªñ­L¦*ã,ek=²9+w_ÌïO†t>')8ŸkŸÐœ½ 'K•i*Õ¬«<7v“dõ®o8h¿58ºtž¾»0p±ÕÈD«°?#Uˆ¡Z­s$„Hºç;wÈ~åÏß_¼|Ö`£Ê¿wÑt\ü²ErÐ`@l s£…ž… À{tV{Sí/úvûñæÝSÄgŧ;@y]è­²5‰¯Q°\UÑ52v»gøo¢6ú¬QÌÆaD¡b™ÆÒùgéJ™"$̯óІ®Òq2¡ÉlŠÿ§øƒ(–‘e×4šD–]ή“«'<’ ~è Â:¼ñl»»¥ÄÉòäž2W_Á'p æ›(öJ.2ê^Kîµ…˜¹Ûz?—’˜Š)À†„\=8Y Ü)oQøœiº4¸ûmðéîöÛ‹HÃîpD¡0«uUì)7Ë¥ö¸Ç|úòþî/PÚdkZ+”ƒ¼²+MnÉÞÚ7Äâ2qðÂÆé^²  iC Jï÷Ýs×° 8<\Ž„„î*¦_SßÓ@÷nÁѽh…Š•ô¨DjòC\앤{p,¨„ˆ1îyn¬F~Û¥YÕ9Wx\@KH—)%.bà(l¸‹Ùz~ª)`{ÊIúôJekdÍuèÆFlnA&úöÀ¡¤ ¬´ÕJ‚à @@ -1928,11 +1938,11 @@ y?u{" EœAù±$BºÀQ ¢`å…8U¬˜X5– ¾ Õ^jó;îò±.4´d‡— ÖØüŠN#Hçk¥ÉNeaØ0—·X« ífI̤ø8 )ˆÕ éÁ•EÍõìËß(k/ PX:ÎMYÀ›88'/PZbåbcIˆäíz ¹q ºx=k^t£+.îÕô2™ñNÑøèÝ= Û+pŸOS¼”óÁÿ}ÁL¦˜—+ÓaÓ žü‘×ûŸendstream endobj -846 0 obj +848 0 obj 1782 endobj -847 0 obj<>>>/Annots 284 0 R>>endobj -848 0 obj<>stream +849 0 obj<>>>/Annots 286 0 R>>endobj +850 0 obj<>stream x¥XMsÛ6¼ûW¼žªÌH´HË’==tœ4i3Çn¢Ž/¾€$$"æ‡JVõï» ”ÌÆ¹t2±%xxûvü÷Y(sü eÉÅR’âìíúìüÃRÂPÖ>Z^­dÊ<˜Ïç²N&ÙAlVµy*¥©¤ÉŒýõÍúv%Ý®Ù*¸‚Ñu:yŒ–+ñ/ÝK¾›EË`Á÷kl•çÕÞ–¯7·ooD¥…)mjÕT5Ϩu~ªtKDµXY6&QÁ³B'™ÂêÂö+>¯ÏL}â¹s™…Aijî{'ÚÃ9#Rm$­ eh®ˆum‘ÞŒ´¤¬$¯Ê­®¥Ô:¥W™zÖbõNÁOÍÃf'§©$©Ú²œò‘ÁÒ³®ƒ.%}–±­OÈCVõÙ5âV©)·.Çp0i þÿ’ýÇÝÃúNõT[³- sb¶ÑÅËÄ37r¨ZQµ1Å.×t€ùp~%“»èO‚÷aŠ*SÙ›1Y“25ʨ•5ùáñ –Þ2w¢ÿAµiv”óM]t ¯*ÜÆ‡fvêS5ÉØ°‘¬3ÕˆU&¶ª`9?¯¯ïonìtÝLÅV.ÞB¼W# źi€lcø´ÇJxÅj#=Œ•ø²ZeŸAî¿>C÷ÈåEˆŸ‹«~Føœn|·]KˆnØ e×+Öc»…apD|Ñ·¦vù·4zþ¡o(¢‡-:éŠå`©k+Iªrc¶-²Ì^a©à2ÑW5ië%E]sT Æàœ¼½y÷I>®å¯ûŸ^<éàq„ONÀF9CûXfy:BýDb•ý^H^¾8öô;Þ^,ƒðd/¢÷Ç8ê­ôqŒ]lP.ŸÎ½Ží­çßÁ‚3 |*€¡cȃ›Ä’ä él¦®©7ˆ93Ø™?{ÐiS­+SO߾̫^ !¹0›h´Xªƒ1@Åœ&ä7¯æ^º‰F›Ü4=Y£e;‡l€¡ìèGvJ˜ìužó÷®"ÁØÄü3ð @@ -1941,11 +1951,11 @@ n ¼Ìé„«Ä.òåþ–¬Dæy—„ŽlpAX¼Æ5nX›Ër,q8ÎÕ„¼ë®~äëSãªò 'óíèyy ¦ü^­.GG¨6þB€Ë»Ùf 0 ¦œa!ø¦v2SkÒ˜ÞYLÌ_„È(Ý%ÔÄZ…)?Õ;]º[p»Uí3 ì¸+7¼«õ³©ZK"t¨#¾º; èäÌaéüÃUÇ^áÒ$Ëë Þ<0ïëê.˜üUÛ…GÏf~ñl͹úµKÙbµèÿò± ¹Eûóì__ÝAendstream endobj -849 0 obj +851 0 obj 1989 endobj -850 0 obj<>>>/Annots 297 0 R>>endobj -851 0 obj<>stream +852 0 obj<>>>/Annots 299 0 R>>endobj +853 0 obj<>stream x¥WÛnÛF}÷W ‡(ˆEŠÔÕA[ ië"IÚZouQ¬È•Ä„äª\ÒŽ~|ÏÌrIÊ!`HíîÌ™9sÛÏ"šà_D˘¦ Jг7ë³_×g“`µ¢þQíð1¡8Æc¶ZâÅÓ`A•¦-öNh:›ãÓ-MVÓþÐb­rZp ª»T„—º õpP¿NeyBëdTS?{±þx^FnÄ΀|ŽTS›Ä”[·ÜŠËú8‚ ¼çÔùB}Ò”äZ•ß*¡*ˆd» QÉ^«˜ tR¸h<¾Íê=å&+Óo•Ȧ}ÏYÊJ[«÷Géêõ»7¯ñEˆ2 […¹ITZUlÔ±ŽQ@WZS½×T(vRR“4….kUg¦¤lKw¦ásGS‡æV•5Õæžzk }»×p¬Î­èm-ˆIåÖЦÉòTTµîNIÖIS«M®I•)åÙ¦RU¦m VH‚Lh¾š"º\ÐsûÈ//ZOaÏ|zÈQÌ@ èg‰æÚYµgF¥µà>Ù}P{y#AÃN|‰ŒÚ±ÿàð3süè~•Z§ÖªšRŒvç^½÷Á±¼¥Jp:ŽT¦ÙíÉÉ,oƒ,2‡Ì Ƭ¢CeºbI†˜sæÏž“5N ê‰DÖõ c;h”(\¸„Ö4U¢C#Gxÿ§…€WþéØŠü·Žû­iÀoVÊD[«ª;6EJ»ykòÜ@äŽì]±1y–À•å§W_;/ilÎ(þÄO"onÏIYbqtèv#…ºN: "ÊçòˆÍ…+`%5VW`;0| ä‡|KíMf3N‡me @@ -1953,11 +1963,11 @@ x Š/f: |åtÅchŸ5óXvΤÃ÷C!­÷Ú")`oªmReÉ*ŒüRƒDž;ºÌè‡MÁ€‰säɽ­®_0Ô~¼ñ[øw‡±á‘²Õ9×y¢O2©V·Êòïc± ›Q “fÛ¶Qfe’7©›túnãkoKà_»ÜlTþ7Ypëìè~óÅ”{åì‡ ~zláÄrüÔð#Ê tr¤s7(SH€zOÏ_>?we÷—ï^¿}ÿÒ/³@„}¼âKÁ$2£H¨•¯–ÌÞ¯Þ÷1ÈŸ¸šÓSêë^ ȸ١»$ôœüH/űñòž•Ï85YŠ…Vøã˜åe‹8od „5AÖ„ûÍŒäýöU„ÍÃ+ЇÕâäGA š±@9÷ð¥ãáŸ_€ƒ¿¼ŸÂ¿à»ÓCÇCów¡w“„.1¦# xJGUé\Ãï'Œ#ðSö:èBÇÆU”?N¡Ÿ®¤¯?ÄÏš%tExuÃȹÓGš1'3íÑ”é—Sšã弋枔“ªÃK¿L¼ª ®»|›Å]Ê]s~¯ÌG$:ý2¼îH¼D‹%¶—±Ü|ÛŽAkmyúA=ÄÓÒ‡Fzúl9CÙ”K™&çœýТe„endstream endobj -852 0 obj +854 0 obj 1521 endobj -853 0 obj<>>>/Annots 302 0 R>>endobj -854 0 obj<>stream +855 0 obj<>>>/Annots 304 0 R>>endobj +856 0 obj<>stream x­VkoÛ6ýž_q×¢ˆ‹Ú²å‡ì†´IŠ hÓ­.ŠýBK´­TU’Šg`?~ç’”í¸I€bk Á÷ÞsÎ=ä÷“˜ø‹i:¤QBiyòf~r9?D³íz…— ‡xŒgS<ãZÒSñ6Hv# ÿÜ$É8‡5£Q”øÁ2DÞ=¡5 3š/‘M‚èóÌ hžvˆÿ=§U~'i“W‹¼Ê¨1RØPdÖ²(èkGUÅ–*)3™Q¾$»–[Z ¬²²¨¤%‘¦Ò˜¯/_Îo}™m1gò结!וL“hH%Å1'ïß úÄØì3v+öp†SÌ?LØÊ².„•´V¥ÌrÍñöKÝ/,íЯÔç}UÙþ‹‹þ‹Ï!5ŸH2AHdÀÐ%îíÉDþøáDBO¤Lû aÖ{d(™L¢YàŽ™w¤ƒþÕ a¦Õpr/^G“h#ú]å@ŸÎß¿9'°u'5Yå¾}¼xK™*E^q¼þÕx·aoèKè\V–çcƒ¥* @@ -1966,48 +1976,48 @@ C ¶E?Ù¤µ¡žô­´¬[H³GÓœ¯ò¨ÉЊY“J&§?>cÌë†c±U&'ë³ ´´ý<ÀÙ# ^»ÿ÷Ò8PíµA}ðhïÕî4f©wÉê-ƒ´Â±kpÆA‘˜Äå†X°jµpŽã›3WØöÿÁ,\m©¨×fïendstream endobj -855 0 obj +857 0 obj 1279 endobj -856 0 obj<>>>>>endobj -857 0 obj<>stream +858 0 obj<>>>>>endobj +859 0 obj<>stream x½VmoÛ6þî_qHÆÅbÉ’;)P ‰“Å–—-Ú†aÙY¢#6©TFO·èøÈ9 FÁuzõÀþÅŽ!šc:c ¥Ö<€(éMϯ¿:“EÌœ¤úMô±3€~€9¢ã¦ýÍÔ æ÷ÓæûTee^Üb*…Q2Ïw;M™2pSÍr®³Ý·IÆŠ¸½sñKÅ5k÷y¯dUÂÌy²„©b±‘ ®¢Žè_Œ Ë~ýpŒA”¢ V‰Äp)`ÿž&Ì>$±!0cPi–‚‘€&¨Ÿs|,Ähs˜I“A.“8‡X¤ps6¥JÛ·{JH{©%˜Œ5ý!^`ä9Â%\ÜC"‹W¿%j¸Ë[‰IŽÈUIi^9ëamíQB˜+”±Ö‹Ô›7–þ,+Й¬òÔVÛÔ1›Ø`ÚòAãûƒ¥¬<ßó™Iü]»÷Ü.Dcf«ƒÔqÑ•¿àˆ Ö̶ ‰™uåOõÜÛg& rÅlg¹”Íã*7˜9ËsíÕë8¨g:Æu&³ða³°Q©ØJl¹ƒšxŸ—·ÑKèÚ½h¥¨ña¸’.)ßj•ë_¯Ú6Vk©wè ½±ü7‚¥Æ:hši±V‰—ú\pƒt1sù6Ûö@›X$øœçÌŠuMèb·rÅäØŒ‹t‹#=HcV éc©&†Û€â9Šm#ÍÕN€i}± ñ~+¢Øáæ¢a{2U ó" q‚ü/i4P?Wc¨æŠ‰õÃñÓæIi2åsG9¶Œcì6€&ÀDñÒÐqš6¬°•sñ$Q¾A§*ö‰l·T²Dd4{¬˜Hæ¹Ü– Ø^¶gAísPkÂz ¹lûÀxìÀÙÚ¬­ñs%‹¦ºgó¦¨_iåÛ©æ£Îf±üq{¯Ñl$»¬Å›/©È¾}Ë£}XU‡eƒÿÆØ!ÀWS¯>æúá¡zv›»ÞÝø½iC}²Aýó͇«³w{·—§{-,É$ôt÷nI<4,º´;¨žxÂô[h[Z‹c$κ÷ìú&úp}uÛþûóèÇ“oßu¿n±Sz-&WÚÕÿ^Q º÷/•þƒÚ~rS© ÿÿ¨u›’ ao1Êulø·Êúºn9ôÙ#^ ûqó!üâ˰þò+¼~©J2ðŸb«¹_W3½ÔÄ2øô îîZ(‚"¨ ´x(f*…ìwn[NŸé}}„l߉PŲÜ_k8‹qtãÐTŠéRŠ”´„׺ÙàÉ‘UÏß…™°R—I$w¨¯¢wYþkrÇ„¬ÜmR;5ï_Õ§o0{Íõºw{ryz7J~Ä œÉ¤*°Ì˜®‡X?Oй? ñžöêƒ"¼@"]H4\W†œG“^¬ãdDðñ]ç[j—endstream endobj -858 0 obj +860 0 obj 1172 endobj -859 0 obj<>>>>>endobj -860 0 obj<>stream +861 0 obj<>>>>>endobj +862 0 obj<>stream x­WkoÛ6ýž_q‘…Ø’åÄŠtmÐ`ëc­±aX†–èXµ$:¤Ïößw.IɲgºlŠ÷uôýIDCüG4Ñù„âüäõüäíüdÌf´è;|Òh\ÐÅlŠÑ-i‰­CšÎðxìE45&£Q0Û›ŒG{›)¶Þ‘Só@ìðzH/h¾Džä5Oìë!Íãù¿uše­b2ù"9›=Ò BØÜìùüvþëÕÏ—Ï^y/ã•:òê§›o.O?¼}zdÛÒ  g§_VUY¦Å%j‹ïlIFê‡4–æ%³oò/þ+ÿÑwð[Z,Ò"9–ÄÿVÄÖÅyºçÇ ùƒž¹fÑ@ÞƒŸQ/Œ¾Y9÷+Òóç¤s,)|:ÌT¼Mµ0;‚Oõíô Z–•F]2ÿð÷ðú‚¢ˆ¹9ˆh€1ãn–´SmJ¡K*W’Üæ±ßÜ«iº·ïõ»{j*ì!Q$Ým¸[›)2W…!Á)¤†6*-ʾMͬT•%´$™¤RQ¬ŠBÆØ©8ߺÖsWùBXKMÁî\¤å2_`ékeJ^O]á[‰a„ˆŒ*°?`VW Ó1æÒ©E£"˜ûðú…G{.ÆcEÁ88¦ý¨ŠezWÁ¿'³äÓÕûÃn€3V­öÍX‰I¹H$¥Ž¥ÐŒu¡¶(0ÕHZ§®hP[¥×<Ò¥º“GD¾Å[QXÈPd2ïŠñ„0=¤,*e‹2U-•&Å>­¥Ü€8"A<„™ƒ:‘swlÙÞ2ͤ¡BÊ„Ý/º¡EV¢ ¡?¶ï¦”øºí½IOLß7Xçb-i!âuµ1¤lÿ–NïÒÍs¨Bï-Ç{Ê2‘P`g»M¶%çôŠq)H–(àÜ0·g~±nÏï”-ÔÛ•#lµ¹J*ÇJàºoÊ6-WLN¬9Üj]µ@àä ­?p;Vùiy$,L|–¸bø„ðô‚ШJÇ2,ŒA”xåê®g»GIª1Jïh±®ÊñÝAŒ3yT‹~Z©ò÷¶™~z‹ñüËÓ%0öÚÛò´Ô*çò»Mi²?š´'Òa޽§ÂöˆûI{™ˆÕ&utã x²-‡Â`U³ÿªÌ[#ãJ§åÎwÆ “P}–É; Ô¹”yßñt y¤¾0Kaíèx‡Õµp{´ñ†7Öµnï;ý 'ⷢ̿mÌ~X\ nîâDñ(«²5ίDq'“€nÈIk&—µh¡-,´Ð*a^Ö5ûÛÑ`4Æu šÇJÃ7#-ï+07©¯I¥Ø:qBÅk°®– Kב{`ïÜOq¬*ÈÝ÷;ÝÓ»}j2‚‡s 6€#7Lžtéé'²Ìªµäƒ…«Z{.]‘õAöHbrJç"«Kó)ÈA“y´Ö(ÿ¶-Í­"c Ü·gà«Ì Yb`gúö¸X–›D°üîtm‡ÄʲV¹ê=¦ßÉo ¹Øað4ÓZÜl^8:t ² Óºï²üwŠ”’o•ÙÖѱ°Ôtûùhqo¹»=C~B§AÄH›N¶J¹¥:(™RW1®K²ßœ;±@‡¸,[ #Ѫ&CôÇj±™Õ^C‡s'=†û°ž–êÚo«úÒµ·JZ{èÎŽïÖ%˜rh׿jéß5?LšÑkÌw³ðzæœh2–“Q0áýrõþõ}Òê+_»Þ¨¸ÊÑa+«wMúÁt„:IÏ߀hŽ;%_Eæ+< }¬ì!{_PøÁƧc¶Æ]ë—“mqü¶endstream endobj -861 0 obj +863 0 obj 1385 endobj -862 0 obj<>>>>>endobj -863 0 obj<>stream +864 0 obj<>>>>>endobj +865 0 obj<>stream x­X]oÛ6}ϯ¸ÈIlg@Òv¬E·xØ´DIl$R%©¸ú÷;—”l×q´‹±)òÞ{Îý8Ì—“)Mð3¥ÅŒÎç”Ö'oV'¿­N&ÉrI»7[àÄΗü~±\à}:¹Jfd%åxxB—³e² Kç´˜ãϰ‚ð Û7œ4¾½ é”V9 Ï— Zea}B«ttk,å¾!'í£J¥#ohcì5Ö4ÒVÝ)u¦¥ª*•3¤¥Ìø!©|)-Q)%)©G•µ¢¢LY™zcÎÊq8ž¢ÌÔBijaÄý²ú|2¡³é9‚Ye#QY)²椓ړѶ°?ÒžNHK¡ ¾-MÓz yY7•ðX3$¨ZÚ=º`_ÀñhÿÀrð&!Z•°L©Ð´–$…SU4<¼UºˆÎðÎñ-( Ž\½NR£óøõ€íˆŠÊ¬aaØŽââå°gç+Ç€6'ü¸ÌæÉã¯ú#¶fÇÒ§ãFÔI6cû)WÕ6ŠˆXçKU™ øÓk¨)xvà ˜ÕB4rªV•Y&‚/êµèˆâóÖû!²qk#õ4†Ü©Œy J=0©ÊýC™Ð§è\F DëKŠ/+¿´ !á5®ÔzìdÚZå;FäS¥œ"A²âšÉ‹ÚÉëLjd¼¿ºÀ<2MZ{íZ !³!XT`ÈÊe׿¹Jçæ1Ë=°‰3Ïñ‚ó΋ô 5xí:‡Î8üŸ?´”U厸•¦¦ ±ÐOG¶;âõ"sHIÅÅOhdßåú%¸vÝîŒsiûÌ÷ë©2…Ò1 wå|¬¢´艡HÈ 4£èPwž4ªŒóÚ½jb‡,—ÞwG˜|Õ}!Z­¾rŠ¢t>åÊ:ÿ©nÛËŸVÍÿäĪM ñR»„}!Ìç«ywÄë…ÆbÖrS{½C_¯öHØ;Ô4uŠ1ǯ§sÑLŠØ×â}3×ÉSº#‘e¬)¶o;4ÃØ£ì©¹o Û™¡ 5ÏZB†ÀκõQÁlÍÅ‚¬í‰’-<[Kp߈XV?þ”'g¦\¶Ö^€–âëQiéYWq³ØwC< »x‡æßK¥§Ñ?_•ûN2$rß;òmÔ£ï#ÈqCVedr‚Z0]E™iו<ðš±n|Ô}Cr» l‚Â…žðhzv;hÖñíM¡{X¡ÎÓdþFâ‹„~‡Fñ‚“/ô]„¬šXÔŽþîEN Öé¶^#dx]ív²êQðÚÁ†‘ne͇ôOaùRxÚH*!9z&0eÙ‰yë[{tB”1ô[ 7¸£¶æ09ŒÆ›x[À/(Ôù¿+Ý~%–ܺ3j€S¤Š/M[”Ô ¿Ù! ž<  îCü€6•ÖCwÃ`c0]a/!ÖûÐ<{çAõæ,{±|JyŸýÁ­·omô,pä õÂ"ŒnéÝf7a¥aŸÃ®<*ïãƒî7ÊÃ9ú±j‹"qƒiBT†Î4Y[Éí„éK .hªø]KpÃxÕ¨qÂß54èÿp ÐÇ›÷TðåcpGà‰‚þúp÷(×™±.éK0íµúÙ"ðü*$áèßÙ|ѯÊ€—Ï.gQ)®€I-š> Øsé™ÙÀýy÷.l© k´†Zd(ȪÀ%É—5B®8'G&¸„s¸AæxG$›R>j5ÛEæörÖRaMÛDꔸÏtƒîOX¡Ô¢ã+N¦Xжô,hÂemhQ¤îGÅå‡ûH†€IÅœB àkÎ6&ƒU=$7ToU:ß Ñ'zH׌6ßù»—™£!·ªmˆ}ƒ\.‘vÇúã²OÎé|‘ð?pyß»Åßß¼sC­ùŒ»7½3i[£˜BLÌêYÜu·ŽöÓ‹Å2š-æ¼ ýqòøL?endstream endobj -864 0 obj +866 0 obj 1577 endobj -865 0 obj<>>>>>endobj -866 0 obj<>stream +867 0 obj<>>>>>endobj +868 0 obj<>stream xmRËnÛ0¼ë+昶*9‚ä¤z°áÔ*Ú+C®%¦éòa¥Ÿ¥e E‚âÎÎÌÿd% ~J4+ÜÕcvßfŸ¾~FY¡=òI½æB¡È‹¢@+oÊ2orи@è]Ï_Bô{¼”;1äÎZp˜týû!vx›È´ù°µ*äF%òËò._%Rq:9{rZ´ÕÒYoß÷b>>>/Annots 311 0 R>>endobj -869 0 obj<>stream +870 0 obj<>>>/Annots 313 0 R>>endobj +871 0 obj<>stream x¥W]oâF}ϯ¸â%‰6ÈJ«*‰’.ÚÍÇ.´ÛJ¼Œí¼±g¼3ã°¼ô·÷ܱ jSµM${¾îœ{î9—ïGêãw@㈆ç”GWó£›ùQ?˜LhÿaVxÀ´hD4šŒñÿhŒÈHZò b›Ý¦‡·õi¾Äîçã ÍS?Ž7ÉÉõZ”NlÐÃ,¢ë<“Êч‡¯ó‡Óù·#^;Õk{C>ržž`ò  ÛËÏ–§ô©7Ä^Ík |ÐJ„¢)%Z-³U…ÐfaD_…)éZ+%GÚЋ·#–D³Ýà<à(O’:˜%¦ÎD‹ŸxÜ#Ò^qÀ÷üòóQtv èl‚Fã þÖO9Í•ðvDƒA}³ñð—Th„˜è¢Ì¥“$”ݧɭ3Kß+i]¦•¿S,‰–ºR)á…w‡´pŸÐÚ¹ò]&Âè<ØdÊÕ³Tþ‘KYmBË— 7@#X»"½Oo4hDçÈ.и6KDžo»´Õ))Shd¹VÈ›}Çk@ž^»h¾–t›å|©”M†Ü6)^œO¯îèQJs¼8õw o“¤ÞðI]Dçãf°EÇzƒaÍ…ùõc8}$ÞMHJ:²UYjãþ×®»s/ÝÕôaFúÙ¨ÏéPj2~ÄyxsuóËô_Ó‹&|‡ÏTYL3µ–¨ ÌXGnƒÔë•ÄC›Ì­ýX,¬$]J#O'»µNÌAq.ÔSûœ‘?Ê\d Ê”_ÌÔoòÙ"WU‰< é². Zs äFŠtK±” @@ -2020,21 +2030,21 @@ M –s•.¹¥X,‹acFkçï¶ïÒÌÀG´Ùrùû•>¹1fR ±Î|cÕ…gå¬Û˜ð¶Oܱ `×guD?Qÿ½eS ä]Å¡UfÌDÎÞ³G>ÁRXw蛳ŸÓ´»çxñ =Éc D¥÷åF§Eï2·º QÇnWÀ*É«e~õѼ6ýL,Áð_àW«Õ6 9pã ë©1ªaÐ4‰pK”ÃÅtôm5ÐdèØ÷ølî³—‡y“ðü ÷…’¤¨A_$e‡ÚF!ˆ&#Tif}}ìk¯åþ‰gz˜Àó¼)ßñ¿¦ø/+¯l²ëʹÛÜÇüOßKF¨Ê¦COd>ý è$Ñûendstream endobj -870 0 obj +872 0 obj 1597 endobj -871 0 obj<>>>/Annots 314 0 R>>endobj -872 0 obj<>stream +873 0 obj<>>>/Annots 316 0 R>>endobj +874 0 obj<>stream x­VaoÛ6ýî_qÈ'phKqì$H3$­³¦ÈÒ, ë0Ðm³£DU¤âùK{ßQrb;ë·!ˆ![äÝ»wïù­Ñc:Qšw®’Nÿú”¢!%s¼à!£ ”¤Ý(‘8tY)òK…OY¬Éò#içjåhµT}šöcúÒå—OªrÚ_ÞVPíTFÒ‘|“|í è0‰dè¦F«Âÿ¿ö¯‡EMþÃxÌo9æÚÖ”Y’t7IèóÍä‘lÅñ\kÃ`2º¯tá‰Þ…€ô œ­«TÑUeWNU=*,Me>“„¯ ŽÜÒ®¨.'Ÿ$.6TL?=üÚ‰ŽÄ˜FñH (Q107ß M™2€¾•,Ql* ¢™¢¹þUÏÖÀ^JŸ.i^Ùœ»¹ªuié}yÖï§²²F¬táDý$EaúßRõªï|1ÅÒçf7JÀÎQQZšt+m ãÐEjêLea¸?1³« 3Ò£‡m³ÈÎŽÝx’ÆY E o”ÚºÕXÑ´½¬į̀ÜõÈÕ( ½-+ÅÔêbAÆâ[*dÞŠc/»}U©Gdˆ)«äbª?ÜÖG[ýS‰þM— E·¡ÝÛ ɦqt|rŠæ OÆhUŒï‹úøxôZÔCA ì†Ê£ÈŒd•)ø}U+3ZWFs¨/ȼ‘®û™v¯uå|ÒJaðç–\i*A¡Þ?ÜÜ%ï>ÿ…²¤g‡p“by&A,ùΖkV›¯EĤºÆ„Xsg<ÄØ£—Y“Ë¿Cåµóä|+§JYzgƒ¿‚R dÌôÆ\¶Ò ]H9àM¬^°[a=$€Ðzûú•À6ˆYõXXskçU<‡1kñ éÞ´ õ]²!ÎÂImk‰="™e 7Päò™Hm1^« :4±GÖÅ›h¹,é-³Ô¿Ž_ÍÆ ­6 6“¨{ðœ nat¼ŽÈ•*Õsݸ{7f÷'‘zÄ8±'ØH»Õ†_[3U{ mÉ «`6Ðb FÛY»lÃä9†àÖÒ zKç[$„ÜâÜÓ­„…?ÂÇ·Øy{9<|œ$b÷Í^Ê?0 yä-å“‚ÐŒ×<(Pž,KðèƒÌ™WÝŸÚ¬[f×› ˜­b^”hܪ¡×ö†õ"=VzVƳ{y}hÕ |’©¯¡ïõñ6« û·LOa›“‰§—ðìd¶†|’Ú´>þÔ(Ç)ès·`{¤qv…¨>>>/Annots 321 0 R>>endobj -875 0 obj<>stream +876 0 obj<>>>/Annots 323 0 R>>endobj +877 0 obj<>stream xWQoÛ6~÷¯8ä¥)PË–íÄNž¶uK[ h·Æm0 /4EÙ¬%R#)kþ÷ûŽ’ÅéТhmYGÞÝwßwwýg”ÒRZÎh~M²ý¶Mînh6¥uŽ7×Ë­3š&Ó)~‘—¯w¢ ÊQ:OèíLJõGúUJå=Ý‹r#ÈÛÚIEÒfêåúÛhJãÙç/ZÐë/÷üßžâG¾}Ù…²x–BLñIWóª³X-ñSqŠòž¹=·7«„¹÷È].i Ñq6X:¹g“»g|[óRÈ6êÑ–\m‡ªÞZÇ®zS´,C<•õ:Xw¤Üºî5¸Qh„ó`©1_¢§]%ä^l•E(¹,êŒ ƒ}EÎç3ú¦ĸ©· !P  ð74!C8zöЇ×Qˆuà•ƒW²i+ôè{g}PˆóÅÑžN¿‡6DÝaÝu€Fmþé¿muÑŠâR|þˆîB”‹>uPôðð@gdÃ07‹lÈh®’Öð—ñ8ËV›LtV‹‚rˆÉs?a¥ jÈPGíãÎÂÚ=³º59hî Dð«Í–mW€á6¢~DvPéSÞÜ\„ß·Œ!( •+p/W~£B£Ðà„9Æúvƒƒó`ûÂ]_'×4OoðoI³”ûlûtú|6ÅË¡@>£Kr^Ÿ?½§ÛŸÖ­ÜêñFVnWÝ'­g¨Ûùô&Yý@·³åÓ ¢j¡ÛàéG$Š`¶“‰3jŽ™$ˆŒu%jŽ»Hº‘C[} ˜Be-whvÐÓÇÙ‚,«†_¡ƒŸñ(³Ôè°û>w†¬ŒÅÖšEÃèB NÁkTõ^©Š¯)©Æ§¥L€ëuò™ß˜¨ç;@œ4UNå @@ -2042,19 +2052,19 @@ x Ϻè5ÆžQÛùl–Ì)½¹§xˆ\ã³}:q+½á‡ÜZ# Ί,W )øàèÅyE•Õ3€Øõn{µý +›¦Iäõ” d8‰PFOÏÄË$æÉVû30;9½xkF~«b„/ C³oG°ÍQ*‡†áÔ'bNo>|¦7¾çMm¤Û‰¾¾Ä6ðÁ¢„a×ö ÆÜõûQßð»1@['ª–@ûtËLªhP±rŠ+öh´”Ë–.ÄÛRÅÖ%ÈT"4¹…‹ÎÒäÕòå=[âQ3½ÃHŒ(¢V Á“-w¶¤nj?Źoi`BÜöPë- ŽkQp§}†+ÎëÇš[î×q´U¾t‡qÉ#‰Ô¿¢¬àU·;‡÷Ø?˜9€õ×°ä|i’¶:2Ç#ùã°r+é.Wdaà†¯›½fvc‘|Ü [1øzƒVêXÇóâI •É@ÝÔ&#Êh‚•z܃ò›ÆŠS^¥úhºÞp^NÁæˆ}’·:Þ1NfœTÔzlV„Ž+Ü1‰]zŒ%Û9Öèö§EâSÝNˆ®äOíÑV™“»«nÏæ“}ÀìlœÑmÕ. ·xþå´.Ýr»w­sNÇ^8¹[u·Œ9ïù­1ýüÿbëȺX.p<&µšrŒè;þ3ìendstream endobj -876 0 obj +878 0 obj 1481 endobj -877 0 obj<>>>/Annots 324 0 R>>endobj -878 0 obj<>stream +879 0 obj<>>>/Annots 326 0 R>>endobj +880 0 obj<>stream xTMo›@½ûW<åD¤‚›øTç«í¡’›Xí%R´†“ëì.qýï;»‹?ÛCea;¼™÷æÍ¼"„ô‹0‰1#k7‹Áð!AaQ˜Wãt‚EŽ0ËÌûµâ-* ¦Þ¶¢C!$ÖL©9ôvÍq¹x%”¨Gñ²åÞìp½À†„ðãq¾÷صÐ+ŽL4 ks{ìS”3÷F.|øpÕ#ÒÁþK‡ŸcºV\~p9¥çÏŠ5KYN‡ô(…Ð ûö´ÿ¨„ŪRØTuLr¦9±Ê+É3-ä«kž;Âj5«Úª-mͨ)ZéþP‰Nf†HÎñìUlÐ×ûÙÉM £QZš•%aKÉÚlõ|ÀV¬“’·º¦Ä‚îÔZ´¹‚j„Èù¯Åº¡ hÉ)‰?¦sûó©‡å ‚´•05“K±4(ýr‹Ní¨8uâ]ã|y*—Ó›œŽ<Q@ËJêŠDÅKGm©v¢#,áÚŽ‹»¡ rSI–­í6| Ui—ȘD´gy$ïL¨‰¤“£wÒž˜T—¼æL¹îPÍVìLt5ÉÀ‘‹–ŸÊQˆº#NïËs# þÿFô%žfßof/ñKü/W™ÒŒ)#í¨m˜é¶@Ã%éS9ézóY¿e+Ö–ÔîŽ(Zî@!EC.×+÷ù™ˆNì½í§û9Üy69WÀŒâè:Cºunf‡&ÒŸðûÅ€v’QJ1I:¡û˜.ÉQ¸]sˆ6LA“ž„QÎaÙ|ksþû€B«ŠÖ"ó÷øeÅ&ïhbÆ©A”Žƒ¨ªñäÀǽ“C:HìÔÀç²jöhhpKC-©ß\~rËÉd9ä“%<ܰ쭔ƸV·}„ £ˆáCºÛP㉩&¹²Œ<ÛnÌ¥x¥}B³ÎL.Ó•³±ÙpÛ}·§PÑ©ÛiÔëðcðs¶©Ëendstream endobj -879 0 obj +881 0 obj 734 endobj -880 0 obj<>>>/Annots 370 0 R>>endobj -881 0 obj<>stream +882 0 obj<>>>/Annots 372 0 R>>endobj +883 0 obj<>stream xÍœ[s¹…ßý+æ-›ª„æp8¼ä%åK6ë*_6+m9¯45²ó¢”7ûïsh§rÊ›Ør²U±Fƒó 4  gþù¨mÆø¯m擦›5ëÝ£§—¿l&ãæòºiûå¨mfóisyÕŒGã1~»þîrõn;4‡ëæÙaöçÓï/ÿñè/—¤@(Õ´òÓO•ß4³éÿ¿k¦íh©ÛæBþŽ+|ß<þ¾oÚVþ2t=þýÕg7«Ûóplôn×ôÏŽ·¢%5 vÍ|>šÙšÅÛNýÃá—$'Å®Y,G½•ÇÛN~>$5 vM;™Œ&Vï;ù‹ýé¼Únƒe€L'£¹…hGYí¯24 Ìzß u„ËátÎí`2ý¨s•ˆââÉ«§O¤»¬Kzù»Ñü¯UËéfb•]?ZÀ*û^Z?\¨U>þ~ª6ˆ1Cá…1ÃvDVTÄÉŠ˜¤lO¸8·©£¥h] ±b&èmOÿ)éI‚>l§þaô¾ü4¬Š Œn<šÚJ$¬‡œo†T Vá¯Á’ @@ -2091,11 +2101,11 @@ E^ »L§ß]È̼"ù||¤y~XßíñG: ošôÍç!_ô»ü _ÇÿÛ£Ç)endstream endobj -882 0 obj +884 0 obj 5352 endobj -883 0 obj<>>>/Annots 415 0 R>>endobj -884 0 obj<>stream +885 0 obj<>>>/Annots 417 0 R>>endobj +886 0 obj<>stream xÍœoo[DZÆßûSE‘¾Ãsÿ¸(;¾u;n¬Þ\à¢(h‰–ØŠ¤JR±óíûÌììî3s”4v,å&@¢£Ýç§åîììììþëQÛŒñoÛÌ»¦Ÿ5çÛG_ž=úâÙ²éÆÍÙÛ¦.Gm3›Oš³‹f<ñÛóÏÎVo®×Íþmód¿;­w§ãïÏþñ諳GRAk5­üôí?êg£q3›,ñßm3ëGS{¸n^Ë ‚ÃeóųIÓ¶ò§ÑšÙŽþîdÔâ߯þá¶Íb9ê<;ÂËýi­­í&£>÷ÙÅg£ÿGÿt}íÉfÖu£ºmÒŽ–ö`Ýöų©u:·ëQ‹{éÉÕêæ´>än"ù¶™v‘eÅ2-ÝLts?šû¶XqÔÿõåóÿÍ- ѶiûÅhâV¯Ö‡íæxÜìwÄZ`›°'í%ë˜\!¢¾ÜœŽB2@°Á± ²Ú]©¶M×Íb¯ h$|·Ù]ìß•–°”‰˜¤û8¹Bä¼<Ë aóElH®ÏÏ×ÇÚn›¾]ȤçŽÍäˆpØ_çæ°œÉ86'Wˆœ¯7ÇäEº1¬ããæe7±É“œÎx ,~*ŽAÊìaÓÊäé3%Câm³œÊÜaR*þg³~·Ù]æN!ì­ˆÑ2%•(ln$»ŸcÆ;„QŒó«Õî’šÂR±ý¹X·Å* @išï·=¼éÀˆ&î—þJQ®ÖƒxË/×QE2ú62!•ÆXš£ô•Éø‹#e†Q#Ľ(U4Àåà»ßèc2âfÕIÐ)'ñ’Š#dùþ‹_évA¾‡õž¿t’ߎV‡Ñ)‘Ÿþ\‡|ý='Š5î3qrجN¥^Ÿ3vþ’˜úìÌÁëxù\Zd­Ÿš!÷öéå×ãÊàW¥t»di&ûö¼\ŸÞíõ˪ d<ÐØ’¯÷—û]rüâ1ïaà&.Ác/ ³´oõç:T¸ªƒ,N?W‰L/Is°>•FÂO —5¤Õ^e’ × )?1`JiJèØ¦ð’%é0d¸÷‹¥¬_¬8BnË’Aèq3@^©#}"Fý·ûÕ–²Î¤“T–~åC6BþŠ#Úl¼$A·…Ü ;ñk ;>þºýÔ¥oa%úÓŸ«Á¹úÙƒÅÖ»ËY#î\ÉÔ˜ˆ8ø‰ú§ß¼xüüåߟ|óòìÛo¾Þ×¼i%ÀZ5cþÀFŽ@â6kK‡pzîÚb¸Ø˜àÄI»ÀŽí§dÅR/S‘zD?8d}"F½_I£@xà?ˆGFXIÆÀŒGÈïŠaV丹äNµ£XOBd)Ã'þàïf˜êfL!ûqýI¿›qýBðÏeaÆ×Ãâ¿’ýìõã_>n0þï¶kžîÏo·¸Š­KŒ®§í´ù|®×µ?Ûlä7¸qó—Gÿȱendstream endobj -885 0 obj +887 0 obj 5223 endobj -886 0 obj<>>>/Annots 461 0 R>>endobj -887 0 obj<>stream -xÍœ_s[·Åßý)øVg¦•yyy/ɧŽ"Ç­g’ص”qòBS×[þQHªN¿}Ï àìBNÓ©e»™éè8?‚‹ÅXàò—'ÍhŒÿšÑl2jûÑjûäÛ«'Ï^,F“ñèêý¨égͨŸMGW×£ñÙxŒ]=½Z¾Û £ýûÑÅ~wv§ã7WÿxòÝÕ©jùëÍ_ä_Fýtÿߎ¦ÍÙB6£KùWÿp3zö¢5|2t>Œ>õâvyw#ý0ÂmGÝijc±C,Î’šÛÑlvÖÛ–Åb§þëþC’“b;š/Î:+ÅN~Ú'5 ¶£Åìlnձة—ILõ·£¦mÎfVËúõýaØü;!XFßûh¹\nßåf°j;šLÆg­m‡Vp ñ˜Ã~³®ScX -PWõ…Vp çûír½_h;˜@\åéÙ§ý_7SWk{qc|ÎnÜug}P7~öbªN‹Ô£òÜø-FPq»"†á›±8Nà*Jáñú0†_î×ÇõiHvc5XÓ™oVªàao†åõzw£¦ëÅt¿·#œ‰' Ädâð vÃNZr@XœMœaUߌ%âô ˆ†­ß.Wÿ¼9ìïw×bŒúÉ5‡5›3¾Ô4'ÌÁ]E¸Xf' 8Áó½!ÄòŠ`í$dÒˆ+ò×PnEy—' ‹0‡ˆÔ -Q i@軪±BEÅÚý]ö(Jðj½I•\aìB€…Àt­8:›D+T˜²ˆG6âžÎ»¾¬‘»ð@.vOÖ;炪Ç„±>º`E Y”4ˆc˜ -@‹ezæ&\ç}/I ƒ™h±×¿L=N -øM3­ô‘èõÇ!/cY$Î+‹GÓ„TÁ3ÈíH6o…lÆDõˆâÿ¤ÿŸK87­à v(“¬®\o$°§|ûü"8ì¤GËÅaŒ§Î‹§mØÌÄ©/<c-`§tlµTB\¹1A™žA~L˜nÜÈH`‚–{BqdÖAR8†*xDöeÖ€0 áœÛ*xÂa¸Û¬WKʤ~*îdHZÁ“x~'‚ &s8“ahÏ8nßÝ-ÇyIÉZZñ>CJ<éýz3¿Ä‡?N:Gݲ[èªNöi]3 ‹º-Œꇜ‰ì;¯?”‰L¤.ôdÀ*IÙÍD -k¤@T ñ„åZlå—§ý9œ„ \ ­š åŽ!é¼?”U"Éd>•…¶±HâZÊOÇáðì‡åêv½Ëkò¿•*XÔùj…LLÖ¬ÛŽZ,]R©aQ-´Œõîýþ°5[%V‚Ó,$b³…QáN²- o§2g¹mCÊÂ%ôâq L øþùùëÜI"]òTÑc=éLñ|}V𓇭ýo¯û±Ùê`1%ËÜ^´]xÈ£‚RÝxŠržêáÕ%×Ijøµìþ J‹=™ê»ýqæ´¿Ýæ§™ÇýGk¦ébŒè¦fŠj&¤+§‹…Î8´%Ó&@Ó`zÓ'%ëÔŒ—’=¿¾_I*@LôUe,up"ùÊøMÂYg&1ÊY§$,I#Ó«ÌS&h¹g\ÞßÝí§r¶ÀR™eÇpBJ<‰Ë™µD¹r9þ5Âá’‚ýg\låQÐ7<®§˜ÅC.8_x .Á~Êæà0šËþ5š\ Y8Gšñ× -q¹º¶yåK22ÄPÑrߎ%e¬H$}!)4ƒÿà o†M˜Ž·ë²$1PsÙVY”Vð°rŽÇ"™2'2¦Ù¬©B… Ä-©ÀÀª|j ëo^ää -«Àè‰&ÜŽTÁ3wž¥9†e2MÊc!Êõ„ëõ¯:w‡˜$ìÿ»±pŽ‹–#äè„ᷫܶìyI]þÂz-·lí߯oîy…%Þš¤u²x4 TÁ’ì–Tâ¼’ã´ œqNÝ·ù°>ݦ.b‰ø›Å”i!ÁL:;×G]Yç¨#ôy°+ -ÉûMÃu VžÕ:ÂløŠ -v›È -Ì0úž=ãÕݰ3aœt  ÿ‰ñÎ-I`B†9xCˆ ÁÁg•ê14Μø.aå Èœ“…nnÅ Íd·Ð ŠhP»Ó§ËaΊñИ ©Œ‰ -”ؾ=aT|v4ö”‡¾5.ÚH Řð@6E8¬Ö+}±h˜PÐŒ;±/b”©4ËŒ”âè’Ò4 Ãêß6…çGÒH—ˆ/[‚Vð_ç/8¿+ !! –§î %²Çl—»åͰŠ0Pd3ûÿÎU·Õÿ`;²Å2"¯râCéÈID±Ê™ÙŽL€f,ëECY3.‡f‹S¹`CJtC81œ„öá®$sYºY†VðŒ£ìëi>î?û6ªŸòÀjçâ>:°âõǼ -Us×*Ç! Rœ’Q×:‡|’Èp’³ÐrÛ‚ãݰZ/7e,,ÿ;KI`‹YžN‡õ»û “T:TnÖ™æ$¶!Ÿ‘çÒÈ:OæsKÐ -–Àv#¸ðõ8ãÒuüL®š¤ŽÔñXªT“~¹ŸšâùdË-÷Œï~]nïp7Qý…Ù“*xÎ÷Ï_¾Èè©-H/Ãê¢<ä;lÖùî )Å‘pCÇq´‚ç°J|H:Ò¶E+xFÞƒ±F|H¡– PO`/ó¢±µ¥í;?àça±#)¤6<ႪõvÉA•ä*\=‰`¯¦{1BË=äb¿•I,ŒÜÆ™ŽY¬ž×ø—¾WÓȤm%&êÍÚø –áìu‹“s;å=”¿N,gª`e…üu Áú&ÒhÛ4F‹}+~ÚÉÕ°|rrÔ© ¾z*|?m†–{Ê÷û›ý®kÒÉ “&SØcÞáÔPn\°£·[]kRÏy‹ë5û¹=¬§••·ùV©‚çüx•ŒË"°rnk­´Íh%ÁµÄg£¤ -žñÓ/ÿž›A2IÈ‘…h¹?ÒAë@Á—A,妤 -ž»¾ƒiÅùaÄÿ9ðôæ*¯¤ôËŠ$<äqCùíVîÀÓtx|ñù8)+Nô+ƒb±œ¿;žËUX‡[¿Ÿamü@ ùØ?9#a3Rfïð FBv»û[Å0í0ÃÊL1»Ý2!Z§b|ÝÙmãBrC-çþãC±Î7ܤÔÐuÜðígÍm¸ïÖ Åa®ã¢ò:½E(´BÄA”†4 ÁSc1©‚ç¼>ìÿµ¾bf»Çþ"~lÝunŸ`±)C;>P‡Ìýõh¸«¹`ZT°voe Ã4©WËà Ý-!•tЬ}M;[ap‚,‰Iæ+Ygôæâã$¬‘tȲ𻸀eÝ©A` 3šqõ -ÁW5ŠFŒ*·\ A™¾:]O/B`B¦Ê`¹âÈÍ[™t0Æ>Ù½ÒÅßÿ»ë\R ÓWpÚð@ÒÙäPèš¶Š†çŽrçmœƒzÈ~X¯ûãþ}>˜g™Xs"ÂTÁ¶äͰÝÓµ’‚´ÌÔA´‚… ô¬†k¼Í”»–”²R«£,çb¹Ù|ÆQç:K˜œ —õÝ<™S막nc,#Š&×Ð…Š+ƒPU!~\n³ÅHÃcáˆ8ÅmXà¹ÈYæz•,gM˜Ä¢jÎ3V·:¢¾ÐÄqÖ§+@áÅ.9ËÉôø@ÃiâïÏ…EGÕ¡7!Žë…§âÐãõæþæ&¼D©»9ž8œ™´K1©‚oÍù=®qíNr#Œß @\§<î\.Øä‰}úø»ë -lÐC>5Ï’ ûà ³h8ßlöÑ“Ä/q óÞh}|û/%3sièi5ÈpðùÀšƒ}ƒ#(áÏq„ -ñf8ÞoòG"ôÂ|‰ZîÛqîÁ¥W+¿à‚AmÚ`[·½ñ¡µ™W“T¦¤$—,Þ0Õ‡-‹'¼Üá¥M¼x‘=“´bX¹#eH€ãlSx€‘zì³°_ç–$¤%¤ÃË|„Ûˉϸkq“€<ÿKÖŸçÉ,ÙÖ#U§áQà<&`Ü»f|½[kg¸RžŒ›ð@>Šn«öÕÕÉvT‰wÉ댆!¦©oäÍêC8´ +B|è#½Éñ_B -ž™«[ò~wžãÙ%Üðv©*\Ê Ú°)Nˆ&\Û4 ±KŸŽ'JݱLŒ+"Iü5¸+\ ¾ÉQÓÉc1Jö˜W÷!o†7u¿à;Ú®Spq7Ÿ47á:¾j–rW¢f!› -΄Ԋñýz»>Å»laŠ~´·Ž¬3þ¾§Y:œëjI”é&>½<.eâO_È|xA»˜ðçÌêMÔp¾ —€õ  /aaá§¢>,­Õ#Tz¿´õ1zpk -µéÃ#Í<ÿXEV@Ž‚£Z’+Ðëiu‘£™8 -ayz9_Œ)BúÕb±Üáí;úµWÒ^¼6ˆõëã'ù É$ˆF¤VŒý‡Ýf¿Ì÷TI -Ò¸ü@öÐbO‘ߨ£d*é$ȆÆ@"ÖCF4㑃WqîÌ͈LOà€F"…²\`‚{BFǸ—¼ÆïG4®âB&L+8ü~ûgLá·ÿÔà5ì-Ð!ràûôòü‡oÏG¸úñÙS>߯îårv>Ì‘wUûÑŸfá¶åÓõz­‡ê{òpì³Dendstream -endobj -888 0 obj -5057 -endobj -889 0 obj<>>>/Annots 468 0 R>>endobj -890 0 obj<>stream +888 0 obj<>>>/Annots 463 0 R>>endobj +889 0 obj<>stream +xÍœ_s[·Åßý)øVg¦•yyy/ɧŽ"Ç­g’ص”qòBS×[þQHªN¿}Ï àìBnãid»™éè8?‚‹ÅXàò—'ÍhŒÿšÑl2jûÑjûäÛ«'Ï^,F“ñèêý¨égͨŸMGW×£ñÙxŒ]=½Z¾Û £ýûÑÅ~wv§ã7WÿxòÝÕ©jùëÍ_ä_Fýtÿߎ¦ÍÙB6£KùWÿp3zö¢5|2t>Œ>õâvyw#ý0ÂmGÝijc±C,Î’šÛÑlvÖÛ–Åb§þëþC’“b;š/Î:+ÅN~Ú'5 ¶£fp¥px}Ã/÷ëãú4¤/Íj°¦3߬TÁÃÞ Ëëõî&|ï ¨¾7™à±ÿt&žL0ª’‰ÃƒÚE ;iQÈqzq6q†U}3–‰ g@4l…@qsØßï®ÅÆ“/jkng|©i6Nx ãÀ•ìÔ¹8kqT?o$^°>Ú¦"¼½]所DÆCÌbD,¯¿Ü/7ë÷ëæƒ"¨Ë¤Ï eW¤4X"7¦$CˆÐŠ`Ã9 D›¾ÂDr…ÉÑ'¯X >¾Ç-Ò +j_&1íe,D f8ÝæhÀ™fÞ°Z¡bì†Ó‡ýáŸÿGà”Uš ƒÖ)û“ußn!_j‹p‡Šûv ‰^vl·6I„U,¢ A‹=ƒ–Q¤ÓÀ® Zî ×{r]R cŽ›V$¬‡×% ³>çê oÑAÇÓò´.Ãj°27Y–â=ëýz—çM–Ái°0Z8ˆr=d}Ê#šU⺲š0 I<ãÚ.¯HÌbâm“È³Ê ¬èÂâø¿“ wsžÿ»yvÑÙÂ9𼎾er"Év„¯çc½[ÂÛÛ!‡’ ¯Ç2I€–[À:w+¢çÂW¸©‚PtoO¦² ²­` ¯Ÿ_äÕ +i@˜Ém ZÁvÃp=\‡žmeyø;õì'1ëývÐJÈf²·Aljçà(Á>°“QÂú0wáb™€4ⲉ1„X^ÌŠ›e€`sWäfh…Šò.O4,a©¢„AÒ€ÐËÔ6"V¨~WW„¼ZoR%W»`!0]+ŽÎ&Ñ +¦,bà‘꣸§ C]_ÖÈ]x ìdn´.Ø9T=F ˆõÑ+Í¢¤AÃmZì›pÓ$^ f Å^ÿ2ÅRÀo°oõúHôúã—±,ç•Å£iBªà”L ؼ!²Õ#Šÿ“Fü.áÜ´‚'Ø¡L:P°ºr½‘Àžòíó‹à°“÷¼¿=2~bMçÅÓ6lfâÔÈ‹±°Ó:¶Z *!®Ü˜ LÏ ?& L7nd$0AË=¡82k„0“ Á„TÁ#²/³„iç–¡žpî6ëÕ’ò¤©ŸŠ;’Vð$žßI… ˆÉÎdZÁ3ŽÛwwËãñC^R²¤V¼ÏROz¿Þ Á/ñá³Ç ¤Ñc»…®êdŸÖ5³°¨ IÜø ~È â®±óúC âDêBO¬’”mØL¤°F +DÅOX®ÅV~yÚÃIRÁÚª Zî’‹ûCY%’LæSYh‹$®¥ütÏ~X®n×»¼F`1P!-oP©‚E¯VÈÄä`Í:¤±âIý¥†E´Ð2Ö»÷ûÃÖl•X)ùNIUšÖ Âœd[@ÞNeÎàJlCÊÂ%ôâq L øþùùëÜÉù†ä©,¢ÇzÒ™âùú0¬à'ÿ[ûÿ¾vîÇf«ƒÅ”,s‘ä†eÂC”êìÆS”ój^]r¤†_Ëîß ´Ø#f¾ÛiNûßÛü‰ÐïQÝšiºD³š)>¨™®œ.:ãЖPL›MƒéMŸ”¬S3^ÊiÂõýJRb¢¯*c鬃³)ÉWÆoÈ:3‰QÎ:%aI™^eF˜2AË=ãòþîn8 y6b©Ì²c8¡¥ +žÄƒe€ÌÚ +¢\¹ÿáÌù½þ1'µ9wßð¸žb9¸à|áº1›ƒÃh.û×hr,dáiÆ_+ÄåêvØæ•/É`ÈC DË};–”±"‘ô…¤Ð Tüƒ'¼6aJ8ޮ˩ ‰šË¶Ê¢´‚‡•ãUÉ”9‘1ÍfM*%nIVåSËHXÏxó"'WXF×H4áv¤ +ždõ,Í1,“iRæ Q®‡ \¯Õ¹;Ä$™`ÿß°s\|´œìG' ä¸]å¶eÏKŠèrðÖk¹%`kÿ~}sÏ+,ñÖ$¨“Å£¥ +–d·l¤ç•§eà€rê¾Í‡õé6uKÄßÄ( LÛ fÒ1ع>êÊÚ¡~b"6aE!y¿ix ÄʳZG˜ _QÁnYF¿À³g¼ºv&Œ“ä?1Þ¹% ìAÈ0o$8øì±R=Æ‚æÁ™ß%¬<‚a™sÒ¡ÐÍ­´yÃì:A jwú”b9ÌY1$•1QÛ·'ŒŠÏî‘ÆžòзÆEɤȦ‡Õz¥/ ªšq'öeBŒ2CƒfÙ‚‘R]Rš†tXýÛ¦ðüHéñeKÐ +þëü‡àw¥!$D ÁòÔ}¡Dö˜ír·¼¶¸ªŠlfÿß™ ê¶úlG¶XFäUN|(Ù"‰h£#V93Û‘ ÐŒe½h¡#kÆå°ÂlqÊ·cX‰n‡#†“*øÆpW’ +Œ¹,Ý,C+xÆQöõ4÷Ÿ}ÕOy`µsqXñúc^…ª¹ë •ã )Nɨk€C>Id8ÉÙh¹mÁñnX­—›2H +–ÿ¥$°Å,O§ÃúÝý‰I**MsÛ‚ÏÈó?id'ó¹%hK`‡»‘þ±R¿®ãgrÕ$u|x ŽÇR¥šô˵É8ÐÏ'[&h¹g|÷ër{‡+£ê,ÌÀ˜TÁs¾þòE†DHmAzV7­à!ßa³Îw_H)Ž„:Ž£<‡=€TâCÒ‘¶-ZÁ3òŒ5âC²µ…z{‘˜}¬-mß™ø?‹I!µáÜ÷†­·Kª$WáêI{5­Ø‹Zî!û­Lba´à6ÎüsÌbõ¼öÀ¿ô½šF6 m+1Q/<ǵ g¯[œœÛ)ï¡üubÁ8S++ä¯kÖ7i„F3ئ1Zì[ñÓN®†å\MÈQ§V4øfè©ðý´Zî)ßïoö»¬I'c,LšLI`y‡kPC¹qÁJŒ’ÉØ·&U𜷸^³ÿÛÃJpZYy›o•*xÎWɸ,’+ç¶ÑŠ¥<€V¬YK y6Jªà?ýøòï¹$“ô€YˆVðû#T°|ÄRnJªà)°ë;˜VœFüäÀÓ›«¼’±/+’ðÇ å·[y5Þ €ÇŸ‚°âD¿2(;Àù»ãé°\…µq¸õûÖÆÄý“36#eöj$d·Û±¿U ãÐ3¬Ì³Û-¢u*Æ×Ý6.$7Ôrî?>ëLp“ÁMJxs"‡ËðígÍm¸ïÖ Åa®ã¢ò:½E(´BÄA”†4 ÁSc1©‚ç¼>ìÿµ¾bf»Çþ"~lÝunŸ`±)C;>P‡à•»g†»š ¦EK`ß×Y2LòV„e\-7t·„TÒ)²ö5íPl…Á j°$&™¯dÑ›Ko“°FÒe|| ËÂkìâ–u§ €-,ÌhÆÕ+_Õ(1ªÜr1eúFètQ<½ ™*ƒIäŠ#7oeÒÁûÝî•~,þ~üß]‡à’Z˜¾‚Ó†êÎ:ièš¶Š†çŽrçmœƒzÈ~X¯ûãþ}>˜g™Xs"ÂTÁ¶äͰÝÓµ’‚´ÌÔA´‚… ô¬†k¼Š”»–”²R«£,çb¹Ù|ÆQç:K˜œ —õÝ<™S막nc,#Š&×Ð…Š+ƒPU!~\n³ÅHÃcáˆ8ÅmXà¹ÈYæz•,gM˜Ä¢jÎ3V·:¢¾ÐÄqÖ§+@áÅ.9ËÉôø@ÃiâïÏ…E“yè EˆãÃzá)…8tGÅx½¹¿¹ ï¶ênŽ…°''D&íRLªà[s~k\»“Üã·—Áiû— 6ybŸ>þÄîºôƒF Ô¸ñiqè +šlŠ +ÛP¹f?a„ Œ +!×—R(! úð‰h¹oí´X®´c-ÂmH<#¤ßS;X +®†¢÷ e*-óŒ—Ï3€$èþpÂlZÁ#Î7›}ô$ñK\ÃüäÖÇç°ÿQ237&!õžVs៬9èÐ78‚"þÑñŒG¨o†ãý&Oq$B LÀ—¡å¾á\zµò .ÔØÖ¨ ¶yÛŠQ›y5éAeJJrÉ¢áEþS}زxÂËÞYÚÄ‹Ù3I+†•;R†8þÁ6…) Ç> ûunIBZB:¼ÌG¸½\‘øŒ»×8 Èó¿dýyþ—Ì’m="QuU0Îó`fÀ½kÆ×»µv¦+åɸ ä£è¶j_]lG•x—¼ÎhbšŠñFÞ¬>„C˰"ć>Ò›ÿ#Ú♹º%ïwç™1>] o—ªÂÕ¨’q€˜M¸¶ib—Šq5O”ºc™W6D’*økpW¸|“3¢,¦“9Æb”ì1¯îCÞ oê~Áw´]§àân>inÂu +2|Õ,å® D Ì C6œ ©ãûõv}ŠwÙÂýhoYgümO³t8ÖÕ’)ÓMx ëL*Û¸Sø$—×jឬÓ# Ư6H6Ç‹±¸sþ5 bµÛ,ååÔfïî„c•ð·Z…ÏlpØaÝCG6 + +Ç+ ŠdOÀí“4 Þ¦–ßtau,ôêW—“¤. +q\9&dy,õò‹Í»”D •„I%3B‹=㯯Þ^½ +N/ƒå3NÞÖùg&9†¯›/ …¿sgÒAÂÜ_“Õ(%#‹+å„¥ s‚«Wúç‹É Y*|1KX»Ð“5^T ARæ ðw‰HÖº0 †!Ód 6tò¾!ë1iUzÊ–ú1¾â¤!úá±Ôüª¼µwjÚv¹Ü‰_ !½{@y¿«(ðñ}øÕ #@/OW Kž¥(wà§;‹=æÕå³Þ¨2F–F–ýè*ÚdµV+ÏÊ]¬Iâ¬8à¬ø#‘&ABT0ˆµ_1Ψ>† £D«çÑE qìjåÍlt¢vœDgû6¹6Õ†¯­â]8–F˜ý蟟îö%< ¸Cg­¯H Ð÷ó7ÌÍ(BŒÄ׌Xl)&D‘¬¡åÍòb-¶d rH=däÒG¢×g3’r¼Cc{@‹­¼„h@% Þä<«žœýšŒG +Èñs@®íhå&°dK¸Pb>=­Ü„•‡6¨„˜­9Éðw *Èôºœ,dÜ\õs™4X°RéÏË W©/ ɽ±8–úÇ¡@„Ac‚¤ÜªÏ_îÊe梀¿a @ß‚½4!õ.©d#?§gZÐáž»¬Ç{º<[D¢ÚxyC|L»Ìšð~B‡$ÐãµØœôZìÛÀŽD `]n;Q‹=áç§dIR²5ƒ{„¼Cˆ]íÏß$k’c©÷]øÓ¨ü) GÎA^(¦Ôbߊûc¹ªG"p?R^S Bdz/e²z,þà€¬ÄJŸ¾?) ÇI–ûøôò¸”‰?}!#ðáeíbŸ3{T¨7Q¥ç­›°´á%,,üáTÔ‡Åë*½_Z„ú=¸5…ÚÒ4ÿñücY9ŽjI®@¯§ÕEV@Žfâ(„åèå|1¦héWˆÅp‡·ïèGxIHxñÚ@"ÖC®kŒžä7$“ >h‘Z1öv›ý2ßS%!(XHãòÙC‹=E~c’©¤“H ‰XÑŒG" \=Ĺ37#2=‰dÊr Zì qãr\ò¿mѸŠC +™0ý çðWøIfœ1…ŸdþSƒ×<°·@‡ÈïÓËó¾=áêÇ?dOù|¿º—ËÙù0GÞUíGš…Û–O×뵪ÿíÉ2R +endstream +endobj +890 0 obj +5146 +endobj +891 0 obj<>>>/Annots 470 0 R>>endobj +892 0 obj<>stream xÅ–MsÓ0†ïþ{,}Xþ8¦@LxÊ9±Ý’Nƒã~>»¶ì¬e†Ói“™Ä²´¤}wWú(øUk0äUp‹u ZBvʦBA‡ …”ø6¿Ê¶»§ê{XÕ‡¶<´Ç7Ùcð> h@7 =}ý@o Sü­ T"u'ØÐ<Þøæk JÑÌhgq26ëêûöG[6à&c¸ l"Â)»ïöʈÁœYT ¤¥mv ukëû=û·ß²ÛÀah—„à1–y^#„™!$…ö æ!6Ûj· ̦BÙba=B?ÀcëS“—„›!Ä(M!n€Éëâ‚`FˆgŠ8ª‡8ïÇp$ÄÒ×Ô ð«» …„VÂ`ÔdÅ•x¶O"]°™ˆÄ5V$ȑĿ¾á‚e±]ØbE88™D.†Y£àª ¼ìX®ßgÜÚ¦.Ny»¯´(«1Ržy»ÿí7ÏOZcø ~ênoäm°“ç5zG{Þq€$¤ŠÁ½sf !’™ ¹7!©8Áõû‹ð²’ÙQjKªœ2€}L[ëàF”Ø–2j‚pTq¤äuó@*‡sàåUöô”)®õì*\×`z*JÓ™ž,Þ/Vè©IRΈ°=cxr0+µ;“8ÃagV\¸2°¼c`L=vÆÀØúUîH ãÚ_^Œ>+§’Ø4Âôw’ô‹$6±s& K2’d@ô¾›0P’9ão’ŒŒÎwÆ€õ—2“ddƒ’Lë3òswã ÂñjzŒµr†î:61ø‹‡—Nê›æÉÍ¡(S\iûú»·óï‡DÑ‚/÷¶î©»·%îT¡Æb©°ÒãI¼Y~º^Âç¦~,óÞÕù©Âëâv8ÃŒÒð6¦›fqµ?/‘_‚? [4Rendstream endobj -891 0 obj +893 0 obj 699 endobj -892 0 obj<
    >endobj -893 0 obj<>endobj -894 0 obj<>endobj -895 0 obj<>endobj -896 0 obj<>endobj -897 0 obj<>endobj -898 0 obj<>endobj -899 0 obj<>endobj -900 0 obj<>endobj -901 0 obj<>endobj -902 0 obj<>endobj -903 0 obj<>endobj -904 0 obj<>endobj -905 0 obj<>endobj -906 0 obj<>endobj -907 0 obj<>endobj -908 0 obj<>endobj -909 0 obj<>endobj -910 0 obj<>endobj -911 0 obj<>endobj -912 0 obj<>endobj -913 0 obj<>endobj -914 0 obj<>endobj -915 0 obj<>endobj -916 0 obj<>endobj -917 0 obj<>endobj -918 0 obj<>endobj -919 0 obj<>endobj -920 0 obj<>endobj -921 0 obj<>endobj -922 0 obj<>endobj -923 0 obj<>endobj -924 0 obj<>endobj -925 0 obj<>endobj -926 0 obj<>endobj -927 0 obj<>endobj -928 0 obj<>endobj -929 0 obj<>endobj -930 0 obj<>endobj -931 0 obj<>endobj -932 0 obj<>endobj -933 0 obj<>endobj -934 0 obj<>endobj -935 0 obj<>endobj -936 0 obj<>endobj -937 0 obj<>endobj -938 0 obj<>endobj -939 0 obj<>endobj -940 0 obj<>endobj -941 0 obj<>endobj -942 0 obj<>endobj -943 0 obj<>endobj -944 0 obj<>endobj -945 0 obj<>endobj -946 0 obj<>endobj -947 0 obj<>endobj -948 0 obj<>endobj -949 0 obj<>endobj -950 0 obj<>endobj -951 0 obj<>endobj -952 0 obj<>endobj -953 0 obj<>endobj -954 0 obj<>endobj -955 0 obj<>endobj -956 0 obj<>endobj -957 0 obj<>endobj -958 0 obj<>endobj -959 0 obj<>endobj -960 0 obj<>endobj -961 0 obj<>endobj -962 0 obj<>endobj -963 0 obj<>endobj -964 0 obj<>endobj -965 0 obj<>endobj -966 0 obj<>endobj -967 0 obj<>endobj -968 0 obj<>endobj -969 0 obj<>endobj -970 0 obj<>endobj -971 0 obj<>endobj -972 0 obj<>endobj -973 0 obj<>endobj -974 0 obj<>endobj -975 0 obj<>endobj -976 0 obj<>endobj -977 0 obj<>endobj -978 0 obj<>endobj -979 0 obj<>endobj -980 0 obj<>endobj -981 0 obj<>endobj -982 0 obj<>endobj -983 0 obj<>endobj -984 0 obj<>endobj -985 0 obj<>endobj -986 0 obj<>endobj -987 0 obj<>endobj -988 0 obj<>endobj -989 0 obj<>endobj -990 0 obj<>endobj -991 0 obj<>endobj -992 0 obj<>endobj -993 0 obj<>endobj -994 0 obj<>endobj -995 0 obj<>endobj -996 0 obj<>endobj -997 0 obj<>endobj -998 0 obj<>endobj -999 0 obj<>endobj -1000 0 obj<>endobj -1001 0 obj<>endobj -1002 0 obj<>endobj -1003 0 obj<>endobj -1004 0 obj<>endobj -1005 0 obj<>endobj -1006 0 obj<>endobj -1007 0 obj<>endobj -1008 0 obj<>endobj -1009 0 obj<>endobj -1010 0 obj<>endobj -1011 0 obj<>endobj -1012 0 obj<>endobj -1013 0 obj<>endobj -1014 0 obj<>endobj -1015 0 obj<>endobj -1016 0 obj<>endobj -1017 0 obj<>endobj -1018 0 obj<>endobj -1019 0 obj<>endobj -1020 0 obj<>endobj -1021 0 obj<>endobj -1022 0 obj<>endobj -1023 0 obj<>endobj -1024 0 obj<>endobj -1025 0 obj<>endobj -1026 0 obj<>endobj -1027 0 obj<>endobj -1028 0 obj<>endobj -1029 0 obj<>endobj -1030 0 obj<>endobj -1031 0 obj<>endobj -1032 0 obj<>endobj -1033 0 obj<>endobj -1034 0 obj<>1<>5<>]>>>>endobj +894 0 obj<>endobj +895 0 obj<>endobj +896 0 obj<>endobj +897 0 obj<>endobj +898 0 obj<>endobj +899 0 obj<>endobj +900 0 obj<>endobj +901 0 obj<>endobj +902 0 obj<>endobj +903 0 obj<>endobj +904 0 obj<>endobj +905 0 obj<>endobj +906 0 obj<>endobj +907 0 obj<>endobj +908 0 obj<>endobj +909 0 obj<>endobj +910 0 obj<>endobj +911 0 obj<>endobj +912 0 obj<>endobj +913 0 obj<>endobj +914 0 obj<>endobj +915 0 obj<>endobj +916 0 obj<>endobj +917 0 obj<>endobj +918 0 obj<>endobj +919 0 obj<>endobj +920 0 obj<>endobj +921 0 obj<>endobj +922 0 obj<>endobj +923 0 obj<>endobj +924 0 obj<>endobj +925 0 obj<>endobj +926 0 obj<>endobj +927 0 obj<>endobj +928 0 obj<>endobj +929 0 obj<>endobj +930 0 obj<>endobj +931 0 obj<>endobj +932 0 obj<>endobj +933 0 obj<>endobj +934 0 obj<>endobj +935 0 obj<>endobj +936 0 obj<>endobj +937 0 obj<>endobj +938 0 obj<>endobj +939 0 obj<>endobj +940 0 obj<>endobj +941 0 obj<>endobj +942 0 obj<>endobj +943 0 obj<>endobj +944 0 obj<>endobj +945 0 obj<>endobj +946 0 obj<>endobj +947 0 obj<>endobj +948 0 obj<>endobj +949 0 obj<>endobj +950 0 obj<>endobj +951 0 obj<>endobj +952 0 obj<>endobj +953 0 obj<>endobj +954 0 obj<>endobj +955 0 obj<>endobj +956 0 obj<>endobj +957 0 obj<>endobj +958 0 obj<>endobj +959 0 obj<>endobj +960 0 obj<>endobj +961 0 obj<>endobj +962 0 obj<>endobj +963 0 obj<>endobj +964 0 obj<>endobj +965 0 obj<>endobj +966 0 obj<>endobj +967 0 obj<>endobj +968 0 obj<>endobj +969 0 obj<>endobj +970 0 obj<>endobj +971 0 obj<>endobj +972 0 obj<>endobj +973 0 obj<>endobj +974 0 obj<>endobj +975 0 obj<>endobj +976 0 obj<>endobj +977 0 obj<>endobj +978 0 obj<>endobj +979 0 obj<>endobj +980 0 obj<>endobj +981 0 obj<>endobj +982 0 obj<>endobj +983 0 obj<>endobj +984 0 obj<>endobj +985 0 obj<>endobj +986 0 obj<>endobj +987 0 obj<>endobj +988 0 obj<>endobj +989 0 obj<>endobj +990 0 obj<>endobj +991 0 obj<>endobj +992 0 obj<>endobj +993 0 obj<>endobj +994 0 obj<>endobj +995 0 obj<>endobj +996 0 obj<>endobj +997 0 obj<>endobj +998 0 obj<>endobj +999 0 obj<>endobj +1000 0 obj<>endobj +1001 0 obj<>endobj +1002 0 obj<>endobj +1003 0 obj<>endobj +1004 0 obj<>endobj +1005 0 obj<>endobj +1006 0 obj<>endobj +1007 0 obj<>endobj +1008 0 obj<>endobj +1009 0 obj<>endobj +1010 0 obj<>endobj +1011 0 obj<>endobj +1012 0 obj<>endobj +1013 0 obj<>endobj +1014 0 obj<>endobj +1015 0 obj<>endobj +1016 0 obj<>endobj +1017 0 obj<>endobj +1018 0 obj<>endobj +1019 0 obj<>endobj +1020 0 obj<>endobj +1021 0 obj<>endobj +1022 0 obj<>endobj +1023 0 obj<>endobj +1024 0 obj<>endobj +1025 0 obj<>endobj +1026 0 obj<>endobj +1027 0 obj<>endobj +1028 0 obj<>endobj +1029 0 obj<>endobj +1030 0 obj<>endobj +1031 0 obj<>endobj +1032 0 obj<>endobj +1033 0 obj<>endobj +1034 0 obj<>endobj +1035 0 obj<>endobj +1036 0 obj<>1<>5<>]>>>>endobj xref -0 1035 +0 1037 0000000000 65535 f 0000000015 00000 n 0000000244 00000 n @@ -2331,1025 +2340,1027 @@ xref 0000002720 00000 n 0000002773 00000 n 0000002857 00000 n -0000002888 00000 n -0000002940 00000 n -0000003025 00000 n -0000003049 00000 n -0000003095 00000 n -0000003180 00000 n -0000003225 00000 n -0000003309 00000 n -0000003354 00000 n -0000003438 00000 n -0000003476 00000 n -0000003519 00000 n -0000003604 00000 n -0000003647 00000 n -0000003731 00000 n -0000003762 00000 n -0000003816 00000 n -0000003900 00000 n -0000003924 00000 n -0000003975 00000 n -0000004060 00000 n -0000004108 00000 n -0000004193 00000 n -0000004224 00000 n -0000004342 00000 n -0000004426 00000 n -0000004467 00000 n -0000004552 00000 n -0000004593 00000 n -0000004678 00000 n -0000004716 00000 n -0000004760 00000 n -0000004845 00000 n -0000004869 00000 n -0000004913 00000 n -0000004997 00000 n -0000005039 00000 n -0000005124 00000 n -0000005173 00000 n -0000005258 00000 n -0000005307 00000 n -0000005390 00000 n -0000005437 00000 n -0000005522 00000 n -0000005568 00000 n -0000005652 00000 n -0000005711 00000 n -0000005773 00000 n -0000005858 00000 n -0000005915 00000 n -0000006000 00000 n -0000006093 00000 n -0000006177 00000 n -0000006215 00000 n -0000006320 00000 n -0000006361 00000 n -0000006445 00000 n -0000006491 00000 n -0000006576 00000 n -0000006615 00000 n -0000006700 00000 n -0000006742 00000 n -0000006827 00000 n -0000006869 00000 n -0000006954 00000 n -0000007013 00000 n -0000007057 00000 n -0000007142 00000 n -0000007166 00000 n -0000007213 00000 n -0000007298 00000 n -0000007350 00000 n -0000007435 00000 n -0000007484 00000 n -0000007569 00000 n -0000007618 00000 n -0000007702 00000 n -0000007747 00000 n -0000007799 00000 n -0000007884 00000 n -0000007932 00000 n -0000008017 00000 n -0000008065 00000 n -0000008150 00000 n -0000008214 00000 n -0000008301 00000 n -0000008349 00000 n -0000008413 00000 n -0000008500 00000 n -0000008526 00000 n +0000002923 00000 n +0000003007 00000 n +0000003045 00000 n +0000003097 00000 n +0000003182 00000 n +0000003206 00000 n +0000003252 00000 n +0000003337 00000 n +0000003382 00000 n +0000003466 00000 n +0000003511 00000 n +0000003595 00000 n +0000003633 00000 n +0000003676 00000 n +0000003761 00000 n +0000003804 00000 n +0000003888 00000 n +0000003919 00000 n +0000003973 00000 n +0000004057 00000 n +0000004081 00000 n +0000004132 00000 n +0000004217 00000 n +0000004265 00000 n +0000004350 00000 n +0000004381 00000 n +0000004499 00000 n +0000004583 00000 n +0000004624 00000 n +0000004709 00000 n +0000004750 00000 n +0000004835 00000 n +0000004873 00000 n +0000004917 00000 n +0000005002 00000 n +0000005026 00000 n +0000005070 00000 n +0000005154 00000 n +0000005196 00000 n +0000005281 00000 n +0000005330 00000 n +0000005415 00000 n +0000005464 00000 n +0000005547 00000 n +0000005594 00000 n +0000005679 00000 n +0000005725 00000 n +0000005809 00000 n +0000005868 00000 n +0000005930 00000 n +0000006015 00000 n +0000006072 00000 n +0000006157 00000 n +0000006250 00000 n +0000006334 00000 n +0000006372 00000 n +0000006477 00000 n +0000006518 00000 n +0000006602 00000 n +0000006648 00000 n +0000006733 00000 n +0000006772 00000 n +0000006857 00000 n +0000006899 00000 n +0000006984 00000 n +0000007026 00000 n +0000007111 00000 n +0000007170 00000 n +0000007214 00000 n +0000007299 00000 n +0000007323 00000 n +0000007370 00000 n +0000007455 00000 n +0000007507 00000 n +0000007592 00000 n +0000007641 00000 n +0000007726 00000 n +0000007775 00000 n +0000007859 00000 n +0000007904 00000 n +0000007956 00000 n +0000008041 00000 n +0000008089 00000 n +0000008175 00000 n +0000008224 00000 n +0000008310 00000 n +0000008374 00000 n +0000008461 00000 n +0000008510 00000 n 0000008574 00000 n 0000008661 00000 n -0000008708 00000 n -0000008795 00000 n -0000008836 00000 n -0000008922 00000 n -0000008964 00000 n -0000009006 00000 n -0000009093 00000 n -0000009142 00000 n -0000009229 00000 n -0000009276 00000 n -0000009363 00000 n -0000009405 00000 n -0000009458 00000 n -0000009545 00000 n -0000009589 00000 n -0000009676 00000 n -0000009733 00000 n -0000009820 00000 n -0000009916 00000 n -0000010002 00000 n -0000010052 00000 n -0000010099 00000 n -0000010186 00000 n -0000010233 00000 n -0000010320 00000 n -0000010369 00000 n -0000010456 00000 n -0000010503 00000 n -0000010590 00000 n -0000010640 00000 n -0000010687 00000 n -0000010774 00000 n -0000010821 00000 n -0000010906 00000 n -0000010950 00000 n -0000011036 00000 n -0000011078 00000 n -0000011164 00000 n -0000011204 00000 n -0000011290 00000 n -0000011338 00000 n -0000011424 00000 n -0000011469 00000 n -0000011555 00000 n -0000011599 00000 n -0000011685 00000 n -0000011736 00000 n -0000011822 00000 n -0000011871 00000 n -0000011957 00000 n -0000012002 00000 n -0000012088 00000 n -0000012130 00000 n -0000012216 00000 n -0000012259 00000 n -0000012345 00000 n -0000012387 00000 n -0000012473 00000 n -0000012517 00000 n -0000012603 00000 n -0000012640 00000 n -0000012726 00000 n -0000012767 00000 n -0000012853 00000 n -0000012895 00000 n -0000012981 00000 n -0000013018 00000 n -0000013104 00000 n -0000013145 00000 n -0000013231 00000 n -0000013274 00000 n -0000013360 00000 n -0000013406 00000 n -0000013492 00000 n -0000013686 00000 n -0000013733 00000 n -0000013820 00000 n -0000013869 00000 n -0000013956 00000 n -0000014005 00000 n -0000014091 00000 n -0000014133 00000 n -0000014181 00000 n -0000014267 00000 n -0000014313 00000 n -0000014400 00000 n -0000014434 00000 n -0000014549 00000 n -0000014636 00000 n -0000014662 00000 n -0000014744 00000 n -0000014831 00000 n -0000014916 00000 n -0000015003 00000 n -0000015058 00000 n -0000015145 00000 n -0000015201 00000 n -0000015288 00000 n -0000015338 00000 n -0000015386 00000 n -0000015473 00000 n +0000008687 00000 n +0000008735 00000 n +0000008822 00000 n +0000008869 00000 n +0000008956 00000 n +0000008997 00000 n +0000009083 00000 n +0000009125 00000 n +0000009167 00000 n +0000009254 00000 n +0000009303 00000 n +0000009390 00000 n +0000009437 00000 n +0000009524 00000 n +0000009566 00000 n +0000009619 00000 n +0000009706 00000 n +0000009750 00000 n +0000009837 00000 n +0000009894 00000 n +0000009981 00000 n +0000010077 00000 n +0000010163 00000 n +0000010213 00000 n +0000010260 00000 n +0000010347 00000 n +0000010394 00000 n +0000010481 00000 n +0000010530 00000 n +0000010617 00000 n +0000010664 00000 n +0000010751 00000 n +0000010801 00000 n +0000010848 00000 n +0000010935 00000 n +0000010982 00000 n +0000011067 00000 n +0000011111 00000 n +0000011197 00000 n +0000011239 00000 n +0000011325 00000 n +0000011365 00000 n +0000011451 00000 n +0000011499 00000 n +0000011585 00000 n +0000011630 00000 n +0000011716 00000 n +0000011760 00000 n +0000011846 00000 n +0000011897 00000 n +0000011983 00000 n +0000012032 00000 n +0000012118 00000 n +0000012163 00000 n +0000012249 00000 n +0000012291 00000 n +0000012377 00000 n +0000012420 00000 n +0000012506 00000 n +0000012548 00000 n +0000012634 00000 n +0000012678 00000 n +0000012764 00000 n +0000012801 00000 n +0000012887 00000 n +0000012928 00000 n +0000013014 00000 n +0000013056 00000 n +0000013142 00000 n +0000013179 00000 n +0000013265 00000 n +0000013306 00000 n +0000013392 00000 n +0000013435 00000 n +0000013521 00000 n +0000013567 00000 n +0000013653 00000 n +0000013847 00000 n +0000013894 00000 n +0000013981 00000 n +0000014030 00000 n +0000014117 00000 n +0000014166 00000 n +0000014252 00000 n +0000014294 00000 n +0000014342 00000 n +0000014428 00000 n +0000014474 00000 n +0000014561 00000 n +0000014595 00000 n +0000014710 00000 n +0000014797 00000 n +0000014823 00000 n +0000014905 00000 n +0000014992 00000 n +0000015077 00000 n +0000015164 00000 n +0000015219 00000 n +0000015306 00000 n +0000015362 00000 n +0000015449 00000 n +0000015499 00000 n 0000015547 00000 n 0000015634 00000 n -0000015702 00000 n -0000015789 00000 n -0000015843 00000 n -0000015930 00000 n -0000015998 00000 n -0000016085 00000 n +0000015708 00000 n +0000015795 00000 n +0000015863 00000 n +0000015950 00000 n +0000016004 00000 n +0000016091 00000 n 0000016159 00000 n 0000016246 00000 n -0000016294 00000 n -0000016381 00000 n -0000016438 00000 n -0000016525 00000 n -0000016607 00000 n -0000016662 00000 n -0000016749 00000 n -0000016830 00000 n -0000016917 00000 n -0000016951 00000 n -0000017003 00000 n -0000017090 00000 n -0000017116 00000 n -0000017172 00000 n -0000017259 00000 n -0000017328 00000 n -0000017415 00000 n -0000017466 00000 n -0000017553 00000 n -0000017640 00000 n -0000017727 00000 n -0000017783 00000 n -0000017870 00000 n -0000017919 00000 n -0000018006 00000 n -0000018072 00000 n -0000018124 00000 n -0000018211 00000 n -0000018266 00000 n -0000018353 00000 n -0000018400 00000 n -0000018487 00000 n -0000018534 00000 n -0000018621 00000 n -0000018671 00000 n -0000018711 00000 n -0000018798 00000 n -0000018841 00000 n -0000018928 00000 n -0000018972 00000 n -0000019059 00000 n -0000019102 00000 n -0000019189 00000 n -0000019232 00000 n -0000019319 00000 n -0000019360 00000 n -0000019447 00000 n -0000019494 00000 n -0000019581 00000 n +0000016320 00000 n +0000016407 00000 n +0000016455 00000 n +0000016542 00000 n +0000016599 00000 n +0000016686 00000 n +0000016768 00000 n +0000016823 00000 n +0000016910 00000 n +0000016991 00000 n +0000017078 00000 n +0000017112 00000 n +0000017164 00000 n +0000017251 00000 n +0000017277 00000 n +0000017333 00000 n +0000017420 00000 n +0000017489 00000 n +0000017576 00000 n +0000017627 00000 n +0000017714 00000 n +0000017801 00000 n +0000017888 00000 n +0000017944 00000 n +0000018031 00000 n +0000018080 00000 n +0000018167 00000 n +0000018233 00000 n +0000018285 00000 n +0000018372 00000 n +0000018427 00000 n +0000018514 00000 n +0000018561 00000 n +0000018648 00000 n +0000018695 00000 n +0000018782 00000 n +0000018832 00000 n +0000018872 00000 n +0000018959 00000 n +0000019002 00000 n +0000019089 00000 n +0000019133 00000 n +0000019220 00000 n +0000019263 00000 n +0000019350 00000 n +0000019393 00000 n +0000019480 00000 n +0000019521 00000 n +0000019608 00000 n 0000019655 00000 n -0000019702 00000 n -0000019788 00000 n -0000019814 00000 n -0000019866 00000 n -0000019952 00000 n -0000019978 00000 n -0000020032 00000 n -0000020119 00000 n -0000020145 00000 n -0000020207 00000 n -0000020294 00000 n -0000020320 00000 n -0000020369 00000 n -0000020456 00000 n -0000020482 00000 n -0000020529 00000 n -0000020616 00000 n -0000020665 00000 n -0000020752 00000 n -0000020795 00000 n -0000020882 00000 n -0000020925 00000 n -0000021011 00000 n -0000021060 00000 n -0000021145 00000 n -0000021194 00000 n -0000021279 00000 n -0000021345 00000 n -0000021393 00000 n -0000021480 00000 n -0000021526 00000 n -0000021613 00000 n -0000021647 00000 n -0000021726 00000 n -0000021813 00000 n -0000021895 00000 n -0000021981 00000 n +0000019742 00000 n +0000019816 00000 n +0000019863 00000 n +0000019949 00000 n +0000019975 00000 n +0000020027 00000 n +0000020113 00000 n +0000020139 00000 n +0000020193 00000 n +0000020280 00000 n +0000020306 00000 n +0000020368 00000 n +0000020455 00000 n +0000020481 00000 n +0000020530 00000 n +0000020617 00000 n +0000020643 00000 n +0000020690 00000 n +0000020777 00000 n +0000020826 00000 n +0000020913 00000 n +0000020956 00000 n +0000021043 00000 n +0000021086 00000 n +0000021172 00000 n +0000021221 00000 n +0000021306 00000 n +0000021355 00000 n +0000021440 00000 n +0000021506 00000 n +0000021554 00000 n +0000021641 00000 n +0000021687 00000 n +0000021774 00000 n +0000021808 00000 n +0000021887 00000 n +0000021974 00000 n 0000022056 00000 n -0000022143 00000 n -0000022216 00000 n -0000022303 00000 n -0000022353 00000 n -0000022431 00000 n -0000022518 00000 n -0000022544 00000 n -0000022607 00000 n -0000022694 00000 n -0000022757 00000 n -0000022844 00000 n -0000022898 00000 n -0000022985 00000 n -0000023027 00000 n -0000023068 00000 n -0000023155 00000 n -0000023181 00000 n -0000023286 00000 n -0000023392 00000 n -0000023498 00000 n -0000023604 00000 n -0000023710 00000 n -0000023816 00000 n -0000023922 00000 n -0000024028 00000 n -0000024134 00000 n -0000024240 00000 n -0000024346 00000 n -0000024452 00000 n -0000024558 00000 n -0000024664 00000 n -0000024770 00000 n -0000024876 00000 n -0000024982 00000 n -0000025088 00000 n -0000025194 00000 n -0000025300 00000 n -0000025405 00000 n -0000025511 00000 n -0000025617 00000 n -0000025723 00000 n -0000025829 00000 n -0000025935 00000 n -0000026041 00000 n -0000026147 00000 n -0000026253 00000 n -0000026359 00000 n -0000026465 00000 n -0000026571 00000 n -0000026677 00000 n -0000026783 00000 n -0000026889 00000 n -0000026995 00000 n -0000027101 00000 n -0000027207 00000 n -0000027313 00000 n -0000027418 00000 n -0000027524 00000 n -0000027630 00000 n -0000027736 00000 n -0000027839 00000 n -0000027943 00000 n -0000028321 00000 n -0000028427 00000 n -0000028532 00000 n -0000028638 00000 n -0000028744 00000 n -0000028850 00000 n -0000028956 00000 n -0000029062 00000 n -0000029168 00000 n -0000029274 00000 n -0000029380 00000 n -0000029486 00000 n -0000029591 00000 n -0000029697 00000 n -0000029803 00000 n -0000029909 00000 n -0000030015 00000 n -0000030121 00000 n -0000030227 00000 n -0000030333 00000 n -0000030439 00000 n -0000030545 00000 n -0000030651 00000 n -0000030757 00000 n -0000030863 00000 n -0000030969 00000 n -0000031074 00000 n -0000031180 00000 n -0000031286 00000 n -0000031392 00000 n -0000031497 00000 n -0000031603 00000 n -0000031709 00000 n -0000031815 00000 n -0000031921 00000 n -0000032027 00000 n -0000032133 00000 n -0000032239 00000 n -0000032345 00000 n -0000032451 00000 n -0000032557 00000 n -0000032663 00000 n -0000032768 00000 n -0000032872 00000 n -0000032976 00000 n -0000033346 00000 n -0000033451 00000 n -0000033557 00000 n -0000033663 00000 n -0000033769 00000 n -0000033875 00000 n -0000033981 00000 n -0000034087 00000 n -0000034193 00000 n -0000034299 00000 n -0000034404 00000 n -0000034510 00000 n -0000034616 00000 n -0000034722 00000 n -0000034828 00000 n -0000034934 00000 n -0000035040 00000 n -0000035146 00000 n -0000035252 00000 n -0000035358 00000 n -0000035464 00000 n -0000035570 00000 n -0000035676 00000 n -0000035781 00000 n -0000035887 00000 n -0000035993 00000 n -0000036099 00000 n -0000036205 00000 n -0000036311 00000 n -0000036417 00000 n -0000036523 00000 n -0000036629 00000 n -0000036735 00000 n -0000036841 00000 n -0000036947 00000 n -0000037053 00000 n -0000037159 00000 n -0000037265 00000 n -0000037371 00000 n -0000037477 00000 n -0000037582 00000 n -0000037688 00000 n -0000037794 00000 n -0000037899 00000 n -0000038003 00000 n -0000038107 00000 n -0000038485 00000 n -0000038590 00000 n -0000038696 00000 n -0000038802 00000 n -0000038908 00000 n -0000039014 00000 n -0000039118 00000 n -0000039184 00000 n -0000039218 00000 n -0000039252 00000 n -0000041865 00000 n -0000041914 00000 n -0000041963 00000 n -0000042012 00000 n -0000042061 00000 n -0000042110 00000 n -0000042159 00000 n -0000042208 00000 n -0000042257 00000 n -0000042306 00000 n -0000042355 00000 n -0000042404 00000 n -0000042453 00000 n -0000042502 00000 n -0000042551 00000 n -0000042600 00000 n -0000042649 00000 n -0000042698 00000 n -0000042747 00000 n -0000042796 00000 n -0000042845 00000 n -0000042894 00000 n -0000042943 00000 n -0000042992 00000 n -0000043041 00000 n -0000043090 00000 n -0000043139 00000 n -0000043188 00000 n -0000043237 00000 n -0000043286 00000 n -0000043335 00000 n -0000043384 00000 n -0000043433 00000 n -0000043482 00000 n -0000043531 00000 n -0000043580 00000 n -0000043629 00000 n -0000043678 00000 n -0000043727 00000 n -0000043776 00000 n -0000043825 00000 n -0000043874 00000 n -0000043923 00000 n -0000043972 00000 n -0000044021 00000 n -0000044070 00000 n -0000044119 00000 n -0000044168 00000 n -0000044217 00000 n -0000044266 00000 n -0000044315 00000 n -0000044364 00000 n -0000044413 00000 n -0000044462 00000 n -0000044511 00000 n -0000044560 00000 n -0000044609 00000 n -0000044658 00000 n -0000044707 00000 n -0000044756 00000 n -0000044805 00000 n -0000044854 00000 n -0000044903 00000 n -0000044952 00000 n -0000045001 00000 n -0000045050 00000 n -0000045099 00000 n -0000045148 00000 n -0000045197 00000 n -0000045246 00000 n -0000045295 00000 n -0000045344 00000 n -0000045393 00000 n -0000045442 00000 n -0000045491 00000 n -0000045540 00000 n -0000045589 00000 n -0000045638 00000 n -0000045687 00000 n -0000045736 00000 n -0000045785 00000 n -0000045834 00000 n -0000045883 00000 n -0000045932 00000 n -0000045981 00000 n -0000046030 00000 n -0000046079 00000 n -0000046128 00000 n -0000046177 00000 n -0000046226 00000 n -0000046275 00000 n -0000046324 00000 n -0000046373 00000 n -0000046422 00000 n -0000046471 00000 n -0000046520 00000 n -0000046569 00000 n -0000046618 00000 n -0000046667 00000 n -0000046716 00000 n -0000046765 00000 n -0000046814 00000 n -0000046863 00000 n -0000046912 00000 n -0000046961 00000 n -0000047010 00000 n -0000047059 00000 n -0000047108 00000 n -0000047157 00000 n -0000047206 00000 n -0000047255 00000 n -0000047304 00000 n -0000047353 00000 n -0000047402 00000 n -0000047451 00000 n -0000047500 00000 n -0000047549 00000 n -0000047598 00000 n -0000047647 00000 n -0000047696 00000 n -0000047745 00000 n -0000047794 00000 n -0000047843 00000 n -0000047892 00000 n -0000047941 00000 n -0000047990 00000 n -0000048039 00000 n -0000048088 00000 n -0000048137 00000 n -0000048186 00000 n -0000048235 00000 n -0000048284 00000 n -0000048333 00000 n -0000048382 00000 n -0000048431 00000 n -0000048480 00000 n -0000048529 00000 n -0000048578 00000 n -0000048627 00000 n -0000048676 00000 n -0000048725 00000 n -0000048774 00000 n -0000048823 00000 n -0000048872 00000 n -0000048921 00000 n -0000048970 00000 n -0000049019 00000 n -0000049068 00000 n -0000049117 00000 n -0000049166 00000 n -0000049215 00000 n -0000049264 00000 n -0000049313 00000 n -0000049362 00000 n -0000049411 00000 n -0000049460 00000 n -0000049509 00000 n -0000049558 00000 n -0000049607 00000 n -0000049656 00000 n -0000049705 00000 n -0000049754 00000 n -0000050511 00000 n -0000050667 00000 n -0000051239 00000 n -0000051260 00000 n -0000051434 00000 n -0000052596 00000 n -0000052618 00000 n -0000052769 00000 n -0000054275 00000 n -0000054297 00000 n -0000054457 00000 n -0000055893 00000 n -0000055915 00000 n -0000056093 00000 n -0000057353 00000 n -0000057375 00000 n -0000057517 00000 n -0000059101 00000 n -0000059123 00000 n -0000059256 00000 n -0000061091 00000 n -0000061113 00000 n -0000061246 00000 n -0000061769 00000 n -0000061790 00000 n -0000061951 00000 n -0000063235 00000 n -0000063257 00000 n -0000063418 00000 n -0000065173 00000 n -0000065195 00000 n -0000065355 00000 n -0000067000 00000 n -0000067022 00000 n -0000067164 00000 n -0000069234 00000 n -0000069256 00000 n -0000069398 00000 n -0000071210 00000 n -0000071232 00000 n -0000071374 00000 n -0000073099 00000 n -0000073121 00000 n -0000073272 00000 n -0000075036 00000 n -0000075058 00000 n -0000075233 00000 n -0000077340 00000 n -0000077362 00000 n -0000077522 00000 n -0000079118 00000 n -0000079140 00000 n -0000079315 00000 n -0000080810 00000 n -0000080832 00000 n -0000080984 00000 n -0000081791 00000 n -0000081812 00000 n -0000081963 00000 n -0000083601 00000 n -0000083623 00000 n -0000083788 00000 n -0000085560 00000 n -0000085582 00000 n -0000085747 00000 n -0000086640 00000 n -0000086661 00000 n -0000086835 00000 n -0000088440 00000 n -0000088462 00000 n -0000088605 00000 n -0000089363 00000 n -0000089384 00000 n -0000089567 00000 n -0000091435 00000 n -0000091457 00000 n -0000091626 00000 n -0000093480 00000 n -0000093502 00000 n -0000093662 00000 n -0000095346 00000 n -0000095368 00000 n -0000095541 00000 n -0000097270 00000 n -0000097292 00000 n -0000097443 00000 n -0000098367 00000 n -0000098388 00000 n -0000098572 00000 n -0000100397 00000 n -0000100419 00000 n -0000100593 00000 n -0000102766 00000 n -0000102788 00000 n -0000102981 00000 n -0000104908 00000 n -0000104930 00000 n -0000105114 00000 n -0000107024 00000 n -0000107046 00000 n -0000107222 00000 n -0000109023 00000 n -0000109045 00000 n -0000109215 00000 n -0000110813 00000 n -0000110835 00000 n -0000111020 00000 n -0000112496 00000 n -0000112518 00000 n -0000112711 00000 n -0000114282 00000 n -0000114304 00000 n -0000114479 00000 n -0000116259 00000 n -0000116281 00000 n -0000116437 00000 n -0000117998 00000 n -0000118020 00000 n -0000118205 00000 n -0000120057 00000 n -0000120079 00000 n -0000120245 00000 n -0000121892 00000 n -0000121914 00000 n -0000122099 00000 n -0000124048 00000 n -0000124070 00000 n -0000124254 00000 n -0000125981 00000 n -0000126003 00000 n -0000126173 00000 n -0000127778 00000 n -0000127800 00000 n -0000127969 00000 n -0000129842 00000 n -0000129864 00000 n -0000130049 00000 n -0000131913 00000 n -0000131935 00000 n -0000132111 00000 n -0000134201 00000 n -0000134223 00000 n -0000134398 00000 n -0000136338 00000 n -0000136360 00000 n -0000136536 00000 n -0000138852 00000 n -0000138874 00000 n -0000139026 00000 n -0000141006 00000 n -0000141028 00000 n -0000141188 00000 n -0000143055 00000 n -0000143077 00000 n -0000143228 00000 n -0000144980 00000 n -0000145002 00000 n -0000145134 00000 n -0000147008 00000 n -0000147030 00000 n -0000147172 00000 n -0000149243 00000 n -0000149265 00000 n -0000149416 00000 n -0000151210 00000 n -0000151232 00000 n -0000151364 00000 n -0000153157 00000 n -0000153179 00000 n -0000153302 00000 n -0000153756 00000 n -0000153777 00000 n -0000153934 00000 n -0000155547 00000 n -0000155569 00000 n -0000155721 00000 n -0000157381 00000 n -0000157403 00000 n -0000157545 00000 n -0000158428 00000 n -0000158449 00000 n -0000158634 00000 n -0000160790 00000 n -0000160812 00000 n -0000160988 00000 n -0000163173 00000 n -0000163195 00000 n -0000163346 00000 n -0000164447 00000 n -0000164469 00000 n -0000164645 00000 n -0000166145 00000 n -0000166167 00000 n -0000166352 00000 n -0000168204 00000 n -0000168226 00000 n -0000168411 00000 n -0000170318 00000 n -0000170340 00000 n -0000170497 00000 n -0000171428 00000 n -0000171449 00000 n -0000171601 00000 n -0000173342 00000 n -0000173364 00000 n -0000173506 00000 n -0000175268 00000 n -0000175290 00000 n -0000175441 00000 n -0000177332 00000 n -0000177354 00000 n -0000177511 00000 n -0000179364 00000 n -0000179386 00000 n -0000179580 00000 n -0000181640 00000 n -0000181662 00000 n -0000181837 00000 n -0000183429 00000 n -0000183451 00000 n -0000183635 00000 n -0000184985 00000 n -0000185007 00000 n -0000185167 00000 n -0000186410 00000 n -0000186432 00000 n -0000186583 00000 n -0000188039 00000 n -0000188061 00000 n -0000188222 00000 n -0000189870 00000 n -0000189892 00000 n -0000190025 00000 n -0000190495 00000 n -0000190516 00000 n -0000190683 00000 n -0000192351 00000 n -0000192373 00000 n -0000192530 00000 n -0000193718 00000 n -0000193740 00000 n -0000193897 00000 n -0000195449 00000 n -0000195471 00000 n -0000195655 00000 n -0000196460 00000 n -0000196481 00000 n -0000196638 00000 n -0000202061 00000 n -0000202083 00000 n -0000202240 00000 n -0000207534 00000 n -0000207556 00000 n -0000207713 00000 n -0000212841 00000 n -0000212863 00000 n -0000213020 00000 n -0000213790 00000 n -0000213811 00000 n -0000213868 00000 n -0000213973 00000 n -0000214151 00000 n -0000214270 00000 n -0000214405 00000 n -0000214541 00000 n -0000214689 00000 n -0000214839 00000 n -0000214979 00000 n -0000215120 00000 n -0000215273 00000 n -0000215435 00000 n -0000215584 00000 n -0000215772 00000 n -0000215905 00000 n -0000216033 00000 n -0000216151 00000 n -0000216287 00000 n -0000216429 00000 n -0000216545 00000 n -0000216671 00000 n -0000216787 00000 n -0000216978 00000 n -0000217077 00000 n -0000217225 00000 n -0000217343 00000 n -0000217467 00000 n -0000217589 00000 n -0000217715 00000 n -0000217873 00000 n -0000218003 00000 n -0000218127 00000 n -0000218245 00000 n -0000218363 00000 n -0000218482 00000 n -0000218672 00000 n -0000218858 00000 n -0000219011 00000 n -0000219174 00000 n -0000219325 00000 n -0000219429 00000 n -0000219646 00000 n -0000219752 00000 n -0000219884 00000 n -0000220006 00000 n -0000220211 00000 n -0000220316 00000 n -0000220416 00000 n -0000220620 00000 n -0000220781 00000 n -0000220929 00000 n -0000221057 00000 n -0000221200 00000 n -0000221324 00000 n -0000221453 00000 n -0000221598 00000 n -0000221763 00000 n -0000221915 00000 n -0000222095 00000 n -0000222200 00000 n -0000222319 00000 n -0000222444 00000 n -0000222589 00000 n -0000222731 00000 n -0000222881 00000 n -0000223012 00000 n -0000223138 00000 n -0000223263 00000 n -0000223403 00000 n -0000223530 00000 n -0000223661 00000 n -0000223792 00000 n -0000223970 00000 n -0000224098 00000 n -0000224234 00000 n -0000224369 00000 n -0000224575 00000 n -0000224688 00000 n -0000224804 00000 n -0000224949 00000 n -0000225120 00000 n -0000225269 00000 n -0000225424 00000 n -0000225564 00000 n -0000225696 00000 n -0000225830 00000 n -0000225962 00000 n -0000226100 00000 n -0000226250 00000 n -0000226418 00000 n -0000226565 00000 n -0000226752 00000 n -0000226865 00000 n -0000226981 00000 n -0000227137 00000 n -0000227295 00000 n -0000227426 00000 n -0000227572 00000 n -0000227706 00000 n -0000227839 00000 n -0000228060 00000 n -0000228161 00000 n -0000228280 00000 n -0000228409 00000 n -0000228568 00000 n -0000228702 00000 n -0000228833 00000 n -0000228960 00000 n -0000229099 00000 n -0000229234 00000 n -0000229386 00000 n -0000229535 00000 n -0000229640 00000 n -0000229850 00000 n -0000229955 00000 n -0000230078 00000 n -0000230210 00000 n -0000230334 00000 n -0000230462 00000 n -0000230607 00000 n -0000230739 00000 n -0000230884 00000 n -0000231025 00000 n -0000231152 00000 n -0000231293 00000 n -0000231418 00000 n -0000231543 00000 n -0000231674 00000 n -0000231796 00000 n -0000231903 00000 n -0000232073 00000 n -0000232174 00000 n -0000232363 00000 n -0000232557 00000 n -0000232744 00000 n -0000232906 00000 n -0000233098 00000 n -0000233207 00000 n -0000233341 00000 n -0000233471 00000 n -0000233584 00000 n -0000233679 00000 n +0000022142 00000 n +0000022217 00000 n +0000022304 00000 n +0000022377 00000 n +0000022464 00000 n +0000022514 00000 n +0000022592 00000 n +0000022679 00000 n +0000022705 00000 n +0000022768 00000 n +0000022855 00000 n +0000022918 00000 n +0000023005 00000 n +0000023059 00000 n +0000023146 00000 n +0000023188 00000 n +0000023229 00000 n +0000023316 00000 n +0000023342 00000 n +0000023447 00000 n +0000023553 00000 n +0000023659 00000 n +0000023765 00000 n +0000023871 00000 n +0000023977 00000 n +0000024083 00000 n +0000024189 00000 n +0000024295 00000 n +0000024401 00000 n +0000024507 00000 n +0000024613 00000 n +0000024719 00000 n +0000024825 00000 n +0000024931 00000 n +0000025037 00000 n +0000025143 00000 n +0000025249 00000 n +0000025355 00000 n +0000025461 00000 n +0000025566 00000 n +0000025672 00000 n +0000025778 00000 n +0000025884 00000 n +0000025990 00000 n +0000026096 00000 n +0000026202 00000 n +0000026308 00000 n +0000026414 00000 n +0000026520 00000 n +0000026626 00000 n +0000026732 00000 n +0000026838 00000 n +0000026944 00000 n +0000027050 00000 n +0000027156 00000 n +0000027262 00000 n +0000027368 00000 n +0000027474 00000 n +0000027579 00000 n +0000027685 00000 n +0000027791 00000 n +0000027897 00000 n +0000028000 00000 n +0000028104 00000 n +0000028482 00000 n +0000028588 00000 n +0000028693 00000 n +0000028799 00000 n +0000028905 00000 n +0000029011 00000 n +0000029117 00000 n +0000029223 00000 n +0000029329 00000 n +0000029435 00000 n +0000029541 00000 n +0000029647 00000 n +0000029752 00000 n +0000029858 00000 n +0000029964 00000 n +0000030070 00000 n +0000030176 00000 n +0000030282 00000 n +0000030388 00000 n +0000030494 00000 n +0000030600 00000 n +0000030706 00000 n +0000030812 00000 n +0000030918 00000 n +0000031024 00000 n +0000031130 00000 n +0000031235 00000 n +0000031341 00000 n +0000031447 00000 n +0000031553 00000 n +0000031658 00000 n +0000031764 00000 n +0000031870 00000 n +0000031976 00000 n +0000032082 00000 n +0000032188 00000 n +0000032294 00000 n +0000032400 00000 n +0000032506 00000 n +0000032612 00000 n +0000032718 00000 n +0000032824 00000 n +0000032929 00000 n +0000033033 00000 n +0000033137 00000 n +0000033507 00000 n +0000033612 00000 n +0000033718 00000 n +0000033824 00000 n +0000033930 00000 n +0000034036 00000 n +0000034142 00000 n +0000034248 00000 n +0000034354 00000 n +0000034460 00000 n +0000034565 00000 n +0000034671 00000 n +0000034777 00000 n +0000034883 00000 n +0000034989 00000 n +0000035095 00000 n +0000035201 00000 n +0000035307 00000 n +0000035413 00000 n +0000035519 00000 n +0000035625 00000 n +0000035731 00000 n +0000035837 00000 n +0000035942 00000 n +0000036048 00000 n +0000036154 00000 n +0000036260 00000 n +0000036366 00000 n +0000036472 00000 n +0000036578 00000 n +0000036684 00000 n +0000036790 00000 n +0000036896 00000 n +0000037002 00000 n +0000037108 00000 n +0000037214 00000 n +0000037320 00000 n +0000037426 00000 n +0000037532 00000 n +0000037638 00000 n +0000037743 00000 n +0000037849 00000 n +0000037955 00000 n +0000038060 00000 n +0000038164 00000 n +0000038268 00000 n +0000038646 00000 n +0000038751 00000 n +0000038857 00000 n +0000038963 00000 n +0000039069 00000 n +0000039175 00000 n +0000039279 00000 n +0000039345 00000 n +0000039379 00000 n +0000039413 00000 n +0000042026 00000 n +0000042075 00000 n +0000042124 00000 n +0000042173 00000 n +0000042222 00000 n +0000042271 00000 n +0000042320 00000 n +0000042369 00000 n +0000042418 00000 n +0000042467 00000 n +0000042516 00000 n +0000042565 00000 n +0000042614 00000 n +0000042663 00000 n +0000042712 00000 n +0000042761 00000 n +0000042810 00000 n +0000042859 00000 n +0000042908 00000 n +0000042957 00000 n +0000043006 00000 n +0000043055 00000 n +0000043104 00000 n +0000043153 00000 n +0000043202 00000 n +0000043251 00000 n +0000043300 00000 n +0000043349 00000 n +0000043398 00000 n +0000043447 00000 n +0000043496 00000 n +0000043545 00000 n +0000043594 00000 n +0000043643 00000 n +0000043692 00000 n +0000043741 00000 n +0000043790 00000 n +0000043839 00000 n +0000043888 00000 n +0000043937 00000 n +0000043986 00000 n +0000044035 00000 n +0000044084 00000 n +0000044133 00000 n +0000044182 00000 n +0000044231 00000 n +0000044280 00000 n +0000044329 00000 n +0000044378 00000 n +0000044427 00000 n +0000044476 00000 n +0000044525 00000 n +0000044574 00000 n +0000044623 00000 n +0000044672 00000 n +0000044721 00000 n +0000044770 00000 n +0000044819 00000 n +0000044868 00000 n +0000044917 00000 n +0000044966 00000 n +0000045015 00000 n +0000045064 00000 n +0000045113 00000 n +0000045162 00000 n +0000045211 00000 n +0000045260 00000 n +0000045309 00000 n +0000045358 00000 n +0000045407 00000 n +0000045456 00000 n +0000045505 00000 n +0000045554 00000 n +0000045603 00000 n +0000045652 00000 n +0000045701 00000 n +0000045750 00000 n +0000045799 00000 n +0000045848 00000 n +0000045897 00000 n +0000045946 00000 n +0000045995 00000 n +0000046044 00000 n +0000046093 00000 n +0000046142 00000 n +0000046191 00000 n +0000046240 00000 n +0000046289 00000 n +0000046338 00000 n +0000046387 00000 n +0000046436 00000 n +0000046485 00000 n +0000046534 00000 n +0000046583 00000 n +0000046632 00000 n +0000046681 00000 n +0000046730 00000 n +0000046779 00000 n +0000046828 00000 n +0000046877 00000 n +0000046926 00000 n +0000046975 00000 n +0000047024 00000 n +0000047073 00000 n +0000047122 00000 n +0000047171 00000 n +0000047220 00000 n +0000047269 00000 n +0000047318 00000 n +0000047367 00000 n +0000047416 00000 n +0000047465 00000 n +0000047514 00000 n +0000047563 00000 n +0000047612 00000 n +0000047661 00000 n +0000047710 00000 n +0000047759 00000 n +0000047808 00000 n +0000047857 00000 n +0000047906 00000 n +0000047955 00000 n +0000048004 00000 n +0000048053 00000 n +0000048102 00000 n +0000048151 00000 n +0000048200 00000 n +0000048249 00000 n +0000048298 00000 n +0000048347 00000 n +0000048396 00000 n +0000048445 00000 n +0000048494 00000 n +0000048543 00000 n +0000048592 00000 n +0000048641 00000 n +0000048690 00000 n +0000048739 00000 n +0000048788 00000 n +0000048837 00000 n +0000048886 00000 n +0000048935 00000 n +0000048984 00000 n +0000049033 00000 n +0000049082 00000 n +0000049131 00000 n +0000049180 00000 n +0000049229 00000 n +0000049278 00000 n +0000049327 00000 n +0000049376 00000 n +0000049425 00000 n +0000049474 00000 n +0000049523 00000 n +0000049572 00000 n +0000049621 00000 n +0000049670 00000 n +0000049719 00000 n +0000049768 00000 n +0000049817 00000 n +0000049866 00000 n +0000049915 00000 n +0000050672 00000 n +0000050828 00000 n +0000051551 00000 n +0000051572 00000 n +0000051746 00000 n +0000052908 00000 n +0000052930 00000 n +0000053081 00000 n +0000054587 00000 n +0000054609 00000 n +0000054769 00000 n +0000056205 00000 n +0000056227 00000 n +0000056405 00000 n +0000057665 00000 n +0000057687 00000 n +0000057829 00000 n +0000059413 00000 n +0000059435 00000 n +0000059568 00000 n +0000061403 00000 n +0000061425 00000 n +0000061558 00000 n +0000062081 00000 n +0000062102 00000 n +0000062263 00000 n +0000063547 00000 n +0000063569 00000 n +0000063730 00000 n +0000065485 00000 n +0000065507 00000 n +0000065667 00000 n +0000067312 00000 n +0000067334 00000 n +0000067476 00000 n +0000069546 00000 n +0000069568 00000 n +0000069710 00000 n +0000071522 00000 n +0000071544 00000 n +0000071686 00000 n +0000073411 00000 n +0000073433 00000 n +0000073584 00000 n +0000075348 00000 n +0000075370 00000 n +0000075545 00000 n +0000077652 00000 n +0000077674 00000 n +0000077834 00000 n +0000079430 00000 n +0000079452 00000 n +0000079627 00000 n +0000081122 00000 n +0000081144 00000 n +0000081296 00000 n +0000082103 00000 n +0000082124 00000 n +0000082275 00000 n +0000083913 00000 n +0000083935 00000 n +0000084100 00000 n +0000085872 00000 n +0000085894 00000 n +0000086059 00000 n +0000086952 00000 n +0000086973 00000 n +0000087147 00000 n +0000088752 00000 n +0000088774 00000 n +0000088917 00000 n +0000089675 00000 n +0000089696 00000 n +0000089879 00000 n +0000091747 00000 n +0000091769 00000 n +0000091938 00000 n +0000093792 00000 n +0000093814 00000 n +0000093974 00000 n +0000095658 00000 n +0000095680 00000 n +0000095853 00000 n +0000097582 00000 n +0000097604 00000 n +0000097755 00000 n +0000098679 00000 n +0000098700 00000 n +0000098884 00000 n +0000100709 00000 n +0000100731 00000 n +0000100905 00000 n +0000103078 00000 n +0000103100 00000 n +0000103293 00000 n +0000105220 00000 n +0000105242 00000 n +0000105426 00000 n +0000107336 00000 n +0000107358 00000 n +0000107534 00000 n +0000109335 00000 n +0000109357 00000 n +0000109527 00000 n +0000111125 00000 n +0000111147 00000 n +0000111332 00000 n +0000112808 00000 n +0000112830 00000 n +0000113023 00000 n +0000114594 00000 n +0000114616 00000 n +0000114791 00000 n +0000116571 00000 n +0000116593 00000 n +0000116749 00000 n +0000118310 00000 n +0000118332 00000 n +0000118517 00000 n +0000120369 00000 n +0000120391 00000 n +0000120557 00000 n +0000122204 00000 n +0000122226 00000 n +0000122411 00000 n +0000124360 00000 n +0000124382 00000 n +0000124566 00000 n +0000126293 00000 n +0000126315 00000 n +0000126485 00000 n +0000128090 00000 n +0000128112 00000 n +0000128281 00000 n +0000130154 00000 n +0000130176 00000 n +0000130361 00000 n +0000132225 00000 n +0000132247 00000 n +0000132423 00000 n +0000134513 00000 n +0000134535 00000 n +0000134710 00000 n +0000136650 00000 n +0000136672 00000 n +0000136848 00000 n +0000139164 00000 n +0000139186 00000 n +0000139338 00000 n +0000141318 00000 n +0000141340 00000 n +0000141500 00000 n +0000143367 00000 n +0000143389 00000 n +0000143540 00000 n +0000145292 00000 n +0000145314 00000 n +0000145446 00000 n +0000147320 00000 n +0000147342 00000 n +0000147484 00000 n +0000149555 00000 n +0000149577 00000 n +0000149728 00000 n +0000151522 00000 n +0000151544 00000 n +0000151676 00000 n +0000153469 00000 n +0000153491 00000 n +0000153614 00000 n +0000154068 00000 n +0000154089 00000 n +0000154246 00000 n +0000155880 00000 n +0000155902 00000 n +0000156054 00000 n +0000157714 00000 n +0000157736 00000 n +0000157878 00000 n +0000158761 00000 n +0000158782 00000 n +0000158967 00000 n +0000161123 00000 n +0000161145 00000 n +0000161321 00000 n +0000163506 00000 n +0000163528 00000 n +0000163679 00000 n +0000164780 00000 n +0000164802 00000 n +0000164978 00000 n +0000166478 00000 n +0000166500 00000 n +0000166685 00000 n +0000168537 00000 n +0000168559 00000 n +0000168744 00000 n +0000170651 00000 n +0000170673 00000 n +0000170830 00000 n +0000171761 00000 n +0000171782 00000 n +0000171934 00000 n +0000173675 00000 n +0000173697 00000 n +0000173839 00000 n +0000175601 00000 n +0000175623 00000 n +0000175774 00000 n +0000177665 00000 n +0000177687 00000 n +0000177844 00000 n +0000179697 00000 n +0000179719 00000 n +0000179913 00000 n +0000181973 00000 n +0000181995 00000 n +0000182170 00000 n +0000183762 00000 n +0000183784 00000 n +0000183968 00000 n +0000185318 00000 n +0000185340 00000 n +0000185500 00000 n +0000186743 00000 n +0000186765 00000 n +0000186916 00000 n +0000188372 00000 n +0000188394 00000 n +0000188555 00000 n +0000190203 00000 n +0000190225 00000 n +0000190358 00000 n +0000190828 00000 n +0000190849 00000 n +0000191016 00000 n +0000192684 00000 n +0000192706 00000 n +0000192863 00000 n +0000194051 00000 n +0000194073 00000 n +0000194230 00000 n +0000195782 00000 n +0000195804 00000 n +0000195988 00000 n +0000196793 00000 n +0000196814 00000 n +0000196971 00000 n +0000202394 00000 n +0000202416 00000 n +0000202573 00000 n +0000207867 00000 n +0000207889 00000 n +0000208046 00000 n +0000213263 00000 n +0000213285 00000 n +0000213442 00000 n +0000214212 00000 n +0000214233 00000 n +0000214290 00000 n +0000214395 00000 n +0000214573 00000 n +0000214692 00000 n +0000214827 00000 n +0000214963 00000 n +0000215111 00000 n +0000215261 00000 n +0000215401 00000 n +0000215542 00000 n +0000215695 00000 n +0000215857 00000 n +0000216006 00000 n +0000216194 00000 n +0000216327 00000 n +0000216455 00000 n +0000216573 00000 n +0000216709 00000 n +0000216851 00000 n +0000216967 00000 n +0000217093 00000 n +0000217209 00000 n +0000217400 00000 n +0000217499 00000 n +0000217647 00000 n +0000217765 00000 n +0000217889 00000 n +0000218011 00000 n +0000218137 00000 n +0000218295 00000 n +0000218425 00000 n +0000218549 00000 n +0000218667 00000 n +0000218785 00000 n +0000218904 00000 n +0000219094 00000 n +0000219280 00000 n +0000219433 00000 n +0000219596 00000 n +0000219747 00000 n +0000219851 00000 n +0000220068 00000 n +0000220174 00000 n +0000220306 00000 n +0000220428 00000 n +0000220633 00000 n +0000220738 00000 n +0000220838 00000 n +0000221042 00000 n +0000221203 00000 n +0000221351 00000 n +0000221479 00000 n +0000221622 00000 n +0000221746 00000 n +0000221875 00000 n +0000222020 00000 n +0000222185 00000 n +0000222337 00000 n +0000222517 00000 n +0000222622 00000 n +0000222741 00000 n +0000222866 00000 n +0000223011 00000 n +0000223153 00000 n +0000223303 00000 n +0000223434 00000 n +0000223560 00000 n +0000223685 00000 n +0000223825 00000 n +0000223952 00000 n +0000224083 00000 n +0000224214 00000 n +0000224392 00000 n +0000224520 00000 n +0000224656 00000 n +0000224791 00000 n +0000224997 00000 n +0000225110 00000 n +0000225226 00000 n +0000225371 00000 n +0000225542 00000 n +0000225691 00000 n +0000225846 00000 n +0000225986 00000 n +0000226118 00000 n +0000226252 00000 n +0000226384 00000 n +0000226522 00000 n +0000226672 00000 n +0000226840 00000 n +0000226987 00000 n +0000227211 00000 n +0000227324 00000 n +0000227440 00000 n +0000227596 00000 n +0000227754 00000 n +0000227885 00000 n +0000228031 00000 n +0000228165 00000 n +0000228298 00000 n +0000228519 00000 n +0000228620 00000 n +0000228739 00000 n +0000228868 00000 n +0000229027 00000 n +0000229162 00000 n +0000229295 00000 n +0000229424 00000 n +0000229564 00000 n +0000229699 00000 n +0000229851 00000 n +0000230000 00000 n +0000230105 00000 n +0000230315 00000 n +0000230420 00000 n +0000230543 00000 n +0000230675 00000 n +0000230799 00000 n +0000230927 00000 n +0000231072 00000 n +0000231204 00000 n +0000231349 00000 n +0000231490 00000 n +0000231617 00000 n +0000231758 00000 n +0000231883 00000 n +0000232008 00000 n +0000232139 00000 n +0000232261 00000 n +0000232368 00000 n +0000232538 00000 n +0000232639 00000 n +0000232828 00000 n +0000233022 00000 n +0000233209 00000 n +0000233371 00000 n +0000233563 00000 n +0000233672 00000 n +0000233806 00000 n +0000233936 00000 n +0000234049 00000 n +0000234144 00000 n trailer -<]>> +<<52fc0eaf02438f2b8787e6e3d63d5828>]>> startxref -233894 +234359 %%EOF diff --git a/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml index 4456ef01a83..53a0959c39a 100644 --- a/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml +++ b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml @@ -13,7 +13,7 @@ -How to a Purely Samba Controlled Domain +How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain diff --git a/docs/docbook/projdoc/samba-doc.sgml b/docs/docbook/projdoc/samba-doc.sgml index e2fc5a1eb19..28baa7f6094 100644 --- a/docs/docbook/projdoc/samba-doc.sgml +++ b/docs/docbook/projdoc/samba-doc.sgml @@ -31,7 +31,7 @@ Abstract -Last Update : Tue Jul 31 15:58:03 CDT 2001 +Last Update : Mon Apr 1 08:47:26 CST 2002 @@ -43,6 +43,13 @@ on the "Documentation" page. Please send updates to jerry@samba.org. + +This documentation is distributed under the GNU General Public License (GPL) +version 2. A copy of the license is included with the Samba source +distribution. A copy can be found on-line at http://www.fsf.org/licenses/gpl.txt + + Cheers, jerry diff --git a/docs/htmldocs/Samba-BDC-HOWTO.html b/docs/htmldocs/Samba-BDC-HOWTO.html index 0847335fe66..fd83c4e09a3 100644 --- a/docs/htmldocs/Samba-BDC-HOWTO.html +++ b/docs/htmldocs/Samba-BDC-HOWTO.html @@ -1,7 +1,7 @@ How to a Purely Samba Controlled DomainHow to Act as a Backup Domain Controller in a Purely Samba Controlled DomainHow to a Purely Samba Controlled DomainHow to Act as a Backup Domain Controller in a Purely Samba Controlled Domain

    Last Update : Tue Jul 31 15:58:03 CDT 2001

    : Mon Apr 1 08:47:26 CST 2002

    This book is a collection of HOWTOs added to Samba documentation over the years. I try to ensure that all are current, but sometimes the is a larger job @@ -56,6 +56,14 @@ TARGET="_top" >jerry@samba.org.

    This documentation is distributed under the GNU General Public License (GPL) +version 2. A copy of the license is included with the Samba source +distribution. A copy can be found on-line at http://www.fsf.org/licenses/gpl.txt

    Cheers, jerry

    1.1. Step 0: Read the man pages
    1.2. Step 1: Building the Binaries
    1.3. Step 2: The all important step
    1.4. Step 3: Create the smb configuration file.
    1.5. Step 4: Test your config file with
    1.6. Step 5: Starting the smbd and nmbd
    1.6.1. Step 5a: Starting from inetd.conf
    1.6.2. Step 5b. Alternative: starting it as a daemon
    1.7. Step 6: Try listing the shares available on your server
    1.8. Step 7: Try connecting with the unix client
    1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client
    1.10. What If Things Don't Work?
    1.10.1. Diagnosing Problems
    1.10.2. Scope IDs
    1.10.3. Choosing the Protocol Level
    1.10.4. Printing from UNIX to a Client PC
    1.10.5. Locking
    1.10.6. Mapping Usernames
    1.10.7. Other Character Sets
    2.1. Agenda
    2.2. Name Resolution in a pure Unix/Linux world
    2.2.1. /etc/hosts
    2.2.2. /etc/resolv.conf
    2.2.3. /etc/host.conf
    2.2.4. /etc/nsswitch.conf
    2.3. Name resolution as used within MS Windows networking
    2.3.1. The NetBIOS Name Cache
    2.3.2. The LMHOSTS file
    2.3.3. HOSTS file
    2.3.4. DNS Lookup
    2.3.5. WINS Lookup
    2.4. How browsing functions and how to deploy stable and dependable browsing using Samba
    2.5. MS Windows security options and how to configure Samba for seemless integration
    2.5.1. Use MS Windows NT as an authentication server
    2.5.2. Make Samba a member of an MS Windows NT security domain
    2.5.3. Configure Samba as an authentication server
    2.5.3.1. Users
    2.5.3.2. MS Windows NT Machine Accounts
    2.6. Conclusions
    3.1. Samba and PAM
    3.2. Distributed Authentication
    3.3. PAM Configuration in smb.conf
    4.1. Instructions
    4.1.1. Notes
    5.1. Viewing and changing UNIX permissions using the NT security dialogs
    5.2. How to view file security on a Samba share
    5.3. Viewing file ownership
    5.4. Viewing file or directory permissions
    5.4.1. File Permissions
    5.4.2. Directory Permissions
    5.5. Modifying file or directory permissions
    5.6. Interaction with the standard Samba create mask parameters
    5.7. Interaction with the standard Samba file attribute mapping
    6.1. Introduction
    6.2. Configuration
    6.2.1. Creating [print$]
    6.2.2. Setting Drivers for Existing Printers
    6.2.3. Support a large number of printers
    6.2.4. Adding New Printers via the Windows NT APW
    6.2.5. Samba and Printer Ports
    6.3. The Imprints Toolset
    6.3.1. What is Imprints?
    6.3.2. Creating Printer Driver Packages
    6.3.3. The Imprints server
    6.3.4. The Installation Client
    6.4.
    7.1. Joining an NT Domain with Samba 2.2
    7.2. Samba and Windows 2000 Domains
    7.3. Why is this better than security = server?
    8.1. Prerequisite Reading
    8.2. Background
    8.3. Configuring the Samba Domain Controller
    8.4. Creating Machine Trust Accounts and Joining Clients to the Domain
    8.4.1. Manual Creation of Machine Trust Accounts
    8.4.2. "On-the-Fly" Creation of Machine Trust Accounts
    8.4.3. Joining the Client to the Domain
    8.5. Common Problems and Errors
    8.6. System Policies and Profiles
    8.7. What other help can I get?
    8.8. Domain Control for Windows 9x/ME
    8.8.1. Configuration Instructions: Network Logons
    8.8.2. Configuration Instructions: Setting up Roaming User Profiles
    8.8.2.1. Windows NT Configuration
    8.8.2.2. Windows 9X Configuration
    8.8.2.3. Win9X and WinNT Configuration
    8.8.2.4. Windows 9X Profile Setup
    8.8.2.5. Windows NT Workstation 4.0
    8.8.2.6. Windows NT Server
    8.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0
    8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba
    9. How to a Purely Samba Controlled DomainHow to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
    9.1. Prerequisite Reading
    9.2. Background
    9.3. What qualifies a Domain Controller on the network?
    9.3.1. How does a Workstation find its domain controller?
    9.3.2. When is the PDC needed?
    9.4. Can Samba be a Backup Domain Controller?
    9.5. How do I set up a Samba BDC?
    9.5.1. How do I replicate the smbpasswd file?
    10.1. Purpose
    10.2. Introduction
    10.3. Supported LDAP Servers
    10.4. Schema and Relationship to the RFC 2307 posixAccount
    10.5. Configuring Samba with LDAP
    10.5.1. OpenLDAP configuration
    10.5.2. Configuring Samba
    10.6. Accounts and Groups management
    10.7. Security and sambaAccount
    10.8. LDAP specials attributes for sambaAccounts
    10.9. Example LDIF Entries for a sambaAccount
    10.10. Comments
    11.1. Abstract
    11.2. Introduction
    11.3. What Winbind Provides
    11.3.1. Target Uses
    11.4. How Winbind Works
    11.4.1. Microsoft Remote Procedure Calls
    11.4.2. Name Service Switch
    11.4.3. Pluggable Authentication Modules
    11.4.4. User and Group ID Allocation
    11.4.5. Result Caching
    11.5. Installation and Configuration
    11.5.1. Introduction
    11.5.2. Requirements
    11.5.3. Testing Things Out
    11.5.3.1. Configure and compile SAMBA
    11.5.3.2. Configure nsswitch.conf
    11.5.3.3. Configure smb.conf
    11.5.3.4. Join the SAMBA server to the PDC domain
    11.5.3.5. Start up the winbindd daemon and test it!
    11.5.3.6. Fix the /etc/rc.d/init.d/smb
    11.5.3.7. Configure Winbind and PAM
    11.6. Limitations
    11.7. Conclusion
    12.1. FAQs
    12.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?
    12.1.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?
    12.1.3. Are there any other issues when OS/2 (any version) is used as a client?
    12.1.4. How do I get printer driver download working for OS/2 clients?
    13.1. Introduction
    13.2. CVS Access to samba.org
    13.2.1. Access via CVSweb
    13.2.2. Access via cvs
    Index

    1.1. Step 0: Read the man pages


    1.2. Step 1: Building the Binaries


    1.3. Step 2: The all important step


    1.4. Step 3: Create the smb configuration file.


    1.5. Step 4: Test your config file with

    1.6. Step 5: Starting the smbd and nmbd


    1.6.1. Step 5a: Starting from inetd.conf


    1.6.2. Step 5b. Alternative: starting it as a daemon


    1.7. Step 6: Try listing the shares available on your server


    1.8. Step 7: Try connecting with the unix client


    1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client


    1.10. What If Things Don't Work?


    1.10.1. Diagnosing Problems


    1.10.2. Scope IDs


    1.10.3. Choosing the Protocol Level


    1.10.4. Printing from UNIX to a Client PC


    1.10.5. Locking


    1.10.6. Mapping Usernames


    1.10.7. Other Character Sets

    2.1. Agenda


    2.2. Name Resolution in a pure Unix/Linux world


    2.2.1. /etc/hosts

    2.2.2. /etc/resolv.conf

    2.2.3. /etc/host.conf

    2.2.4. /etc/nsswitch.conf

    2.3. Name resolution as used within MS Windows networking


    2.3.1. The NetBIOS Name Cache


    2.3.2. The LMHOSTS file


    2.3.3. HOSTS file


    2.3.4. DNS Lookup


    2.3.5. WINS Lookup


    2.4. How browsing functions and how to deploy stable and dependable browsing using Samba


    2.5. MS Windows security options and how to configure Samba for seemless integration


    2.5.1. Use MS Windows NT as an authentication server


    2.5.2. Make Samba a member of an MS Windows NT security domain


    2.5.3. Configure Samba as an authentication server


    2.5.3.1. Users


    2.5.3.2. MS Windows NT Machine Accounts


    2.6. Conclusions

    3.1. Samba and PAM


    3.2. Distributed Authentication


    3.3. PAM Configuration in smb.conf

    4.1. Instructions


    4.1.1. Notes

    5.1. Viewing and changing UNIX permissions using the NT security dialogs


    5.2. How to view file security on a Samba share


    5.3. Viewing file ownership


    5.4. Viewing file or directory permissions


    5.4.1. File Permissions


    5.4.2. Directory Permissions


    5.5. Modifying file or directory permissions


    5.6. Interaction with the standard Samba create mask parameters


    5.7. Interaction with the standard Samba file attribute mapping

    6.1. Introduction


    6.2. Configuration


    6.2.1. Creating [print$]


    6.2.2. Setting Drivers for Existing Printers


    6.2.3. Support a large number of printers


    6.2.4. Adding New Printers via the Windows NT APW


    6.2.5. Samba and Printer Ports


    6.3. The Imprints Toolset


    6.3.1. What is Imprints?


    6.3.2. Creating Printer Driver Packages


    6.3.3. The Imprints server


    6.3.4. The Installation Client


    6.4.

    7.1. Joining an NT Domain with Samba 2.2


    7.2. Samba and Windows 2000 Domains


    7.3. Why is this better than security = server?

    8.1. Prerequisite Reading


    8.2. Background


    8.3. Configuring the Samba Domain Controller


    8.4. Creating Machine Trust Accounts and Joining Clients to the Domain


    8.4.1. Manual Creation of Machine Trust Accounts


    8.4.2. "On-the-Fly" Creation of Machine Trust Accounts


    8.4.3. Joining the Client to the Domain


    8.5. Common Problems and Errors


    8.6. System Policies and Profiles


    8.7. What other help can I get?


    8.8. Domain Control for Windows 9x/ME


    8.8.1. Configuration Instructions: Network Logons


    8.8.2. Configuration Instructions: Setting up Roaming User Profiles


    8.8.2.1. Windows NT Configuration


    8.8.2.2. Windows 9X Configuration


    8.8.2.3. Win9X and WinNT Configuration


    8.8.2.4. Windows 9X Profile Setup


    8.8.2.5. Windows NT Workstation 4.0


    8.8.2.6. Windows NT Server


    8.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0


    8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba


    Chapter 9. How to a Purely Samba Controlled DomainChapter 9. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain

    9.1. Prerequisite Reading


    9.2. Background


    9.3. What qualifies a Domain Controller on the network?


    9.3.1. How does a Workstation find its domain controller?


    9.3.2. When is the PDC needed?


    9.4. Can Samba be a Backup Domain Controller?


    9.5. How do I set up a Samba BDC?


    9.5.1. How do I replicate the smbpasswd file?

    10.1. Purpose


    10.2. Introduction


    10.3. Supported LDAP Servers


    10.4. Schema and Relationship to the RFC 2307 posixAccount


    10.5. Configuring Samba with LDAP

    10.5.1. OpenLDAP configuration


    10.5.2. Configuring Samba


    10.6. Accounts and Groups management


    10.7. Security and sambaAccount


    10.8. LDAP specials attributes for sambaAccounts


    10.9. Example LDIF Entries for a sambaAccount


    10.10. Comments

    11.1. Abstract


    11.2. Introduction


    11.3. What Winbind Provides


    11.3.1. Target Uses


    11.4. How Winbind Works


    11.4.1. Microsoft Remote Procedure Calls


    11.4.2. Name Service Switch


    11.4.3. Pluggable Authentication Modules


    11.4.4. User and Group ID Allocation


    11.4.5. Result Caching


    11.5. Installation and Configuration


    11.5.1. Introduction


    11.5.2. Requirements


    11.5.3. Testing Things Out


    11.5.3.1. Configure and compile SAMBA


    11.5.3.2. Configure nsswitch.conf

    11.5.3.3. Configure smb.conf


    11.5.3.4. Join the SAMBA server to the PDC domain


    11.5.3.5. Start up the winbindd daemon and test it!


    11.5.3.6. Fix the /etc/rc.d/init.d/smb

    11.5.3.7. Configure Winbind and PAM


    11.6. Limitations


    11.7. Conclusion

    12.1. FAQs


    Index

    Primary Domain Controller, Background
    printer admin) account -from a Windows NT 4.0 client. Navigate to the "Printers" folder -on the Samba server. You should see an initial listing of printers +from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or +"My Network Places" and browse for the Samba host. Once you have located +the server, navigate to the "Printers..." folder. +You should see an initial listing of printers that matches the printer shares defined on your Samba host.

    Date: Mon, 1 Apr 2002 18:09:39 +0000 Subject: don't have bin/ in target for smbwrapper.so objects as this makes the SONAME=bin/smbwrapper.so --- source/Makefile.in | 33 +- source/configure | 1531 ++++++++++++++++++++++++++------------------------- source/configure.in | 8 +- 3 files changed, 791 insertions(+), 781 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index deff458a17b..ce181f94fd4 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -92,7 +92,7 @@ WINBIND_LPROGS = @WINBIND_LTARGETS@ SPROGS = bin/smbd bin/nmbd bin/swat PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@ -PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ +PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAPPROG@ bin/@WRAP@ bin/@WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ MPROGS = @MPROGS@ LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup @@ -420,7 +420,7 @@ everything : CHECK $(SPROGS) $(PROGS) $(SHLIBS) nsswitch smbwrapper smbtorture d pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@ -smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@ +smbwrapper : CHECK @WRAPPROG@ @WRAP@ @WRAP32@ torture : CHECK $(TORTURE_PROGS) @@ -617,26 +617,27 @@ bin/smbw_sample: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(LIBS) -bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) - @echo Linking shared library $@ - @$(SHLD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS) +@WRAPPROG@: $(SMBSH_OBJ) bin/.dummy + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) -bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) - @echo Linking shared library $@ - @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) +@WRAP@: $(PICOBJS) + @echo Linking shared library bin/$@ + @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS) + +@WRAP32@: $(PICOBJS32) + @echo Linking shared library bin/$@ + @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS) -libsmbclient: $(LIBSMBCLIENT_PICOBJS) - @echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@ - @$(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ \ - $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ +libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) + @echo Linking libsmbclient shared library bin/$@ + @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR) + +libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) @echo Linking libsmbclient non-shared library bin/$@.a @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) -bin/smbsh: $(SMBSH_OBJ) bin/.dummy - @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) - bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) @echo Linking shared library $@ $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) $(LIBS) -lc diff --git a/source/configure b/source/configure index be698039fcb..5d8e971b830 100755 --- a/source/configure +++ b/source/configure @@ -758,6 +758,7 @@ fi + # compile with optimization and without debugging by default @@ -777,7 +778,7 @@ fi # 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:781: checking for $ac_word" >&5 +echo "configure:782: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -807,7 +808,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:811: checking for $ac_word" >&5 +echo "configure:812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -858,7 +859,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:862: checking for $ac_word" >&5 +echo "configure:863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -890,7 +891,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:895: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -901,12 +902,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 905 "configure" +#line 906 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:911: \"$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 @@ -932,12 +933,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:936: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:937: checking whether the C compiler ($CC $CFLAGS $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:941: checking whether we are using GNU C" >&5 +echo "configure:942: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -946,7 +947,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:950: \"$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:951: \"$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 @@ -965,7 +966,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:969: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:970: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1027,7 +1028,7 @@ ac_configure=$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:1031: checking for a BSD compatible install" >&5 +echo "configure:1032: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1084,7 +1085,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:1088: checking for $ac_word" >&5 +echo "configure:1089: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1116,10 +1117,10 @@ done 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:1120: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1121: 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:1123: checking whether cc understands -c and -o together" >&5 +echo "configure:1124: 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]/_/'`" @@ -1131,16 +1132,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:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1137: \"$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:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1142: \"$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:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1174,20 +1175,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1178: checking that the C compiler understands volatile" >&5 +echo "configure:1179: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1237,7 +1238,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1241: checking host system type" >&5 +echo "configure:1242: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1258,7 +1259,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1262: checking target system type" >&5 +echo "configure:1263: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1276,7 +1277,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1280: checking build system type" >&5 +echo "configure:1281: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1310,7 +1311,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1314: checking config.cache system type" >&5 +echo "configure:1315: 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" && @@ -1342,7 +1343,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:1346: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1347: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1445,14 +1446,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1449: checking for LFS support" >&5 +echo "configure:1450: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1464,7 +1465,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1491,14 +1492,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1495: checking for LFS support" >&5 +echo "configure:1496: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1536,7 +1537,7 @@ main() { } EOF -if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1557,14 +1558,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1561: checking for LFS support" >&5 +echo "configure:1562: 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 < @@ -1576,7 +1577,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1581: \"$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 @@ -1598,21 +1599,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1602: checking for inline" >&5 +echo "configure:1603: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1638,7 +1639,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1642: checking how to run the C preprocessor" >&5 +echo "configure:1643: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1653,13 +1654,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1664: \"$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 : @@ -1670,13 +1671,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1681: \"$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 : @@ -1687,13 +1688,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1698: \"$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 : @@ -1718,12 +1719,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1722: checking for ANSI C header files" >&5 +echo "configure:1723: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1731,7 +1732,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1736: \"$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* @@ -1748,7 +1749,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 @@ -1766,7 +1767,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 @@ -1787,7 +1788,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1798,7 +1799,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1826,12 +1827,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:1830: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1831: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1839,7 +1840,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1864,7 +1865,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:1868: checking for opendir in -ldir" >&5 +echo "configure:1869: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1872,7 +1873,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1888: \"$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 @@ -1905,7 +1906,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1909: checking for opendir in -lx" >&5 +echo "configure:1910: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1913,7 +1914,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1929: \"$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 @@ -1947,12 +1948,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1951: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1952: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1961,7 +1962,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1982,12 +1983,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1986: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1987: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2003,7 +2004,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2027,17 +2028,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:2031: checking for $ac_hdr" >&5 +echo "configure:2032: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2042: \"$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* @@ -2067,17 +2068,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2071: checking for $ac_hdr" >&5 +echo "configure:2072: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2082: \"$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* @@ -2107,17 +2108,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2111: checking for $ac_hdr" >&5 +echo "configure:2112: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2122: \"$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* @@ -2147,17 +2148,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2151: checking for $ac_hdr" >&5 +echo "configure:2152: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2162: \"$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* @@ -2187,17 +2188,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2191: checking for $ac_hdr" >&5 +echo "configure:2192: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2202: \"$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* @@ -2227,17 +2228,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2231: checking for $ac_hdr" >&5 +echo "configure:2232: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2242: \"$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* @@ -2267,17 +2268,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2271: checking for $ac_hdr" >&5 +echo "configure:2272: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2282: \"$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* @@ -2307,17 +2308,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2311: checking for $ac_hdr" >&5 +echo "configure:2312: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2322: \"$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* @@ -2351,14 +2352,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2380,17 +2381,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2384: checking for $ac_hdr" >&5 +echo "configure:2385: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2395: \"$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* @@ -2420,17 +2421,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2424: checking for $ac_hdr" >&5 +echo "configure:2425: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2435: \"$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* @@ -2460,17 +2461,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2464: checking for $ac_hdr" >&5 +echo "configure:2465: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2475: \"$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* @@ -2500,17 +2501,17 @@ for ac_hdr in 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:2504: checking for $ac_hdr" >&5 +echo "configure:2505: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2515: \"$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* @@ -2540,17 +2541,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:2544: checking for $ac_hdr" >&5 +echo "configure:2545: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2555: \"$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* @@ -2582,17 +2583,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2586: checking for $ac_hdr" >&5 +echo "configure:2587: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2597: \"$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* @@ -2624,17 +2625,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2628: checking for $ac_hdr" >&5 +echo "configure:2629: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2639: \"$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* @@ -2666,17 +2667,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2670: checking for $ac_hdr" >&5 +echo "configure:2671: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2681: \"$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* @@ -2704,7 +2705,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2708: checking size of int" >&5 +echo "configure:2709: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2712,18 +2713,18 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF -if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2728: \"$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 @@ -2743,7 +2744,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2747: checking size of long" >&5 +echo "configure:2748: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2751,18 +2752,18 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF -if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2767: \"$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 @@ -2782,7 +2783,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2786: checking size of short" >&5 +echo "configure:2787: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2790,18 +2791,18 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF -if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2806: \"$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 @@ -2822,12 +2823,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2826: checking for working const" >&5 +echo "configure:2827: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2897,21 +2898,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2901: checking for inline" >&5 +echo "configure:2902: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2937,14 +2938,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2941: checking whether byte ordering is bigendian" >&5 +echo "configure:2942: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2955,11 +2956,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2960: \"$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 < #include @@ -2970,7 +2971,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2990,7 +2991,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3008: \"$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 @@ -3027,14 +3028,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3031: checking whether char is unsigned" >&5 +echo "configure:3032: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3071: \"$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 @@ -3091,12 +3092,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3095: checking return type of signal handlers" >&5 +echo "configure:3096: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3113,7 +3114,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3132,12 +3133,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3136: checking for uid_t in sys/types.h" >&5 +echo "configure:3137: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3166,12 +3167,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3170: checking for mode_t" >&5 +echo "configure:3171: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3199,12 +3200,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3203: checking for off_t" >&5 +echo "configure:3204: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3232,12 +3233,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3236: checking for size_t" >&5 +echo "configure:3237: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3265,12 +3266,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3269: checking for pid_t" >&5 +echo "configure:3270: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3298,12 +3299,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3302: checking for st_rdev in struct stat" >&5 +echo "configure:3303: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3311,7 +3312,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3332,12 +3333,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3336: checking for d_off in dirent" >&5 +echo "configure:3337: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3347,7 +3348,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3368,12 +3369,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3372: checking for ino_t" >&5 +echo "configure:3373: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3401,12 +3402,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3405: checking for loff_t" >&5 +echo "configure:3406: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3434,12 +3435,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3438: checking for offset_t" >&5 +echo "configure:3439: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3467,12 +3468,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3471: checking for ssize_t" >&5 +echo "configure:3472: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3500,12 +3501,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3504: checking for wchar_t" >&5 +echo "configure:3505: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3537,7 +3538,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3541: checking for httpConnect in -lcups" >&5 +echo "configure:3542: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3545,7 +3546,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3561: \"$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 @@ -3591,17 +3592,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3595: checking for $ac_hdr" >&5 +echo "configure:3596: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3606: \"$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* @@ -3640,7 +3641,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3644: checking for dlopen in -ldl" >&5 +echo "configure:3645: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3648,7 +3649,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3664: \"$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 @@ -3687,13 +3688,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3691: checking for immediate structures" >&5 +echo "configure:3692: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3711,7 +3712,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3734,13 +3735,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3738: checking for unix domain sockets" >&5 +echo "configure:3739: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3755,7 +3756,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3776,13 +3777,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3780: checking for socklen_t type" >&5 +echo "configure:3781: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3795,7 +3796,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3816,13 +3817,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3820: checking for sig_atomic_t type" >&5 +echo "configure:3821: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3835,7 +3836,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3858,20 +3859,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3862: checking for errno declaration" >&5 +echo "configure:3863: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3893,20 +3894,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3897: checking for setresuid declaration" >&5 +echo "configure:3898: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3928,20 +3929,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3932: checking for setresgid declaration" >&5 +echo "configure:3933: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3963,20 +3964,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3967: checking for asprintf declaration" >&5 +echo "configure:3968: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3998,20 +3999,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4002: checking for vasprintf declaration" >&5 +echo "configure:4003: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4033,20 +4034,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4037: checking for vsnprintf declaration" >&5 +echo "configure:4038: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4068,20 +4069,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4072: checking for snprintf declaration" >&5 +echo "configure:4073: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4105,7 +4106,7 @@ EOF # 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:4109: checking for real setresuid" >&5 +echo "configure:4110: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4114,12 +4115,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4124: \"$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 @@ -4144,7 +4145,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4148: checking for real setresgid" >&5 +echo "configure:4149: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4153,13 +4154,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4164: \"$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 @@ -4182,7 +4183,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4186: checking for 8-bit clean memcmp" >&5 +echo "configure:4187: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4190,7 +4191,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4205: \"$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 @@ -4224,7 +4225,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4228: checking whether to use readline" >&5 +echo "configure:4229: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4236,17 +4237,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4240: checking for $ac_hdr" >&5 +echo "configure:4241: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4251: \"$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* @@ -4276,17 +4277,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4280: checking for $ac_hdr" >&5 +echo "configure:4281: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4291: \"$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* @@ -4317,17 +4318,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4321: checking for $ac_hdr" >&5 +echo "configure:4322: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4332: \"$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* @@ -4350,7 +4351,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4354: checking for tgetent in -l${termlib}" >&5 +echo "configure:4355: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4358,7 +4359,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4374: \"$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 @@ -4391,7 +4392,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4395: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4396: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4399,7 +4400,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4415: \"$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 @@ -4461,17 +4462,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4465: checking for $ac_hdr" >&5 +echo "configure:4466: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4476: \"$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* @@ -4501,17 +4502,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4505: checking for $ac_hdr" >&5 +echo "configure:4506: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4516: \"$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* @@ -4542,17 +4543,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4546: checking for $ac_hdr" >&5 +echo "configure:4547: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4557: \"$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* @@ -4575,7 +4576,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4579: checking for tgetent in -l${termlib}" >&5 +echo "configure:4580: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4583,7 +4584,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4599: \"$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 @@ -4616,7 +4617,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4620: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4621: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4624,7 +4625,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4640: \"$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 @@ -4690,12 +4691,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4694: checking for $ac_func" >&5 +echo "configure:4695: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4723: \"$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,7 +4747,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:4750: checking for printf in -lnsl_s" >&5 +echo "configure:4751: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4754,7 +4755,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4770: \"$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 @@ -4796,7 +4797,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4800: checking for printf in -lnsl" >&5 +echo "configure:4801: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4804,7 +4805,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4820: \"$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 @@ -4846,7 +4847,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4850: checking for connect in -lsocket" >&5 +echo "configure:4851: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4854,7 +4855,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4870: \"$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 @@ -4896,7 +4897,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4900: checking for connect in -linet" >&5 +echo "configure:4901: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4904,7 +4905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4920: \"$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 @@ -4959,12 +4960,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4963: checking for $ac_func" >&5 +echo "configure:4964: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4992: \"$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 @@ -5013,7 +5014,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5017: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5018: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5021,7 +5022,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5037: \"$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 @@ -5062,12 +5063,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5066: checking for $ac_func" >&5 +echo "configure:5067: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5095: \"$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 @@ -5123,12 +5124,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5127: checking for $ac_func" >&5 +echo "configure:5128: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5156: \"$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 @@ -5178,12 +5179,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5182: checking for $ac_func" >&5 +echo "configure:5183: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5211: \"$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 @@ -5233,12 +5234,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5237: checking for $ac_func" >&5 +echo "configure:5238: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5266: \"$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 @@ -5288,12 +5289,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5292: checking for $ac_func" >&5 +echo "configure:5293: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5321: \"$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 @@ -5343,12 +5344,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5347: checking for $ac_func" >&5 +echo "configure:5348: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5376: \"$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 @@ -5398,12 +5399,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5402: checking for $ac_func" >&5 +echo "configure:5403: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5431: \"$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 @@ -5453,12 +5454,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5457: checking for $ac_func" >&5 +echo "configure:5458: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5486: \"$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 @@ -5508,12 +5509,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5512: checking for $ac_func" >&5 +echo "configure:5513: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5541: \"$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 @@ -5563,12 +5564,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5567: checking for $ac_func" >&5 +echo "configure:5568: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5596: \"$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 @@ -5618,12 +5619,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5622: checking for $ac_func" >&5 +echo "configure:5623: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5651: \"$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 @@ -5675,12 +5676,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5679: checking for $ac_func" >&5 +echo "configure:5680: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5708: \"$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 @@ -5731,12 +5732,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:5735: checking for $ac_func" >&5 +echo "configure:5736: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5764: \"$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 @@ -5786,12 +5787,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:5790: checking for $ac_func" >&5 +echo "configure:5791: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5819: \"$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 @@ -5841,12 +5842,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5845: checking for $ac_func" >&5 +echo "configure:5846: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5874: \"$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 @@ -5896,12 +5897,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5900: checking for $ac_func" >&5 +echo "configure:5901: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5929: \"$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 @@ -5951,12 +5952,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:5955: checking for $ac_func" >&5 +echo "configure:5956: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5984: \"$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 @@ -6006,12 +6007,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:6010: checking for $ac_func" >&5 +echo "configure:6011: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -6061,12 +6062,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:6065: checking for $ac_func" >&5 +echo "configure:6066: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6094: \"$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 @@ -6116,12 +6117,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:6120: checking for $ac_func" >&5 +echo "configure:6121: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6149: \"$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 @@ -6171,12 +6172,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6175: checking for $ac_func" >&5 +echo "configure:6176: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6204: \"$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 @@ -6226,12 +6227,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:6230: checking for $ac_func" >&5 +echo "configure:6231: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6259: \"$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 @@ -6281,12 +6282,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:6285: checking for $ac_func" >&5 +echo "configure:6286: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6314: \"$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 @@ -6336,12 +6337,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:6340: checking for $ac_func" >&5 +echo "configure:6341: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6369: \"$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 @@ -6391,12 +6392,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:6395: checking for $ac_func" >&5 +echo "configure:6396: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6424: \"$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 @@ -6446,12 +6447,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6450: checking for $ac_func" >&5 +echo "configure:6451: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6479: \"$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 @@ -6505,9 +6506,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6509: checking for stat64 in " >&5 +echo "configure:6510: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6538,9 +6539,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6542: checking for lstat64 in " >&5 +echo "configure:6543: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6571,9 +6572,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6575: checking for fstat64 in " >&5 +echo "configure:6576: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6610,7 +6611,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6614: checking for strcasecmp in -lresolv" >&5 +echo "configure:6615: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6618,7 +6619,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6634: \"$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 @@ -6665,12 +6666,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6669: checking for $ac_func" >&5 +echo "configure:6670: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6698: \"$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 @@ -6718,7 +6719,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6722: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6723: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6726,7 +6727,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6742: \"$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 @@ -6767,12 +6768,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6771: checking for $ac_func" >&5 +echo "configure:6772: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6800: \"$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 @@ -6826,12 +6827,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6830: checking for $ac_func" >&5 +echo "configure:6831: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6859: \"$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 @@ -6879,7 +6880,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6883: checking for putprpwnam in -lsec" >&5 +echo "configure:6884: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6887,7 +6888,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6903: \"$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 @@ -6928,12 +6929,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6932: checking for $ac_func" >&5 +echo "configure:6933: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6961: \"$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 @@ -6988,12 +6989,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:6992: checking for $ac_func" >&5 +echo "configure:6993: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7021: \"$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 @@ -7041,7 +7042,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7045: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7046: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7049,7 +7050,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7065: \"$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 @@ -7090,12 +7091,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7094: checking for $ac_func" >&5 +echo "configure:7095: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7123: \"$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 @@ -7149,12 +7150,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:7153: checking for $ac_func" >&5 +echo "configure:7154: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7182: \"$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 @@ -7202,7 +7203,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7206: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7207: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7210,7 +7211,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7226: \"$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 @@ -7251,12 +7252,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7255: checking for $ac_func" >&5 +echo "configure:7256: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7284: \"$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 @@ -7312,12 +7313,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7316: checking for $ac_func" >&5 +echo "configure:7317: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7345: \"$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 @@ -7365,7 +7366,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7369: checking for getspnam in -lgen" >&5 +echo "configure:7370: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7373,7 +7374,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7389: \"$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 @@ -7414,12 +7415,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7418: checking for $ac_func" >&5 +echo "configure:7419: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7447: \"$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 @@ -7474,12 +7475,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7478: checking for $ac_func" >&5 +echo "configure:7479: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7507: \"$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 @@ -7527,7 +7528,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7531: checking for getspnam in -lsecurity" >&5 +echo "configure:7532: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7535,7 +7536,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7551: \"$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 @@ -7576,12 +7577,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7580: checking for $ac_func" >&5 +echo "configure:7581: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7609: \"$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 @@ -7635,12 +7636,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7639: checking for $ac_func" >&5 +echo "configure:7640: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7668: \"$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 @@ -7688,7 +7689,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7692: checking for getspnam in -lsec" >&5 +echo "configure:7693: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7696,7 +7697,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7712: \"$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 @@ -7737,12 +7738,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7741: checking for $ac_func" >&5 +echo "configure:7742: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7770: \"$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 @@ -7797,12 +7798,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7801: checking for $ac_func" >&5 +echo "configure:7802: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7830: \"$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 @@ -7850,7 +7851,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7854: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7855: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7858,7 +7859,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7874: \"$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 @@ -7899,12 +7900,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7903: checking for $ac_func" >&5 +echo "configure:7904: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7932: \"$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 @@ -7958,12 +7959,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7962: checking for $ac_func" >&5 +echo "configure:7963: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7991: \"$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 @@ -8011,7 +8012,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8015: checking for bigcrypt in -lsec" >&5 +echo "configure:8016: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8019,7 +8020,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8035: \"$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 @@ -8060,12 +8061,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8064: checking for $ac_func" >&5 +echo "configure:8065: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8093: \"$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 @@ -8120,12 +8121,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8124: checking for $ac_func" >&5 +echo "configure:8125: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8153: \"$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 @@ -8173,7 +8174,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8177: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8178: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8181,7 +8182,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8197: \"$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 @@ -8222,12 +8223,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8226: checking for $ac_func" >&5 +echo "configure:8227: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8255: \"$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 @@ -8281,12 +8282,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8285: checking for $ac_func" >&5 +echo "configure:8286: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8314: \"$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 @@ -8334,7 +8335,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8338: checking for getprpwnam in -lsec" >&5 +echo "configure:8339: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8342,7 +8343,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8358: \"$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 @@ -8383,12 +8384,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8387: checking for $ac_func" >&5 +echo "configure:8388: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8416: \"$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 @@ -8454,7 +8455,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8458: checking ability to build shared libraries" >&5 +echo "configure:8459: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8592,7 +8593,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:8596: checking for $ac_word" >&5 +echo "configure:8597: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8648,15 +8649,15 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8652: checking linker flags for shared libraries" >&5 +echo "configure:8653: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8655: checking compiler flags for position-independent code" >&5 +echo "configure:8656: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8660: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8661: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8676,7 +8677,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:8680: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8681: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8697,7 +8698,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:8701: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8702: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8720,7 +8721,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8724: checking for long long" >&5 +echo "configure:8725: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8729,12 +8730,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8739: \"$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 @@ -8761,20 +8762,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8765: checking for LL suffix on long long integers" >&5 +echo "configure:8766: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8796,7 +8797,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8800: checking for 64 bit off_t" >&5 +echo "configure:8801: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8805,13 +8806,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8816: \"$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 @@ -8834,7 +8835,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8838: checking for off64_t" >&5 +echo "configure:8839: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8843,7 +8844,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8858: \"$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 @@ -8876,7 +8877,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8880: checking for 64 bit ino_t" >&5 +echo "configure:8881: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8885,13 +8886,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8896: \"$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 @@ -8914,7 +8915,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8918: checking for ino64_t" >&5 +echo "configure:8919: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8923,7 +8924,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8938: \"$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 @@ -8956,7 +8957,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8960: checking for dev64_t" >&5 +echo "configure:8961: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8965,7 +8966,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8998,13 +8999,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9002: checking for struct dirent64" >&5 +echo "configure:9003: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9037,7 +9038,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9041: checking for major macro" >&5 +echo "configure:9042: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9046,7 +9047,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9078,7 +9079,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9082: checking for minor macro" >&5 +echo "configure:9083: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9087,7 +9088,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9119,7 +9120,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9123: checking for makedev macro" >&5 +echo "configure:9124: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9128,7 +9129,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9160,7 +9161,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9164: checking for unsigned char" >&5 +echo "configure:9165: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9169,12 +9170,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9179: \"$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 @@ -9197,13 +9198,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9201: checking for sin_len in sock" >&5 +echo "configure:9202: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9212,7 +9213,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9233,13 +9234,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9237: checking whether seekdir returns void" >&5 +echo "configure:9238: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9248,7 +9249,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9269,20 +9270,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9273: checking for __FILE__ macro" >&5 +echo "configure:9274: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9303,20 +9304,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9307: checking for __FUNCTION__ macro" >&5 +echo "configure:9308: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9337,7 +9338,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9341: checking if gettimeofday takes tz argument" >&5 +echo "configure:9342: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9346,14 +9347,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9358: \"$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 @@ -9376,7 +9377,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9380: checking for C99 vsnprintf" >&5 +echo "configure:9381: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9385,7 +9386,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9412,7 +9413,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9435,7 +9436,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9439: checking for broken readdir" >&5 +echo "configure:9440: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9444,7 +9445,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9452,7 +9453,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:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9457: \"$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 @@ -9475,13 +9476,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9479: checking for utimbuf" >&5 +echo "configure:9480: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9489,7 +9490,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9513,12 +9514,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9517: checking for $ac_func" >&5 +echo "configure:9518: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9546: \"$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 @@ -9567,13 +9568,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9571: checking for ut_name in utmp" >&5 +echo "configure:9572: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9581,7 +9582,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9602,13 +9603,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9606: checking for ut_user in utmp" >&5 +echo "configure:9607: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9616,7 +9617,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9637,13 +9638,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9641: checking for ut_id in utmp" >&5 +echo "configure:9642: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9651,7 +9652,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9672,13 +9673,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9676: checking for ut_host in utmp" >&5 +echo "configure:9677: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9686,7 +9687,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9707,13 +9708,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9711: checking for ut_time in utmp" >&5 +echo "configure:9712: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9721,7 +9722,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9742,13 +9743,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9746: checking for ut_tv in utmp" >&5 +echo "configure:9747: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9756,7 +9757,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9777,13 +9778,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9781: checking for ut_type in utmp" >&5 +echo "configure:9782: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9791,7 +9792,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9812,13 +9813,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9816: checking for ut_pid in utmp" >&5 +echo "configure:9817: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9826,7 +9827,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9847,13 +9848,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9851: checking for ut_exit in utmp" >&5 +echo "configure:9852: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9861,7 +9862,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9882,13 +9883,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9886: checking for ut_addr in utmp" >&5 +echo "configure:9887: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9896,7 +9897,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9918,13 +9919,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9922: checking whether pututline returns pointer" >&5 +echo "configure:9923: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9932,7 +9933,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9954,13 +9955,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9958: checking for ut_syslen in utmpx" >&5 +echo "configure:9959: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9968,7 +9969,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9989,7 +9990,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9993: checking for Linux kernel oplocks" >&5 +echo "configure:9994: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9998,7 +9999,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10012,7 +10013,7 @@ main() { } EOF -if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10035,7 +10036,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10039: checking for kernel change notify support" >&5 +echo "configure:10040: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10044,7 +10045,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10058,7 +10059,7 @@ main() { } EOF -if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10081,7 +10082,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10085: checking for kernel share modes" >&5 +echo "configure:10086: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10090,7 +10091,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10106,7 +10107,7 @@ main() { } EOF -if { (eval echo configure:10110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10132,13 +10133,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10136: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10137: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10146,7 +10147,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:10150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10167,7 +10168,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10171: checking for irix specific capabilities" >&5 +echo "configure:10172: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10176,7 +10177,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10191,7 +10192,7 @@ main() { } EOF -if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10196: \"$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 @@ -10219,13 +10220,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10223: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10224: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10235,7 +10236,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10256,13 +10257,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10260: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10261: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10272,7 +10273,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10293,13 +10294,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10297: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10298: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10309,7 +10310,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10330,13 +10331,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10334: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10335: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10346,7 +10347,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10368,13 +10369,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10372: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10373: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10388,7 +10389,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10409,16 +10410,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10413: checking for test routines" >&5 +echo "configure:10414: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10423: \"$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 @@ -10432,7 +10433,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10436: checking for ftruncate extend" >&5 +echo "configure:10437: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10441,11 +10442,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10450: \"$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 @@ -10468,7 +10469,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10472: checking for broken getgroups" >&5 +echo "configure:10473: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10477,11 +10478,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10486: \"$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 @@ -10504,7 +10505,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10508: checking whether getpass should be replaced" >&5 +echo "configure:10509: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10512,7 +10513,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10548,7 +10549,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10552: checking for broken inet_ntoa" >&5 +echo "configure:10553: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10557,7 +10558,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10571,7 +10572,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:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10576: \"$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 @@ -10594,7 +10595,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10598: checking for secure mkstemp" >&5 +echo "configure:10599: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10603,7 +10604,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10620,7 +10621,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10643,7 +10644,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10647: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10648: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10652,12 +10653,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10680,7 +10681,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10684: checking for root" >&5 +echo "configure:10685: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10689,11 +10690,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10698: \"$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 @@ -10721,7 +10722,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10725: checking for iface AIX" >&5 +echo "configure:10726: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10730,7 +10731,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10762,7 +10763,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10766: checking for iface ifconf" >&5 +echo "configure:10767: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10771,7 +10772,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10804,7 +10805,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10808: checking for iface ifreq" >&5 +echo "configure:10809: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10813,7 +10814,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10850,7 +10851,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10854: checking for setresuid" >&5 +echo "configure:10855: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10859,7 +10860,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10872: \"$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 @@ -10893,7 +10894,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10897: checking for setreuid" >&5 +echo "configure:10898: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10902,7 +10903,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10915: \"$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 @@ -10935,7 +10936,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10939: checking for seteuid" >&5 +echo "configure:10940: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10944,7 +10945,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10957: \"$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 @@ -10977,7 +10978,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10981: checking for setuidx" >&5 +echo "configure:10982: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10986,7 +10987,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10999: \"$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 @@ -11019,7 +11020,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11023: checking for working mmap" >&5 +echo "configure:11024: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11028,11 +11029,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11055,7 +11056,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11059: checking for ftruncate needs root" >&5 +echo "configure:11060: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11064,11 +11065,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11091,7 +11092,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11095: checking for fcntl locking" >&5 +echo "configure:11096: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11100,11 +11101,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11109: \"$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 @@ -11127,7 +11128,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11131: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11132: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11136,11 +11137,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11165,7 +11166,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11169: checking for 64 bit fcntl locking" >&5 +echo "configure:11170: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11174,7 +11175,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11203: \"$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 @@ -11223,13 +11224,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11227: checking for st_blocks in struct stat" >&5 +echo "configure:11228: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11238,7 +11239,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11261,13 +11262,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11265: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11266: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11304,13 +11305,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11308: checking for broken nisplus include files" >&5 +echo "configure:11309: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11320,7 +11321,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11344,7 +11345,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11348: checking whether to use smbwrapper" >&5 +echo "configure:11349: 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" @@ -11355,22 +11356,25 @@ if test "${with_smbwrapper+set}" = set; then #define WITH_SMBWRAPPER 1 EOF - WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT" + WRAPPROG="bin/smbsh" + WRAP="smbwrapper.$SHLIBEXT" if test x$ATTEMPT_WRAP32_BUILD = x; then WRAP32="" else - WRAP32=bin/smbwrapper.32.$SHLIBEXT + WRAP32=smbwrapper.32.$SHLIBEXT fi # Conditions under which smbwrapper should not be built. if test x$PICFLAG = x; then echo No support for PIC code - disabling smbwrapper and smbsh + WRAPPROG="" WRAP="" WRAP32="" elif test x$ac_cv_func_syscall = xno; then echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6 + WRAPPROG="" WRAP="" WRAP32="" fi @@ -11388,7 +11392,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11392: checking whether to use AFS" >&5 +echo "configure:11396: 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" @@ -11414,7 +11418,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11418: checking whether to use DCE/DFS auth" >&5 +echo "configure:11422: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11439,7 +11443,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11443: checking whether to use Kerberos IV" >&5 +echo "configure:11447: 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" @@ -11451,7 +11455,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11455: checking for dn_expand in -lresolv" >&5 +echo "configure:11459: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11459,7 +11463,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11478: \"$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 @@ -11514,7 +11518,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11518: checking whether to use Kerberos 5" >&5 +echo "configure:11522: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11542,7 +11546,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11546: checking whether to use AUTOMOUNT" >&5 +echo "configure:11550: 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" @@ -11567,7 +11571,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11571: checking whether to use SMBMOUNT" >&5 +echo "configure:11575: 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" @@ -11604,7 +11608,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11608: checking whether to use PAM password database" >&5 +echo "configure:11612: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11630,7 +11634,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11634: checking for pam_get_data in -lpam" >&5 +echo "configure:11638: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11638,7 +11642,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11657: \"$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 @@ -11676,7 +11680,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11680: checking whether to use pam_smbpass" >&5 +echo "configure:11684: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11718,12 +11722,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11722: checking for $ac_func" >&5 +echo "configure:11726: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11754: \"$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 @@ -11772,7 +11776,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:11776: checking for crypt in -lcrypt" >&5 +echo "configure:11780: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11780,7 +11784,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11799: \"$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 @@ -11826,7 +11830,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11830: checking for a crypt that needs truncated salt" >&5 +echo "configure:11834: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11835,11 +11839,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11877,7 +11881,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11881: checking whether to use TDB SAM database" >&5 +echo "configure:11885: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11903,7 +11907,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11907: checking whether to use LDAP SAM database" >&5 +echo "configure:11911: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11930,7 +11934,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11934: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11938: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11958,7 +11962,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11962: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11966: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11980,7 +11984,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11984: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11988: 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" @@ -12005,7 +12009,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12009: checking whether to use SSL" >&5 +echo "configure:12013: 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" @@ -12079,7 +12083,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12083: checking whether to use syslog logging" >&5 +echo "configure:12087: 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" @@ -12104,7 +12108,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12108: checking whether to use profiling" >&5 +echo "configure:12112: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12132,7 +12136,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12136: checking whether to support disk-quotas" >&5 +echo "configure:12140: 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" @@ -12144,13 +12148,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12148: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12152: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12162,7 +12166,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12206,7 +12210,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12210: checking whether to support utmp accounting" >&5 +echo "configure:12214: 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" @@ -12232,7 +12236,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12236: checking whether to support Microsoft Dfs" >&5 +echo "configure:12240: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12258,7 +12262,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12262: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12266: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12287,7 +12291,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12291: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12295: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12314,14 +12318,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12318: checking how to get filesystem space usage" >&5 +echo "configure:12322: 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:12325: checking statvfs64 function (SVR4)" >&5 +echo "configure:12329: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12329,7 +12333,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12351: \"$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 @@ -12376,12 +12380,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12380: checking statvfs function (SVR4)" >&5 +echo "configure:12384: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12389,7 +12393,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12397: \"$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 @@ -12414,7 +12418,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:12418: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12422: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12422,7 +12426,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12435,7 +12439,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12443: \"$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 @@ -12462,7 +12466,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:12466: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12470: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12470,7 +12474,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12497: \"$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 @@ -12516,7 +12520,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:12520: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12524: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12524,7 +12528,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12534,7 +12538,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12542: \"$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 @@ -12561,7 +12565,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:12565: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12569: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12569,7 +12573,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12585,7 +12589,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12593: \"$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 @@ -12612,7 +12616,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:12616: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12620: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12620,7 +12624,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12640,7 +12644,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12648: \"$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 @@ -12673,9 +12677,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12677: checking if large file support can be enabled" >&5 +echo "configure:12681: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12755,7 +12759,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12759: checking whether to support ACLs" >&5 +echo "configure:12763: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12808,7 +12812,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12812: checking for acl_get_file in -lacl" >&5 +echo "configure:12816: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12816,7 +12820,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12835: \"$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 @@ -12855,13 +12859,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12859: checking for ACL support" >&5 +echo "configure:12863: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12869,7 +12873,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12889,13 +12893,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12893: checking for acl_get_perm_np" >&5 +echo "configure:12897: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12903,7 +12907,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12958,7 +12962,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12962: checking whether to build winbind" >&5 +echo "configure:12966: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13060,7 +13064,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13064: checking for poptGetContext in -lpopt" >&5 +echo "configure:13068: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13068,7 +13072,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13087: \"$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 @@ -13103,7 +13107,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13107: checking whether to use included popt" >&5 +echo "configure:13111: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13122,11 +13126,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -13291,6 +13295,7 @@ s%@PAM_MOD@%$PAM_MOD%g s%@PDBEDIT@%$PDBEDIT%g s%@WRAP@%$WRAP%g s%@WRAP32@%$WRAP32%g +s%@WRAPPROG@%$WRAPPROG%g s%@PICFLAG@%$PICFLAG%g s%@PICSUFFIX@%$PICSUFFIX%g s%@SHLIBEXT@%$SHLIBEXT%g diff --git a/source/configure.in b/source/configure.in index 74436e23fe2..67a239d4ca2 100644 --- a/source/configure.in +++ b/source/configure.in @@ -140,6 +140,7 @@ AC_SUBST(PAM_MOD) AC_SUBST(PDBEDIT) AC_SUBST(WRAP) AC_SUBST(WRAP32) +AC_SUBST(WRAPPROG) AC_SUBST(PICFLAG) AC_SUBST(PICSUFFIX) AC_SUBST(SHLIBEXT) @@ -1724,22 +1725,25 @@ AC_ARG_WITH(smbwrapper, yes) AC_MSG_RESULT(yes) AC_DEFINE(WITH_SMBWRAPPER) - WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT" + WRAPPROG="bin/smbsh" + WRAP="smbwrapper.$SHLIBEXT" if test x$ATTEMPT_WRAP32_BUILD = x; then WRAP32="" else - WRAP32=bin/smbwrapper.32.$SHLIBEXT + WRAP32=smbwrapper.32.$SHLIBEXT fi # Conditions under which smbwrapper should not be built. if test x$PICFLAG = x; then echo No support for PIC code - disabling smbwrapper and smbsh + WRAPPROG="" WRAP="" WRAP32="" elif test x$ac_cv_func_syscall = xno; then AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh]) + WRAPPROG="" WRAP="" WRAP32="" fi -- cgit From 182b2dd707892ebc56a62690a85502e1034a829e Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Apr 2002 18:22:21 +0000 Subject: forgot to remove bin/ from path in PROGS for smbwrapper.so --- source/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index ce181f94fd4..96580250a56 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -92,7 +92,7 @@ WINBIND_LPROGS = @WINBIND_LTARGETS@ SPROGS = bin/smbd bin/nmbd bin/swat PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@ -PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAPPROG@ bin/@WRAP@ bin/@WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ +PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@ MPROGS = @MPROGS@ LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup -- cgit From bdb16f6c1755b9e2748a82efae9d62c4803975ee Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Apr 2002 18:36:31 +0000 Subject: add target for libsmbclient to build both .so and .a --- source/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Makefile.in b/source/Makefile.in index 96580250a56..d3da986f51a 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -422,6 +422,8 @@ pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@ smbwrapper : CHECK @WRAPPROG@ @WRAP@ @WRAP32@ +libsmbclient : CHECK libsmbclient.@SHLIBEXT@ libsmbclient.a + torture : CHECK $(TORTURE_PROGS) smbtorture : CHECK bin/smbtorture -- cgit From 8ca73c2624ff15b2a33e90d4574a7a3af4bc2806 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Apr 2002 18:41:44 +0000 Subject: make sure smbwarpper targets are defined when --with-smbwrappers is not used --- source/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index d3da986f51a..7032dd292ba 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -619,15 +619,15 @@ bin/smbw_sample: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(LIBS) -@WRAPPROG@: $(SMBSH_OBJ) bin/.dummy +bin/smbsh: $(SMBSH_OBJ) bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) -@WRAP@: $(PICOBJS) +smbwrapper.@SHLIBEXT@: $(PICOBJS) @echo Linking shared library bin/$@ @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS) -@WRAP32@: $(PICOBJS32) +smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) @echo Linking shared library bin/$@ @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS) -- cgit From 5282461be3dc104b899d1490286154a4bd877d4c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 1 Apr 2002 19:04:13 +0000 Subject: Merged in configure changes from HEAD. Fixed "local variable shadow" warning from gcc. Jeremy. --- source/configure | 1466 +++++++++++++++++++++++------------------------ source/configure.in | 12 +- source/lib/pam_errors.c | 9 +- source/lib/substitute.c | 10 +- 4 files changed, 746 insertions(+), 751 deletions(-) diff --git a/source/configure b/source/configure index 5d8e971b830..78e48ce53ec 100755 --- a/source/configure +++ b/source/configure @@ -1330,11 +1330,6 @@ echo "configure:1315: checking config.cache system type" >&5 DYNEXP= -# I'm sure gcc supports -rdynamic -if test "$ac_cv_prog_gcc" = yes; then - DYNEXP="-rdynamic" -fi - # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -1343,7 +1338,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:1347: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1342: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1446,14 +1441,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1450: checking for LFS support" >&5 +echo "configure:1445: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1465,7 +1460,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1492,14 +1487,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1496: checking for LFS support" >&5 +echo "configure:1491: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1537,7 +1532,7 @@ main() { } EOF -if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1558,14 +1553,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1562: checking for LFS support" >&5 +echo "configure:1557: 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 < @@ -1577,7 +1572,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1576: \"$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 @@ -1599,21 +1594,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1603: checking for inline" >&5 +echo "configure:1598: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1639,7 +1634,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1643: checking how to run the C preprocessor" >&5 +echo "configure:1638: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1654,13 +1649,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1659: \"$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 : @@ -1671,13 +1666,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1676: \"$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 : @@ -1688,13 +1683,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1693: \"$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 : @@ -1719,12 +1714,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1723: checking for ANSI C header files" >&5 +echo "configure:1718: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1732,7 +1727,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1731: \"$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* @@ -1749,7 +1744,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 @@ -1767,7 +1762,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 @@ -1788,7 +1783,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1799,7 +1794,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1827,12 +1822,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:1831: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1826: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1840,7 +1835,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1865,7 +1860,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:1869: checking for opendir in -ldir" >&5 +echo "configure:1864: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1873,7 +1868,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1883: \"$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 @@ -1906,7 +1901,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1910: checking for opendir in -lx" >&5 +echo "configure:1905: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1914,7 +1909,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1924: \"$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 @@ -1948,12 +1943,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1952: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1947: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1962,7 +1957,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1983,12 +1978,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1987: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1982: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2004,7 +1999,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2028,17 +2023,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:2032: checking for $ac_hdr" >&5 +echo "configure:2027: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2037: \"$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* @@ -2068,17 +2063,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2072: checking for $ac_hdr" >&5 +echo "configure:2067: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2077: \"$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* @@ -2108,17 +2103,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2112: checking for $ac_hdr" >&5 +echo "configure:2107: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2117: \"$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* @@ -2148,17 +2143,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2152: checking for $ac_hdr" >&5 +echo "configure:2147: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2157: \"$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* @@ -2188,17 +2183,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2192: checking for $ac_hdr" >&5 +echo "configure:2187: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2197: \"$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* @@ -2228,17 +2223,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2232: checking for $ac_hdr" >&5 +echo "configure:2227: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2237: \"$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* @@ -2268,17 +2263,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2272: checking for $ac_hdr" >&5 +echo "configure:2267: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2277: \"$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* @@ -2308,17 +2303,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2312: checking for $ac_hdr" >&5 +echo "configure:2307: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2317: \"$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* @@ -2352,14 +2347,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2381,17 +2376,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2385: checking for $ac_hdr" >&5 +echo "configure:2380: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2390: \"$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* @@ -2421,17 +2416,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2425: checking for $ac_hdr" >&5 +echo "configure:2420: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2430: \"$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* @@ -2461,17 +2456,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_hdr" >&5 +echo "configure:2460: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2470: \"$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* @@ -2501,17 +2496,17 @@ for ac_hdr in 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:2505: checking for $ac_hdr" >&5 +echo "configure:2500: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2510: \"$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* @@ -2541,17 +2536,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:2545: checking for $ac_hdr" >&5 +echo "configure:2540: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2550: \"$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* @@ -2583,17 +2578,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2587: checking for $ac_hdr" >&5 +echo "configure:2582: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2592: \"$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* @@ -2625,17 +2620,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2629: checking for $ac_hdr" >&5 +echo "configure:2624: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2634: \"$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 +2662,17 @@ for ac_hdr in linux/xqm.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:2666: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < 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:2676: \"$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* @@ -2705,7 +2700,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2709: checking size of int" >&5 +echo "configure:2704: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2713,7 +2708,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < int main() @@ -2724,7 +2719,7 @@ int main() return(0); } EOF -if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2723: \"$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 @@ -2744,7 +2739,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2748: checking size of long" >&5 +echo "configure:2743: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2752,7 +2747,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < int main() @@ -2763,7 +2758,7 @@ int main() return(0); } EOF -if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2762: \"$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 @@ -2783,7 +2778,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2787: checking size of short" >&5 +echo "configure:2782: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2791,7 +2786,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < int main() @@ -2802,7 +2797,7 @@ int main() return(0); } EOF -if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2801: \"$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 @@ -2823,12 +2818,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2827: checking for working const" >&5 +echo "configure:2822: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2898,21 +2893,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2902: checking for inline" >&5 +echo "configure:2897: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2938,14 +2933,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2942: checking whether byte ordering is bigendian" >&5 +echo "configure:2937: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2956,11 +2951,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2955: \"$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 < #include @@ -2971,7 +2966,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2991,7 +2986,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3003: \"$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 @@ -3028,14 +3023,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3032: checking whether char is unsigned" >&5 +echo "configure:3027: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3066: \"$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 @@ -3092,12 +3087,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3096: checking return type of signal handlers" >&5 +echo "configure:3091: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3114,7 +3109,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3133,12 +3128,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3137: checking for uid_t in sys/types.h" >&5 +echo "configure:3132: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3167,12 +3162,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3171: checking for mode_t" >&5 +echo "configure:3166: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3200,12 +3195,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3204: checking for off_t" >&5 +echo "configure:3199: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3233,12 +3228,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3237: checking for size_t" >&5 +echo "configure:3232: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3266,12 +3261,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3270: checking for pid_t" >&5 +echo "configure:3265: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3299,12 +3294,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3303: checking for st_rdev in struct stat" >&5 +echo "configure:3298: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3312,7 +3307,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3333,12 +3328,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3337: checking for d_off in dirent" >&5 +echo "configure:3332: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3348,7 +3343,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3369,12 +3364,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3373: checking for ino_t" >&5 +echo "configure:3368: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3402,12 +3397,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3406: checking for loff_t" >&5 +echo "configure:3401: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3435,12 +3430,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3439: checking for offset_t" >&5 +echo "configure:3434: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3468,12 +3463,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3472: checking for ssize_t" >&5 +echo "configure:3467: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3501,12 +3496,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3505: checking for wchar_t" >&5 +echo "configure:3500: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3538,7 +3533,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3542: checking for httpConnect in -lcups" >&5 +echo "configure:3537: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3546,7 +3541,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3556: \"$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 @@ -3592,17 +3587,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3596: checking for $ac_hdr" >&5 +echo "configure:3591: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3601: \"$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* @@ -3641,7 +3636,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3645: checking for dlopen in -ldl" >&5 +echo "configure:3640: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3649,7 +3644,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3659: \"$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 @@ -3688,13 +3683,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3692: checking for immediate structures" >&5 +echo "configure:3687: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3712,7 +3707,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3735,13 +3730,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3739: checking for unix domain sockets" >&5 +echo "configure:3734: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3756,7 +3751,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3777,13 +3772,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3781: checking for socklen_t type" >&5 +echo "configure:3776: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3796,7 +3791,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3817,13 +3812,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3821: checking for sig_atomic_t type" >&5 +echo "configure:3816: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3836,7 +3831,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3859,20 +3854,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3863: checking for errno declaration" >&5 +echo "configure:3858: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3894,20 +3889,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3898: checking for setresuid declaration" >&5 +echo "configure:3893: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3929,20 +3924,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3933: checking for setresgid declaration" >&5 +echo "configure:3928: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3964,20 +3959,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3968: checking for asprintf declaration" >&5 +echo "configure:3963: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3999,20 +3994,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4003: checking for vasprintf declaration" >&5 +echo "configure:3998: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4034,20 +4029,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4038: checking for vsnprintf declaration" >&5 +echo "configure:4033: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4069,20 +4064,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4073: checking for snprintf declaration" >&5 +echo "configure:4068: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4106,7 +4101,7 @@ EOF # 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:4110: checking for real setresuid" >&5 +echo "configure:4105: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4115,12 +4110,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4119: \"$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 @@ -4145,7 +4140,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4149: checking for real setresgid" >&5 +echo "configure:4144: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4154,13 +4149,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4159: \"$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 @@ -4183,7 +4178,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4187: checking for 8-bit clean memcmp" >&5 +echo "configure:4182: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4191,7 +4186,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4200: \"$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 @@ -4225,7 +4220,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4229: checking whether to use readline" >&5 +echo "configure:4224: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4237,17 +4232,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4241: checking for $ac_hdr" >&5 +echo "configure:4236: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4246: \"$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* @@ -4277,17 +4272,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4281: checking for $ac_hdr" >&5 +echo "configure:4276: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4286: \"$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* @@ -4318,17 +4313,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4322: checking for $ac_hdr" >&5 +echo "configure:4317: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4327: \"$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* @@ -4351,7 +4346,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4355: checking for tgetent in -l${termlib}" >&5 +echo "configure:4350: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4359,7 +4354,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4369: \"$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 @@ -4392,7 +4387,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4396: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4391: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4400,7 +4395,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4410: \"$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 @@ -4462,17 +4457,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4466: checking for $ac_hdr" >&5 +echo "configure:4461: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4471: \"$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* @@ -4502,17 +4497,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4506: checking for $ac_hdr" >&5 +echo "configure:4501: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4511: \"$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* @@ -4543,17 +4538,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4547: checking for $ac_hdr" >&5 +echo "configure:4542: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4552: \"$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* @@ -4576,7 +4571,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4580: checking for tgetent in -l${termlib}" >&5 +echo "configure:4575: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4584,7 +4579,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4594: \"$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 @@ -4617,7 +4612,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4621: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4616: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4625,7 +4620,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4635: \"$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 @@ -4691,12 +4686,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4695: checking for $ac_func" >&5 +echo "configure:4690: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4718: \"$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 @@ -4747,7 +4742,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:4751: checking for printf in -lnsl_s" >&5 +echo "configure:4746: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4755,7 +4750,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4765: \"$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 @@ -4797,7 +4792,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4801: checking for printf in -lnsl" >&5 +echo "configure:4796: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4805,7 +4800,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4815: \"$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 @@ -4847,7 +4842,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4851: checking for connect in -lsocket" >&5 +echo "configure:4846: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4855,7 +4850,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4865: \"$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 @@ -4897,7 +4892,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4901: checking for connect in -linet" >&5 +echo "configure:4896: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4905,7 +4900,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4915: \"$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 @@ -4960,12 +4955,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4964: checking for $ac_func" >&5 +echo "configure:4959: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4987: \"$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 @@ -5014,7 +5009,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5018: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5013: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5022,7 +5017,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5032: \"$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 @@ -5063,12 +5058,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5067: checking for $ac_func" >&5 +echo "configure:5062: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5090: \"$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 @@ -5124,12 +5119,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5128: checking for $ac_func" >&5 +echo "configure:5123: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5151: \"$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 @@ -5179,12 +5174,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5183: checking for $ac_func" >&5 +echo "configure:5178: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5206: \"$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 @@ -5234,12 +5229,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5238: checking for $ac_func" >&5 +echo "configure:5233: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5261: \"$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 @@ -5289,12 +5284,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5293: checking for $ac_func" >&5 +echo "configure:5288: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5316: \"$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 @@ -5344,12 +5339,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5348: checking for $ac_func" >&5 +echo "configure:5343: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5371: \"$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 @@ -5399,12 +5394,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5403: checking for $ac_func" >&5 +echo "configure:5398: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5426: \"$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 @@ -5454,12 +5449,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5458: checking for $ac_func" >&5 +echo "configure:5453: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5481: \"$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 @@ -5509,12 +5504,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5513: checking for $ac_func" >&5 +echo "configure:5508: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5536: \"$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 @@ -5564,12 +5559,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5568: checking for $ac_func" >&5 +echo "configure:5563: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5619,12 +5614,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5623: checking for $ac_func" >&5 +echo "configure:5618: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5646: \"$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 @@ -5676,12 +5671,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5680: checking for $ac_func" >&5 +echo "configure:5675: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5732,12 +5727,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:5736: checking for $ac_func" >&5 +echo "configure:5731: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5787,12 +5782,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:5791: checking for $ac_func" >&5 +echo "configure:5786: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5814: \"$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 @@ -5842,12 +5837,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5846: checking for $ac_func" >&5 +echo "configure:5841: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5869: \"$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 @@ -5897,12 +5892,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5901: checking for $ac_func" >&5 +echo "configure:5896: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5924: \"$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 @@ -5952,12 +5947,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:5956: checking for $ac_func" >&5 +echo "configure:5951: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5979: \"$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 @@ -6007,12 +6002,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:6011: checking for $ac_func" >&5 +echo "configure:6006: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6034: \"$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 @@ -6062,12 +6057,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:6066: checking for $ac_func" >&5 +echo "configure:6061: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6089: \"$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 @@ -6117,12 +6112,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:6121: checking for $ac_func" >&5 +echo "configure:6116: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6144: \"$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 @@ -6172,12 +6167,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6176: checking for $ac_func" >&5 +echo "configure:6171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6199: \"$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 @@ -6227,12 +6222,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:6231: checking for $ac_func" >&5 +echo "configure:6226: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6254: \"$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 @@ -6282,12 +6277,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:6286: checking for $ac_func" >&5 +echo "configure:6281: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6309: \"$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 @@ -6337,12 +6332,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:6341: checking for $ac_func" >&5 +echo "configure:6336: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6364: \"$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 @@ -6392,12 +6387,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:6396: checking for $ac_func" >&5 +echo "configure:6391: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6419: \"$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 @@ -6447,12 +6442,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6451: checking for $ac_func" >&5 +echo "configure:6446: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6474: \"$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 @@ -6506,9 +6501,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6510: checking for stat64 in " >&5 +echo "configure:6505: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6539,9 +6534,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6543: checking for lstat64 in " >&5 +echo "configure:6538: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6572,9 +6567,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6576: checking for fstat64 in " >&5 +echo "configure:6571: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6611,7 +6606,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6615: checking for strcasecmp in -lresolv" >&5 +echo "configure:6610: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6619,7 +6614,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6629: \"$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 @@ -6666,12 +6661,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6670: checking for $ac_func" >&5 +echo "configure:6665: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6693: \"$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 @@ -6719,7 +6714,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6723: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6718: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6727,7 +6722,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6737: \"$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 @@ -6768,12 +6763,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6772: checking for $ac_func" >&5 +echo "configure:6767: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6795: \"$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 @@ -6827,12 +6822,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6831: checking for $ac_func" >&5 +echo "configure:6826: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6854: \"$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 @@ -6880,7 +6875,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6884: checking for putprpwnam in -lsec" >&5 +echo "configure:6879: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6888,7 +6883,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6898: \"$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 @@ -6929,12 +6924,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6933: checking for $ac_func" >&5 +echo "configure:6928: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6956: \"$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 @@ -6989,12 +6984,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:6993: checking for $ac_func" >&5 +echo "configure:6988: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7016: \"$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 @@ -7042,7 +7037,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7046: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7041: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7050,7 +7045,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7060: \"$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 @@ -7091,12 +7086,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7095: checking for $ac_func" >&5 +echo "configure:7090: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7118: \"$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 @@ -7150,12 +7145,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:7154: checking for $ac_func" >&5 +echo "configure:7149: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7177: \"$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 @@ -7203,7 +7198,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7207: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7202: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7211,7 +7206,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7221: \"$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 @@ -7252,12 +7247,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7256: checking for $ac_func" >&5 +echo "configure:7251: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7279: \"$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 @@ -7313,12 +7308,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7317: checking for $ac_func" >&5 +echo "configure:7312: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7340: \"$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 @@ -7366,7 +7361,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7370: checking for getspnam in -lgen" >&5 +echo "configure:7365: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7374,7 +7369,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7384: \"$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 @@ -7415,12 +7410,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7419: checking for $ac_func" >&5 +echo "configure:7414: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7442: \"$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 @@ -7475,12 +7470,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7479: checking for $ac_func" >&5 +echo "configure:7474: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7502: \"$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 @@ -7528,7 +7523,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7532: checking for getspnam in -lsecurity" >&5 +echo "configure:7527: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7536,7 +7531,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7546: \"$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 @@ -7577,12 +7572,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7581: checking for $ac_func" >&5 +echo "configure:7576: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7604: \"$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 @@ -7636,12 +7631,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7640: checking for $ac_func" >&5 +echo "configure:7635: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7663: \"$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 @@ -7689,7 +7684,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7693: checking for getspnam in -lsec" >&5 +echo "configure:7688: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7697,7 +7692,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7707: \"$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 @@ -7738,12 +7733,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7742: checking for $ac_func" >&5 +echo "configure:7737: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7765: \"$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 @@ -7798,12 +7793,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7802: checking for $ac_func" >&5 +echo "configure:7797: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7825: \"$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 @@ -7851,7 +7846,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7855: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7850: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7859,7 +7854,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7869: \"$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 @@ -7900,12 +7895,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7904: checking for $ac_func" >&5 +echo "configure:7899: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7927: \"$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 @@ -7959,12 +7954,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7963: checking for $ac_func" >&5 +echo "configure:7958: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7986: \"$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 @@ -8012,7 +8007,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8016: checking for bigcrypt in -lsec" >&5 +echo "configure:8011: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8020,7 +8015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8030: \"$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 @@ -8061,12 +8056,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8065: checking for $ac_func" >&5 +echo "configure:8060: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8088: \"$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 @@ -8121,12 +8116,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8125: checking for $ac_func" >&5 +echo "configure:8120: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8148: \"$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 @@ -8174,7 +8169,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8178: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8173: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8182,7 +8177,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8192: \"$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 @@ -8223,12 +8218,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8227: checking for $ac_func" >&5 +echo "configure:8222: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8250: \"$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 @@ -8282,12 +8277,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8286: checking for $ac_func" >&5 +echo "configure:8281: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8309: \"$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 @@ -8335,7 +8330,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8339: checking for getprpwnam in -lsec" >&5 +echo "configure:8334: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8343,7 +8338,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8353: \"$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 @@ -8384,12 +8379,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8388: checking for $ac_func" >&5 +echo "configure:8383: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8411: \"$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 @@ -8455,7 +8450,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8459: checking ability to build shared libraries" >&5 +echo "configure:8454: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8593,7 +8588,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:8597: checking for $ac_word" >&5 +echo "configure:8592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8649,15 +8644,15 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8653: checking linker flags for shared libraries" >&5 +echo "configure:8648: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8656: checking compiler flags for position-independent code" >&5 +echo "configure:8651: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8661: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8656: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8677,7 +8672,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:8681: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8676: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8698,7 +8693,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:8702: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8697: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8721,7 +8716,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8725: checking for long long" >&5 +echo "configure:8720: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8730,12 +8725,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8734: \"$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 @@ -8762,20 +8757,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8766: checking for LL suffix on long long integers" >&5 +echo "configure:8761: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8797,7 +8792,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8801: checking for 64 bit off_t" >&5 +echo "configure:8796: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8806,13 +8801,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } 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:8811: \"$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 @@ -8835,7 +8830,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8839: checking for off64_t" >&5 +echo "configure:8834: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8844,7 +8839,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8853: \"$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 @@ -8877,7 +8872,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8881: checking for 64 bit ino_t" >&5 +echo "configure:8876: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8886,13 +8881,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8891: \"$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 @@ -8915,7 +8910,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8919: checking for ino64_t" >&5 +echo "configure:8914: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8924,7 +8919,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8933: \"$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 @@ -8957,7 +8952,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8961: checking for dev64_t" >&5 +echo "configure:8956: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8966,7 +8961,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8999,13 +8994,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9003: checking for struct dirent64" >&5 +echo "configure:8998: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9038,7 +9033,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9042: checking for major macro" >&5 +echo "configure:9037: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9047,7 +9042,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9079,7 +9074,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9083: checking for minor macro" >&5 +echo "configure:9078: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9088,7 +9083,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9120,7 +9115,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9124: checking for makedev macro" >&5 +echo "configure:9119: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9129,7 +9124,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9161,7 +9156,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9165: checking for unsigned char" >&5 +echo "configure:9160: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9170,12 +9165,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9174: \"$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 @@ -9198,13 +9193,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9202: checking for sin_len in sock" >&5 +echo "configure:9197: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9213,7 +9208,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9234,13 +9229,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9238: checking whether seekdir returns void" >&5 +echo "configure:9233: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9249,7 +9244,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9270,20 +9265,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9274: checking for __FILE__ macro" >&5 +echo "configure:9269: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9304,20 +9299,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9308: checking for __FUNCTION__ macro" >&5 +echo "configure:9303: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9338,7 +9333,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9342: checking if gettimeofday takes tz argument" >&5 +echo "configure:9337: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9347,14 +9342,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9353: \"$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 @@ -9377,7 +9372,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9381: checking for C99 vsnprintf" >&5 +echo "configure:9376: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9386,7 +9381,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9413,7 +9408,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9436,7 +9431,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9440: checking for broken readdir" >&5 +echo "configure:9435: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9445,7 +9440,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9453,7 +9448,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:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9452: \"$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 @@ -9476,13 +9471,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9480: checking for utimbuf" >&5 +echo "configure:9475: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9490,7 +9485,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9514,12 +9509,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9518: checking for $ac_func" >&5 +echo "configure:9513: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9541: \"$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 @@ -9568,13 +9563,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9572: checking for ut_name in utmp" >&5 +echo "configure:9567: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9582,7 +9577,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9603,13 +9598,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9607: checking for ut_user in utmp" >&5 +echo "configure:9602: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9617,7 +9612,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9638,13 +9633,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9642: checking for ut_id in utmp" >&5 +echo "configure:9637: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9652,7 +9647,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9673,13 +9668,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9677: checking for ut_host in utmp" >&5 +echo "configure:9672: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9687,7 +9682,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9708,13 +9703,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9712: checking for ut_time in utmp" >&5 +echo "configure:9707: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9722,7 +9717,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9743,13 +9738,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9747: checking for ut_tv in utmp" >&5 +echo "configure:9742: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9757,7 +9752,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9778,13 +9773,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9782: checking for ut_type in utmp" >&5 +echo "configure:9777: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9792,7 +9787,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9813,13 +9808,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9817: checking for ut_pid in utmp" >&5 +echo "configure:9812: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9827,7 +9822,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9848,13 +9843,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9852: checking for ut_exit in utmp" >&5 +echo "configure:9847: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9862,7 +9857,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9883,13 +9878,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9887: checking for ut_addr in utmp" >&5 +echo "configure:9882: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9897,7 +9892,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9919,13 +9914,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9923: checking whether pututline returns pointer" >&5 +echo "configure:9918: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9933,7 +9928,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9955,13 +9950,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9959: checking for ut_syslen in utmpx" >&5 +echo "configure:9954: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9969,7 +9964,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9990,7 +9985,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9994: checking for Linux kernel oplocks" >&5 +echo "configure:9989: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9999,7 +9994,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10013,7 +10008,7 @@ main() { } EOF -if { (eval echo configure:10017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10036,7 +10031,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10040: checking for kernel change notify support" >&5 +echo "configure:10035: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10045,7 +10040,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10059,7 +10054,7 @@ main() { } EOF -if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10082,7 +10077,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10086: checking for kernel share modes" >&5 +echo "configure:10081: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10091,7 +10086,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10107,7 +10102,7 @@ main() { } EOF -if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10133,13 +10128,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10137: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10132: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10147,7 +10142,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:10151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10168,7 +10163,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10172: checking for irix specific capabilities" >&5 +echo "configure:10167: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10177,7 +10172,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10192,7 +10187,7 @@ main() { } EOF -if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10191: \"$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 @@ -10220,13 +10215,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10224: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10219: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10236,7 +10231,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10257,13 +10252,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10261: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10256: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10273,7 +10268,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10294,13 +10289,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10298: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10293: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10310,7 +10305,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10331,13 +10326,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10335: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10330: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10347,7 +10342,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10369,13 +10364,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10373: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10368: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10389,7 +10384,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10410,16 +10405,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10414: checking for test routines" >&5 +echo "configure:10409: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10418: \"$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 @@ -10433,7 +10428,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10437: checking for ftruncate extend" >&5 +echo "configure:10432: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10442,11 +10437,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10445: \"$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 @@ -10469,7 +10464,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10473: checking for broken getgroups" >&5 +echo "configure:10468: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10478,11 +10473,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10481: \"$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 @@ -10505,7 +10500,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10509: checking whether getpass should be replaced" >&5 +echo "configure:10504: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10513,7 +10508,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10549,7 +10544,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10553: checking for broken inet_ntoa" >&5 +echo "configure:10548: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10558,7 +10553,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10572,7 +10567,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:10576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10571: \"$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 @@ -10595,7 +10590,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10599: checking for secure mkstemp" >&5 +echo "configure:10594: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10604,7 +10599,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10621,7 +10616,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10644,7 +10639,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10648: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10643: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10653,12 +10648,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10681,7 +10676,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10685: checking for root" >&5 +echo "configure:10680: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10690,11 +10685,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10693: \"$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 @@ -10722,7 +10717,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10726: checking for iface AIX" >&5 +echo "configure:10721: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10731,7 +10726,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10763,7 +10758,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10767: checking for iface ifconf" >&5 +echo "configure:10762: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10772,7 +10767,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10805,7 +10800,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10809: checking for iface ifreq" >&5 +echo "configure:10804: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10814,7 +10809,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10851,7 +10846,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10855: checking for setresuid" >&5 +echo "configure:10850: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10860,7 +10855,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10867: \"$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 @@ -10894,7 +10889,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10898: checking for setreuid" >&5 +echo "configure:10893: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10903,7 +10898,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10910: \"$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 @@ -10936,7 +10931,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10940: checking for seteuid" >&5 +echo "configure:10935: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10945,7 +10940,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10952: \"$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 @@ -10978,7 +10973,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10982: checking for setuidx" >&5 +echo "configure:10977: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10987,7 +10982,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10994: \"$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 @@ -11020,7 +11015,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11024: checking for working mmap" >&5 +echo "configure:11019: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11029,11 +11024,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11056,7 +11051,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11060: checking for ftruncate needs root" >&5 +echo "configure:11055: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11065,11 +11060,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11092,7 +11087,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11096: checking for fcntl locking" >&5 +echo "configure:11091: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11101,11 +11096,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11104: \"$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 @@ -11128,7 +11123,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11132: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11127: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11137,11 +11132,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11166,7 +11161,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11170: checking for 64 bit fcntl locking" >&5 +echo "configure:11165: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11175,7 +11170,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11198: \"$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 @@ -11224,13 +11219,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11228: checking for st_blocks in struct stat" >&5 +echo "configure:11223: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11239,7 +11234,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11262,13 +11257,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11266: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11261: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11305,13 +11300,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11309: checking for broken nisplus include files" >&5 +echo "configure:11304: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11321,7 +11316,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11345,7 +11340,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11349: checking whether to use smbwrapper" >&5 +echo "configure:11344: 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" @@ -11392,7 +11387,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11396: checking whether to use AFS" >&5 +echo "configure:11391: 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" @@ -11418,7 +11413,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11422: checking whether to use DCE/DFS auth" >&5 +echo "configure:11417: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11443,7 +11438,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11447: checking whether to use Kerberos IV" >&5 +echo "configure:11442: 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" @@ -11455,7 +11450,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11459: checking for dn_expand in -lresolv" >&5 +echo "configure:11454: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11463,7 +11458,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11473: \"$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 @@ -11518,7 +11513,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11522: checking whether to use Kerberos 5" >&5 +echo "configure:11517: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11546,7 +11541,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11550: checking whether to use AUTOMOUNT" >&5 +echo "configure:11545: 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" @@ -11571,7 +11566,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11575: checking whether to use SMBMOUNT" >&5 +echo "configure:11570: 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" @@ -11608,7 +11603,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11612: checking whether to use PAM password database" >&5 +echo "configure:11607: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11634,7 +11629,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11638: checking for pam_get_data in -lpam" >&5 +echo "configure:11633: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11642,7 +11637,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11652: \"$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 @@ -11680,7 +11675,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11684: checking whether to use pam_smbpass" >&5 +echo "configure:11679: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11722,12 +11717,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11726: checking for $ac_func" >&5 +echo "configure:11721: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11749: \"$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 @@ -11776,7 +11771,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:11780: checking for crypt in -lcrypt" >&5 +echo "configure:11775: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11784,7 +11779,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11794: \"$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 @@ -11830,7 +11825,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11834: checking for a crypt that needs truncated salt" >&5 +echo "configure:11829: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11839,11 +11834,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11881,7 +11876,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11885: checking whether to use TDB SAM database" >&5 +echo "configure:11880: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11907,7 +11902,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11911: checking whether to use LDAP SAM database" >&5 +echo "configure:11906: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11934,7 +11929,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11938: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11933: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11962,7 +11957,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11966: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11961: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11984,7 +11979,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11988: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11983: 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" @@ -12009,7 +12004,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12013: checking whether to use SSL" >&5 +echo "configure:12008: 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" @@ -12083,7 +12078,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12087: checking whether to use syslog logging" >&5 +echo "configure:12082: 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" @@ -12108,7 +12103,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12112: checking whether to use profiling" >&5 +echo "configure:12107: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12136,7 +12131,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12140: checking whether to support disk-quotas" >&5 +echo "configure:12135: 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" @@ -12148,13 +12143,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12152: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12147: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12166,7 +12161,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12210,7 +12205,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12214: checking whether to support utmp accounting" >&5 +echo "configure:12209: 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" @@ -12236,7 +12231,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12240: checking whether to support Microsoft Dfs" >&5 +echo "configure:12235: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12262,7 +12257,7 @@ fi # check for Samba VFS support echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12266: checking whether to support the experimental Samba vfs" >&5 +echo "configure:12261: checking whether to support the experimental Samba vfs" >&5 # Check whether --with-vfs or --without-vfs was given. if test "${with_vfs+set}" = set; then withval="$with_vfs" @@ -12291,7 +12286,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12295: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12290: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12318,14 +12313,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12322: checking how to get filesystem space usage" >&5 +echo "configure:12317: 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:12329: checking statvfs64 function (SVR4)" >&5 +echo "configure:12324: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12333,7 +12328,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12346: \"$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 @@ -12380,12 +12375,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12384: checking statvfs function (SVR4)" >&5 +echo "configure:12379: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12393,7 +12388,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12392: \"$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 @@ -12418,7 +12413,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:12422: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12417: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12426,7 +12421,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12439,7 +12434,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12438: \"$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 @@ -12466,7 +12461,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:12470: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12465: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12474,7 +12469,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12492: \"$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 @@ -12520,7 +12515,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:12524: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12519: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12528,7 +12523,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12538,7 +12533,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12537: \"$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 @@ -12565,7 +12560,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:12569: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12564: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12573,7 +12568,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12589,7 +12584,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12588: \"$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 @@ -12616,7 +12611,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:12620: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12615: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12624,7 +12619,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12644,7 +12639,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12643: \"$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 @@ -12677,9 +12672,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12681: checking if large file support can be enabled" >&5 +echo "configure:12676: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12759,7 +12754,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12763: checking whether to support ACLs" >&5 +echo "configure:12758: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12812,7 +12807,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12816: checking for acl_get_file in -lacl" >&5 +echo "configure:12811: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12820,7 +12815,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12830: \"$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 @@ -12859,13 +12854,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12863: checking for ACL support" >&5 +echo "configure:12858: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12873,7 +12868,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12893,13 +12888,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12897: checking for acl_get_perm_np" >&5 +echo "configure:12892: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12907,7 +12902,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12962,7 +12957,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12966: checking whether to build winbind" >&5 +echo "configure:12961: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13064,7 +13059,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13068: checking for poptGetContext in -lpopt" >&5 +echo "configure:13063: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13072,7 +13067,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13082: \"$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 @@ -13107,7 +13102,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13111: checking whether to use included popt" >&5 +echo "configure:13106: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13121,23 +13116,24 @@ fi ################################################# # final configure stuff -echo "checking configure summary" +echo $ac_n "checking configure summary""... $ac_c" 1>&6 +echo "configure:13121: checking configure summary" >&5 if test "$cross_compiling" = yes; then - : + echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - echo "configure OK"; + echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; } + { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1; fi rm -fr conftest* fi diff --git a/source/configure.in b/source/configure.in index 67a239d4ca2..2922a42372e 100644 --- a/source/configure.in +++ b/source/configure.in @@ -195,11 +195,6 @@ AC_VALIDATE_CACHE_SYSTEM_TYPE DYNEXP= -# I'm sure gcc supports -rdynamic -if test "$ac_cv_prog_gcc" = yes; then - DYNEXP="-rdynamic" -fi - # # Config CPPFLAG settings for strange OS's that must be set # before other tests. @@ -2709,10 +2704,11 @@ AC_SUBST(FLAGS1) ################################################# # final configure stuff -echo "checking configure summary" +AC_MSG_CHECKING([configure summary]) AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"], - echo "configure OK";, - AC_MSG_ERROR([summary failure. Aborting config]),:) + AC_MSG_RESULT(yes), + AC_MSG_ERROR([summary failure. Aborting config]); exit 1;, + AC_MSG_WARN([cannot run when cross-compiling])) builddir=`pwd` AC_SUBST(builddir) diff --git a/source/lib/pam_errors.c b/source/lib/pam_errors.c index f0f47333cb6..68653e0f63b 100644 --- a/source/lib/pam_errors.c +++ b/source/lib/pam_errors.c @@ -23,6 +23,10 @@ #ifdef WITH_PAM #include +#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR) +#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR +#endif + /* PAM -> NT_STATUS map */ static struct { int pam_code; @@ -46,10 +50,9 @@ static struct { {PAM_CRED_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, /* FIXME: Is this correct? */ {PAM_CRED_ERR, NT_STATUS_UNSUCCESSFUL}, {PAM_AUTHTOK_ERR, NT_STATUS_UNSUCCESSFUL}, -#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR) -#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR -#endif +#ifdef PAM_AUTHTOK_RECOVER_ERR {PAM_AUTHTOK_RECOVER_ERR, NT_STATUS_UNSUCCESSFUL}, +#endif {PAM_AUTHTOK_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, {PAM_SUCCESS, NT_STATUS_OK} }; diff --git a/source/lib/substitute.c b/source/lib/substitute.c index 127698ef41f..c1ac1f504a3 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -202,14 +202,14 @@ void standard_sub_basic(char *str) if (*local_machine) string_sub(p,"%L", local_machine,l); else { - char *s = p; + char *ns = p; string_sub(p,"%L", global_myname,l); - while (*s) + while (*ns) { - if (isupper(*s)) - *s = tolower(*s); - s++; + if (isupper(*ns)) + *ns = tolower(*ns); + ns++; } } break; -- cgit From 2b7bf3b3478093e046479aeaecbfa38c555a94df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 1 Apr 2002 21:07:44 +0000 Subject: Check for syslog.h and sys/syslog.h (helps HPUX). Jeremy --- source/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/configure.in b/source/configure.in index 2922a42372e..06cffa48a46 100644 --- a/source/configure.in +++ b/source/configure.in @@ -384,7 +384,7 @@ AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h) AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h) AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h) AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h) -AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) +AC_CHECK_HEADERS(syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h synch.h pthread.h nsswitch.h) -- cgit From 5110f53790d1a1d5c0a3d3b269c6667e4a5f6fa6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 1 Apr 2002 21:10:03 +0000 Subject: Fix for building nsswitch modules on HPUX (thanks to Don McCall for the resend). Jeremy. --- source/configure | 2 +- source/include/config.h.in | 6 ++++++ source/include/includes.h | 2 ++ source/nsswitch/pam_winbind.h | 2 +- source/nsswitch/winbind_nss_solaris.c | 6 +++++- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source/configure b/source/configure index 78e48ce53ec..91e687e882e 100755 --- a/source/configure +++ b/source/configure @@ -2219,7 +2219,7 @@ else fi done -for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h +for ac_hdr in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/source/include/config.h.in b/source/include/config.h.in index a3c1afdde04..e6cc8386c60 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -1020,6 +1020,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_SYSCALL_H +/* Define if you have the header file. */ +#undef HAVE_SYS_SYSLOG_H + /* Define if you have the header file. */ #undef HAVE_SYS_TERMIO_H @@ -1038,6 +1041,9 @@ /* Define if you have the header file. */ #undef HAVE_SYSCALL_H +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + /* Define if you have the header file. */ #undef HAVE_TERMIO_H diff --git a/source/include/includes.h b/source/include/includes.h index f9e0f92d3b6..ec8600846ea 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -205,7 +205,9 @@ #include #include #include +#ifdef HAVE_SYSLOG_H #include +#endif #include #ifdef HAVE_NETINET_TCP_H diff --git a/source/nsswitch/pam_winbind.h b/source/nsswitch/pam_winbind.h index 93d9ec9e735..9897249e164 100644 --- a/source/nsswitch/pam_winbind.h +++ b/source/nsswitch/pam_winbind.h @@ -25,7 +25,7 @@ #define PAM_SM_ACCOUNT #define PAM_SM_PASSWORD -#if defined(SUNOS5) || defined(SUNOS4) +#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) /* Solaris always uses dynamic pam modules */ #define PAM_EXTERN extern diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c index 9c71c75e9d2..9db10aa5ec2 100644 --- a/source/nsswitch/winbind_nss_solaris.c +++ b/source/nsswitch/winbind_nss_solaris.c @@ -10,9 +10,13 @@ #include #include #include +#include "includes.h" +#ifdef HAVE_SYSLOG_H #include +#endif +#ifdef HAVE_SYS_SYSLOG_H #include -#include "includes.h" +#endif #include "winbind_nss_config.h" #ifdef HAVE_NSS_COMMON_H -- cgit From e8b73e38fd66fe00ae99a8c92b47ee05de875452 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Apr 2002 21:28:16 +0000 Subject: it turns out I need bin/ in PROGS for smbwrapper.so files for my install script to work. added bin/smbwrapper.so target to just call smbwrapper.so in Makefile --- source/Makefile.in | 4 ++++ source/configure | 4 ++-- source/configure.in | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index 7032dd292ba..e2e7b22ce69 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -623,6 +623,10 @@ bin/smbsh: $(SMBSH_OBJ) bin/.dummy @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) +bin/smbwrapper.@SHLIBEXT@: smbwrapper.@SHLIBEXT@ + +bin/smbwrapper.32.@SHLIBEXT@: smbwrapper.32.@SHLIBEXT@ + smbwrapper.@SHLIBEXT@: $(PICOBJS) @echo Linking shared library bin/$@ @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS) diff --git a/source/configure b/source/configure index 91e687e882e..517ffc90165 100755 --- a/source/configure +++ b/source/configure @@ -11352,12 +11352,12 @@ if test "${with_smbwrapper+set}" = set; then EOF WRAPPROG="bin/smbsh" - WRAP="smbwrapper.$SHLIBEXT" + WRAP="bin/smbwrapper.$SHLIBEXT" if test x$ATTEMPT_WRAP32_BUILD = x; then WRAP32="" else - WRAP32=smbwrapper.32.$SHLIBEXT + WRAP32=bin/smbwrapper.32.$SHLIBEXT fi # Conditions under which smbwrapper should not be built. diff --git a/source/configure.in b/source/configure.in index 06cffa48a46..7f739308b21 100644 --- a/source/configure.in +++ b/source/configure.in @@ -1721,12 +1721,12 @@ AC_ARG_WITH(smbwrapper, AC_MSG_RESULT(yes) AC_DEFINE(WITH_SMBWRAPPER) WRAPPROG="bin/smbsh" - WRAP="smbwrapper.$SHLIBEXT" + WRAP="bin/smbwrapper.$SHLIBEXT" if test x$ATTEMPT_WRAP32_BUILD = x; then WRAP32="" else - WRAP32=smbwrapper.32.$SHLIBEXT + WRAP32=bin/smbwrapper.32.$SHLIBEXT fi # Conditions under which smbwrapper should not be built. -- cgit From e8a16c93c561f77e99e603dd12da33c77b74df23 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Apr 2002 21:55:20 +0000 Subject: remove extra .a from libsmbclient.a rule --- source/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index e2e7b22ce69..d86804ec4da 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -641,8 +641,8 @@ libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) @SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR) libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) - @echo Linking libsmbclient non-shared library bin/$@.a - @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS) + @echo Linking libsmbclient non-shared library bin/$@ + @-$(AR) -rc bin/$@ $(LIBSMBCLIENT_PICOBJS) bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) @echo Linking shared library $@ -- cgit From 257db2b08aeccc2ceafd0dd15c9bc07efd3fcc4e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Apr 2002 03:43:10 +0000 Subject: Some merges from HEAD. rpcclient's spoolss functions still do not work (parsing problems). Intermediate checkin. Does compile. --- source/Makefile.in | 3 +- source/libsmb/cli_spoolss.c | 908 ++++++++++++++++++++++++++++----------- source/rpcclient/cmd_spoolss.c | 933 ++++++++++++++++++++++++++++------------- source/rpcclient/display_sec.c | 255 ++++------- source/rpcclient/rpcclient.c | 124 ++---- 5 files changed, 1427 insertions(+), 796 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index d86804ec4da..026664e1093 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -267,7 +267,8 @@ RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \ rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \ rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \ rpcclient/cmd_dfs.o rpcclient/cmd_reg.o \ - rpc_client/cli_login.o rpc_client/cli_netlogon.o + rpc_client/cli_login.o rpc_client/cli_netlogon.o \ + rpcclient/display_sec.o RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \ diff --git a/source/libsmb/cli_spoolss.c b/source/libsmb/cli_spoolss.c index bd8f4877239..c56ecf05f80 100644 --- a/source/libsmb/cli_spoolss.c +++ b/source/libsmb/cli_spoolss.c @@ -1,13 +1,12 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client - Copyright (C) Gerald Carter 2001,2002 - Copyright (C) Tim Potter 2000, - Copyright (C) Andrew Tridgell 1994-2000 - Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - Copyright (C) Jean-Francois Micouleau 1999-2000 + Copyright (C) Gerald Carter 2001-2002, + Copyright (C) Tim Potter 2000-2002, + Copyright (C) Andrew Tridgell 1994-2000, + Copyright (C) Luke Kenneth Casson Leighton 1996-2000, + Copyright (C) Jean-Francois Micouleau 1999-2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,9 +25,19 @@ #include "includes.h" -extern pstring global_myname; - -/* Opens a SMB connection to the SPOOLSS pipe */ +/** @defgroup spoolss SPOOLSS - NT printing routines + * @ingroup rpc_client + * + * @{ + **/ + +/** Opens a SMB connection and connects to the SPOOLSS pipe. + * + * @param cli Uninitialised client handle. + * @param system_name NETBIOS name of the machine to connect to. + * @param creds User credentials to connect as. + * @returns Initialised client handle. + */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds) @@ -244,19 +253,40 @@ static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, *info=inf; } +/** Return a handle to the specified printer or print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param printername The name of the printer or print server to be + * opened in UNC format. + * + * @param datatype Specifies the default data type for the printer. + * + * @param access_required The access rights requested on the printer or + * print server. + * + * @param station The UNC name of the requesting workstation. + * + * @param username The name of the user requesting the open. + * + * @param pol Returned policy handle. + */ /********************************************************************************* Win32 API - OpenPrinter() ********************************************************************************/ -NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *printername, char *datatype, uint32 access_required, char *station, char *username, POLICY_HND *pol) { prs_struct qbuf, rbuf; SPOOL_Q_OPEN_PRINTER_EX q; SPOOL_R_OPEN_PRINTER_EX r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -274,26 +304,20 @@ NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ - if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) goto done; - } /* Return output parameters */ - if (W_ERROR_IS_OK(r.status)) { - result = NT_STATUS_OK; + result = r.status; + + if (W_ERROR_IS_OK(result)) *pol = r.handle; - } else { - result = werror_to_ntstatus(r.status); - } done: prs_mem_free(&qbuf); @@ -302,17 +326,26 @@ NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** Close a printer handle + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param pol Policy handle of printer or print server to close. + */ /********************************************************************************* Win32 API - ClosePrinter() ********************************************************************************/ -NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol) { prs_struct qbuf, rbuf; SPOOL_Q_CLOSEPRINTER q; SPOOL_R_CLOSEPRINTER r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -329,26 +362,20 @@ NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ - if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) goto done; - } /* Return output parameters */ - if (W_ERROR_IS_OK(r.status)) { + result = r.status; + + if (W_ERROR_IS_OK(result)) *pol = r.handle; - result = NT_STATUS_OK; - } else { - result = werror_to_ntstatus(r.status); - } done: prs_mem_free(&qbuf); @@ -357,19 +384,38 @@ NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** Enumerate printers on a print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * + * @param flags Selected from PRINTER_ENUM_* flags. + * @param level Request information level. + * + * @param num_printers Pointer to number of printers returned. May be + * NULL. + * @param ctr Return structure for printer information. May + * be NULL. + */ /********************************************************************************* Win32 API - EnumPrinters() ********************************************************************************/ -NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 flags, uint32 level, int *returned, PRINTER_INFO_CTR *ctr) +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPRINTERS q; SPOOL_R_ENUMPRINTERS r; NEW_BUFFER buffer; - uint32 needed = 0x1068; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -378,38 +424,42 @@ NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, fstrcpy (server, cli->desthost); strupper (server); - do { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); make_spoolss_q_enumprinters(&q, flags, server, level, &buffer, - needed); + offered); /* Marshall data and send request */ if (!spoolss_io_q_enumprinters("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ + if (spoolss_io_r_enumprinters("", &r, &rbuf, 0)) { - needed = r.needed; + if (needed) + *needed = r.needed; } - result = werror_to_ntstatus(r.status); + result = r.status; - if (NT_STATUS_V(result)==NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER) || !W_ERROR_IS_OK(result)) + /* Return output parameters */ + + if (!W_ERROR_IS_OK(r.status)) goto done; - /* Return output parameters */ + if (num_printers) + *num_printers = r.returned; + + if (!ctr) + goto done; - if ((*returned = r.returned)) { switch (level) { case 0: decode_printer_info_0(mem_ctx, r.buffer, r.returned, @@ -428,30 +478,43 @@ NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, &ctr->printers_3); break; } - } done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } /********************************************************************************* Win32 API - EnumPorts() ********************************************************************************/ - -NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, - int *returned, PORT_INFO_CTR *ctr) +/** Enumerate printer ports on a print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * May be NULL. + * + * @param level Requested information level. + * + * @param num_ports Pointer to number of ports returned. May be NULL. + * @param ctr Pointer to structure holding port information. + * May be NULL. + */ + +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPORTS q; SPOOL_R_ENUMPORTS r; NEW_BUFFER buffer; - uint32 needed = 100; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -460,36 +523,40 @@ NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - do { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - make_spoolss_q_enumports(&q, server, level, &buffer, needed); + make_spoolss_q_enumports(&q, server, level, &buffer, offered); /* Marshall data and send request */ if (!spoolss_io_q_enumports("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ + if (spoolss_io_r_enumports("", &r, &rbuf, 0)) { - needed = r.needed; + if (needed) + *needed = r.needed; } + result = r.status; + /* Return output parameters */ - result = werror_to_ntstatus(r.status); - if (NT_STATUS_IS_OK(result) && - r.returned > 0) { + if (!W_ERROR_IS_OK(result)) + goto done; - *returned = r.returned; + if (num_ports) + *num_ports = r.returned; + + if (!ctr) + goto done; switch (level) { case 1: @@ -501,14 +568,11 @@ NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint &ctr->port.info_2); break; } - } done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } @@ -516,44 +580,46 @@ NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint Win32 API - GetPrinter() ********************************************************************************/ -NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr) +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTER q; SPOOL_R_GETPRINTER r; NEW_BUFFER buffer; - uint32 needed = 0x1068; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); - do { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, needed); + make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, offered); /* Marshall data and send request */ + if (!spoolss_io_q_getprinter("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTER, &qbuf, &rbuf)) - { - result = NT_STATUS_UNSUCCESSFUL; goto done; - } /* Unmarshall response */ - if (spoolss_io_r_getprinter("", &r, &rbuf, 0)) { - needed = r.needed; - } + + if (!spoolss_io_r_getprinter("", &r, &rbuf, 0)) + goto done; + + if (needed) + *needed = r.needed; /* Return output parameters */ - result = werror_to_ntstatus(r.status); + + result = r.status; if (NT_STATUS_IS_OK(result)) { switch (level) { @@ -576,23 +642,35 @@ NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } /********************************************************************************* Win32 API - SetPrinter() ********************************************************************************/ +/** Set printer info + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param pol Policy handle on printer to set info. + * @param level Information level to set. + * @param ctr Pointer to structure holding printer information. + * @param command Specifies the action performed. See + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_13ua.asp + * for details. + * + */ -NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr, - uint32 command) +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr, uint32 command) { prs_struct qbuf, rbuf; SPOOL_Q_SETPRINTER q; SPOOL_R_SETPRINTER r; - NTSTATUS result = NT_STATUS_ACCESS_DENIED; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -604,20 +682,17 @@ NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command); /* Marshall data and send request */ + if (!spoolss_io_q_setprinter("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, SPOOLSS_SETPRINTER, &qbuf, &rbuf)) - { - result = NT_STATUS_ACCESS_DENIED; goto done; - } /* Unmarshall response */ + if (!spoolss_io_r_setprinter("", &r, &rbuf, 0)) - { goto done; - } - result = werror_to_ntstatus(r.status); + result = r.status; done: prs_mem_free(&qbuf); @@ -630,17 +705,36 @@ done: /********************************************************************************* Win32 API - GetPrinterDriver() ********************************************************************************/ - -NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, char* env, - PRINTER_DRIVER_CTR *ctr) +/** Get installed printer drivers for a given printer + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * + * @param pol Pointer to an open policy handle for the printer + * opened with cli_spoolss_open_printer_ex(). + * @param level Requested information level. + * @param env The print environment or archictecture. This is + * "Windows NT x86" for NT4. + * @param ctr Returned printer driver information. + */ + +WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + char *env, PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTERDRIVER2 q; SPOOL_R_GETPRINTERDRIVER2 r; NEW_BUFFER buffer; - uint32 needed = 0x1068; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -649,40 +743,40 @@ NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct fstrcpy (server, cli->desthost); strupper (server); - do - { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2, + &buffer, offered); - /* write the request */ - make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2, &buffer, needed); + /* Marshall data and send request */ - /* Marshall data and send request */ if (!spoolss_io_q_getprinterdriver2 ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVER2, &qbuf, &rbuf)) - { - result = NT_STATUS_UNSUCCESSFUL; goto done; - } /* Unmarshall response */ - if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0)) - { - needed = r.needed; + + if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; } + result = r.status; + /* Return output parameters */ - result = werror_to_ntstatus(r.status); - if (NT_STATUS_IS_OK(result)) - { - switch (level) - { + if (!W_ERROR_IS_OK(result)) + goto done; + + if (!ctr) + goto done; + + switch (level) { case 1: decode_printer_driver_1(mem_ctx, r.buffer, 1, &ctr->info1); break; @@ -693,31 +787,32 @@ NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct decode_printer_driver_3(mem_ctx, r.buffer, 1, &ctr->info3); break; } - } done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } /********************************************************************************* Win32 API - EnumPrinterDrivers() ********************************************************************************/ - -NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, char* env, uint32 *returned, +/********************************************************************** + * Get installed printer drivers for a given printer + */ +WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + uint32 *num_drivers, PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ENUMPRINTERDRIVERS q; SPOOL_R_ENUMPRINTERDRIVERS r; NEW_BUFFER buffer; - uint32 needed = 0; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -726,41 +821,43 @@ NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - do - { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + /* Write the request */ - /* write the request */ - make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer, needed); + make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer, + offered); /* Marshall data and send request */ + if (!spoolss_io_q_enumprinterdrivers ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli, SPOOLSS_ENUMPRINTERDRIVERS, &qbuf, &rbuf)) - { - result = NT_STATUS_UNSUCCESSFUL; goto done; - } /* Unmarshall response */ - if (spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0)) - { - needed = r.needed; - } + + if (!spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0)) + goto done; + + if (needed) + *needed = r.needed; + + if (num_drivers) + *num_drivers = r.returned; + + result = r.status; /* Return output parameters */ - result = werror_to_ntstatus(r.status); - if (NT_STATUS_IS_OK(result) && - (r.returned != 0)) - { - *returned = r.returned; - - switch (level) - { + + if (W_ERROR_IS_OK(result) && (r.returned != 0)) { + *num_drivers = r.returned; + + switch (level) { case 1: decode_printer_driver_1(mem_ctx, r.buffer, r.returned, &ctr->info1); break; @@ -777,8 +874,6 @@ NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } @@ -786,16 +881,20 @@ NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ /********************************************************************************* Win32 API - GetPrinterDriverDirectory() ********************************************************************************/ - -NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr) +/********************************************************************** + * Get installed printer drivers for a given printer + */ +WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + DRIVER_DIRECTORY_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTERDRIVERDIR q; SPOOL_R_GETPRINTERDRIVERDIR r; NEW_BUFFER buffer; - uint32 needed = 100; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -804,40 +903,41 @@ NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - do - { /* Initialise input parameters */ - init_buffer(&buffer, needed, mem_ctx); + + init_buffer(&buffer, offered, mem_ctx); prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + /* Write the request */ - /* write the request */ - make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer, needed); + make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer, + offered); /* Marshall data and send request */ + if (!spoolss_io_q_getprinterdriverdir ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY, &qbuf, &rbuf)) - { - result = NT_STATUS_UNSUCCESSFUL; + !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY, + &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ - if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0)) - { - needed = r.needed; + + if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; } /* Return output parameters */ - result = werror_to_ntstatus(r.status); - if (NT_STATUS_IS_OK(result)) - { - switch (level) - { + + result = r.status; + + if (W_ERROR_IS_OK(result)) { + switch (level) { case 1: - decode_printerdriverdir_1(mem_ctx, r.buffer, 1, &ctr->info1); + decode_printerdriverdir_1(mem_ctx, r.buffer, 1, + &ctr->info1); break; } } @@ -846,22 +946,23 @@ NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem prs_mem_free(&qbuf); prs_mem_free(&rbuf); - } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); - return result; } /********************************************************************************* Win32 API - AddPrinterDriver() ********************************************************************************/ - -NTSTATUS cli_spoolss_addprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, PRINTER_DRIVER_CTR *ctr) +/********************************************************************** + * Install a printer driver + */ +WERROR cli_spoolss_addprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, uint32 level, + PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTERDRIVER q; SPOOL_R_ADDPRINTERDRIVER r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -874,28 +975,24 @@ NTSTATUS cli_spoolss_addprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + /* Write the request */ - /* write the request */ make_spoolss_q_addprinterdriver (mem_ctx, &q, server, level, ctr); /* Marshall data and send request */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_q_addprinterdriver ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTERDRIVER, &qbuf, &rbuf)) - { goto done; - } - /* Unmarshall response */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_addprinterdriver ("", &r, &rbuf, 0)) - { goto done; - } /* Return output parameters */ - result = werror_to_ntstatus(r.status); + + result = r.status; done: prs_mem_free(&qbuf); @@ -907,14 +1004,16 @@ done: /********************************************************************************* Win32 API - AddPrinter() ********************************************************************************/ - -NTSTATUS cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, PRINTER_INFO_CTR *ctr) +/********************************************************************** + * Install a printer + */ +WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR*ctr) { prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTEREX q; SPOOL_R_ADDPRINTEREX r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server, client, user; @@ -928,35 +1027,32 @@ NTSTATUS cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, strupper (server); fstrcpy (user, cli->user_name); - /* Initialise input parameters */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + /* Write the request */ - /* write the request */ - make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user, level, ctr); + make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user, + level, ctr); /* Marshall data and send request */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_q_addprinterex ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTEREX, &qbuf, &rbuf)) - { goto done; - } - /* Unmarshall response */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_addprinterex ("", &r, &rbuf, 0)) - { goto done; - } /* Return output parameters */ - result = werror_to_ntstatus(r.status); -done: + result = r.status; + + done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); @@ -966,14 +1062,18 @@ done: /********************************************************************************* Win32 API - DeltePrinterDriver() ********************************************************************************/ - -NTSTATUS cli_spoolss_deleteprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *arch, char *driver) +/********************************************************************** + * Delete a Printer Driver from the server (does not remove + * the driver files + */ +WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, char *arch, + char *driver) { prs_struct qbuf, rbuf; SPOOL_Q_DELETEPRINTERDRIVER q; SPOOL_R_DELETEPRINTERDRIVER r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); fstring server; ZERO_STRUCT(q); @@ -987,29 +1087,26 @@ NTSTATUS cli_spoolss_deleteprinterdriver (struct cli_state *cli, TALLOC_CTX *mem slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - /* write the request */ - make_spoolss_q_deleteprinterdriver (mem_ctx, &q, server, arch, driver); + /* Write the request */ + + make_spoolss_q_deleteprinterdriver(mem_ctx, &q, server, arch, driver); /* Marshall data and send request */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_q_deleteprinterdriver ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli,SPOOLSS_DELETEPRINTERDRIVER , &qbuf, &rbuf)) - { goto done; - } - /* Unmarshall response */ - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_deleteprinterdriver ("", &r, &rbuf, 0)) - { goto done; - } /* Return output parameters */ - result = werror_to_ntstatus(r.status); -done: + result = r.status; + + done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); @@ -1020,56 +1117,237 @@ done: Win32 API - GetPrinterProcessorDirectory() ********************************************************************************/ -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *name, char *environment, fstring procdir) +WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + char *name, char *environment, + fstring procdir) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTPROCESSORDIRECTORY q; SPOOL_R_GETPRINTPROCESSORDIRECTORY r; - NTSTATUS result; int level = 1; + WERROR result = W_ERROR(ERRgeneral); NEW_BUFFER buffer; - uint32 needed = 100; ZERO_STRUCT(q); ZERO_STRUCT(r); /* Initialise parse structures */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); /* Initialise input parameters */ - do { - init_buffer(&buffer, needed, mem_ctx); + init_buffer(&buffer, offered, mem_ctx); + + make_spoolss_q_getprintprocessordirectory( + &q, name, environment, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY, + &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (W_ERROR_IS_OK(result)) + fstrcpy(procdir, "Not implemented!"); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Add a form to a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param level Form info level to add - should always be 1. + * @param form A pointer to the form to be added. + * + */ + +WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, FORM *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ADDFORM q; + SPOOL_R_ADDFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - make_spoolss_q_getprintprocessordirectory(&q, name, - environment, level, - &buffer, needed); + /* Initialise input parameters */ + + make_spoolss_q_addform(&q, handle, level, form); /* Marshall data and send request */ - if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_q_addform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ADDFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_addform("", &r, &rbuf, 0)) goto done; - } + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} +/** Set a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param level Form info level to set - should always be 1. + * @param form A pointer to the form to be set. + * + */ + +WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, char *form_name, + FORM *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_SETFORM q; + SPOOL_R_SETFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_setform(&q, handle, level, form_name, form); + + /* Marshall data and send request */ + + if (!spoolss_io_q_setform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_SETFORM, &qbuf, &rbuf)) + goto done; + /* Unmarshall response */ - if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!spoolss_io_r_setform("", &r, &rbuf, 0)) goto done; - } + + /* Return output parameters */ + + result = r.status; + + if (!W_ERROR_IS_OK(result)) + goto done; + + + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Get a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param formname Name of the form to get + * @param level Form info level to get - should always be 1. + * + */ + +WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, char *formname, uint32 level, + FORM_1 *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETFORM q; + SPOOL_R_GETFORM r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_getform(&q, handle, formname, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getform("", &r, &rbuf, 0)) + goto done; /* Return output parameters */ - result = werror_to_ntstatus(r.status); + result = r.status; - } while (NT_STATUS_V(result) == - NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER)); + if (needed) + *needed = r.needed; + + if (W_ERROR_IS_OK(result)) + smb_io_form_1("", r.buffer, form, 0); done: prs_mem_free(&qbuf); @@ -1078,18 +1356,153 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CT return result; } +/** Delete a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param form The name of the form to delete. + * + */ + +WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, char *form_name) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_DELETEFORM q; + SPOOL_R_DELETEFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_deleteform(&q, handle, form_name); + + /* Marshall data and send request */ + + if (!spoolss_io_q_deleteform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_DELETEFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_deleteform("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +static void decode_forms_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 num_forms, FORM_1 **forms) +{ + int i; + + *forms = (FORM_1 *)talloc(mem_ctx, num_forms * sizeof(FORM_1)); + buffer->prs.data_offset = 0; + + for (i = 0; i < num_forms; i++) + smb_io_form_1("", buffer, &((*forms)[i]), 0); +} + +/** Enumerate forms + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * or cli_spoolss_addprinterex. + * @param level Form info level to get - should always be 1. + * @param handle Open policy handle + * + */ + +WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, int level, uint32 *num_forms, + FORM_1 **forms) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMFORMS q; + SPOOL_R_ENUMFORMS r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_enumforms(&q, handle, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumforms("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMFORMS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enumforms("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (num_forms) + *num_forms = r.numofforms; + + decode_forms_1(mem_ctx, r.buffer, *num_forms, forms); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} /********************************************************************************* Win32 API - SetPrinterData() ********************************************************************************/ -NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value) { prs_struct qbuf, rbuf; SPOOL_Q_SETPRINTERDATA q; SPOOL_R_SETPRINTERDATA r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -1106,15 +1519,13 @@ NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ if (!spoolss_io_q_setprinterdata ("", &q, &qbuf, 0) || !rpc_api_pipe_req (cli, SPOOLSS_SETPRINTERDATA, &qbuf, &rbuf)) - { - result = NT_STATUS_UNSUCCESSFUL; goto done; - } /* Unmarshall response */ - if (spoolss_io_r_setprinterdata ("", &r, &rbuf, 0)) { - result = werror_to_ntstatus(r.status); - } + if (spoolss_io_r_setprinterdata ("", &r, &rbuf, 0)) + goto done; + + result = r.status; done: prs_mem_free(&qbuf); @@ -1124,3 +1535,4 @@ done: } +/** @} **/ diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index b3bffde2ba0..ed1e4942b14 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/rpcclient/cmd_spoolss.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Gerald Carter 2001 @@ -82,58 +81,6 @@ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli, return NT_STATUS_OK; } -/**************************************************************************** - display sec_ace structure - ****************************************************************************/ -static void display_sec_ace(SEC_ACE *ace) -{ - fstring sid_str; - - sid_to_string(sid_str, &ace->trustee); - printf("\t\tSID: %s\n", sid_str); - - printf("\t\ttype:[%d], flags:[0x%02x], mask:[0x%08x]\n", - ace->type, ace->flags, ace->info.mask); -} - -/**************************************************************************** - display sec_acl structure - ****************************************************************************/ -static void display_sec_acl(SEC_ACL *acl) -{ - if (acl->size != 0 && acl->num_aces != 0) { - int i; - - printf("\t\tRevision:[%d]\n", acl->revision); - for (i = 0; i < acl->num_aces; i++) { - display_sec_ace(&acl->ace[i]); - } - } -} - -/**************************************************************************** - display sec_desc structure - ****************************************************************************/ -static void display_sec_desc(SEC_DESC *sec) -{ - fstring sid_str; - - printf("\tRevision:[%d]\n", sec->revision); - - if (sec->off_owner_sid) { - sid_to_string(sid_str, sec->owner_sid); - printf("\tOwner SID: %s\n", sid_str); - } - - if (sec->off_grp_sid) { - sid_to_string(sid_str, sec->grp_sid); - printf("\tGroup SID: %s\n", sid_str); - } - - if (sec->off_sacl) display_sec_acl(sec->sacl); - if (sec->off_dacl) display_sec_acl(sec->dacl); -} - /*********************************************************************** * Get printer information */ @@ -141,7 +88,7 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR werror; pstring printername; fstring servername, user; POLICY_HND hnd; @@ -160,71 +107,83 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, fstrcpy (printername, argv[1]); /* Open the printer handle */ - result = cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "", - MAXIMUM_ALLOWED_ACCESS, servername, user, &hnd); - - if (NT_STATUS_IS_OK(result)) { - printf ("Printer %s opened successfully\n", printername); - result = cli_spoolss_close_printer (cli, mem_ctx, &hnd); - if (!NT_STATUS_IS_OK(result)) { - printf ("Error closing printer handle! (%s)\n", get_nt_error_msg(result)); + + werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, + "", MAXIMUM_ALLOWED_ACCESS, + servername, user, &hnd); + + if (W_ERROR_IS_OK(werror)) { + printf("Printer %s opened successfully\n", printername); + werror = cli_spoolss_close_printer(cli, mem_ctx, &hnd); + + if (!W_ERROR_IS_OK(werror)) { + printf("Error closing printer handle! (%s)\n", + get_dos_error_msg(werror)); } } - return result; + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /**************************************************************************** printer info level 0 display function ****************************************************************************/ -static void display_print_info_0(PRINTER_INFO_0 *i1) +static void display_print_info_0(PRINTER_INFO_0 *i0) { - fstring name; - fstring servername; + fstring name = ""; + fstring servername = ""; + + if (!i0) + return; - rpcstr_pull(name, i1->printername.buffer, sizeof(name), 0, STR_TERMINATE); - rpcstr_pull(servername, i1->servername.buffer, sizeof(servername), 0,STR_TERMINATE); + if (i0->printername.buffer) + rpcstr_pull(name, i0->printername.buffer, sizeof(name), 0, STR_TERMINATE); + + if (i0->servername.buffer) + rpcstr_pull(servername, i0->servername.buffer, sizeof(servername), 0,STR_TERMINATE); printf("\tprintername:[%s]\n", name); printf("\tservername:[%s]\n", servername); - printf("\tcjobs:[0x%x]\n", i1->cjobs); - printf("\ttotal_jobs:[0x%x]\n", i1->total_jobs); + printf("\tcjobs:[0x%x]\n", i0->cjobs); + printf("\ttotal_jobs:[0x%x]\n", i0->total_jobs); + + printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i0->year, i0->month, + i0->day, i0->dayofweek); + printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i0->hour, i0->minute, + i0->second, i0->milliseconds); - printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i1->year, i1->month, - i1->day, i1->dayofweek); - printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i1->hour, i1->minute, - i1->second, i1->milliseconds); + printf("\tglobal_counter:[0x%x]\n", i0->global_counter); + printf("\ttotal_pages:[0x%x]\n", i0->total_pages); - printf("\tglobal_counter:[0x%x]\n", i1->global_counter); - printf("\ttotal_pages:[0x%x]\n", i1->total_pages); + printf("\tmajorversion:[0x%x]\n", i0->major_version); + printf("\tbuildversion:[0x%x]\n", i0->build_version); - printf("\tmajorversion:[0x%x]\n", i1->major_version); - printf("\tbuildversion:[0x%x]\n", i1->build_version); + printf("\tunknown7:[0x%x]\n", i0->unknown7); + printf("\tunknown8:[0x%x]\n", i0->unknown8); + printf("\tunknown9:[0x%x]\n", i0->unknown9); + printf("\tsession_counter:[0x%x]\n", i0->session_counter); + printf("\tunknown11:[0x%x]\n", i0->unknown11); + printf("\tprinter_errors:[0x%x]\n", i0->printer_errors); + printf("\tunknown13:[0x%x]\n", i0->unknown13); + printf("\tunknown14:[0x%x]\n", i0->unknown14); + printf("\tunknown15:[0x%x]\n", i0->unknown15); + printf("\tunknown16:[0x%x]\n", i0->unknown16); + printf("\tchange_id:[0x%x]\n", i0->change_id); + printf("\tunknown18:[0x%x]\n", i0->unknown18); + printf("\tstatus:[0x%x]\n", i0->status); + printf("\tunknown20:[0x%x]\n", i0->unknown20); + printf("\tc_setprinter:[0x%x]\n", i0->c_setprinter); + printf("\tunknown22:[0x%x]\n", i0->unknown22); + printf("\tunknown23:[0x%x]\n", i0->unknown23); + printf("\tunknown24:[0x%x]\n", i0->unknown24); + printf("\tunknown25:[0x%x]\n", i0->unknown25); + printf("\tunknown26:[0x%x]\n", i0->unknown26); + printf("\tunknown27:[0x%x]\n", i0->unknown27); + printf("\tunknown28:[0x%x]\n", i0->unknown28); + printf("\tunknown29:[0x%x]\n", i0->unknown29); - printf("\tunknown7:[0x%x]\n", i1->unknown7); - printf("\tunknown8:[0x%x]\n", i1->unknown8); - printf("\tunknown9:[0x%x]\n", i1->unknown9); - printf("\tsession_counter:[0x%x]\n", i1->session_counter); - printf("\tunknown11:[0x%x]\n", i1->unknown11); - printf("\tprinter_errors:[0x%x]\n", i1->printer_errors); - printf("\tunknown13:[0x%x]\n", i1->unknown13); - printf("\tunknown14:[0x%x]\n", i1->unknown14); - printf("\tunknown15:[0x%x]\n", i1->unknown15); - printf("\tunknown16:[0x%x]\n", i1->unknown16); - printf("\tchange_id:[0x%x]\n", i1->change_id); - printf("\tunknown18:[0x%x]\n", i1->unknown18); - printf("\tstatus:[0x%x]\n", i1->status); - printf("\tunknown20:[0x%x]\n", i1->unknown20); - printf("\tc_setprinter:[0x%x]\n", i1->c_setprinter); - printf("\tunknown22:[0x%x]\n", i1->unknown22); - printf("\tunknown23:[0x%x]\n", i1->unknown23); - printf("\tunknown24:[0x%x]\n", i1->unknown24); - printf("\tunknown25:[0x%x]\n", i1->unknown25); - printf("\tunknown26:[0x%x]\n", i1->unknown26); - printf("\tunknown27:[0x%x]\n", i1->unknown27); - printf("\tunknown28:[0x%x]\n", i1->unknown28); - printf("\tunknown29:[0x%x]\n", i1->unknown29); + printf("\n"); } /**************************************************************************** @@ -232,18 +191,28 @@ printer info level 1 display function ****************************************************************************/ static void display_print_info_1(PRINTER_INFO_1 *i1) { - fstring desc; - fstring name; - fstring comm; + fstring desc = ""; + fstring name = ""; + fstring comm = ""; - rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0, STR_TERMINATE); - rpcstr_pull(name, i1->name.buffer, sizeof(name), 0, STR_TERMINATE); - rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0, STR_TERMINATE); + if (i1->description.buffer) + rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0, + STR_TERMINATE); + + if (i1->name.buffer) + rpcstr_pull(name, i1->name.buffer, sizeof(name), 0, + STR_TERMINATE); + + if (i1->comment.buffer) + rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0, + STR_TERMINATE); printf("\tflags:[0x%x]\n", i1->flags); printf("\tname:[%s]\n", name); printf("\tdescription:[%s]\n", desc); - printf("\tcomment:[%s]\n\n", comm); + printf("\tcomment:[%s]\n", comm); + + printf("\n"); } /**************************************************************************** @@ -251,29 +220,50 @@ printer info level 2 display function ****************************************************************************/ static void display_print_info_2(PRINTER_INFO_2 *i2) { - fstring servername; - fstring printername; - fstring sharename; - fstring portname; - fstring drivername; - fstring comment; - fstring location; - fstring sepfile; - fstring printprocessor; - fstring datatype; - fstring parameters; + fstring servername = ""; + fstring printername = ""; + fstring sharename = ""; + fstring portname = ""; + fstring drivername = ""; + fstring comment = ""; + fstring location = ""; + fstring sepfile = ""; + fstring printprocessor = ""; + fstring datatype = ""; + fstring parameters = ""; - rpcstr_pull(servername, i2->servername.buffer,sizeof(servername), 0, STR_TERMINATE); - rpcstr_pull(printername, i2->printername.buffer,sizeof(printername), 0, STR_TERMINATE); - rpcstr_pull(sharename, i2->sharename.buffer,sizeof(sharename), 0, STR_TERMINATE); - rpcstr_pull(portname, i2->portname.buffer,sizeof(portname), 0, STR_TERMINATE); - rpcstr_pull(drivername, i2->drivername.buffer,sizeof(drivername), 0, STR_TERMINATE); - rpcstr_pull(comment, i2->comment.buffer,sizeof(comment), 0, STR_TERMINATE); - rpcstr_pull(location, i2->location.buffer,sizeof(location), 0, STR_TERMINATE); - rpcstr_pull(sepfile, i2->sepfile.buffer,sizeof(sepfile), 0, STR_TERMINATE); - rpcstr_pull(printprocessor, i2->printprocessor.buffer,sizeof(printprocessor), 0, STR_TERMINATE); - rpcstr_pull(datatype, i2->datatype.buffer,sizeof(datatype), 0, STR_TERMINATE); - rpcstr_pull(parameters, i2->parameters.buffer,sizeof(parameters), 0, STR_TERMINATE); + if (i2->servername.buffer) + rpcstr_pull(servername, i2->servername.buffer,sizeof(servername), 0, STR_TERMINATE); + + if (i2->printername.buffer) + rpcstr_pull(printername, i2->printername.buffer,sizeof(printername), 0, STR_TERMINATE); + + if (i2->sharename.buffer) + rpcstr_pull(sharename, i2->sharename.buffer,sizeof(sharename), 0, STR_TERMINATE); + + if (i2->portname.buffer) + rpcstr_pull(portname, i2->portname.buffer,sizeof(portname), 0, STR_TERMINATE); + + if (i2->drivername.buffer) + rpcstr_pull(drivername, i2->drivername.buffer,sizeof(drivername), 0, STR_TERMINATE); + + if (i2->comment.buffer) + rpcstr_pull(comment, i2->comment.buffer,sizeof(comment), 0, STR_TERMINATE); + + if (i2->location.buffer) + rpcstr_pull(location, i2->location.buffer,sizeof(location), 0, STR_TERMINATE); + + if (i2->sepfile.buffer) + rpcstr_pull(sepfile, i2->sepfile.buffer,sizeof(sepfile), 0, STR_TERMINATE); + + if (i2->printprocessor.buffer) + rpcstr_pull(printprocessor, i2->printprocessor.buffer,sizeof(printprocessor), 0, STR_TERMINATE); + + if (i2->datatype.buffer) + rpcstr_pull(datatype, i2->datatype.buffer,sizeof(datatype), 0, STR_TERMINATE); + + if (i2->parameters.buffer) + rpcstr_pull(parameters, i2->parameters.buffer,sizeof(parameters), 0, STR_TERMINATE); printf("\tservername:[%s]\n", servername); printf("\tprintername:[%s]\n", printername); @@ -295,7 +285,10 @@ static void display_print_info_2(PRINTER_INFO_2 *i2) printf("\tcjobs:[0x%x]\n", i2->cjobs); printf("\taverageppm:[0x%x]\n", i2->averageppm); - if (i2->secdesc) display_sec_desc(i2->secdesc); + if (i2->secdesc) + display_sec_desc(i2->secdesc); + + printf("\n"); } /**************************************************************************** @@ -306,6 +299,8 @@ static void display_print_info_3(PRINTER_INFO_3 *i3) printf("\tflags:[0x%x]\n", i3->flags); display_sec_desc(i3->secdesc); + + printf("\n"); } /* Enumerate printers */ @@ -314,11 +309,10 @@ static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR result; uint32 info_level = 1; PRINTER_INFO_CTR ctr; - int returned; - uint32 i = 0; + uint32 i = 0, num_printers, needed; if (argc > 2) { @@ -332,43 +326,48 @@ static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli, /* Enumerate printers -- Should we enumerate types other than PRINTER_ENUM_LOCAL? Maybe accept as a parameter? --jerry */ + ZERO_STRUCT(ctr); - result = cli_spoolss_enum_printers(cli, mem_ctx, PRINTER_ENUM_LOCAL, - info_level, &returned, &ctr); - if (NT_STATUS_IS_OK(result)) - { - if (!returned) - printf ("No Printers returned.\n"); + result = cli_spoolss_enum_printers( + cli, mem_ctx, 0, &needed, PRINTER_ENUM_LOCAL, + info_level, &num_printers, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_enum_printers( + cli, mem_ctx, needed, NULL, PRINTER_ENUM_LOCAL, + info_level, &num_printers, &ctr); + + if (W_ERROR_IS_OK(result)) { + + if (!num_printers) { + printf ("No printers returned.\n"); + goto done; + } + for (i = 0; i < num_printers; i++) { switch(info_level) { case 0: - for (i=0; iuser_name); /* get a printer handle */ - result = cli_spoolss_open_printer_ex( - cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, servername, + result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "", + MAXIMUM_ALLOWED_ACCESS, servername, user, &pol); - if (!NT_STATUS_IS_OK(result)) { + + if (!W_ERROR_IS_OK(result)) goto done; - } opened_hnd = True; /* Get printer info */ - result = cli_spoolss_getprinter(cli, mem_ctx, &pol, info_level, &ctr); - if (!NT_STATUS_IS_OK(result)) { + result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, &pol, info_level, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, info_level, &ctr); + + if (!W_ERROR_IS_OK(result)) goto done; - } + /* Modify the comment. */ init_unistr(&ctr.printers_2->comment, comment); @@ -503,14 +512,14 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli, ctr.printers_2->secdesc = NULL; result = cli_spoolss_setprinter(cli, mem_ctx, &pol, info_level, &ctr, 0); - if (NT_STATUS_IS_OK(result)) + if (W_ERROR_IS_OK(result)) printf("Success in setting comment.\n"); done: if (opened_hnd) cli_spoolss_close_printer(cli, mem_ctx, &pol); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /*********************************************************************** @@ -521,17 +530,17 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli, int argc, char **argv) { POLICY_HND pol; - NTSTATUS result; + WERROR result; uint32 info_level = 1; BOOL opened_hnd = False; PRINTER_INFO_CTR ctr; fstring printername, servername, user; + uint32 needed; if (argc == 1 || argc > 3) { printf("Usage: %s [level]\n", argv[0]); - return NT_STATUS_OK; } @@ -542,24 +551,31 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli, slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (servername); - fstrcpy (printername, argv[1]); + slprintf (printername, sizeof(fstring)-1, "%s\\%s", servername, argv[1]); fstrcpy (user, cli->user_name); /* get a printer handle */ - result = cli_spoolss_open_printer_ex( - cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, servername, - user, &pol); - if (!NT_STATUS_IS_OK(result)) { + + result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, + "", MAXIMUM_ALLOWED_ACCESS, + servername, user, &pol); + + if (!W_ERROR_IS_OK(result)) goto done; - } opened_hnd = True; /* Get printer info */ - result = cli_spoolss_getprinter(cli, mem_ctx, &pol, info_level, &ctr); - if (!NT_STATUS_IS_OK(result)) { + + result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, + &pol, info_level, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinter( + cli, mem_ctx, needed, NULL, &pol, info_level, &ctr); + + if (!W_ERROR_IS_OK(result)) goto done; - } /* Display printer info */ @@ -585,7 +601,7 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli, if (opened_hnd) cli_spoolss_close_printer(cli, mem_ctx, &pol); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /**************************************************************************** @@ -706,6 +722,7 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, int argc, char **argv) { POLICY_HND pol; + WERROR werror; NTSTATUS result; uint32 info_level = 3; BOOL opened_hnd = False; @@ -730,29 +747,40 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, info_level = atoi(argv[2]); /* Open a printer handle */ - result=cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "", - MAXIMUM_ALLOWED_ACCESS, servername, user, &pol); + + werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "", + PRINTER_ACCESS_USE, + servername, user, &pol); + + result = W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; + if (!NT_STATUS_IS_OK(result)) { - printf ("Error opening printer handle for %s!\n", printername); + printf("Error opening printer handle for %s!\n", printername); return result; } opened_hnd = True; /* loop through and print driver info level for each architecture */ - for (i=0; archi_table[i].long_archi!=NULL; i++) - { - result = cli_spoolss_getprinterdriver(cli, mem_ctx, &pol, info_level, + + for (i=0; archi_table[i].long_archi!=NULL; i++) { + uint32 needed; + + werror = cli_spoolss_getprinterdriver( + cli, mem_ctx, 0, &needed, &pol, info_level, + archi_table[i].long_archi, &ctr); + + if (W_ERROR_V(werror) == ERRinsufficientbuffer) + werror = cli_spoolss_getprinterdriver( + cli, mem_ctx, needed, NULL, &pol, info_level, archi_table[i].long_archi, &ctr); - if (!NT_STATUS_IS_OK(result)) { - continue; - } + if (!W_ERROR_IS_OK(werror)) + continue; printf ("\n[%s]\n", archi_table[i].long_archi); - switch (info_level) - { + switch (info_level) { case 1: display_print_driver_1 (ctr.info1); break; @@ -768,12 +796,12 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, } } - /* cleanup */ + /* Cleanup */ + if (opened_hnd) cli_spoolss_close_printer (cli, mem_ctx, &pol); - return result; - + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /*********************************************************************** @@ -783,10 +811,9 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_OK; + WERROR werror; uint32 info_level = 1; PRINTER_DRIVER_CTR ctr; - fstring servername; uint32 i, j, returned; @@ -796,9 +823,6 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, return NT_STATUS_OK; } - /* get the arguments need to open the printer handle */ - slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (servername); if (argc == 2) info_level = atoi(argv[1]); @@ -806,18 +830,23 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, /* loop through and print driver info level for each architecture */ for (i=0; archi_table[i].long_archi!=NULL; i++) { - returned = 0; - result = cli_spoolss_enumprinterdrivers (cli, mem_ctx, info_level, + uint32 needed; + + werror = cli_spoolss_enumprinterdrivers( + cli, mem_ctx, 0, &needed, info_level, + archi_table[i].long_archi, &returned, &ctr); + + if (W_ERROR_V(werror) == ERRinsufficientbuffer) + werror = cli_spoolss_enumprinterdrivers( + cli, mem_ctx, needed, NULL, info_level, archi_table[i].long_archi, &returned, &ctr); if (returned == 0) continue; - - if (!NT_STATUS_IS_OK(result)) - { - printf ("Error getting driver for environment [%s] - %s\n", - archi_table[i].long_archi, get_nt_error_msg(result)); + if (!W_ERROR_IS_OK(werror)) { + printf ("Error getting driver for environment [%s] - %d\n", + archi_table[i].long_archi, W_ERROR_V(werror)); continue; } @@ -846,7 +875,7 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, } } - return result; + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /**************************************************************************** @@ -870,32 +899,36 @@ static NTSTATUS cmd_spoolss_getdriverdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result; + WERROR result; fstring env; DRIVER_DIRECTORY_CTR ctr; + uint32 needed; - if (argc > 2) - { + if (argc > 2) { printf("Usage: %s [environment]\n", argv[0]); return NT_STATUS_OK; } - /* get the arguments need to open the printer handle */ + /* Get the arguments need to open the printer handle */ + if (argc == 2) fstrcpy (env, argv[1]); else fstrcpy (env, "Windows NT x86"); /* Get the directory. Only use Info level 1 */ - result = cli_spoolss_getprinterdriverdir (cli, mem_ctx, 1, env, &ctr); - if (!NT_STATUS_IS_OK(result)) { - return result; - } + result = cli_spoolss_getprinterdriverdir( + cli, mem_ctx, 0, &needed, 1, env, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinterdriverdir( + cli, mem_ctx, needed, NULL, 1, env, &ctr); - display_printdriverdir_1 (ctr.info1); + if (W_ERROR_IS_OK(result)) + display_printdriverdir_1(ctr.info1); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /******************************************************************************* @@ -1010,7 +1043,7 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result; + WERROR result; uint32 level = 3; PRINTER_DRIVER_CTR ctr; DRIVER_INFO_3 info3; @@ -1047,14 +1080,15 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, ctr.info3 = &info3; result = cli_spoolss_addprinterdriver (cli, mem_ctx, level, &ctr); - if (!NT_STATUS_IS_OK(result)) { - return result; - } - rpcstr_pull(driver_name, info3.name.buffer, sizeof(driver_name), 0, STR_TERMINATE); - printf ("Printer Driver %s successfully installed.\n", driver_name); + if (W_ERROR_IS_OK(result)) { + rpcstr_pull(driver_name, info3.name.buffer, + sizeof(driver_name), 0, STR_TERMINATE); + printf ("Printer Driver %s successfully installed.\n", + driver_name); + } - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } @@ -1062,7 +1096,7 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result; + WERROR result; uint32 level = 2; PRINTER_INFO_CTR ctr; PRINTER_INFO_2 info2; @@ -1108,13 +1142,11 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, ctr.printers_2 = &info2; result = cli_spoolss_addprinterex (cli, mem_ctx, level, &ctr); - if (!NT_STATUS_IS_OK(result)) { - return result; - } + if (W_ERROR_IS_OK(result)) printf ("Printer %s successfully installed.\n", argv[1]); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, @@ -1122,7 +1154,7 @@ static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, int argc, char **argv) { POLICY_HND pol; - NTSTATUS result; + WERROR result; uint32 level = 2; BOOL opened_hnd = False; PRINTER_INFO_CTR ctr; @@ -1130,6 +1162,7 @@ static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, fstring servername, printername, user; + uint32 needed; /* parse the command arguements */ if (argc != 3) @@ -1143,40 +1176,54 @@ static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, slprintf (printername, sizeof(fstring)-1, "%s\\%s", servername, argv[1]); fstrcpy (user, cli->user_name); - /* get a printer handle */ + /* Get a printer handle */ + result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "", - MAXIMUM_ALLOWED_ACCESS, servername, user, &pol); - if (!NT_STATUS_IS_OK(result)) { + MAXIMUM_ALLOWED_ACCESS, + servername, user, &pol); + + if (!W_ERROR_IS_OK(result)) goto done; - } opened_hnd = True; /* Get printer info */ + ZERO_STRUCT (info2); ctr.printers_2 = &info2; - result = cli_spoolss_getprinter(cli, mem_ctx, &pol, level, &ctr); - if (!NT_STATUS_IS_OK(result)) { + + result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, + &pol, level, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinter( + cli, mem_ctx, needed, NULL, &pol, level, &ctr); + + if (!W_ERROR_IS_OK(result)) { printf ("Unable to retrieve printer information!\n"); goto done; } - /* set the printer driver */ + /* Set the printer driver */ + init_unistr(&ctr.printers_2->drivername, argv[2]); + result = cli_spoolss_setprinter(cli, mem_ctx, &pol, level, &ctr, 0); - if (!NT_STATUS_IS_OK(result)) { - printf ("SetPrinter call failed!\n"); + + if (!W_ERROR_IS_OK(result)) { + printf("SetPrinter call failed!\n"); goto done;; } - printf ("Succesfully set %s to driver %s.\n", argv[1], argv[2]); + printf("Succesfully set %s to driver %s.\n", argv[1], argv[2]); done: - /* cleanup */ + /* Cleanup */ + if (opened_hnd) cli_spoolss_close_printer(cli, mem_ctx, &pol); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } @@ -1184,7 +1231,7 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR result; fstring servername; int i; @@ -1202,30 +1249,33 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, for (i=0; archi_table[i].long_archi; i++) { /* make the call to remove the driver */ - result = cli_spoolss_deleteprinterdriver(cli, mem_ctx, - archi_table[i].long_archi, argv[1]); - if (!NT_STATUS_IS_OK(result)) { - printf ("Failed to remove driver %s for arch [%s] - error %s!\n", - argv[1], archi_table[i].long_archi, get_nt_error_msg(result)); - } - else - printf ("Driver %s removed for arch [%s].\n", argv[1], archi_table[i].long_archi); + result = cli_spoolss_deleteprinterdriver( + cli, mem_ctx, archi_table[i].long_archi, argv[1]); + + if (!W_ERROR_IS_OK(result)) { + printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n", + argv[1], archi_table[i].long_archi, + W_ERROR_V(result)); + } else + printf ("Driver %s removed for arch [%s].\n", argv[1], + archi_table[i].long_archi); } - return NT_STATUS_OK; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR result; char *servername = NULL, *environment = NULL; fstring procdir; + uint32 needed; /* parse the command arguements */ - if (argc < 2 || argc > 3) { - printf ("Usage: %s [environment]\n", argv[0]); + if (argc > 2) { + printf ("Usage: %s [environment]\n", argv[0]); return NT_STATUS_OK; } @@ -1233,29 +1283,332 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, return NT_STATUS_NO_MEMORY; strupper(servername); - if (asprintf(&environment, "%s", (argc == 3) ? argv[2] : + if (asprintf(&environment, "%s", (argc == 2) ? argv[1] : PRINTER_DRIVER_ARCHITECTURE) < 0) { SAFE_FREE(servername); return NT_STATUS_NO_MEMORY; } result = cli_spoolss_getprintprocessordirectory( - cli, mem_ctx, servername, environment, procdir); + cli, mem_ctx, 0, &needed, servername, environment, procdir); - if (NT_STATUS_IS_OK(result)) - printf("%s", procdir); + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprintprocessordirectory( + cli, mem_ctx, needed, NULL, servername, environment, + procdir); + + if (W_ERROR_IS_OK(result)) + printf("%s\n", procdir); SAFE_FREE(servername); SAFE_FREE(environment); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + +/* Add a form */ + +static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND handle; + WERROR werror; + char *servername = NULL, *printername = NULL; + FORM form; + BOOL got_handle = False; + + /* Parse the command arguements */ + + if (argc != 3) { + printf ("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Get a printer handle */ + + asprintf(&servername, "\\\\%s", cli->desthost); + strupper(servername); + asprintf(&printername, "%s\\%s", servername, argv[1]); + + werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "", + MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &handle); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + got_handle = True; + + /* Dummy up some values for the form data */ + + form.flags = FORM_USER; + form.size_x = form.size_y = 100; + form.left = 0; + form.top = 10; + form.right = 20; + form.bottom = 30; + + init_unistr2(&form.name, argv[2], strlen(argv[2]) + 1); + + /* Add the form */ + + + werror = cli_spoolss_addform(cli, mem_ctx, &handle, 1, &form); + + done: + if (got_handle) + cli_spoolss_close_printer(cli, mem_ctx, &handle); + + SAFE_FREE(servername); + SAFE_FREE(printername); + + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + +/* Set a form */ + +static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND handle; + WERROR werror; + char *servername = NULL, *printername = NULL; + FORM form; + BOOL got_handle = False; + + /* Parse the command arguements */ + + if (argc != 3) { + printf ("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Get a printer handle */ + + asprintf(&servername, "\\\\%s", cli->desthost); + strupper(servername); + asprintf(&printername, "%s\\%s", servername, argv[1]); + + werror = cli_spoolss_open_printer_ex( + cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &handle); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + got_handle = True; + + /* Dummy up some values for the form data */ + + form.flags = FORM_PRINTER; + form.size_x = form.size_y = 100; + form.left = 0; + form.top = 1000; + form.right = 2000; + form.bottom = 3000; + + init_unistr2(&form.name, argv[2], strlen(argv[2]) + 1); + + /* Set the form */ + + werror = cli_spoolss_setform(cli, mem_ctx, &handle, 1, argv[2], &form); + + done: + if (got_handle) + cli_spoolss_close_printer(cli, mem_ctx, &handle); + + SAFE_FREE(servername); + SAFE_FREE(printername); + + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + +/* Get a form */ + +static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND handle; + WERROR werror; + char *servername = NULL, *printername = NULL; + FORM_1 form; + BOOL got_handle = False; + uint32 needed; + + /* Parse the command arguements */ + + if (argc != 3) { + printf ("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Get a printer handle */ + + asprintf(&servername, "\\\\%s", cli->desthost); + strupper(servername); + asprintf(&printername, "%s\\%s", servername, argv[1]); + + werror = cli_spoolss_open_printer_ex( + cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &handle); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + got_handle = True; + + /* Set the form */ + + werror = cli_spoolss_getform(cli, mem_ctx, 0, &needed, + &handle, argv[2], 1, &form); + + if (W_ERROR_V(werror) == ERRinsufficientbuffer) + werror = cli_spoolss_getform(cli, mem_ctx, needed, NULL, + &handle, argv[2], 1, &form); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + printf("width: %d\n", form.width); + printf("length: %d\n", form.length); + printf("left: %d\n", form.left); + printf("top: %d\n", form.top); + printf("right: %d\n", form.right); + printf("bottom: %d\n", form.bottom); + + done: + if (got_handle) + cli_spoolss_close_printer(cli, mem_ctx, &handle); + + SAFE_FREE(servername); + SAFE_FREE(printername); + + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + +/* Delete a form */ + +static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND handle; + WERROR werror; + char *servername = NULL, *printername = NULL; + BOOL got_handle = False; + + /* Parse the command arguements */ + + if (argc != 3) { + printf ("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Get a printer handle */ + + asprintf(&servername, "\\\\%s", cli->desthost); + strupper(servername); + asprintf(&printername, "%s\\%s", servername, argv[1]); + + werror = cli_spoolss_open_printer_ex( + cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &handle); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + got_handle = True; + + /* Delete the form */ + + werror = cli_spoolss_deleteform(cli, mem_ctx, &handle, argv[2]); + + done: + if (got_handle) + cli_spoolss_close_printer(cli, mem_ctx, &handle); + + SAFE_FREE(servername); + SAFE_FREE(printername); + + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + +/* Enumerate forms */ + +static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND handle; + WERROR werror; + char *servername = NULL, *printername = NULL; + BOOL got_handle = False; + uint32 needed, num_forms, level = 1, i; + FORM_1 *forms; + + /* Parse the command arguements */ + + if (argc != 2) { + printf ("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Get a printer handle */ + + asprintf(&servername, "\\\\%s", cli->desthost); + strupper(servername); + asprintf(&printername, "%s\\%s", servername, argv[1]); + + werror = cli_spoolss_open_printer_ex( + cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &handle); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + got_handle = True; + + /* Enumerate forms */ + + werror = cli_spoolss_enumforms( + cli, mem_ctx, 0, &needed, &handle, level, &num_forms, &forms); + + if (W_ERROR_V(werror) == ERRinsufficientbuffer) + werror = cli_spoolss_enumforms( + cli, mem_ctx, needed, NULL, &handle, level, + &num_forms, &forms); + + if (!W_ERROR_IS_OK(werror)) + goto done; + + /* Display output */ + + for (i = 0; i < num_forms; i++) { + fstring form_name; + + if (forms[i].name.buffer) + rpcstr_pull(form_name, forms[i].name.buffer, + sizeof(form_name), 0, STR_TERMINATE); + + printf("%s\n", form_name); + } + + done: + if (got_handle) + cli_spoolss_close_printer(cli, mem_ctx, &handle); + + SAFE_FREE(servername); + SAFE_FREE(printername); + + return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, char **argv) { - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + WERROR result; + uint32 needed; fstring servername, printername, user; POLICY_HND pol; BOOL opened_hnd = False; @@ -1275,46 +1628,52 @@ static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli, /* get a printer handle */ result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "", - MAXIMUM_ALLOWED_ACCESS, servername, user, &pol); - if (!NT_STATUS_IS_OK(result)) { + MAXIMUM_ALLOWED_ACCESS, servername, + user, &pol); + if (!W_ERROR_IS_OK(result)) goto done; - } opened_hnd = True; - printf("%s\n", timestring(True)); + result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, + &pol, 0, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, 0, &ctr); - result = cli_spoolss_getprinter(cli, mem_ctx, &pol, 0, &ctr); - info = ctr.printers_0; - if (!NT_STATUS_IS_OK(result)) { + if (!W_ERROR_IS_OK(result)) goto done; - } + + printf("%s\n", timestring(True)); printf("\tchange_id (before set)\t:[0x%x]\n", info->change_id); - /* Get printer info */ + /* Set the printer data */ + result = cli_spoolss_setprinterdata(cli, mem_ctx, &pol, argv[2], argv[3]); - if (!NT_STATUS_IS_OK(result)) { + if (!W_ERROR_IS_OK(result)) { printf ("Unable to set [%s=%s]!\n", argv[2], argv[3]); goto done; } printf("\tSetPrinterData succeeded [%s: %s]\n", argv[2], argv[3]); - result = cli_spoolss_getprinter(cli, mem_ctx, &pol, 0, &ctr); - info = ctr.printers_0; - if (!NT_STATUS_IS_OK(result)) { + result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, &pol, 0, &ctr); + + if (W_ERROR_V(result) == ERRinsufficientbuffer) + result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, 0, &ctr); + + if (!W_ERROR_IS_OK(result)) goto done; - } - printf("\tchange_id (after set)\t:[0x%x]\n", info->change_id); + printf("%s\n", timestring(True)); - + printf("\tchange_id (after set)\t:[0x%x]\n", info->change_id); done: /* cleanup */ if (opened_hnd) cli_spoolss_close_printer(cli, mem_ctx, &pol); - return result; + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /* List of commands exported by this module */ @@ -1337,6 +1696,12 @@ struct cmd_set spoolss_commands[] = { { "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" }, { "openprinter", cmd_spoolss_open_printer_ex, PIPE_SPOOLSS, "Open printer handle", "" }, { "setdriver", cmd_spoolss_setdriver, PIPE_SPOOLSS, "Set printer driver", "" }, + { "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" }, + { "addform", cmd_spoolss_addform, PIPE_SPOOLSS, "Add form", "" }, + { "setform", cmd_spoolss_setform, PIPE_SPOOLSS, "Set form", "" }, + { "getform", cmd_spoolss_getform, PIPE_SPOOLSS, "Get form", "" }, + { "deleteform", cmd_spoolss_deleteform, PIPE_SPOOLSS, "Delete form", "" }, + { "enumforms", cmd_spoolss_enum_forms, PIPE_SPOOLSS, "Enumerate forms", "" }, { "setprinter", cmd_spoolss_setprinter, PIPE_SPOOLSS, "Set printer comment", "" }, { "setprinterdata", cmd_spoolss_setprinterdata, PIPE_SPOOLSS, "Set REG_SZ printer data", "" }, diff --git a/source/rpcclient/display_sec.c b/source/rpcclient/display_sec.c index a428a956863..5c23bf42ffa 100644 --- a/source/rpcclient/display_sec.c +++ b/source/rpcclient/display_sec.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Andrew Tridgell 1992-1999 Copyright (C) Luke Kenneth Casson Leighton 1996 - 1999 @@ -27,63 +26,36 @@ /**************************************************************************** convert a security permissions into a string ****************************************************************************/ -static const char *get_sec_mask_str(uint32 type) +char *get_sec_mask_str(uint32 type) { - static fstring typestr; - int i; - - switch (type) - { - case SEC_RIGHTS_FULL_CONTROL: - { - fstrcpy(typestr, "Full Control"); - return typestr; - } - - case SEC_RIGHTS_READ: - { - fstrcpy(typestr, "Read"); - return typestr; - } - default: - { - break; - } - } + static fstring typestr=""; typestr[0] = 0; - for (i = 0; i < 32; i++) - { - if (type & (1 << i)) - { - switch (1 << i) - { - case SEC_RIGHTS_QUERY_VALUE : fstrcat(typestr, "Query " ); break; - case SEC_RIGHTS_SET_VALUE : fstrcat(typestr, "Set " ); break; - case SEC_RIGHTS_CREATE_SUBKEY : fstrcat(typestr, "Create "); break; - case SEC_RIGHTS_ENUM_SUBKEYS : fstrcat(typestr, "Enum "); break; - case SEC_RIGHTS_NOTIFY : fstrcat(typestr, "Notify "); break; - case SEC_RIGHTS_CREATE_LINK : fstrcat(typestr, "CreateLink "); break; - case DELETE_ACCESS : fstrcat(typestr, "Delete "); break; - case READ_CONTROL_ACCESS : fstrcat(typestr, "ReadControl "); break; - case WRITE_DAC_ACCESS : fstrcat(typestr, "WriteDAC "); break; - case WRITE_OWNER_ACCESS : fstrcat(typestr, "WriteOwner "); break; - } - type &= ~(1 << i); - } - } - - /* remaining bits get added on as-is */ - if (type != 0) - { - fstring tmp; - slprintf(tmp, sizeof(tmp)-1, "[%08x]", type); - fstrcat(typestr, tmp); - } - /* remove last space */ - i = strlen(typestr)-1; - if (typestr[i] == ' ') typestr[i] = 0; + if (type & GENERIC_ALL_ACCESS) + fstrcat(typestr, "Generic all access "); + if (type & GENERIC_EXECUTE_ACCESS) + fstrcat(typestr, "Generic execute access "); + if (type & GENERIC_WRITE_ACCESS) + fstrcat(typestr, "Generic write access "); + if (type & GENERIC_READ_ACCESS) + fstrcat(typestr, "Generic read access "); + if (type & MAXIMUM_ALLOWED_ACCESS) + fstrcat(typestr, "MAXIMUM_ALLOWED_ACCESS "); + if (type & SYSTEM_SECURITY_ACCESS) + fstrcat(typestr, "SYSTEM_SECURITY_ACCESS "); + if (type & SYNCHRONIZE_ACCESS) + fstrcat(typestr, "SYNCHRONIZE_ACCESS "); + if (type & WRITE_OWNER_ACCESS) + fstrcat(typestr, "WRITE_OWNER_ACCESS "); + if (type & WRITE_DAC_ACCESS) + fstrcat(typestr, "WRITE_DAC_ACCESS "); + if (type & READ_CONTROL_ACCESS) + fstrcat(typestr, "READ_CONTROL_ACCESS "); + if (type & DELETE_ACCESS) + fstrcat(typestr, "DELETE_ACCESS "); + + printf("\t\tSpecific bits: 0x%lx\n", type&SPECIFIC_RIGHTS_MASK); return typestr; } @@ -91,152 +63,83 @@ static const char *get_sec_mask_str(uint32 type) /**************************************************************************** display sec_access structure ****************************************************************************/ -static void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *const info) +void display_sec_access(SEC_ACCESS *info) { - switch (action) - { - case ACTION_HEADER: - { - break; - } - case ACTION_ENUMERATE: - { - report(out_hnd, "\t\tPermissions:\t%s\n", - get_sec_mask_str(info->mask)); - } - case ACTION_FOOTER: - { - break; - } - } + printf("\t\tPermissions: 0x%x: %s\n", info->mask, get_sec_mask_str(info->mask)); } /**************************************************************************** display sec_ace structure ****************************************************************************/ -static void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *const ace) +void display_sec_ace(SEC_ACE *ace) { - switch (action) - { - case ACTION_HEADER: - { - report(out_hnd, "\tACE\n"); + fstring sid_str; + + printf("\tACE\n\t\ttype: "); + switch (ace->type) { + case SEC_ACE_TYPE_ACCESS_ALLOWED: + printf("ACCESS ALLOWED"); + break; + case SEC_ACE_TYPE_ACCESS_DENIED: + printf("ACCESS DENIED"); break; - } - case ACTION_ENUMERATE: - { - fstring sid_str; - - report(out_hnd, - "\t\tType:%2x Flags:%2x Perms:%04x\n", - ace->type, ace->flags, - (uint32) ace->info.mask); - - display_sec_access(out_hnd, ACTION_HEADER , &ace->info); - display_sec_access(out_hnd, ACTION_ENUMERATE, &ace->info); - display_sec_access(out_hnd, ACTION_FOOTER , &ace->info); - - sid_to_string(sid_str, &ace->sid); - report(out_hnd, "\t\tSID:\t%s\n", sid_str); - } - case ACTION_FOOTER: - { + case SEC_ACE_TYPE_SYSTEM_AUDIT: + printf("SYSTEM AUDIT"); + break; + case SEC_ACE_TYPE_SYSTEM_ALARM: + printf("SYSTEM ALARM"); + break; + default: + printf("????"); break; - } } + printf(" (%d) flags: %d\n", ace->type, ace->flags); + display_sec_access(&ace->info); + sid_to_string(sid_str, &ace->trustee); + printf("\t\tSID: %s\n\n", sid_str); } /**************************************************************************** display sec_acl structure ****************************************************************************/ -static void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *const sec_acl) +void display_sec_acl(SEC_ACL *sec_acl) { - if (sec_acl == NULL) - { - return; - } - switch (action) - { - case ACTION_HEADER: - { - report(out_hnd, "\tACL\tNum ACEs:\t%d\trevision:\t%x\n", + int i; + + printf("\tACL\tNum ACEs:\t%d\trevision:\t%x\n", sec_acl->num_aces, sec_acl->revision); - report(out_hnd, "\t---\n"); + printf("\t---\n"); - break; - } - case ACTION_ENUMERATE: - { - if (sec_acl->size != 0 && sec_acl->num_aces != 0) - { - int i; - for (i = 0; i < sec_acl->num_aces; i++) - { - display_sec_ace(out_hnd, ACTION_HEADER , &sec_acl->ace[i]); - display_sec_ace(out_hnd, ACTION_ENUMERATE, &sec_acl->ace[i]); - display_sec_ace(out_hnd, ACTION_FOOTER , &sec_acl->ace[i]); - } - } + if (sec_acl->size != 0 && sec_acl->num_aces != 0) + for (i = 0; i < sec_acl->num_aces; i++) + display_sec_ace(&sec_acl->ace[i]); - break; - } - case ACTION_FOOTER: - { - report(out_hnd, "\n"); - break; - } - } } /**************************************************************************** display sec_desc structure ****************************************************************************/ -void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *const sec) +void display_sec_desc(SEC_DESC *sec) { - switch (action) - { - case ACTION_HEADER: - { - report(out_hnd, "\tSecurity Descriptor\trevision:\t%x\ttype:\t%x\n", - sec->revision, sec->type); - report(out_hnd, "\t-------------------\n"); + fstring sid_str; - break; - } - case ACTION_ENUMERATE: - { - fstring sid_str; - - if (sec->off_sacl != 0) - { - display_sec_acl(out_hnd, ACTION_HEADER , sec->sacl); - display_sec_acl(out_hnd, ACTION_ENUMERATE, sec->sacl); - display_sec_acl(out_hnd, ACTION_FOOTER , sec->sacl); - } - if (sec->off_dacl != 0) - { - display_sec_acl(out_hnd, ACTION_HEADER , sec->dacl); - display_sec_acl(out_hnd, ACTION_ENUMERATE, sec->dacl); - display_sec_acl(out_hnd, ACTION_FOOTER , sec->dacl); - } - if (sec->off_owner_sid != 0) - { - sid_to_string(sid_str, sec->owner_sid); - report(out_hnd, "\tOwner SID:\t%s\n", sid_str); - } - if (sec->off_grp_sid != 0) - { - sid_to_string(sid_str, sec->grp_sid); - report(out_hnd, "\tParent SID:\t%s\n", sid_str); - } - - break; - } - case ACTION_FOOTER: - { - report(out_hnd, "\n"); - break; - } + if (sec->sacl) { + printf("SACL\n"); + display_sec_acl(sec->sacl); + } + + if (sec->dacl) { + printf("DACL\n"); + display_sec_acl(sec->dacl); } -} + if (sec->owner_sid) { + sid_to_string(sid_str, sec->owner_sid); + printf("\tOwner SID:\t%s\n", sid_str); + } + + if (sec->grp_sid) { + sid_to_string(sid_str, sec->grp_sid); + printf("\tParent SID:\t%s\n", sid_str); + } +} diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 4907372c8a6..9c996d14ac1 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -248,27 +248,6 @@ void fetch_machine_sid(struct cli_state *cli) exit(1); } -/* Initialise client credentials for authenticated pipe access */ - -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password) -{ - ZERO_STRUCTP(creds); - - if (lp_encrypted_passwords()) { - pwd_make_lm_nt_16(&creds->pwd, password); - } else { - pwd_set_cleartext(&creds->pwd, password); - } - - fstrcpy(creds->user_name, username); - fstrcpy(creds->domain, domain); - - if (! *username) { - creds->pwd.null_pwd = True; - } -} - /* Display help on commands */ @@ -439,14 +418,14 @@ static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry, /* Create argument list */ argv = (char **)malloc(sizeof(char *) * argc); + memset(argv, 0, sizeof(char *) * argc); + if (!argv) { fprintf(stderr, "out of memory\n"); result = NT_STATUS_NO_MEMORY; goto done; } - memset(argv, 0, sizeof(char *) * argc); - p = cmd; argc = 0; @@ -556,52 +535,11 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) return result; } -/************************************************************************/ -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds) -{ - struct in_addr dest_ip; - struct nmb_name calling, called; - fstring dest_host; - extern pstring global_myname; - struct ntuser_creds anon; - - /* Initialise cli_state information */ - if (!cli_initialise(cli)) { - return NULL; - } - - if (!creds) { - ZERO_STRUCT(anon); - anon.pwd.null_pwd = 1; - creds = &anon; - } - - cli_init_creds(cli, creds); - - /* Establish a SMB connection */ - if (!resolve_srv_name(system_name, dest_host, &dest_ip)) { - fprintf(stderr, "Could not resolve %s\n", dest_host); - return NULL; - } - - make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20); - make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0); - - if (!cli_establish_connection(cli, dest_host, &dest_ip, &calling, - &called, "IPC$", "IPC", False, True)) { - fprintf(stderr, "Error establishing IPC$ connection\n"); - return NULL; - } - - return cli; -} - /* Print usage information */ static void usage(void) { - printf("Usage: rpcclient [options] server\n"); + printf("Usage: rpcclient server [options]\n"); printf("\t-A authfile file containing user credentials\n"); printf("\t-c \"command string\" execute semicolon separated cmds\n"); @@ -617,7 +555,7 @@ static void usage(void) /* Main function */ - int main(int argc, char *argv[]) +int main(int argc, char *argv[]) { extern char *optarg; extern int optind; @@ -628,14 +566,15 @@ static void usage(void) int olddebug; pstring cmdstr = "", servicesf = CONFIGFILE; - struct ntuser_creds creds; - struct cli_state cli; fstring password, username, domain, server; + struct cli_state *cli; pstring logfile; struct cmd_set **cmd_set; + struct in_addr server_ip; + NTSTATUS nt_status; extern BOOL AllowDebugChange; setlinebuf(stdout); @@ -644,7 +583,8 @@ static void usage(void) AllowDebugChange = False; /* Parse options */ - if (argc == 0) { + + if (argc == 1) { usage(); return 0; } @@ -736,31 +676,40 @@ static void usage(void) get_myname((*global_myname)?NULL:global_myname); strupper(global_myname); + /* Resolve the IP address */ + + if (!resolve_name(server, &server_ip, 0x20)) { + DEBUG(1,("Unable to resolve %s\n", server)); + return 1; + } + /* - * initialize the credentials struct. Get password + * Get password * from stdin if necessary */ - if (!strlen(username) && !got_pass) - get_username(username); if (!got_pass) { - init_rpcclient_creds (&creds, username, domain, ""); - pwd_read(&creds.pwd, "Enter Password: ", lp_encrypted_passwords()); + char *pass = getpass("Password:"); + if (pass) { + fstrcpy(password, pass); } - else { - init_rpcclient_creds (&creds, username, domain, password); } - memset(password,'X',sizeof(password)); - /* open a connection to the specified server */ - ZERO_STRUCTP (&cli); - if (!setup_connection (&cli, server, &creds)) { + if (!strlen(username) && !got_pass) + get_username(username); + + nt_status = cli_full_connection(&cli, global_myname, server, + &server_ip, 0, + "IPC$", "IPC", + username, domain, + password, strlen(password)); + + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(1,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status))); return 1; } - /* There are no pointers in ntuser_creds struct so zero it out */ - - ZERO_STRUCTP (&creds); + memset(password,'X',sizeof(password)); /* Load command lists */ @@ -772,7 +721,7 @@ static void usage(void) cmd_set++; } - fetch_machine_sid(&cli); + fetch_machine_sid(cli); /* Do anything specified with -c */ if (cmdstr[0]) { @@ -780,10 +729,10 @@ static void usage(void) char *p = cmdstr; while((cmd=next_command(&p)) != NULL) { - printf("%s\n", cmd); - process_cmd(&cli, cmd); + process_cmd(cli, cmd); } + cli_shutdown(cli); return 0; } @@ -801,8 +750,9 @@ static void usage(void) break; if (line[0] != '\n') - process_cmd(&cli, line); + process_cmd(cli, line); } + cli_shutdown(cli); return 0; } -- cgit From f2a11e05ab5fc7e8325f1d396a03680b28364fc5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Apr 2002 03:43:47 +0000 Subject: make proto --- source/include/proto.h | 570 ++++++++++++++++++++++++++----------------------- 1 file changed, 304 insertions(+), 266 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 7aca60ec66e..81b3eb48ebf 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -3,12 +3,12 @@ /* This file is automatically generated with "make proto". DO NOT EDIT */ -/*The following definitions come from client/client.c */ +/* The following definitions come from client/client.c */ void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs); struct cli_state *do_connect(char *server, char *share); -/*The following definitions come from client/clitar.c */ +/* The following definitions come from client/clitar.c */ void cmd_block(void); void cmd_tarmode(void); @@ -17,13 +17,13 @@ void cmd_tar(void); int process_tar(void); int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind); -/*The following definitions come from lib/access.c */ +/* The following definitions come from lib/access.c */ BOOL allow_access(char *deny_list,char *allow_list, char *cname,char *caddr); BOOL check_access(int sock, char *allow_list, char *deny_list); -/*The following definitions come from lib/bitmap.c */ +/* The following definitions come from lib/bitmap.c */ struct bitmap *bitmap_allocate(int n); void bitmap_free(struct bitmap *bm); @@ -32,7 +32,7 @@ BOOL bitmap_clear(struct bitmap *bm, unsigned i); BOOL bitmap_query(struct bitmap *bm, unsigned i); int bitmap_find(struct bitmap *bm, unsigned ofs); -/*The following definitions come from lib/charcnv.c */ +/* The following definitions come from lib/charcnv.c */ char *unix2dos_format_static(const char *str); char *unix2dos_format(char *str); @@ -40,17 +40,17 @@ char *dos2unix_format_static(const char *str); char *dos2unix_format(char *str); void interpret_character_set(char *str, int codepage); -/*The following definitions come from lib/charset.c */ +/* The following definitions come from lib/charset.c */ void charset_initialise(void); void codepage_initialise(int client_codepage); void add_char_string(char *s); -/*The following definitions come from lib/crc32.c */ +/* The following definitions come from lib/crc32.c */ uint32 crc32_calc_buffer( char *buffer, uint32 count); -/*The following definitions come from lib/debug.c */ +/* The following definitions come from lib/debug.c */ char* debug_classname_from_index(int ndx); int debug_lookup_classname(char* classname); @@ -66,29 +66,29 @@ void check_log_size( void ); void dbgflush( void ); BOOL dbghdr( int level, char *file, char *func, int line ); -/*The following definitions come from lib/error.c */ +/* The following definitions come from lib/error.c */ NTSTATUS map_nt_error_from_unix(int unix_error); -/*The following definitions come from lib/fault.c */ +/* The following definitions come from lib/fault.c */ void fault_setup(void (*fn)(void *)); -/*The following definitions come from lib/fsusage.c */ +/* The following definitions come from lib/fsusage.c */ int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -/*The following definitions come from lib/genrand.c */ +/* The following definitions come from lib/genrand.c */ void set_rand_reseed_data(unsigned char *data, size_t len); void generate_random_buffer( unsigned char *out, int len, BOOL do_reseed_now); char *generate_random_str(size_t len); -/*The following definitions come from lib/getsmbpass.c */ +/* The following definitions come from lib/getsmbpass.c */ char *getsmbpass(char *prompt) ; -/*The following definitions come from lib/hash.c */ +/* The following definitions come from lib/hash.c */ BOOL hash_table_init(hash_table *table, int num_buckets, compare_function compare_func); hash_element *hash_lookup(hash_table *table, char *key); @@ -96,7 +96,7 @@ hash_element *hash_insert(hash_table *table, char *value, char *key); void hash_remove(hash_table *table, hash_element *hash_elem); void hash_clear(hash_table *table); -/*The following definitions come from lib/interface.c */ +/* The following definitions come from lib/interface.c */ void load_interfaces(void); BOOL interfaces_changed(void); @@ -111,20 +111,20 @@ unsigned iface_hash(void); struct in_addr *iface_bcast(struct in_addr ip); struct in_addr *iface_ip(struct in_addr ip); -/*The following definitions come from lib/interfaces.c */ +/* The following definitions come from lib/interfaces.c */ int get_interfaces(struct iface_struct *ifaces, int max_interfaces); -/*The following definitions come from lib/kanji.c */ +/* The following definitions come from lib/kanji.c */ void interpret_coding_system(char *str); void initialize_multibyte_vectors( int client_codepage); -/*The following definitions come from lib/md4.c */ +/* The following definitions come from lib/md4.c */ void mdfour(unsigned char *out, unsigned char *in, int n); -/*The following definitions come from lib/messages.c */ +/* The following definitions come from lib/messages.c */ void ping_message(int msg_type, pid_t src, void *buf, size_t len); void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len); @@ -142,46 +142,46 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, BOOL message_named_mutex(char *name, unsigned int timeout); void message_named_mutex_release(char *name); -/*The following definitions come from lib/ms_fnmatch.c */ +/* The following definitions come from lib/ms_fnmatch.c */ int ms_fnmatch(const char *pattern, const char *string); -/*The following definitions come from lib/pam_errors.c */ +/* The following definitions come from lib/pam_errors.c */ NTSTATUS pam_to_nt_status(int pam_error); int nt_status_to_pam(NTSTATUS nt_status); NTSTATUS pam_to_nt_status(int pam_error); int nt_status_to_pam(NTSTATUS nt_status); -/*The following definitions come from lib/pidfile.c */ +/* The following definitions come from lib/pidfile.c */ pid_t pidfile_pid(char *name); void pidfile_create(char *name); -/*The following definitions come from lib/readline.c */ +/* The following definitions come from lib/readline.c */ char *smb_readline(char *prompt, void (*callback)(void), char **(completion_fn)(const char *text, int start, int end)); void cmd_history(void); -/*The following definitions come from lib/replace.c */ +/* The following definitions come from lib/replace.c */ char *rep_inet_ntoa(struct in_addr ip); -/*The following definitions come from lib/select.c */ +/* The following definitions come from lib/select.c */ void sys_select_signal(void); int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); -/*The following definitions come from lib/signal.c */ +/* The following definitions come from lib/signal.c */ void BlockSignals(BOOL block,int signum); void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/*The following definitions come from libsmb/cliconnect.c */ +/* The following definitions come from libsmb/cliconnect.c */ BOOL cli_session_setup(struct cli_state *cli, char *user, @@ -211,7 +211,7 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, struct in_addr *pdest_ip); -/*The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from libsmb/cli_dfs.c */ struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); @@ -228,7 +228,7 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 info_level, DFS_INFO_CTR *ctr); -/*The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from libsmb/clidgram.c */ int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, char *buf, int len, @@ -240,7 +240,7 @@ int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int int cli_get_backup_list(const char *myname, const char *send_to_name); int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/*The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from libsmb/clientgen.c */ int cli_set_port(struct cli_state *cli, int port); BOOL cli_receive_smb(struct cli_state *cli); @@ -253,7 +253,7 @@ void cli_shutdown(struct cli_state *cli); void cli_sockopt(struct cli_state *cli, char *options); uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/*The following definitions come from libsmb/clierror.c */ +/* The following definitions come from libsmb/clierror.c */ char *cli_errstr(struct cli_state *cli); NTSTATUS cli_nt_error(struct cli_state *cli); @@ -265,7 +265,7 @@ BOOL cli_is_error(struct cli_state *cli); BOOL cli_is_nt_error(struct cli_state *cli); BOOL cli_is_dos_error(struct cli_state *cli); -/*The following definitions come from libsmb/clifile.c */ +/* The following definitions come from libsmb/clifile.c */ uint32 unix_perms_to_wire(mode_t perms); BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); @@ -301,7 +301,7 @@ BOOL cli_chkpath(struct cli_state *cli, const char *path); BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/*The following definitions come from libsmb/clilist.c */ +/* The following definitions come from libsmb/clilist.c */ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, void (*fn)(file_info *, const char *, void *), void *state); @@ -310,7 +310,7 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, void (*fn)(file_info *, const char *, void *), void *state); -/*The following definitions come from libsmb/cli_lsarpc.c */ +/* The following definitions come from libsmb/cli_lsarpc.c */ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); @@ -344,14 +344,14 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 *num_sids, DOM_SID **sids); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/*The following definitions come from libsmb/climessage.c */ +/* The following definitions come from libsmb/climessage.c */ BOOL cli_message_start(struct cli_state *cli, char *host, char *username, int *grp); BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); BOOL cli_message_end(struct cli_state *cli, int grp); -/*The following definitions come from libsmb/cli_netlogon.c */ +/* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, char *system_name, @@ -383,26 +383,26 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); -/*The following definitions come from libsmb/clioplock.c */ +/* The following definitions come from libsmb/clioplock.c */ BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); void cli_oplock_handler(struct cli_state *cli, BOOL (*handler)(struct cli_state *, int, unsigned char)); -/*The following definitions come from libsmb/cli_pipe_util.c */ +/* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, char *pipe_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/*The following definitions come from libsmb/cliprint.c */ +/* The following definitions come from libsmb/cliprint.c */ int cli_print_queue(struct cli_state *cli, void (*fn)(struct print_job_info *)); int cli_printjob_del(struct cli_state *cli, int job); -/*The following definitions come from libsmb/clirap.c */ +/* The following definitions come from libsmb/clirap.c */ BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, uint16 *setup, uint32 setup_count, uint32 max_setup_count, @@ -436,7 +436,7 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum, BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/*The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from libsmb/clireadwrite.c */ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); @@ -446,7 +446,7 @@ ssize_t cli_write(struct cli_state *cli, ssize_t cli_smbwrite(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size1); -/*The following definitions come from libsmb/cli_reg.c */ +/* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, char *system_name, @@ -455,7 +455,7 @@ NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, const char *msg, uint32 timeout, uint16 flags); NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); -/*The following definitions come from libsmb/cli_samr.c */ +/* The following definitions come from libsmb/cli_samr.c */ struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); @@ -524,51 +524,84 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); -/*The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from libsmb/clisecdesc.c */ SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, TALLOC_CTX *mem_ctx); BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/*The following definitions come from libsmb/cli_spoolss.c */ +/* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); -NTSTATUS cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *printername, char *datatype, uint32 access_required, char *station, char *username, POLICY_HND *pol); -NTSTATUS cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol); -NTSTATUS cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 flags, uint32 level, int *returned, PRINTER_INFO_CTR *ctr); -NTSTATUS cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, - int *returned, PORT_INFO_CTR *ctr); -NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr); -NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr, - uint32 command); -NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, char* env, - PRINTER_DRIVER_CTR *ctr); -NTSTATUS cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, char* env, uint32 *returned, +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr); +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr, uint32 command); +WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + char *env, PRINTER_DRIVER_CTR *ctr); +WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + uint32 *num_drivers, PRINTER_DRIVER_CTR *ctr); -NTSTATUS cli_spoolss_getprinterdriverdir (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, char* env, DRIVER_DIRECTORY_CTR *ctr); -NTSTATUS cli_spoolss_addprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, PRINTER_DRIVER_CTR *ctr); -NTSTATUS cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, PRINTER_INFO_CTR *ctr); -NTSTATUS cli_spoolss_deleteprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *arch, char *driver); -NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *name, char *environment, fstring procdir); -NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + DRIVER_DIRECTORY_CTR *ctr); +WERROR cli_spoolss_addprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, uint32 level, + PRINTER_DRIVER_CTR *ctr); +WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR*ctr); +WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, char *arch, + char *driver); +WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + char *name, char *environment, + fstring procdir); +WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, FORM *form); +WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, char *form_name, + FORM *form); +WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, char *formname, uint32 level, + FORM_1 *form); +WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, char *form_name); +WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, int level, uint32 *num_forms, + FORM_1 **forms); +WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, char* valname, char* value); -/*The following definitions come from libsmb/cli_srvsvc.c */ +/* The following definitions come from libsmb/cli_srvsvc.c */ struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, char *system_name, @@ -577,14 +610,14 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/*The following definitions come from libsmb/clistr.c */ +/* The following definitions come from libsmb/clistr.c */ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); int clistr_align_out(struct cli_state *cli, const void *p, int flags); int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/*The following definitions come from libsmb/clitrans.c */ +/* The following definitions come from libsmb/clitrans.c */ BOOL cli_send_trans(struct cli_state *cli, int trans, const char *pipe_name, @@ -605,7 +638,7 @@ BOOL cli_receive_nt_trans(struct cli_state *cli, char **param, int *param_len, char **data, int *data_len); -/*The following definitions come from libsmb/credentials.c */ +/* The following definitions come from libsmb/credentials.c */ char *credstr(const uchar *cred); void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, @@ -620,14 +653,14 @@ BOOL deal_with_creds(uchar sess_key[8], DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/*The following definitions come from libsmb/errormap.c */ +/* The following definitions come from libsmb/errormap.c */ NTSTATUS dos_to_ntstatus(int eclass, int ecode); void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); NTSTATUS werror_to_ntstatus(WERROR error); WERROR ntstatus_to_werror(NTSTATUS error); -/*The following definitions come from libsmb/namequery.c */ +/* The following definitions come from libsmb/namequery.c */ struct node_status *node_status_query(int fd,struct nmb_name *name, struct in_addr to_ip, int *num_names); @@ -654,7 +687,7 @@ BOOL lookup_dc_name(const char *srcname, const char *domain, BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); BOOL get_lmb_list(struct in_addr **ip_list, int *count); -/*The following definitions come from libsmb/nmblib.c */ +/* The following definitions come from libsmb/nmblib.c */ void debug_nmb_packet(struct packet_struct *p); char *nmb_namestr(struct nmb_name *n); @@ -677,19 +710,19 @@ int name_mangle( char *In, char *Out, char name_type ); int name_extract(char *buf,int ofs,char *name); int name_len(char *s1); -/*The following definitions come from libsmb/nterr.c */ +/* The following definitions come from libsmb/nterr.c */ char *get_nt_error_msg(NTSTATUS nt_code); char *nt_errstr(NTSTATUS nt_code); char *get_nt_error_c_code(NTSTATUS nt_code); -/*The following definitions come from libsmb/passchange.c */ +/* The following definitions come from libsmb/passchange.c */ BOOL remote_password_change(const char *remote_machine, const char *user_name, const char *old_passwd, const char *new_passwd, char *err_str, size_t err_str_len); -/*The following definitions come from libsmb/pwd_cache.c */ +/* The following definitions come from libsmb/pwd_cache.c */ void pwd_init(struct pwd_info *pwd); BOOL pwd_is_nullpwd(const struct pwd_info *pwd); @@ -704,11 +737,11 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/*The following definitions come from lib/smbrun.c */ +/* The following definitions come from lib/smbrun.c */ int smbrun(char *cmd, int *outfd); -/*The following definitions come from libsmb/smbdes.c */ +/* The following definitions come from libsmb/smbdes.c */ void E_P16(const unsigned char *p14,unsigned char *p16); void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); @@ -720,7 +753,7 @@ void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, void SamOEMhash( unsigned char *data, const unsigned char *key, int val); void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/*The following definitions come from libsmb/smbencrypt.c */ +/* The following definitions come from libsmb/smbencrypt.c */ void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); void E_md4hash(const uchar *passwd, uchar *p16); @@ -736,7 +769,7 @@ BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, uchar nt_p16[16], uchar p16[16]); void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/*The following definitions come from libsmb/smberr.c */ +/* The following definitions come from libsmb/smberr.c */ char *smb_dos_err_name(uint8 class, uint16 num); char *get_dos_error_msg(WERROR result); @@ -745,17 +778,17 @@ char *smb_dos_errstr(char *inbuf); char *werror_str(WERROR status); WERROR map_werror_from_unix(int error); -/*The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from libsmb/unexpected.c */ void unexpected_packet(struct packet_struct *p); void clear_unexpected(time_t t); struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, char *mailslot_name); -/*The following definitions come from lib/snprintf.c */ +/* The following definitions come from lib/snprintf.c */ -/*The following definitions come from lib/substitute.c */ +/* The following definitions come from lib/substitute.c */ void standard_sub_basic(char *str); void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); @@ -765,7 +798,7 @@ void standard_sub_snum(int snum, char *str); void standard_sub_vuser(char *str, user_struct *vuser); void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/*The following definitions come from lib/sysacls.c */ +/* The following definitions come from lib/sysacls.c */ int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); @@ -922,7 +955,7 @@ int sys_acl_delete_def_file(const char *name); int sys_acl_free_acl(SMB_ACL_T the_acl) ; int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/*The following definitions come from lib/system.c */ +/* The following definitions come from lib/system.c */ int sys_usleep(long usecs); int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); @@ -976,7 +1009,7 @@ int sys_dlclose (void *handle); const char *sys_dlerror(void); void sys_adminlog(int priority, const char *format_str, ...); -/*The following definitions come from lib/talloc.c */ +/* The following definitions come from lib/talloc.c */ TALLOC_CTX *talloc_init(void); void *talloc(TALLOC_CTX *t, size_t size); @@ -993,7 +1026,7 @@ void talloc_get_allocation(TALLOC_CTX *t, size_t *total_bytes, int *n_chunks); -/*The following definitions come from lib/time.c */ +/* The following definitions come from lib/time.c */ time_t get_time_t_min(void); time_t get_time_t_max(void); @@ -1020,11 +1053,11 @@ char *timestring(BOOL hires); time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); void init_nt_time(NTTIME *nt); -/*The following definitions come from lib/ufc.c */ +/* The following definitions come from lib/ufc.c */ char *ufc_crypt(const char *key,const char *salt); -/*The following definitions come from lib/username.c */ +/* The following definitions come from lib/username.c */ BOOL name_is_local(const char *name); char *get_user_home_dir(char *user); @@ -1035,7 +1068,7 @@ BOOL user_in_group_list(char *user,char *gname); BOOL user_in_list(char *user,char *list); struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/*The following definitions come from lib/util.c */ +/* The following definitions come from lib/util.c */ char *tmpdir(void); BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); @@ -1117,7 +1150,7 @@ void data_blob_free(DATA_BLOB *d); void data_blob_clear(DATA_BLOB *d); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/*The following definitions come from lib/util_file.c */ +/* The following definitions come from lib/util_file.c */ BOOL do_file_lock(int fd, int waitsecs, int type); BOOL file_lock(int fd, int type, int secs, int *plock_depth); @@ -1138,7 +1171,7 @@ char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); void file_lines_free(char **lines); void file_lines_slashcont(char **lines); -/*The following definitions come from lib/util_getent.c */ +/* The following definitions come from lib/util_getent.c */ struct sys_grent * getgrent_list(void); void grent_free (struct sys_grent *glist); @@ -1147,7 +1180,7 @@ void pwent_free (struct sys_pwent *plist); struct sys_userlist *get_users_in_group(const char *gname); void free_userlist(struct sys_userlist *list_head); -/*The following definitions come from lib/util_seaccess.c */ +/* The following definitions come from lib/util_seaccess.c */ void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); @@ -1157,7 +1190,7 @@ BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, BOOL child_container); -/*The following definitions come from lib/util_sec.c */ +/* The following definitions come from lib/util_sec.c */ void sec_init(void); uid_t sec_initial_uid(void); @@ -1173,7 +1206,7 @@ int set_re_uid(void); void become_user_permanently(uid_t uid, gid_t gid); BOOL is_setuid_root(void) ; -/*The following definitions come from lib/util_sid.c */ +/* The following definitions come from lib/util_sid.c */ void generate_wellknown_sids(void); BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); @@ -1202,7 +1235,7 @@ size_t sid_size(DOM_SID *sid); BOOL non_mappable_sid(DOM_SID *sid); char *sid_binstring(DOM_SID *sid); -/*The following definitions come from lib/util_sock.c */ +/* The following definitions come from lib/util_sock.c */ BOOL is_a_socket(int fd); void set_socket_options(int fd, char *options); @@ -1230,7 +1263,7 @@ int create_pipe_sock(const char *socket_dir, mode_t dir_perms); int sock_exec(const char *prog); -/*The following definitions come from lib/util_str.c */ +/* The following definitions come from lib/util_str.c */ void set_first_token(char *ptr); BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); @@ -1271,7 +1304,7 @@ char *octal_string(int i); char *string_truncate(char *s, int length); char *binary_string(char *buf, int len); -/*The following definitions come from lib/util_unistr.c */ +/* The following definitions come from lib/util_unistr.c */ size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); @@ -1359,14 +1392,14 @@ smb_ucs2_t doscp2ucs2(int w); int ucs2doscp(smb_ucs2_t w); int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/*The following definitions come from lib/wins_srv.c */ +/* The following definitions come from lib/wins_srv.c */ BOOL wins_srv_load_list( char *src ); struct in_addr wins_srv_ip( void ); void wins_srv_died( struct in_addr boothill_ip ); unsigned long wins_srv_count( void ); -/*The following definitions come from locking/brlock.c */ +/* The following definitions come from locking/brlock.c */ void brl_init(int read_only); void brl_shutdown(int read_only); @@ -1384,7 +1417,7 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, void brl_close(SMB_DEV_T dev, SMB_INO_T ino, pid_t pid, int tid, int fnum); int brl_forall(BRLOCK_FN(fn)); -/*The following definitions come from locking/locking.c */ +/* The following definitions come from locking/locking.c */ BOOL is_locked(files_struct *fsp,connection_struct *conn, SMB_BIG_UINT count,SMB_BIG_UINT offset, @@ -1415,7 +1448,7 @@ BOOL downgrade_share_oplock(files_struct *fsp); BOOL modify_delete_flag( SMB_DEV_T dev, SMB_INO_T inode, BOOL delete_on_close); int share_mode_forall(SHAREMODE_FN(fn)); -/*The following definitions come from locking/posix.c */ +/* The following definitions come from locking/posix.c */ int fd_close_posix(struct connection_struct *conn, files_struct *fsp); BOOL is_posix_locked(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count, enum brl_type lock_type); @@ -1425,7 +1458,7 @@ void posix_locking_close_file(files_struct *fsp); BOOL posix_locking_init(int read_only); BOOL posix_locking_end(void); -/*The following definitions come from msdfs/msdfs.c */ +/* The following definitions come from msdfs/msdfs.c */ BOOL is_msdfs_link(connection_struct* conn, char* path, struct referral** reflistp, int* refcnt); @@ -1440,7 +1473,7 @@ BOOL create_msdfs_link(struct junction_map* jn, BOOL exists); BOOL remove_msdfs_link(struct junction_map* jn); int enum_msdfs_links(struct junction_map* jn); -/*The following definitions come from nmbd/asyncdns.c */ +/* The following definitions come from nmbd/asyncdns.c */ int asyncdns_fd(void); void kill_async_dns_child(void); @@ -1452,11 +1485,11 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/*The following definitions come from nmbd/nmbd_become_dmb.c */ +/* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); -/*The following definitions come from nmbd/nmbd_become_lmb.c */ +/* The following definitions come from nmbd/nmbd_become_lmb.c */ void insert_permanent_name_into_unicast( struct subnet_record *subrec, struct nmb_name *nmbname, uint16 nb_type ); @@ -1465,7 +1498,7 @@ void unbecome_local_master_browser(struct subnet_record *subrec, struct work_rec void become_local_master_browser(struct subnet_record *subrec, struct work_record *work); void set_workgroup_local_master_browser_name( struct work_record *work, char *newname); -/*The following definitions come from nmbd/nmbd_browserdb.c */ +/* The following definitions come from nmbd/nmbd_browserdb.c */ void update_browser_death_time( struct browse_cache_record *browc ); struct browse_cache_record *create_browser_in_lmb_cache( char *work_name, @@ -1474,7 +1507,7 @@ struct browse_cache_record *create_browser_in_lmb_cache( char *work_name, struct browse_cache_record *find_browser_in_lmb_cache( char *browser_name ); void expire_lmb_browsers( time_t t ); -/*The following definitions come from nmbd/nmbd_browsesync.c */ +/* The following definitions come from nmbd/nmbd_browsesync.c */ void dmb_expire_and_sync_browser_lists(time_t t); void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, @@ -1482,10 +1515,10 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/*The following definitions come from nmbd/nmbd.c */ +/* The following definitions come from nmbd/nmbd.c */ -/*The following definitions come from nmbd/nmbd_elections.c */ +/* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); void run_elections(time_t t); @@ -1493,7 +1526,7 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, cha BOOL check_elections(void); void nmbd_message_election(int msg_type, pid_t src, void *buf, size_t len); -/*The following definitions come from nmbd/nmbd_incomingdgrams.c */ +/* The following definitions come from nmbd/nmbd_incomingdgrams.c */ void tell_become_backup(void); void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); @@ -1509,7 +1542,7 @@ void process_reset_browser(struct subnet_record *subrec, void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf); void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf); -/*The following definitions come from nmbd/nmbd_incomingrequests.c */ +/* The following definitions come from nmbd/nmbd_incomingrequests.c */ void process_name_release_request(struct subnet_record *subrec, struct packet_struct *p); @@ -1520,23 +1553,23 @@ void process_name_registration_request(struct subnet_record *subrec, void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p); void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p); -/*The following definitions come from nmbd/nmbd_lmhosts.c */ +/* The following definitions come from nmbd/nmbd_lmhosts.c */ void load_lmhosts_file(char *fname); BOOL find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp); -/*The following definitions come from nmbd/nmbd_logonnames.c */ +/* The following definitions come from nmbd/nmbd_logonnames.c */ void add_logon_names(void); -/*The following definitions come from nmbd/nmbd_mynames.c */ +/* The following definitions come from nmbd/nmbd_mynames.c */ void register_my_workgroup_one_subnet(struct subnet_record *subrec); BOOL register_my_workgroup_and_names(void); void release_my_names(void); void refresh_my_names(time_t t); -/*The following definitions come from nmbd/nmbd_namelistdb.c */ +/* The following definitions come from nmbd/nmbd_namelistdb.c */ void set_samba_nb_type(void); void remove_name_from_namelist( struct subnet_record *subrec, @@ -1576,7 +1609,7 @@ void expire_names(time_t t); void add_samba_names_to_subnet( struct subnet_record *subrec ); void dump_all_namelists(void); -/*The following definitions come from nmbd/nmbd_namequery.c */ +/* The following definitions come from nmbd/nmbd_namequery.c */ BOOL query_name(struct subnet_record *subrec, char *name, int type, query_name_success_function success_fn, @@ -1588,7 +1621,7 @@ BOOL query_name_from_wins_server(struct in_addr ip_to, query_name_fail_function fail_fn, struct userdata_struct *userdata); -/*The following definitions come from nmbd/nmbd_nameregister.c */ +/* The following definitions come from nmbd/nmbd_nameregister.c */ BOOL register_name(struct subnet_record *subrec, char *name, int type, uint16 nb_flags, @@ -1600,20 +1633,20 @@ BOOL refresh_name(struct subnet_record *subrec, struct name_record *namerec, refresh_name_fail_function fail_fn, struct userdata_struct *userdata); -/*The following definitions come from nmbd/nmbd_namerelease.c */ +/* The following definitions come from nmbd/nmbd_namerelease.c */ BOOL release_name(struct subnet_record *subrec, struct name_record *namerec, release_name_success_function success_fn, release_name_fail_function fail_fn, struct userdata_struct *userdata); -/*The following definitions come from nmbd/nmbd_nodestatus.c */ +/* The following definitions come from nmbd/nmbd_nodestatus.c */ BOOL node_status(struct subnet_record *subrec, struct nmb_name *nmbname, struct in_addr send_ip, node_status_success_function success_fn, node_status_fail_function fail_fn, struct userdata_struct *userdata); -/*The following definitions come from nmbd/nmbd_packets.c */ +/* The following definitions come from nmbd/nmbd_packets.c */ uint16 get_nb_flags(char *buf); void set_nb_flags(char *buf, uint16 nb_flags); @@ -1685,12 +1718,12 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len, struct in_addr dest_ip,struct in_addr src_ip, int dest_port); -/*The following definitions come from nmbd/nmbd_processlogon.c */ +/* The following definitions come from nmbd/nmbd_processlogon.c */ void process_logon_packet(struct packet_struct *p,char *buf,int len, char *mailslot); -/*The following definitions come from nmbd/nmbd_responserecordsdb.c */ +/* The following definitions come from nmbd/nmbd_responserecordsdb.c */ void remove_response_record(struct subnet_record *subrec, struct response_record *rrec); @@ -1705,7 +1738,7 @@ struct response_record *find_response_record(struct subnet_record **ppsubrec, uint16 id); BOOL is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec); -/*The following definitions come from nmbd/nmbd_sendannounce.c */ +/* The following definitions come from nmbd/nmbd_sendannounce.c */ void send_browser_reset(int reset_type, char *to_name, int to_type, struct in_addr to_ip); void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work); @@ -1717,7 +1750,7 @@ void announce_my_servers_removed(void); void announce_remote(time_t t); void browse_sync_remote(time_t t); -/*The following definitions come from nmbd/nmbd_serverlistdb.c */ +/* The following definitions come from nmbd/nmbd_serverlistdb.c */ void remove_all_servers(struct work_record *work); struct server_record *find_server_in_workgroup(struct work_record *work, char *name); @@ -1731,7 +1764,7 @@ void write_browse_list_entry(FILE *fp, fstring name, uint32 rec_type, fstring local_master_browser_name, fstring description); void write_browse_list(time_t t, BOOL force_write); -/*The following definitions come from nmbd/nmbd_subnetdb.c */ +/* The following definitions come from nmbd/nmbd_subnetdb.c */ void close_subnet(struct subnet_record *subrec); struct subnet_record *make_normal_subnet(struct interface *iface); @@ -1740,20 +1773,20 @@ BOOL we_are_a_wins_client(void); struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec); struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec); -/*The following definitions come from nmbd/nmbd_synclists.c */ +/* The following definitions come from nmbd/nmbd_synclists.c */ void sync_browse_lists(struct work_record *work, char *name, int nm_type, struct in_addr ip, BOOL local, BOOL servers); void sync_check_completion(void); -/*The following definitions come from nmbd/nmbd_winsproxy.c */ +/* The following definitions come from nmbd/nmbd_winsproxy.c */ void make_wins_proxy_name_query_request( struct subnet_record *subrec, struct packet_struct *incoming_packet, struct nmb_name *question_name); -/*The following definitions come from nmbd/nmbd_winsserver.c */ +/* The following definitions come from nmbd/nmbd_winsserver.c */ BOOL packet_is_for_wins_server(struct packet_struct *packet); BOOL initialise_wins(void); @@ -1772,7 +1805,7 @@ void wins_process_name_release_request(struct subnet_record *subrec, void initiate_wins_processing(time_t t); void wins_write_database(BOOL background); -/*The following definitions come from nmbd/nmbd_workgroupdb.c */ +/* The following definitions come from nmbd/nmbd_workgroupdb.c */ struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec, const char *name); @@ -1783,7 +1816,7 @@ void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_reco void dump_workgroups(BOOL force_write); void expire_workgroups_and_servers(time_t t); -/*The following definitions come from nsswitch/wb_client.c */ +/* The following definitions come from nsswitch/wb_client.c */ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, enum SID_NAME_USE *name_type); @@ -1801,7 +1834,7 @@ BOOL winbind_gidtoname(fstring name, gid_t gid); BOOL winbind_nametouid(uid_t *puid, const char *name); BOOL winbind_nametogid(gid_t *pgid, const char *gname); -/*The following definitions come from nsswitch/wb_common.c */ +/* The following definitions come from nsswitch/wb_common.c */ void free_response(struct winbindd_response *response); void winbind_exclude_domain(const char *domain); @@ -1812,7 +1845,7 @@ int winbind_open_pipe_sock(void); int write_sock(void *buffer, int count); int read_reply(struct winbindd_response *response); -/*The following definitions come from param/loadparm.c */ +/* The following definitions come from param/loadparm.c */ void lp_talloc_free(void); char *lp_logfile(void); @@ -2110,17 +2143,17 @@ void get_private_directory(pstring priv_dir); void lp_set_logfile(const char *name); const char *get_called_name(void); -/*The following definitions come from param/params.c */ +/* The following definitions come from param/params.c */ BOOL pm_process( char *FileName, BOOL (*sfunc)(char *), BOOL (*pfunc)(char *, char *) ); -/*The following definitions come from passdb/machine_sid.c */ +/* The following definitions come from passdb/machine_sid.c */ BOOL pdb_generate_sam_sid(void); -/*The following definitions come from passdb/pampass.c */ +/* The following definitions come from passdb/pampass.c */ BOOL smb_pam_claim_session(char *user, char *tty, char *rhost); BOOL smb_pam_close_session(char *user, char *tty, char *rhost); @@ -2131,13 +2164,13 @@ NTSTATUS smb_pam_accountcheck(const char * user); BOOL smb_pam_claim_session(char *user, char *tty, char *rhost); BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost); -/*The following definitions come from passdb/pass_check.c */ +/* The following definitions come from passdb/pass_check.c */ void dfs_unlogin(void); BOOL pass_check(char *user, char *password, int pwlen, struct passwd *pwd, BOOL (*fn) (char *, char *)); -/*The following definitions come from passdb/passdb.c */ +/* The following definitions come from passdb/passdb.c */ BOOL initialize_password_db(BOOL reload); BOOL pdb_init_sam(SAM_ACCOUNT **user); @@ -2232,7 +2265,7 @@ BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn); BOOL pdb_set_hours (SAM_ACCOUNT *sampass, uint8 *hours); BOOL pdb_getsampwuid (SAM_ACCOUNT* user, uid_t uid); -/*The following definitions come from passdb/pdb_ldap.c */ +/* The following definitions come from passdb/pdb_ldap.c */ BOOL pdb_setsampwent(BOOL update); void pdb_endsampwent(void); @@ -2243,7 +2276,7 @@ BOOL pdb_delete_sam_account(char *sname); BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override); BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd); -/*The following definitions come from passdb/pdb_nisplus.c */ +/* The following definitions come from passdb/pdb_nisplus.c */ BOOL pdb_setsampwent(BOOL update); void pdb_endsampwent(void); @@ -2254,7 +2287,7 @@ BOOL pdb_delete_sam_account(char *sname); BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd); BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override); -/*The following definitions come from passdb/pdb_smbpasswd.c */ +/* The following definitions come from passdb/pdb_smbpasswd.c */ BOOL pdb_setsampwent (BOOL update); void pdb_endsampwent (void); @@ -2265,7 +2298,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT *sampass); BOOL pdb_update_sam_account(SAM_ACCOUNT *sampass, BOOL override); BOOL pdb_delete_sam_account (char* username); -/*The following definitions come from passdb/pdb_tdb.c */ +/* The following definitions come from passdb/pdb_tdb.c */ BOOL pdb_setsampwent(BOOL update); void pdb_endsampwent(void); @@ -2276,7 +2309,7 @@ BOOL pdb_delete_sam_account(char *sname); BOOL pdb_update_sam_account (SAM_ACCOUNT *newpwd, BOOL override); BOOL pdb_add_sam_account (SAM_ACCOUNT *newpwd); -/*The following definitions come from passdb/secrets.c */ +/* The following definitions come from passdb/secrets.c */ BOOL secrets_init(void); void *secrets_fetch(char *key, size_t *size); @@ -2293,22 +2326,22 @@ void reset_globals_after_fork(void); BOOL secrets_store_ldap_pw(char* dn, char* pw); BOOL fetch_ldap_pw(char *dn, char* pw, int len); -/*The following definitions come from passdb/smbpassfile.c */ +/* The following definitions come from passdb/smbpassfile.c */ BOOL migrate_from_old_password_file(char *domain); -/*The following definitions come from printing/load.c */ +/* The following definitions come from printing/load.c */ void add_all_printers(void); void load_printers(void); -/*The following definitions come from printing/lpq_parse.c */ +/* The following definitions come from printing/lpq_parse.c */ BOOL parse_lpq_entry(int snum,char *line, print_queue_struct *buf, print_status_struct *status,BOOL first); -/*The following definitions come from printing/nt_printing.c */ +/* The following definitions come from printing/nt_printing.c */ BOOL nt_printing_init(void); uint32 update_c_setprinter(BOOL initialize); @@ -2358,23 +2391,23 @@ BOOL print_access_check(struct current_user *user, int snum, int access_type); BOOL print_time_access_check(int snum); WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_default); -/*The following definitions come from printing/pcap.c */ +/* The following definitions come from printing/pcap.c */ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname); void pcap_printer_fn(void (*fn)(char *, char *)); -/*The following definitions come from printing/print_cups.c */ +/* The following definitions come from printing/print_cups.c */ -/*The following definitions come from printing/printfsp.c */ +/* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/*The following definitions come from printing/print_generic.c */ +/* The following definitions come from printing/print_generic.c */ -/*The following definitions come from printing/printing.c */ +/* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); BOOL print_job_exists(int jobid); @@ -2399,18 +2432,18 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/*The following definitions come from printing/print_svid.c */ +/* The following definitions come from printing/print_svid.c */ void sysv_printer_fn(void (*fn)(char *, char *)); int sysv_printername_ok(char *name); -/*The following definitions come from profile/profile.c */ +/* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len); BOOL profile_setup(BOOL rdonly); -/*The following definitions come from rpc_client/cli_login.c */ +/* The following definitions come from rpc_client/cli_login.c */ NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]); BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd); @@ -2423,7 +2456,7 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); -/*The following definitions come from rpc_client/cli_netlogon.c */ +/* The following definitions come from rpc_client/cli_netlogon.c */ BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level); NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan, @@ -2434,7 +2467,7 @@ NTSTATUS cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); -/*The following definitions come from rpc_client/cli_pipe.c */ +/* The following definitions come from rpc_client/cli_pipe.c */ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num, prs_struct *data, prs_struct *rdata); @@ -2443,7 +2476,7 @@ void cli_nt_set_ntlmssp_flgs(struct cli_state *cli, uint32 ntlmssp_flgs); BOOL cli_nt_session_open(struct cli_state *cli, const char *pipe_name); void cli_nt_session_close(struct cli_state *cli); -/*The following definitions come from rpc_client/cli_spoolss_notify.c */ +/* The following definitions come from rpc_client/cli_spoolss_notify.c */ BOOL spoolss_disconnect_from_client( struct cli_state *cli); BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); @@ -2458,44 +2491,49 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer); -/*The following definitions come from rpc_client/cli_trust.c */ +/* The following definitions come from rpc_client/cli_trust.c */ BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/*The following definitions come from rpcclient/cmd_dfs.c */ +/* The following definitions come from rpcclient/cmd_dfs.c */ -/*The following definitions come from rpcclient/cmd_lsarpc.c */ +/* The following definitions come from rpcclient/cmd_lsarpc.c */ -/*The following definitions come from rpcclient/cmd_netlogon.c */ +/* The following definitions come from rpcclient/cmd_netlogon.c */ -/*The following definitions come from rpcclient/cmd_reg.c */ +/* The following definitions come from rpcclient/cmd_reg.c */ -/*The following definitions come from rpcclient/cmd_samr.c */ +/* The following definitions come from rpcclient/cmd_samr.c */ void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); -/*The following definitions come from rpcclient/cmd_spoolss.c */ +/* The following definitions come from rpcclient/cmd_spoolss.c */ BOOL get_short_archi(char *short_archi, char *long_archi); void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); -/*The following definitions come from rpcclient/cmd_srvsvc.c */ +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); -/*The following definitions come from rpcclient/rpcclient.c */ +/* The following definitions come from rpcclient/rpcclient.c */ void fetch_machine_sid(struct cli_state *cli); -void init_rpcclient_creds(struct ntuser_creds *creds, char* username, - char* domain, char* password); -struct cli_state *setup_connection(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); +int main(int argc, char *argv[]); -/*The following definitions come from rpc_parse/parse_dfs.c */ +/* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth); @@ -2519,7 +2557,7 @@ BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth); BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_lsa.c */ +/* The following definitions come from rpc_parse/parse_lsa.c */ void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name, uint16 sid_name_use, char *name, uint32 idx); @@ -2616,7 +2654,7 @@ BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int dept BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth); BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_misc.c */ +/* The following definitions come from rpc_parse/parse_misc.c */ TALLOC_CTX *get_current_rpc_talloc(void); void set_current_rpc_talloc( TALLOC_CTX *ctx); @@ -2693,7 +2731,7 @@ BOOL smb_io_buffer4(char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, in BOOL make_uni_hdr(UNIHDR *hdr, int len); BOOL make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer); -/*The following definitions come from rpc_parse/parse_net.c */ +/* The following definitions come from rpc_parse/parse_net.c */ BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth); void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *srv_name, @@ -2784,7 +2822,7 @@ BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps, BOOL net_io_r_sam_deltas(char *desc, uint8 sess_key[16], NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_prs.c */ +/* The following definitions come from rpc_parse/parse_prs.c */ void prs_dump(char *name, int v, prs_struct *ps); void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name); @@ -2838,7 +2876,7 @@ int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps); int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX *mem_ctx); BOOL prs_hash1(prs_struct *ps, uint32 offset, uint8 sess_key[16]); -/*The following definitions come from rpc_parse/parse_reg.c */ +/* The following definitions come from rpc_parse/parse_reg.c */ void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o, uint16 unknown_0, uint32 level); @@ -2923,7 +2961,7 @@ BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s, BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_rpc.c */ +/* The following definitions come from rpc_parse/parse_rpc.c */ void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags, uint32 call_id, int data_len, int auth_len); @@ -2977,7 +3015,7 @@ void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, uint32 ver, uint32 crc32, uint32 seq_num); BOOL smb_io_rpc_auth_ntlmssp_chk(char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_samr.c */ +/* The following definitions come from rpc_parse/parse_samr.c */ void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND * q_c, POLICY_HND *hnd); BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u, @@ -3451,7 +3489,7 @@ void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO * r_u, NTSTATUS status); BOOL samr_io_r_set_domain_info(char *desc, SAMR_R_SET_DOMAIN_INFO * r_u, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_sec.c */ +/* The following definitions come from rpc_parse/parse_sec.c */ void init_sec_access(SEC_ACCESS *t, uint32 mask); BOOL sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth); @@ -3476,7 +3514,7 @@ SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc) SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src); BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_spoolss.c */ +/* The following definitions come from rpc_parse/parse_spoolss.c */ BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime); BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, @@ -3759,7 +3797,7 @@ BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, uint32 level, NEW_BUFFER *buffer, uint32 offered); -/*The following definitions come from rpc_parse/parse_srv.c */ +/* The following definitions come from rpc_parse/parse_srv.c */ void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark); void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark); @@ -3865,7 +3903,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth); BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth); -/*The following definitions come from rpc_parse/parse_wks.c */ +/* The following definitions come from rpc_parse/parse_wks.c */ void init_wks_q_query_info(WKS_Q_QUERY_INFO *q_u, char *server, uint16 switch_value) ; @@ -3878,11 +3916,11 @@ void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u, NTSTATUS status) ; BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth); -/*The following definitions come from rpc_server/srv_dfs.c */ +/* The following definitions come from rpc_server/srv_dfs.c */ BOOL api_netdfs_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_dfs_nt.c */ +/* The following definitions come from rpc_server/srv_dfs_nt.c */ uint32 _dfs_exist(pipes_struct *p, DFS_Q_DFS_EXIST *q_u, DFS_R_DFS_EXIST *r_u); WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u); @@ -3892,11 +3930,11 @@ WERROR _dfs_enum(pipes_struct *p, DFS_Q_DFS_ENUM *q_u, DFS_R_DFS_ENUM *r_u); WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, DFS_R_DFS_GET_INFO *r_u); -/*The following definitions come from rpc_server/srv_lsa.c */ +/* The following definitions come from rpc_server/srv_lsa.c */ BOOL api_ntlsa_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_lsa_hnd.c */ +/* The following definitions come from rpc_server/srv_lsa_hnd.c */ BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name); BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr); @@ -3904,7 +3942,7 @@ BOOL find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p); BOOL close_policy_hnd(pipes_struct *p, POLICY_HND *hnd); void close_policy_by_pipe(pipes_struct *p); -/*The following definitions come from rpc_server/srv_lsa_nt.c */ +/* The following definitions come from rpc_server/srv_lsa_nt.c */ NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL2 *r_u); NTSTATUS _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_u); @@ -3920,11 +3958,11 @@ NTSTATUS _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u); NTSTATUS _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u); -/*The following definitions come from rpc_server/srv_netlog.c */ +/* The following definitions come from rpc_server/srv_netlog.c */ BOOL api_netlog_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_netlog_nt.c */ +/* The following definitions come from rpc_server/srv_netlog_nt.c */ NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u, NET_R_LOGON_CTRL *r_u); @@ -3937,7 +3975,7 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET * NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u); NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u); -/*The following definitions come from rpc_server/srv_pipe.c */ +/* The following definitions come from rpc_server/srv_pipe.c */ BOOL create_next_pdu(pipes_struct *p); BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *rpc_in_p); @@ -3951,7 +3989,7 @@ BOOL api_pipe_request(pipes_struct *p); BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, struct api_struct *api_rpc_cmds); -/*The following definitions come from rpc_server/srv_pipe_hnd.c */ +/* The following definitions come from rpc_server/srv_pipe_hnd.c */ pipes_struct *get_first_pipe(void); pipes_struct *get_next_pipe(pipes_struct *p); @@ -3969,22 +4007,22 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn); pipes_struct *get_rpc_pipe_p(char *buf, int where); pipes_struct *get_rpc_pipe(int pnum); -/*The following definitions come from rpc_server/srv_reg.c */ +/* The following definitions come from rpc_server/srv_reg.c */ BOOL api_reg_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_reg_nt.c */ +/* The following definitions come from rpc_server/srv_reg_nt.c */ NTSTATUS _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u); NTSTATUS _reg_open(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u); NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY *r_u); NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u); -/*The following definitions come from rpc_server/srv_samr.c */ +/* The following definitions come from rpc_server/srv_samr.c */ BOOL api_samr_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_samr_nt.c */ +/* The following definitions come from rpc_server/srv_samr_nt.c */ NTSTATUS _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND *r_u); NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u); @@ -4028,11 +4066,11 @@ NTSTATUS _samr_get_dom_pwinfo(pipes_struct *p, SAMR_Q_GET_DOM_PWINFO *q_u, SAMR_ NTSTATUS _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GROUP *r_u); NTSTATUS _samr_unknown_2d(pipes_struct *p, SAMR_Q_UNKNOWN_2D *q_u, SAMR_R_UNKNOWN_2D *r_u); -/*The following definitions come from rpc_server/srv_spoolss.c */ +/* The following definitions come from rpc_server/srv_spoolss.c */ BOOL api_spoolss_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_spoolss_nt.c */ +/* The following definitions come from rpc_server/srv_spoolss_nt.c */ WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u); WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u); @@ -4150,11 +4188,11 @@ WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPO WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u); WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u); -/*The following definitions come from rpc_server/srv_srvsvc.c */ +/* The following definitions come from rpc_server/srv_srvsvc.c */ BOOL api_srvsvc_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_srvsvc_nt.c */ +/* The following definitions come from rpc_server/srv_srvsvc_nt.c */ BOOL share_info_db_init(void); void map_generic_share_sd_bits(SEC_DESC *psd); @@ -4178,7 +4216,7 @@ WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u); WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u); -/*The following definitions come from rpc_server/srv_util.c */ +/* The following definitions come from rpc_server/srv_util.c */ int make_dom_gids(TALLOC_CTX *ctx, char *gids_str, DOM_GID **ppgids); void get_domain_user_groups(char *domain_groups, char *user); @@ -4189,15 +4227,15 @@ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid); NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid); NTSTATUS local_lookup_user_rid(char *user_name, uint32 *rid); -/*The following definitions come from rpc_server/srv_wkssvc.c */ +/* The following definitions come from rpc_server/srv_wkssvc.c */ BOOL api_wkssvc_rpc(pipes_struct *p); -/*The following definitions come from rpc_server/srv_wkssvc_nt.c */ +/* The following definitions come from rpc_server/srv_wkssvc_nt.c */ NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/*The following definitions come from smbd/blocking.c */ +/* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); void remove_pending_lock_requests_by_fid(files_struct *fsp); @@ -4205,7 +4243,7 @@ void remove_pending_lock_requests_by_mid(int mid); BOOL blocking_locks_pending(void); void process_blocking_lock_queue(time_t t); -/*The following definitions come from smbd/chgpasswd.c */ +/* The following definitions come from smbd/chgpasswd.c */ BOOL chgpasswd(char *name, char *oldpass, char *newpass, BOOL as_root); BOOL chgpasswd(char *name, char *oldpass, char *newpass, BOOL as_root); @@ -4226,11 +4264,11 @@ BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd, BOOL check_plaintext_password(char *user, char *old_passwd, int old_passwd_size, SAM_ACCOUNT **hnd); -/*The following definitions come from smbd/close.c */ +/* The following definitions come from smbd/close.c */ int close_file(files_struct *fsp, BOOL normal_close); -/*The following definitions come from smbd/conn.c */ +/* The following definitions come from smbd/conn.c */ void conn_init(void); int conn_num_open(void); @@ -4242,18 +4280,18 @@ BOOL conn_idle_all(time_t t, int deadtime); void conn_free(connection_struct *conn); void msg_force_tdis(int msg_type, pid_t pid, void *buf, size_t len); -/*The following definitions come from smbd/connection.c */ +/* The following definitions come from smbd/connection.c */ TDB_CONTEXT *conn_tdb_ctx(void); BOOL yield_connection(connection_struct *conn,char *name); BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear); -/*The following definitions come from smbd/dfree.c */ +/* The following definitions come from smbd/dfree.c */ SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); -/*The following definitions come from smbd/dir.c */ +/* The following definitions come from smbd/dir.c */ void init_dptrs(void); char *dptr_path(int key); @@ -4281,7 +4319,7 @@ void DirCacheAdd( char *path, char *name, char *dname, int snum ); char *DirCacheCheck( char *path, char *name, int snum ); void DirCacheFlush(int snum); -/*The following definitions come from smbd/dosmode.c */ +/* The following definitions come from smbd/dosmode.c */ mode_t unix_mode(connection_struct *conn,int dosmode,const char *fname); int dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf); @@ -4289,7 +4327,7 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT * int file_utime(connection_struct *conn, char *fname, struct utimbuf *times); BOOL set_filetime(connection_struct *conn, char *fname, time_t mtime); -/*The following definitions come from smbd/error.c */ +/* The following definitions come from smbd/error.c */ int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file); int unix_error_packet(char *outbuf,int def_class,uint32 def_code, @@ -4297,7 +4335,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code, int error_packet(char *outbuf,NTSTATUS ntstatus, uint8 eclass,uint32 ecode,int line, const char *file); -/*The following definitions come from smbd/fileio.c */ +/* The following definitions come from smbd/fileio.c */ SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos); BOOL read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n); @@ -4309,13 +4347,13 @@ ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason); void sync_file(connection_struct *conn, files_struct *fsp); int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst); -/*The following definitions come from smbd/filename.c */ +/* The following definitions come from smbd/filename.c */ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, BOOL *bad_path, SMB_STRUCT_STAT *pst); BOOL check_name(char *name,connection_struct *conn); -/*The following definitions come from smbd/files.c */ +/* The following definitions come from smbd/files.c */ files_struct *file_new(connection_struct *conn); void file_close_conn(connection_struct *conn); @@ -4334,7 +4372,7 @@ void file_chain_reset(void); void file_chain_save(void); void file_chain_restore(void); -/*The following definitions come from smbd/ipc.c */ +/* The following definitions come from smbd/ipc.c */ void send_trans_reply(char *outbuf, char *rparam, int rparam_len, @@ -4342,12 +4380,12 @@ void send_trans_reply(char *outbuf, BOOL buffer_too_large); int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int bufsize); -/*The following definitions come from smbd/lanman.c */ +/* The following definitions come from smbd/lanman.c */ int api_reply(connection_struct *conn,uint16 vuid,char *outbuf,char *data,char *params, int tdscnt,int tpscnt,int mdrcnt,int mprcnt); -/*The following definitions come from smbd/mangle.c */ +/* The following definitions come from smbd/mangle.c */ BOOL is_mangled( char *s ); BOOL is_8_3( char *fname, BOOL check_case ); @@ -4356,7 +4394,7 @@ BOOL check_mangled_cache( char *s ); void mangle_name_83( char *s); BOOL name_map_mangle(char *OutName, BOOL need83, BOOL cache83, int snum); -/*The following definitions come from smbd/message.c */ +/* The following definitions come from smbd/message.c */ int reply_sends(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); @@ -4367,17 +4405,17 @@ int reply_sendtxt(connection_struct *conn, int reply_sendend(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); -/*The following definitions come from smbd/negprot.c */ +/* The following definitions come from smbd/negprot.c */ int reply_negprot(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); -/*The following definitions come from smbd/noquotas.c */ +/* The following definitions come from smbd/noquotas.c */ BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); -/*The following definitions come from smbd/notify.c */ +/* The following definitions come from smbd/notify.c */ void remove_pending_change_notify_requests_by_fid(files_struct *fsp); void remove_pending_change_notify_requests_by_mid(int mid); @@ -4387,15 +4425,15 @@ BOOL process_pending_change_notify_queue(time_t t); BOOL change_notify_set(char *inbuf, files_struct *fsp, connection_struct *conn, uint32 flags); BOOL init_change_notify(void); -/*The following definitions come from smbd/notify_hash.c */ +/* The following definitions come from smbd/notify_hash.c */ struct cnotify_fns *hash_notify_init(void) ; -/*The following definitions come from smbd/notify_kernel.c */ +/* The following definitions come from smbd/notify_kernel.c */ struct cnotify_fns *kernel_notify_init(void) ; -/*The following definitions come from smbd/nttrans.c */ +/* The following definitions come from smbd/nttrans.c */ int reply_ntcreate_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); @@ -4406,7 +4444,7 @@ int reply_nttranss(connection_struct *conn, int reply_nttrans(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); -/*The following definitions come from smbd/open.c */ +/* The following definitions come from smbd/open.c */ int fd_close(struct connection_struct *conn, files_struct *fsp); files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, @@ -4421,7 +4459,7 @@ files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_ST uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action); BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op); -/*The following definitions come from smbd/oplock.c */ +/* The following definitions come from smbd/oplock.c */ int32 get_number_of_exclusive_open_oplocks(void); BOOL oplock_message_waiting(fd_set *fds); @@ -4437,15 +4475,15 @@ BOOL attempt_close_oplocked_file(files_struct *fsp); void release_level_2_oplocks_on_change(files_struct *fsp); BOOL init_oplocks(void); -/*The following definitions come from smbd/oplock_irix.c */ +/* The following definitions come from smbd/oplock_irix.c */ struct kernel_oplocks *irix_init_kernel_oplocks(void) ; -/*The following definitions come from smbd/oplock_linux.c */ +/* The following definitions come from smbd/oplock_linux.c */ struct kernel_oplocks *linux_init_kernel_oplocks(void) ; -/*The following definitions come from smbd/password.c */ +/* The following definitions come from smbd/password.c */ void generate_next_challenge(char *challenge); BOOL set_challenge(unsigned char *challenge); @@ -4478,7 +4516,7 @@ BOOL domain_client_validate( char *user, char *domain, char *smb_ntpasswd, int smb_ntpasslen, BOOL *user_exists, NT_USER_TOKEN **pptoken); -/*The following definitions come from smbd/pipes.c */ +/* The following definitions come from smbd/pipes.c */ int reply_open_pipe_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); @@ -4487,7 +4525,7 @@ int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize); int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize); int reply_pipe_close(connection_struct *conn, char *inbuf,char *outbuf); -/*The following definitions come from smbd/posix_acls.c */ +/* The following definitions come from smbd/posix_acls.c */ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc); BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd); @@ -4495,7 +4533,7 @@ int chmod_acl(connection_struct *conn, const char *name, mode_t mode); int fchmod_acl(files_struct *fsp, int fd, mode_t mode); BOOL directory_has_default_acl(connection_struct *conn, const char *fname); -/*The following definitions come from smbd/process.c */ +/* The following definitions come from smbd/process.c */ BOOL push_oplock_pending_smb_message(char *buf, int msg_len); BOOL receive_next_smb(char *inbuf, int bufsize, int timeout); @@ -4507,7 +4545,7 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize); void check_reload(int t); void smbd_process(void); -/*The following definitions come from smbd/reply.c */ +/* The following definitions come from smbd/reply.c */ int reply_special(char *inbuf,char *outbuf); int reply_tcon(connection_struct *conn, @@ -4580,7 +4618,7 @@ int reply_writebmpx(connection_struct *conn, char *inbuf,char *outbuf, int size, int reply_writebs(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); int reply_getattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); -/*The following definitions come from smbd/sec_ctx.c */ +/* The following definitions come from smbd/sec_ctx.c */ int get_current_groups(int *p_ngroups, gid_t **p_groups); void delete_nt_token(NT_USER_TOKEN **pptoken); @@ -4592,14 +4630,14 @@ void set_root_sec_ctx(void); BOOL pop_sec_ctx(void); void init_sec_ctx(void); -/*The following definitions come from smbd/server.c */ +/* The following definitions come from smbd/server.c */ int smbd_server_fd(void); void smbd_set_server_fd(int fd); BOOL reload_services(BOOL test); void exit_server(char *reason); -/*The following definitions come from smbd/service.c */ +/* The following definitions come from smbd/service.c */ BOOL set_current_service(connection_struct *conn,BOOL do_chdir); int add_home_service(char *service, char *homedir); @@ -4607,12 +4645,12 @@ int find_service(char *service); connection_struct *make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid, int *ecode); void close_cnum(connection_struct *conn, uint16 vuid); -/*The following definitions come from smbd/session.c */ +/* The following definitions come from smbd/session.c */ BOOL session_claim(uint16 vuid); void session_yield(uint16 vuid); -/*The following definitions come from smbd/ssl.c */ +/* The following definitions come from smbd/ssl.c */ int sslutil_init(int isServer); int sslutil_accept(int fd); @@ -4621,14 +4659,14 @@ int sslutil_connect(int fd); int sslutil_disconnect(int fd); int sslutil_negotiate_ssl(int fd, int msg_type); -/*The following definitions come from smbd/statcache.c */ +/* The following definitions come from smbd/statcache.c */ void stat_cache_add( char *full_orig_name, char *orig_translated_path); BOOL stat_cache_lookup(connection_struct *conn, char *name, char *dirpath, char **start, SMB_STRUCT_STAT *pst); BOOL reset_stat_cache( void ); -/*The following definitions come from smbd/trans2.c */ +/* The following definitions come from smbd/trans2.c */ void set_bad_path_error(int err, BOOL bad_path); NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close); @@ -4637,7 +4675,7 @@ int reply_findnclose(connection_struct *conn, char *inbuf,char *outbuf,int lengt int reply_transs2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); -/*The following definitions come from smbd/uid.c */ +/* The following definitions come from smbd/uid.c */ BOOL change_to_guest(void); BOOL change_to_user(connection_struct *conn, uint16 vuid); @@ -4657,14 +4695,14 @@ DOM_SID *gid_to_sid(DOM_SID *psid, gid_t gid); BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype); BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype); -/*The following definitions come from smbd/utmp.c */ +/* The following definitions come from smbd/utmp.c */ void sys_utmp_yield(const char *username, const char *hostname, const char *id_str, int id_num); void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/*The following definitions come from smbd/vfs.c */ +/* The following definitions come from smbd/vfs.c */ BOOL smbd_vfs_init(connection_struct *conn); BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); @@ -4682,7 +4720,7 @@ int vfs_ChDir(connection_struct *conn, const char *path); char *vfs_GetWd(connection_struct *conn, char *path); BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); -/*The following definitions come from smbd/vfs-wrap.c */ +/* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); void vfswrap_dummy_disconnect(connection_struct *conn); @@ -4747,12 +4785,12 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/*The following definitions come from smbwrapper/realcalls.c */ +/* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); int real_utimes(const char *name, struct timeval tv[2]); -/*The following definitions come from smbwrapper/shared.c */ +/* The following definitions come from smbwrapper/shared.c */ void smbw_setup_shared(void); char *smbw_getshared(const char *name); @@ -4760,7 +4798,7 @@ void smbw_setshared(const char *name, const char *val); int smbw_setenv(const char *name, const char *value); int smbw_shared_fd(int fd); -/*The following definitions come from smbwrapper/smbw.c */ +/* The following definitions come from smbwrapper/smbw.c */ void smbw_init(void); int smbw_fd(int fd); @@ -4795,7 +4833,7 @@ int smbw_dup(int fd); int smbw_dup2(int fd, int fd2); int smbw_fork(void); -/*The following definitions come from smbwrapper/smbw_dir.c */ +/* The following definitions come from smbwrapper/smbw_dir.c */ struct smbw_dir *smbw_dir(int fd); int smbw_dirp(DIR *dirp); @@ -4815,7 +4853,7 @@ int smbw_closedir(DIR *dirp); void smbw_seekdir(DIR *dirp, off_t offset); off_t smbw_telldir(DIR *dirp); -/*The following definitions come from smbwrapper/smbw_stat.c */ +/* The following definitions come from smbwrapper/smbw_stat.c */ void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode); BOOL smbw_getatr(struct smbw_server *srv, char *path, @@ -4827,7 +4865,7 @@ int smbw_stat_printjob(struct smbw_server *srv,char *path, int smbw_fstat(int fd, struct stat *st); int smbw_stat(const char *fname, struct stat *st); -/*The following definitions come from tdb/spinlock.c */ +/* The following definitions come from tdb/spinlock.c */ int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type); int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type); @@ -4835,7 +4873,7 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size); int tdb_clear_spinlocks(TDB_CONTEXT *tdb); int tdb_clear_spinlocks(TDB_CONTEXT *tdb); -/*The following definitions come from tdb/tdb.c */ +/* The following definitions come from tdb/tdb.c */ void tdb_dump_all(TDB_CONTEXT *tdb); void tdb_printfreelist(TDB_CONTEXT *tdb); @@ -4864,7 +4902,7 @@ void tdb_logging_function(TDB_CONTEXT *tdb, void (*fn)(TDB_CONTEXT *, int , cons int tdb_reopen(TDB_CONTEXT *tdb); int tdb_reopen_all(void); -/*The following definitions come from tdb/tdbutil.c */ +/* The following definitions come from tdb/tdbutil.c */ int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval); void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval); @@ -4882,7 +4920,7 @@ TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags, int tdb_traverse_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state); -/*The following definitions come from utils/nbio.c */ +/* The following definitions come from utils/nbio.c */ void nb_setup(struct cli_state *cli); void nb_unlink(char *fname); @@ -4896,11 +4934,11 @@ void nb_rename(char *old, char *new); void nb_stat(char *fname, int size); void nb_create(char *fname, int size); -/*The following definitions come from utils/torture.c */ +/* The following definitions come from utils/torture.c */ int cli_setfileinfo_test(struct cli_state *cli, int fnum, int level, char *data, int data_len); -/*The following definitions come from web/cgi.c */ +/* The following definitions come from web/cgi.c */ void cgi_load_variables(FILE *f1); char *cgi_variable(char *name); @@ -4913,12 +4951,12 @@ char *cgi_remote_host(void); char *cgi_remote_addr(void); BOOL cgi_waspost(void); -/*The following definitions come from web/diagnose.c */ +/* The following definitions come from web/diagnose.c */ BOOL nmbd_running(void); BOOL smbd_running(void); -/*The following definitions come from web/startstop.c */ +/* The following definitions come from web/startstop.c */ void start_smbd(void); void start_nmbd(void); @@ -4926,10 +4964,10 @@ void stop_smbd(void); void stop_nmbd(void); void kill_pid(pid_t pid); -/*The following definitions come from web/statuspage.c */ +/* The following definitions come from web/statuspage.c */ void status_page(void); -/*The following definitions come from web/swat.c */ +/* The following definitions come from web/swat.c */ #endif /* _PROTO_H_ */ -- cgit From 07d47f050f1ef004d201b1951fb73535e6e6e491 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Apr 2002 07:45:21 +0000 Subject: Fix from Stefan "metze" Metzmacher to prevent us overwriting an old MACHINE.SID sid. Jeremy. --- source/passdb/machine_sid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/passdb/machine_sid.c b/source/passdb/machine_sid.c index b276014f016..f7ed3811b97 100644 --- a/source/passdb/machine_sid.c +++ b/source/passdb/machine_sid.c @@ -146,6 +146,11 @@ BOOL pdb_generate_sam_sid(void) return False; } } + + /* Stored the old sid from MACHINE.SID successfully. + Patch from Stefan "metze" Metzmacher */ + SAFE_FREE(fname); + return True; } SAFE_FREE(fname); -- cgit From df3576f852ea6cd29f68fc3f172cd0b2989cdf5a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Apr 2002 16:03:05 +0000 Subject: fix rpcclient parsing by make rpcstr_pull() determine the UNICODE string length if STR_TERMINIATE was set (just like HEAD). --- source/lib/util_unistr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index bd0113b972b..a2bd0cf4913 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -2080,6 +2080,10 @@ int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags) { if(dest_len==-1) dest_len=MAXUNI-3; + + if (flags & STR_TERMINATE) + src_len = strlen_w(src)*2+2; + dest_len = MIN((src_len/2), (dest_len-1)); unistr_to_ascii(dest, src, dest_len); return src_len; -- cgit From adcaddda43c26d71f10db5f5971fd1e541de73bd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Apr 2002 17:46:23 +0000 Subject: Ensure MACHINE.SID update done before child spawns. Jeremy. --- source/smbd/server.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/smbd/server.c b/source/smbd/server.c index a5fcfcbf535..b18921e1af3 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -789,6 +789,11 @@ static void usage(char *pname) if (!migrate_from_old_password_file(global_myworkgroup)) DEBUG(0,("Failed to migrate from old MAC file.\n")); + if(!pdb_generate_sam_sid()) { + DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n")); + exit(1); + } + if (!open_sockets(is_daemon,interactive,port)) exit(1); @@ -811,11 +816,6 @@ static void usage(char *pname) /* possibly reload the services file. */ reload_services(True); - if(!pdb_generate_sam_sid()) { - DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n")); - exit(1); - } - if (*lp_rootdir()) { if (sys_chroot(lp_rootdir()) == 0) DEBUG(2,("Changed root to %s\n", lp_rootdir())); -- cgit From 18b06a8bdc6c9c80cc87dd1bb1a20b735ba89e48 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Apr 2002 19:31:56 +0000 Subject: Fix the bad path errors for mkdir so mkdir \a\b\c\d works. Jeremy. --- source/include/proto.h | 2 +- source/smbd/reply.c | 17 ++++++++++------- source/smbd/trans2.c | 4 +++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 81b3eb48ebf..144a2f64add 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -4668,7 +4668,7 @@ BOOL reset_stat_cache( void ); /* The following definitions come from smbd/trans2.c */ -void set_bad_path_error(int err, BOOL bad_path); +NTSTATUS set_bad_path_error(int err, BOOL bad_path); NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close); int reply_findclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); int reply_findnclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 701c0d236ac..86dd17a04bb 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3405,18 +3405,21 @@ int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_ ****************************************************************************/ NTSTATUS mkdir_internal(connection_struct *conn, pstring directory) { - BOOL bad_path = False; - SMB_STRUCT_STAT sbuf; - int ret= -1; + BOOL bad_path = False; + SMB_STRUCT_STAT sbuf; + int ret= -1; - unix_convert(directory,conn,0,&bad_path,&sbuf); + unix_convert(directory,conn,0,&bad_path,&sbuf); - if (check_name(directory, conn)) - ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory)); + if (check_name(directory, conn)) + ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory)); if (ret == -1) { + NTSTATUS nterr = set_bad_path_error(errno, bad_path); + if (!NT_STATUS_IS_OK(nterr)) + return nterr; return map_nt_error_from_unix(errno); - } + } return NT_STATUS_OK; } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index b3c46163798..42eeec9b688 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1509,12 +1509,14 @@ static int call_trans2setfsinfo(connection_struct *conn, char *inbuf, char *outb Utility function to set bad path error. ****************************************************************************/ -void set_bad_path_error(int err, BOOL bad_path) +NTSTATUS set_bad_path_error(int err, BOOL bad_path) { if((err == ENOENT) && bad_path) { unix_ERR_class = ERRDOS; unix_ERR_code = ERRbadpath; + return NT_STATUS_OBJECT_PATH_NOT_FOUND; } + return NT_STATUS_OK; } /**************************************************************************** -- cgit From bd2828586a689e3280613e8241e5753e7818275c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Apr 2002 19:56:57 +0000 Subject: Fix continual scanning of smb.conf if an include file doesn't exist. Found by Herb. Jeremy. --- source/param/loadparm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 5961397c48b..5a5edbb6d2f 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -2225,9 +2225,12 @@ static void add_to_file_list(char *fname, char *subfname) return; } file_lists = f; - } - - f->modtime = file_modtime(subfname); + f->modtime = file_modtime(subfname); + } else { + time_t t = file_modtime(subfname); + if (t) + f->modtime = t; + } } /******************************************************************* @@ -2250,7 +2253,7 @@ BOOL lp_file_list_changed(void) mod_time = file_modtime(n2); - if ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0)) { + if (mod_time && ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0))) { DEBUGADD(6, ("file %s modified: %s\n", n2, ctime(&mod_time))); f->modtime = mod_time; SAFE_FREE(f->subfname); -- cgit From 605d59f68f8b9466acfc856e3eebe8745c28f525 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 2 Apr 2002 20:19:49 +0000 Subject: make usage about -L match HEAD --- source/utils/smbpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index fc99d3571cc..1a7dba9db41 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -82,7 +82,7 @@ static void usage(void) printf(" -r MACHINE remote machine\n"); printf("extra options when run by root or in local mode:\n"); - printf(" -L local mode\n"); + printf(" -L local mode (must be first option)\n"); printf(" -R ORDER name resolve order\n"); printf(" -j DOMAIN join domain name\n"); printf(" -a add user\n"); -- cgit From 72b8ce402e2ad05b35b59d9661323ab097a47ca8 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 2 Apr 2002 20:20:40 +0000 Subject: add libsmbclient to build --- packaging/SGI/idb.pl | 5 +++++ packaging/SGI/mkrelease.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl index c73350292b0..ddbad803569 100755 --- a/packaging/SGI/idb.pl +++ b/packaging/SGI/idb.pl @@ -219,12 +219,17 @@ while (@docs) { } } +print IDB "d 0755 root sys usr/samba/include $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "f 0644 root sys usr/samba/include/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n"; + print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n"; print IDB "d 0755 root sys usr/samba/lib/codepages $SRCPFX/packaging/SGI $PKG.sw.base\n"; while (@codepage) { $nextpage = shift @codepage; print IDB "f 0644 root sys usr/samba/lib/codepages/$nextpage $SRCPFX/packaging/SGI/codepages/$nextpage $PKG.sw.base nostrip \n"; } +print IDB "f 0644 root sys usr/samba/lib/libsmbclient.a $SRCPFX/source/bin/libsmbclient.a $PKG.sw.base\n"; +print IDB "f 0644 root sys usr/samba/lib/libsmbclient.so $SRCPFX/source/bin/libsmbclient.so $PKG.sw.base\n"; print IDB "f 0644 root sys usr/samba/lib/smb.conf $SRCPFX/packaging/SGI/smb.conf $PKG.sw.base config(suggest)\n"; print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n"; diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh index b3ad32487e3..f4febca220b 100755 --- a/packaging/SGI/mkrelease.sh +++ b/packaging/SGI/mkrelease.sh @@ -87,7 +87,7 @@ fi mv bin/smbd bin/smbd.noquota echo "===================== Making Regular versions =======================" -make -P "CFLAGS=-O -g3 -woff 1188" all +make -P "CFLAGS=-O -g3 -woff 1188" all libsmbclient errstat=$? if [ $errstat -ne 0 ]; then echo "Error $errstat building sources\n"; -- cgit From 6ceb487c7b5d519173816455db29a4abca3bda5f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Apr 2002 23:35:21 +0000 Subject: merge from HEAD --- source/rpcclient/rpcclient.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 9c996d14ac1..94fe45403fd 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -248,6 +248,50 @@ void fetch_machine_sid(struct cli_state *cli) exit(1); } +/* List the available commands on a given pipe */ + +static NTSTATUS cmd_listcommands(struct cli_state *cli, TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + struct cmd_list *tmp; + struct cmd_set *tmp_set; + int i; + + /* Usage */ + + if (argc != 2) { + printf("Usage: %s \n", argv[0]); + return NT_STATUS_OK; + } + + /* Help on one command */ + + for (tmp = cmd_list; tmp; tmp = tmp->next) + { + tmp_set = tmp->cmd_set; + + if (!StrCaseCmp(argv[1], tmp_set->name)) + { + printf("Available commands on the %s pipe:\n\n", tmp_set->name); + + i = 0; + tmp_set++; + while(tmp_set->name) { + printf("%20s", tmp_set->name); + tmp_set++; + i++; + if (i%4 == 0) + printf("\n"); + } + + /* drop out of the loop */ + break; + } + } + printf("\n\n"); + + return NT_STATUS_OK; +} /* Display help on commands */ @@ -344,6 +388,7 @@ static struct cmd_set rpcclient_commands[] = { { "help", cmd_help, NULL, "Get help on commands", "[command]" }, { "?", cmd_help, NULL, "Get help on commands", "[command]" }, { "debuglevel", cmd_debuglevel, NULL, "Set debug level", "level" }, + { "list", cmd_listcommands, NULL, "List available commands on ", "pipe" }, { "exit", cmd_quit, NULL, "Exit program", "" }, { "quit", cmd_quit, NULL, "Exit program", "" }, -- cgit From 6f9b7491669ef0ff5fb804df26bbb6ed3361f606 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Apr 2002 02:08:56 +0000 Subject: Removed --with-vfs - always built if available. Jeremy. --- source/configure | 1533 +++++++++++++++++++++++++-------------------------- source/configure.in | 19 - 2 files changed, 752 insertions(+), 800 deletions(-) diff --git a/source/configure b/source/configure index 517ffc90165..79cc3011271 100755 --- a/source/configure +++ b/source/configure @@ -70,8 +70,6 @@ ac_help="$ac_help --with-utmp Include experimental utmp accounting (default=no)" ac_help="$ac_help --with-msdfs Include MS Dfs support (default=no)" -ac_help="$ac_help - --with-vfs Include Samba vfs support (default=no)" ac_help="$ac_help --with-libsmbclient Build the libsmbclient shared library (default=no)" ac_help="$ac_help @@ -778,7 +776,7 @@ fi # 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:782: checking for $ac_word" >&5 +echo "configure:780: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -808,7 +806,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:812: checking for $ac_word" >&5 +echo "configure:810: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -859,7 +857,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:863: checking for $ac_word" >&5 +echo "configure:861: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -891,7 +889,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:895: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -902,12 +900,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 906 "configure" +#line 904 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:909: \"$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 @@ -933,12 +931,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:935: checking whether the C compiler ($CC $CFLAGS $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:942: checking whether we are using GNU C" >&5 +echo "configure:940: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -947,7 +945,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:951: \"$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:949: \"$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 @@ -966,7 +964,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:970: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:968: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1028,7 +1026,7 @@ ac_configure=$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:1032: checking for a BSD compatible install" >&5 +echo "configure:1030: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1085,7 +1083,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:1089: checking for $ac_word" >&5 +echo "configure:1087: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1117,10 +1115,10 @@ done 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:1121: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1119: 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:1124: checking whether cc understands -c and -o together" >&5 +echo "configure:1122: 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]/_/'`" @@ -1132,16 +1130,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:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1135: \"$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:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1140: \"$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:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1175,20 +1173,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1179: checking that the C compiler understands volatile" >&5 +echo "configure:1177: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1238,7 +1236,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1242: checking host system type" >&5 +echo "configure:1240: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1259,7 +1257,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1263: checking target system type" >&5 +echo "configure:1261: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1277,7 +1275,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1281: checking build system type" >&5 +echo "configure:1279: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1311,7 +1309,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1315: checking config.cache system type" >&5 +echo "configure:1313: 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" && @@ -1338,7 +1336,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:1342: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1340: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1441,14 +1439,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1445: checking for LFS support" >&5 +echo "configure:1443: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1460,7 +1458,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1487,14 +1485,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1491: checking for LFS support" >&5 +echo "configure:1489: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1532,7 +1530,7 @@ main() { } EOF -if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1553,14 +1551,14 @@ fi *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1557: checking for LFS support" >&5 +echo "configure:1555: 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 < @@ -1572,7 +1570,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1574: \"$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 @@ -1594,21 +1592,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1598: checking for inline" >&5 +echo "configure:1596: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1634,7 +1632,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1638: checking how to run the C preprocessor" >&5 +echo "configure:1636: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1649,13 +1647,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1657: \"$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 : @@ -1666,13 +1664,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1674: \"$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 : @@ -1683,13 +1681,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1691: \"$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 : @@ -1714,12 +1712,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1718: checking for ANSI C header files" >&5 +echo "configure:1716: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1727,7 +1725,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1729: \"$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* @@ -1744,7 +1742,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 @@ -1762,7 +1760,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 @@ -1783,7 +1781,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1794,7 +1792,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1822,12 +1820,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:1826: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1824: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1835,7 +1833,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1860,7 +1858,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:1864: checking for opendir in -ldir" >&5 +echo "configure:1862: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1868,7 +1866,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1881: \"$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 @@ -1901,7 +1899,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1905: checking for opendir in -lx" >&5 +echo "configure:1903: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1909,7 +1907,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1922: \"$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 @@ -1943,12 +1941,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1947: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1945: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1957,7 +1955,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1978,12 +1976,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1982: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1980: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1999,7 +1997,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2023,17 +2021,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:2027: checking for $ac_hdr" >&5 +echo "configure:2025: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2035: \"$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* @@ -2063,17 +2061,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2067: checking for $ac_hdr" >&5 +echo "configure:2065: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2075: \"$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* @@ -2103,17 +2101,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2107: checking for $ac_hdr" >&5 +echo "configure:2105: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2115: \"$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* @@ -2143,17 +2141,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2147: checking for $ac_hdr" >&5 +echo "configure:2145: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2155: \"$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* @@ -2183,17 +2181,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2187: checking for $ac_hdr" >&5 +echo "configure:2185: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2195: \"$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* @@ -2223,17 +2221,17 @@ for ac_hdr in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/f do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2227: checking for $ac_hdr" >&5 +echo "configure:2225: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2235: \"$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* @@ -2263,17 +2261,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2267: checking for $ac_hdr" >&5 +echo "configure:2265: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2275: \"$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* @@ -2303,17 +2301,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2307: checking for $ac_hdr" >&5 +echo "configure:2305: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2315: \"$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* @@ -2347,14 +2345,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2376,17 +2374,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2380: checking for $ac_hdr" >&5 +echo "configure:2378: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2388: \"$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* @@ -2416,17 +2414,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2420: checking for $ac_hdr" >&5 +echo "configure:2418: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2428: \"$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* @@ -2456,17 +2454,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2460: checking for $ac_hdr" >&5 +echo "configure:2458: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2468: \"$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* @@ -2496,17 +2494,17 @@ for ac_hdr in 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:2500: checking for $ac_hdr" >&5 +echo "configure:2498: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2508: \"$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* @@ -2536,17 +2534,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:2540: checking for $ac_hdr" >&5 +echo "configure:2538: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2548: \"$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* @@ -2578,17 +2576,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2582: checking for $ac_hdr" >&5 +echo "configure:2580: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2590: \"$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* @@ -2620,17 +2618,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2624: checking for $ac_hdr" >&5 +echo "configure:2622: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2632: \"$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* @@ -2662,17 +2660,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2666: checking for $ac_hdr" >&5 +echo "configure:2664: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2674: \"$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* @@ -2700,7 +2698,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2704: checking size of int" >&5 +echo "configure:2702: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2708,7 +2706,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < int main() @@ -2719,7 +2717,7 @@ int main() return(0); } EOF -if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2721: \"$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 @@ -2739,7 +2737,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2743: checking size of long" >&5 +echo "configure:2741: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2747,7 +2745,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < int main() @@ -2758,7 +2756,7 @@ int main() return(0); } EOF -if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2760: \"$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 @@ -2778,7 +2776,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2782: checking size of short" >&5 +echo "configure:2780: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2786,7 +2784,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < int main() @@ -2797,7 +2795,7 @@ int main() return(0); } EOF -if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2799: \"$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 @@ -2818,12 +2816,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2822: checking for working const" >&5 +echo "configure:2820: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2893,21 +2891,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2897: checking for inline" >&5 +echo "configure:2895: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2933,14 +2931,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2937: checking whether byte ordering is bigendian" >&5 +echo "configure:2935: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2951,11 +2949,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2953: \"$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 < #include @@ -2966,7 +2964,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2986,7 +2984,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3001: \"$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 @@ -3023,14 +3021,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3027: checking whether char is unsigned" >&5 +echo "configure:3025: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3064: \"$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 @@ -3087,12 +3085,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3091: checking return type of signal handlers" >&5 +echo "configure:3089: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3109,7 +3107,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3128,12 +3126,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3132: checking for uid_t in sys/types.h" >&5 +echo "configure:3130: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3162,12 +3160,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3166: checking for mode_t" >&5 +echo "configure:3164: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3195,12 +3193,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3199: checking for off_t" >&5 +echo "configure:3197: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3228,12 +3226,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3232: checking for size_t" >&5 +echo "configure:3230: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3261,12 +3259,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3265: checking for pid_t" >&5 +echo "configure:3263: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3294,12 +3292,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3298: checking for st_rdev in struct stat" >&5 +echo "configure:3296: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3307,7 +3305,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3328,12 +3326,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3332: checking for d_off in dirent" >&5 +echo "configure:3330: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3343,7 +3341,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3364,12 +3362,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3368: checking for ino_t" >&5 +echo "configure:3366: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3397,12 +3395,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3401: checking for loff_t" >&5 +echo "configure:3399: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3430,12 +3428,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3434: checking for offset_t" >&5 +echo "configure:3432: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3463,12 +3461,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3467: checking for ssize_t" >&5 +echo "configure:3465: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3496,12 +3494,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3500: checking for wchar_t" >&5 +echo "configure:3498: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3533,7 +3531,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3537: checking for httpConnect in -lcups" >&5 +echo "configure:3535: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3541,7 +3539,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3554: \"$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 @@ -3587,17 +3585,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3591: checking for $ac_hdr" >&5 +echo "configure:3589: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3599: \"$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* @@ -3636,7 +3634,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3640: checking for dlopen in -ldl" >&5 +echo "configure:3638: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3644,7 +3642,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3657: \"$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 @@ -3683,13 +3681,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3687: checking for immediate structures" >&5 +echo "configure:3685: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3707,7 +3705,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3730,13 +3728,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3734: checking for unix domain sockets" >&5 +echo "configure:3732: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3751,7 +3749,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3772,13 +3770,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3776: checking for socklen_t type" >&5 +echo "configure:3774: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3791,7 +3789,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3812,13 +3810,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3816: checking for sig_atomic_t type" >&5 +echo "configure:3814: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3831,7 +3829,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3854,20 +3852,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3858: checking for errno declaration" >&5 +echo "configure:3856: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3889,20 +3887,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3893: checking for setresuid declaration" >&5 +echo "configure:3891: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3924,20 +3922,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3928: checking for setresgid declaration" >&5 +echo "configure:3926: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3959,20 +3957,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3963: checking for asprintf declaration" >&5 +echo "configure:3961: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3994,20 +3992,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:3998: checking for vasprintf declaration" >&5 +echo "configure:3996: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4029,20 +4027,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4033: checking for vsnprintf declaration" >&5 +echo "configure:4031: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4064,20 +4062,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4068: checking for snprintf declaration" >&5 +echo "configure:4066: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4101,7 +4099,7 @@ EOF # 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:4105: checking for real setresuid" >&5 +echo "configure:4103: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4110,12 +4108,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4117: \"$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 @@ -4140,7 +4138,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4144: checking for real setresgid" >&5 +echo "configure:4142: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4149,13 +4147,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4157: \"$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 @@ -4178,7 +4176,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4182: checking for 8-bit clean memcmp" >&5 +echo "configure:4180: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4186,7 +4184,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4198: \"$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 @@ -4220,7 +4218,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4224: checking whether to use readline" >&5 +echo "configure:4222: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4232,17 +4230,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4236: checking for $ac_hdr" >&5 +echo "configure:4234: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4244: \"$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* @@ -4272,17 +4270,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4276: checking for $ac_hdr" >&5 +echo "configure:4274: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4284: \"$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* @@ -4313,17 +4311,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4317: checking for $ac_hdr" >&5 +echo "configure:4315: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4325: \"$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* @@ -4346,7 +4344,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4350: checking for tgetent in -l${termlib}" >&5 +echo "configure:4348: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4354,7 +4352,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4367: \"$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 @@ -4387,7 +4385,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4391: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4389: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4395,7 +4393,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4408: \"$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 @@ -4457,17 +4455,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4461: checking for $ac_hdr" >&5 +echo "configure:4459: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4469: \"$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* @@ -4497,17 +4495,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4501: checking for $ac_hdr" >&5 +echo "configure:4499: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4509: \"$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* @@ -4538,17 +4536,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4542: checking for $ac_hdr" >&5 +echo "configure:4540: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4550: \"$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* @@ -4571,7 +4569,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4575: checking for tgetent in -l${termlib}" >&5 +echo "configure:4573: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4579,7 +4577,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4592: \"$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 @@ -4612,7 +4610,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4616: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4614: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4620,7 +4618,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4633: \"$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 @@ -4686,12 +4684,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4690: checking for $ac_func" >&5 +echo "configure:4688: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4716: \"$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 @@ -4742,7 +4740,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:4746: checking for printf in -lnsl_s" >&5 +echo "configure:4744: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4750,7 +4748,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4763: \"$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 @@ -4792,7 +4790,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4796: checking for printf in -lnsl" >&5 +echo "configure:4794: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4800,7 +4798,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4813: \"$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 @@ -4842,7 +4840,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4846: checking for connect in -lsocket" >&5 +echo "configure:4844: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4850,7 +4848,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4863: \"$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 @@ -4892,7 +4890,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4896: checking for connect in -linet" >&5 +echo "configure:4894: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4900,7 +4898,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4913: \"$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 @@ -4955,12 +4953,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4959: checking for $ac_func" >&5 +echo "configure:4957: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4985: \"$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 @@ -5009,7 +5007,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5013: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5011: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5017,7 +5015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5030: \"$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 @@ -5058,12 +5056,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5062: checking for $ac_func" >&5 +echo "configure:5060: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5088: \"$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 @@ -5119,12 +5117,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5123: checking for $ac_func" >&5 +echo "configure:5121: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5149: \"$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 @@ -5174,12 +5172,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5178: checking for $ac_func" >&5 +echo "configure:5176: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5204: \"$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 @@ -5229,12 +5227,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5233: checking for $ac_func" >&5 +echo "configure:5231: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5259: \"$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 @@ -5284,12 +5282,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5288: checking for $ac_func" >&5 +echo "configure:5286: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5314: \"$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 @@ -5339,12 +5337,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5343: checking for $ac_func" >&5 +echo "configure:5341: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5369: \"$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 @@ -5394,12 +5392,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5398: checking for $ac_func" >&5 +echo "configure:5396: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5424: \"$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 @@ -5449,12 +5447,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5453: checking for $ac_func" >&5 +echo "configure:5451: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -5504,12 +5502,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5508: checking for $ac_func" >&5 +echo "configure:5506: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5534: \"$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 @@ -5559,12 +5557,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5563: checking for $ac_func" >&5 +echo "configure:5561: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5589: \"$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 @@ -5614,12 +5612,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5618: checking for $ac_func" >&5 +echo "configure:5616: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5644: \"$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 @@ -5671,12 +5669,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5675: checking for $ac_func" >&5 +echo "configure:5673: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5701: \"$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 @@ -5727,12 +5725,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:5731: checking for $ac_func" >&5 +echo "configure:5729: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5757: \"$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 @@ -5782,12 +5780,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:5786: checking for $ac_func" >&5 +echo "configure:5784: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5812: \"$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 @@ -5837,12 +5835,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5841: checking for $ac_func" >&5 +echo "configure:5839: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5867: \"$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 @@ -5892,12 +5890,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5896: checking for $ac_func" >&5 +echo "configure:5894: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5922: \"$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 @@ -5947,12 +5945,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:5951: checking for $ac_func" >&5 +echo "configure:5949: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5977: \"$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 @@ -6002,12 +6000,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:6006: checking for $ac_func" >&5 +echo "configure:6004: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6032: \"$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 @@ -6057,12 +6055,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:6061: checking for $ac_func" >&5 +echo "configure:6059: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6087: \"$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 @@ -6112,12 +6110,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:6116: checking for $ac_func" >&5 +echo "configure:6114: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6142: \"$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 @@ -6167,12 +6165,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6171: checking for $ac_func" >&5 +echo "configure:6169: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6197: \"$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 @@ -6222,12 +6220,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:6226: checking for $ac_func" >&5 +echo "configure:6224: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6252: \"$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 @@ -6277,12 +6275,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:6281: checking for $ac_func" >&5 +echo "configure:6279: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6307: \"$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 @@ -6332,12 +6330,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:6336: checking for $ac_func" >&5 +echo "configure:6334: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6362: \"$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 @@ -6387,12 +6385,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:6391: checking for $ac_func" >&5 +echo "configure:6389: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6417: \"$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 @@ -6442,12 +6440,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6446: checking for $ac_func" >&5 +echo "configure:6444: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6472: \"$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 @@ -6501,9 +6499,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6505: checking for stat64 in " >&5 +echo "configure:6503: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6534,9 +6532,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6538: checking for lstat64 in " >&5 +echo "configure:6536: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6567,9 +6565,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6571: checking for fstat64 in " >&5 +echo "configure:6569: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6606,7 +6604,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6610: checking for strcasecmp in -lresolv" >&5 +echo "configure:6608: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6614,7 +6612,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6627: \"$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 @@ -6661,12 +6659,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6665: checking for $ac_func" >&5 +echo "configure:6663: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6691: \"$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 @@ -6714,7 +6712,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6718: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6716: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6722,7 +6720,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6735: \"$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 @@ -6763,12 +6761,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6767: checking for $ac_func" >&5 +echo "configure:6765: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6793: \"$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 @@ -6822,12 +6820,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6826: checking for $ac_func" >&5 +echo "configure:6824: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6852: \"$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 @@ -6875,7 +6873,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6879: checking for putprpwnam in -lsec" >&5 +echo "configure:6877: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6883,7 +6881,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6896: \"$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 @@ -6924,12 +6922,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6928: checking for $ac_func" >&5 +echo "configure:6926: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6954: \"$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 @@ -6984,12 +6982,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:6988: checking for $ac_func" >&5 +echo "configure:6986: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7014: \"$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 @@ -7037,7 +7035,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7041: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7039: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7045,7 +7043,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7058: \"$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 @@ -7086,12 +7084,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7090: checking for $ac_func" >&5 +echo "configure:7088: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7116: \"$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 @@ -7145,12 +7143,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:7149: checking for $ac_func" >&5 +echo "configure:7147: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7175: \"$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 @@ -7198,7 +7196,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7202: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7200: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7206,7 +7204,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7219: \"$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 @@ -7247,12 +7245,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7251: checking for $ac_func" >&5 +echo "configure:7249: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7277: \"$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 @@ -7308,12 +7306,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7312: checking for $ac_func" >&5 +echo "configure:7310: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7338: \"$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 @@ -7361,7 +7359,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7365: checking for getspnam in -lgen" >&5 +echo "configure:7363: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7369,7 +7367,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7382: \"$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 @@ -7410,12 +7408,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7414: checking for $ac_func" >&5 +echo "configure:7412: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7440: \"$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 @@ -7470,12 +7468,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7474: checking for $ac_func" >&5 +echo "configure:7472: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7500: \"$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 @@ -7523,7 +7521,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7527: checking for getspnam in -lsecurity" >&5 +echo "configure:7525: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7531,7 +7529,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7544: \"$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 @@ -7572,12 +7570,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7576: checking for $ac_func" >&5 +echo "configure:7574: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7602: \"$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 @@ -7631,12 +7629,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7635: checking for $ac_func" >&5 +echo "configure:7633: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7661: \"$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 @@ -7684,7 +7682,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7688: checking for getspnam in -lsec" >&5 +echo "configure:7686: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7692,7 +7690,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7705: \"$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 @@ -7733,12 +7731,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7737: checking for $ac_func" >&5 +echo "configure:7735: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7763: \"$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 @@ -7793,12 +7791,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7797: checking for $ac_func" >&5 +echo "configure:7795: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7823: \"$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 @@ -7846,7 +7844,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7850: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7848: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7854,7 +7852,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7867: \"$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 @@ -7895,12 +7893,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7899: checking for $ac_func" >&5 +echo "configure:7897: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7925: \"$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 @@ -7954,12 +7952,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7958: checking for $ac_func" >&5 +echo "configure:7956: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7984: \"$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 @@ -8007,7 +8005,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8011: checking for bigcrypt in -lsec" >&5 +echo "configure:8009: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8015,7 +8013,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8028: \"$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 @@ -8056,12 +8054,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8060: checking for $ac_func" >&5 +echo "configure:8058: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8086: \"$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 @@ -8116,12 +8114,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8120: checking for $ac_func" >&5 +echo "configure:8118: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8146: \"$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 @@ -8169,7 +8167,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8173: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8171: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8177,7 +8175,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8190: \"$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 @@ -8218,12 +8216,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8222: checking for $ac_func" >&5 +echo "configure:8220: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8248: \"$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 @@ -8277,12 +8275,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8281: checking for $ac_func" >&5 +echo "configure:8279: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8307: \"$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 @@ -8330,7 +8328,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8334: checking for getprpwnam in -lsec" >&5 +echo "configure:8332: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8338,7 +8336,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8351: \"$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 @@ -8379,12 +8377,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8383: checking for $ac_func" >&5 +echo "configure:8381: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8409: \"$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 @@ -8450,7 +8448,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8454: checking ability to build shared libraries" >&5 +echo "configure:8452: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8588,7 +8586,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:8592: checking for $ac_word" >&5 +echo "configure:8590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8644,15 +8642,15 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8648: checking linker flags for shared libraries" >&5 +echo "configure:8646: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8651: checking compiler flags for position-independent code" >&5 +echo "configure:8649: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8656: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8654: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8672,7 +8670,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:8676: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8674: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8693,7 +8691,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:8697: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8695: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8716,7 +8714,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8720: checking for long long" >&5 +echo "configure:8718: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8725,12 +8723,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8732: \"$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 @@ -8757,20 +8755,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8761: checking for LL suffix on long long integers" >&5 +echo "configure:8759: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8792,7 +8790,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8796: checking for 64 bit off_t" >&5 +echo "configure:8794: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8801,13 +8799,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8809: \"$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 @@ -8830,7 +8828,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8834: checking for off64_t" >&5 +echo "configure:8832: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8839,7 +8837,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8851: \"$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 @@ -8872,7 +8870,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8876: checking for 64 bit ino_t" >&5 +echo "configure:8874: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8881,13 +8879,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8889: \"$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 @@ -8910,7 +8908,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8914: checking for ino64_t" >&5 +echo "configure:8912: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8919,7 +8917,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8931: \"$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 @@ -8952,7 +8950,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8956: checking for dev64_t" >&5 +echo "configure:8954: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8961,7 +8959,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8994,13 +8992,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8998: checking for struct dirent64" >&5 +echo "configure:8996: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9033,7 +9031,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9037: checking for major macro" >&5 +echo "configure:9035: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9042,7 +9040,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9074,7 +9072,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9078: checking for minor macro" >&5 +echo "configure:9076: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9083,7 +9081,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9115,7 +9113,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9119: checking for makedev macro" >&5 +echo "configure:9117: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9124,7 +9122,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MAKEDEV_FN=yes else @@ -9156,7 +9154,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9160: checking for unsigned char" >&5 +echo "configure:9158: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9165,12 +9163,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9172: \"$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 @@ -9193,13 +9191,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9197: checking for sin_len in sock" >&5 +echo "configure:9195: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9208,7 +9206,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9229,13 +9227,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9233: checking whether seekdir returns void" >&5 +echo "configure:9231: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9244,7 +9242,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9265,20 +9263,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9269: checking for __FILE__ macro" >&5 +echo "configure:9267: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9299,20 +9297,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9303: checking for __FUNCTION__ macro" >&5 +echo "configure:9301: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9333,7 +9331,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9337: checking if gettimeofday takes tz argument" >&5 +echo "configure:9335: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9342,14 +9340,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9351: \"$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 @@ -9372,7 +9370,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9376: checking for C99 vsnprintf" >&5 +echo "configure:9374: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9381,7 +9379,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9408,7 +9406,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } 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:9410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9431,7 +9429,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9435: checking for broken readdir" >&5 +echo "configure:9433: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9440,7 +9438,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9448,7 +9446,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:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9450: \"$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 @@ -9471,13 +9469,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9475: checking for utimbuf" >&5 +echo "configure:9473: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9485,7 +9483,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9509,12 +9507,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9513: checking for $ac_func" >&5 +echo "configure:9511: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9539: \"$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 @@ -9563,13 +9561,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9567: checking for ut_name in utmp" >&5 +echo "configure:9565: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9577,7 +9575,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9598,13 +9596,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9602: checking for ut_user in utmp" >&5 +echo "configure:9600: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9612,7 +9610,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9633,13 +9631,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9637: checking for ut_id in utmp" >&5 +echo "configure:9635: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9647,7 +9645,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9668,13 +9666,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9672: checking for ut_host in utmp" >&5 +echo "configure:9670: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9682,7 +9680,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9703,13 +9701,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9707: checking for ut_time in utmp" >&5 +echo "configure:9705: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9717,7 +9715,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9738,13 +9736,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9742: checking for ut_tv in utmp" >&5 +echo "configure:9740: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9752,7 +9750,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9773,13 +9771,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9777: checking for ut_type in utmp" >&5 +echo "configure:9775: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9787,7 +9785,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9808,13 +9806,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9812: checking for ut_pid in utmp" >&5 +echo "configure:9810: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9822,7 +9820,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9843,13 +9841,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9847: checking for ut_exit in utmp" >&5 +echo "configure:9845: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9857,7 +9855,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9878,13 +9876,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9882: checking for ut_addr in utmp" >&5 +echo "configure:9880: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9892,7 +9890,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9914,13 +9912,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9918: checking whether pututline returns pointer" >&5 +echo "configure:9916: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9928,7 +9926,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9950,13 +9948,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9954: checking for ut_syslen in utmpx" >&5 +echo "configure:9952: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9964,7 +9962,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9985,7 +9983,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9989: checking for Linux kernel oplocks" >&5 +echo "configure:9987: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9994,7 +9992,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10008,7 +10006,7 @@ main() { } EOF -if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10031,7 +10029,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10035: checking for kernel change notify support" >&5 +echo "configure:10033: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10040,7 +10038,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10054,7 +10052,7 @@ main() { } EOF -if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10077,7 +10075,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10081: checking for kernel share modes" >&5 +echo "configure:10079: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10086,7 +10084,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10102,7 +10100,7 @@ main() { } EOF -if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10128,13 +10126,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10132: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10130: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10142,7 +10140,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:10146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10163,7 +10161,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10167: checking for irix specific capabilities" >&5 +echo "configure:10165: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10172,7 +10170,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10187,7 +10185,7 @@ main() { } EOF -if { (eval echo configure:10191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10189: \"$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 @@ -10215,13 +10213,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10219: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10217: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10231,7 +10229,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10252,13 +10250,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10256: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10254: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10268,7 +10266,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10289,13 +10287,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10293: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10291: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10305,7 +10303,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10326,13 +10324,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10330: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10328: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10342,7 +10340,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10364,13 +10362,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10368: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10366: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10384,7 +10382,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10405,16 +10403,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10409: checking for test routines" >&5 +echo "configure:10407: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10416: \"$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 @@ -10428,7 +10426,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10432: checking for ftruncate extend" >&5 +echo "configure:10430: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10437,11 +10435,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10443: \"$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 @@ -10464,7 +10462,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10468: checking for broken getgroups" >&5 +echo "configure:10466: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10473,11 +10471,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10479: \"$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 @@ -10500,7 +10498,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10504: checking whether getpass should be replaced" >&5 +echo "configure:10502: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10508,7 +10506,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10544,7 +10542,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10548: checking for broken inet_ntoa" >&5 +echo "configure:10546: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10553,7 +10551,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10567,7 +10565,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:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10569: \"$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 @@ -10590,7 +10588,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10594: checking for secure mkstemp" >&5 +echo "configure:10592: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10599,7 +10597,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10616,7 +10614,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10639,7 +10637,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10643: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10641: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10648,12 +10646,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10676,7 +10674,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10680: checking for root" >&5 +echo "configure:10678: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10685,11 +10683,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10691: \"$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 @@ -10717,7 +10715,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10721: checking for iface AIX" >&5 +echo "configure:10719: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10726,7 +10724,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10758,7 +10756,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10762: checking for iface ifconf" >&5 +echo "configure:10760: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10767,7 +10765,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10800,7 +10798,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10804: checking for iface ifreq" >&5 +echo "configure:10802: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10809,7 +10807,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10846,7 +10844,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10850: checking for setresuid" >&5 +echo "configure:10848: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10855,7 +10853,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10865: \"$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 @@ -10889,7 +10887,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10893: checking for setreuid" >&5 +echo "configure:10891: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10898,7 +10896,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10908: \"$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 @@ -10931,7 +10929,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10935: checking for seteuid" >&5 +echo "configure:10933: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10940,7 +10938,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10950: \"$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 @@ -10973,7 +10971,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10977: checking for setuidx" >&5 +echo "configure:10975: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10982,7 +10980,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10992: \"$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 @@ -11015,7 +11013,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11019: checking for working mmap" >&5 +echo "configure:11017: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11024,11 +11022,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11051,7 +11049,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11055: checking for ftruncate needs root" >&5 +echo "configure:11053: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11060,11 +11058,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11087,7 +11085,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11091: checking for fcntl locking" >&5 +echo "configure:11089: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11096,11 +11094,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11102: \"$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 @@ -11123,7 +11121,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11127: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11125: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11132,11 +11130,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11161,7 +11159,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11165: checking for 64 bit fcntl locking" >&5 +echo "configure:11163: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11170,7 +11168,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11196: \"$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 @@ -11219,13 +11217,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11223: checking for st_blocks in struct stat" >&5 +echo "configure:11221: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11234,7 +11232,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11257,13 +11255,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11261: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11259: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11300,13 +11298,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11304: checking for broken nisplus include files" >&5 +echo "configure:11302: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11316,7 +11314,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11340,7 +11338,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11344: checking whether to use smbwrapper" >&5 +echo "configure:11342: 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" @@ -11387,7 +11385,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11391: checking whether to use AFS" >&5 +echo "configure:11389: 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" @@ -11413,7 +11411,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11417: checking whether to use DCE/DFS auth" >&5 +echo "configure:11415: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11438,7 +11436,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11442: checking whether to use Kerberos IV" >&5 +echo "configure:11440: 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" @@ -11450,7 +11448,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11454: checking for dn_expand in -lresolv" >&5 +echo "configure:11452: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11458,7 +11456,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11471: \"$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 @@ -11513,7 +11511,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11517: checking whether to use Kerberos 5" >&5 +echo "configure:11515: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11541,7 +11539,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11545: checking whether to use AUTOMOUNT" >&5 +echo "configure:11543: 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" @@ -11566,7 +11564,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11570: checking whether to use SMBMOUNT" >&5 +echo "configure:11568: 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" @@ -11603,7 +11601,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11607: checking whether to use PAM password database" >&5 +echo "configure:11605: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11629,7 +11627,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11633: checking for pam_get_data in -lpam" >&5 +echo "configure:11631: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11637,7 +11635,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11650: \"$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 @@ -11675,7 +11673,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11679: checking whether to use pam_smbpass" >&5 +echo "configure:11677: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11717,12 +11715,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11721: checking for $ac_func" >&5 +echo "configure:11719: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11747: \"$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 @@ -11771,7 +11769,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:11775: checking for crypt in -lcrypt" >&5 +echo "configure:11773: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11779,7 +11777,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11792: \"$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 @@ -11825,7 +11823,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11829: checking for a crypt that needs truncated salt" >&5 +echo "configure:11827: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11834,11 +11832,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11876,7 +11874,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11880: checking whether to use TDB SAM database" >&5 +echo "configure:11878: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11902,7 +11900,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11906: checking whether to use LDAP SAM database" >&5 +echo "configure:11904: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11929,7 +11927,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11933: checking whether to use NISPLUS SAM database" >&5 +echo "configure:11931: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11957,7 +11955,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11961: checking whether to use traditional smbpasswd file" >&5 +echo "configure:11959: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11979,7 +11977,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11983: checking whether to use NISPLUS_HOME" >&5 +echo "configure:11981: 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" @@ -12004,7 +12002,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12008: checking whether to use SSL" >&5 +echo "configure:12006: 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" @@ -12078,7 +12076,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12082: checking whether to use syslog logging" >&5 +echo "configure:12080: 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" @@ -12103,7 +12101,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12107: checking whether to use profiling" >&5 +echo "configure:12105: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12131,7 +12129,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12135: checking whether to support disk-quotas" >&5 +echo "configure:12133: 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" @@ -12143,13 +12141,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12147: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12145: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12161,7 +12159,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12205,7 +12203,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12209: checking whether to support utmp accounting" >&5 +echo "configure:12207: 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" @@ -12231,7 +12229,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12235: checking whether to support Microsoft Dfs" >&5 +echo "configure:12233: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12253,40 +12251,13 @@ else fi -################################################# -# check for Samba VFS support - -echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6 -echo "configure:12261: checking whether to support the experimental Samba vfs" >&5 -# Check whether --with-vfs or --without-vfs was given. -if test "${with_vfs+set}" = set; then - withval="$with_vfs" - case "$withval" in - yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_VFS 1 -EOF - - ;; - *) - echo "$ac_t""no" 1>&6 - ;; - esac -else - echo "$ac_t""no" 1>&6 - -fi - - - ################################################# # should we build libsmbclient? LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12290: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12261: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12313,14 +12284,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12317: checking how to get filesystem space usage" >&5 +echo "configure:12288: 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:12324: checking statvfs64 function (SVR4)" >&5 +echo "configure:12295: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12328,7 +12299,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12317: \"$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 @@ -12375,12 +12346,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12379: checking statvfs function (SVR4)" >&5 +echo "configure:12350: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12388,7 +12359,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12363: \"$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 @@ -12413,7 +12384,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:12417: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12388: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12421,7 +12392,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12434,7 +12405,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12409: \"$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 @@ -12461,7 +12432,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:12465: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12436: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12469,7 +12440,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12463: \"$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 @@ -12515,7 +12486,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:12519: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12490: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12523,7 +12494,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12533,7 +12504,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12508: \"$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 @@ -12560,7 +12531,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:12564: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12535: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12568,7 +12539,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12584,7 +12555,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12559: \"$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 @@ -12611,7 +12582,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:12615: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12586: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12619,7 +12590,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12639,7 +12610,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12614: \"$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 @@ -12672,9 +12643,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12676: checking if large file support can be enabled" >&5 +echo "configure:12647: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12754,7 +12725,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12758: checking whether to support ACLs" >&5 +echo "configure:12729: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12807,7 +12778,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12811: checking for acl_get_file in -lacl" >&5 +echo "configure:12782: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12815,7 +12786,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12801: \"$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 @@ -12854,13 +12825,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12858: checking for ACL support" >&5 +echo "configure:12829: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12868,7 +12839,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12888,13 +12859,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12892: checking for acl_get_perm_np" >&5 +echo "configure:12863: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12902,7 +12873,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12957,7 +12928,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12961: checking whether to build winbind" >&5 +echo "configure:12932: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13059,7 +13030,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13063: checking for poptGetContext in -lpopt" >&5 +echo "configure:13034: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13067,7 +13038,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13053: \"$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 @@ -13102,7 +13073,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13106: checking whether to use included popt" >&5 +echo "configure:13077: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13117,16 +13088,16 @@ fi ################################################# # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13121: checking configure summary" >&5 +echo "configure:13092: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13101: \"$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 diff --git a/source/configure.in b/source/configure.in index 7f739308b21..77f0731982d 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2233,25 +2233,6 @@ AC_ARG_WITH(msdfs, AC_MSG_RESULT(no) ) -################################################# -# check for Samba VFS support - -AC_MSG_CHECKING(whether to support the experimental Samba vfs) -AC_ARG_WITH(vfs, -[ --with-vfs Include Samba vfs support (default=no)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_VFS) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - - ################################################# # should we build libsmbclient? -- cgit From 35c96c18041253dbb110cbdecf723147a56db663 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 3 Apr 2002 03:08:23 +0000 Subject: unneeded --- source/rpcclient/spoolss_cmds.c | 89 ----------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 source/rpcclient/spoolss_cmds.c diff --git a/source/rpcclient/spoolss_cmds.c b/source/rpcclient/spoolss_cmds.c deleted file mode 100644 index b010aa4874c..00000000000 --- a/source/rpcclient/spoolss_cmds.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB client - Copyright (C) Andrew Tridgell 1994-2000 - Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - - -/**************************************************************************** - This defines the commands supported by this client - ****************************************************************************/ -static const struct command_set spl_commands[] = { - /* - * printer testing - */ - - {"SPOOLSS", NULL, NULL, {NULL, NULL}}, - - {"spoolenum", cmd_spoolss_enum_printers, - "Enumerate Printers", - {NULL, NULL}}, - - {"spoolenumports", cmd_spoolss_enum_ports, - " Enumerate Ports", - {NULL, NULL}}, - - {"spoolenumdatas", cmd_spoolss_enum_printerdata, - " Enumerate Printer datas", - {NULL, NULL}}, - - {"spooljobs", cmd_spoolss_enum_jobs, - " Enumerate Printer Jobs", - {NULL, NULL}}, - - {"spoolopen", cmd_spoolss_open_printer_ex, - " Spool Printer Open Test", - {NULL, NULL}}, - - {"spoolgetdata", cmd_spoolss_getprinterdata, - " Spool Get Printer Data test", - {NULL, NULL}}, - - {"spoolgetprinter", cmd_spoolss_getprinter, - " Spool get printer", - {NULL, NULL}}, - - {"spoolgetprinterdriver", cmd_spoolss_getprinterdriver, - " Spool get printer driver", - {NULL, NULL}}, - - {"spoolgetprinterdriverdir", cmd_spoolss_getprinterdriverdir, - "Spool get printer driver directory", - {NULL, NULL}}, - - {"spooladdprinter", cmd_spoolss_addprinterex, - " Spool AddPrinterEx()", - {NULL, NULL}}, - - {"spooladdprinterdriver", cmd_spoolss_addprinterdriver, - " Spool AddPrinterDriver()", - {NULL, NULL}}, - - /* - * oop! - */ - {"", NULL, NULL, {NULL, NULL}} -}; - -void add_spl_commands(void) -{ - add_command_set(spl_commands); -} -- cgit From c8bba125d2ba5c262746d50453147f3736964485 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 3 Apr 2002 03:46:22 +0000 Subject: more rpcclient syncs with HEAD. Should not affect server functionality at all. Will perform some more testing tomorrow to make sure I haven't broken things.... --- source/include/proto.h | 29 ++- source/libsmb/cli_dfs.c | 3 +- source/libsmb/cli_lsarpc.c | 247 ++++++++++++++++++++++++- source/libsmb/cli_netlogon.c | 41 +++-- source/libsmb/cli_reg.c | 3 +- source/libsmb/cli_samr.c | 176 +++++++++++++++++- source/libsmb/cli_srvsvc.c | 3 +- source/rpc_parse/parse_net.c | 9 +- source/rpcclient/cmd_dfs.c | 3 +- source/rpcclient/cmd_lsarpc.c | 277 +++++++++++++++++++++++++++- source/rpcclient/cmd_netlogon.c | 9 +- source/rpcclient/cmd_samr.c | 380 +++++++++++++++++++++++++++++++++++++-- source/rpcclient/cmd_srvsvc.c | 3 +- source/rpcclient/cmd_wkssvc.c | 3 +- source/rpcclient/display_spool.c | 3 +- 15 files changed, 1125 insertions(+), 64 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 144a2f64add..548f4e15046 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -342,6 +342,16 @@ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, uint32 *num_sids, DOM_SID **sids); +NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, + POLICY_HND *user_pol); +NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *count, LUID_ATTR **set); +NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, LUID *luid); +NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 sec_info, + SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); /* The following definitions come from libsmb/climessage.c */ @@ -358,14 +368,15 @@ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, struct ntuser_creds *creds); NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal); -NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan, +NTSTATUS new_cli_net_auth2(struct cli_state *cli, + uint16 sec_chan, uint32 neg_flags, DOM_CHAL *srv_chal); NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, uint16 sec_chan, const unsigned char mach_pwd[16]); NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 query_level); -NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, +NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, uint32 database_id, uint32 *num_deltas, SAM_DELTA_HDR **hdr_deltas, SAM_DELTA_CTR **deltas); @@ -481,6 +492,9 @@ NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint32 *num_groups, DOM_GID **gid); +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids); NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *group_pol, uint32 *num_mem, uint32 **rid, uint32 **attr); @@ -488,6 +502,10 @@ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *start_idx, uint32 size, struct acct_info **dom_groups, uint32 *num_dom_groups); +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *alias_pol, uint32 *num_mem, DOM_SID **sids); @@ -523,6 +541,9 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, uchar sess_key[16], SAM_USERINFO_CTR *ctr); NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol); +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); /* The following definitions come from libsmb/clisecdesc.c */ @@ -2509,8 +2530,6 @@ BOOL change_trust_account_password( char *domain, char *remote_machine_list); /* The following definitions come from rpcclient/cmd_samr.c */ -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1); -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4); /* The following definitions come from rpcclient/cmd_spoolss.c */ @@ -2797,7 +2816,7 @@ BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int BOOL net_io_r_sam_logoff(char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth); BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name, const char *cli_name, DOM_CRED * cli_creds, - uint32 database_id); + DOM_CRED *ret_creds, uint32 database_id); BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps, int depth); BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info, diff --git a/source/libsmb/cli_dfs.c b/source/libsmb/cli_dfs.c index 83220fd1afc..312275926c7 100644 --- a/source/libsmb/cli_dfs.c +++ b/source/libsmb/cli_dfs.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000-2001, diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c index 30656b726b9..d1675023311 100644 --- a/source/libsmb/cli_lsarpc.c +++ b/source/libsmb/cli_lsarpc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000-2001, Copyright (C) Andrew Tridgell 1992-1997,2000, @@ -25,7 +24,7 @@ #include "includes.h" -/** @defgroup lsa LSA rpc client routines +/** @defgroup lsa LSA - Local Security Architecture * @ingroup rpc_client * * @{ @@ -109,7 +108,10 @@ NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -/** Open a LSA policy handle */ +/** Open a LSA policy handle + * + * @param cli Handle on an initialised SMB connection + */ NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL sec_qos, uint32 des_access, POLICY_HND *pol) @@ -132,10 +134,10 @@ NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (sec_qos) { init_lsa_sec_qos(&qos, 2, 1, 0); - init_q_open_pol2(&q, cli->clnt_name_slash, 0, des_access, + init_q_open_pol2(&q, cli->srv_name_slash, 0, des_access, &qos); } else { - init_q_open_pol2(&q, cli->clnt_name_slash, 0, des_access, + init_q_open_pol2(&q, cli->srv_name_slash, 0, des_access, NULL); } @@ -215,6 +217,8 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** Lookup a list of sids */ + NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, DOM_SID *sids, char ***domains, char ***names, uint32 **types, int *num_names) @@ -432,7 +436,9 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -/** Query info policy */ +/** Query info policy + * + * @param domain_sid - returned remote server's domain sid */ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint16 info_class, @@ -791,6 +797,8 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, goto done; } + if (r.sids.num_entries==0) + goto done; /* Return output parameters */ @@ -817,6 +825,231 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** Open a LSA user handle + * + * @param cli Handle on an initialised SMB connection */ + +NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, + POLICY_HND *user_pol) +{ + prs_struct qbuf, rbuf; + LSA_Q_OPENACCOUNT q; + LSA_R_OPENACCOUNT r; + NTSTATUS result; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_lsa_q_open_account(&q, dom_pol, sid, des_access); + + /* Marshall data and send request */ + + if (!lsa_io_q_open_account("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, LSA_OPENACCOUNT, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!lsa_io_r_open_account("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *user_pol = r.pol; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Enumerate user privileges + * + * @param cli Handle on an initialised SMB connection */ + +NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *count, LUID_ATTR **set) +{ + prs_struct qbuf, rbuf; + LSA_Q_ENUMPRIVSACCOUNT q; + LSA_R_ENUMPRIVSACCOUNT r; + NTSTATUS result; + int i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_lsa_q_enum_privsaccount(&q, pol); + + /* Marshall data and send request */ + + if (!lsa_io_q_enum_privsaccount("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, LSA_ENUMPRIVSACCOUNT, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!lsa_io_r_enum_privsaccount("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + if (r.count == 0) + goto done; + + if (!((*set = (LUID_ATTR *)talloc(mem_ctx, sizeof(LUID_ATTR) * r.count)))) { + DEBUG(0, ("(cli_lsa_enum_privsaccount): out of memory\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + for (i=0; isrv_name_slash, cli->clnt_name_slash + 2, - &clnt_creds, database_id); + &clnt_creds, ret_creds, database_id); /* Marshall data and send request */ @@ -327,6 +330,8 @@ NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, *hdr_deltas = r.hdr_deltas; *deltas = r.deltas; + memcpy(ret_creds, &r.srv_creds, sizeof(*ret_creds)); + done: prs_mem_free(&qbuf); prs_mem_free(&rbuf); @@ -438,7 +443,7 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, 0, /* param_ctrl */ 0xdead, 0xbeef, /* LUID? */ username, cli->clnt_name_slash, - (char *)cli->sess_key, lm_owf_user_pwd, + cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd); break; @@ -450,8 +455,8 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, generate_random_buffer(chal, 8, False); - SMBencrypt((unsigned char *)password, chal, local_lm_response); - SMBNTencrypt((unsigned char *)password, chal, local_nt_response); + SMBencrypt(password, chal, local_lm_response); + SMBNTencrypt(password, chal, local_nt_response); init_id_info2(&ctr.auth.id2, lp_workgroup(), 0, /* param_ctrl */ @@ -490,6 +495,9 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, result = r.status; done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + return result; } @@ -578,7 +586,12 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c return result; } -#if 0 +#if 0 /* JERRY */ + +/* + * Still using old implementation in rpc_client/cli_netlogon.c + */ + /*************************************************************************** LSA Server Password Set. ****************************************************************************/ @@ -662,4 +675,6 @@ password ?).\n", cli->desthost )); return nt_status; } -#endif + +#endif /* JERRY */ + diff --git a/source/libsmb/cli_reg.c b/source/libsmb/cli_reg.c index b88b3532ef7..c09ccabb29f 100644 --- a/source/libsmb/cli_reg.c +++ b/source/libsmb/cli_reg.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC Pipe client Copyright (C) Andrew Tridgell 1992-1998, diff --git a/source/libsmb/cli_samr.c b/source/libsmb/cli_samr.c index 4a04d678876..e5ddc8f7bd1 100644 --- a/source/libsmb/cli_samr.c +++ b/source/libsmb/cli_samr.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000-2001, Copyright (C) Andrew Tridgell 1992-1997,2000, @@ -407,6 +406,55 @@ NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/* Query user aliases */ + +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_USERALIASES q; + SAMR_R_QUERY_USERALIASES r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint ptr=1; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_useraliases(&q, user_pol, num_sids, &ptr, sid); + + if (!samr_io_q_query_useraliases("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_USERALIASES, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_query_useraliases("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *num_aliases = r.num_entries; + *als_rids = r.rid; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + /* Query user groups */ NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, @@ -534,6 +582,84 @@ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/* Enumerate domain groups */ + +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups) +{ + prs_struct qbuf, rbuf; + SAMR_Q_ENUM_DOM_ALIASES q; + SAMR_R_ENUM_DOM_ALIASES r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 name_idx, i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_enum_dom_aliases(&q, pol, *start_idx, size); + + if (!samr_io_q_enum_dom_aliases("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_ALIASES, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_enum_dom_aliases("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + result = r.status; + + if (!NT_STATUS_IS_OK(result) && + NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) { + goto done; + } + + *num_dom_groups = r.num_entries2; + + if (!((*dom_groups) = (struct acct_info *) + talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups); + + name_idx = 0; + + for (i = 0; i < *num_dom_groups; i++) { + + (*dom_groups)[i].rid = r.sam[i].rid; + + if (r.sam[i].hdr_name.buffer) { + unistr2_to_ascii((*dom_groups)[i].acct_name, + &r.uni_grp_name[name_idx], + sizeof(fstring) - 1); + name_idx++; + } + + *start_idx = r.next_idx; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + /* Query alias members */ NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, @@ -1082,3 +1208,49 @@ NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } + +/* Query user security object */ + +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_SEC_OBJ q; + SAMR_R_QUERY_SEC_OBJ r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_sec_obj(&q, user_pol, switch_value); + + if (!samr_io_q_query_sec_obj("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_SEC_OBJECT, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_query_sec_obj("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + result = r.status; + *sec_desc_buf=dup_sec_desc_buf(ctx, r.buf); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} diff --git a/source/libsmb/cli_srvsvc.c b/source/libsmb/cli_srvsvc.c index 17393c35460..9d33149540b 100644 --- a/source/libsmb/cli_srvsvc.c +++ b/source/libsmb/cli_srvsvc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. NT Domain Authentication SMB / MSRPC client Copyright (C) Andrew Tridgell 1994-2000 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c index e3f7ea5d9ae..a666258d0ce 100644 --- a/source/rpc_parse/parse_net.c +++ b/source/rpc_parse/parse_net.c @@ -1594,17 +1594,20 @@ makes a NET_Q_SAM_SYNC structure. ********************************************************************/ BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name, const char *cli_name, DOM_CRED * cli_creds, - uint32 database_id) + DOM_CRED *ret_creds, uint32 database_id) { DEBUG(5, ("init_q_sam_sync\n")); init_unistr2(&q_s->uni_srv_name, srv_name, strlen(srv_name) + 1); init_unistr2(&q_s->uni_cli_name, cli_name, strlen(cli_name) + 1); - if (cli_creds) { + if (cli_creds) memcpy(&q_s->cli_creds, cli_creds, sizeof(q_s->cli_creds)); + + if (cli_creds) + memcpy(&q_s->ret_creds, ret_creds, sizeof(q_s->ret_creds)); + else memset(&q_s->ret_creds, 0, sizeof(q_s->ret_creds)); - } q_s->database_id = database_id; q_s->restart_state = 0; diff --git a/source/rpcclient/cmd_dfs.c b/source/rpcclient/cmd_dfs.c index 78f68dcc86b..8a3c3e9db33 100644 --- a/source/rpcclient/cmd_dfs.c +++ b/source/rpcclient/cmd_dfs.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000 diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 13cab9aaef5..585a75df7dd 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000 @@ -93,8 +92,6 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, if (!NT_STATUS_IS_OK(result)) goto done; - /* Lookup the names */ - result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, (const char**)(argv + 1), &sids, &types, &num_names); @@ -225,6 +222,272 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, return result; } +/* Enumerates privileges */ + +static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + uint32 enum_context=0; + uint32 pref_max_length=0x1000; + uint32 count=0; + char **privs_name; + uint32 *privs_high; + uint32 *privs_low; + int i; + + if (argc > 3) { + printf("Usage: %s [enum context] [max length]\n", argv[0]); + return NT_STATUS_OK; + } + + if (argc>=2) + enum_context=atoi(argv[1]); + + if (argc==3) + pref_max_length=atoi(argv[2]); + + result = cli_lsa_open_policy(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_enum_privilege(cli, mem_ctx, &pol, &enum_context, pref_max_length, + &count, &privs_name, &privs_high, &privs_low); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + printf("found %d privileges\n\n", count); + + for (i = 0; i < count; i++) { + printf("%s \t\t%d:%d (0x%x:0x%x)\n", privs_name[i] ? privs_name[i] : "*unknown*", + privs_high[i], privs_low[i], privs_high[i], privs_low[i]); + } + + done: + return result; +} + +/* Get privilege name */ + +static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + uint16 lang_id=0; + uint16 lang_id_sys=0; + uint16 lang_id_desc; + fstring description; + + if (argc != 2) { + printf("Usage: %s privilege name\n", argv[0]); + return NT_STATUS_OK; + } + + result = cli_lsa_open_policy(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_get_dispname(cli, mem_ctx, &pol, argv[1], lang_id, lang_id_sys, description, &lang_id_desc); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + printf("%s -> %s (language: 0x%x)\n", argv[1], description, lang_id_desc); + + done: + return result; +} + +/* Enumerate the LSA SIDS */ + +static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + uint32 enum_context=0; + uint32 pref_max_length=0x1000; + DOM_SID *sids; + uint32 count=0; + int i; + + if (argc > 3) { + printf("Usage: %s [enum context] [max length]\n", argv[0]); + return NT_STATUS_OK; + } + + if (argc>=2) + enum_context=atoi(argv[1]); + + if (argc==3) + pref_max_length=atoi(argv[2]); + + result = cli_lsa_open_policy(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_enum_sids(cli, mem_ctx, &pol, &enum_context, pref_max_length, + &count, &sids); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + printf("found %d SIDs\n\n", count); + + for (i = 0; i < count; i++) { + fstring sid_str; + + sid_to_string(sid_str, &sids[i]); + printf("%s\n", sid_str); + } + + done: + return result; +} + +/* Enumerate the privileges of an SID */ + +static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND dom_pol; + POLICY_HND user_pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 access_desired = 0x000f000f; + + DOM_SID sid; + uint32 count=0; + LUID_ATTR *set; + int i; + + if (argc != 2 ) { + printf("Usage: %s SID\n", argv[0]); + return NT_STATUS_OK; + } + + string_to_sid(&sid, argv[1]); + + result = cli_lsa_open_policy2(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &dom_pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_open_account(cli, mem_ctx, &dom_pol, &sid, access_desired, &user_pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_enum_privsaccount(cli, mem_ctx, &user_pol, &count, &set); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + printf("found %d privileges for SID %s\n\n", count, argv[1]); + printf("high\tlow\tattribute\n"); + + for (i = 0; i < count; i++) { + printf("%u\t%u\t%u\n", set[i].luid.high, set[i].luid.low, set[i].attr); + } + + done: + return result; +} + +/* Get a privilege value given its name */ + +static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + LUID luid; + + if (argc != 2 ) { + printf("Usage: %s name\n", argv[0]); + return NT_STATUS_OK; + } + + result = cli_lsa_open_policy2(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_lookupprivvalue(cli, mem_ctx, &pol, argv[1], &luid); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + printf("%u:%u (0x%x:0x%x)\n", luid.high, luid.low, luid.high, luid.low); + + done: + return result; +} + +/* Query LSA security object */ + +static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + POLICY_HND pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + SEC_DESC_BUF *sdb; + uint32 sec_info = 0x00000004; /* ??? */ + + if (argc != 1 ) { + printf("Usage: %s\n", argv[0]); + return NT_STATUS_OK; + } + + result = cli_lsa_open_policy2(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + result = cli_lsa_query_secobj(cli, mem_ctx, &pol, sec_info, &sdb); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Print results */ + + display_sec_desc(sdb->sec); + + done: + return result; +} + /* List of commands exported by this module */ struct cmd_set lsarpc_commands[] = { @@ -235,6 +498,12 @@ struct cmd_set lsarpc_commands[] = { { "lookupsids", cmd_lsa_lookup_sids, PIPE_LSARPC, "Convert SIDs to names", "" }, { "lookupnames", cmd_lsa_lookup_names, PIPE_LSARPC, "Convert names to SIDs", "" }, { "enumtrust", cmd_lsa_enum_trust_dom, PIPE_LSARPC, "Enumerate trusted domains", "" }, + { "enumprivs", cmd_lsa_enum_privilege, PIPE_LSARPC, "Enumerate privileges", "" }, + { "getdispname", cmd_lsa_get_dispname, PIPE_LSARPC, "Get the privilege name", "" }, + { "lsaenumsid", cmd_lsa_enum_sids, PIPE_LSARPC, "Enumerate the LSA SIDS", "" }, + { "lsaenumprivsaccount", cmd_lsa_enum_privsaccounts, PIPE_LSARPC, "Enumerate the privileges of an SID", "" }, + { "lsalookupprivvalue", cmd_lsa_lookupprivvalue, PIPE_LSARPC, "Get a privilege value given its name", "" }, + { "lsaquerysecobj", cmd_lsa_query_secobj, PIPE_LSARPC, "Query LSA security object", "" }, { NULL } }; diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c index 524ff5fb49f..4d67cba1b52 100644 --- a/source/rpcclient/cmd_netlogon.c +++ b/source/rpcclient/cmd_netlogon.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Tim Potter 2000 @@ -152,6 +151,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, uint32 database_id = 0, num_deltas; SAM_DELTA_HDR *hdr_deltas; SAM_DELTA_CTR *deltas; + DOM_CRED ret_creds; if (argc > 2) { fprintf(stderr, "Usage: %s [database_id]\n", argv[0]); @@ -181,9 +181,12 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, goto done; } + /* on first call the returnAuthenticator is empty */ + memset(&ret_creds, 0, sizeof(ret_creds)); + /* Synchronise sam database */ - result = cli_netlogon_sam_sync(cli, mem_ctx, database_id, + result = cli_netlogon_sam_sync(cli, mem_ctx, &ret_creds, database_id, &num_deltas, &hdr_deltas, &deltas); if (!NT_STATUS_IS_OK(result)) diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c index 68a75a70c91..ed152b9f5c8 100644 --- a/source/rpcclient/cmd_samr.c +++ b/source/rpcclient/cmd_samr.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Andrew Tridgell 1992-2000, @@ -95,6 +94,54 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr) } } +static char *display_time(NTTIME nttime) +{ + static fstring string; + + float high; + float low; + int sec; + int days, hours, mins, secs; + + if (nttime.high==0 && nttime.low==0) + return "Now"; + + if (nttime.high==0x80000000 && nttime.low==0) + return "Never"; + + high = 65536; + high = high/10000; + high = high*65536; + high = high/1000; + high = high * (~nttime.high); + + low = ~nttime.low; + low = low/(1000*1000*10); + + sec=high+low; + + days=sec/(60*60*24); + hours=(sec - (days*60*60*24)) / (60*60); + mins=(sec - (days*60*60*24) - (hours*60*60) ) / 60; + secs=sec - (days*60*60*24) - (hours*60*60) - (mins*60); + + snprintf(string, sizeof(string)-1, "%u days, %u hours, %u minutes, %u seconds", days, hours, mins, secs); + return (string); +} + +static void display_sam_unk_info_1(SAM_UNK_INFO_1 *info1) +{ + + printf("Minimum password length: %d\n", info1->min_length_password); + printf("Password uniqueness (remember x passwords): %d\n", info1->password_history); + printf("flag: "); + if(info1->flag&&2==2) printf("users must open a session to change password "); + printf("\n"); + + printf("password expire in: %s\n", display_time(info1->expire)); + printf("Min password age (allow changing in x days): %s\n", display_time(info1->min_passwordage)); +} + static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2) { fstring name; @@ -120,11 +167,13 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2) printf("Unknown 6:\t0x%x\n", info2->unknown_6); } -void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1) +static void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1) { fstring tmp; + printf("index: 0x%x ", e1->user_idx); printf("RID: 0x%x ", e1->rid_user); + printf("acb: 0x%x ", e1->acb_info); unistr2_to_ascii(tmp, &s1->uni_acct_name, sizeof(tmp)-1); printf("Account: %s\t", tmp); @@ -136,7 +185,39 @@ void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1) printf("Desc: %s\n", tmp); } -void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4) +static void display_sam_info_2(SAM_ENTRY2 *e2, SAM_STR2 *s2) +{ + fstring tmp; + + printf("index: 0x%x ", e2->user_idx); + printf("RID: 0x%x ", e2->rid_user); + printf("acb: 0x%x ", e2->acb_info); + + unistr2_to_ascii(tmp, &s2->uni_srv_name, sizeof(tmp)-1); + printf("Account: %s\t", tmp); + + unistr2_to_ascii(tmp, &s2->uni_srv_desc, sizeof(tmp)-1); + printf("Name: %s\n", tmp); + +} + +static void display_sam_info_3(SAM_ENTRY3 *e3, SAM_STR3 *s3) +{ + fstring tmp; + + printf("index: 0x%x ", e3->grp_idx); + printf("RID: 0x%x ", e3->rid_grp); + printf("attr: 0x%x ", e3->attr); + + unistr2_to_ascii(tmp, &s3->uni_grp_name, sizeof(tmp)-1); + printf("Account: %s\t", tmp); + + unistr2_to_ascii(tmp, &s3->uni_grp_desc, sizeof(tmp)-1); + printf("Name: %s\n", tmp); + +} + +static void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4) { int i; @@ -148,6 +229,20 @@ void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4) printf("\n"); } + +static void display_sam_info_5(SAM_ENTRY5 *e5, SAM_STR5 *s5) +{ + int i; + + printf("index: 0x%x ", e5->grp_idx); + + printf("Account: "); + for (i=0; igrp_name.str_str_len; i++) + printf("%c", s5->grp_name.buffer[i]); + printf("\n"); + +} + /********************************************************************** * Query user information */ @@ -368,6 +463,71 @@ static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, return result; } +/* Query aliases a user is a member of */ + +static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND connect_pol, domain_pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 user_rid, num_aliases, *alias_rids; + int i; + fstring server; + DOM_SID tmp_sid; + DOM_SID2 sid; + DOM_SID global_sid_Builtin; + + string_to_sid(&global_sid_Builtin, "S-1-5-32"); + + if (argc != 3) { + printf("Usage: %s builtin|domain rid\n", argv[0]); + return NT_STATUS_OK; + } + + sscanf(argv[2], "%i", &user_rid); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); + if (!NT_STATUS_IS_OK(result)) { + goto done; + } + + if (StrCaseCmp(argv[1], "domain")==0) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &domain_sid, &domain_pol); + else if (StrCaseCmp(argv[1], "builtin")==0) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &global_sid_Builtin, &domain_pol); + else + return NT_STATUS_OK; + + if (!NT_STATUS_IS_OK(result)) { + goto done; + } + + sid_copy(&tmp_sid, &domain_sid); + sid_append_rid(&tmp_sid, user_rid); + init_dom_sid2(&sid, &tmp_sid); + + result = cli_samr_query_useraliases(cli, mem_ctx, &domain_pol, 1, &sid, &num_aliases, &alias_rids); + if (!NT_STATUS_IS_OK(result)) { + goto done; + } + + for (i = 0; i < num_aliases; i++) { + printf("\tgroup rid:[0x%x]\n", alias_rids[i]); + } + + done: + return result; +} + /* Query members of a group */ static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, @@ -476,6 +636,66 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, return result; } +/* Enumerate domain groups */ + +static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND connect_pol, domain_pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 start_idx, size, num_dom_groups, i; + struct acct_info *dom_groups; + DOM_SID global_sid_Builtin; + + string_to_sid(&global_sid_Builtin, "S-1-5-32"); + + if (argc != 2) { + printf("Usage: %s builtin|domain\n", argv[0]); + return NT_STATUS_OK; + } + + /* Get sam policy handle */ + + result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); + if (!NT_STATUS_IS_OK(result)) { + goto done; + } + + /* Get domain policy handle */ + + if (StrCaseCmp(argv[1], "domain")==0) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &domain_sid, &domain_pol); + else if (StrCaseCmp(argv[1], "builtin")==0) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &global_sid_Builtin, &domain_pol); + else + return NT_STATUS_OK; + if (!NT_STATUS_IS_OK(result)) { + goto done; + } + + /* Enumerate domain groups */ + + start_idx = 0; + size = 0xffff; + + result = cli_samr_enum_als_groups(cli, mem_ctx, &domain_pol, + &start_idx, size, + &dom_groups, &num_dom_groups); + + for (i = 0; i < num_dom_groups; i++) + printf("group:[%s] rid:[0x%x]\n", dom_groups[i].acct_name, + dom_groups[i].rid); + + done: + return result; +} + /* Query alias membership */ static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, @@ -549,6 +769,10 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, int info_level = 1; SAM_DISPINFO_CTR ctr; SAM_DISPINFO_1 info1; + SAM_DISPINFO_2 info2; + SAM_DISPINFO_3 info3; + SAM_DISPINFO_4 info4; + SAM_DISPINFO_5 info5; if (argc > 4) { printf("Usage: %s [info level] [start index] [max entries]\n", argv[0]); @@ -585,26 +809,55 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, ZERO_STRUCT(ctr); ZERO_STRUCT(info1); + switch (info_level) { + case 1: + ZERO_STRUCT(info1); ctr.sam.info1 = &info1; + break; + case 2: + ZERO_STRUCT(info2); + ctr.sam.info2 = &info2; + break; + case 3: + ZERO_STRUCT(info3); + ctr.sam.info3 = &info3; + break; + case 4: + ZERO_STRUCT(info4); + ctr.sam.info4 = &info4; + break; + case 5: + ZERO_STRUCT(info5); + ctr.sam.info5 = &info5; + break; + } + + do { result = cli_samr_query_dispinfo(cli, mem_ctx, &domain_pol, &start_idx, info_level, &num_entries, max_entries, &ctr); - if (!NT_STATUS_IS_OK(result)) - goto done; - for (i = 0; i < num_entries; i++) { switch (info_level) { case 1: display_sam_info_1(&ctr.sam.info1->sam[i], &ctr.sam.info1->str[i]); break; + case 2: + display_sam_info_2(&ctr.sam.info2->sam[i], &ctr.sam.info2->str[i]); + break; + case 3: + display_sam_info_3(&ctr.sam.info3->sam[i], &ctr.sam.info3->str[i]); + break; case 4: display_sam_info_4(&ctr.sam.info4->sam[i], &ctr.sam.info4->str[i]); break; + case 5: + display_sam_info_5(&ctr.sam.info5->sam[i], &ctr.sam.info5->str[i]); + break; } } - + } while (!NT_STATUS_IS_OK(result)); done: return result; } @@ -656,6 +909,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, /* Display domain info */ switch (switch_value) { + case 1: + display_sam_unk_info_1(&ctr.info.inf1); + break; case 2: display_sam_unk_info_2(&ctr.info.inf2); break; @@ -666,6 +922,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, } done: + + cli_samr_close(cli, mem_ctx, &domain_pol); + cli_samr_close(cli, mem_ctx, &connect_pol); return result; } @@ -733,9 +992,14 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, uint32 num_rids, num_names, *name_types, *rids; char **names; int i; + DOM_SID global_sid_Builtin; - if (argc < 2) { - printf("Usage: %s name1 [name2 [name3] [...]]\n", argv[0]); + string_to_sid(&global_sid_Builtin, "S-1-5-32"); + + if (argc < 3) { + printf("Usage: %s domain|builtin name1 [name2 [name3] [...]]\n", argv[0]); + printf("check on the domain SID: S-1-5-21-x-y-z\n"); + printf("or check on the builtin SID: S-1-5-32\n"); return NT_STATUS_OK; } @@ -748,9 +1012,16 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, goto done; } + if (StrCaseCmp(argv[1], "domain")==0) result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, MAXIMUM_ALLOWED_ACCESS, &domain_sid, &domain_pol); + else if (StrCaseCmp(argv[1], "builtin")==0) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &global_sid_Builtin, &domain_pol); + else + return NT_STATUS_OK; if (!NT_STATUS_IS_OK(result)) { goto done; @@ -758,11 +1029,11 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, /* Look up names */ - num_names = argc - 1; + num_names = argc - 2; names = (char **)talloc(mem_ctx, sizeof(char *) * num_names); - for (i = 0; i < argc - 1; i++) - names[i] = argv[i + 1]; + for (i = 0; i < argc - 2; i++) + names[i] = argv[i + 2]; result = cli_samr_lookup_names(cli, mem_ctx, &domain_pol, flags, num_names, names, @@ -911,6 +1182,86 @@ static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, return result; } +/********************************************************************** + * Query user security object + */ +static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + int argc, char **argv) +{ + POLICY_HND connect_pol, domain_pol, user_pol, *pol; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 info_level = 4; + fstring server; + uint32 user_rid = 0; + TALLOC_CTX *ctx = NULL; + SEC_DESC_BUF *sec_desc_buf=NULL; + BOOL domain = False; + + ctx=talloc_init(); + + if (argc > 2) { + printf("Usage: %s [rid|-d]\n", argv[0]); + printf("\tSpecify rid for security on user, -d for security on domain\n"); + return NT_STATUS_OK; + } + + if (argc == 2) { + if (strcmp(argv[1], "-d") == 0) + domain = True; + else + sscanf(argv[1], "%i", &user_rid); + } + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + if (domain || user_rid) + result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, + MAXIMUM_ALLOWED_ACCESS, + &domain_sid, &domain_pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + if (user_rid) + result = cli_samr_open_user(cli, mem_ctx, &domain_pol, + MAXIMUM_ALLOWED_ACCESS, + user_rid, &user_pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + /* Pick which query pol to use */ + + pol = &connect_pol; + + if (domain) + pol = &domain_pol; + + if (user_rid) + pol = &user_pol; + + /* Query SAM security object */ + + result = cli_samr_query_sec_obj(cli, mem_ctx, pol, info_level, ctx, + &sec_desc_buf); + + if (!NT_STATUS_IS_OK(result)) + goto done; + + display_sec_desc(sec_desc_buf->sec); + +done: + talloc_destroy(ctx); + return result; +} + /* List of commands exported by this module */ struct cmd_set samr_commands[] = { @@ -920,16 +1271,19 @@ struct cmd_set samr_commands[] = { { "queryuser", cmd_samr_query_user, PIPE_SAMR, "Query user info", "" }, { "querygroup", cmd_samr_query_group, PIPE_SAMR, "Query group info", "" }, { "queryusergroups", cmd_samr_query_usergroups, PIPE_SAMR, "Query user groups", "" }, + { "queryuseraliases", cmd_samr_query_useraliases, PIPE_SAMR, "Query user aliases", "" }, { "querygroupmem", cmd_samr_query_groupmem, PIPE_SAMR, "Query group membership", "" }, { "queryaliasmem", cmd_samr_query_aliasmem, PIPE_SAMR, "Query alias membership", "" }, { "querydispinfo", cmd_samr_query_dispinfo, PIPE_SAMR, "Query display info", "" }, { "querydominfo", cmd_samr_query_dominfo, PIPE_SAMR, "Query domain info", "" }, { "enumdomgroups", cmd_samr_enum_dom_groups, PIPE_SAMR, "Enumerate domain groups", "" }, + { "enumalsgroups", cmd_samr_enum_als_groups, PIPE_SAMR, "Enumerate alias groups", "" }, { "createdomuser", cmd_samr_create_dom_user, PIPE_SAMR, "Create domain user", "" }, { "samlookupnames", cmd_samr_lookup_names, PIPE_SAMR, "Look up names", "" }, { "samlookuprids", cmd_samr_lookup_rids, PIPE_SAMR, "Look up names", "" }, { "deletedomuser", cmd_samr_delete_dom_user, PIPE_SAMR, "Delete domain user", "" }, + { "samquerysecobj", cmd_samr_query_sec_obj, PIPE_SAMR, "Query SAMR security object", "" }, { NULL } }; diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c index f4ff11adf13..6fbd152dfb5 100644 --- a/source/rpcclient/cmd_srvsvc.c +++ b/source/rpcclient/cmd_srvsvc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.2 + Unix SMB/CIFS implementation. RPC pipe client Copyright (C) Andrew Tridgell 1992-1999 diff --git a/source/rpcclient/cmd_wkssvc.c b/source/rpcclient/cmd_wkssvc.c index 52c110dbd56..79acf35943c 100644 --- a/source/rpcclient/cmd_wkssvc.c +++ b/source/rpcclient/cmd_wkssvc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. NT Domain Authentication SMB / MSRPC client Copyright (C) Andrew Tridgell 1994-1997 Copyright (C) Luke Kenneth Casson Leighton 1996-1997 diff --git a/source/rpcclient/display_spool.c b/source/rpcclient/display_spool.c index cdca0c393dd..b4baf570f17 100644 --- a/source/rpcclient/display_spool.c +++ b/source/rpcclient/display_spool.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Andrew Tridgell 1992-1999 Copyright (C) Luke Kenneth Casson Leighton 1996 - 1999 -- cgit From 2f1af51b613c71287907b83b98195205342699d0 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 3 Apr 2002 16:04:17 +0000 Subject: update to match usage message from smbpasswd. --- docs/docbook/manpages/smbpasswd.8.sgml | 369 ++++++++++++----------- docs/htmldocs/smbpasswd.8.html | 522 +++++++++++++++++---------------- docs/manpages/smbpasswd.8 | 283 +++++++++--------- 3 files changed, 604 insertions(+), 570 deletions(-) diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index 5d41651f7d3..d0cb34c45bc 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -13,23 +13,18 @@ + When run by root: smbpasswd - -a - -x - -d - -e - -D debuglevel - -n - -r <remote machine> - -R <name resolve order> - -m - -j DOMAIN - -U username[%password] - -h - -s - -w pass + options username + password + + otherwise: + + smbpasswd + options + password @@ -80,76 +75,41 @@ OPTIONS - -a - This option specifies that the username - following should be added to the local smbpasswd file, with the - new password typed (type <Enter> for the old password). This - option is ignored if the username following already exists in - the smbpasswd file and it is treated like a regular change - password command. Note that the user to be added must already exist - in the system password file (usually /etc/passwd) - else the request to add the user will fail. - - This option is only available when running smbpasswd - as root. + -L + Run the smbpasswd command in local mode. This + allows a non-root user to specify the root-only options. This + is used in test environments where smbd is run as non-root. The + smbpasswd file must have read/write + permissions for the user running the command. - - -x - This option specifies that the username - following should be deleted from the local smbpasswd file. - - - This option is only available when running smbpasswd as - root. + -h + This option prints the help string for + smbpasswd. - - -d - This option specifies that the username following - should be disabled in the local smbpasswd - file. This is done by writing a 'D' flag - into the account control space in the smbpasswd file. Once this - is done all attempts to authenticate via SMB using this username - will fail. - - If the smbpasswd file is in the 'old' format (pre-Samba 2.0 - format) there is no space in the user's password entry to write - this information and so the user is disabled by writing 'X' characters - into the password space in the smbpasswd file. See smbpasswd(5) - for details on the 'old' and new password file formats. - - - This option is only available when running smbpasswd as - root. + -s + This option causes smbpasswd to be silent (i.e. + not issue prompts) and to read its old and new passwords from + standard input, rather than from /dev/tty + (like the passwd(1) program does). This option + is to aid people writing scripts to drive smbpasswd + - - - -e - This option specifies that the username following - should be enabled in the local smbpasswd file, - if the account was previously disabled. If the account was not - disabled this option has no effect. Once the account is enabled then - the user will be able to authenticate via SMB once again. - - If the smbpasswd file is in the 'old' format, then - smbpasswd will prompt for a new password for this user, - otherwise the account will be enabled by removing the 'D' - flag from account control space in the - smbpasswd file. See smbpasswd (5) for - details on the 'old' and new password file formats. - This option is only available when running smbpasswd as root. - + + -c smb.conf file + This option specifies that the configuration + file specified should be used instead of the default value + specified at compile time. - - + -D debuglevel debuglevel is an integer @@ -168,28 +128,6 @@ - - - -n - This option specifies that the username following - should have their password set to null (i.e. a blank password) in - the local smbpasswd file. This is done by writing the string "NO - PASSWORD" as the first part of the first password stored in the - smbpasswd file. - - Note that to allow users to logon to a Samba server once - the password has been set to "NO PASSWORD" in the smbpasswd - file the administrator must set the following parameter in the [global] - section of the smb.conf file : - - null passwords = yes - - This option is only available when running smbpasswd as - root. - - - - -r remote machine name This option allows a user to specify what machine @@ -221,45 +159,73 @@ - -R name resolve order - This option allows the user of smbpasswd to determine - what name resolution services to use when looking up the NetBIOS - name of the host being connected to. + -U username[%pass] + This option may only be used in conjunction + with the -r option. When changing + a password on a remote machine it allows the user to specify + the user name on that machine whose password will be changed. It + is present to allow users who have different user names on + different systems to change these passwords. The optional + %pass may be used to specify to old password. - The options are :"lmhosts", "host", "wins" and "bcast". They cause - names to be resolved as follows : - - lmhosts : Lookup an IP - address in the Samba lmhosts file. If the line in lmhosts has - no name type attached to the NetBIOS name (see the lmhosts(5) for details) then - any name type matches for lookup. - - host : Do a standard host - name to IP address resolution, using the system /etc/hosts - , NIS, or DNS lookups. This method of name resolution - is operating system depended for instance on IRIX or Solaris this - may be controlled by the /etc/nsswitch.conf - file). Note that this method is only used if the NetBIOS name - type being queried is the 0x20 (server) name type, otherwise - it is ignored. - - wins : Query a name with - the IP address listed in the wins server - parameter. If no WINS server has been specified this method - will be ignored. - - bcast : Do a broadcast on - each of the known local interfaces listed in the - interfaces parameter. This is the least - reliable of the name resolution methods as it depends on the - target host being on a locally connected subnet. - + In particular, this parameter specifies the username + used to create the machine account when invoked with -j + + - The default order is lmhosts, host, wins, bcast - and without this parameter or any entry in the - smb.conf file the name resolution methods will - be attempted in this order. + + + +The following options are available only when the smbpasswd command is +run as root or in local mode. + + + + + -a + This option specifies that the username + following should be added to the local smbpasswd file, with the + new password typed (type <Enter> for the old password). This + option is ignored if the username following already exists in + the smbpasswd file and it is treated like a regular change + password command. Note that the user to be added must already exist + in the system password file (usually /etc/passwd) + else the request to add the user will fail. + + + + + -d + This option specifies that the username following + should be disabled in the local smbpasswd + file. This is done by writing a 'D' flag + into the account control space in the smbpasswd file. Once this + is done all attempts to authenticate via SMB using this username + will fail. + + If the smbpasswd file is in the 'old' format (pre-Samba 2.0 + format) there is no space in the user's password entry to write + this information and so the user is disabled by writing 'X' characters + into the password space in the smbpasswd file. See smbpasswd(5) + for details on the 'old' and new password file formats. + + + + + + -e + This option specifies that the username following + should be enabled in the local smbpasswd file, + if the account was previously disabled. If the account was not + disabled this option has no effect. Once the account is enabled then + the user will be able to authenticate via SMB once again. + + If the smbpasswd file is in the 'old' format, then + smbpasswd will prompt for a new password for this user, + otherwise the account will be enabled by removing the 'D' + flag from account control space in the + smbpasswd file. See smbpasswd (5) for + details on the 'old' and new password file formats. @@ -268,8 +234,48 @@ This option tells smbpasswd that the account being changed is a MACHINE account. Currently this is used when Samba is being used as an NT Primary Domain Controller. + + + + + + -n + This option specifies that the username following + should have their password set to null (i.e. a blank password) in + the local smbpasswd file. This is done by writing the string "NO + PASSWORD" as the first part of the first password stored in the + smbpasswd file. - This option is only available when running smbpasswd as root. + Note that to allow users to logon to a Samba server once + the password has been set to "NO PASSWORD" in the smbpasswd + file the administrator must set the following parameter in the [global] + section of the smb.conf file : + + null passwords = yes + + + + + -w password + This parameter is only available is Samba + has been configured to use the experimental + --with-ldapsam option. The -w + switch is used to specify the password to be used with the + ldap admin + dn. Note that the password is stored in + the private/secrets.tdb and is keyed off + of the admin's DN. This means that if the value of ldap + admin dn ever changes, the password will beed to be + manually updated as well. + + + + + + + -x + This option specifies that the username + following should be deleted from the local smbpasswd file. @@ -316,66 +322,50 @@ done to the PDC all users accessing the Samba server must still have a valid UNIX account on that machine. The winbindd(8) daemon can be used - to create UNIX accounts for NT users. - - - This option is only available when running smbpasswd as root. - + to create UNIX accounts for NT users. - - -U username - This option may only be used in conjunction - with the -r option. When changing - a password on a remote machine it allows the user to specify - the user name on that machine whose password will be changed. It - is present to allow users who have different user names on - different systems to change these passwords. - - In particular, this parameter specifies the username - used to create the machine account when invoked with -j - - + -R name resolve order + This option allows the user of smbpasswd to determine + what name resolution services to use when looking up the NetBIOS + name of the host being connected to. - - - - - -h - This option prints the help string for - smbpasswd, selecting the correct one for running as root - or as an ordinary user. - - - - - - -s - This option causes smbpasswd to be silent (i.e. - not issue prompts) and to read its old and new passwords from - standard input, rather than from /dev/tty - (like the passwd(1) program does). This option - is to aid people writing scripts to drive smbpasswd - - + The options are :"lmhosts", "host", "wins" and "bcast". They cause + names to be resolved as follows : + + lmhosts : Lookup an IP + address in the Samba lmhosts file. If the line in lmhosts has + no name type attached to the NetBIOS name (see the lmhosts(5) for details) then + any name type matches for lookup. + + host : Do a standard host + name to IP address resolution, using the system /etc/hosts + , NIS, or DNS lookups. This method of name resolution + is operating system depended for instance on IRIX or Solaris this + may be controlled by the /etc/nsswitch.conf + file). Note that this method is only used if the NetBIOS name + type being queried is the 0x20 (server) name type, otherwise + it is ignored. + + wins : Query a name with + the IP address listed in the wins server + parameter. If no WINS server has been specified this method + will be ignored. + + bcast : Do a broadcast on + each of the known local interfaces listed in the + interfaces parameter. This is the least + reliable of the name resolution methods as it depends on the + target host being on a locally connected subnet. + - - - -w password - This parameter is only available is Samba - has been configured to use the experimental - --with-ldapsam option. The -w - switch is used to specify the password to be used with the - ldap admin - dn. Note that the password is stored in - the private/secrets.tdb and is keyed off - of the admin's DN. This means that if the value of ldap - admin dn ever changes, the password will beed to be - manually updated as well. - - + The default order is lmhosts, host, wins, bcast + and without this parameter or any entry in the + smb.conf file the name resolution methods will + be attempted in this order. @@ -387,6 +377,15 @@ to modify attributes directly in the local smbpasswd file. + + + + password + This specifies the new password. If this parameter + is specified you will not be prompted for the new password. + + + diff --git a/docs/htmldocs/smbpasswd.8.html b/docs/htmldocs/smbpasswd.8.html index dfcb71baed2..ee4ea75aab4 100644 --- a/docs/htmldocs/smbpasswd.8.html +++ b/docs/htmldocs/smbpasswd.8.html @@ -33,15 +33,24 @@ NAME="AEN8" >

    Synopsis

    When run by root:

    smbpasswd [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-j DOMAIN] [-U username[%password]] [-h] [-s] [-w pass] [username]

    [options] [username] [password]

    otherwise:

    smbpasswd [options] [password]

    DESCRIPTION

    OPTIONS

    -L

    Run the smbpasswd command in local mode. This + allows a non-root user to specify the root-only options. This + is used in test environments where smbd is run as non-root. The + smbpasswd file must have read/write + permissions for the user running the command.

    -h

    This option prints the help string for + smbpasswd.

    -s

    This option causes smbpasswd to be silent (i.e. + not issue prompts) and to read its old and new passwords from + standard input, rather than from /dev/tty + (like the passwd(1) program does). This option + is to aid people writing scripts to drive smbpasswd

    -c smb.conf file

    This option specifies that the configuration + file specified should be used instead of the default value + specified at compile time.

    -D debuglevel

    debuglevel is an integer + from 0 to 10. The default value if this parameter is not specified + is zero.

    The higher this value, the more detail will be logged to the + log files about the activities of smbpasswd. At level 0, only + critical errors and serious warnings will be logged.

    Levels above 1 will generate considerable amounts of log + data, and should only be used when investigating a problem. Levels + above 3 are designed for use only by developers and generate + HUGE amounts of log data, most of which is extremely cryptic. +

    -r remote machine name

    This option allows a user to specify what machine + they wish to change their password on. Without this parameter + smbpasswd defaults to the local host. The remote + machine name is the NetBIOS name of the SMB/CIFS + server to contact to attempt the password change. This name is + resolved into an IP address using the standard name resolution + mechanism in all programs of the Samba suite. See the -R + name resolve order parameter for details on changing + this resolving mechanism.

    The username whose password is changed is that of the + current UNIX logged on user. See the -U username + parameter for details on changing the password for a different + username.

    Note that if changing a Windows NT Domain password the + remote machine specified must be the Primary Domain Controller for + the domain (Backup Domain Controllers only have a read-only + copy of the user account database and will not allow the password + change).

    Note that Windows 95/98 do not have + a real password database so it is not possible to change passwords + specifying a Win95/98 machine as remote machine target.

    -U username[%pass]

    This option may only be used in conjunction + with the -r option. When changing + a password on a remote machine it allows the user to specify + the user name on that machine whose password will be changed. It + is present to allow users who have different user names on + different systems to change these passwords. The optional + %pass may be used to specify to old password.

    In particular, this parameter specifies the username + used to create the machine account when invoked with -j

    The following options are available only when the smbpasswd command is +run as root or in local mode.

    -a

    /etc/passwd) else the request to add the user will fail.

    This option is only available when running smbpasswd - as root.

    -x

    This option specifies that the username - following should be deleted from the local smbpasswd file. -

    This option is only available when running smbpasswd as - root.

    -d
    for details on the 'old' and new password file formats.

    This option is only available when running smbpasswd as - root.

    -e
    smbpasswd (5) for details on the 'old' and new password file formats.

    This option is only available when running smbpasswd as root. -

    -D debuglevel
    -m

    debuglevel is an integer - from 0 to 10. The default value if this parameter is not specified - is zero.

    The higher this value, the more detail will be logged to the - log files about the activities of smbpasswd. At level 0, only - critical errors and serious warnings will be logged.

    Levels above 1 will generate considerable amounts of log - data, and should only be used when investigating a problem. Levels - above 3 are designed for use only by developers and generate - HUGE amounts of log data, most of which is extremely cryptic. -

    This option tells smbpasswd that the account + being changed is a MACHINE account. Currently this is used + when Samba is being used as an NT Primary Domain Controller.

    -n
    null passwords = yes

    This option is only available when running smbpasswd as - root.

    -r remote machine name
    -w password

    This option allows a user to specify what machine - they wish to change their password on. Without this parameter - smbpasswd defaults to the local host. The remote - machine name is the NetBIOS name of the SMB/CIFS - server to contact to attempt the password change. This name is - resolved into an IP address using the standard name resolution - mechanism in all programs of the Samba suite. See the -R - name resolve order parameter for details on changing - this resolving mechanism.

    The username whose password is changed is that of the - current UNIX logged on user. See the This parameter is only available is Samba + has been configured to use the experimental + --with-ldapsam option. The -U username-w - parameter for details on changing the password for a different - username.

    Note that if changing a Windows NT Domain password the - remote machine specified must be the Primary Domain Controller for - the domain (Backup Domain Controllers only have a read-only - copy of the user account database and will not allow the password - change).

    Note that Windows 95/98 do not have - a real password database so it is not possible to change passwords - specifying a Win95/98 machine as remote machine target.

    -R name resolve order

    This option allows the user of smbpasswd to determine - what name resolution services to use when looking up the NetBIOS - name of the host being connected to.

    The options are :"lmhosts", "host", "wins" and "bcast". They cause - names to be resolved as follows :

    • lmhosts : Lookup an IP - address in the Samba lmhosts file. If the line in lmhosts has - no name type attached to the NetBIOS name (see the lmhosts(5) for details) then - any name type matches for lookup.

    • host : Do a standard host - name to IP address resolution, using the system /etc/hosts - , NIS, or DNS lookups. This method of name resolution - is operating system depended for instance on IRIX or Solaris this - may be controlled by the /etc/nsswitch.conf - file). Note that this method is only used if the NetBIOS name - type being queried is the 0x20 (server) name type, otherwise - it is ignored.

    • wins : Query a name with - the IP address listed in the wins serverldap admin + dn - parameter. If no WINS server has been specified this method - will be ignored.

    • bcast : Do a broadcast on - each of the known local interfaces listed in the - . Note that the password is stored in + the private/secrets.tdb and is keyed off + of the admin's DN. This means that if the value of interfacesldap + admin dn parameter. This is the least - reliable of the name resolution methods as it depends on the - target host being on a locally connected subnet.

    The default order is lmhosts, host, wins, bcast - and without this parameter or any entry in the - smb.conf file the name resolution methods will - be attempted in this order.

    ever changes, the password will beed to be + manually updated as well. +

    -m
    -x

    This option tells smbpasswd that the account - being changed is a MACHINE account. Currently this is used - when Samba is being used as an NT Primary Domain Controller.

    This option is only available when running smbpasswd as root. +>This option specifies that the username + following should be deleted from the local smbpasswd file.

    winbindd(8) daemon can be used to create UNIX accounts for NT users.

    This option is only available when running smbpasswd as root. -

    -U username
    -R name resolve order

    This option may only be used in conjunction - with the -r option. When changing - a password on a remote machine it allows the user to specify - the user name on that machine whose password will be changed. It - is present to allow users who have different user names on - different systems to change these passwords.

    This option allows the user of smbpasswd to determine + what name resolution services to use when looking up the NetBIOS + name of the host being connected to.

    In particular, this parameter specifies the username - used to create the machine account when invoked with -j

    -h
    The options are :"lmhosts", "host", "wins" and "bcast". They cause + names to be resolved as follows :

    This option prints the help string for smbpasswd, selecting the correct one for running as root - or as an ordinary user.

    -s

    • This option causes smbpasswd to be silent (i.e. - not issue prompts) and to read its old and new passwords from - standard input, rather than from lmhosts : Lookup an IP + address in the Samba lmhosts file. If the line in lmhosts has + no name type attached to the NetBIOS name (see the lmhosts(5) for details) then + any name type matches for lookup.

    • host : Do a standard host + name to IP address resolution, using the system /dev/tty/etc/hosts + , NIS, or DNS lookups. This method of name resolution + is operating system depended for instance on IRIX or Solaris this + may be controlled by the /etc/nsswitch.conf - (like the passwd(1) program does). This option - is to aid people writing scripts to drive smbpasswd

    -w password
  • This parameter is only available is Samba - has been configured to use the experimental - --with-ldapsam option. The wins : Query a name with + the IP address listed in the -wwins server - switch is used to specify the password to be used with the -

  • bcast : Do a broadcast on + each of the known local interfaces listed in the + ldap admin - dninterfaces. Note that the password is stored in - the parameter. This is the least + reliable of the name resolution methods as it depends on the + target host being on a locally connected subnet.

  • The default order is lmhosts, host, wins, bcast + and without this parameter or any entry in the + private/secrets.tdb and is keyed off - of the admin's DN. This means that if the value of ldap - admin dn ever changes, the password will beed to be - manually updated as well. -

    smb.conf file the name resolution methods will + be attempted in this order.

    username
    password

    This specifies the new password. If this parameter + is specified you will not be prompted for the new password. +

    NOTES

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBPASSWD" "8" "01 February 2002" "" "" +.TH "SMBPASSWD" "8" "03 April 2002" "" "" .SH NAME smbpasswd \- change a user's SMB password .SH SYNOPSIS +.PP +When run by root: +.sp +\fBsmbpasswd\fR [ \fBoptions\fR ] [ \fBusername\fR ] [ \fBpassword\fR ] +.PP +otherwise: .sp -\fBsmbpasswd\fR [ \fB-a\fR ] [ \fB-x\fR ] [ \fB-d\fR ] [ \fB-e\fR ] [ \fB-D debuglevel\fR ] [ \fB-n\fR ] [ \fB-r \fR ] [ \fB-R \fR ] [ \fB-m\fR ] [ \fB-j DOMAIN\fR ] [ \fB-U username[%password]\fR ] [ \fB-h\fR ] [ \fB-s\fR ] [ \fB-w pass\fR ] [ \fBusername\fR ] +\fBsmbpasswd\fR [ \fBoptions\fR ] [ \fBpassword\fR ] .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. @@ -50,6 +56,83 @@ directly, thus enabling changes to be made even if smbd is not running. .SH "OPTIONS" .TP +\fB-L\fR +Run the smbpasswd command in local mode. This +allows a non-root user to specify the root-only options. This +is used in test environments where smbd is run as non-root. The +\fIsmbpasswd\fR file must have read/write +permissions for the user running the command. +.TP +\fB-h\fR +This option prints the help string for +\fBsmbpasswd\fR. +.TP +\fB-s\fR +This option causes smbpasswd to be silent (i.e. +not issue prompts) and to read its old and new passwords from +standard input, rather than from \fI/dev/tty\fR +(like the \fBpasswd(1)\fR program does). This option +is to aid people writing scripts to drive smbpasswd +.TP +\fB-c smb.conf file\fR +This option specifies that the configuration +file specified should be used instead of the default value +specified at compile time. +.TP +\fB-D debuglevel\fR +\fIdebuglevel\fR is an integer +from 0 to 10. The default value if this parameter is not specified +is zero. + +The higher this value, the more detail will be logged to the +log files about the activities of smbpasswd. At level 0, only +critical errors and serious warnings will be logged. + +Levels above 1 will generate considerable amounts of log +data, and should only be used when investigating a problem. Levels +above 3 are designed for use only by developers and generate +HUGE amounts of log data, most of which is extremely cryptic. +.TP +\fB-r remote machine name\fR +This option allows a user to specify what machine +they wish to change their password on. Without this parameter +smbpasswd defaults to the local host. The \fIremote +machine name\fR is the NetBIOS name of the SMB/CIFS +server to contact to attempt the password change. This name is +resolved into an IP address using the standard name resolution +mechanism in all programs of the Samba suite. See the \fI-R +name resolve order\fR parameter for details on changing +this resolving mechanism. + +The username whose password is changed is that of the +current UNIX logged on user. See the \fI-U username\fR +parameter for details on changing the password for a different +username. + +Note that if changing a Windows NT Domain password the +remote machine specified must be the Primary Domain Controller for +the domain (Backup Domain Controllers only have a read-only +copy of the user account database and will not allow the password +change). + +\fBNote\fR that Windows 95/98 do not have +a real password database so it is not possible to change passwords +specifying a Win95/98 machine as remote machine target. +.TP +\fB-U username[%pass]\fR +This option may only be used in conjunction +with the \fI-r\fR option. When changing +a password on a remote machine it allows the user to specify +the user name on that machine whose password will be changed. It +is present to allow users who have different user names on +different systems to change these passwords. The optional +%pass may be used to specify to old password. + +In particular, this parameter specifies the username +used to create the machine account when invoked with -j +.TP +\fBThe following options are available only when the smbpasswd command is\fR +.TP \fB-a\fR This option specifies that the username following should be added to the local smbpasswd file, with the @@ -59,16 +142,6 @@ the smbpasswd file and it is treated like a regular change password command. Note that the user to be added must already exist in the system password file (usually \fI/etc/passwd\fR) else the request to add the user will fail. - -This option is only available when running smbpasswd -as root. -.TP -\fB-x\fR -This option specifies that the username -following should be deleted from the local smbpasswd file. - -This option is only available when running smbpasswd as -root. .TP \fB-d\fR This option specifies that the username following @@ -83,9 +156,6 @@ format) there is no space in the user's password entry to write this information and so the user is disabled by writing 'X' characters into the password space in the smbpasswd file. See \fBsmbpasswd(5) \fRfor details on the 'old' and new password file formats. - -This option is only available when running smbpasswd as -root. .TP \fB-e\fR This option specifies that the username following @@ -98,22 +168,11 @@ If the smbpasswd file is in the 'old' format, then \fB smbpasswd\fR will prompt otherwise the account will be enabled by removing the 'D' flag from account control space in the \fI smbpasswd\fR file. See \fBsmbpasswd (5)\fR for details on the 'old' and new password file formats. - -This option is only available when running smbpasswd as root. .TP -\fB-D debuglevel\fR -\fIdebuglevel\fR is an integer -from 0 to 10. The default value if this parameter is not specified -is zero. - -The higher this value, the more detail will be logged to the -log files about the activities of smbpasswd. At level 0, only -critical errors and serious warnings will be logged. - -Levels above 1 will generate considerable amounts of log -data, and should only be used when investigating a problem. Levels -above 3 are designed for use only by developers and generate -HUGE amounts of log data, most of which is extremely cryptic. +\fB-m\fR +This option tells smbpasswd that the account +being changed is a MACHINE account. Currently this is used +when Samba is being used as an NT Primary Domain Controller. .TP \fB-n\fR This option specifies that the username following @@ -128,35 +187,62 @@ file the administrator must set the following parameter in the [global] section of the \fIsmb.conf\fR file : \fBnull passwords = yes\fR - -This option is only available when running smbpasswd as -root. .TP -\fB-r remote machine name\fR -This option allows a user to specify what machine -they wish to change their password on. Without this parameter -smbpasswd defaults to the local host. The \fIremote -machine name\fR is the NetBIOS name of the SMB/CIFS -server to contact to attempt the password change. This name is -resolved into an IP address using the standard name resolution -mechanism in all programs of the Samba suite. See the \fI-R -name resolve order\fR parameter for details on changing -this resolving mechanism. +\fB-w password\fR +This parameter is only available is Samba +has been configured to use the experimental +\fB--with-ldapsam\fR option. The \fI-w\fR +switch is used to specify the password to be used with the +\fIldap admin +dn\fR. Note that the password is stored in +the \fIprivate/secrets.tdb\fR and is keyed off +of the admin's DN. This means that if the value of \fIldap +admin dn\fR ever changes, the password will beed to be +manually updated as well. +.TP +\fB-x\fR +This option specifies that the username +following should be deleted from the local smbpasswd file. +.TP +\fB-j DOMAIN\fR +This option is used to add a Samba server +into a Windows NT Domain, as a Domain member capable of authenticating +user accounts to any Domain Controller in the same way as a Windows +NT Server. See the \fBsecurity = domain\fR option in +the \fIsmb.conf(5)\fR man page. -The username whose password is changed is that of the -current UNIX logged on user. See the \fI-U username\fR -parameter for details on changing the password for a different -username. +This command can work both with and without the -U parameter. -Note that if changing a Windows NT Domain password the -remote machine specified must be the Primary Domain Controller for -the domain (Backup Domain Controllers only have a read-only -copy of the user account database and will not allow the password -change). +When invoked with -U, that username (and optional password) are +used to contact the PDC (which must be specified with -r) to both +create a machine account, and to set a password on it. -\fBNote\fR that Windows 95/98 do not have -a real password database so it is not possible to change passwords -specifying a Win95/98 machine as remote machine target. +Alternately, if -U is omitted, Samba will contact its PDC +and attempt to change the password on a pre-existing account. + +In order to be used in this way, the Administrator for +the Windows NT Domain must have used the program "Server Manager +for Domains" to add the primary NetBIOS name of the Samba server +as a member of the Domain. + +After this has been done, to join the Domain invoke \fB smbpasswd\fR with this parameter. smbpasswd will then +look up the Primary Domain Controller for the Domain (found in +the \fIsmb.conf\fR file in the parameter +\fIpassword server\fR and change the machine account +password used to create the secure Domain communication. + +Either way, this password is then stored by smbpasswd in a TDB, +writeable only by root, called \fIsecrets.tdb\fR + +Once this operation has been performed the \fI smb.conf\fR file may be updated to set the \fB security = domain\fR option and all future logins +to the Samba server will be authenticated to the Windows NT +PDC. + +Note that even though the authentication is being +done to the PDC all users accessing the Samba server must still +have a valid UNIX account on that machine. +The \fBwinbindd(8)\fR daemon can be used +to create UNIX accounts for NT users. .TP \fB-R name resolve order\fR This option allows the user of smbpasswd to determine @@ -203,94 +289,15 @@ and without this parameter or any entry in the be attempted in this order. .PP .TP -\fB-m\fR -This option tells smbpasswd that the account -being changed is a MACHINE account. Currently this is used -when Samba is being used as an NT Primary Domain Controller. - -This option is only available when running smbpasswd as root. -.TP -\fB-j DOMAIN\fR -This option is used to add a Samba server -into a Windows NT Domain, as a Domain member capable of authenticating -user accounts to any Domain Controller in the same way as a Windows -NT Server. See the \fBsecurity = domain\fR option in -the \fIsmb.conf(5)\fR man page. - -This command can work both with and without the -U parameter. - -When invoked with -U, that username (and optional password) are -used to contact the PDC (which must be specified with -r) to both -create a machine account, and to set a password on it. - -Alternately, if -U is omitted, Samba will contact its PDC -and attempt to change the password on a pre-existing account. - -In order to be used in this way, the Administrator for -the Windows NT Domain must have used the program "Server Manager -for Domains" to add the primary NetBIOS name of the Samba server -as a member of the Domain. - -After this has been done, to join the Domain invoke \fB smbpasswd\fR with this parameter. smbpasswd will then -look up the Primary Domain Controller for the Domain (found in -the \fIsmb.conf\fR file in the parameter -\fIpassword server\fR and change the machine account -password used to create the secure Domain communication. - -Either way, this password is then stored by smbpasswd in a TDB, -writeable only by root, called \fIsecrets.tdb\fR - -Once this operation has been performed the \fI smb.conf\fR file may be updated to set the \fB security = domain\fR option and all future logins -to the Samba server will be authenticated to the Windows NT -PDC. - -Note that even though the authentication is being -done to the PDC all users accessing the Samba server must still -have a valid UNIX account on that machine. -The \fBwinbindd(8)\fR daemon can be used -to create UNIX accounts for NT users. - -This option is only available when running smbpasswd as root. -.TP -\fB-U username\fR -This option may only be used in conjunction -with the \fI-r\fR option. When changing -a password on a remote machine it allows the user to specify -the user name on that machine whose password will be changed. It -is present to allow users who have different user names on -different systems to change these passwords. - -In particular, this parameter specifies the username -used to create the machine account when invoked with -j -.TP -\fB-h\fR -This option prints the help string for \fB smbpasswd\fR, selecting the correct one for running as root -or as an ordinary user. -.TP -\fB-s\fR -This option causes smbpasswd to be silent (i.e. -not issue prompts) and to read its old and new passwords from -standard input, rather than from \fI/dev/tty\fR -(like the \fBpasswd(1)\fR program does). This option -is to aid people writing scripts to drive smbpasswd -.TP -\fB-w password\fR -This parameter is only available is Samba -has been configured to use the experimental -\fB--with-ldapsam\fR option. The \fI-w\fR -switch is used to specify the password to be used with the -\fIldap admin -dn\fR. Note that the password is stored in -the \fIprivate/secrets.tdb\fR and is keyed off -of the admin's DN. This means that if the value of \fIldap -admin dn\fR ever changes, the password will beed to be -manually updated as well. -.TP \fBusername\fR This specifies the username for all of the \fBroot only\fR options to operate on. Only root can specify this parameter as only root has the permission needed to modify attributes directly in the local smbpasswd file. +.TP +\fBpassword\fR +This specifies the new password. If this parameter +is specified you will not be prompted for the new password. .SH "NOTES" .PP Since \fBsmbpasswd\fR works in client-server -- cgit From bf2d5c2e117d1f3f0280ed9498b055e550f518f7 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 3 Apr 2002 16:05:33 +0000 Subject: reorder usage message a little --- source/utils/smbpasswd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 1a7dba9db41..6699c562a8e 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -75,25 +75,26 @@ static void usage(void) printf(" smbpasswd [options] [password]\n\n"); printf("options:\n"); - printf(" -c smb.conf file Use the given path to the smb.conf file\n"); + printf(" -L local mode (must be first option)\n"); + printf(" -h print this usage message\n"); printf(" -s use stdin for password prompt\n"); + printf(" -c smb.conf file Use the given path to the smb.conf file\n"); printf(" -D LEVEL debug level\n"); - printf(" -U USER remote username\n"); printf(" -r MACHINE remote machine\n"); + printf(" -U USER remote username\n"); printf("extra options when run by root or in local mode:\n"); - printf(" -L local mode (must be first option)\n"); - printf(" -R ORDER name resolve order\n"); - printf(" -j DOMAIN join domain name\n"); printf(" -a add user\n"); - printf(" -x delete user\n"); printf(" -d disable user\n"); printf(" -e enable user\n"); - printf(" -n set no password\n"); printf(" -m machine trust account\n"); + printf(" -n set no password\n"); #ifdef WITH_LDAP_SAM printf(" -w ldap admin password\n"); #endif + printf(" -x delete user\n"); + printf(" -j DOMAIN join domain name\n"); + printf(" -R ORDER name resolve order\n"); exit(1); } -- cgit From 5d16042ebdfc162ecfb0ef03aefd76296f077d24 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 3 Apr 2002 17:06:08 +0000 Subject: fix note that starts root only options so it works for manpage output --- docs/docbook/manpages/smbpasswd.8.sgml | 7 ++++--- docs/htmldocs/smbpasswd.8.html | 15 +++++++++------ docs/manpages/smbpasswd.8 | 4 +++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index d0cb34c45bc..125cff3fd13 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -175,10 +175,11 @@ - +NOTE: + The following options are available only when the smbpasswd command is -run as root or in local mode. - +run as root or in local mode. + diff --git a/docs/htmldocs/smbpasswd.8.html b/docs/htmldocs/smbpasswd.8.html index ee4ea75aab4..f8552ff5299 100644 --- a/docs/htmldocs/smbpasswd.8.html +++ b/docs/htmldocs/smbpasswd.8.html @@ -267,11 +267,14 @@ CLASS="PARAMETER" >
    The following options are available only when the smbpasswd command is -run as root or in local mode.NOTE:

    The following options are available only when the smbpasswd command is +run as root or in local mode.

    NOTES

    VERSION

    SEE ALSO

    AUTHOR

    Date: Wed, 3 Apr 2002 21:17:07 +0000 Subject: print out a password changed message if account exists and LOCAL_ADD_USER is set instead of just silently changing it. --- source/passdb/passdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index fd2a678a268..40b2afe75f1 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -938,6 +938,7 @@ account without a valid local system user.\n", user_name); } else { /* the entry already existed */ local_flags &= ~LOCAL_ADD_USER; + slprintf(msg_str, msg_str_len-1, "Password changed for user %s.\n", user_name ); } /* -- cgit From 6ec215cd195ad8ce94449a95f804080c948b1567 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 3 Apr 2002 21:42:37 +0000 Subject: minor typos and slight change to -L description. Someone who really understands -L should take a look at this. --- docs/docbook/manpages/smbpasswd.8.sgml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index 125cff3fd13..ad962144331 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -78,8 +78,9 @@ -L Run the smbpasswd command in local mode. This allows a non-root user to specify the root-only options. This - is used in test environments where smbd is run as non-root. The - smbpasswd file must have read/write + is used mostly in test environments where a non-root user needs + to make changes to the local smbpasswd file. + The smbpasswd file must have read/write permissions for the user running the command. @@ -186,8 +187,8 @@ run as root or in local mode. -a This option specifies that the username following should be added to the local smbpasswd file, with the - new password typed (type <Enter> for the old password). This - option is ignored if the username following already exists in + new password typed. This + option is ignored if the username specified already exists in the smbpasswd file and it is treated like a regular change password command. Note that the user to be added must already exist in the system password file (usually /etc/passwd) @@ -345,7 +346,7 @@ run as root or in local mode. host : Do a standard host name to IP address resolution, using the system /etc/hosts , NIS, or DNS lookups. This method of name resolution - is operating system depended for instance on IRIX or Solaris this + is operating system dependent. For instance, on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise -- cgit From b32e8c7b8dc88f7067bc6344d560485a88c13e89 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 3 Apr 2002 21:48:40 +0000 Subject: regenerated --- docs/htmldocs/smbpasswd.8.html | 22 +++++++++++++--------- docs/manpages/smbpasswd.8 | 11 ++++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/htmldocs/smbpasswd.8.html b/docs/htmldocs/smbpasswd.8.html index f8552ff5299..6bff986f751 100644 --- a/docs/htmldocs/smbpasswd.8.html +++ b/docs/htmldocs/smbpasswd.8.html @@ -134,8 +134,12 @@ CLASS="VARIABLELIST" >

    Run the smbpasswd command in local mode. This allows a non-root user to specify the root-only options. This - is used in test environments where smbd is run as non-root. The - smbpasswd file. + The smbpasswd file must have read/write @@ -283,8 +287,8 @@ run as root or in local mode.

    This option specifies that the username following should be added to the local smbpasswd file, with the - new password typed (type <Enter> for the old password). This - option is ignored if the username following already exists in + new password typed. This + option is ignored if the username specified already exists in the smbpasswd file and it is treated like a regular change password command. Note that the user to be added must already exist in the system password file (usually /etc/hosts , NIS, or DNS lookups. This method of name resolution - is operating system depended for instance on IRIX or Solaris this + is operating system dependent. For instance, on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf

    NOTES

    VERSION

    SEE ALSO

    AUTHOR

    for the old password). This -option is ignored if the username following already exists in +new password typed. This +option is ignored if the username specified already exists in the smbpasswd file and it is treated like a regular change password command. Note that the user to be added must already exist in the system password file (usually \fI/etc/passwd\fR) @@ -265,7 +266,7 @@ any name type matches for lookup. host : Do a standard host name to IP address resolution, using the system \fI/etc/hosts \fR, NIS, or DNS lookups. This method of name resolution -is operating system depended for instance on IRIX or Solaris this +is operating system dependent. For instance, on IRIX or Solaris this may be controlled by the \fI/etc/nsswitch.conf\fR file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise -- cgit From 45ab42c69e3c3ad1e2cd10d680be5b8292f67d86 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 4 Apr 2002 00:39:13 +0000 Subject: Fixed psec for 2.2: - open ntprinters.tdb instead of ntdrivers.tdb - convert to talloc based security descriptor construction - renamed field in ace structure --- testsuite/printing/psec.c | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/testsuite/printing/psec.c b/testsuite/printing/psec.c index 88a111404c9..f86b5aca8f6 100644 --- a/testsuite/printing/psec.c +++ b/testsuite/printing/psec.c @@ -1,6 +1,5 @@ /* Unix SMB/Netbios implementation. - Version 2.0 Printer security permission manipulation. @@ -67,6 +66,8 @@ TDB_CONTEXT *tdb; +#if 0 /* Unused */ + /* ACE type conversions */ char *ace_type_to_str(uint ace_type) @@ -135,7 +136,7 @@ char *ace_to_str(SEC_ACE *ace) static pstring temp; fstring sidstr; - sid_to_string(sidstr, &ace->sid); + sid_to_string(sidstr, &ace->trustee); slprintf(temp, sizeof(temp) - 1, "%s %d %s %s", ace_type_to_str(ace->type), ace->flags, @@ -155,6 +156,8 @@ void str_to_ace(SEC_ACE *ace, char *ace_str) init_sec_ace(ace, &sid, type, sa, flags); } +#endif /* unused */ + /* Get a printer security descriptor */ int psec_getsec(char *printer) @@ -169,11 +172,11 @@ int psec_getsec(char *printer) /* Open tdb for reading */ - slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR); + slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntprinters.tdb", LOCKDIR); tdb = tdb_open(tdb_path, 0, 0, O_RDONLY, 0600); if (!tdb) { - printf("psec: failed to open nt drivers database: %s\n", + printf("psec: failed to open nt printers database: %s\n", sys_errlist[errno]); return 1; } @@ -233,7 +236,7 @@ int psec_getsec(char *printer) for (i = 0; i < secdesc_ctr->sec->dacl->num_aces; i++) { SEC_ACE *ace = &secdesc_ctr->sec->dacl->ace[i]; - sid_to_string(sidstr, &ace->sid); + sid_to_string(sidstr, &ace->trustee); printf("%d %d 0x%08x %s\n", ace->type, ace->flags, ace->info.mask, sidstr); @@ -242,7 +245,6 @@ int psec_getsec(char *printer) done: if (tdb) tdb_close(tdb); if (mem_ctx) talloc_destroy(mem_ctx); - if (secdesc_ctr) free_sec_desc_buf(&secdesc_ctr); prs_mem_free(&ps); return result; @@ -264,15 +266,23 @@ int psec_setsec(char *printer) TALLOC_CTX *mem_ctx = NULL; BOOL has_user_sid = False, has_group_sid = False; + /* Init memory */ + ZERO_STRUCT(ps); + if (!(mem_ctx = talloc_init())) { + printf("memory allocation error\n"); + result = 1; + goto done; + } + /* Open tdb for reading */ - slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR); + slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntprinters.tdb", LOCKDIR); tdb = tdb_open(tdb_path, 0, 0, O_RDWR, 0600); if (!tdb) { - printf("psec: failed to open nt drivers database: %s\n", + printf("psec: failed to open nt printers database: %s\n", sys_errlist[errno]); result = 1; goto done; @@ -318,36 +328,24 @@ int psec_setsec(char *printer) num_aces++; } - dacl = make_sec_acl(ACL_REVISION, num_aces, ace_list); + dacl = make_sec_acl(mem_ctx, ACL_REVISION, num_aces, ace_list); free(ace_list); /* Create security descriptor */ - sd = make_sec_desc(SEC_DESC_REVISION, + sd = make_sec_desc(mem_ctx, SEC_DESC_REVISION, has_user_sid ? &user_sid : NULL, has_group_sid ? &group_sid : NULL, NULL, /* System ACL */ dacl, /* Discretionary ACL */ &size); - free_sec_acl(&dacl); - - sdb = make_sec_desc_buf(size, sd); - - free_sec_desc(&sd); + sdb = make_sec_desc_buf(mem_ctx, size, sd); /* Write security descriptor to tdb */ - mem_ctx = talloc_init(); - - if (!mem_ctx) { - printf("memory allocation error\n"); - result = 1; - goto done; - } - prs_init(&ps, (uint32)sec_desc_size(sdb->sec) + - sizeof(SEC_DESC_BUF), 4, mem_ctx, MARSHALL); + sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL); if (!sec_io_desc_buf("nt_printing_setsec", &sdb, &ps, 1)) { printf("sec_io_desc_buf failed\n"); @@ -363,7 +361,6 @@ int psec_setsec(char *printer) done: if (tdb) tdb_close(tdb); - if (sdb) free_sec_desc_buf(&sdb); if (mem_ctx) talloc_destroy(mem_ctx); prs_mem_free(&ps); -- cgit From 020e5091f72a21789090f2155240b786a7219135 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Apr 2002 02:39:48 +0000 Subject: Fixed the handle leak in the connection management code (this code is crap and should be rewritten, just not now... :-). Jeremy. --- source/include/proto.h | 1 + source/nsswitch/winbindd_cm.c | 13 +++++++++++++ source/nsswitch/winbindd_rpc.c | 13 +++++++++++-- source/rpc_parse/parse_lsa.c | 6 ++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 548f4e15046..ee03ca677b7 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2672,6 +2672,7 @@ BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int dept BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth); BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth); BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth); +BOOL policy_handle_is_valid(const POLICY_HND *hnd); /* The following definitions come from rpc_parse/parse_misc.c */ diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 03a8e3cdd1e..7024592f5b7 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -458,6 +458,13 @@ CLI_POLICY_HND *cm_get_lsa_handle(char *domain) if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) { return NULL; } + + /* This *shitty* code needs scrapping ! JRA */ + if (policy_handle_is_valid(&conn->pol)) { + hnd.pol = conn->pol; + hnd.cli = conn->cli; + return &hnd; + } result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False, des_access, &conn->pol); @@ -502,6 +509,12 @@ CLI_POLICY_HND *cm_get_sam_handle(char *domain) return NULL; } + /* This *shitty* code needs scrapping ! JRA */ + if (policy_handle_is_valid(&conn->pol)) { + hnd.pol = conn->pol; + hnd.cli = conn->cli; + return &hnd; + } result = cli_samr_connect(conn->cli, conn->cli->mem_ctx, des_access, &conn->pol); diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 865a0f7c322..27a1386c934 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -67,7 +67,10 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, ctr.sam.info1 = &info1; ctx2 = talloc_init_named("winbindd dispinfo"); - if (!ctx2) return NT_STATUS_NO_MEMORY; + if (!ctx2) { + result = NT_STATUS_NO_MEMORY; + goto done; + } /* Query display info level 1 */ result = cli_samr_query_dispinfo(hnd->cli, ctx2, @@ -83,7 +86,9 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, (*info) = talloc_realloc(mem_ctx, *info, (*num_entries)*sizeof(WINBIND_USERINFO)); if (!(*info)) { - return NT_STATUS_NO_MEMORY; + result = NT_STATUS_NO_MEMORY; + talloc_destroy(ctx2); + goto done; } for (j=0;jcli, mem_ctx, &dom_pol); return NT_STATUS_NO_MEMORY; } @@ -286,11 +292,14 @@ static NTSTATUS query_user(struct winbindd_domain *domain, if (!NT_STATUS_IS_OK(result)) goto done; + got_user_pol = True; + /* Get user info */ result = cli_samr_query_userinfo(hnd->cli, mem_ctx, &user_pol, 0x15, &ctr); cli_samr_close(hnd->cli, mem_ctx, &user_pol); + got_user_pol = False; user_info->group_rid = ctr->info.id21->group_rid; user_info->acct_name = unistr2_tdup(mem_ctx, diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c index fd82325be73..91b54b9c836 100644 --- a/source/rpc_parse/parse_lsa.c +++ b/source/rpc_parse/parse_lsa.c @@ -2094,4 +2094,10 @@ BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, in return True; } +BOOL policy_handle_is_valid(const POLICY_HND *hnd) +{ + POLICY_HND zero_pol; + ZERO_STRUCT(zero_pol); + return ((memcmp(&zero_pol, hnd, sizeof(POLICY_HND)) == 0) ? False : True ); +} -- cgit From bb12702167f031cb873cfc03109102c9d2130031 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Apr 2002 03:03:29 +0000 Subject: Fix up conversion code from old winbindd versions (some testing needed). Added time based cache size check (#ifdef'ed out by default, just didn't want to lose the code). Jeremy. --- source/nsswitch/winbindd.c | 4 + source/nsswitch/winbindd_cache.c | 31 ++++++ source/nsswitch/winbindd_idmap.c | 210 ++++++++++++++++++++++++++------------- 3 files changed, 178 insertions(+), 67 deletions(-) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 688026d2635..45d9171a760 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -634,6 +634,10 @@ static void process_loop(int accept_sock) } } +#if 0 + winbindd_check_cache_size(time(NULL)); +#endif + /* Check signal handling things */ if (do_sigterm) diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 87957c05efc..3a76ba97fae 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -34,6 +34,8 @@ struct cache_entry { uint32 len, ofs; }; +#define WINBINDD_MAX_CACHE_SIZE (50*1024*1024) + static struct winbind_cache *wcache; /* flush the cache */ @@ -56,6 +58,35 @@ void wcache_flush_cache(void) } } +void winbindd_check_cache_size(time_t t) +{ + static time_t last_check_time; + struct stat st; + + if (last_check_time == (time_t)0) + last_check_time = t; + + if (t - last_check_time < 60 && t - last_check_time > 0) + return; + + if (wcache == NULL || wcache->tdb == NULL) { + DEBUG(0, ("Unable to check size of tdb cache - cache not open !\n")); + return; + } + + if (fstat(wcache->tdb->fd, &st) == -1) { + DEBUG(0, ("Unable to check size of tdb cache %s!\n", strerror(errno) )); + return; + } + + if (st.st_size > WINBINDD_MAX_CACHE_SIZE) { + DEBUG(10,("flushing cache due to size (%lu) > (%lu)\n", + (unsigned long)st.st_size, + (unsigned long)WINBINDD_MAX_CACHE_SIZE)); + wcache_flush_cache(); + } +} + /* get the winbind_cache structure */ static struct winbind_cache *get_cache(struct winbindd_domain *domain) { diff --git a/source/nsswitch/winbindd_idmap.c b/source/nsswitch/winbindd_idmap.c index 897d93b0f02..bae61449ee1 100644 --- a/source/nsswitch/winbindd_idmap.c +++ b/source/nsswitch/winbindd_idmap.c @@ -244,24 +244,28 @@ BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, static int convert_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, void *ignored) { struct winbindd_domain *domain; - char *p, *dom_name; + char *p; DOM_SID sid; uint32 rid; fstring keystr; + fstring dom_name; TDB_DATA key2; p = strchr(key.dptr, '/'); - if (!p) return 0; + if (!p) + return 0; - *p++ = 0; - dom_name = key.dptr; + *p = 0; + fstrcpy(dom_name, key.dptr); + *p++ = '/'; domain = find_domain_from_name(dom_name); if (!domain) { - /* what do we do about this?? */ + /* We must delete the old record. */ DEBUG(0,("winbindd: convert_fn : Unable to find domain %s\n", dom_name )); - DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n")); - return -1; + DEBUG(0,("winbindd: convert_fn : deleting record %s\n", key.dptr )); + tdb_delete(idmap_tdb, key); + return 0; } rid = atoi(p); @@ -292,14 +296,84 @@ static int convert_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, void *ignor return 0; } -/* convert the idmap database from an older version */ -static BOOL idmap_convert(void) +#if 0 +/***************************************************************************** + Make a backup copy of the old idmap just to be safe.... JRA. +*****************************************************************************/ + +static BOOL backup_old_idmap(const char *idmap_name) +{ + pstring new_name; + int outfd = -1; + SMB_OFF_T size; + struct stat st; + + pstrcpy(new_name, idmap_name); + pstrcat(new_name, ".bak"); + + DEBUG(10,("backup_old_idmap: backing up %s to %s before upgrade.\n", + idmap_name, new_name )); + + if (tdb_lockall(idmap_tdb) == -1) { + DEBUG(10,("backup_old_idmap: failed to lock %s. Error %s\n", + idmap_name, tdb_errorstr(idmap_tdb) )); + return False; + } + if ((outfd = open(new_name, O_CREAT|O_EXCL|O_RDWR, 0600)) == -1) { + DEBUG(10,("backup_old_idmap: failed to open %s. Error %s\n", + new_name, strerror(errno) )); + goto fail; + } + + if (fstat(idmap_tdb->fd, &st) == -1) { + DEBUG(10,("backup_old_idmap: failed to fstat %s. Error %s\n", + idmap_name, strerror(errno) )); + goto fail; + } + + size = (SMB_OFF_T)st.st_size; + + if (transfer_file(idmap_tdb->fd, outfd, size) != size ) { + DEBUG(10,("backup_old_idmap: failed to copy %s. Error %s\n", + idmap_name, strerror(errno) )); + goto fail; + } + + if (close(outfd) == -1) { + DEBUG(10,("backup_old_idmap: failed to close %s. Error %s\n", + idmap_name, strerror(errno) )); + outfd = -1; + goto fail; + } + tdb_unlockall(idmap_tdb); + return True; + +fail: + + if (outfd != -1) + close(outfd); + tdb_unlockall(idmap_tdb); + return False; +} +#endif + +/***************************************************************************** + Convert the idmap database from an older version. +*****************************************************************************/ + +static BOOL idmap_convert(const char *idmap_name) { int32 vers = tdb_fetch_int32(idmap_tdb, "IDMAP_VERSION"); if (vers == IDMAP_VERSION) return True; +#if 0 + /* Make a backup copy before doing anything else.... */ + if (!backup_old_idmap(idmap_name)) + return False; +#endif + if (IREV(vers) == IDMAP_VERSION) { /* Arrggghh ! Bytereversed - make order independent ! */ int32 wm; @@ -338,41 +412,43 @@ static BOOL idmap_convert(void) return True; } - -/* Initialise idmap database */ +/***************************************************************************** + Initialise idmap database. +*****************************************************************************/ BOOL winbindd_idmap_init(void) { - /* Open tdb cache */ + /* Open tdb cache */ - if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0, - TDB_DEFAULT, O_RDWR | O_CREAT, 0600))) { - DEBUG(0, ("Unable to open idmap database\n")); - return False; - } + if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0, + TDB_DEFAULT, O_RDWR | O_CREAT, 0600))) { + DEBUG(0, ("winbindd_idmap_init: Unable to open idmap database\n")); + return False; + } - /* possibly convert from an earlier version */ - if (!idmap_convert()) { - return False; - } + /* possibly convert from an earlier version */ + if (!idmap_convert(lock_path("winbindd_idmap.tdb"))) { + DEBUG(0, ("winbindd_idmap_init: Unable to open idmap database\n")); + return False; + } - /* Create high water marks for group and user id */ + /* Create high water marks for group and user id */ - if (tdb_fetch_int32(idmap_tdb, HWM_USER) == -1) { - if (tdb_store_int32(idmap_tdb, HWM_USER, server_state.uid_low) == -1) { - DEBUG(0, ("winbindd_idmap_init: Unable to initialise user hwm in idmap database\n")); - return False; - } - } + if (tdb_fetch_int32(idmap_tdb, HWM_USER) == -1) { + if (tdb_store_int32(idmap_tdb, HWM_USER, server_state.uid_low) == -1) { + DEBUG(0, ("winbindd_idmap_init: Unable to initialise user hwm in idmap database\n")); + return False; + } + } - if (tdb_fetch_int32(idmap_tdb, HWM_GROUP) == -1) { - if (tdb_store_int32(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) { - DEBUG(0, ("winbindd_idmap_init: Unable to initialise group hwm in idmap database\n")); - return False; - } - } + if (tdb_fetch_int32(idmap_tdb, HWM_GROUP) == -1) { + if (tdb_store_int32(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) { + DEBUG(0, ("winbindd_idmap_init: Unable to initialise group hwm in idmap database\n")); + return False; + } + } - return True; + return True; } BOOL winbindd_idmap_close(void) @@ -395,49 +471,49 @@ BOOL winbindd_idmap_close(void) void winbindd_idmap_status(void) { - int user_hwm, group_hwm; + int user_hwm, group_hwm; - DEBUG(0, ("winbindd idmap status:\n")); + DEBUG(0, ("winbindd idmap status:\n")); - /* Get current high water marks */ + /* Get current high water marks */ - if ((user_hwm = tdb_fetch_int32(idmap_tdb, HWM_USER)) == -1) { - DEBUG(DUMP_INFO, ("\tCould not get userid high water mark!\n")); - } + if ((user_hwm = tdb_fetch_int32(idmap_tdb, HWM_USER)) == -1) { + DEBUG(DUMP_INFO, ("\tCould not get userid high water mark!\n")); + } - if ((group_hwm = tdb_fetch_int32(idmap_tdb, HWM_GROUP)) == -1) { - DEBUG(DUMP_INFO, ("\tCould not get groupid high water mark!\n")); - } + if ((group_hwm = tdb_fetch_int32(idmap_tdb, HWM_GROUP)) == -1) { + DEBUG(DUMP_INFO, ("\tCould not get groupid high water mark!\n")); + } - /* Display next ids to allocate */ + /* Display next ids to allocate */ - if (user_hwm != -1) { - DEBUG(DUMP_INFO, ("\tNext userid to allocate is %d\n", user_hwm)); - } + if (user_hwm != -1) { + DEBUG(DUMP_INFO, ("\tNext userid to allocate is %d\n", user_hwm)); + } - if (group_hwm != -1) { - DEBUG(DUMP_INFO, ("\tNext groupid to allocate is %d\n", group_hwm)); - } + if (group_hwm != -1) { + DEBUG(DUMP_INFO, ("\tNext groupid to allocate is %d\n", group_hwm)); + } - /* Display percentage of id range already allocated. */ + /* Display percentage of id range already allocated. */ - if (user_hwm != -1) { - int num_users = user_hwm - server_state.uid_low; - int total_users = server_state.uid_high - server_state.uid_low; + if (user_hwm != -1) { + int num_users = user_hwm - server_state.uid_low; + int total_users = server_state.uid_high - server_state.uid_low; - DEBUG(DUMP_INFO, ("\tUser id range is %d%% full (%d of %d)\n", - num_users * 100 / total_users, num_users, - total_users)); - } + DEBUG(DUMP_INFO, ("\tUser id range is %d%% full (%d of %d)\n", + num_users * 100 / total_users, num_users, + total_users)); + } - if (group_hwm != -1) { - int num_groups = group_hwm - server_state.gid_low; - int total_groups = server_state.gid_high - server_state.gid_low; + if (group_hwm != -1) { + int num_groups = group_hwm - server_state.gid_low; + int total_groups = server_state.gid_high - server_state.gid_low; - DEBUG(DUMP_INFO, ("\tGroup id range is %d%% full (%d of %d)\n", - num_groups * 100 / total_groups, num_groups, - total_groups)); - } + DEBUG(DUMP_INFO, ("\tGroup id range is %d%% full (%d of %d)\n", + num_groups * 100 / total_groups, num_groups, + total_groups)); + } - /* Display complete mapping of users and groups to rids */ + /* Display complete mapping of users and groups to rids */ } -- cgit From 765364356e6a77dd47008aa052cb2f3ee4597840 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 4 Apr 2002 06:13:01 +0000 Subject: Merge from HEAD: >Fixed memory leak in cli_lsa_enum_trust_dom(). Use talloc_strdup() instead >of strdup(). --- source/libsmb/cli_lsarpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c index d1675023311..79841bb85f3 100644 --- a/source/libsmb/cli_lsarpc.c +++ b/source/libsmb/cli_lsarpc.c @@ -605,7 +605,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, unistr2_to_ascii(tmp, &r.uni_domain_name[i], sizeof(tmp) - 1); - (*domain_names)[i] = strdup(tmp); + (*domain_names)[i] = talloc_strdup(mem_ctx, tmp); sid_copy(&(*domain_sids)[i], &r.domain_sid[i].sid); } } -- cgit From a2c1d7dab84b19ae95ee3c3fdbf18c8b1ef31edc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 4 Apr 2002 06:49:25 +0000 Subject: Merge from HEAD: >Call poptFreeContext() as appropriate. > >Clean up exit path code. > >Spelling. --- source/nsswitch/wbinfo.c | 61 ++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c index a9cf309ebf0..9803d6505f4 100644 --- a/source/nsswitch/wbinfo.c +++ b/source/nsswitch/wbinfo.c @@ -46,7 +46,7 @@ static char winbind_separator(void) if (winbindd_request(WINBINDD_INFO, NULL, &response) != NSS_STATUS_SUCCESS) { - printf("could not obtain winbind seperator!\n"); + printf("could not obtain winbind separator!\n"); /* HACK: (this module should not call lp_ funtions) */ return *lp_winbind_separator(); } @@ -660,6 +660,7 @@ int main(int argc, char **argv) static char *string_arg; static int int_arg; BOOL got_command = False; + int result = 1; struct poptOption long_options[] = { @@ -730,6 +731,8 @@ int main(int argc, char **argv) got_command = True; } + poptFreeContext(pc); + pc = poptGetContext(NULL, argc, (const char **)argv, long_options, POPT_CONTEXT_KEEP_FIRST); @@ -737,95 +740,94 @@ int main(int argc, char **argv) switch (opt) { case 'h': usage(); - exit(0); + result = 0; + goto done; case 'u': if (!print_domain_users()) { printf("Error looking up domain users\n"); - return 1; + goto done; } break; case 'g': if (!print_domain_groups()) { printf("Error looking up domain groups\n"); - return 1; + goto done; } break; case 's': if (!wbinfo_lookupsid(string_arg)) { printf("Could not lookup sid %s\n", string_arg); - return 1; + goto done; } break; case 'n': if (!wbinfo_lookupname(string_arg)) { printf("Could not lookup name %s\n", string_arg); - return 1; + goto done; } break; case 'N': if (!wbinfo_wins_byname(string_arg)) { - printf("Could not lookup WINS by name %s\n", - string_arg); - return 1; + printf("Could not lookup WINS by name %s\n", string_arg); + goto done; } break; case 'I': if (!wbinfo_wins_byip(string_arg)) { - printf("Could not lookup WINS by IP %s\n", - string_arg); - return 1; + printf("Could not lookup WINS by IP %s\n", string_arg); + goto done; } break; case 'U': if (!wbinfo_uid_to_sid(int_arg)) { printf("Could not convert uid %d to sid\n", int_arg); - return 1; + goto done; } break; case 'G': if (!wbinfo_gid_to_sid(int_arg)) { printf("Could not convert gid %d to sid\n", int_arg); - return 1; + goto done; } break; case 'S': if (!wbinfo_sid_to_uid(string_arg)) { printf("Could not convert sid %s to uid\n", string_arg); - return 1; + goto done; } break; case 'Y': if (!wbinfo_sid_to_gid(string_arg)) { printf("Could not convert sid %s to gid\n", string_arg); - return 1; + goto done; } break; case 't': if (!wbinfo_check_secret()) { printf("Could not check secret\n"); - return 1; + goto done; } break; case 'm': if (!wbinfo_list_domains()) { printf("Could not list trusted domains\n"); - return 1; + goto done; } break; case OPT_SEQUENCE: if (!wbinfo_show_sequence()) { printf("Could not show sequence numbers\n"); - return 1; + goto done; } break; case 'r': if (!wbinfo_get_usergroups(string_arg)) { printf("Could not get groups for user %s\n", string_arg); - return 1; + goto done; } break; case 'a': { @@ -844,30 +846,33 @@ int main(int argc, char **argv) } if (got_error) - return 1; + goto done; break; } case 'p': { if (!wbinfo_ping()) { printf("could not ping winbindd!\n"); - return 1; + goto done; } break; } case OPT_SET_AUTH_USER: - if (!(wbinfo_set_auth_user(string_arg))) { - return 1; - } + if (!(wbinfo_set_auth_user(string_arg))) + goto done; break; default: fprintf(stderr, "Invalid option\n"); usage(); - return 1; + goto done; } } - /* Clean exit */ + result = 0; + + /* Exit code */ - return 0; + done: + poptFreeContext(pc); + return result; } -- cgit From 6ee0027a7543e816e8ea908591351747ee7a7495 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 5 Apr 2002 16:12:20 +0000 Subject: moved spoolss notify clint functions to return WERROR just like cli_spoolss.c --- source/include/proto.h | 8 ++--- source/rpc_client/cli_spoolss_notify.c | 55 ++++++++++++---------------------- source/rpc_server/srv_spoolss_nt.c | 42 ++++++++++++++------------ source/rpcclient/cmd_spoolss.c | 2 +- 4 files changed, 47 insertions(+), 60 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index ee03ca677b7..88ba933ba8c 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2501,14 +2501,14 @@ void cli_nt_session_close(struct cli_state *cli); BOOL spoolss_disconnect_from_client( struct cli_state *cli); BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); -NTSTATUS cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle); -NTSTATUS cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle); -NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 condition, uint32 changd_id); -NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer); diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c index 93ef6e97f26..c65e61095dd 100644 --- a/source/rpc_client/cli_spoolss_notify.c +++ b/source/rpc_client/cli_spoolss_notify.c @@ -1,6 +1,5 @@ /* - * Unix SMB/Netbios implementation. - * Version 1.9. + * Unix SMB/CIFS implementation. * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Jean Francois Micouleau 1998-2000, @@ -161,11 +160,11 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine) do a reply open printer ****************************************************************************/ -NTSTATUS cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle) { - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); prs_struct rbuf; prs_struct buf; @@ -184,25 +183,21 @@ NTSTATUS cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_c /* turn parameters into data stream */ if(!spoolss_io_q_replyopenprinter("", &q_s, &buf, 0)) { DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to marshall SPOOL_Q_REPLYOPENPRINTER struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYOPENPRINTER, &buf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYOPENPRINTER, &buf, &rbuf)) goto done; - } /* turn data stream into parameters*/ if(!spoolss_io_r_replyopenprinter("", &r_s, &rbuf, 0)) { DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to unmarshall SPOOL_R_REPLYOPENPRINTER struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } memcpy(handle, &r_s.handle, sizeof(r_s.handle)); - result = werror_to_ntstatus(r_s.status); + result = r_s.status; done: prs_mem_free(&buf); @@ -215,10 +210,10 @@ done: do a reply open printer ****************************************************************************/ -NTSTATUS cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle) { - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); prs_struct rbuf; prs_struct buf; @@ -236,25 +231,21 @@ NTSTATUS cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ /* turn parameters into data stream */ if(!spoolss_io_q_replycloseprinter("", &q_s, &buf, 0)) { DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_Q_REPLY_CLOSEPRINTER struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYCLOSEPRINTER, &buf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYCLOSEPRINTER, &buf, &rbuf)) goto done; - } /* turn data stream into parameters*/ if(!spoolss_io_r_replycloseprinter("", &r_s, &rbuf, 0)) { DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_R_REPLY_CLOSEPRINTER struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } - result = werror_to_ntstatus(r_s.status); + result = r_s.status; done: prs_mem_free(&buf); @@ -271,13 +262,13 @@ done: Also see cli_spolss_reply_rrpcn() *********************************************************************/ -NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 condition, uint32 changd_id) { prs_struct qbuf, rbuf; SPOOL_Q_ROUTERREPLYPRINTER q; SPOOL_R_ROUTERREPLYPRINTER r; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -295,25 +286,21 @@ NTSTATUS cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ /* Marshall data and send request */ if (!spoolss_io_q_routerreplyprinter ("", &q, &qbuf, 0)) { DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to marshall SPOOL_Q_ROUTERREPLYPRINTER!\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } - if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf)) goto done; - } /* Unmarshall response */ if (!spoolss_io_r_routerreplyprinter ("", &r, &rbuf, 0)) { DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to unmarshall SPOOL_R_ROUTERREPLYPRINTER!\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } /* Return output parameters */ - result = werror_to_ntstatus(r.status); + result = r.status; done: prs_mem_free(&qbuf); @@ -374,7 +361,7 @@ static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, u Also see cli_spoolss_routereplyprinter() *********************************************************************/ -NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer) { @@ -385,14 +372,14 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, SPOOL_NOTIFY_INFO_DATA *notify_data = NULL; uint32 data_len; - NTSTATUS result; + WERROR result = W_ERROR(ERRgeneral); SPOOL_Q_REPLY_RRPCN q_s; SPOOL_R_REPLY_RRPCN r_s; if (!info) { DEBUG(5,("cli_spoolss_reply_rrpcn: NULL printer message info pointer!\n")); - return NT_STATUS_UNSUCCESSFUL; + goto done; } prs_init(&buf, 1024, mem_ctx, MARSHALL); @@ -410,7 +397,7 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (info->flags && (data_len == -1)) { DEBUG(0,("cli_spoolss_reply_rrpcn: Failed to build SPOOL_NOTIFY_INFO_DATA [flags == 0x%x] for printer [%s]\n", info->flags, info->printer_name)); - result = NT_STATUS_NO_MEMORY; + result = WERR_NOMEM; goto done; } notify_info.version = 0x2; @@ -426,21 +413,17 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* turn parameters into data stream */ if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) { DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; + if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) goto done; - } /* turn data stream into parameters*/ if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) { DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n")); - result = NT_STATUS_UNSUCCESSFUL; goto done; } @@ -448,7 +431,7 @@ NTSTATUS cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, DEBUG(8,("cli_spoolss_reply_rrpcn: I think the spooler resonded that the notification was ignored.\n")); } - result = werror_to_ntstatus(r_s.status); + result = r_s.status; done: prs_mem_free(&buf); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index cedabfb1e13..bd111decd23 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1,6 +1,5 @@ /* - * Unix SMB/Netbios implementation. - * Version 1.9. + * Unix SMB/CIFS implementation. * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, @@ -162,7 +161,7 @@ static void free_spool_notify_option(SPOOL_NOTIFY_OPTION **pp) static void srv_spoolss_replycloseprinter(POLICY_HND *handle) { - NTSTATUS result; + WERROR result; /* weird if the test succeds !!! */ if (smb_connections==0) { @@ -172,8 +171,9 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle) result = cli_spoolss_reply_close_printer(&cli, cli.mem_ctx, handle); - if (!NT_STATUS_IS_OK(result)) - DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed.\n")); + if (!W_ERROR_IS_OK(result)) + DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n", + werror_str(result))); /* if it's the last connection, deconnect the IPC$ share */ if (smb_connections==1) { @@ -570,11 +570,11 @@ static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) --jerry **************************************************************************/ -static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX *mem_ctx, +static WERROR srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer) { - NTSTATUS result; + WERROR result; uint32 condition = 0x0; if (info->flags & PRINTER_MESSAGE_DRIVER) @@ -591,11 +591,11 @@ static NTSTATUS srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_C notification **********************************************************************/ -static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, +static WERROR srv_spoolss_send_event_to_client(Printer_entry* Printer, struct cli_state *pcli, PRINTER_MESSAGE_INFO *msg, NT_PRINTER_INFO_LEVEL *info) { - NTSTATUS result; + WERROR result; if (valid_notify_options(Printer)) { /* This is a single call that can send information about multiple changes */ @@ -622,8 +622,7 @@ static NTSTATUS srv_spoolss_send_event_to_client(Printer_entry* Printer, static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) { Printer_entry *find_printer; - NTSTATUS result; - WERROR wresult; + WERROR result; NT_PRINTER_INFO_LEVEL *printer = NULL; if (!msg) { @@ -688,8 +687,8 @@ static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) printer = NULL; } - wresult = get_a_printer(&printer, 2, msg->printer_name); - if (! W_ERROR_IS_OK(wresult)) + result = get_a_printer(&printer, 2, msg->printer_name); + if (!W_ERROR_IS_OK(result)) continue; } @@ -697,9 +696,9 @@ static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) result = srv_spoolss_send_event_to_client(find_printer, &cli, msg, printer); - if (!NT_STATUS_IS_OK(result)) { - DEBUG(10,("send_spoolss_event_notification: Event notification failed [%s]\n", - get_nt_error_msg(result))); + if (!W_ERROR_IS_OK(result)) { + DEBUG(5,("send_spoolss_event_notification: Event notification failed [%s]\n", + werror_str(result))); } } } @@ -1583,7 +1582,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle) { - NTSTATUS result; + WERROR result; /* * If it's the first connection, contact the client @@ -1595,8 +1594,9 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */ dos_to_unix(unix_printer); - if(!spoolss_connect_to_client(&cli, unix_printer)) + if (!spoolss_connect_to_client(&cli, unix_printer)) return False; + message_register(MSG_PRINTER_NOTIFY, srv_spoolss_receive_message); } @@ -1605,8 +1605,12 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin result = cli_spoolss_reply_open_printer(&cli, cli.mem_ctx, printer, localprinter, type, handle); + + if (!W_ERROR_IS_OK(result)) + DEBUG(5,("srv_spoolss_reply_open_printer: Client RPC returned [%s]\n", + werror_str(result))); - return (NT_STATUS_IS_OK(result)); + return (W_ERROR_IS_OK(result)); } /******************************************************************** diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index ed1e4942b14..f2d269678b3 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/rpcclient/cmd_spoolss.c @@ -118,7 +118,7 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, if (!W_ERROR_IS_OK(werror)) { printf("Error closing printer handle! (%s)\n", - get_dos_error_msg(werror)); + werror_str(werror)); } } -- cgit From 33ae17e8507c83a681a97d6970d858981967896b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 5 Apr 2002 17:01:47 +0000 Subject: This registry file was obviously never tested :-( Many thanks to Krischan Jodies for finding this! Volker --- docs/Registry/WinXP_SignOrSeal.reg | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/Registry/WinXP_SignOrSeal.reg b/docs/Registry/WinXP_SignOrSeal.reg index 18690ae6619..f6f4b4cd91c 100644 --- a/docs/Registry/WinXP_SignOrSeal.reg +++ b/docs/Registry/WinXP_SignOrSeal.reg @@ -1,9 +1,11 @@ -REGEDIT4 - -; -; This registry key (gathered from the Samba-tng lists) is needed -; for a Windows XP client to join and logon to a Samba domain -; - -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\netlogon\parameters -"RequireSignOrSeal"=dword:00000000 +Windows Registry Editor Version 5.00 + +; +; This registry key is needed for a Windows XP Client to join +; and logon to a Samba domain. Note: Samba 2.2.3a contained +; this key in a broken format which did nothing to the registry - +; however XP reported "registry key imported". If in doubt +; check the key by hand with regedit. + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters] +"requiresignorseal"=dword:00000000 -- cgit From 4a67361d2e118bb0314f585d3ef3a315161dbd1e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Apr 2002 19:35:44 +0000 Subject: Make pam_smbpass work again. Patch from Lauri Jesmin . Jeremy. --- source/Makefile.in | 3 ++- source/pam_smbpass/support.c | 9 +++++++++ source/pam_smbpass/support.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/source/Makefile.in b/source/Makefile.in index 026664e1093..225b1e6788c 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -367,6 +367,7 @@ PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ lib/util_unistr.o lib/signal.o lib/talloc.o lib/ms_fnmatch.o \ lib/util_sock.o lib/smbrun.o lib/util_sec.o lib/snprintf.o \ ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \ + smbd/ssl.o lib/access.o \ lib/interfaces.o $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0:.o=.po) @@ -647,7 +648,7 @@ libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) @echo Linking shared library $@ - $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) $(LIBS) -lc + $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) -lc nsswitch/libnss_wins.so: $(NSS_OBJ) @echo "Linking $@" diff --git a/source/pam_smbpass/support.c b/source/pam_smbpass/support.c index 5a245ec5575..332b54f23b7 100644 --- a/source/pam_smbpass/support.c +++ b/source/pam_smbpass/support.c @@ -62,6 +62,10 @@ int make_remark(pam_handle_t *, unsigned int, int, const char *); void _cleanup(pam_handle_t *, void *, int); char *_pam_delete(register char *); +/* default configuration file location */ + +pstring servicesf = CONFIGFILE; + /* syslogging function for errors and other information */ void _log_err( int err, const char *format, ... ) @@ -136,6 +140,9 @@ int set_ctrl( int flags, int argc, const char **argv ) /* A good, sane default (matches Samba's behavior). */ set( SMB__NONULL, ctrl ); + /* initialize service file location */ + service_file=servicesf; + if (flags & PAM_SILENT) { set( SMB__QUIET, ctrl ); } @@ -165,6 +172,8 @@ int set_ctrl( int flags, int argc, const char **argv ) _log_err( LOG_ERR, "Error loading service file %s", service_file ); } + secrets_init(); + if (lp_null_passwords()) { set( SMB__NULLOK, ctrl ); } diff --git a/source/pam_smbpass/support.h b/source/pam_smbpass/support.h index 01178698913..d2fe26bd048 100644 --- a/source/pam_smbpass/support.h +++ b/source/pam_smbpass/support.h @@ -48,3 +48,5 @@ extern int _smb_read_password( pam_handle_t *, unsigned int, char*, extern int _pam_smb_approve_pass(pam_handle_t *, unsigned int, const char *, const char *); + +extern pstring servicesf; -- cgit From 9317dc71f7c36f9142eae9b212deeb52b2c498dd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Apr 2002 22:35:11 +0000 Subject: Fixed admin user lookup rid. Jeremy. --- source/passdb/passdb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 40b2afe75f1..a043a355347 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -481,14 +481,12 @@ BOOL local_lookup_rid(uint32 rid, char *name, enum SID_NAME_USE *psid_name_use) if(is_user) { if(rid == DOMAIN_USER_RID_ADMIN) { - pstring admin_users; - char *p = admin_users; + char *p = lp_admin_users(-1); *psid_name_use = SID_NAME_USER; if(!next_token(&p, name, NULL, sizeof(fstring))) fstrcpy(name, "Administrator"); } else if (rid == DOMAIN_USER_RID_GUEST) { - pstring guest_users; - char *p = guest_users; + char *p = lp_guestaccount(-1); *psid_name_use = SID_NAME_USER; if(!next_token(&p, name, NULL, sizeof(fstring))) fstrcpy(name, "Guest"); -- cgit From c155dca903750056787faaa415fed63816d17a5f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Apr 2002 22:41:36 +0000 Subject: Fix Gerry bug - MajorVersion should be 2 not 3. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index bd111decd23..94390c59e73 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -1408,7 +1408,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type = 0x4; if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL) return False; - SIVAL(*data, 0, 0x03); + SIVAL(*data, 0, 2); *needed = 0x4; return True; } -- cgit From c60c31b7923848db6d2c99b10481b8137d678b01 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 6 Apr 2002 01:26:00 +0000 Subject: Always pass NT password as well as Lanman. Jeremy. --- source/libsmb/cliconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index 93348e94f95..5e1cbeca386 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -1009,7 +1009,7 @@ again: return nt_status; } - if (!cli_session_setup(cli, user, password, pass_len, NULL, 0, + if (!cli_session_setup(cli, user, password, pass_len, password, pass_len, domain)) { DEBUG(1,("failed session setup\n")); nt_status = cli_nt_error(cli); -- cgit From 49ef07552bf7b585857f0b7c546de3697712104c Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 7 Apr 2002 00:43:41 +0000 Subject: Allow users to specify workgroup or domain they are in ... --- source/utils/smbcacls.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index e89c4c9232e..bca3123d4af 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -27,6 +27,7 @@ static fstring password; static pstring username; static pstring owner_username; static fstring server; +static fstring workgroup = ""; static int got_pass; static int test_args; TALLOC_CTX *ctx; @@ -758,7 +759,7 @@ struct cli_state *connect_one(char *share) if (!cli_session_setup(c, username, password, strlen(password), password, strlen(password), - lp_workgroup())) { + (workgroup[0] ? workgroup : lp_workgroup()))) { DEBUG(0,("session setup failed: %s\n", cli_errstr(c))); cli_shutdown(c); return NULL; @@ -794,6 +795,7 @@ static void usage(void) \t-h print help\n\ \t-d debuglevel set debug output level\n\ \t-U username user to autheticate as\n\ +\t-W workgroup or domain workgroup or domain user is in\n\ \n\ The username can be of the form username%%password or\n\ workgroup\\username%%password.\n\n\ @@ -873,6 +875,10 @@ You can string acls together with spaces, commas or newlines\n\ } break; + case 'W': + pstrcpy(workgroup, optarg); + break; + case 'S': the_acl = optarg; mode = SMB_ACL_SET; -- cgit From b8248fb1bdfd140cb541c6ddb030051712fe9911 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 7 Apr 2002 01:00:52 +0000 Subject: Small change to print everyone for the everyone SID (S-1-1-0). --- source/include/proto.h | 2368 +++++++++++++++++++++++------------------------ source/utils/smbcacls.c | 7 + 2 files changed, 1191 insertions(+), 1184 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 88ba933ba8c..9626a19b030 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,405 +181,842 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from libsmb/cliconnect.c */ - -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); - -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from lib/smbrun.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int smbrun(char *cmd, int *outfd); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from lib/snprintf.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from lib/substitute.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/* The following definitions come from libsmb/clierror.c */ +/* The following definitions come from lib/sysacls.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clifile.c */ +/* The following definitions come from lib/system.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); - -/* The following definitions come from libsmb/clilist.c */ - -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); - -/* The following definitions come from libsmb/cli_lsarpc.c */ - -struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); -NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***domains, char ***names, uint32 **types, int *num_names); -NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, const char **names, - DOM_SID **sids, uint32 **types, int *num_sids); -NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint16 info_class, - fstring domain_name, DOM_SID *domain_sid); -NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, - uint32 *num_domains, char ***domain_names, - DOM_SID **domain_sids); -NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, - uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); -NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, - fstring description, uint16 *lang_id_desc); -NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, - uint32 *num_sids, DOM_SID **sids); -NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, - POLICY_HND *user_pol); -NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *count, LUID_ATTR **set); -NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, LUID *luid); -NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 sec_info, - SEC_DESC_BUF **psdb); -BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); - -/* The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); -/* The following definitions come from libsmb/cli_netlogon.c */ +/* The following definitions come from lib/talloc.c */ -struct cli_state *cli_netlogon_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, - DOM_CHAL *srv_chal); -NTSTATUS new_cli_net_auth2(struct cli_state *cli, - uint16 sec_chan, - uint32 neg_flags, DOM_CHAL *srv_chal); -NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - uint16 sec_chan, - const unsigned char mach_pwd[16]); -NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 query_level); -NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, - uint32 database_id, uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 database_id, UINT64_S seqnum, - uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *username, char *password, - int logon_type); -NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - const char *username, const char *domain, const char *workstation, - const uint8 chal[8], - DATA_BLOB lm_response, DATA_BLOB nt_response, - NET_USER_INFO_3 *info3); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); -/* The following definitions come from libsmb/clioplock.c */ +/* The following definitions come from lib/time.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/* The following definitions come from libsmb/cli_pipe_util.c */ +/* The following definitions come from lib/ufc.c */ -struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, - char *pipe_name, - struct ntuser_creds *creds); -void cli_pipe_shutdown(struct cli_state *cli); +char *ufc_crypt(const char *key,const char *salt); -/* The following definitions come from libsmb/cliprint.c */ +/* The following definitions come from lib/username.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/* The following definitions come from libsmb/clirap.c */ +/* The following definitions come from lib/util.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/* The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from lib/util_file.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/* The following definitions come from libsmb/cli_reg.c */ +/* The following definitions come from lib/util_getent.c */ -struct cli_state *cli_winreg_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *msg, uint32 timeout, uint16 flags); -NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/* The following definitions come from libsmb/cli_samr.c */ +/* The following definitions come from lib/util_seaccess.c */ -struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 access_mask, POLICY_HND *connect_pol); -NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol); -NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol, uint32 access_mask, - DOM_SID *domain_sid, POLICY_HND *domain_pol); -NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 user_rid, POLICY_HND *user_pol); -NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 group_rid, POLICY_HND *group_pol); -NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - SAM_USERINFO_CTR **ctr); -NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 info_level, - GROUP_INFO_CTR *ctr); -NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 *num_groups, - DOM_GID **gid); -NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, - uint32 *num_aliases, uint32 **als_rids); -NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 *num_mem, - uint32 **rid, uint32 **attr); -NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups); -NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups); -NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *alias_pol, uint32 *num_mem, - DOM_SID **sids); -NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 alias_rid, POLICY_HND *alias_pol); -NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint16 switch_value, - SAM_UNK_CTR *ctr); -NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 *start_idx, - uint16 switch_value, uint32 *num_entries, - uint32 max_entries, SAM_DISPINFO_CTR *ctr); -NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_rids, uint32 *rids, - uint32 *num_names, char ***names, - uint32 **name_types); -NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_names, char **names, - uint32 *num_rids, uint32 **rids, - uint32 **rid_types); -NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, char *acct_name, - uint32 acb_info, uint32 unknown, - POLICY_HND *user_pol, uint32 *rid); -NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr); -NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr); -NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol); -NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/* The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from lib/util_sec.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/* The following definitions come from libsmb/cli_spoolss.c */ +/* The following definitions come from lib/util_sid.c */ -struct cli_state *cli_spoolss_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *printername, char *datatype, uint32 access_required, - char *station, char *username, POLICY_HND *pol); -WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); -WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 flags, uint32 level, - uint32 *num_printers, PRINTER_INFO_CTR *ctr); -WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 level, int *num_ports, PORT_INFO_CTR *ctr); -WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr); -WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr, uint32 command); -WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *pol, uint32 level, - char *env, PRINTER_DRIVER_CTR *ctr); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/* The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); + +/* The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/* The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/* The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); + +/* The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); + +/* The following definitions come from libsmb/cli_lsarpc.c */ + +struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_sids, DOM_SID *sids, + char ***domains, char ***names, uint32 **types, int *num_names); +NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_names, const char **names, + DOM_SID **sids, uint32 **types, int *num_sids); +NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, DOM_SID *domain_sid); +NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, + uint32 *num_domains, char ***domain_names, + DOM_SID **domain_sids); +NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, + uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); +NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, + fstring description, uint16 *lang_id_desc); +NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, + uint32 *num_sids, DOM_SID **sids); +NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, + POLICY_HND *user_pol); +NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *count, LUID_ATTR **set); +NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, LUID *luid); +NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 sec_info, + SEC_DESC_BUF **psdb); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); + +/* The following definitions come from libsmb/cli_netlogon.c */ + +struct cli_state *cli_netlogon_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, + DOM_CHAL *srv_chal); +NTSTATUS new_cli_net_auth2(struct cli_state *cli, + uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal); +NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, + uint16 sec_chan, + const unsigned char mach_pwd[16]); +NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 query_level); +NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, + uint32 database_id, uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 database_id, UINT64_S seqnum, + uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *username, char *password, + int logon_type); +NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *username, const char *domain, const char *workstation, + const uint8 chal[8], + DATA_BLOB lm_response, DATA_BLOB nt_response, + NET_USER_INFO_3 *info3); + +/* The following definitions come from libsmb/cli_pipe_util.c */ + +struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, + char *pipe_name, + struct ntuser_creds *creds); +void cli_pipe_shutdown(struct cli_state *cli); + +/* The following definitions come from libsmb/cli_reg.c */ + +struct cli_state *cli_winreg_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *msg, uint32 timeout, uint16 flags); +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); + +/* The following definitions come from libsmb/cli_samr.c */ + +struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol); +NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol); +NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol, uint32 access_mask, + DOM_SID *domain_sid, POLICY_HND *domain_pol); +NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 user_rid, POLICY_HND *user_pol); +NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 group_rid, POLICY_HND *group_pol); +NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + SAM_USERINFO_CTR **ctr); +NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 info_level, + GROUP_INFO_CTR *ctr); +NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 *num_groups, + DOM_GID **gid); +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids); +NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 *num_mem, + uint32 **rid, uint32 **attr); +NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint32 *num_mem, + DOM_SID **sids); +NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 alias_rid, POLICY_HND *alias_pol); +NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint16 switch_value, + SAM_UNK_CTR *ctr); +NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 *start_idx, + uint16 switch_value, uint32 *num_entries, + uint32 max_entries, SAM_DISPINFO_CTR *ctr); +NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_rids, uint32 *rids, + uint32 *num_names, char ***names, + uint32 **name_types); +NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_names, char **names, + uint32 *num_rids, uint32 **rids, + uint32 **rid_types); +NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, char *acct_name, + uint32 acb_info, uint32 unknown, + POLICY_HND *user_pol, uint32 *rid); +NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol); +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); + +/* The following definitions come from libsmb/cli_spoolss.c */ + +struct cli_state *cli_spoolss_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol); +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr); +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr, uint32 command); +WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + char *env, PRINTER_DRIVER_CTR *ctr); WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, @@ -631,794 +1068,357 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/* The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/* The following definitions come from libsmb/credentials.c */ - -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/* The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/* The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/* The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/* The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); - -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from libsmb/cliconnect.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from libsmb/clidgram.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/snprintf.c */ +/* The following definitions come from libsmb/clientgen.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/substitute.c */ +/* The following definitions come from libsmb/clierror.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/sysacls.c */ +/* The following definitions come from libsmb/clifile.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from lib/system.c */ +/* The following definitions come from libsmb/clilist.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/* The following definitions come from lib/talloc.c */ +/* The following definitions come from libsmb/climessage.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/* The following definitions come from lib/time.c */ +/* The following definitions come from libsmb/clioplock.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/* The following definitions come from lib/ufc.c */ +/* The following definitions come from libsmb/cliprint.c */ -char *ufc_crypt(const char *key,const char *salt); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/* The following definitions come from lib/username.c */ +/* The following definitions come from libsmb/clirap.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/* The following definitions come from lib/util.c */ +/* The following definitions come from libsmb/clireadwrite.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + +/* The following definitions come from libsmb/clistr.c */ -/* The following definitions come from lib/util_file.c */ +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +/* The following definitions come from libsmb/clitrans.c */ -/* The following definitions come from lib/util_getent.c */ +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +/* The following definitions come from libsmb/credentials.c */ -/* The following definitions come from lib/util_seaccess.c */ +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +/* The following definitions come from libsmb/errormap.c */ -/* The following definitions come from lib/util_sec.c */ +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +/* The following definitions come from libsmb/namequery.c */ -/* The following definitions come from lib/util_sid.c */ +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +/* The following definitions come from libsmb/nmblib.c */ -/* The following definitions come from lib/util_sock.c */ +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +/* The following definitions come from libsmb/nterr.c */ -/* The following definitions come from lib/util_str.c */ +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); + +/* The following definitions come from libsmb/smbdes.c */ + +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/smbencrypt.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/smberr.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/* The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /* The following definitions come from locking/brlock.c */ @@ -1506,6 +1506,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1536,9 +1539,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2420,14 +2420,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ +/* The following definitions come from printing/print_generic.c */ + + +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/* The following definitions come from printing/print_generic.c */ - - /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2453,11 +2458,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2516,42 +2516,6 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4255,6 +4219,42 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4722,24 +4722,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4805,6 +4787,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index bca3123d4af..c99f212ef34 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -115,6 +115,13 @@ static void SidToString(fstring str, DOM_SID *sid) if (numeric) return; + if (strcmp(str, "S-1-1-0") == 0) { + + fstrcpy(str, "everyone"); + return; + + } + /* Ask LSA to convert the sid to a name */ if (!cacls_open_policy_hnd() || -- cgit From 617d3bf2cd7f5899e684cf951329b9ae26590c34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 7 Apr 2002 22:08:28 +0000 Subject: Allow us to specify desired access flags on openprinterex call. Jeremy --- source/rpcclient/cmd_spoolss.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index f2d269678b3..0e8b353d833 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/rpcclient/cmd_spoolss.c @@ -92,9 +92,10 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, pstring printername; fstring servername, user; POLICY_HND hnd; - - if (argc != 2) { - printf("Usage: %s \n", argv[0]); + uint32 desired_access = MAXIMUM_ALLOWED_ACCESS; + + if (argc != 2 && argc != 3) { + printf("Usage: %s [0xallowed_access]\n", argv[0]); return NT_STATUS_OK; } @@ -106,10 +107,13 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, fstrcpy (user, cli->user_name); fstrcpy (printername, argv[1]); + if (argc == 3) + desired_access = strtol(argv[2], NULL, 16); + /* Open the printer handle */ werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, - "", MAXIMUM_ALLOWED_ACCESS, + "", desired_access, servername, user, &hnd); if (W_ERROR_IS_OK(werror)) { @@ -120,6 +124,9 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, printf("Error closing printer handle! (%s)\n", werror_str(werror)); } + } else { + printf("Failed to open printer %s: %s\n", printername, + werror_str(werror)); } return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; -- cgit From 1f36df4c4d3486f541d1e0b503f04085b10b9e84 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 8 Apr 2002 17:32:27 +0000 Subject: Tdb updates from HEAD (thanks Simo). Jeremy. --- source/include/proto.h | 1987 ++++++++++++++++++++++++----------------------- source/tdb/spinlock.c | 7 +- source/tdb/tdb.c | 184 +++-- source/tdb/tdb.h | 7 +- source/tdb/tdbdump.c | 3 +- source/tdb/tdbtest.c | 24 +- source/tdb/tdbtool.c | 3 +- source/tdb/tdbtorture.c | 12 +- source/tdb/tdbutil.c | 103 ++- 9 files changed, 1247 insertions(+), 1083 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 9626a19b030..491603bb233 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,640 +181,134 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from lib/snprintf.c */ - - -/* The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/* The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/* The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); - -/* The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); - -/* The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/* The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/* The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/* The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/* The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/* The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/* The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/* The following definitions come from lib/util_sec.c */ +/* The following definitions come from libsmb/cliconnect.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from lib/util_sid.c */ +/* The following definitions come from libsmb/cli_dfs.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); -/* The following definitions come from lib/util_sock.c */ +/* The following definitions come from libsmb/clidgram.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/util_str.c */ +/* The following definitions come from libsmb/clientgen.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/clierror.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/clifile.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from libsmb/clilist.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); /* The following definitions come from libsmb/cli_lsarpc.c */ @@ -860,6 +354,13 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/* The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -893,6 +394,12 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); +/* The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -900,6 +407,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/* The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/* The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/* The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -988,6 +545,12 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint16 switch_value, TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -1068,357 +631,794 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/cliconnect.c */ +/* The following definitions come from libsmb/clistr.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from libsmb/clitrans.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/* The following definitions come from libsmb/credentials.c */ + +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/* The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/* The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/* The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/* The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ -/* The following definitions come from libsmb/clientgen.c */ +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +/* The following definitions come from lib/smbrun.c */ -/* The following definitions come from libsmb/clierror.c */ +int smbrun(char *cmd, int *outfd); -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +/* The following definitions come from libsmb/smbdes.c */ -/* The following definitions come from libsmb/clifile.c */ +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +/* The following definitions come from libsmb/smbencrypt.c */ -/* The following definitions come from libsmb/clilist.c */ +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +/* The following definitions come from libsmb/smberr.c */ -/* The following definitions come from libsmb/climessage.c */ +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +/* The following definitions come from libsmb/unexpected.c */ -/* The following definitions come from libsmb/clioplock.c */ +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); +/* The following definitions come from lib/snprintf.c */ -/* The following definitions come from libsmb/cliprint.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +/* The following definitions come from lib/substitute.c */ -/* The following definitions come from libsmb/clirap.c */ +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +/* The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); -/* The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); -/* The following definitions come from libsmb/clistr.c */ +/* The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/* The following definitions come from libsmb/clitrans.c */ +/* The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/* The following definitions come from libsmb/credentials.c */ +/* The following definitions come from lib/username.c */ -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/* The following definitions come from libsmb/errormap.c */ +/* The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/* The following definitions come from libsmb/namequery.c */ +/* The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/* The following definitions come from libsmb/nmblib.c */ +/* The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/* The following definitions come from libsmb/nterr.c */ +/* The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/* The following definitions come from libsmb/passchange.c */ +/* The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/* The following definitions come from libsmb/pwd_cache.c */ +/* The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); -/* The following definitions come from libsmb/smbdes.c */ +/* The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); -/* The following definitions come from libsmb/smbencrypt.c */ +/* The following definitions come from lib/util_str.c */ -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /* The following definitions come from locking/brlock.c */ @@ -1506,9 +1506,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1539,6 +1536,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2420,19 +2420,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ -/* The following definitions come from printing/print_generic.c */ - - -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/* The following definitions come from printing/print_generic.c */ + + /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2458,6 +2453,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2516,6 +2516,42 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4219,42 +4255,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4722,6 +4722,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4787,24 +4805,6 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); @@ -4896,7 +4896,7 @@ int tdb_clear_spinlocks(TDB_CONTEXT *tdb); /* The following definitions come from tdb/tdb.c */ void tdb_dump_all(TDB_CONTEXT *tdb); -void tdb_printfreelist(TDB_CONTEXT *tdb); +int tdb_printfreelist(TDB_CONTEXT *tdb); enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb); const char *tdb_errorstr(TDB_CONTEXT *tdb); TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key); @@ -4917,7 +4917,7 @@ void tdb_unlockall(TDB_CONTEXT *tdb); int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]); void tdb_unlockkeys(TDB_CONTEXT *tdb); int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key); -void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); void tdb_logging_function(TDB_CONTEXT *tdb, void (*fn)(TDB_CONTEXT *, int , const char *, ...)); int tdb_reopen(TDB_CONTEXT *tdb); int tdb_reopen_all(void); @@ -4930,12 +4930,17 @@ int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len); int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr); int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v); int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v); +BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value); +BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value); +BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value); +BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value); int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, void *buffer, int len); TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr); int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val); +BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val); size_t tdb_pack(char *buf, int bufsize, char *fmt, ...); int tdb_unpack(char *buf, int bufsize, char *fmt, ...); -TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode); int tdb_traverse_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state); diff --git a/source/tdb/spinlock.c b/source/tdb/spinlock.c index b00d115dde7..74472854cf2 100644 --- a/source/tdb/spinlock.c +++ b/source/tdb/spinlock.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba database functions Copyright (C) Anton Blanchard 2001 @@ -384,11 +383,11 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size) /* Write it out (appending to end) */ if (write(fd, rwlocks, size) != size) { - SAFE_FREE(rwlocks); + free(rwlocks); return -1; } smp_machine = this_is_smp(); - SAFE_FREE(rwlocks); + free(rwlocks); return 0; } diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index ad67e9393e2..0a847ed690c 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -84,16 +84,20 @@ TDB_DATA tdb_null; /* all contexts, to ensure no double-opens (fcntl locks don't nest!) */ static TDB_CONTEXT *tdbs = NULL; -static void tdb_munmap(TDB_CONTEXT *tdb) +static int tdb_munmap(TDB_CONTEXT *tdb) { if (tdb->flags & TDB_INTERNAL) - return; + return 0; #ifdef HAVE_MMAP - if (tdb->map_ptr) - munmap(tdb->map_ptr, tdb->map_size); + if (tdb->map_ptr) { + int ret = munmap(tdb->map_ptr, tdb->map_size); + if (ret != 0) + return ret; + } #endif tdb->map_ptr = NULL; + return 0; } static void tdb_mmap(TDB_CONTEXT *tdb) @@ -222,28 +226,44 @@ static int tdb_lock(TDB_CONTEXT *tdb, int list, int ltype) } /* unlock the database: returns void because it's too late for errors. */ -static void tdb_unlock(TDB_CONTEXT *tdb, int list, int ltype) + /* changed to return int it may be interesting to know there + has been an error --simo */ +static int tdb_unlock(TDB_CONTEXT *tdb, int list, int ltype) { + int ret = -1; + if (tdb->flags & TDB_NOLOCK) - return; + return 0; /* Sanity checks */ - if (list < -1 || list >= (int)tdb->header.hash_size) - return; - if (tdb->locked[list+1].count==0) - return; + if (list < -1 || list >= (int)tdb->header.hash_size) { + TDB_LOG((tdb, 0, "tdb_unlock: list %d invalid (%d)\n", list, tdb->header.hash_size)); + return ret; + } + + if (tdb->locked[list+1].count==0) { + TDB_LOG((tdb, 0, "tdb_unlock: count is 0\n")); + return ret; + } if (tdb->locked[list+1].count == 1) { /* Down to last nested lock: unlock underneath */ - if (!tdb->read_only && tdb->header.rwlocks) - tdb_spinunlock(tdb, list, ltype); - else - tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK, F_SETLKW, 0); + if (!tdb->read_only && tdb->header.rwlocks) { + ret = tdb_spinunlock(tdb, list, ltype); + } else { + ret = tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK, F_SETLKW, 0); + } + } else { + ret = 0; } tdb->locked[list+1].count--; + + if (ret) + TDB_LOG((tdb, 0,"tdb_unlock: An error occurred unlocking!\n")); + return ret; } -/* This is based on the hash agorithm from gdbm */ +/* This is based on the hash algorithm from gdbm */ static u32 tdb_hash(TDB_DATA *key) { u32 value; /* Used to compute the hash value. */ @@ -434,18 +454,17 @@ static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset) return rec.next; } -static void tdb_dump_chain(TDB_CONTEXT *tdb, int i) +static int tdb_dump_chain(TDB_CONTEXT *tdb, int i) { tdb_off rec_ptr, top; top = TDB_HASH_TOP(i); - tdb_lock(tdb, i, F_WRLCK); + if (tdb_lock(tdb, i, F_WRLCK) != 0) + return -1; - if (ofs_read(tdb, top, &rec_ptr) == -1) { - tdb_unlock(tdb, i, F_WRLCK); - return; - } + if (ofs_read(tdb, top, &rec_ptr) == -1) + return tdb_unlock(tdb, i, F_WRLCK); if (rec_ptr) printf("hash=%d\n", i); @@ -453,7 +472,8 @@ static void tdb_dump_chain(TDB_CONTEXT *tdb, int i) while (rec_ptr) { rec_ptr = tdb_dump_record(tdb, rec_ptr); } - tdb_unlock(tdb, i, F_WRLCK); + + return tdb_unlock(tdb, i, F_WRLCK); } void tdb_dump_all(TDB_CONTEXT *tdb) @@ -466,30 +486,32 @@ void tdb_dump_all(TDB_CONTEXT *tdb) tdb_dump_chain(tdb, -1); } -void tdb_printfreelist(TDB_CONTEXT *tdb) +int tdb_printfreelist(TDB_CONTEXT *tdb) { + int ret; long total_free = 0; tdb_off offset, rec_ptr; struct list_struct rec; - tdb_lock(tdb, -1, F_WRLCK); + if ((ret = tdb_lock(tdb, -1, F_WRLCK)) != 0) + return ret; offset = FREELIST_TOP; /* read in the freelist top */ if (ofs_read(tdb, offset, &rec_ptr) == -1) { - return; + return 0; } printf("freelist top=[0x%08x]\n", rec_ptr ); while (rec_ptr) { if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec), DOCONV()) == -1) { - return; + return -1; } if (rec.magic != TDB_FREE_MAGIC) { printf("bad magic 0x%08x in free list\n", rec.magic); - return; + return -1; } printf("entry offset=[0x%08x], rec.rec_len = [0x%08x (%d)]\n", rec.next, rec.rec_len, rec.rec_len ); @@ -501,7 +523,7 @@ void tdb_printfreelist(TDB_CONTEXT *tdb) printf("total rec_len = [0x%08x (%d)]\n", (int)total_free, (int)total_free); - tdb_unlock(tdb, -1, F_WRLCK); + return tdb_unlock(tdb, -1, F_WRLCK); } /* Remove an element from the freelist. Must have alloc lock. */ @@ -534,7 +556,10 @@ static int tdb_free(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec) return -1; /* set an initial tailer, so if we fail we don't leave a bogus record */ - update_tailer(tdb, offset, rec); + if (update_tailer(tdb, offset, rec) != 0) { + TDB_LOG((tdb, 0, "tdb_free: upfate_tailer failed!\n")); + goto fail; + } /* Look right first (I'm an Australian, dammit) */ right = offset + sizeof(*rec) + rec->rec_len; @@ -1077,7 +1102,8 @@ static int do_delete(TDB_CONTEXT *tdb, tdb_off rec_ptr, struct list_struct*rec) rec->magic = TDB_DEAD_MAGIC; return rec_write(tdb, rec_ptr, rec); } - write_unlock_record(tdb, rec_ptr); + if (write_unlock_record(tdb, rec_ptr) != 0) + return -1; /* find previous record in hash chain */ if (ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1) @@ -1120,7 +1146,8 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, goto fail; } else { /* Otherwise unlock the previous record. */ - unlock_record(tdb, tlock->off); + if (unlock_record(tdb, tlock->off) != 0) + goto fail; } if (want_next) { @@ -1137,13 +1164,15 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, goto fail; if (!TDB_DEAD(rec)) { /* Woohoo: we found one! */ - lock_record(tdb, tlock->off); + if (lock_record(tdb, tlock->off) != 0) + goto fail; return tlock->off; } /* Try to clean dead ones from old traverses */ current = tlock->off; tlock->off = rec->next; - do_delete(tdb, current, rec); + if (do_delete(tdb, current, rec) != 0) + goto fail; } tdb_unlock(tdb, tlock->hash, F_WRLCK); want_next = 0; @@ -1153,7 +1182,8 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, fail: tlock->off = 0; - tdb_unlock(tdb, tlock->hash, F_WRLCK); + if (tdb_unlock(tdb, tlock->hash, F_WRLCK) != 0) + TDB_LOG((tdb, 0, "tdb_next_lock: On error unlock failed!\n")); return -1; } @@ -1184,26 +1214,36 @@ int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state) key.dptr = tdb_alloc_read(tdb, tl.off + sizeof(rec), rec.key_len + rec.data_len); if (!key.dptr) { - tdb_unlock(tdb, tl.hash, F_WRLCK); - unlock_record(tdb, tl.off); - tdb->travlocks.next = tl.next; - return -1; + ret = -1; + if (tdb_unlock(tdb, tl.hash, F_WRLCK) != 0) + goto out; + if (unlock_record(tdb, tl.off) != 0) + TDB_LOG((tdb, 0, "tdb_traverse: key.dptr == NULL and unlock_record failed!\n")); + goto out; } key.dsize = rec.key_len; dbuf.dptr = key.dptr + rec.key_len; dbuf.dsize = rec.data_len; /* Drop chain lock, call out */ - tdb_unlock(tdb, tl.hash, F_WRLCK); + if (tdb_unlock(tdb, tl.hash, F_WRLCK) != 0) { + ret = -1; + goto out; + } if (fn && fn(tdb, key, dbuf, state)) { /* They want us to terminate traversal */ - unlock_record(tdb, tl.off); + ret = count; + if (unlock_record(tdb, tl.off) != 0) { + TDB_LOG((tdb, 0, "tdb_traverse: unlock_record failed!\n"));; + ret = -1; + } tdb->travlocks.next = tl.next; SAFE_FREE(key.dptr); return count; } SAFE_FREE(key.dptr); } +out: tdb->travlocks.next = tl.next; if (ret < 0) return -1; @@ -1218,7 +1258,8 @@ TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb) struct list_struct rec; /* release any old lock */ - unlock_record(tdb, tdb->travlocks.off); + if (unlock_record(tdb, tdb->travlocks.off) != 0) + return tdb_null; tdb->travlocks.off = tdb->travlocks.hash = 0; if (tdb_next_lock(tdb, &tdb->travlocks, &rec) <= 0) @@ -1226,7 +1267,8 @@ TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb) /* now read the key */ key.dsize = rec.key_len; key.dptr =tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),key.dsize); - tdb_unlock(tdb, BUCKET(tdb->travlocks.hash), F_WRLCK); + if (tdb_unlock(tdb, BUCKET(tdb->travlocks.hash), F_WRLCK) != 0) + TDB_LOG((tdb, 0, "tdb_firstkey: error occurred while tdb_unlocking!\n")); return key; } @@ -1247,8 +1289,10 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey) rec.key_len)) || memcmp(k, oldkey.dptr, oldkey.dsize) != 0) { /* No, it wasn't: unlock it and start from scratch */ - unlock_record(tdb, tdb->travlocks.off); - tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK); + if (unlock_record(tdb, tdb->travlocks.off) != 0) + return tdb_null; + if (tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK) != 0) + return tdb_null; tdb->travlocks.off = 0; } @@ -1261,7 +1305,10 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey) if (!tdb->travlocks.off) return tdb_null; tdb->travlocks.hash = BUCKET(rec.full_hash); - lock_record(tdb, tdb->travlocks.off); + if (lock_record(tdb, tdb->travlocks.off) != 0) { + TDB_LOG((tdb, 0, "tdb_nextkey: lock_record failed (%s)!\n", strerror(errno))); + return tdb_null; + } } oldhash = tdb->travlocks.hash; @@ -1272,10 +1319,12 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey) key.dptr = tdb_alloc_read(tdb, tdb->travlocks.off+sizeof(rec), key.dsize); /* Unlock the chain of this new record */ - tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK); + if (tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK) != 0) + TDB_LOG((tdb, 0, "tdb_nextkey: WARNING tdb_unlock failed!\n")); } /* Unlock the chain of old record */ - tdb_unlock(tdb, BUCKET(oldhash), F_WRLCK); + if (tdb_unlock(tdb, BUCKET(oldhash), F_WRLCK) != 0) + TDB_LOG((tdb, 0, "tdb_nextkey: WARNING tdb_unlock failed!\n")); return key; } @@ -1289,7 +1338,8 @@ int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key) if (!(rec_ptr = tdb_find_lock(tdb, key, F_WRLCK, &rec))) return -1; ret = do_delete(tdb, rec_ptr, &rec); - tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK); + if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) + TDB_LOG((tdb, 0, "tdb_delete: WARNING tdb_unlock failed!\n")); return ret; } @@ -1365,14 +1415,16 @@ int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag) if (rec_write(tdb, rec_ptr, &rec) == -1 || tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1 || ofs_write(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) { - fail: /* Need to tdb_unallocate() here */ - ret = -1; + goto fail; } out: SAFE_FREE(p); tdb_unlock(tdb, BUCKET(hash), F_WRLCK); return ret; +fail: + ret = -1; + goto out; } static int tdb_already_open(dev_t device, @@ -1447,7 +1499,10 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, if (tdb->flags & TDB_INTERNAL) { tdb->flags |= (TDB_NOLOCK | TDB_NOMMAP); tdb->flags &= ~TDB_CLEAR_IF_FIRST; - tdb_new_database(tdb, hash_size); + if (tdb_new_database(tdb, hash_size) != 0) { + TDB_LOG((tdb, 0, "tdb_open_ex: tdb_new_database failed!")); + goto fail; + } goto internal; } @@ -1524,7 +1579,11 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, tdb_mmap(tdb); if (locked) { if (!tdb->read_only) - tdb_clear_spinlocks(tdb); + if (tdb_clear_spinlocks(tdb) != 0) { + TDB_LOG((tdb, 0, "tdb_open_ex: " + "failed to clear spinlock\n")); + goto fail; + } if (tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0) == -1) { TDB_LOG((tdb, 0, "tdb_open_ex: " "failed to take ACTIVE_LOCK on %s: %s\n", @@ -1560,7 +1619,8 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, } SAFE_FREE(tdb->name); if (tdb->fd != -1) - close(tdb->fd); + if (close(tdb->fd) != 0) + TDB_LOG((tdb, 5, "tdb_open_ex: failed to close tdb->fd on error!\n")); SAFE_FREE(tdb->locked); SAFE_FREE(tdb); errno = save_errno; @@ -1681,9 +1741,10 @@ int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key) { return tdb_lock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK); } -void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key) + +int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key) { - tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK); + return tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK); } @@ -1700,14 +1761,21 @@ int tdb_reopen(TDB_CONTEXT *tdb) { struct stat st; - tdb_munmap(tdb); - close(tdb->fd); + if (tdb_munmap(tdb) != 0) { + TDB_LOG((tdb, 0, "tdb_reopen: munmap failed (%s)\n", strerror(errno))); + goto fail; + } + if (close(tdb->fd) != 0) + TDB_LOG((tdb, 0, "tdb_reopen: WARNING closing tdb->fd failed!\n")); tdb->fd = open(tdb->name, tdb->open_flags & ~(O_CREAT|O_TRUNC), 0); if (tdb->fd == -1) { TDB_LOG((tdb, 0, "tdb_reopen: open failed (%s)\n", strerror(errno))); goto fail; } - fstat(tdb->fd, &st); + if (fstat(tdb->fd, &st) != 0) { + TDB_LOG((tdb, 0, "tdb_reopen: fstat failed (%s)\n", strerror(errno))); + goto fail; + } if (st.st_ino != tdb->inode || st.st_dev != tdb->device) { TDB_LOG((tdb, 0, "tdb_reopen: file dev/inode has changed!\n")); goto fail; diff --git a/source/tdb/tdb.h b/source/tdb/tdb.h index 9335725a2ac..54cde10d950 100644 --- a/source/tdb/tdb.h +++ b/source/tdb/tdb.h @@ -2,8 +2,7 @@ #define __TDB_H__ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba database functions Copyright (C) Andrew Tridgell 1999 @@ -127,11 +126,11 @@ void tdb_unlockall(TDB_CONTEXT *tdb); /* Low level locking functions: use with care */ int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key); -void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); /* Debug functions. Not used in production. */ void tdb_dump_all(TDB_CONTEXT *tdb); -void tdb_printfreelist(TDB_CONTEXT *tdb); +int tdb_printfreelist(TDB_CONTEXT *tdb); extern TDB_DATA tdb_null; diff --git a/source/tdb/tdbdump.c b/source/tdb/tdbdump.c index ddaff162091..66642132093 100644 --- a/source/tdb/tdbdump.c +++ b/source/tdb/tdbdump.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. simple tdb dump util Copyright (C) Andrew Tridgell 2001 diff --git a/source/tdb/tdbtest.c b/source/tdb/tdbtest.c index 80e9c8d07e6..0741073ce11 100644 --- a/source/tdb/tdbtest.c +++ b/source/tdb/tdbtest.c @@ -71,9 +71,9 @@ static void compare_db(void) } nextkey = tdb_nextkey(db, key); - SAFE_FREE(key.dptr); - SAFE_FREE(d.dptr); - SAFE_FREE(gd.dptr); + free(key.dptr); + free(d.dptr); + free(gd.dptr); key = nextkey; } @@ -92,9 +92,9 @@ static void compare_db(void) } gnextkey = gdbm_nextkey(gdbm, gkey); - SAFE_FREE(gkey.dptr); - SAFE_FREE(gd.dptr); - SAFE_FREE(d.dptr); + free(gkey.dptr); + free(gd.dptr); + free(d.dptr); gkey = gnextkey; } } @@ -138,11 +138,11 @@ static void addrec_db(void) } } else { data = tdb_fetch(db, key); - SAFE_FREE(data.dptr); + if (data.dptr) free(data.dptr); } - SAFE_FREE(k); - SAFE_FREE(d); + free(k); + free(d); } static void addrec_gdbm(void) @@ -171,11 +171,11 @@ static void addrec_gdbm(void) } } else { data = gdbm_fetch(gdbm, key); - SAFE_FREE(data.dptr); + if (data.dptr) free(data.dptr); } - SAFE_FREE(k); - SAFE_FREE(d); + free(k); + free(d); } static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) diff --git a/source/tdb/tdbtool.c b/source/tdb/tdbtool.c index d1c199849b3..caa29401418 100644 --- a/source/tdb/tdbtool.c +++ b/source/tdb/tdbtool.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. Samba database functions Copyright (C) Andrew Tridgell 1999-2000 Copyright (C) Paul `Rusty' Russell 2000 diff --git a/source/tdb/tdbtorture.c b/source/tdb/tdbtorture.c index 0cdb60db6ee..c4d912a1477 100644 --- a/source/tdb/tdbtorture.c +++ b/source/tdb/tdbtorture.c @@ -43,7 +43,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) char *ptr; asprintf(&ptr,"xterm -e gdb /proc/%d/exe %d", getpid(), getpid()); system(ptr); - SAFE_FREE(ptr); + free(ptr); } #endif } @@ -129,7 +129,7 @@ static void addrec_db(void) if (tdb_store(db, key, data, TDB_REPLACE) != 0) { fatal("tdb_store failed"); } - SAFE_FREE(data.dptr); + if (data.dptr) free(data.dptr); tdb_chainunlock(db, lockkey); goto next; } @@ -143,12 +143,12 @@ static void addrec_db(void) #endif data = tdb_fetch(db, key); - SAFE_FREE(data.dptr); + if (data.dptr) free(data.dptr); next: - SAFE_FREE(k); - SAFE_FREE(d); - SAFE_FREE(s); + free(k); + free(d); + free(s); } static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index e8a6eb593c3..f7cebb58d55 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. tdb utility functions Copyright (C) Andrew Tridgell 1992-1998 @@ -112,6 +111,68 @@ int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v) return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v); } +/**************************************************************************** + Fetch a uint32 value by a arbitrary blob key, return -1 if not found. + Output is uint32 in native byte order. +****************************************************************************/ + +BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value) +{ + TDB_DATA key, data; + + key.dptr = keyval; + key.dsize = len; + data = tdb_fetch(tdb, key); + if (!data.dptr || data.dsize != sizeof(uint32)) + return False; + + *value = IVAL(data.dptr,0); + SAFE_FREE(data.dptr); + return True; +} + +/**************************************************************************** + Fetch a uint32 value by string key, return -1 if not found. + Output is uint32 in native byte order. +****************************************************************************/ + +BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value) +{ + return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value); +} + +/**************************************************************************** + Store a uint32 value by an arbitary blob key, return 0 on success, -1 on failure. + Input is uint32 in native byte order. Output in tdb is in little-endian. +****************************************************************************/ + +BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value) +{ + TDB_DATA key, data; + uint32 v_store; + BOOL ret = True; + + key.dptr = keystr; + key.dsize = len; + SIVAL(&v_store, 0, value); + data.dptr = (void *)&v_store; + data.dsize = sizeof(uint32); + + if (tdb_store(tdb, key, data, TDB_REPLACE) == -1) + ret = False; + + return ret; +} + +/**************************************************************************** + Store a uint32 value by string key, return 0 on success, -1 on failure. + Input is uint32 in native byte order. Output in tdb is in little-endian. +****************************************************************************/ + +BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value) +{ + return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value); +} /**************************************************************************** Store a buffer by a null terminated string key. Return 0 on success, -1 on failure. @@ -179,6 +240,40 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int return ret; } +/**************************************************************************** + Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval. +****************************************************************************/ + +BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val) +{ + uint32 val; + BOOL ret = False; + + if (tdb_lock_bystring(tdb, keystr) == -1) + return False; + + if (!tdb_fetch_uint32(tdb, keystr, &val)) { + if (tdb_error(tdb) != TDB_ERR_NOEXIST) + goto err_out; + + val = *oldval; + + } else { + *oldval = val; + val += change_val; + } + + if (!tdb_store_uint32(tdb, keystr, val)) + goto err_out; + + ret = True; + + err_out: + + tdb_unlock_bystring(tdb, keystr); + return ret; +} + /**************************************************************************** Useful pair of routines for packing/unpacking data consisting of integers and strings. @@ -379,7 +474,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) if (!ptr || !*ptr) return; - DEBUG(level, ("tdb(%s): %s", tdb->name, ptr)); + DEBUG(level, ("tdb(%s): %s", tdb->name ? tdb->name : "unknown", ptr)); SAFE_FREE(ptr); } @@ -388,7 +483,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) the samba DEBUG() system. ****************************************************************************/ -TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode) { TDB_CONTEXT *tdb; -- cgit From d3d68e88fe533059832224817119dd34204bc24b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 8 Apr 2002 20:21:54 +0000 Subject: Fixed memory leak found by Adrian Chung . Jeremy. --- source/smbd/password.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/smbd/password.c b/source/smbd/password.c index 99f976fb2c0..e2dce6c507e 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -534,6 +534,7 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal, pdb_init_sam(&sampass); if (!pdb_getsampwnam(sampass, user)) { DEBUG(1,("Couldn't find user '%s' in passdb.\n", user)); + pdb_free_sam(sampass); return(False); } -- cgit From dfa0afd4af24604e03f6f15f771249dd4aa41612 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Mon, 8 Apr 2002 20:26:15 +0000 Subject: Fixing a bug that got introduced in Jeremy's big switch to NT status codes. --- source/rpc_server/srv_dfs_nt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_dfs_nt.c b/source/rpc_server/srv_dfs_nt.c index 5dcf7894f33..ed5393726cb 100644 --- a/source/rpc_server/srv_dfs_nt.c +++ b/source/rpc_server/srv_dfs_nt.c @@ -22,7 +22,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This is the implementation of the dfs pipe. */ +/* This is the implementation of the dfs pipe. + * $Id: srv_dfs_nt.c,v 1.1.2.14 2002/04/08 20:26:15 kalele Exp $ + */ #include "includes.h" #include "nterr.h" @@ -361,8 +363,8 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, if(!create_junction(path, &jn)) return WERR_DFS_NO_SUCH_SERVER; - return WERR_DFS_NO_SUCH_VOL; if(!get_referred_path(path, &jn, NULL, NULL)) + return WERR_DFS_NO_SUCH_VOL; r_u->level = level; r_u->ptr_ctr = 1; -- cgit From 6c97e9ca8f413a3d64055870fcbce4660174e833 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 9 Apr 2002 05:12:01 +0000 Subject: Merge from HEAD: >Added WERR_INVALID_FORM_NAME constant. --- source/include/doserr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/source/include/doserr.h b/source/include/doserr.h index 498c3a5d2b1..3f1a64b7f35 100644 --- a/source/include/doserr.h +++ b/source/include/doserr.h @@ -170,6 +170,7 @@ #define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802) #define WERR_INVALID_DATATYPE W_ERROR(1804) #define WERR_INVALID_ENVIRONMENT W_ERROR(1805) +#define WERR_INVALID_FORM_NAME W_ERROR(1902) #define WERR_INVALID_FORM_SIZE W_ERROR(1903) #define WERR_BUF_TOO_SMALL W_ERROR(2123) #define WERR_JOB_NOT_FOUND W_ERROR(2151) -- cgit From 808afc1a953d858629cd24955dc1340a8d511d0a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 9 Apr 2002 05:14:38 +0000 Subject: Merge from HEAD: >The useless_ptr must be non-zero for addform and setform client functions >to work. --- source/rpc_parse/parse_spoolss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 3b9bd1b2953..23ae880fc14 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -5935,7 +5935,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth) { - uint32 useless_ptr=0; + uint32 useless_ptr=1; prs_debug(ps, depth, desc, "spoolss_io_q_addform"); depth++; @@ -5980,7 +5980,7 @@ BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth) { - uint32 useless_ptr=0; + uint32 useless_ptr=1; prs_debug(ps, depth, desc, "spoolss_io_q_setform"); depth++; -- cgit From b261124ff30d793d2fba4800ccbb15134344ee66 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 9 Apr 2002 17:37:51 +0000 Subject: Add code to try a reverse lookup of the name of the server based on the IP if we fail to connect both with the server name and *SMBSERVER and the server name is an IP address. --- source/libsmb/libsmbclient.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 2f79425824f..a56d68b279b 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -245,6 +245,7 @@ struct smbc_server *smbc_server(char *server, char *share, fstring group; pstring ipenv; struct in_addr ip; + int tried_reverse = 0; zero_ip(&ip); ZERO_STRUCT(c); @@ -319,6 +320,30 @@ struct smbc_server *smbc_server(char *server, char *share, make_nmb_name(&called , "*SMBSERVER", 0x20); goto again; } + else { /* Try one more time, but ensure we don't loop */ + + /* Only try this if server is an IP address ... */ + + if (is_ipaddress(server) && !tried_reverse) { + fstring remote_name; + struct in_addr rem_ip; + + if (!inet_aton(server, &rem_ip)) { + DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", server)); + errno = ENOENT; + return NULL; + } + + tried_reverse++; /* Yuck */ + + if (name_status_find("*", 0, 0, rem_ip, remote_name)) { + make_nmb_name(&called, remote_name, 0x20); + goto again; + } + + + } + } errno = ENOENT; return NULL; } @@ -2243,6 +2268,10 @@ off_t smbc_telldir(int fd) } + /* + * This causes problems on some UNIXens ... wonder who is using + * it ... FIXME. + */ return (off_t) fe->dir_next; } -- cgit From 520625d9eb85f4d1ab9205c2058a769d2800eb51 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Apr 2002 18:10:07 +0000 Subject: Shirish pointed out more areas we should be doing roundups for allocation size. Jeremy. --- source/smbd/nttrans.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 66ffadb8196..b3997dad9a8 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -938,7 +938,7 @@ int reply_ntcreate_and_X(connection_struct *conn, p += 8; SIVAL(p,0,fmode); /* File Attributes. */ p += 4; - SOFF_T(p, 0, file_len); + SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); p += 8; SOFF_T(p,0,file_len); p += 12; @@ -1406,7 +1406,7 @@ static int call_nt_transact_create(connection_struct *conn, p += 8; SIVAL(p,0,fmode); /* File Attributes. */ p += 4; - SOFF_T(p,0,file_len); + SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); p += 8; SOFF_T(p,0,file_len); @@ -1461,29 +1461,28 @@ static int call_nt_transact_notify_change(connection_struct *conn, char **ppsetup, char **ppparams, char **ppdata) { - char *setup = *ppsetup; - files_struct *fsp; - uint32 flags; + char *setup = *ppsetup; + files_struct *fsp; + uint32 flags; - fsp = file_fsp(setup,4); - flags = IVAL(setup, 0); + fsp = file_fsp(setup,4); + flags = IVAL(setup, 0); - DEBUG(3,("call_nt_transact_notify_change\n")); + DEBUG(3,("call_nt_transact_notify_change\n")); - if(!fsp) - return ERROR_DOS(ERRDOS,ERRbadfid); + if(!fsp) + return ERROR_DOS(ERRDOS,ERRbadfid); - if((!fsp->is_directory) || (conn != fsp->conn)) - return ERROR_DOS(ERRDOS,ERRbadfid); + if((!fsp->is_directory) || (conn != fsp->conn)) + return ERROR_DOS(ERRDOS,ERRbadfid); - if (!change_notify_set(inbuf, fsp, conn, flags)) { - return(UNIXERROR(ERRDOS,ERRbadfid)); - } + if (!change_notify_set(inbuf, fsp, conn, flags)) + return(UNIXERROR(ERRDOS,ERRbadfid)); - DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \ + DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \ name = %s\n", fsp->fsp_name )); - return -1; + return -1; } /**************************************************************************** -- cgit From d30443051d9ef9f133df313bca4ff7c482920201 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 10 Apr 2002 00:40:10 +0000 Subject: Merge from HEAD: >Moved definition of winbind username/password secrets into secrets.h Also added copyright notice and guards. --- source/include/secrets.h | 29 ++++++++++++++++++++++++++++- source/nsswitch/winbindd.h | 6 ------ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/source/include/secrets.h b/source/include/secrets.h index c16d5c7b30e..55158885feb 100644 --- a/source/include/secrets.h +++ b/source/include/secrets.h @@ -1,12 +1,39 @@ +/* + * Unix SMB/CIFS implementation. + * secrets.tdb file format info + * Copyright (C) Andrew Tridgell 2000 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 675 + * Mass Ave, Cambridge, MA 02139, USA. + */ - +#ifndef _SECRETS_H +#define _SECRETS_H #define SECRETS_MACHINE_ACCT_PASS "SECRETS/$MACHINE.ACC" #define SECRETS_DOMAIN_SID "SECRETS/SID" #define SECRETS_SAM_SID "SAM/SID" +/* Authenticated user info is stored in secrets.tdb under these keys */ + +#define SECRETS_AUTH_USER "SECRETS/AUTH_USER" +#define SECRETS_AUTH_DOMAIN "SECRETS/AUTH_DOMAIN" +#define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD" + struct machine_acct_pass { uint8 hash[16]; time_t mod_time; }; +#endif /* _SECRETS_H */ diff --git a/source/nsswitch/winbindd.h b/source/nsswitch/winbindd.h index 5b63d236ba1..4d35c27c213 100644 --- a/source/nsswitch/winbindd.h +++ b/source/nsswitch/winbindd.h @@ -203,10 +203,4 @@ typedef struct { #define SETENV(name, value, overwrite) ; #endif -/* Authenticated user info is stored in secrets.tdb under these keys */ - -#define SECRETS_AUTH_USER "SECRETS/AUTH_USER" -#define SECRETS_AUTH_DOMAIN "SECRETS/AUTH_DOMAIN" -#define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD" - #endif /* _WINBINDD_H */ -- cgit From efd2b52dd25ab04b7def4bcb57ff9a724e377cd9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 10 Apr 2002 01:04:22 +0000 Subject: Added Shirish's client side caching policy change. Jeremy. --- source/include/proto.h | 3 + source/include/rpc_srvsvc.h | 27 ++++++++- source/param/loadparm.c | 19 ++++++- source/rpc_parse/parse_srv.c | 114 ++++++++++++++++++++++++++++++++++++++ source/rpc_server/srv_srvsvc_nt.c | 52 +++++++++++++++++ source/smbd/reply.c | 3 +- source/tdb/tdb.c | 3 +- 7 files changed, 215 insertions(+), 6 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 491603bb233..21c408fdd7d 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2122,6 +2122,7 @@ int lp_minprintspace(int ); int lp_maxprintjobs(int ); int lp_printing(int ); int lp_oplock_contention_limit(int ); +int lp_csc_policy(int ); int lp_write_cache_size(int ); char lp_magicchar(int ); int lp_winbind_cache_time(void); @@ -3828,6 +3829,8 @@ void init_srv_share_info2(SH_INFO_2 *sh2, char *net_name, uint32 type, char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, char *path, char *passwd); +void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy); +void init_srv_share_info501_str(SH_INFO_501_STR *sh501, char *net_name, char *remark); void init_srv_share_info502(SH_INFO_502 *sh502, char *net_name, uint32 type, char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h index c5117632329..8dc5842fc14 100644 --- a/source/include/rpc_srvsvc.h +++ b/source/include/rpc_srvsvc.h @@ -349,6 +349,27 @@ typedef struct share_info_2_info } SRV_SHARE_INFO_2; +typedef struct ptr_share_info501 +{ + uint32 ptr_netname; /* pointer to net name */ + uint32 type; /* ipc, print, disk */ + uint32 ptr_remark; /* pointer to comment */ + uint32 csc_policy; /* client-side offline caching policy << 4 */ +} SH_INFO_501; + +typedef struct str_share_info501 +{ + UNISTR2 uni_netname; /* unicode string of net name */ + UNISTR2 uni_remark; /* unicode string of comment */ +} SH_INFO_501_STR; + +/* SRV_SHARE_INFO_501 */ +typedef struct share_info_501_info +{ + SH_INFO_501 info_501; + SH_INFO_501_STR info_501_str; +} SRV_SHARE_INFO_501; + /* SH_INFO_502 (pointers to level 502 share info strings) */ typedef struct ptr_share_info502 { @@ -414,6 +435,7 @@ typedef struct srv_share_info_ctr_info union { SRV_SHARE_INFO_1 *info1; /* share info level 1 */ SRV_SHARE_INFO_2 *info2; /* share info level 2 */ + SRV_SHARE_INFO_501 *info501; /* share info level 501 */ SRV_SHARE_INFO_502 *info502; /* share info level 502 */ void *info; @@ -470,9 +492,10 @@ typedef struct srv_share_info { union { SRV_SHARE_INFO_1 info1; SRV_SHARE_INFO_2 info2; + SRV_SHARE_INFO_501 info501; SRV_SHARE_INFO_502 info502; - SRV_SHARE_INFO_1005 info1005; - SRV_SHARE_INFO_1501 info1501; + SRV_SHARE_INFO_1005 info1005; + SRV_SHARE_INFO_1501 info1501; } share; } SRV_SHARE_INFO; diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 5a5edbb6d2f..9932f956b1a 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -356,6 +356,7 @@ typedef struct int iDefaultCase; int iPrinting; int iOplockContentionLimit; + int iCSCPolicy; BOOL bAlternatePerm; BOOL bPreexecClose; BOOL bRootpreexecClose; @@ -474,6 +475,7 @@ static service sDefault = { CASE_LOWER, /* iDefaultCase */ DEFAULT_PRINTING, /* iPrinting */ 2, /* iOplockContentionLimit */ + 0, /* iCSCPolicy */ False, /* bAlternatePerm */ False, /* bPreexecClose */ False, /* bRootpreexecClose */ @@ -528,8 +530,6 @@ static service sDefault = { "" /* dummy */ }; - - /* local variables */ static service **ServicePtrs = NULL; static int iNumServices = 0; @@ -644,6 +644,19 @@ static struct enum_list enum_bool_auto[] = { {-1, NULL} }; +/* Client-side offline caching policy types */ +#define CSC_POLICY_MANUAL 0 +#define CSC_POLICY_DOCUMENTS 1 +#define CSC_POLICY_PROGRAMS 2 +#define CSC_POLICY_DISABLE 3 + +static struct enum_list enum_csc_policy[] = { + {CSC_POLICY_MANUAL, "manual"}, + {CSC_POLICY_DOCUMENTS, "documents"}, + {CSC_POLICY_PROGRAMS, "programs"}, + {CSC_POLICY_DISABLE, "disable"} +}; + /* Do you want session setups at user level security with a invalid password to be rejected or allowed in as guest? WinNT rejects them @@ -975,6 +988,7 @@ static struct parm_struct parm_table[] = { {"Locking Options", P_SEP, P_SEPARATOR}, {"blocking locks", P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"csc policy", P_ENUM, P_LOCAL, &sDefault.iCSCPolicy, NULL, enum_csc_policy, FLAG_SHARE | FLAG_GLOBAL}, {"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE}, {"kernel oplocks", P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL}, {"locking", P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, @@ -1757,6 +1771,7 @@ FN_LOCAL_INTEGER(lp_minprintspace, iMinPrintSpace) FN_LOCAL_INTEGER(lp_maxprintjobs, iMaxPrintJobs) FN_LOCAL_INTEGER(lp_printing, iPrinting) FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit) +FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy) FN_LOCAL_INTEGER(lp_write_cache_size, iWriteCacheSize) FN_LOCAL_CHAR(lp_magicchar, magic_char) FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time) diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c index 2e593890126..a367643aa41 100644 --- a/source/rpc_parse/parse_srv.c +++ b/source/rpc_parse/parse_srv.c @@ -208,6 +208,87 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d return True; } +/******************************************************************* + Inits a SH_INFO_2 structure +*******************************************************************/ + +void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy) +{ + DEBUG(5,("init_srv_share_info501: %s %8x %s %08x\n", net_name, type, + remark, csc_policy)); + + ZERO_STRUCTP(sh501); + + sh501->ptr_netname = (net_name != NULL) ? 1 : 0; + sh501->type = type; + sh501->ptr_remark = (remark != NULL) ? 1 : 0; + sh501->csc_policy = csc_policy; +} + +/******************************************************************* + Reads of writes a structure. +*******************************************************************/ + +static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth) +{ + if (sh501 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info501"); + depth++; + + if (!prs_align(ps)) + return False; + + if (!prs_uint32("ptr_netname", ps, depth, &sh501->ptr_netname)) + return False; + if (!prs_uint32("type ", ps, depth, &sh501->type)) + return False; + if (!prs_uint32("ptr_remark ", ps, depth, &sh501->ptr_remark)) + return False; + if (!prs_uint32("csc_policy ", ps, depth, &sh501->csc_policy)) + return False; + + return True; +} + +/******************************************************************** + Inits a SH_INFO_501_STR structure +********************************************************************/ + +void init_srv_share_info501_str(SH_INFO_501_STR *sh501, char *net_name, char *remark) +{ + DEBUG(5,("init_srv_share_info501_str\n")); + + init_unistr2(&sh501->uni_netname, net_name, strlen(net_name)+1); + init_unistr2(&sh501->uni_remark, remark, strlen(remark)+1); +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth) +{ + if (sh501 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info501_str"); + depth++; + + if(!prs_align(ps)) + return False; + if(!smb_io_unistr2("", &sh501->uni_netname, True, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + if(!smb_io_unistr2("", &sh501->uni_remark, True, ps, depth)) + return False; + + return True; +} + /******************************************************************* Inits a SH_INFO_502 structure ********************************************************************/ @@ -503,6 +584,32 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct break; } + case 501: + { + SRV_SHARE_INFO_501 *info501 = ctr->share.info501; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info501 = (SRV_SHARE_INFO_501 *) prs_alloc_mem(ps, num_entries * + sizeof (SRV_SHARE_INFO_501)))) + return False; + ctr->share.info501 = info501; + } + + for (i = 0; i < num_entries; i++) { + if (!srv_io_share_info501("", &info501[i].info_501, ps, depth)) + return False; + } + + for (i = 0; i < num_entries; i++) { + if (!srv_io_share_info501_str("", &info501[i].info_501_str, ps, depth)) + return False; + } + + break; + } + case 502: { SRV_SHARE_INFO_502 *info502 = ctr->share.info502; @@ -692,6 +799,13 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA return False; break; + case 501: + if (!srv_io_share_info501("", &r_n->share.info501.info_501, ps, depth)) + return False; + if (!srv_io_share_info501_str("", &r_n->share.info501.info_501_str, ps, depth)) + return False; + break; + case 502: if(!srv_io_share_info502("", &r_n->share.info502.info_502, ps, depth)) return False; diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 1ffb77c3c2a..35d8906d96f 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -345,6 +345,38 @@ BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 d return ret; } +/******************************************************************* + Fill in a share info level 501 structure. +********************************************************************/ + +static void init_srv_share_info_501(pipes_struct *p, SRV_SHARE_INFO_501 *sh501, int snum) +{ + int len_net_name; + pstring net_name; + pstring remark; + uint32 type; + uint32 csc_policy; + + pstrcpy(net_name, lp_servicename(snum)); + pstrcpy(remark, lp_comment(snum)); + standard_sub_conn(p->conn, remark); + + len_net_name = strlen(net_name); + + /* work out the share type */ + type = STYPE_DISKTREE; + + if (lp_print_ok(snum)) + type = STYPE_PRINTQ; + if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name)) + type = STYPE_IPC; + if (net_name[len_net_name] == '$') + type |= STYPE_HIDDEN; + + init_srv_share_info501(&sh501->info_501, net_name, type, remark, (lp_csc_policy(snum) << 4)); + init_srv_share_info501_str(&sh501->info_501_str, net_name, remark); +} + /******************************************************************* Fill in a share info level 502 structure. ********************************************************************/ @@ -490,6 +522,23 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, break; } + case 501: + { + SRV_SHARE_INFO_501 *info501; + int i = 0; + + info501 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_501)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + init_srv_share_info_501(p, &info501[i++], snum); + } + } + + ctr->share.info501 = info501; + break; + } + case 502: { SRV_SHARE_INFO_502 *info502; @@ -558,6 +607,9 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I case 2: init_srv_share_info_2(p, &r_n->info.share.info2, snum); break; + case 501: + init_srv_share_info_501(p, &r_n->info.share.info501, snum); + break; case 502: init_srv_share_info_502(p, &r_n->info.share.info502, snum); break; diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 86dd17a04bb..8af74856d99 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -385,7 +385,8 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt /* what does setting this bit do? It is set by NT4 and may affect the ability to autorun mounted cdroms */ - SSVAL(outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS); + SSVAL(outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS| + (lp_csc_policy(SNUM(conn)) << 2)); init_dfsroot(conn, inbuf, outbuf); } diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 0a847ed690c..98caca82a10 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -306,7 +306,8 @@ static int tdb_oob(TDB_CONTEXT *tdb, tdb_off len, int probe) } /* Unmap, update size, remap */ - tdb_munmap(tdb); + if (tdb_munmap(tdb) == -1) + return TDB_ERRCODE(TDB_ERR_IO, -1); tdb->map_size = st.st_size; tdb_mmap(tdb); return 0; -- cgit From 40693ea265fdb2c1aaf55172483923fba11a1f0a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 10 Apr 2002 15:05:46 +0000 Subject: remove compiler warnings --- source/msdfs/msdfs.c | 2 +- source/rpc_server/srv_srvsvc_nt.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 05f3059122d..e43a0aa171a 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -723,7 +723,7 @@ BOOL create_msdfs_link(struct junction_map* jn, BOOL exists) connection_struct conns; connection_struct *conn = &conns; int i=0; - BOOL insert_comma; + BOOL insert_comma = False; if(!junction_to_local_path(jn, path, sizeof(path), conn)) return False; diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 35d8906d96f..10edf3fa0ab 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -355,7 +355,6 @@ static void init_srv_share_info_501(pipes_struct *p, SRV_SHARE_INFO_501 *sh501, pstring net_name; pstring remark; uint32 type; - uint32 csc_policy; pstrcpy(net_name, lp_servicename(snum)); pstrcpy(remark, lp_comment(snum)); -- cgit From 210067fa5c4e2a5e65e4f032fcba416b029b9386 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Wed, 10 Apr 2002 18:25:45 +0000 Subject: Add "csc policy" to the smb.conf manpage. --- docs/docbook/manpages/smb.conf.5.sgml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index f1aca54df7b..82ff7c058a8 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -792,6 +792,8 @@ copy create mask create mode + csc policy + default case default devmode delete readonly @@ -1734,6 +1736,24 @@ + + csc policy (S) + This stands for client-side caching + policy, and specifies how clients capable of offline + caching will cache the files in the share. The valid values + are: manual, documents, programs, disable. + + These values correspond to those used on Windows + servers. + + For example, shares containing roaming profiles can have + offline caching disabled using csc policy = disable + . + + Default: csc policy = manual + Example: csc policy = programs + + deadtime (G) -- cgit From ed2f7f77ad8878592b479f343d85db95a905d554 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 10 Apr 2002 19:49:20 +0000 Subject: regenerate --- docs/htmldocs/smb.conf.5.html | 56 +++++++++++++++++++++++++++++++++++++++---- docs/manpages/smb.conf.5 | 28 ++++++++++++++++++---- 2 files changed, 75 insertions(+), 9 deletions(-) diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html index d7d8fcbd842..2f955d910ef 100644 --- a/docs/htmldocs/smb.conf.5.html +++ b/docs/htmldocs/smb.conf.5.html @@ -3168,6 +3168,18 @@ CLASS="PARAMETER" >
  • csc policy

  • EXPLANATION OF EACH PARAMETER

  • csc policy (S)

    This stands for client-side caching + policy, and specifies how clients capable of offline + caching will cache the files in the share. The valid values + are: manual, documents, programs, disable.

    These values correspond to those used on Windows + servers.

    For example, shares containing roaming profiles can have + offline caching disabled using csc policy = disable + .

    Default: csc policy = manual

    Example: csc policy = programs

    deadtime (G)

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "19 February 2002" "" "" +.TH "SMB.CONF" "5" "10 April 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -1080,6 +1080,9 @@ each parameter for details. Note that some are synonyms. \fIcreate mode\fR .TP 0.2i \(bu +\fIcsc policy\fR +.TP 0.2i +\(bu \fIdefault case\fR .TP 0.2i \(bu @@ -2106,6 +2109,23 @@ Example: \fBcreate mask = 0775\fR \fBcreate mode (S)\fR This is a synonym for \fI create mask\fR. .TP +\fBcsc policy (S)\fR +This stands for \fBclient-side caching +policy\fR, and specifies how clients capable of offline +caching will cache the files in the share. The valid values +are: manual, documents, programs, disable. + +These values correspond to those used on Windows +servers. + +For example, shares containing roaming profiles can have +offline caching disabled using \fBcsc policy = disable +\fR\&. + +Default: \fBcsc policy = manual\fR + +Example: \fBcsc policy = programs\fR +.TP \fBdeadtime (G)\fR The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection @@ -2876,7 +2896,7 @@ would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'. .TP -\fBforce directory security mode (S)\fR +\fBforce directory\fR This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box. @@ -7163,7 +7183,7 @@ again. Default: \fBwinbind cache type = 15\fR .TP -\fBwinbind enum users\fR +\fBwinbind enum\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of users through the @@ -7182,7 +7202,7 @@ usernames. Default: \fBwinbind enum users = yes \fR .TP -\fBwinbind enum groups\fR +\fBwinbind enum\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of groups through the -- cgit From 1faefef1c14b94976e0a765662e82bf52ed6d9a0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Apr 2002 00:38:58 +0000 Subject: Ensure VFS modules will build correctly by adding defines for CPPFLAGS defines into acconfig.h - only defined if seen. Jeremy. --- source/acconfig.h | 31 + source/configure | 1552 +++++++++++++++++++++++--------------------- source/configure.in | 21 + source/include/config.h.in | 34 + 4 files changed, 904 insertions(+), 734 deletions(-) diff --git a/source/acconfig.h b/source/acconfig.h index 78b652d950c..fa1545fb192 100644 --- a/source/acconfig.h +++ b/source/acconfig.h @@ -173,3 +173,34 @@ #undef HAVE_DEVICE_MAJOR_FN #undef HAVE_DEVICE_MINOR_FN #undef HAVE_MAKEDEV_FN +/* + * Add these definitions to allow VFS modules to + * see the CPPFLAGS defines. + */ +#ifndef _HPUX_SOURCE +#undef _HPUX_SOURCE +#endif +#ifndef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif +#ifndef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE +#endif +#ifndef _ALIGNMENT_REQUIRED +#undef _ALIGNMENT_REQUIRED +#endif +#ifndef _MAX_ALIGNMENT +#undef _MAX_ALIGNMENT +#endif +#ifndef _LARGE_FILES +#undef _LARGE_FILES +#endif +#ifndef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE +#endif +#ifndef _FILE_OFFSET_BITS +#undef _FILE_OFFSET_BITS +#endif +#ifndef _GNU_SOURCE +#undef _GNU_SOURCE +#endif diff --git a/source/configure b/source/configure index 79cc3011271..166c4447819 100755 --- a/source/configure +++ b/source/configure @@ -1369,11 +1369,47 @@ EOF CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" cat >> confdefs.h <<\EOF #define USE_BOTH_CRYPT_CALLS 1 +EOF + + cat >> confdefs.h <<\EOF +#define _HPUX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _ALIGNMENT_REQUIRED 1 +EOF + + cat >> confdefs.h <<\EOF +#define _MAX_ALIGNMENT 4 EOF ;; *11*) CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" + cat >> confdefs.h <<\EOF +#define _HPUX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _ALIGNMENT_REQUIRED 1 +EOF + + cat >> confdefs.h <<\EOF +#define _MAX_ALIGNMENT 4 +EOF + cat >> confdefs.h <<\EOF #define USE_BOTH_CRYPT_CALLS 1 EOF @@ -1398,6 +1434,10 @@ EOF *aix4*) echo "$ac_t""enabling large file support" 1>&6 CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" + cat >> confdefs.h <<\EOF +#define _LARGE_FILES 1 +EOF + ;; # # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit @@ -1421,14 +1461,34 @@ EOF case "$ac_cv_gcc_compiler_version_number" in *"gcc version 2.6"*|*"gcc version 2.7"*) CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + ;; *) CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + ;; esac else DYNEXP="-dc -dp" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + fi ;; esac @@ -1439,14 +1499,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1443: checking for LFS support" >&5 +echo "configure:1503: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1458,7 +1518,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1473,6 +1533,10 @@ fi CPPFLAGS="$old_CPPFLAGS" if test x$SINIX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS" LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS" LIBS="`getconf LFS64_LIBS` $LIBS" @@ -1485,14 +1549,14 @@ fi # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1489: checking for LFS support" >&5 +echo "configure:1553: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1530,7 +1594,7 @@ main() { } EOF -if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1545,20 +1609,32 @@ fi CPPFLAGS="$old_CPPFLAGS" if test x$LINUX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + fi echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6 ;; *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1555: checking for LFS support" >&5 +echo "configure:1631: 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 < @@ -1570,7 +1646,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1650: \"$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 @@ -1585,6 +1661,14 @@ fi CPPFLAGS="$old_CPPFLAGS" if test x$GLIBC_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + fi echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6 ;; @@ -1592,21 +1676,21 @@ fi esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1596: checking for inline" >&5 +echo "configure:1680: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1632,7 +1716,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1636: checking how to run the C preprocessor" >&5 +echo "configure:1720: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1647,13 +1731,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1741: \"$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 : @@ -1664,13 +1748,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1758: \"$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 : @@ -1681,13 +1765,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1775: \"$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 : @@ -1712,12 +1796,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1716: checking for ANSI C header files" >&5 +echo "configure:1800: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1725,7 +1809,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1813: \"$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* @@ -1742,7 +1826,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 @@ -1760,7 +1844,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 @@ -1781,7 +1865,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1792,7 +1876,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1820,12 +1904,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:1824: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1908: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1833,7 +1917,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1858,7 +1942,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:1862: checking for opendir in -ldir" >&5 +echo "configure:1946: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1866,7 +1950,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1965: \"$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 @@ -1899,7 +1983,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1903: checking for opendir in -lx" >&5 +echo "configure:1987: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1907,7 +1991,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2006: \"$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 @@ -1941,12 +2025,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1945: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2029: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1955,7 +2039,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1976,12 +2060,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1980: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2064: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1997,7 +2081,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2021,17 +2105,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:2025: checking for $ac_hdr" >&5 +echo "configure:2109: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2119: \"$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* @@ -2061,17 +2145,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2065: checking for $ac_hdr" >&5 +echo "configure:2149: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2159: \"$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* @@ -2101,17 +2185,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2105: checking for $ac_hdr" >&5 +echo "configure:2189: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2199: \"$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* @@ -2141,17 +2225,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2145: checking for $ac_hdr" >&5 +echo "configure:2229: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2239: \"$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* @@ -2181,17 +2265,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2185: checking for $ac_hdr" >&5 +echo "configure:2269: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2279: \"$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* @@ -2221,17 +2305,17 @@ for ac_hdr in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/f do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2225: checking for $ac_hdr" >&5 +echo "configure:2309: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2319: \"$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* @@ -2261,17 +2345,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2265: checking for $ac_hdr" >&5 +echo "configure:2349: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2359: \"$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* @@ -2301,17 +2385,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h ns do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2305: checking for $ac_hdr" >&5 +echo "configure:2389: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2399: \"$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,14 +2429,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2374,17 +2458,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2378: checking for $ac_hdr" >&5 +echo "configure:2462: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2472: \"$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* @@ -2414,17 +2498,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2418: checking for $ac_hdr" >&5 +echo "configure:2502: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2512: \"$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* @@ -2454,17 +2538,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2458: checking for $ac_hdr" >&5 +echo "configure:2542: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2552: \"$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* @@ -2494,17 +2578,17 @@ for ac_hdr in 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:2498: checking for $ac_hdr" >&5 +echo "configure:2582: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2592: \"$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* @@ -2534,17 +2618,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:2538: checking for $ac_hdr" >&5 +echo "configure:2622: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2632: \"$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* @@ -2576,17 +2660,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2580: checking for $ac_hdr" >&5 +echo "configure:2664: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2674: \"$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* @@ -2618,17 +2702,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2622: checking for $ac_hdr" >&5 +echo "configure:2706: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2716: \"$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* @@ -2660,17 +2744,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2664: checking for $ac_hdr" >&5 +echo "configure:2748: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2758: \"$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* @@ -2698,7 +2782,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2702: checking size of int" >&5 +echo "configure:2786: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2706,18 +2790,18 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2805: \"$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 @@ -2737,7 +2821,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2741: checking size of long" >&5 +echo "configure:2825: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2745,18 +2829,18 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF -if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2844: \"$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 @@ -2776,7 +2860,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2780: checking size of short" >&5 +echo "configure:2864: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2784,18 +2868,18 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -int main() +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF -if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2883: \"$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 @@ -2816,12 +2900,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2820: checking for working const" >&5 +echo "configure:2904: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2891,21 +2975,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2895: checking for inline" >&5 +echo "configure:2979: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2931,14 +3015,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2935: checking whether byte ordering is bigendian" >&5 +echo "configure:3019: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'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 < #include @@ -2949,11 +3033,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3037: \"$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 < #include @@ -2964,7 +3048,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2984,7 +3068,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3085: \"$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 @@ -3021,14 +3105,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3025: checking whether char is unsigned" >&5 +echo "configure:3109: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3148: \"$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 @@ -3085,12 +3169,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3089: checking return type of signal handlers" >&5 +echo "configure:3173: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3107,7 +3191,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3126,12 +3210,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3130: checking for uid_t in sys/types.h" >&5 +echo "configure:3214: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3160,12 +3244,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3164: checking for mode_t" >&5 +echo "configure:3248: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3193,12 +3277,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3197: checking for off_t" >&5 +echo "configure:3281: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3226,12 +3310,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3230: checking for size_t" >&5 +echo "configure:3314: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3259,12 +3343,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3263: checking for pid_t" >&5 +echo "configure:3347: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3292,12 +3376,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3296: checking for st_rdev in struct stat" >&5 +echo "configure:3380: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3305,7 +3389,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3326,12 +3410,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3330: checking for d_off in dirent" >&5 +echo "configure:3414: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3341,7 +3425,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3362,12 +3446,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3366: checking for ino_t" >&5 +echo "configure:3450: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3395,12 +3479,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3399: checking for loff_t" >&5 +echo "configure:3483: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3428,12 +3512,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3432: checking for offset_t" >&5 +echo "configure:3516: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3461,12 +3545,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3465: checking for ssize_t" >&5 +echo "configure:3549: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3494,12 +3578,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3498: checking for wchar_t" >&5 +echo "configure:3582: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3531,7 +3615,7 @@ fi # for cups support we need libcups, and a handful of header files echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3535: checking for httpConnect in -lcups" >&5 +echo "configure:3619: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3539,7 +3623,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3638: \"$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 @@ -3585,17 +3669,17 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3589: checking for $ac_hdr" >&5 +echo "configure:3673: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3683: \"$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* @@ -3634,7 +3718,7 @@ fi ############################################ # we need libdl for PAM and the new VFS code echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3638: checking for dlopen in -ldl" >&5 +echo "configure:3722: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3642,7 +3726,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3741: \"$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 @@ -3681,13 +3765,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3685: checking for immediate structures" >&5 +echo "configure:3769: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3705,7 +3789,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3728,13 +3812,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3732: checking for unix domain sockets" >&5 +echo "configure:3816: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3749,7 +3833,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3770,13 +3854,13 @@ EOF fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3774: checking for socklen_t type" >&5 +echo "configure:3858: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3789,7 +3873,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3810,13 +3894,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3814: checking for sig_atomic_t type" >&5 +echo "configure:3898: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3829,7 +3913,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:3833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -3852,20 +3936,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:3856: checking for errno declaration" >&5 +echo "configure:3940: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -3887,20 +3971,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3891: checking for setresuid declaration" >&5 +echo "configure:3975: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -3922,20 +4006,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:3926: checking for setresgid declaration" >&5 +echo "configure:4010: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -3957,20 +4041,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:3961: checking for asprintf declaration" >&5 +echo "configure:4045: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -3992,20 +4076,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:3996: checking for vasprintf declaration" >&5 +echo "configure:4080: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4027,20 +4111,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4031: checking for vsnprintf declaration" >&5 +echo "configure:4115: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4062,20 +4146,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4066: checking for snprintf declaration" >&5 +echo "configure:4150: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4099,7 +4183,7 @@ EOF # 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:4103: checking for real setresuid" >&5 +echo "configure:4187: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4108,12 +4192,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4201: \"$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 @@ -4138,7 +4222,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4142: checking for real setresgid" >&5 +echo "configure:4226: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4147,13 +4231,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4241: \"$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 @@ -4176,7 +4260,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4180: checking for 8-bit clean memcmp" >&5 +echo "configure:4264: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4184,7 +4268,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4282: \"$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 @@ -4218,7 +4302,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4222: checking whether to use readline" >&5 +echo "configure:4306: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4230,17 +4314,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4234: checking for $ac_hdr" >&5 +echo "configure:4318: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4328: \"$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* @@ -4270,17 +4354,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4274: checking for $ac_hdr" >&5 +echo "configure:4358: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4368: \"$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* @@ -4311,17 +4395,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4315: checking for $ac_hdr" >&5 +echo "configure:4399: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4409: \"$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* @@ -4344,7 +4428,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4348: checking for tgetent in -l${termlib}" >&5 +echo "configure:4432: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4352,7 +4436,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4451: \"$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 @@ -4385,7 +4469,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4389: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4473: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4393,7 +4477,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4492: \"$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 @@ -4455,17 +4539,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4459: checking for $ac_hdr" >&5 +echo "configure:4543: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4553: \"$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* @@ -4495,17 +4579,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4499: checking for $ac_hdr" >&5 +echo "configure:4583: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4593: \"$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* @@ -4536,17 +4620,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4540: checking for $ac_hdr" >&5 +echo "configure:4624: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4634: \"$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* @@ -4569,7 +4653,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4573: checking for tgetent in -l${termlib}" >&5 +echo "configure:4657: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4577,7 +4661,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4676: \"$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 @@ -4610,7 +4694,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4614: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4698: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4618,7 +4702,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4717: \"$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 @@ -4684,12 +4768,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4688: checking for $ac_func" >&5 +echo "configure:4772: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4800: \"$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 @@ -4740,7 +4824,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:4744: checking for printf in -lnsl_s" >&5 +echo "configure:4828: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4748,7 +4832,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4847: \"$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 @@ -4790,7 +4874,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4794: checking for printf in -lnsl" >&5 +echo "configure:4878: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4798,7 +4882,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4897: \"$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 @@ -4840,7 +4924,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4844: checking for connect in -lsocket" >&5 +echo "configure:4928: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4848,7 +4932,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4947: \"$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 @@ -4890,7 +4974,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4894: checking for connect in -linet" >&5 +echo "configure:4978: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4898,7 +4982,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4997: \"$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 @@ -4953,12 +5037,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4957: checking for $ac_func" >&5 +echo "configure:5041: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5069: \"$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 @@ -5007,7 +5091,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5011: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5095: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5015,7 +5099,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5114: \"$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 @@ -5056,12 +5140,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5060: checking for $ac_func" >&5 +echo "configure:5144: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5172: \"$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 @@ -5117,12 +5201,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5121: checking for $ac_func" >&5 +echo "configure:5205: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5233: \"$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 @@ -5172,12 +5256,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5176: checking for $ac_func" >&5 +echo "configure:5260: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5288: \"$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 @@ -5227,12 +5311,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5231: checking for $ac_func" >&5 +echo "configure:5315: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5343: \"$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 @@ -5282,12 +5366,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5286: checking for $ac_func" >&5 +echo "configure:5370: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5398: \"$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 @@ -5337,12 +5421,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5341: checking for $ac_func" >&5 +echo "configure:5425: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5453: \"$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 @@ -5392,12 +5476,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5396: checking for $ac_func" >&5 +echo "configure:5480: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5508: \"$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 @@ -5447,12 +5531,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5451: checking for $ac_func" >&5 +echo "configure:5535: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5563: \"$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 @@ -5502,12 +5586,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5506: checking for $ac_func" >&5 +echo "configure:5590: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5618: \"$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 @@ -5557,12 +5641,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5561: checking for $ac_func" >&5 +echo "configure:5645: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5673: \"$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 @@ -5612,12 +5696,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5616: checking for $ac_func" >&5 +echo "configure:5700: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5728: \"$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 @@ -5669,12 +5753,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5673: checking for $ac_func" >&5 +echo "configure:5757: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5785: \"$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 @@ -5725,12 +5809,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:5729: checking for $ac_func" >&5 +echo "configure:5813: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5841: \"$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 @@ -5780,12 +5864,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:5784: checking for $ac_func" >&5 +echo "configure:5868: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5896: \"$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 @@ -5835,12 +5919,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5839: checking for $ac_func" >&5 +echo "configure:5923: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5951: \"$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 @@ -5890,12 +5974,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5894: checking for $ac_func" >&5 +echo "configure:5978: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6006: \"$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 @@ -5945,12 +6029,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:5949: checking for $ac_func" >&5 +echo "configure:6033: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6061: \"$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 @@ -6000,12 +6084,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:6004: checking for $ac_func" >&5 +echo "configure:6088: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6116: \"$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 @@ -6055,12 +6139,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:6059: checking for $ac_func" >&5 +echo "configure:6143: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6171: \"$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 @@ -6110,12 +6194,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:6114: checking for $ac_func" >&5 +echo "configure:6198: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6226: \"$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 @@ -6165,12 +6249,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6169: checking for $ac_func" >&5 +echo "configure:6253: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6281: \"$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 @@ -6220,12 +6304,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:6224: checking for $ac_func" >&5 +echo "configure:6308: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6336: \"$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 @@ -6275,12 +6359,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:6279: checking for $ac_func" >&5 +echo "configure:6363: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6391: \"$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 @@ -6330,12 +6414,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:6334: checking for $ac_func" >&5 +echo "configure:6418: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6446: \"$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 @@ -6385,12 +6469,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:6389: checking for $ac_func" >&5 +echo "configure:6473: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6501: \"$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 @@ -6440,12 +6524,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6444: checking for $ac_func" >&5 +echo "configure:6528: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6556: \"$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 @@ -6499,9 +6583,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6503: checking for stat64 in " >&5 +echo "configure:6587: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6532,9 +6616,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6536: checking for lstat64 in " >&5 +echo "configure:6620: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6565,9 +6649,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6569: checking for fstat64 in " >&5 +echo "configure:6653: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6604,7 +6688,7 @@ fi if test x$ac_cv_func_strcasecmp = xno ; then echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:6608: checking for strcasecmp in -lresolv" >&5 +echo "configure:6692: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6612,7 +6696,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6711: \"$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 @@ -6659,12 +6743,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6663: checking for $ac_func" >&5 +echo "configure:6747: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6775: \"$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 @@ -6712,7 +6796,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6716: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6800: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6720,7 +6804,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6819: \"$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 @@ -6761,12 +6845,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6765: checking for $ac_func" >&5 +echo "configure:6849: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6877: \"$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 @@ -6820,12 +6904,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6824: checking for $ac_func" >&5 +echo "configure:6908: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6936: \"$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 @@ -6873,7 +6957,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6877: checking for putprpwnam in -lsec" >&5 +echo "configure:6961: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6881,7 +6965,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6980: \"$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 @@ -6922,12 +7006,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6926: checking for $ac_func" >&5 +echo "configure:7010: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7038: \"$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 @@ -6982,12 +7066,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:6986: checking for $ac_func" >&5 +echo "configure:7070: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7098: \"$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 @@ -7035,7 +7119,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7039: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7123: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7043,7 +7127,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7142: \"$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 @@ -7084,12 +7168,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7088: checking for $ac_func" >&5 +echo "configure:7172: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7200: \"$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 @@ -7143,12 +7227,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:7147: checking for $ac_func" >&5 +echo "configure:7231: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7259: \"$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 @@ -7196,7 +7280,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7200: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7284: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7204,7 +7288,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7303: \"$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 @@ -7245,12 +7329,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7249: checking for $ac_func" >&5 +echo "configure:7333: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7361: \"$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 @@ -7306,12 +7390,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7310: checking for $ac_func" >&5 +echo "configure:7394: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7422: \"$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 @@ -7359,7 +7443,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7363: checking for getspnam in -lgen" >&5 +echo "configure:7447: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7367,7 +7451,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7466: \"$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 @@ -7408,12 +7492,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7412: checking for $ac_func" >&5 +echo "configure:7496: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7524: \"$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 @@ -7468,12 +7552,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7472: checking for $ac_func" >&5 +echo "configure:7556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7584: \"$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 @@ -7521,7 +7605,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7525: checking for getspnam in -lsecurity" >&5 +echo "configure:7609: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7529,7 +7613,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7628: \"$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 @@ -7570,12 +7654,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7574: checking for $ac_func" >&5 +echo "configure:7658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7686: \"$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 @@ -7629,12 +7713,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7633: checking for $ac_func" >&5 +echo "configure:7717: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7745: \"$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 @@ -7682,7 +7766,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7686: checking for getspnam in -lsec" >&5 +echo "configure:7770: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7690,7 +7774,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7789: \"$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 @@ -7731,12 +7815,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7735: checking for $ac_func" >&5 +echo "configure:7819: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -7791,12 +7875,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7795: checking for $ac_func" >&5 +echo "configure:7879: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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 @@ -7844,7 +7928,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7848: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7932: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7852,7 +7936,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&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 @@ -7893,12 +7977,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7897: checking for $ac_func" >&5 +echo "configure:7981: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8009: \"$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 @@ -7952,12 +8036,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7956: checking for $ac_func" >&5 +echo "configure:8040: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8068: \"$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 @@ -8005,7 +8089,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8009: checking for bigcrypt in -lsec" >&5 +echo "configure:8093: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8013,7 +8097,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8112: \"$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 @@ -8054,12 +8138,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8058: checking for $ac_func" >&5 +echo "configure:8142: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8170: \"$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 @@ -8114,12 +8198,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8118: checking for $ac_func" >&5 +echo "configure:8202: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8230: \"$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 @@ -8167,7 +8251,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8171: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8255: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8175,7 +8259,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8274: \"$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 @@ -8216,12 +8300,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8220: checking for $ac_func" >&5 +echo "configure:8304: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8332: \"$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 @@ -8275,12 +8359,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8279: checking for $ac_func" >&5 +echo "configure:8363: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8391: \"$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 @@ -8328,7 +8412,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8332: checking for getprpwnam in -lsec" >&5 +echo "configure:8416: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8336,7 +8420,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8435: \"$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 @@ -8377,12 +8461,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8381: checking for $ac_func" >&5 +echo "configure:8465: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8493: \"$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 @@ -8448,7 +8532,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8452: checking ability to build shared libraries" >&5 +echo "configure:8536: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8586,7 +8670,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:8590: checking for $ac_word" >&5 +echo "configure:8674: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8642,15 +8726,15 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:8646: checking linker flags for shared libraries" >&5 +echo "configure:8730: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:8649: checking compiler flags for position-independent code" >&5 +echo "configure:8733: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 # 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:8654: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8738: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8670,7 +8754,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:8674: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8758: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8691,7 +8775,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:8695: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8779: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8714,7 +8798,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8718: checking for long long" >&5 +echo "configure:8802: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8723,12 +8807,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8816: \"$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 @@ -8755,20 +8839,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:8759: checking for LL suffix on long long integers" >&5 +echo "configure:8843: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -8790,7 +8874,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8794: checking for 64 bit off_t" >&5 +echo "configure:8878: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8799,13 +8883,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8893: \"$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 @@ -8828,7 +8912,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8832: checking for off64_t" >&5 +echo "configure:8916: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8837,7 +8921,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < 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:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8935: \"$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 @@ -8870,7 +8954,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8874: checking for 64 bit ino_t" >&5 +echo "configure:8958: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8879,13 +8963,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8973: \"$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 @@ -8908,7 +8992,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8912: checking for ino64_t" >&5 +echo "configure:8996: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8917,7 +9001,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < 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:8931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9015: \"$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 @@ -8950,7 +9034,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:8954: checking for dev64_t" >&5 +echo "configure:9038: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8959,7 +9043,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -8992,13 +9076,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:8996: checking for struct dirent64" >&5 +echo "configure:9080: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9031,7 +9115,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9035: checking for major macro" >&5 +echo "configure:9119: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9040,7 +9124,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9072,7 +9156,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9076: checking for minor macro" >&5 +echo "configure:9160: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9081,7 +9165,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9113,7 +9197,7 @@ EOF fi echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 -echo "configure:9117: checking for makedev macro" >&5 +echo "configure:9201: checking for makedev macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9122,7 +9206,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MAKEDEV_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev = makedev(1,2); return 0; } EOF -if { (eval echo configure:9135: \"$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_MAKEDEV_FN=yes else @@ -9154,7 +9238,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9158: checking for unsigned char" >&5 +echo "configure:9242: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9163,12 +9247,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9256: \"$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 @@ -9191,13 +9275,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9195: checking for sin_len in sock" >&5 +echo "configure:9279: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9206,7 +9290,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9227,13 +9311,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9231: checking whether seekdir returns void" >&5 +echo "configure:9315: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9242,7 +9326,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9263,20 +9347,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9267: checking for __FILE__ macro" >&5 +echo "configure:9351: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9297,20 +9381,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9301: checking for __FUNCTION__ macro" >&5 +echo "configure:9385: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9331,7 +9415,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9335: checking if gettimeofday takes tz argument" >&5 +echo "configure:9419: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9340,14 +9424,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9435: \"$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 @@ -9370,7 +9454,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9374: checking for C99 vsnprintf" >&5 +echo "configure:9458: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9379,7 +9463,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9406,7 +9490,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9429,7 +9513,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9433: checking for broken readdir" >&5 +echo "configure:9517: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9438,7 +9522,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9446,7 +9530,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:9450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9534: \"$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 @@ -9469,13 +9553,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9473: checking for utimbuf" >&5 +echo "configure:9557: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9483,7 +9567,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9507,12 +9591,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9511: checking for $ac_func" >&5 +echo "configure:9595: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9623: \"$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 @@ -9561,13 +9645,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9565: checking for ut_name in utmp" >&5 +echo "configure:9649: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9575,7 +9659,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9596,13 +9680,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9600: checking for ut_user in utmp" >&5 +echo "configure:9684: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9610,7 +9694,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9631,13 +9715,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9635: checking for ut_id in utmp" >&5 +echo "configure:9719: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9645,7 +9729,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -9666,13 +9750,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:9670: checking for ut_host in utmp" >&5 +echo "configure:9754: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9680,7 +9764,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -9701,13 +9785,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:9705: checking for ut_time in utmp" >&5 +echo "configure:9789: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9715,7 +9799,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -9736,13 +9820,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:9740: checking for ut_tv in utmp" >&5 +echo "configure:9824: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9750,7 +9834,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:9754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -9771,13 +9855,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:9775: checking for ut_type in utmp" >&5 +echo "configure:9859: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9785,7 +9869,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:9789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -9806,13 +9890,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:9810: checking for ut_pid in utmp" >&5 +echo "configure:9894: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9820,7 +9904,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:9824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -9841,13 +9925,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:9845: checking for ut_exit in utmp" >&5 +echo "configure:9929: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9855,7 +9939,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:9859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -9876,13 +9960,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:9880: checking for ut_addr in utmp" >&5 +echo "configure:9964: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9890,7 +9974,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -9912,13 +9996,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:9916: checking whether pututline returns pointer" >&5 +echo "configure:10000: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9926,7 +10010,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:9930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -9948,13 +10032,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:9952: checking for ut_syslen in utmpx" >&5 +echo "configure:10036: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9962,7 +10046,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:9966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -9983,7 +10067,7 @@ EOF fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:9987: checking for Linux kernel oplocks" >&5 +echo "configure:10071: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9992,7 +10076,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10006,7 +10090,7 @@ main() { } EOF -if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10029,7 +10113,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10033: checking for kernel change notify support" >&5 +echo "configure:10117: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10038,7 +10122,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10052,7 +10136,7 @@ main() { } EOF -if { (eval echo configure:10056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10075,7 +10159,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10079: checking for kernel share modes" >&5 +echo "configure:10163: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10084,7 +10168,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10100,7 +10184,7 @@ main() { } EOF -if { (eval echo configure:10104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10126,13 +10210,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10130: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10214: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10140,7 +10224,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:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10161,7 +10245,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10165: checking for irix specific capabilities" >&5 +echo "configure:10249: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10170,7 +10254,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10185,7 +10269,7 @@ main() { } EOF -if { (eval echo configure:10189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10273: \"$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 @@ -10213,13 +10297,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10217: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10301: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10229,7 +10313,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10250,13 +10334,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10254: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10338: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10266,7 +10350,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10287,13 +10371,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10291: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10375: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10303,7 +10387,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10324,13 +10408,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10328: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10412: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10340,7 +10424,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10362,13 +10446,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10366: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10450: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10382,7 +10466,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10403,16 +10487,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10407: checking for test routines" >&5 +echo "configure:10491: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10500: \"$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 @@ -10426,7 +10510,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10430: checking for ftruncate extend" >&5 +echo "configure:10514: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10435,11 +10519,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10527: \"$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 @@ -10462,7 +10546,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10466: checking for broken getgroups" >&5 +echo "configure:10550: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10471,11 +10555,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10563: \"$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 @@ -10498,7 +10582,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:10502: checking whether getpass should be replaced" >&5 +echo "configure:10586: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10506,7 +10590,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -10542,7 +10626,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:10546: checking for broken inet_ntoa" >&5 +echo "configure:10630: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10551,7 +10635,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -10565,7 +10649,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:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10653: \"$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 @@ -10588,7 +10672,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:10592: checking for secure mkstemp" >&5 +echo "configure:10676: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10597,7 +10681,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -10614,7 +10698,7 @@ main() { exit(0); } EOF -if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -10637,7 +10721,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:10641: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:10725: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10646,12 +10730,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -10674,7 +10758,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:10678: checking for root" >&5 +echo "configure:10762: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10683,11 +10767,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10775: \"$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 @@ -10715,7 +10799,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:10719: checking for iface AIX" >&5 +echo "configure:10803: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10724,7 +10808,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -10756,7 +10840,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:10760: checking for iface ifconf" >&5 +echo "configure:10844: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10765,7 +10849,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -10798,7 +10882,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:10802: checking for iface ifreq" >&5 +echo "configure:10886: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10807,7 +10891,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -10844,7 +10928,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:10848: checking for setresuid" >&5 +echo "configure:10932: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10853,7 +10937,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10949: \"$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 @@ -10887,7 +10971,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:10891: checking for setreuid" >&5 +echo "configure:10975: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10896,7 +10980,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10992: \"$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 @@ -10929,7 +11013,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:10933: checking for seteuid" >&5 +echo "configure:11017: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10938,7 +11022,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11034: \"$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 @@ -10971,7 +11055,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:10975: checking for setuidx" >&5 +echo "configure:11059: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10980,7 +11064,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11076: \"$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 @@ -11013,7 +11097,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11017: checking for working mmap" >&5 +echo "configure:11101: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11022,11 +11106,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11049,7 +11133,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11053: checking for ftruncate needs root" >&5 +echo "configure:11137: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11058,11 +11142,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11085,7 +11169,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11089: checking for fcntl locking" >&5 +echo "configure:11173: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11094,11 +11178,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11186: \"$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 @@ -11121,7 +11205,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11125: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11209: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11130,11 +11214,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11159,7 +11243,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11163: checking for 64 bit fcntl locking" >&5 +echo "configure:11247: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11168,7 +11252,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11280: \"$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 @@ -11217,13 +11301,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11221: checking for st_blocks in struct stat" >&5 +echo "configure:11305: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11232,7 +11316,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11255,13 +11339,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11259: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11343: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11298,13 +11382,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11302: checking for broken nisplus include files" >&5 +echo "configure:11386: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11314,7 +11398,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11338,7 +11422,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11342: checking whether to use smbwrapper" >&5 +echo "configure:11426: 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" @@ -11385,7 +11469,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:11389: checking whether to use AFS" >&5 +echo "configure:11473: 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" @@ -11411,7 +11495,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 -echo "configure:11415: checking whether to use DCE/DFS auth" >&5 +echo "configure:11499: checking whether to use DCE/DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11436,7 +11520,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:11440: checking whether to use Kerberos IV" >&5 +echo "configure:11524: 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" @@ -11448,7 +11532,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:11452: checking for dn_expand in -lresolv" >&5 +echo "configure:11536: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11456,7 +11540,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11555: \"$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 @@ -11511,7 +11595,7 @@ fi ################################################# # check for Kerberos 5 auth system echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 -echo "configure:11515: checking whether to use Kerberos 5" >&5 +echo "configure:11599: checking whether to use Kerberos 5" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -11539,7 +11623,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:11543: checking whether to use AUTOMOUNT" >&5 +echo "configure:11627: 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" @@ -11564,7 +11648,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:11568: checking whether to use SMBMOUNT" >&5 +echo "configure:11652: 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" @@ -11601,7 +11685,7 @@ fi # check for a PAM password database with_pam_for_crypt=no echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 -echo "configure:11605: checking whether to use PAM password database" >&5 +echo "configure:11689: checking whether to use PAM password database" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -11627,7 +11711,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:11631: checking for pam_get_data in -lpam" >&5 +echo "configure:11715: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11635,7 +11719,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11734: \"$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 @@ -11673,7 +11757,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:11677: checking whether to use pam_smbpass" >&5 +echo "configure:11761: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -11715,12 +11799,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11719: checking for $ac_func" >&5 +echo "configure:11803: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11831: \"$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 @@ -11769,7 +11853,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:11773: checking for crypt in -lcrypt" >&5 +echo "configure:11857: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11777,7 +11861,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11876: \"$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 @@ -11823,7 +11907,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:11827: checking for a crypt that needs truncated salt" >&5 +echo "configure:11911: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11832,11 +11916,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -11874,7 +11958,7 @@ with_smbpasswd_sam=yes ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:11878: checking whether to use TDB SAM database" >&5 +echo "configure:11962: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -11900,7 +11984,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 -echo "configure:11904: checking whether to use LDAP SAM database" >&5 +echo "configure:11988: checking whether to use LDAP SAM database" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -11927,7 +12011,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:11931: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12015: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -11955,7 +12039,7 @@ fi # smbpasswd SAM is only used if another format # has not been defined echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 -echo "configure:11959: checking whether to use traditional smbpasswd file" >&5 +echo "configure:12043: checking whether to use traditional smbpasswd file" >&5 if test $with_smbpasswd_sam = yes; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -11977,7 +12061,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:11981: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12065: 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" @@ -12002,7 +12086,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:12006: checking whether to use SSL" >&5 +echo "configure:12090: 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" @@ -12076,7 +12160,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12080: checking whether to use syslog logging" >&5 +echo "configure:12164: 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" @@ -12101,7 +12185,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12105: checking whether to use profiling" >&5 +echo "configure:12189: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12129,7 +12213,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12133: checking whether to support disk-quotas" >&5 +echo "configure:12217: 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" @@ -12141,13 +12225,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12145: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12229: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12159,7 +12243,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12203,7 +12287,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12207: checking whether to support utmp accounting" >&5 +echo "configure:12291: 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" @@ -12229,7 +12313,7 @@ fi # check for MS Dfs support echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 -echo "configure:12233: checking whether to support Microsoft Dfs" >&5 +echo "configure:12317: checking whether to support Microsoft Dfs" >&5 # Check whether --with-msdfs or --without-msdfs was given. if test "${with_msdfs+set}" = set; then withval="$with_msdfs" @@ -12257,7 +12341,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:12261: checking whether to build the libsmbclient shared library" >&5 +echo "configure:12345: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -12284,14 +12368,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:12288: checking how to get filesystem space usage" >&5 +echo "configure:12372: 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:12295: checking statvfs64 function (SVR4)" >&5 +echo "configure:12379: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12299,7 +12383,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12401: \"$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 @@ -12346,12 +12430,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:12350: checking statvfs function (SVR4)" >&5 +echo "configure:12434: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12359,7 +12443,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:12363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12447: \"$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 @@ -12384,7 +12468,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:12388: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:12472: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12392,7 +12476,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -12405,7 +12489,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:12409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12493: \"$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 @@ -12432,7 +12516,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:12436: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:12520: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12440,7 +12524,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12547: \"$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 @@ -12486,7 +12570,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:12490: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:12574: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12494,7 +12578,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -12504,7 +12588,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:12508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12592: \"$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 @@ -12531,7 +12615,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:12535: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:12619: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12539,7 +12623,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12555,7 +12639,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12643: \"$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 @@ -12582,7 +12666,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:12586: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:12670: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12590,7 +12674,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -12610,7 +12694,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12698: \"$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 @@ -12643,9 +12727,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:12647: checking if large file support can be enabled" >&5 +echo "configure:12731: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -12725,7 +12809,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:12729: checking whether to support ACLs" >&5 +echo "configure:12813: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -12778,7 +12862,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:12782: checking for acl_get_file in -lacl" >&5 +echo "configure:12866: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12786,7 +12870,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12885: \"$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 @@ -12825,13 +12909,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:12829: checking for ACL support" >&5 +echo "configure:12913: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12839,7 +12923,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12859,13 +12943,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:12863: checking for acl_get_perm_np" >&5 +echo "configure:12947: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12873,7 +12957,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -12928,7 +13012,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:12932: checking whether to build winbind" >&5 +echo "configure:13016: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13030,7 +13114,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13034: checking for poptGetContext in -lpopt" >&5 +echo "configure:13118: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13038,7 +13122,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13137: \"$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 @@ -13073,7 +13157,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13077: checking whether to use included popt" >&5 +echo "configure:13161: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13088,16 +13172,16 @@ fi ################################################# # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13092: checking configure summary" >&5 +echo "configure:13176: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13185: \"$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 diff --git a/source/configure.in b/source/configure.in index 77f0731982d..8bfbdf7a5fc 100644 --- a/source/configure.in +++ b/source/configure.in @@ -217,9 +217,18 @@ case "$host_os" in *9*|*10*) CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" AC_DEFINE(USE_BOTH_CRYPT_CALLS) + AC_DEFINE(_HPUX_SOURCE) + AC_DEFINE(_POSIX_SOURCE) + AC_DEFINE(_ALIGNMENT_REQUIRED,1) + AC_DEFINE(_MAX_ALIGNMENT,4) ;; *11*) CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4" + AC_DEFINE(_HPUX_SOURCE) + AC_DEFINE(_POSIX_SOURCE) + AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_ALIGNMENT_REQUIRED,1) + AC_DEFINE(_MAX_ALIGNMENT,4) AC_DEFINE(USE_BOTH_CRYPT_CALLS) ;; esac @@ -241,6 +250,7 @@ case "$host_os" in *aix4*) AC_MSG_RESULT([enabling large file support]) CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" + AC_DEFINE(_LARGE_FILES) ;; # # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit @@ -264,14 +274,19 @@ case "$host_os" in case "$ac_cv_gcc_compiler_version_number" in *"gcc version 2.6"*|*"gcc version 2.7"*) CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + AC_DEFINE(_LARGEFILE64_SOURCE) ;; *) CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) ;; esac else DYNEXP="-dc -dp" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) fi ;; esac @@ -296,6 +311,7 @@ exit(1); CPPFLAGS="$old_CPPFLAGS" if test x$SINIX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE) CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS" LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS" LIBS="`getconf LFS64_LIBS` $LIBS" @@ -348,6 +364,9 @@ main() { CPPFLAGS="$old_CPPFLAGS" if test x$LINUX_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) + AC_DEFINE(_GNU_SOURCE) fi AC_MSG_RESULT([$LINUX_LFS_SUPPORT]) ;; @@ -368,6 +387,8 @@ exit(1); CPPFLAGS="$old_CPPFLAGS" if test x$GLIBC_LFS_SUPPORT = xyes ; then CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_GNU_SOURCE) fi AC_MSG_RESULT([$GLIBC_LFS_SUPPORT]) ;; diff --git a/source/include/config.h.in b/source/include/config.h.in index e6cc8386c60..f999d3dae45 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -42,6 +42,9 @@ /* Define to `int' if doesn't define. */ #undef pid_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE @@ -236,6 +239,37 @@ #undef HAVE_DEVICE_MAJOR_FN #undef HAVE_DEVICE_MINOR_FN #undef HAVE_MAKEDEV_FN +/* + * Add these definitions to allow VFS modules to + * see the CPPFLAGS defines. + */ +#ifndef _HPUX_SOURCE +#undef _HPUX_SOURCE +#endif +#ifndef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif +#ifndef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE +#endif +#ifndef _ALIGNMENT_REQUIRED +#undef _ALIGNMENT_REQUIRED +#endif +#ifndef _MAX_ALIGNMENT +#undef _MAX_ALIGNMENT +#endif +#ifndef _LARGE_FILES +#undef _LARGE_FILES +#endif +#ifndef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE +#endif +#ifndef _FILE_OFFSET_BITS +#undef _FILE_OFFSET_BITS +#endif +#ifndef _GNU_SOURCE +#undef _GNU_SOURCE +#endif /* The number of bytes in a int. */ #undef SIZEOF_INT -- cgit From 81de35011ec6d8c150f72135370f87a7fa49dd7a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Apr 2002 00:42:17 +0000 Subject: Removed duplicate _LARGEFILE64_SOURCE added in error. Jeremy. --- source/acconfig.h | 3 --- source/include/config.h.in | 3 --- 2 files changed, 6 deletions(-) diff --git a/source/acconfig.h b/source/acconfig.h index fa1545fb192..c30bd42dadb 100644 --- a/source/acconfig.h +++ b/source/acconfig.h @@ -195,9 +195,6 @@ #ifndef _LARGE_FILES #undef _LARGE_FILES #endif -#ifndef _LARGEFILE64_SOURCE -#undef _LARGEFILE64_SOURCE -#endif #ifndef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS #endif diff --git a/source/include/config.h.in b/source/include/config.h.in index f999d3dae45..cc8dfa01cd2 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -261,9 +261,6 @@ #ifndef _LARGE_FILES #undef _LARGE_FILES #endif -#ifndef _LARGEFILE64_SOURCE -#undef _LARGEFILE64_SOURCE -#endif #ifndef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS #endif -- cgit From 51bffa2194f6dd92902359c09d2f5626070a2f09 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 11 Apr 2002 01:24:55 +0000 Subject: Honor the specversion when parsing the the DEVICEMODE --- source/printing/nt_printing.c | 2 ++ source/rpc_parse/parse_spoolss.c | 59 +++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 9dcff5a12ee..18026ceb2bd 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3136,6 +3136,8 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA status = WERR_NOMEM; goto done; } + + memset(nt_devmode, 0x0, sizeof(NT_DEVICEMODE)); ZERO_STRUCTP(nt_devmode); diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 23ae880fc14..99ef1b7565d 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -617,22 +617,49 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo return False; if (!prs_uint32("displayfrequency", ps, depth, &devmode->displayfrequency)) return False; - if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod)) - return False; - if (!prs_uint32("icmintent", ps, depth, &devmode->icmintent)) - return False; - if (!prs_uint32("mediatype", ps, depth, &devmode->mediatype)) - return False; - if (!prs_uint32("dithertype", ps, depth, &devmode->dithertype)) - return False; - if (!prs_uint32("reserved1", ps, depth, &devmode->reserved1)) - return False; - if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2)) - return False; - if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth)) - return False; - if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight)) - return False; + + /* + * Conditional parsing. Assume that the DeviceMode has been + * zero'd by the caller. + */ + switch(devmode->specversion) { + + /* Used by spooler when issuing OpenPrinter() calls. NT 3.5x? */ + case 0x0320: + break; + + /* See the comments on the DEVMODE in the msdn GDI documentation */ + /* (WINVER >= 0x0400) */ + case 0x0400: + case 0x0401: + if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod)) + return False; + if (!prs_uint32("icmintent", ps, depth, &devmode->icmintent)) + return False; + if (!prs_uint32("mediatype", ps, depth, &devmode->mediatype)) + return False; + if (!prs_uint32("dithertype", ps, depth, &devmode->dithertype)) + return False; + if (!prs_uint32("reserved1", ps, depth, &devmode->reserved1)) + return False; + if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2)) + return False; + + /* (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) */ + if (devmode->specversion == 0x401) { + if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth)) + return False; + if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight)) + return False; + } + break; + + /* log an error if we see something else */ + default: + DEBUG(0,("spoolss_io_devmode: Unknown specversion [0x%x]!\n", devmode->specversion)); + DEBUG(0,("spoolss_io_devmode: Please report to samba-technical@samba.org\n")); + break; + } if (devmode->driverextra!=0) { if (UNMARSHALLING(ps)) { -- cgit From 6b11e177f2af40840d0b143b16a96aca8db265a4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 11 Apr 2002 01:43:24 +0000 Subject: merge from HEAD --- source/rpc_parse/parse_spoolss.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 99ef1b7565d..ef448858058 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -3752,6 +3752,9 @@ BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, q_u->info.level = level; q_u->info.info_ptr = (info != NULL) ? 1 : 0; switch (level) { + + /* There's no such thing as a setprinter level 1 */ + case 2: secdesc = info->printers_2->secdesc; devmode = info->printers_2->devmode; @@ -4033,6 +4036,9 @@ BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, in if (!spoolss_io_buffer("", ps, depth, &q_u->buffer)) return False; + if(!prs_align(ps)) + return False; + if (!prs_uint32("offered", ps, depth, &q_u->offered)) return False; -- cgit From aebdafb7f7249a34f830db68a5ad1d49abd641fc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Apr 2002 02:59:36 +0000 Subject: Correctly emulate NT in printer handle opening access rights. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 94390c59e73..8281143a3cf 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -993,7 +993,6 @@ Can't find printer handle we created for priunter %s\n", name )); /* map an empty access mask to the minimum access mask */ if (printer_default->access_required == 0x0) printer_default->access_required = PRINTER_ACCESS_USE; - /* * If we are not serving the printer driver for this printer, @@ -1013,6 +1012,12 @@ Can't find printer handle we created for priunter %s\n", name )); return WERR_ACCESS_DENIED; } + if ((printer_default->access_required & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) { + DEBUG(3, ("access DENIED for printer open - unknown bits\n")); + close_printer_handle(p, handle); + return WERR_ACCESS_DENIED; + } + if (printer_default->access_required & PRINTER_ACCESS_ADMINISTER) printer_default->access_required = PRINTER_ACCESS_ADMINISTER; else -- cgit From 5265d23fa74d471971c1c13d653ac7d5aa5ebf5c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 11 Apr 2002 03:15:11 +0000 Subject: removed unnecessary memset --- source/printing/nt_printing.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 18026ceb2bd..8f1a12383d1 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3137,8 +3137,6 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA goto done; } - memset(nt_devmode, 0x0, sizeof(NT_DEVICEMODE)); - ZERO_STRUCTP(nt_devmode); /* -- cgit From 26000069b6c607f6f621a745f00a64ad1804d3d1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Apr 2002 16:31:05 +0000 Subject: Merge from HEAD. Jeremy. --- source/nsswitch/winbindd_rpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 27a1386c934..dd22f8ed367 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -439,8 +439,8 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, #define MAX_LOOKUP_RIDS 900 - *names = talloc(mem_ctx, *num_names * sizeof(char *)); - *name_types = talloc(mem_ctx, *num_names * sizeof(uint32)); + *names = talloc_zero(mem_ctx, *num_names * sizeof(char *)); + *name_types = talloc_zero(mem_ctx, *num_names * sizeof(uint32)); for (i = 0; i < *num_names; i += MAX_LOOKUP_RIDS) { int num_lookup_rids = MIN(*num_names - i, MAX_LOOKUP_RIDS); -- cgit From be7e03b5cec09d27f0548eb31ee54f487c0da7e9 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Thu, 11 Apr 2002 18:27:27 +0000 Subject: Couple of misc fixes to dfs. --- source/include/msdfs.h | 25 +- source/include/proto.h | 2016 ++++++++++++++++++++++++------------------------ source/msdfs/msdfs.c | 28 +- source/smbd/trans2.c | 20 +- 4 files changed, 1047 insertions(+), 1042 deletions(-) diff --git a/source/include/msdfs.h b/source/include/msdfs.h index 1a5c5d52a83..8c887e4d213 100644 --- a/source/include/msdfs.h +++ b/source/include/msdfs.h @@ -61,21 +61,24 @@ struct dfs_path #ifdef WITH_MSDFS -#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \ -{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \ - lp_host_msdfs() && dfs_redirect(name,conn,False)) \ +#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \ +{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \ + lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) && \ + dfs_redirect(name,conn,False)) \ return(dfs_path_error(inbuf,outbuf)); } -#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \ -{ if ( (SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) || \ - ((get_remote_arch() == RA_WIN95) && lp_msdfs_root(SNUM(conn))) )\ - if (lp_host_msdfs() && dfs_redirect(name,conn,True)) \ +#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \ +{ if ( (SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) || \ + ((get_remote_arch() == RA_WIN95) && lp_msdfs_root(SNUM(conn))) ) \ + if (lp_host_msdfs() && dfs_redirect(name,conn,True)) \ return(dfs_path_error(inbuf,outbuf)); } -#define init_dfsroot(conn, inbuf, outbuf) \ -{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \ - DEBUG(1,("Serving %s as a Dfs root\n", lp_servicename(SNUM(conn)) )); \ - SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS | SVAL(outbuf, smb_vwv2)); \ +#define init_dfsroot(conn, inbuf, outbuf) \ +{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \ + DEBUG(2,("Serving %s as a Dfs root\n", \ + lp_servicename(SNUM(conn)) )); \ + SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS \ + | SVAL(outbuf, smb_vwv2)); \ } } #else diff --git a/source/include/proto.h b/source/include/proto.h index 21c408fdd7d..f1447e149bb 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -146,13 +146,6 @@ void message_named_mutex_release(char *name); int ms_fnmatch(const char *pattern, const char *string); -/* The following definitions come from lib/pam_errors.c */ - -NTSTATUS pam_to_nt_status(int pam_error); -int nt_status_to_pam(NTSTATUS nt_status); -NTSTATUS pam_to_nt_status(int pam_error); -int nt_status_to_pam(NTSTATUS nt_status); - /* The following definitions come from lib/pidfile.c */ pid_t pidfile_pid(char *name); @@ -181,134 +174,640 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from libsmb/cliconnect.c */ - -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); - -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from lib/smbrun.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int smbrun(char *cmd, int *outfd); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from lib/snprintf.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from lib/substitute.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/* The following definitions come from libsmb/clierror.c */ +/* The following definitions come from lib/sysacls.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clifile.c */ +/* The following definitions come from lib/system.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +int sys_usleep(long usecs); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); + +/* The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); + +/* The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/* The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/* The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/* The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/* The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/* The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/* The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/* The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/* The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/* The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); + +/* The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/* The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/* The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); -/* The following definitions come from libsmb/clilist.c */ +/* The following definitions come from libsmb/cli_dfs.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); /* The following definitions come from libsmb/cli_lsarpc.c */ @@ -354,13 +853,6 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/* The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); - /* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -394,12 +886,6 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); -/* The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -407,56 +893,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/* The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/* The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/* The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -545,12 +981,6 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint16 switch_value, TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); -/* The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -624,801 +1054,364 @@ WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, /* The following definitions come from libsmb/cli_srvsvc.c */ -struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr); - -/* The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/* The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/* The following definitions come from libsmb/credentials.c */ - -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/* The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/* The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/* The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/* The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from libsmb/cliconnect.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from libsmb/clidgram.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/snprintf.c */ +/* The following definitions come from libsmb/clientgen.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/substitute.c */ +/* The following definitions come from libsmb/clierror.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/sysacls.c */ +/* The following definitions come from libsmb/clifile.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from lib/system.c */ +/* The following definitions come from libsmb/clilist.c */ -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/* The following definitions come from lib/talloc.c */ +/* The following definitions come from libsmb/climessage.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/* The following definitions come from lib/time.c */ +/* The following definitions come from libsmb/clioplock.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/* The following definitions come from lib/ufc.c */ +/* The following definitions come from libsmb/cliprint.c */ -char *ufc_crypt(const char *key,const char *salt); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/* The following definitions come from lib/username.c */ +/* The following definitions come from libsmb/clirap.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/* The following definitions come from lib/util.c */ +/* The following definitions come from libsmb/clireadwrite.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -/* The following definitions come from lib/util_file.c */ +/* The following definitions come from libsmb/clisecdesc.c */ -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); -/* The following definitions come from lib/util_getent.c */ +/* The following definitions come from libsmb/clistr.c */ -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/* The following definitions come from lib/util_seaccess.c */ +/* The following definitions come from libsmb/clitrans.c */ -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -/* The following definitions come from lib/util_sec.c */ +/* The following definitions come from libsmb/credentials.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -/* The following definitions come from lib/util_sid.c */ +/* The following definitions come from libsmb/errormap.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -/* The following definitions come from lib/util_sock.c */ +/* The following definitions come from libsmb/namequery.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -/* The following definitions come from lib/util_str.c */ +/* The following definitions come from libsmb/nmblib.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/* The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/smbdes.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/smbencrypt.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/* The following definitions come from libsmb/smberr.c */ + +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/* The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /* The following definitions come from locking/brlock.c */ @@ -1482,7 +1475,8 @@ BOOL posix_locking_end(void); /* The following definitions come from msdfs/msdfs.c */ BOOL is_msdfs_link(connection_struct* conn, char* path, - struct referral** reflistp, int* refcnt); + struct referral** reflistp, int* refcnt, + SMB_STRUCT_STAT *sbufp); BOOL dfs_redirect(char* pathname, connection_struct* conn, BOOL findfirst_flag); BOOL get_referred_path(char *pathname, struct junction_map* jn, @@ -1506,6 +1500,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1536,9 +1533,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2421,14 +2415,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ +/* The following definitions come from printing/print_generic.c */ + + +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/* The following definitions come from printing/print_generic.c */ - - /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2454,11 +2453,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2517,42 +2511,6 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4258,6 +4216,34 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4458,6 +4444,8 @@ struct cnotify_fns *kernel_notify_init(void) ; /* The following definitions come from smbd/nttrans.c */ +int create_secmasks(files_struct *fsp, SMB_STRUCT_STAT sbuf, + SEC_ACCESS *vsecmask, SEC_ACCESS *gsecmask); int reply_ntcreate_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); int reply_ntcancel(connection_struct *conn, @@ -4725,24 +4713,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4808,6 +4778,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index e43a0aa171a..e1c54e437e9 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + $Id: msdfs.c,v 1.10.4.24 2002/04/11 18:27:27 kalele Exp $ */ #include "includes.h" @@ -155,7 +156,8 @@ static inline BOOL parse_symlink(char* buf,struct referral** preflist, Returns true if the unix path is a valid msdfs symlink **********************************************************************/ BOOL is_msdfs_link(connection_struct* conn, char* path, - struct referral** reflistp, int* refcnt) + struct referral** reflistp, int* refcnt, + SMB_STRUCT_STAT *sbufp) { SMB_STRUCT_STAT st; pstring referral; @@ -166,12 +168,15 @@ BOOL is_msdfs_link(connection_struct* conn, char* path, strlower(path); - if (conn->vfs_ops.lstat(conn,dos_to_unix_static(path),&st) != 0) { + if (sbufp == NULL) + sbufp = &st; + + if (conn->vfs_ops.lstat(conn,dos_to_unix_static(path), sbufp) != 0) { DEBUG(5,("is_msdfs_link: %s does not exist.\n",path)); return False; } - if (S_ISLNK(st.st_mode)) { + if (S_ISLNK(sbufp->st_mode)) { /* open the link and read it */ referral_len = conn->vfs_ops.readlink(conn, path, referral, sizeof(pstring)); @@ -230,7 +235,7 @@ static BOOL resolve_dfs_path(char* dfspath, struct dfs_path* dp, fstrcpy(localpath, conn->connectpath); fstrcat(localpath, "/"); fstrcat(localpath, dp->reqpath); - if (is_msdfs_link(conn, localpath, reflistpp, refcntp)) { + if (is_msdfs_link(conn, localpath, reflistpp, refcntp, NULL)) { if (findfirst_flag) { DEBUG(6,("resolve_dfs_path (FindFirst) No redirection " "for dfs link %s.\n", dfspath)); @@ -252,7 +257,7 @@ static BOOL resolve_dfs_path(char* dfspath, struct dfs_path* dp, fstrcpy(localpath, conn->connectpath); fstrcat(localpath, "/"); fstrcat(localpath, reqpath); - if (is_msdfs_link(conn, localpath, reflistpp, refcntp)) { + if (is_msdfs_link(conn, localpath, reflistpp, refcntp, NULL)) { DEBUG(4, ("resolve_dfs_path: Redirecting %s because parent %s is dfs link\n", dfspath, localpath)); /* To find the path consumed, we truncate the original @@ -422,9 +427,9 @@ static int setup_ver2_dfs_referral(char* pathname, char** ppdata, DEBUG(10,("setting up version2 referral\nRequested path:\n")); - requestedpathlen = (dos_struni2(uni_requestedpath,pathname,512)+1)*2; + requestedpathlen = (dos_struni2((char *)uni_requestedpath,pathname,512) + 1) * 2; - dump_data(10,uni_requestedpath,requestedpathlen); + dump_data(10, (char *) uni_requestedpath,requestedpathlen); DEBUG(10,("ref count = %u\n",junction->referral_count)); @@ -515,9 +520,9 @@ static int setup_ver3_dfs_referral(char* pathname, char** ppdata, DEBUG(10,("setting up version3 referral\n")); - reqpathlen = (dos_struni2(uni_reqpath,pathname,512)+1)*2; + reqpathlen = (dos_struni2((char *) uni_reqpath,pathname,512)+1)*2; - dump_data(10,uni_reqpath,reqpathlen); + dump_data(10, (char *) uni_reqpath,reqpathlen); uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count; uni_reqpathoffset2 = uni_reqpathoffset1 + reqpathlen; @@ -836,7 +841,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count) pstrcat(pathreal, dname); if (is_msdfs_link(conn, pathreal, &(jn[cnt].referral_list), - &(jn[cnt].referral_count))) { + &(jn[cnt].referral_count), NULL)) { pstrcpy(jn[cnt].service_name, service_name); pstrcpy(jn[cnt].volume_name, dname); cnt++; @@ -872,7 +877,8 @@ int enum_msdfs_links(struct junction_map* jn) } BOOL is_msdfs_link(connection_struct* conn, char* path, - struct referral** reflistpp, int* refcntp) + struct referral** reflistpp, int* refcntp, + SMB_STRUCT_STAT *sbufp) { return False; } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 42eeec9b688..2fa0f01485b 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -523,15 +523,23 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, continue; } } else if (vfs_stat(conn,pathreal,&sbuf) != 0) { - /* Needed to show the msdfs symlinks as directories */ - if(!lp_host_msdfs() || !lp_msdfs_root(SNUM(conn)) - || !is_msdfs_link(conn, pathreal, NULL, NULL)) { + + /* Needed to show the msdfs symlinks as + * directories */ + + if(lp_host_msdfs() && + lp_msdfs_root(SNUM(conn)) && + is_msdfs_link(conn, pathreal, NULL, NULL, + &sbuf)) { + + DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal)); + sbuf.st_mode = (sbuf.st_mode & S_IAMB) | S_IFDIR; + + } else { + DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n", pathreal,strerror(errno))); continue; - } else { - DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal)); - sbuf.st_mode = (sbuf.st_mode & 0xFFF) | S_IFDIR; } } -- cgit From 737a54aa57eb2f31f197ca9cdadb3ba045a2b8b0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Apr 2002 18:52:30 +0000 Subject: HP2500C driver writes devmode with private data that ends on a 2 byte boundary. We then miss-parse the desired_access. Also added other fixes to ensure we align after private data (discussed with Gerry). Jeremy. --- source/rpc_parse/parse_spoolss.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index ef448858058..95a2615f634 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -747,6 +747,9 @@ static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_stru if (!spoolss_io_devmode_cont("", &pd->devmode_cont, ps, depth)) return False; + if (!prs_align(ps)) + return False; + if (!prs_uint32("access_required", ps, depth, &pd->access_required)) return False; @@ -3834,6 +3837,9 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) return False; + if(!prs_align(ps)) + return False; + switch (q_u->level) { case 2: @@ -4625,6 +4631,9 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth)) return False; + if(!prs_align(ps)) + return False; + switch (q_u->level) { case 2: ptr_sec_desc = q_u->info.info_2->secdesc_ptr; -- cgit From ca5ab1ca7136606816e6ec549035fe787f2951c4 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Thu, 11 Apr 2002 20:40:51 +0000 Subject: Expose the dfs parameters only if configured --with-msdfs. --- source/param/loadparm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 9932f956b1a..2f7f78a82ef 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1078,9 +1078,10 @@ static struct parm_struct parm_table[] = { {"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, - +#ifdef WITH_MSDFS {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, +#endif {"Winbind options", P_SEP, P_SEPARATOR}, @@ -1426,6 +1427,8 @@ static void init_globals(void) Globals.bWinbindEnumGroups = True; Globals.bWinbindUseDefaultDomain = False; + Globals.bHostMSDfs = False; + /* * This must be done last as it checks the value in * client_code_page. -- cgit From 2d2430f090e64c68942dfded503304391f82e27d Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Thu, 11 Apr 2002 20:50:46 +0000 Subject: Cosmetic change. Adding a separator for the msdfs options. --- source/param/loadparm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 2f7f78a82ef..d4f0a1a66a8 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1079,6 +1079,8 @@ static struct parm_struct parm_table[] = { {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, #ifdef WITH_MSDFS + {"MSDfs options", P_SEP, P_SEPARATOR}, + {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0}, #endif -- cgit From 565bdd7951e0f9ae81439fa8a1d02ec63443dc7e Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Fri, 12 Apr 2002 01:33:08 +0000 Subject: Replacing the S_IAMB (access mode bits) constant with 0xFFF as before. Thought S_IAMB would make it more portable. Apparently not :-) --- source/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 2fa0f01485b..fa5074f4fdd 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -533,7 +533,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, &sbuf)) { DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal)); - sbuf.st_mode = (sbuf.st_mode & S_IAMB) | S_IFDIR; + sbuf.st_mode = (sbuf.st_mode & 0xFFF) | S_IFDIR; } else { -- cgit From ad34045b7911a932c626a2cdc4ee593cc8e81f03 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Apr 2002 15:34:01 +0000 Subject: Merge from HEAD for W2K size. Jeremy. --- source/smbd/trans2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index fa5074f4fdd..6d65e51656f 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1421,12 +1421,13 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf case SMB_QUERY_FS_SIZE_INFO: case SMB_FS_SIZE_INFORMATION: { - SMB_BIG_UINT dfree,dsize,bsize; + SMB_BIG_UINT dfree,dsize,bsize,secs_per_unit;; data_len = 24; conn->vfs_ops.disk_free(conn,".",False,&bsize,&dfree,&dsize); - SBIG_UINT(pdata,0,dsize); - SBIG_UINT(pdata,8,dfree); - SIVAL(pdata,16,bsize/512); + secs_per_unit = 2; + SBIG_UINT(pdata,0,dsize*(bsize/(512*secs_per_unit))); + SBIG_UINT(pdata,8,dfree*(bsize/(512*secs_per_unit))); + SIVAL(pdata,16,secs_per_unit); SIVAL(pdata,20,512); break; } -- cgit From f33eb1a9bb4bcf1352d058d85bbe8044bb3dad0e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Apr 2002 17:58:15 +0000 Subject: Fixed problem joining domain. We were looking up the DC IP address then happily not assigning it to the dest_ip. Doh ! Jeremy. --- source/utils/smbpasswd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 6699c562a8e..0e40d127178 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -343,6 +343,7 @@ static int join_domain_byuser(char *domain, char *remote, fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain); return 1; } + dest_ip = ip_list[0]; } make_nmb_name(&called, pdc_name, 0x20); -- cgit From 0525d825121d16cd98db1cddadead62df3771794 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 13 Apr 2002 02:24:05 +0000 Subject: Tidy up winbindd debug. Added Bill Moran's hide unreadable fix. Jeremy. --- source/nsswitch/winbindd.c | 7 +++---- source/smbd/dir.c | 10 +++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 45d9171a760..666472eddbe 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -400,11 +400,8 @@ static void client_read(struct winbindd_cli_state *state) } while (n == -1 && errno == EINTR); - DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); - - /* Read failed, kill client */ - if (n == -1 || n == 0) { + /* Read failed, kill client */ DEBUG(5,("read failed on sock %d, pid %d: %s\n", state->sock, state->pid, (n == -1) ? strerror(errno) : "EOF")); @@ -413,6 +410,8 @@ static void client_read(struct winbindd_cli_state *state) return; } + DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); + /* Update client state */ state->read_buf_len += n; diff --git a/source/smbd/dir.c b/source/smbd/dir.c index ac669420826..12e0758596f 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -681,7 +681,15 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) ZERO_STRUCT(ste); - /* if we can't stat it does not show it */ + /* + * If user is a member of the Admin group + * we never hide files from them. + */ + + if (conn->admin_user) + return True; + + /* If we can't stat it does not show it */ if (vfs_stat(conn, name, &ste) != 0) return False; -- cgit From 5c56f70c67d2d53b0505ad473ded8bc8f9e72075 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 13 Apr 2002 13:50:18 +0000 Subject: Doco update, merge from HEAD --- docs/docbook/manpages/smb.conf.5.sgml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 82ff7c058a8..ba46cf36cf8 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -5816,6 +5816,8 @@ linkend="PRINTERSSECT">[printers] section above for reasons why you might want to do this. + To use the CUPS printing interface set printcap name = cups + . On System V systems that use lpstat to list available printers you can use printcap name = lpstat to automatically obtain lists of available printers. This -- cgit From a040b89c2ac42f115f83541a9ee56f5de545fc7f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 04:57:49 +0000 Subject: Fixed debug. --- source/rpcclient/rpcclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 94fe45403fd..96ff2581c18 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -207,7 +207,7 @@ void fetch_machine_sid(struct cli_state *cli) if (!(mem_ctx=talloc_init())) { - DEBUG(0,("fetch_domain_sid: talloc_init returned NULL!\n")); + DEBUG(0,("fetch_machine_sid: talloc_init returned NULL!\n")); goto error; } -- cgit From 171a4f1f23473e517e42a4956dcd8f0044476bdd Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 14 Apr 2002 07:53:03 +0000 Subject: Add some code and configure bits to ensure that FreeBSD problems with getgroups does not cause problems. I have tested, but it could do with more testing. --- source/configure | 66 ++++++++++++++++++++++++++++++++++++++++------ source/configure.in | 22 ++++++++++++++++ source/include/config.h.in | 1 + source/smbd/sec_ctx.c | 13 +++++++++ source/smbd/uid.c | 13 +++++++++ 5 files changed, 107 insertions(+), 8 deletions(-) diff --git a/source/configure b/source/configure index 166c4447819..2cbf9196dc9 100755 --- a/source/configure +++ b/source/configure @@ -1078,7 +1078,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -13086,6 +13086,56 @@ else WINBIND_PAM_TARGETS="" fi +# Check for FreeBSD problem with getgroups +# It returns EGID too many times in the list of groups +# and causes a security problem +echo $ac_n "checking whether or not getgroups returns EDIG too many times""... $ac_c" 1>&6 +echo "configure:13094: checking whether or not getgroups returns EDIG too many times" >&5 +if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + samba_cv_have_getgroups_too_many_egids=cross +else + cat > conftest.$ac_ext < +#include + +int main(int argc, char *argv[]) +{ + gid_t groups[10]; + int n = 10; + + n = getgroups(n, &groups); + /* Could actually pass back the number of EGIDs there ... */ + exit((n > 1 && groups[0] == getegid() %% groups[1] == getegid()) ? 1 : 0); +} +EOF +if { (eval echo configure:13118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_getgroups_too_many_egids=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_getgroups_too_many_egids=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_getgroups_too_many_egids" 1>&6 +if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETGROUPS_TOO_MANY_EGIDS 1 +EOF + +fi + # Substitution time! @@ -13114,7 +13164,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13118: checking for poptGetContext in -lpopt" >&5 +echo "configure:13168: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13122,7 +13172,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13187: \"$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 @@ -13157,7 +13207,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13161: checking whether to use included popt" >&5 +echo "configure:13211: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13172,16 +13222,16 @@ fi ################################################# # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13176: checking configure summary" >&5 +echo "configure:13226: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13235: \"$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 diff --git a/source/configure.in b/source/configure.in index 8bfbdf7a5fc..1a3731db198 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2663,6 +2663,28 @@ else WINBIND_PAM_TARGETS="" fi +# Check for FreeBSD problem with getgroups +# It returns EGID too many times in the list of groups +# and causes a security problem +AC_CACHE_CHECK([whether or not getgroups returns EDIG too many times], + samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([ +#include +#include + +int main(int argc, char *argv[]) +{ + gid_t groups[10]; + int n = 10; + + n = getgroups(n, &groups); + /* Could actually pass back the number of EGIDs there ... */ + exit((n > 1 && groups[0] == getegid() %% groups[1] == getegid()) ? 1 : 0); +}], + samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)]) +if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then + AC_DEFINE(HAVE_GETGROUPS_TOO_MANY_EGIDS) +fi + # Substitution time! AC_SUBST(WINBIND_TARGETS) diff --git a/source/include/config.h.in b/source/include/config.h.in index cc8dfa01cd2..8a3d2582877 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -239,6 +239,7 @@ #undef HAVE_DEVICE_MAJOR_FN #undef HAVE_DEVICE_MINOR_FN #undef HAVE_MAKEDEV_FN +#undef HAVE_GETGROUPS_TOO_MANY_EGIDS /* * Add these definitions to allow VFS modules to * see the CPPFLAGS defines. diff --git a/source/smbd/sec_ctx.c b/source/smbd/sec_ctx.c index 9a61a76f6fe..1d8cacecd8c 100644 --- a/source/smbd/sec_ctx.c +++ b/source/smbd/sec_ctx.c @@ -156,6 +156,19 @@ int get_current_groups(int *p_ngroups, gid_t **p_groups) return -1; } +#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS + if (getegid() == groups[0]) { + int n; + ngroups--; + if (!ngroups) { + SAFE_FREE(groups); + return(ngroups); + } + for (n=0; n < ngroups; n++) + groups[n] = groups[n+1]; + } +#endif + (*p_ngroups) = ngroups; (*p_groups) = groups; diff --git a/source/smbd/uid.c b/source/smbd/uid.c index 3810360cefc..bd5c7f72c06 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -115,7 +115,13 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) } else if ((current_user.conn == conn) && (vuser != 0) && (current_user.vuid == vuid) && (current_user.uid == vuser->uid)) { + int n, ngroups; gid_t grps[10]; DEBUG(4,("change_to_user: Skipping user change - already user\n")); + DEBUG(10, ("UID: %d, GID: %d\n", geteuid(), getegid())); + ngroups = sys_getgroups(0, grps); + ngroups = sys_getgroups(ngroups, grps); + for (n=0; n < ngroups; n++) + DEBUG(10, ("Grp: %d\n", grps[n])); return(True); } @@ -133,6 +139,7 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) current_user.ngroups = conn->ngroups; token = conn->nt_user_token; } else { + int i; if (!vuser) { DEBUG(2,("change_to_user: Invalid vuid used %d\n",vuid)); return(False); @@ -142,6 +149,12 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) current_user.ngroups = vuser->n_groups; current_user.groups = vuser->groups; token = vuser->nt_user_token; + + DEBUG(10, ("UID: %d, GID: %d, ngroups: %d, groups: \n", + uid, gid, current_user.ngroups)); + for (i = 0; i < current_user.ngroups; i++) + DEBUG(10, ("%d, ", current_user.groups[i])); + DEBUG(10, ("\n")); } /* -- cgit From 5e65dbb273a12d59371b2b73f3ad6870deb6f573 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 14 Apr 2002 07:57:41 +0000 Subject: Remove some stupid logging stuff ... --- source/smbd/uid.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/source/smbd/uid.c b/source/smbd/uid.c index bd5c7f72c06..b18c1f66ce1 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -117,12 +117,6 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) (current_user.uid == vuser->uid)) { int n, ngroups; gid_t grps[10]; DEBUG(4,("change_to_user: Skipping user change - already user\n")); - DEBUG(10, ("UID: %d, GID: %d\n", geteuid(), getegid())); - ngroups = sys_getgroups(0, grps); - ngroups = sys_getgroups(ngroups, grps); - for (n=0; n < ngroups; n++) - DEBUG(10, ("Grp: %d\n", grps[n])); - return(True); } snum = SNUM(conn); @@ -139,7 +133,6 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) current_user.ngroups = conn->ngroups; token = conn->nt_user_token; } else { - int i; if (!vuser) { DEBUG(2,("change_to_user: Invalid vuid used %d\n",vuid)); return(False); @@ -149,12 +142,6 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) current_user.ngroups = vuser->n_groups; current_user.groups = vuser->groups; token = vuser->nt_user_token; - - DEBUG(10, ("UID: %d, GID: %d, ngroups: %d, groups: \n", - uid, gid, current_user.ngroups)); - for (i = 0; i < current_user.ngroups; i++) - DEBUG(10, ("%d, ", current_user.groups[i])); - DEBUG(10, ("\n")); } /* -- cgit From f4521f0120b8831408db48a44b579c3045cc7f7d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 14 Apr 2002 12:13:50 +0000 Subject: Setting 'winbind separator = \', as indicated in the manpage as default is not a good idea... 'winbind separator = +' breaks including a winbind user into a local unix group, at least on glibc. + gets special treatment, probably for NIS compatibility. Volker --- docs/docbook/manpages/smb.conf.5.sgml | 8 ++++++-- source/utils/testparm.c | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index ba46cf36cf8..0b6492b3bc9 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -8269,8 +8269,12 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/ and nss_winbind.so modules for UNIX services. - Example: winbind separator = \ - Example: winbind separator = + + Please note that setting this parameter to + causes problems + with group membership at least on glibc systems, as the character + + is used as a special character for NIS in /etc/group. + + Example: winbind separator = \\ + Example: winbind separator = / diff --git a/source/utils/testparm.c b/source/utils/testparm.c index 2ca79545335..34a0a7c71ed 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -152,6 +152,15 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ ret = 1; } + if (strlen(lp_winbind_separator()) != 1) { + printf("ERROR: the 'winbind separator' parameter must be a single character.\n"); + ret = 1; + } + + if (*lp_winbind_separator() == '+') { + printf("'winbind separator = +' might cause problems with group membership.\n"); + } + return ret; } -- cgit From 8973a01f5efa547ed356e27fe1660da732b24cdd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 14 Apr 2002 12:14:52 +0000 Subject: Merge from 2_2. Volker --- docs/docbook/manpages/smb.conf.5.sgml | 8 ++++++-- source/utils/testparm.c | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 2adab907dc8..384aacb998a 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -8101,8 +8101,12 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/ and nss_winbind.so modules for UNIX services. - Example: winbind separator = \ - Example: winbind separator = + + Please note that setting this parameter to + causes problems + with group membership at least on glibc systems, as the character + + is used as a special character for NIS in /etc/group. + + Example: winbind separator = \\ + Example: winbind separator = / diff --git a/source/utils/testparm.c b/source/utils/testparm.c index defde6cb2c2..c6e417a2bc3 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -152,6 +152,15 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ } } + if (strlen(lp_winbind_separator()) != 1) { + printf("ERROR: the 'winbind separator' parameter must be a single character.\n"); + ret = 1; + } + + if (*lp_winbind_separator() == '+') { + printf("'winbind separator = +' might cause problems with group membership.\n"); + } + return ret; } -- cgit From 3a11ce31ca3eed23f3bf82c46b2ebd2423be737d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 12:26:09 +0000 Subject: Added enumerate trusted domains. --- source/python/py_lsa.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/source/python/py_lsa.c b/source/python/py_lsa.c index 1c84af5ea0c..fecbf535aa5 100644 --- a/source/python/py_lsa.c +++ b/source/python/py_lsa.c @@ -210,7 +210,7 @@ static PyObject *lsa_lookup_sids(PyObject *self, PyObject *args, result = PyList_New(num_sids); for (i = 0; i < num_sids; i++) { - PyObject *name_obj, *obj; + PyObject *obj; obj = Py_BuildValue("{sssssi}", "username", names[i], "domain", domains[i], "name_type", @@ -222,18 +222,61 @@ static PyObject *lsa_lookup_sids(PyObject *self, PyObject *args, return result; } +static PyObject *lsa_enum_trust_dom(PyObject *self, PyObject *args) +{ + lsa_policy_hnd_object *hnd = (lsa_policy_hnd_object *)self; + NTSTATUS ntstatus; + uint32 enum_ctx = 0, num_domains, i; + char **domain_names; + DOM_SID *domain_sids; + PyObject *result; + + if (!PyArg_ParseTuple(args, "")) + return NULL; + + ntstatus = cli_lsa_enum_trust_dom(hnd->cli, hnd->mem_ctx, + &hnd->pol, &enum_ctx, + &num_domains, &domain_names, + &domain_sids); + + if (!NT_STATUS_IS_OK(ntstatus)) { + PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus)); + return NULL; + } + + result = PyList_New(num_domains); + + for (i = 0; i < num_domains; i++) { + fstring sid_str; + + sid_to_string(sid_str, &domain_sids[i]); + PyList_SetItem( + result, i, + Py_BuildValue("(ss)", domain_names[i], sid_str)); + } + + return result; +} + /* * Method dispatch tables */ static PyMethodDef lsa_hnd_methods[] = { + /* SIDs<->names */ + { "lookup_sids", lsa_lookup_sids, METH_VARARGS | METH_KEYWORDS, "Convert sids to names." }, { "lookup_names", lsa_lookup_names, METH_VARARGS | METH_KEYWORDS, "Convert names to sids." }, + /* Trusted domains */ + + { "enum_trusted_domains", lsa_enum_trust_dom, METH_VARARGS, + "Enumerate trusted domains." }, + { NULL } }; -- cgit From 344bd9df77a5286b29a8d1a4ac5610bbd7ac876b Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 14 Apr 2002 17:35:42 +0000 Subject: Fix up the damn configure tests so they work on other Unixen. Grrr! --- source/configure | 6 +++--- source/configure.in | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/configure b/source/configure index 2cbf9196dc9..e4bb7400e21 100755 --- a/source/configure +++ b/source/configure @@ -13089,8 +13089,8 @@ fi # Check for FreeBSD problem with getgroups # It returns EGID too many times in the list of groups # and causes a security problem -echo $ac_n "checking whether or not getgroups returns EDIG too many times""... $ac_c" 1>&6 -echo "configure:13094: checking whether or not getgroups returns EDIG too many times" >&5 +echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6 +echo "configure:13094: checking whether or not getgroups returns EGID too many times" >&5 if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13111,7 +13111,7 @@ int main(int argc, char *argv[]) n = getgroups(n, &groups); /* Could actually pass back the number of EGIDs there ... */ - exit((n > 1 && groups[0] == getegid() %% groups[1] == getegid()) ? 1 : 0); + exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0); } EOF if { (eval echo configure:13118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null diff --git a/source/configure.in b/source/configure.in index 1a3731db198..654b6ff602b 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2666,7 +2666,7 @@ fi # Check for FreeBSD problem with getgroups # It returns EGID too many times in the list of groups # and causes a security problem -AC_CACHE_CHECK([whether or not getgroups returns EDIG too many times], +AC_CACHE_CHECK([whether or not getgroups returns EGID too many times], samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([ #include #include @@ -2678,7 +2678,7 @@ int main(int argc, char *argv[]) n = getgroups(n, &groups); /* Could actually pass back the number of EGIDs there ... */ - exit((n > 1 && groups[0] == getegid() %% groups[1] == getegid()) ? 1 : 0); + exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0); }], samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)]) if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then -- cgit From ae13ffbb639658af30306b87857a1b78d9ac9e37 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 14 Apr 2002 18:14:36 +0000 Subject: Merge of AndrewB's atomic changes from HEAD. Jeremy. --- source/tdb/tdbutil.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index f7cebb58d55..5250d675c91 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -219,16 +219,23 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int return -1; if ((val = tdb_fetch_int32(tdb, keystr)) == -1) { - if (tdb_error(tdb) != TDB_ERR_NOEXIST) + /* The lookup failed */ + if (tdb_error(tdb) != TDB_ERR_NOEXIST) { + /* but not becouse it didn't exist */ goto err_out; + } + /* Start with 'old' value */ val = *oldval; } else { + /* It worked, set return value (oldval) to tdb data */ *oldval = val; - val += change_val; } + /* Increment value for storage and return next time */ + val += change_val; + if (tdb_store_int32(tdb, keystr, val) == -1) goto err_out; @@ -248,28 +255,36 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, ui { uint32 val; BOOL ret = False; - + if (tdb_lock_bystring(tdb, keystr) == -1) return False; - + if (!tdb_fetch_uint32(tdb, keystr, &val)) { - if (tdb_error(tdb) != TDB_ERR_NOEXIST) + /* It failed */ + if (tdb_error(tdb) != TDB_ERR_NOEXIST) { + /* and not becouse it didn't exist */ goto err_out; - + } + + /* Start with 'old' value */ val = *oldval; - + } else { + /* it worked, set return value (oldval) to tdb data */ *oldval = val; - val += change_val; + } - + + /* get a new value to store */ + val += change_val; + if (!tdb_store_uint32(tdb, keystr, val)) goto err_out; - + ret = True; - + err_out: - + tdb_unlock_bystring(tdb, keystr); return ret; } -- cgit From 8fd646a6508ca2c037e6dfb95724a33eda44d846 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 14 Apr 2002 18:21:42 +0000 Subject: Merge Tridge's pending modtime fix for W2K. Jeremy. --- source/smbd/trans2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 6d65e51656f..9af0b0ddb58 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2355,6 +2355,11 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char SSVAL(params,0,0); + if (fsp) { + /* the pending modtime overrides the current modtime */ + sbuf.st_mtime = fsp->pending_modtime; + } + size = sbuf.st_size; tvs.modtime = sbuf.st_mtime; tvs.actime = sbuf.st_atime; @@ -2432,6 +2437,10 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char tvs.modtime = MIN(write_time, changed_time); + if (write_time > tvs.modtime && write_time != 0xffffffff) { + tvs.modtime = write_time; + } + /* Prefer a defined time to an undefined one. */ if (tvs.modtime == (time_t)0 || tvs.modtime == (time_t)-1) tvs.modtime = (write_time == (time_t)0 || write_time == (time_t)-1 @@ -2779,7 +2788,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", * NT does this a lot. It's actually pointless * setting the time here, as it will be overwritten * on the next write, so we save the request - * away and will set it on file code. JRA. + * away and will set it on file close. JRA. */ if (tvs.modtime != (time_t)0 && tvs.modtime != (time_t)-1) { -- cgit From 23d0516fcb20c8c979571bb4160d0003f2086376 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 14 Apr 2002 18:36:04 +0000 Subject: smbd/uid.c: Removed unused variable from Richard's logging stuff. smbd/sec_ctx.c: Use memmove instead of loop. Jeremy. --- source/smbd/sec_ctx.c | 15 +++++++-------- source/smbd/uid.c | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/source/smbd/sec_ctx.c b/source/smbd/sec_ctx.c index 1d8cacecd8c..659940747a2 100644 --- a/source/smbd/sec_ctx.c +++ b/source/smbd/sec_ctx.c @@ -158,14 +158,13 @@ int get_current_groups(int *p_ngroups, gid_t **p_groups) #ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS if (getegid() == groups[0]) { - int n; - ngroups--; - if (!ngroups) { - SAFE_FREE(groups); - return(ngroups); - } - for (n=0; n < ngroups; n++) - groups[n] = groups[n+1]; + ngroups--; + if (!ngroups) { + SAFE_FREE(groups); + return(ngroups); + } + + memmove(&groups[0], &groups[1], ngroups*sizeof(gid_t)); } #endif diff --git a/source/smbd/uid.c b/source/smbd/uid.c index b18c1f66ce1..89d89b33c36 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -115,7 +115,6 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) } else if ((current_user.conn == conn) && (vuser != 0) && (current_user.vuid == vuid) && (current_user.uid == vuser->uid)) { - int n, ngroups; gid_t grps[10]; DEBUG(4,("change_to_user: Skipping user change - already user\n")); } -- cgit From d18b6e3f9802c27d1d9016f5ad92b361cbcac7f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 14 Apr 2002 19:17:51 +0000 Subject: Merged in Tim's fixes, tridge's fix. Jeremy. --- source/include/nterr.h | 1 + source/include/proto.h | 24 +++++++++++++++++++----- source/libsmb/cli_lsarpc.c | 41 +++++++++++++++++++++-------------------- source/libsmb/nterr.c | 3 ++- source/nsswitch/winbindd_rpc.c | 10 ++++------ source/rpcclient/cmd_lsarpc.c | 26 ++++++++++++++++---------- source/smbd/service.c | 21 +++++++++++++++++++-- source/utils/smbcacls.c | 12 +++++------- 8 files changed, 87 insertions(+), 51 deletions(-) diff --git a/source/include/nterr.h b/source/include/nterr.h index cf1aa12be83..fa96869b63a 100644 --- a/source/include/nterr.h +++ b/source/include/nterr.h @@ -33,6 +33,7 @@ #define ERROR_INVALID_PARAMETER NT_STATUS(0x0057) #define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a) #define STATUS_MORE_ENTRIES NT_STATUS(0x0105) +#define STATUS_SOME_UNMAPPED NT_STATUS(0x0107) #define ERROR_INVALID_DATATYPE NT_STATUS(0x070c) #define STATUS_MORE_ENTRIES NT_STATUS(0x0105) diff --git a/source/include/proto.h b/source/include/proto.h index f1447e149bb..2d18474f41d 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -146,6 +146,13 @@ void message_named_mutex_release(char *name); int ms_fnmatch(const char *pattern, const char *string); +/* The following definitions come from lib/pam_errors.c */ + +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); + /* The following definitions come from lib/pidfile.c */ pid_t pidfile_pid(char *name); @@ -821,10 +828,11 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol); NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***domains, char ***names, uint32 **types, int *num_names); + char ***domains, char ***names, uint32 **types); NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, const char **names, - DOM_SID **sids, uint32 **types, int *num_sids); + POLICY_HND *pol, int num_names, + const char **names, DOM_SID **sids, + uint32 **types); NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint16 info_class, fstring domain_name, DOM_SID *domain_sid); @@ -4239,6 +4247,14 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); /* The following definitions come from rpcclient/cmd_srvsvc.c */ +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + /* The following definitions come from rpcclient/rpcclient.c */ void fetch_machine_sid(struct cli_state *cli); @@ -4444,8 +4460,6 @@ struct cnotify_fns *kernel_notify_init(void) ; /* The following definitions come from smbd/nttrans.c */ -int create_secmasks(files_struct *fsp, SMB_STRUCT_STAT sbuf, - SEC_ACCESS *vsecmask, SEC_ACCESS *gsecmask); int reply_ntcreate_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); int reply_ntcancel(connection_struct *conn, diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c index 79841bb85f3..3234c366568 100644 --- a/source/libsmb/cli_lsarpc.c +++ b/source/libsmb/cli_lsarpc.c @@ -221,7 +221,7 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***domains, char ***names, uint32 **types, int *num_names) + char ***domains, char ***names, uint32 **types) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_SIDS q; @@ -265,13 +265,13 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, result = r.status; if (!NT_STATUS_IS_OK(result) && - NT_STATUS_V(result) != NT_STATUS_V(NT_STATUS_FILES_OPEN)) { + NT_STATUS_V(result) != NT_STATUS_V(STATUS_SOME_UNMAPPED)) { + /* An actual error occured */ goto done; } - /* Return output parameters */ if (r.mapped_count == 0) { @@ -279,28 +279,28 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, goto done; } - (*num_names) = r.mapped_count; - result = NT_STATUS_OK; - - if (!((*domains) = (char **)talloc(mem_ctx, sizeof(char *) * r.mapped_count))) { + if (!((*domains) = (char **)talloc(mem_ctx, sizeof(char *) * + num_sids))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; } - if (!((*names) = (char **)talloc(mem_ctx, sizeof(char *) * r.mapped_count))) { + if (!((*names) = (char **)talloc(mem_ctx, sizeof(char *) * + num_sids))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; } - if (!((*types) = (uint32 *)talloc(mem_ctx, sizeof(uint32) * r.mapped_count))) { + if (!((*types) = (uint32 *)talloc(mem_ctx, sizeof(uint32) * + num_sids))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; } - for (i = 0; i < r.mapped_count; i++) { + for (i = 0; i < num_sids; i++) { fstring name, dom_name; uint32 dom_idx = t_names.name[i].domain_idx; @@ -337,8 +337,9 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /** Lookup a list of names */ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, const char **names, - DOM_SID **sids, uint32 **types, int *num_sids) + POLICY_HND *pol, int num_names, + const char **names, DOM_SID **sids, + uint32 **types) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_NAMES q; @@ -377,13 +378,14 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, result = r.status; - if (!NT_STATUS_IS_OK(result)) { + if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != + NT_STATUS_V(STATUS_SOME_UNMAPPED)) { + /* An actual error occured */ goto done; } - /* Return output parameters */ if (r.mapped_count == 0) { @@ -391,22 +393,21 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, goto done; } - (*num_sids) = r.mapped_count; - result = NT_STATUS_OK; - - if (!((*sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * r.mapped_count)))) { + if (!((*sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * + num_names)))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; } - if (!((*types = (uint32 *)talloc(mem_ctx, sizeof(uint32) * r.mapped_count)))) { + if (!((*types = (uint32 *)talloc(mem_ctx, sizeof(uint32) * + num_names)))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; } - for (i = 0; i < r.mapped_count; i++) { + for (i = 0; i < num_names; i++) { DOM_RID2 *t_rids = r.dom_rid; uint32 dom_idx = t_rids[i].rid_idx; uint32 dom_rid = t_rids[i].rid; diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c index 13c2aeee2d3..e9e6c131ac4 100644 --- a/source/libsmb/nterr.c +++ b/source/libsmb/nterr.c @@ -534,7 +534,8 @@ nt_err_code_struct nt_errs[] = { "NT_STATUS_TOO_MANY_LINKS", NT_STATUS_TOO_MANY_LINKS }, { "NT_STATUS_QUOTA_LIST_INCONSISTENT", NT_STATUS_QUOTA_LIST_INCONSISTENT }, { "NT_STATUS_FILE_IS_OFFLINE", NT_STATUS_FILE_IS_OFFLINE }, - { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES }, + { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES }, + { "STATUS_SOME_UNMAPPED", STATUS_SOME_UNMAPPED }, { NULL, NT_STATUS(0) } }; diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index dd22f8ed367..684ce5ac288 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -187,7 +187,6 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, NTSTATUS status; DOM_SID *sids = NULL; uint32 *types = NULL; - int num_sids; const char *full_name; if (!(mem_ctx = talloc_init_named("name_to_sid[rpc] for [%s]\\[%s]", domain->name, name))) { @@ -209,9 +208,10 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, } status = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol, 1, - &full_name, &sids, &types, &num_sids); + &full_name, &sids, &types); - /* Return rid and type if lookup successful */ + /* Return rid and type if lookup successful */ + if (NT_STATUS_IS_OK(status)) { sid_copy(sid, &sids[0]); *type = types[0]; @@ -234,15 +234,13 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain, char **domains; char **names; uint32 *types; - int num_names; NTSTATUS status; if (!(hnd = cm_get_lsa_handle(domain->name))) return NT_STATUS_UNSUCCESSFUL; status = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol, - 1, sid, &domains, &names, &types, - &num_names); + 1, sid, &domains, &names, &types); if (NT_STATUS_IS_OK(status)) { *type = types[0]; diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 585a75df7dd..17180e237f7 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -78,7 +78,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_SID *sids; uint32 *types; - int num_names, i; + int i; if (argc == 1) { printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]); @@ -93,15 +93,17 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, goto done; result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, - (const char**)(argv + 1), &sids, - &types, &num_names); + (const char**)(argv + 1), &sids, &types); - if (!NT_STATUS_IS_OK(result)) + if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != + NT_STATUS_V(STATUS_SOME_UNMAPPED)) goto done; + result = NT_STATUS_OK; + /* Print results */ - for (i = 0; i < num_names; i++) { + for (i = 0; i < (argc - 1); i++) { fstring sid_str; sid_to_string(sid_str, &sids[i]); @@ -124,7 +126,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, char **domains; char **names; uint32 *types; - int num_names, i; + int i; if (argc == 1) { printf("Usage: %s [sid1 [sid2 [...]]]\n", argv[0]); @@ -153,18 +155,21 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup the SIDs */ result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids, - &domains, &names, &types, &num_names); + &domains, &names, &types); - if (!NT_STATUS_IS_OK(result)) + if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != + NT_STATUS_V(STATUS_SOME_UNMAPPED)) goto done; + result = NT_STATUS_OK; + /* Print results */ - for (i = 0; i < num_names; i++) { + for (i = 0; i < (argc - 1); i++) { fstring sid_str; sid_to_string(sid_str, &sids[i]); - printf("%s [%s]\\[%s] (%d)\n", sid_str, + printf("%s %s\\%s (%d)\n", sid_str, domains[i] ? domains[i] : "*unknown*", names[i] ? names[i] : "*unknown*", types[i]); } @@ -446,6 +451,7 @@ static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, goto done; /* Print results */ + printf("%u:%u (0x%x:0x%x)\n", luid.high, luid.low, luid.high, luid.low); done: diff --git a/source/smbd/service.c b/source/smbd/service.c index 3c66f5c3be3..89044abcb8b 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -225,6 +225,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int BOOL guest = False; BOOL force = False; connection_struct *conn; + struct stat st; uid_t euid; int ret; @@ -583,6 +584,11 @@ connection_struct *make_connection(char *service,char *user,char *password, int } } +#if CHECK_PATH_ON_TCONX + /* win2000 does not check the permissions on the directory + during the tree connect, instead relying on permission + check during individual operations. To match this behaviour + I have disabled this chdir check (tridge) */ if (vfs_ChDir(conn,conn->connectpath) != 0) { DEBUG(0,("%s (%s) Can't change directory to %s (%s)\n", remote_machine, conn->client_address, @@ -593,12 +599,23 @@ connection_struct *make_connection(char *service,char *user,char *password, int *ecode = ERRnosuchshare; return NULL; } +#else + /* the alternative is just to check the directory exists */ + if (stat(conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) { + DEBUG(0,("%s is not a directory\n", conn->connectpath)); + change_to_root_user(); + yield_connection(conn, lp_servicename(SNUM(conn))); + conn_free(conn); + *ecode = ERRnosuchshare; + return NULL; + } +#endif string_set(&conn->origpath,conn->connectpath); #if SOFTLINK_OPTIMISATION - /* resolve any soft links early */ - { + /* resolve any soft links early if possible */ + if (vfs_ChDir(conn,conn->connectpath) == 0) { pstring s; pstrcpy(s,conn->connectpath); vfs_GetWd(conn,s); diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index c99f212ef34..68e26dff607 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -109,7 +109,6 @@ static void SidToString(fstring str, DOM_SID *sid) char **domains = NULL; char **names = NULL; uint32 *types = NULL; - int num_names; sid_to_string(str, sid); @@ -126,8 +125,8 @@ static void SidToString(fstring str, DOM_SID *sid) if (!cacls_open_policy_hnd() || !NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx, - &pol, 1, sid, &domains, &names, - &types, &num_names)) || + &pol, 1, sid, &domains, + &names, &types)) || !domains || !domains[0] || !names || !names[0]) { return; } @@ -145,7 +144,6 @@ static BOOL StringToSid(DOM_SID *sid, const char *str) { uint32 *types = NULL; DOM_SID *sids = NULL; - int num_sids; BOOL result = True; if (strncmp(str, "S-", 2) == 0) { @@ -153,9 +151,9 @@ static BOOL StringToSid(DOM_SID *sid, const char *str) } if (!cacls_open_policy_hnd() || - !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, - &str, - &sids, &types, &num_sids))) { + !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, + &pol, 1, &str, &sids, + &types))) { result = False; goto done; } -- cgit From 39546dd241b36d5e7b8e239525a13b91e4e9db80 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 23:33:31 +0000 Subject: Shutdown cli_state in the dealloc function. This happens automatically when a handle object falls out of scope. --- source/python/py_spoolss.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/python/py_spoolss.c b/source/python/py_spoolss.c index 450abbd6dc2..b92e3c17586 100644 --- a/source/python/py_spoolss.c +++ b/source/python/py_spoolss.c @@ -192,6 +192,15 @@ Set the form given by the dictionary argument. static void py_policy_hnd_dealloc(PyObject* self) { + spoolss_policy_hnd_object *hnd; + + /* Close down policy handle and free talloc context */ + + hnd = (spoolss_policy_hnd_object*)self; + + cli_shutdown(hnd->cli); + talloc_destroy(hnd->mem_ctx); + PyObject_Del(self); } @@ -337,8 +346,7 @@ void initspoolss(void) module = Py_InitModule("spoolss", spoolss_methods); dict = PyModule_GetDict(module); - /* Make spools_error global an exception we can raise when an error - occurs. */ + /* Exceptions we can raise */ spoolss_error = PyErr_NewException("spoolss.error", NULL, NULL); PyDict_SetItemString(dict, "error", spoolss_error); -- cgit From 4114fe5996f84dfd14855ffdf666e065446607b4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 23:36:01 +0000 Subject: Call PyErr_SetString instead of fprintf to stderr. Don't clean up talloc and cli_state on close printer. They will be destroyed in the handle dealloc function. --- source/python/py_spoolss_printers.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/python/py_spoolss_printers.c b/source/python/py_spoolss_printers.c index b0033405ad7..decc52e080a 100644 --- a/source/python/py_spoolss_printers.c +++ b/source/python/py_spoolss_printers.c @@ -52,12 +52,15 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw) if (!(cli = open_pipe_creds(computer_name, creds, cli_spoolss_initialise, NULL))) { - fprintf(stderr, "could not initialise cli state\n"); + + /* Error state set in open_pipe_creds() */ + goto done; } if (!(mem_ctx = talloc_init())) { - fprintf(stderr, "unable to initialise talloc context\n"); + PyErr_SetString(spoolss_error, + "unable to initialise talloc context\n"); goto done; } @@ -99,11 +102,6 @@ PyObject *spoolss_closeprinter(PyObject *self, PyObject *args) result = cli_spoolss_close_printer(hnd->cli, hnd->mem_ctx, &hnd->pol); - /* Cleanup samba stuf */ - - cli_shutdown(hnd->cli); - talloc_destroy(hnd->mem_ctx); - /* Return value */ Py_INCREF(Py_None); -- cgit From 45cb1fed490d1fdafc5b63f2f5a33dfe5b334972 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 23:39:02 +0000 Subject: Explicitly return a list in py_ntstatus_tuple() and py_werror_typle(). Not sure whether these should really be tuples or lists. In open_pipe_creds() raise PyExc_RuntimeError exceptions if the pipe connect function returns an error. --- source/python/py_common.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/source/python/py_common.c b/source/python/py_common.c index 019bcca07c8..5b80f09498c 100644 --- a/source/python/py_common.c +++ b/source/python/py_common.c @@ -27,7 +27,7 @@ PyObject *py_werror_tuple(WERROR werror) { - return Py_BuildValue("is", W_ERROR_V(werror), + return Py_BuildValue("[is]", W_ERROR_V(werror), dos_errstr(werror)); } @@ -35,7 +35,7 @@ PyObject *py_werror_tuple(WERROR werror) PyObject *py_ntstatus_tuple(NTSTATUS ntstatus) { - return Py_BuildValue("is", NT_STATUS_V(ntstatus), + return Py_BuildValue("[is]", NT_STATUS_V(ntstatus), nt_errstr(ntstatus)); } @@ -189,7 +189,24 @@ struct cli_state *open_pipe_creds(char *system_name, PyObject *creds, /* Now try to connect */ - connect_fn(cli, system_name, &nt_creds); + if (!connect_fn(cli, system_name, &nt_creds)) { + if (cli) { + NTSTATUS error = cli_nt_error(cli); + + /* Raise an exception if something went wrong. + FIXME: This should be a more appropriate + exception than PyExc_RuntimeError */ + + if (!NT_STATUS_IS_OK(error)) + PyErr_SetObject(PyExc_RuntimeError, + py_ntstatus_tuple(error)); + else + PyErr_SetString(PyExc_RuntimeError, + "error connecting to pipe"); + } + + return NULL; + } return cli; } -- cgit From 4bf6a9830acde47994975dffd578454ebb75e45a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 14 Apr 2002 23:42:54 +0000 Subject: Rename new_policy_hnd_object() to new_spoolss_policy_hnd_object() --- source/python/py_spoolss.c | 4 ++-- source/python/py_spoolss_printers.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/python/py_spoolss.c b/source/python/py_spoolss.c index b92e3c17586..c87b6626fec 100644 --- a/source/python/py_spoolss.c +++ b/source/python/py_spoolss.c @@ -28,8 +28,8 @@ PyObject *spoolss_error, *spoolss_werror; * Routines to convert from python hashes to Samba structures */ -PyObject *new_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol) +PyObject *new_spoolss_policy_hnd_object(struct cli_state *cli, + TALLOC_CTX *mem_ctx, POLICY_HND *pol) { spoolss_policy_hnd_object *o; diff --git a/source/python/py_spoolss_printers.c b/source/python/py_spoolss_printers.c index decc52e080a..69b2733cfbe 100644 --- a/source/python/py_spoolss_printers.c +++ b/source/python/py_spoolss_printers.c @@ -75,7 +75,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw) goto done; } - result = new_policy_hnd_object(cli, mem_ctx, &hnd); + result = new_spoolss_policy_hnd_object(cli, mem_ctx, &hnd); done: SAFE_FREE(computer_name); -- cgit From 94169fd6fc658ca510444d2259f74edb4384df10 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 01:09:40 +0000 Subject: Added hex values as comments for the standard access rights. --- source/include/smb.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/include/smb.h b/source/include/smb.h index a1570300963..2b4d4fa690e 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -1042,11 +1042,11 @@ struct bitmap { #define SYNCHRONIZE_ACCESS (1L<<20) /* 0x00100000 */ /* Combinations of standard masks. */ -#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) -#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) -#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) -#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) -#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) +#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) /* 0x001f0000 */ +#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ +#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) /* 0x00200000 */ +#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) /* 0x000f0000 */ +#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ #define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ #define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ -- cgit From 00511ae2b4bc0ef3bfda89cc0ae3e1fba092b6d6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 01:11:40 +0000 Subject: Added hex values as comments for the standard access rights. --- source/include/smb.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/include/smb.h b/source/include/smb.h index 52b475ff272..6d3ce04400e 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -1058,11 +1058,11 @@ struct bitmap { #define SYNCHRONIZE_ACCESS (1L<<20) /* 0x00100000 */ /* Combinations of standard masks. */ -#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) -#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) -#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) -#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) -#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) +#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) /* 0x001f0000 */ +#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ +#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) /* 0x00200000 */ +#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) /* 0x000f0000 */ +#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ #define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ #define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ -- cgit From 3b6df44ddc80d728c01511529ccb05c1ba3d414b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 01:55:57 +0000 Subject: Fixed incorrect debug. --- source/lib/username.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/username.c b/source/lib/username.c index 1504fd6a06e..da603949bc8 100644 --- a/source/lib/username.c +++ b/source/lib/username.c @@ -493,7 +493,7 @@ BOOL user_in_list(const char *user,char **list) while (*list) { - DEBUG(10,("user_in_list: checking user |%s| in group |%s|\n", user, *list)); + DEBUG(10,("user_in_list: checking user |%s| against |%s|\n", user, *list)); /* * Check raw username. -- cgit From e33f5b89ddebec4d25753aac6833e59a2209be43 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 01:56:36 +0000 Subject: Fixed incorrect debug. --- source/lib/username.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/username.c b/source/lib/username.c index dae47b2b145..2bf289b6771 100644 --- a/source/lib/username.c +++ b/source/lib/username.c @@ -451,7 +451,7 @@ BOOL user_in_list(char *user,char *list) while (next_token(&p,tok,LIST_SEP, sizeof(tok))) { - DEBUG(10,("user_in_list: checking user |%s| in group |%s|\n", user, tok)); + DEBUG(10,("user_in_list: checking user |%s| against |%s|\n", user, tok)); /* * Check raw username. -- cgit From 5ea6c0e3225ba659e71bda11978f53018ec98dfb Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 02:28:21 +0000 Subject: Added standard and generic mappings for print servers. --- source/printing/nt_printing.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 8f1a12383d1..78e411ec42f 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -57,6 +57,22 @@ STANDARD_MAPPING printer_std_mapping = { PRINTER_ALL_ACCESS }; +/* Map generic permissions to print server object specific permissions */ + +GENERIC_MAPPING printserver_generic_mapping = { + SERVER_READ, + SERVER_WRITE, + SERVER_EXECUTE, + SERVER_ALL_ACCESS +}; + +STANDARD_MAPPING printserver_std_mapping = { + SERVER_READ, + SERVER_WRITE, + SERVER_EXECUTE, + SERVER_ALL_ACCESS +}; + /* We need one default form to support our default printer. Msoft adds the forms it wants and in the ORDER it wants them (note: DEVMODE papersize is an array index). Letter is always first, so (for the current code) additions -- cgit From f03c74871a3c7d5782a52dfe1d95342b2d94116a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 02:33:13 +0000 Subject: Fixed print server permission handling for OpenprinterEx (as compared to NT/2K). It's the same as the new printer permission handling: map standard permissions to specific permissions, and reject all object specific permissions that aren't related to print servers. We still accept STANDARD_RIGHTS_ALL_ACCESS (0x001f0000) when Windows rejects it (as we do for printer handles). This fixes the print server properties page and allows us to at least attempt to add/delete/modify forms. Interestingly enough, setting 'show add printer wizard = false' doesn't allow us to modify forms on the server. )-: --- source/rpc_server/srv_spoolss_nt.c | 53 +++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 8281143a3cf..6b9604fafdf 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -92,7 +92,8 @@ static uint32 smb_connections=0; /* in printing/nt_printing.c */ -extern STANDARD_MAPPING printer_std_mapping; + +extern STANDARD_MAPPING printer_std_mapping, printserver_std_mapping; #define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) @@ -959,29 +960,51 @@ Can't find printer handle we created for priunter %s\n", name )); get_current_user(&user, p); if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) { - if (printer_default->access_required == 0) { - return WERR_OK; + + /* Printserver handles use global struct... */ + + snum = -1; + + /* Map standard access rights to object specific access + rights */ + + se_map_standard(&printer_default->access_required, + &printserver_std_mapping); + + /* Deny any object specific bits that don't apply to print + servers (i.e printer and job specific bits) */ + + printer_default->access_required &= SPECIFIC_RIGHTS_MASK; + + if (printer_default->access_required & + ~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) { + DEBUG(3, ("access DENIED for non-printserver bits")); + close_printer_handle(p, handle); + return WERR_ACCESS_DENIED; } - else if ((printer_default->access_required & SERVER_ACCESS_ADMINISTER ) == SERVER_ACCESS_ADMINISTER) { - /* Printserver handles use global struct... */ - snum = -1; + /* Allow admin access */ + + if (printer_default->access_required & + SERVER_ACCESS_ADMINISTER) { if (!lp_ms_add_printer_wizard()) { close_printer_handle(p, handle); return WERR_ACCESS_DENIED; } - else if (user.uid == 0 || user_in_list(uidtoname(user.uid), lp_printer_admin(snum))) { + + if (user.uid == 0 || + user_in_list(uidtoname(user.uid), + lp_printer_admin(snum))) return WERR_OK; - } - else { - close_printer_handle(p, handle); - return WERR_ACCESS_DENIED; - } + + close_printer_handle(p, handle); + return WERR_ACCESS_DENIED; } - } - else - { + + /* We fall through to return WERR_OK */ + + } else { /* NT doesn't let us connect to a printer if the connecting user doesn't have print permission. */ -- cgit From bc673c42045ceb46d9569bc4d88f9c64897fc85a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 04:07:13 +0000 Subject: Merge of print server permission handling fixes from HEAD. Unit tests rock! --- source/printing/nt_printing.c | 16 +++++++++++++ source/rpc_server/srv_spoolss_nt.c | 49 ++++++++++++++++++++++++++++---------- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 907c3fd8e69..29bc185a6dd 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -56,6 +56,22 @@ STANDARD_MAPPING printer_std_mapping = { PRINTER_ALL_ACCESS }; +/* Map generic permissions to print server object specific permissions */ + +GENERIC_MAPPING printserver_generic_mapping = { + SERVER_READ, + SERVER_WRITE, + SERVER_EXECUTE, + SERVER_ALL_ACCESS +}; + +STANDARD_MAPPING printserver_std_mapping = { + SERVER_READ, + SERVER_WRITE, + SERVER_EXECUTE, + SERVER_ALL_ACCESS +}; + /* We need one default form to support our default printer. Msoft adds the forms it wants and in the ORDER it wants them (note: DEVMODE papersize is an array index). Letter is always first, so (for the current code) additions diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 3bc91c24725..a8552cd14dd 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -92,7 +92,8 @@ static uint32 smb_connections=0; /* in printing/nt_printing.c */ -extern STANDARD_MAPPING printer_std_mapping; + +extern STANDARD_MAPPING printer_std_mapping, printserver_std_mapping; #define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) @@ -959,26 +960,50 @@ Can't find printer handle we created for printer %s\n", name )); get_current_user(&user, p); if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) { - if (printer_default->access_required == 0) { - return WERR_OK; + + /* Printserver handles use global struct... */ + + snum = -1; + + /* Map standard access rights to object specific access + rights */ + + se_map_standard(&printer_default->access_required, + &printserver_std_mapping); + + /* Deny any object specific bits that don't apply to print + servers (i.e printer and job specific bits) */ + + printer_default->access_required &= SPECIFIC_RIGHTS_MASK; + + if (printer_default->access_required & + ~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) { + DEBUG(3, ("access DENIED for non-printserver bits")); + close_printer_handle(p, handle); + return WERR_ACCESS_DENIED; } - else if ((printer_default->access_required & SERVER_ACCESS_ADMINISTER ) == SERVER_ACCESS_ADMINISTER) { - /* Printserver handles use global struct... */ - snum = -1; + /* Allow admin access */ + + if (printer_default->access_required & + SERVER_ACCESS_ADMINISTER) { if (!lp_ms_add_printer_wizard()) { close_printer_handle(p, handle); return WERR_ACCESS_DENIED; } - else if (user.uid == 0 || user_in_list(uidtoname(user.uid), lp_printer_admin(snum))) { + + if (user.uid == 0 || + user_in_list(uidtoname(user.uid), + lp_printer_admin(snum))) return WERR_OK; - } - else { - close_printer_handle(p, handle); - return WERR_ACCESS_DENIED; - } + + close_printer_handle(p, handle); + return WERR_ACCESS_DENIED; } + + /* We fall through to return WERR_OK */ + } else { -- cgit From 59d755ffb57c322a104ff8f52819956cafff1bac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Apr 2002 04:55:37 +0000 Subject: by using a prompter function we can avoid the bug in the MIT kerberos libraries with handling blank passwords. --- source/libads/kerberos.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c index 194a71275ea..85518a67698 100644 --- a/source/libads/kerberos.c +++ b/source/libads/kerberos.c @@ -24,6 +24,28 @@ #ifdef HAVE_KRB5 +/* + we use a prompter to avoid a crash bug in the kerberos libs when + dealing with empty passwords + this prompter is just a string copy ... +*/ +static krb5_error_code +kerb_prompter(krb5_context ctx, void *data, + const char *name, + const char *banner, + int num_prompts, + krb5_prompt prompts[]) +{ + if (num_prompts == 0) return 0; + + memset(prompts[0].reply->data, 0, prompts[0].reply->length); + if (prompts[0].reply->length > 0) { + strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1); + prompts[0].reply->length = strlen(prompts[0].reply->data); + } + return 0; +} + /* simulate a kinit, putting the tgt in the default cache location remus@snapserver.com @@ -36,11 +58,6 @@ int kerberos_kinit_password(const char *principal, const char *password) krb5_principal me; krb5_creds my_creds; - if (! *password) { - /* kerberos dies on an empty password! */ - return KRB5_PARSE_MALFORMED; - } - if ((code = krb5_init_context(&ctx))) return code; @@ -54,8 +71,9 @@ int kerberos_kinit_password(const char *principal, const char *password) return code; } - if ((code = krb5_get_init_creds_password(ctx, &my_creds, me, (char*)password, NULL, - NULL, 0, NULL, NULL))) { + if ((code = krb5_get_init_creds_password(ctx, &my_creds, me, NULL, + kerb_prompter, + password, 0, NULL, NULL))) { krb5_free_principal(ctx, me); krb5_free_context(ctx); return code; -- cgit From 7f923d738b94eef042b21e4d0143861755620d91 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Apr 2002 06:56:01 +0000 Subject: better handling of DOS LANMAN2.1 protocol --- source/libsmb/cliconnect.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index 8ddd1166795..4ed2aae1f34 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -34,6 +34,7 @@ prots[] = {PROTOCOL_LANMAN1,"MICROSOFT NETWORKS 3.0"}, {PROTOCOL_LANMAN1,"LANMAN1.0"}, {PROTOCOL_LANMAN2,"LM1.2X002"}, + {PROTOCOL_LANMAN2,"DOS LANMAN2.1"}, {PROTOCOL_LANMAN2,"Samba"}, {PROTOCOL_NT1,"NT LANMAN 1.0"}, {PROTOCOL_NT1,"NT LM 0.12"}, @@ -45,7 +46,7 @@ prots[] = do an old lanman2 style session setup ****************************************************************************/ static BOOL cli_session_setup_lanman2(struct cli_state *cli, char *user, - char *pass, int passlen) + char *pass, int passlen, const char *workgroup) { fstring pword; char *p; @@ -88,7 +89,10 @@ static BOOL cli_session_setup_lanman2(struct cli_state *cli, char *user, p = smb_buf(cli->outbuf); memcpy(p,pword,passlen); p += passlen; - p += clistr_push(cli, p, user, -1, STR_TERMINATE); + p += clistr_push(cli, p, user, -1, STR_TERMINATE|STR_UPPER); + p += clistr_push(cli, p, workgroup, -1, STR_TERMINATE|STR_UPPER); + p += clistr_push(cli, p, "Unix", -1, STR_TERMINATE); + p += clistr_push(cli, p, "Samba", -1, STR_TERMINATE); cli_setup_bcc(cli, p); cli_send_smb(cli); @@ -591,7 +595,7 @@ BOOL cli_session_setup(struct cli_state *cli, /* if its an older server then we have to use the older request format */ if (cli->protocol < PROTOCOL_NT1) { - return cli_session_setup_lanman2(cli, user, pass, passlen); + return cli_session_setup_lanman2(cli, user, pass, passlen, workgroup); } /* if no user is supplied then we have to do an anonymous connection. @@ -756,6 +760,10 @@ void cli_negprot_send(struct cli_state *cli) char *p; int numprots; + if (cli->protocol < PROTOCOL_NT1) { + cli->use_spnego = False; + } + memset(cli->outbuf,'\0',smb_size); /* setup the protocol strings */ @@ -788,6 +796,10 @@ BOOL cli_negprot(struct cli_state *cli) int numprots; int plength; + if (cli->protocol < PROTOCOL_NT1) { + cli->use_spnego = False; + } + memset(cli->outbuf,'\0',smb_size); /* setup the protocol strings */ @@ -822,7 +834,7 @@ BOOL cli_negprot(struct cli_state *cli) return(False); } - cli->protocol = prots[SVAL(cli->inbuf,smb_vwv0)].prot; + cli->protocol = prots[SVAL(cli->inbuf,smb_vwv0)].prot; if (cli->protocol >= PROTOCOL_NT1) { /* NT protocol */ @@ -848,6 +860,7 @@ BOOL cli_negprot(struct cli_state *cli) smb_buflen(cli->inbuf)-8, STR_UNICODE|STR_NOALIGN); } } else if (cli->protocol >= PROTOCOL_LANMAN1) { + cli->use_spnego = False; cli->sec_mode = SVAL(cli->inbuf,smb_vwv1); cli->max_xmit = SVAL(cli->inbuf,smb_vwv2); cli->sesskey = IVAL(cli->inbuf,smb_vwv6); @@ -860,6 +873,7 @@ BOOL cli_negprot(struct cli_state *cli) cli->secblob = data_blob(smb_buf(cli->inbuf),smb_buflen(cli->inbuf)); } else { /* the old core protocol */ + cli->use_spnego = False; cli->sec_mode = 0; cli->serverzone = TimeDiff(time(NULL)); } -- cgit From b693917530d649e22a677bd3bb1adedbfdd89bba Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Apr 2002 06:57:17 +0000 Subject: this fixes the displaying of free disk space for DOS6 clients. Win2000 changes its behaviour based on the negotiated protocol for the SMBdskattr SMB --- source/smbd/reply.c | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index fbb981781fd..60b1d13417c 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -542,23 +542,46 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size ****************************************************************************/ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { - int outsize = 0; - SMB_BIG_UINT dfree,dsize,bsize; - START_PROFILE(SMBdskattr); - - conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); - - outsize = set_message(outbuf,5,0,True); + int outsize = 0; + SMB_BIG_UINT dfree,dsize,bsize; + START_PROFILE(SMBdskattr); + + conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); - SSVAL(outbuf,smb_vwv0,dsize); - SSVAL(outbuf,smb_vwv1,bsize/512); - SSVAL(outbuf,smb_vwv2,512); - SSVAL(outbuf,smb_vwv3,dfree); + outsize = set_message(outbuf,5,0,True); + + if (Protocol <= PROTOCOL_LANMAN2) { + double total_space, free_space; + /* we need to scale this to a number that DOS6 can handle. We + use floating point so we can handle large drives on systems + that don't have 64 bit integers - DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree)); + we end up displaying a maximum of 2G to DOS systems + */ + total_space = dsize * (double)bsize; + free_space = dfree * (double)bsize; - END_PROFILE(SMBdskattr); - return(outsize); + dsize = (total_space+63*512) / (64*512); + dfree = (free_space+63*512) / (64*512); + + if (dsize > 0xFFFF) dsize = 0xFFFF; + if (dfree > 0xFFFF) dfree = 0xFFFF; + + SSVAL(outbuf,smb_vwv0,dsize); + SSVAL(outbuf,smb_vwv1,64); /* this must be 64 for dos systems */ + SSVAL(outbuf,smb_vwv2,512); /* and this must be 512 */ + SSVAL(outbuf,smb_vwv3,dfree); + } else { + SSVAL(outbuf,smb_vwv0,dsize); + SSVAL(outbuf,smb_vwv1,bsize/512); + SSVAL(outbuf,smb_vwv2,512); + SSVAL(outbuf,smb_vwv3,dfree); + } + + DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree)); + + END_PROFILE(SMBdskattr); + return(outsize); } -- cgit From 87e913a4e951b408faa7d441b8909b23e04e8f15 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 15 Apr 2002 07:00:23 +0000 Subject: A simpler, and more correct, fix for the problem of too many EGIDs under FreeBSD etc. --- source/smbd/password.c | 9 +++++++++ source/smbd/sec_ctx.c | 12 ------------ source/smbd/service.c | 11 +++++++++++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index e2dce6c507e..39733611bd0 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -313,6 +313,15 @@ int register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name, initialise_groups(unix_name, uid, gid); get_current_groups( &vuser->n_groups, &vuser->groups); +#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS + /* + * Under OSes to which this applies, we get GID 0 as the first + * element of vuser->groups, so we put GID back in there. + * It is ignored by setgroups + */ + if (vuser->n_groups) vuser->groups[0] = gid; +#endif /* HAVE_GETGROUPS_TOO_MANY_EGIDS */ + if (*pptok) add_supplementary_nt_login_groups(&vuser->n_groups, &vuser->groups, pptok); diff --git a/source/smbd/sec_ctx.c b/source/smbd/sec_ctx.c index 659940747a2..9a61a76f6fe 100644 --- a/source/smbd/sec_ctx.c +++ b/source/smbd/sec_ctx.c @@ -156,18 +156,6 @@ int get_current_groups(int *p_ngroups, gid_t **p_groups) return -1; } -#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS - if (getegid() == groups[0]) { - ngroups--; - if (!ngroups) { - SAFE_FREE(groups); - return(ngroups); - } - - memmove(&groups[0], &groups[1], ngroups*sizeof(gid_t)); - } -#endif - (*p_ngroups) = ngroups; (*p_groups) = groups; diff --git a/source/smbd/service.c b/source/smbd/service.c index 89044abcb8b..e89fd085339 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -497,6 +497,17 @@ connection_struct *make_connection(char *service,char *user,char *password, int store them. Used by change_to_user() */ initialise_groups(conn->user, conn->uid, conn->gid); get_current_groups(&conn->ngroups,&conn->groups); + +#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS + /* + * Some OSes, like FreeBSD return EGID as group 0 from getgroups + * and ignore group 0 on setgroups. + * get_current_groups returns group 0 as 0, which is wrong. + * We set it to gid here to prevent the token creation below + * from creating an incorrect token (SID for local group 0). + */ + if (conn->ngroups) conn->groups[0] = conn->gid; +#endif /* HAVE_GETGROUPS_TOO_MANY_EGIDS */ /* check number of connections */ if (!claim_connection(conn, -- cgit From 70bd1a0f94412236bf6603f16947336cb75c6415 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 07:29:47 +0000 Subject: Skeleton for SAMR module. --- source/python/py_samr.c | 206 ++++++++++++++++++++++++++++++++++++++++++++++ source/python/py_samr.h | 83 +++++++++++++++++++ source/python/setup.py.in | 9 ++ 3 files changed, 298 insertions(+) create mode 100644 source/python/py_samr.c create mode 100644 source/python/py_samr.h diff --git a/source/python/py_samr.c b/source/python/py_samr.c new file mode 100644 index 00000000000..2271cb44649 --- /dev/null +++ b/source/python/py_samr.c @@ -0,0 +1,206 @@ +/* + Python wrappers for DCERPC/SMB client routines. + + Copyright (C) Tim Potter, 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" +#include "Python.h" + +#include "python/py_samr.h" + +PyObject *new_samr_connect_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_connect_hnd_object *o; + + o = PyObject_New(samr_connect_hnd_object, &samr_connect_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +/* + * Exceptions raised by this module + */ + +PyObject *samr_error; /* This indicates a non-RPC related error + such as name lookup failure */ + +PyObject *samr_ntstatus; /* This exception is raised when a RPC call + returns a status code other than + NT_STATUS_OK */ + +static void py_samr_connect_hnd_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +#if 0 + +static PyObject *py_samr_connect_hnd_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(samr_connect_methods, self, attrname); +} + +#endif + +PyTypeObject samr_connect_hnd_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SAMR Connect Handle", + sizeof(samr_connect_hnd_object), + 0, + py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ +// py_samr_connect_hnd_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +PyTypeObject samr_domain_hnd_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SAMR Domain Handle", + sizeof(samr_connect_hnd_object), + 0, + py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ +// py_samr_connect_hnd_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +PyTypeObject samr_user_hnd_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SAMR User Handle", + sizeof(samr_connect_hnd_object), + 0, + py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ +// py_samr_connect_hnd_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +PyTypeObject samr_group_hnd_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SAMR Group Handle", + sizeof(samr_connect_hnd_object), + 0, + py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ +// py_samr_connect_hnd_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +PyTypeObject samr_alias_hnd_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SAMR Alias Handle", + sizeof(samr_connect_hnd_object), + 0, + py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ +// py_samr_connect_hnd_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +static PyMethodDef samr_methods[] = { + + /* Open/close samr connect handles */ + +#if 0 + { "connect", lsa_open_policy, METH_VARARGS | METH_KEYWORDS, + "Open a connect handle" }, + + { "close", lsa_close, METH_VARARGS, "Close a policy handle" }, +#endif + + { NULL } +}; + +/* + * Module initialisation +*/ + +void initsamr(void) +{ + PyObject *module, *dict; + + /* Initialise module */ + + module = Py_InitModule("samr", samr_methods); + dict = PyModule_GetDict(module); + + samr_error = PyErr_NewException("samr.error", NULL, NULL); + PyDict_SetItemString(dict, "error", samr_error); + + samr_ntstatus = PyErr_NewException("samr.ntstatus", NULL, NULL); + PyDict_SetItemString(dict, "ntstatus", samr_ntstatus); + + /* Initialise policy handle object */ + + samr_connect_hnd_type.ob_type = &PyType_Type; + samr_domain_hnd_type.ob_type = &PyType_Type; + samr_user_hnd_type.ob_type = &PyType_Type; + samr_group_hnd_type.ob_type = &PyType_Type; + samr_alias_hnd_type.ob_type = &PyType_Type; + + /* Initialise constants */ + +// const_init(dict); + + /* Do samba initialisation */ + + py_samba_init(); + + setup_logging("samr", True); + DEBUGLEVEL = 10; +} diff --git a/source/python/py_samr.h b/source/python/py_samr.h new file mode 100644 index 00000000000..52352cc64de --- /dev/null +++ b/source/python/py_samr.h @@ -0,0 +1,83 @@ +/* + Python wrappers for DCERPC/SMB client routines. + + Copyright (C) Tim Potter, 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _PY_SAMR_H +#define _PY_SAMR_H + +#include "includes.h" +#include "Python.h" + +#include "python/py_common.h" + +/* SAMR connect policy handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; + TALLOC_CTX *mem_ctx; + POLICY_HND pol; +} samr_connect_hnd_object; + +/* SAMR domain policy handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; + TALLOC_CTX *mem_ctx; + POLICY_HND pol; +} samr_domain_hnd_object; + +/* SAMR user policy handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; + TALLOC_CTX *mem_ctx; + POLICY_HND pol; +} samr_user_hnd_object; + +/* SAMR group policy handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; + TALLOC_CTX *mem_ctx; + POLICY_HND pol; +} samr_group_hnd_object; + +/* SAMR alias policy handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; + TALLOC_CTX *mem_ctx; + POLICY_HND pol; +} samr_alias_hnd_object; + +extern PyTypeObject samr_connect_hnd_type, samr_domain_hnd_type, + samr_user_hnd_type, samr_group_hnd_type, samr_alias_hnd_type; + +/* Exceptions raised by this module */ + +extern PyObject *samr_error; + +// #include "python/py_samr_proto.h" + +#endif /* _PY_SAMR_H */ diff --git a/source/python/setup.py.in b/source/python/setup.py.in index 59182f5defa..6bc568fa1d3 100755 --- a/source/python/setup.py.in +++ b/source/python/setup.py.in @@ -111,6 +111,15 @@ setup( library_dirs = ["/usr/kerberos/lib"], extra_objects = obj_list), + # SAMR pipe module + + Extension(name = "samr", + sources = [samba_srcdir + "python/py_samr.c", + samba_srcdir + "python/py_common.c"], + libraries = lib_list, + library_dirs = ["/usr/kerberos/lib"], + extra_objects = obj_list), + # winbind client module Extension(name = "winbind", -- cgit From 80adf1dbb56cf8bdbfbcc2c8c7b670c0a23c97f8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 15 Apr 2002 08:50:36 +0000 Subject: Another patch from jelmer: Doco for pdbedit and (ugly, but the best we could come up with) fix for compiling pdbedit on some non-gcc compilers. Andrew Bartlett --- docs/docbook/manpages/pdbedit.8.sgml | 26 +++++++++----- source/utils/pdbedit.c | 68 ++++++++++++++++++++---------------- 2 files changed, 55 insertions(+), 39 deletions(-) diff --git a/docs/docbook/manpages/pdbedit.8.sgml b/docs/docbook/manpages/pdbedit.8.sgml index eeb1fb0d2c6..3f6023d16fa 100644 --- a/docs/docbook/manpages/pdbedit.8.sgml +++ b/docs/docbook/manpages/pdbedit.8.sgml @@ -27,7 +27,9 @@ -a -m -x - -i file + -i passdb-backend + -e passdb-backend + -D debuglevel @@ -233,18 +235,26 @@ - -i file - This command is used to import a smbpasswd - file into the database. + -i passdb-backend + Use a different passdb backend to retrieve users than the one specified in smb.conf. - This option will ease migration from the plain smbpasswd - file database to more powerful backend databases like tdb and - ldap. + This option will ease migration from one passdb backend to another. + - Example: pdbedit -i /etc/smbpasswd.old + Example: pdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb + + + -e passdb-backend + Export all currently available users to the specified password database backend. + + This option will ease migration from one passdb backend to another and will ease backupping + + Example: pdbedit -e smbpasswd:/root/samba-users.backup + + diff --git a/source/utils/pdbedit.c b/source/utils/pdbedit.c index c63ed295299..2cbc9eb71df 100644 --- a/source/utils/pdbedit.c +++ b/source/utils/pdbedit.c @@ -394,24 +394,25 @@ static int delete_machine_entry (struct pdb_context *in, char *machinename) int main (int argc, char **argv) { - struct pdb_context *in; - BOOL list_users = False; - BOOL verbose = False; - BOOL spstyle = False; - BOOL setparms = False; - BOOL machine = False; - BOOL add_user = False; - BOOL delete_user = False; - BOOL import = False; + static BOOL list_users = False; + static BOOL verbose = False; + static BOOL spstyle = False; + static BOOL setparms = False; + static BOOL machine = False; + static BOOL add_user = False; + static BOOL delete_user = False; + static BOOL import = False; int opt; - char *full_name = NULL; - char *user_name = NULL; - char *home_dir = NULL; - char *home_drive = NULL; - char *backend_in = NULL; - char *backend_out = NULL; - char *logon_script = NULL; - char *profile_path = NULL; + static char *full_name = NULL; + static char *user_name = NULL; + static char *home_dir = NULL; + static char *home_drive = NULL; + static char *backend_in = NULL; + static char *backend_out = NULL; + static char *logon_script = NULL; + static char *profile_path = NULL; + + struct pdb_context *in; poptContext pc; struct poptOption long_options[] = { POPT_AUTOHELP @@ -432,14 +433,14 @@ int main (int argc, char **argv) {"debuglevel",'D',POPT_ARG_INT,&DEBUGLEVEL,0,"set debuglevel",NULL}, {0,0,0,0} }; - + DEBUGLEVEL = 1; setup_logging("pdbedit", True); AllowDebugChange = False; - + if (!lp_load(dyn_CONFIGFILE,True,False,False)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", - dyn_CONFIGFILE); + dyn_CONFIGFILE); exit(1); } @@ -456,7 +457,7 @@ int main (int argc, char **argv) fprintf (stderr, "Incompatible options on command line!\n"); exit(1); } - + if(!NT_STATUS_IS_OK(make_pdb_context_name(&in, backend_in))){ fprintf(stderr, "Can't initialize %s.\n", backend_in); @@ -471,7 +472,9 @@ int main (int argc, char **argv) if (machine) return new_machine (in, user_name); else - return new_user (in, user_name, full_name, home_dir, home_drive, logon_script, profile_path); + return new_user (in, user_name, full_name, home_dir, + home_drive, logon_script, + profile_path); } if (delete_user) { @@ -484,16 +487,17 @@ int main (int argc, char **argv) else return delete_user_entry (in, user_name); } - + if (user_name) { if (setparms) - return set_user_info (in, user_name, full_name, - home_dir, - home_drive, - logon_script, - profile_path); + return set_user_info (in, user_name, full_name, + home_dir, + home_drive, + logon_script, + profile_path); else - return print_user_info (in, user_name, verbose, spstyle); + return print_user_info (in, user_name, verbose, + spstyle); } if (list_users) @@ -501,8 +505,10 @@ int main (int argc, char **argv) if (backend_out) return export_database(in, backend_out); - + poptPrintHelp(pc, stderr, 0); - + return 1; } + + -- cgit From b44227ead17d9fd24a73a0f07219e8cf208c1d34 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 15 Apr 2002 13:34:19 +0000 Subject: fix for Win2k and "disable spoolss" --- source/smbd/nttrans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index b3997dad9a8..89b199f67db 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -544,7 +544,7 @@ static int nt_open_pipe(char *fname, connection_struct *conn, /* See if it is one we want to handle. */ if (lp_disable_spoolss() && strequal(fname, "\\spoolss")) - return(ERROR_DOS(ERRSRV,ERRaccess)); + return(ERROR_BOTH(NT_STATUS_OBJECT_NAME_NOT_FOUND,ERRDOS,ERRbadpipe)); for( i = 0; known_nt_pipes[i]; i++ ) if( strequal(fname,known_nt_pipes[i])) -- cgit From fedc11cab16dbecfdae858fc48d629b9172c0fb8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 15 Apr 2002 13:35:18 +0000 Subject: merge from SAMBA_2_2 --- source/smbd/nttrans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index ed2979b3a42..edee14513c8 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -467,7 +467,7 @@ static int nt_open_pipe(char *fname, connection_struct *conn, /* See if it is one we want to handle. */ if (lp_disable_spoolss() && strequal(fname, "\\spoolss")) - return(ERROR_DOS(ERRSRV,ERRaccess)); + return(ERROR_BOTH(NT_STATUS_OBJECT_NAME_NOT_FOUND,ERRDOS,ERRbadpipe)); for( i = 0; known_nt_pipes[i]; i++ ) if( strequal(fname,known_nt_pipes[i])) -- cgit From cd2605dad14e799b8610d9167adf7970b57d4c64 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 15 Apr 2002 13:54:03 +0000 Subject: make man --- docs/htmldocs/smb.conf.5.html | 22 ++++++++++++++++------ docs/manpages/smb.conf.5 | 19 +++++++++++++------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html index 2f955d910ef..cd75a676ea0 100644 --- a/docs/htmldocs/smb.conf.5.html +++ b/docs/htmldocs/smb.conf.5.html @@ -14381,6 +14381,12 @@ HREF="#AEN79" > section above for reasons why you might want to do this.

    To use the CUPS printing interface set printcap name = cups + .

    On System V systems that use lpstat modules for UNIX services.

    Please note that setting this parameter to + causes problems + with group membership at least on glibc systems, as the character + + is used as a special character for NIS in /etc/group.

    Example: winbind separator = \winbind separator = \\

    Example: winbind separator = +winbind separator = /

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "10 April 2002" "" "" +.TH "SMB.CONF" "5" "15 April 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -2896,7 +2896,7 @@ would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'. .TP -\fBforce directory\fR +\fBforce directory security mode (S)\fR This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box. @@ -5301,6 +5301,9 @@ This parameter may be used to override the compiled-in default printcap name used by the server (usually \fI /etc/printcap\fR). See the discussion of the [printers] section above for reasons why you might want to do this. +To use the CUPS printing interface set \fBprintcap name = cups +\fR\&. + On System V systems that use \fBlpstat\fR to list available printers you can use \fBprintcap name = lpstat \fRto automatically obtain lists of available printers. This @@ -7183,7 +7186,7 @@ again. Default: \fBwinbind cache type = 15\fR .TP -\fBwinbind enum\fR +\fBwinbind enum users\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of users through the @@ -7202,7 +7205,7 @@ usernames. Default: \fBwinbind enum users = yes \fR .TP -\fBwinbind enum\fR +\fBwinbind enum groups\fR On large installations using winbindd(8)it may be necessary to suppress the enumeration of groups through the @@ -7235,9 +7238,13 @@ used when listing a username of the form of \fIDOMAIN is only applicable when using the \fIpam_winbind.so\fR and \fInss_winbind.so\fR modules for UNIX services. -Example: \fBwinbind separator = \\\fR +Please note that setting this parameter to + causes problems +with group membership at least on glibc systems, as the character + +is used as a special character for NIS in /etc/group. + +Example: \fBwinbind separator = \\\\\fR -Example: \fBwinbind separator = +\fR +Example: \fBwinbind separator = /\fR .TP \fBwinbind uid\fR The winbind gid parameter specifies the range of group -- cgit From 1bcb3badd7c1a113b9ce17e1f52430ef9ce650e7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 15 Apr 2002 15:08:58 +0000 Subject: autoconf --- source/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/configure b/source/configure index e4bb7400e21..2b3e6732ff4 100755 --- a/source/configure +++ b/source/configure @@ -1078,7 +1078,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -- cgit From 1676c13cc3810cf3742506adb941c537cbc1781c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 15 Apr 2002 17:34:52 +0000 Subject: Merge tridge's DOS fix from HEAD. Jeremy. --- source/smbd/reply.c | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 8af74856d99..562b0492ca0 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1278,23 +1278,46 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size ****************************************************************************/ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { - int outsize = 0; - SMB_BIG_UINT dfree,dsize,bsize; - START_PROFILE(SMBdskattr); - - conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); - - outsize = set_message(outbuf,5,0,True); + int outsize = 0; + SMB_BIG_UINT dfree,dsize,bsize; + START_PROFILE(SMBdskattr); + + conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize); - SSVAL(outbuf,smb_vwv0,dsize); - SSVAL(outbuf,smb_vwv1,bsize/512); - SSVAL(outbuf,smb_vwv2,512); - SSVAL(outbuf,smb_vwv3,dfree); + outsize = set_message(outbuf,5,0,True); + + if (Protocol <= PROTOCOL_LANMAN2) { + double total_space, free_space; + /* we need to scale this to a number that DOS6 can handle. We + use floating point so we can handle large drives on systems + that don't have 64 bit integers - DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree)); + we end up displaying a maximum of 2G to DOS systems + */ + total_space = dsize * (double)bsize; + free_space = dfree * (double)bsize; - END_PROFILE(SMBdskattr); - return(outsize); + dsize = (total_space+63*512) / (64*512); + dfree = (free_space+63*512) / (64*512); + + if (dsize > 0xFFFF) dsize = 0xFFFF; + if (dfree > 0xFFFF) dfree = 0xFFFF; + + SSVAL(outbuf,smb_vwv0,dsize); + SSVAL(outbuf,smb_vwv1,64); /* this must be 64 for dos systems */ + SSVAL(outbuf,smb_vwv2,512); /* and this must be 512 */ + SSVAL(outbuf,smb_vwv3,dfree); + } else { + SSVAL(outbuf,smb_vwv0,dsize); + SSVAL(outbuf,smb_vwv1,bsize/512); + SSVAL(outbuf,smb_vwv2,512); + SSVAL(outbuf,smb_vwv3,dfree); + } + + DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree)); + + END_PROFILE(SMBdskattr); + return(outsize); } -- cgit From f9879738c6490139af6c2f1ee9c740cab17d1c70 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 15 Apr 2002 17:44:56 +0000 Subject: Add a patch to look up the DMB if the LMB cannot be found. Based on a suggestion from Jürgen Appel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/libsmb/libsmbclient.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index a56d68b279b..ad0861e84f6 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -79,7 +79,7 @@ static pstring smbc_user; * We accept smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] * * smb:// means show all the workgroups - * smb://name/ means, if name<1D> exists, list servers in workgroup, + * smb://name/ means, if name<1D> or name<1B> exists, list servers in workgroup, * else, if name<20> exists, list all shares for server ... */ @@ -1614,8 +1614,11 @@ int smbc_opendir(const char *fname) } /* We have server and share and path empty ... so list the workgroups */ + /* first try to get the LMB for our workgroup, and if that fails, */ + /* try the DMB */ - if (!resolve_name(lp_workgroup(), &rem_ip, 0x1d)) { + if (!(resolve_name(lp_workgroup(), &rem_ip, 0x1d) || + resolve_name(lp_workgroup(), &rem_ip, 0x1b))) { errno = EINVAL; /* Something wrong with smb.conf? */ return -1; @@ -1628,7 +1631,7 @@ int smbc_opendir(const char *fname) if (!name_status_find("*", 0, 0, rem_ip, server)) { - DEBUG(0,("Could not get the name of local master browser for server %s\n", server)); + DEBUG(0,("Could not get the name of local/domain master browser for server %s\n", server)); errno = EINVAL; return -1; @@ -1683,11 +1686,12 @@ int smbc_opendir(const char *fname) } - /* Check to see if <1D> translates, or <20> translates */ + /* Check to see if <1D>, <1B>, or <20> translates */ /* However, we check to see if is an IP address first */ if (!is_ipaddress(server) && /* Not an IP addr so check next */ - resolve_name(server, &rem_ip, 0x1d)) { /* Found LMB */ + (resolve_name(server, &rem_ip, 0x1d) || /* Found LMB */ + resolve_name(server, &rem_ip, 0x1b) )) { /* Found DMB */ pstring buserver; smbc_file_table[slot]->dir_type = SMBC_SERVER; @@ -1699,7 +1703,7 @@ int smbc_opendir(const char *fname) if (!name_status_find("*", 0, 0, rem_ip, buserver)) { - DEBUG(0, ("Could not get name of local master browser for server %s\n", server)); + DEBUG(0, ("Could not get name of local/domain master browser for server %s\n", server)); errno = EPERM; /* FIXME, is this correct */ return -1; -- cgit From f2155aa3f4608b14777092002c39358b816dbea5 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 15 Apr 2002 23:33:09 +0000 Subject: Stubs for connect, domain, user, group and alias policy objects. Wrote samr connect fn. --- source/python/py_samr.c | 241 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 202 insertions(+), 39 deletions(-) diff --git a/source/python/py_samr.c b/source/python/py_samr.c index 2271cb44649..9a19f9abd56 100644 --- a/source/python/py_samr.c +++ b/source/python/py_samr.c @@ -23,20 +23,6 @@ #include "python/py_samr.h" -PyObject *new_samr_connect_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol) -{ - samr_connect_hnd_object *o; - - o = PyObject_New(samr_connect_hnd_object, &samr_connect_hnd_type); - - o->cli = cli; - o->mem_ctx = mem_ctx; - memcpy(&o->pol, pol, sizeof(POLICY_HND)); - - return (PyObject*)o; -} - /* * Exceptions raised by this module */ @@ -48,20 +34,22 @@ PyObject *samr_ntstatus; /* This exception is raised when a RPC call returns a status code other than NT_STATUS_OK */ +/* SAMR connect handle object */ + static void py_samr_connect_hnd_dealloc(PyObject* self) { PyObject_Del(self); } -#if 0 +static PyMethodDef samr_connect_methods[] = { + { NULL } +}; static PyObject *py_samr_connect_hnd_getattr(PyObject *self, char *attrname) { return Py_FindMethod(samr_connect_methods, self, attrname); } -#endif - PyTypeObject samr_connect_hnd_type = { PyObject_HEAD_INIT(NULL) 0, @@ -70,7 +58,7 @@ PyTypeObject samr_connect_hnd_type = { 0, py_samr_connect_hnd_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ -// py_samr_connect_hnd_getattr, /*tp_getattr*/ + py_samr_connect_hnd_getattr, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ @@ -80,15 +68,45 @@ PyTypeObject samr_connect_hnd_type = { 0, /*tp_hash */ }; +PyObject *new_samr_connect_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_connect_hnd_object *o; + + o = PyObject_New(samr_connect_hnd_object, &samr_connect_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +/* SAMR domain handle object */ + +static void py_samr_domain_hnd_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +static PyMethodDef samr_domain_methods[] = { + { NULL } +}; + +static PyObject *py_samr_domain_hnd_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(samr_domain_methods, self, attrname); +} + PyTypeObject samr_domain_hnd_type = { PyObject_HEAD_INIT(NULL) 0, "SAMR Domain Handle", - sizeof(samr_connect_hnd_object), + sizeof(samr_domain_hnd_object), 0, - py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + py_samr_domain_hnd_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ -// py_samr_connect_hnd_getattr, /*tp_getattr*/ + py_samr_domain_hnd_getattr, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ @@ -98,15 +116,45 @@ PyTypeObject samr_domain_hnd_type = { 0, /*tp_hash */ }; +PyObject *new_samr_domain_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_domain_hnd_object *o; + + o = PyObject_New(samr_domain_hnd_object, &samr_domain_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +/* SAMR user handle object */ + +static void py_samr_user_hnd_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +static PyMethodDef samr_user_methods[] = { + { NULL } +}; + +static PyObject *py_samr_user_hnd_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(samr_user_methods, self, attrname); +} + PyTypeObject samr_user_hnd_type = { PyObject_HEAD_INIT(NULL) 0, "SAMR User Handle", - sizeof(samr_connect_hnd_object), + sizeof(samr_user_hnd_object), 0, - py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + py_samr_user_hnd_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ -// py_samr_connect_hnd_getattr, /*tp_getattr*/ + py_samr_user_hnd_getattr, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ @@ -116,15 +164,45 @@ PyTypeObject samr_user_hnd_type = { 0, /*tp_hash */ }; +PyObject *new_samr_user_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_user_hnd_object *o; + + o = PyObject_New(samr_user_hnd_object, &samr_user_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +/* SAMR group handle object */ + +static void py_samr_group_hnd_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +static PyMethodDef samr_group_methods[] = { + { NULL } +}; + +static PyObject *py_samr_group_hnd_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(samr_group_methods, self, attrname); +} + PyTypeObject samr_group_hnd_type = { PyObject_HEAD_INIT(NULL) 0, "SAMR Group Handle", - sizeof(samr_connect_hnd_object), + sizeof(samr_group_hnd_object), 0, - py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + py_samr_group_hnd_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ -// py_samr_connect_hnd_getattr, /*tp_getattr*/ + py_samr_group_hnd_getattr, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ @@ -134,15 +212,45 @@ PyTypeObject samr_group_hnd_type = { 0, /*tp_hash */ }; +PyObject *new_samr_group_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_group_hnd_object *o; + + o = PyObject_New(samr_group_hnd_object, &samr_group_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +/* Alias handle object */ + +static void py_samr_alias_hnd_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +static PyMethodDef samr_alias_methods[] = { + { NULL } +}; + +static PyObject *py_samr_alias_hnd_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(samr_alias_methods, self, attrname); +} + PyTypeObject samr_alias_hnd_type = { PyObject_HEAD_INIT(NULL) 0, "SAMR Alias Handle", - sizeof(samr_connect_hnd_object), + sizeof(samr_alias_hnd_object), 0, - py_samr_connect_hnd_dealloc, /*tp_dealloc*/ + py_samr_alias_hnd_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ -// py_samr_connect_hnd_getattr, /*tp_getattr*/ + py_samr_alias_hnd_getattr, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ @@ -152,24 +260,79 @@ PyTypeObject samr_alias_hnd_type = { 0, /*tp_hash */ }; +PyObject *new_samr_alias_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) +{ + samr_alias_hnd_object *o; + + o = PyObject_New(samr_alias_hnd_object, &samr_alias_hnd_type); + + o->cli = cli; + o->mem_ctx = mem_ctx; + memcpy(&o->pol, pol, sizeof(POLICY_HND)); + + return (PyObject*)o; +} + +static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw) +{ + static char *kwlist[] = { "server", "creds", "access", NULL }; + uint32 desired_access = MAXIMUM_ALLOWED_ACCESS; + char *server_name; + struct cli_state *cli; + POLICY_HND hnd; + TALLOC_CTX *mem_ctx; + PyObject *result = NULL, *creds = NULL; + NTSTATUS ntstatus; + + if (!PyArg_ParseTupleAndKeywords( + args, kw, "s|O!i", kwlist, &server_name, &PyDict_Type, + &creds, &desired_access)) + return NULL; + + if (!(cli = open_pipe_creds(server_name, creds, cli_samr_initialise, + NULL))) { + + /* Error state set in open_pipe_creds() */ + + goto done; + } + + if (!(mem_ctx = talloc_init())) { + PyErr_SetString(samr_ntstatus, + "unable to initialise talloc context\n"); + goto done; + } + + ntstatus = cli_samr_connect(cli, mem_ctx, desired_access, &hnd); + + if (!NT_STATUS_IS_OK(ntstatus)) { + cli_shutdown(cli); + SAFE_FREE(cli); + PyErr_SetObject(samr_ntstatus, py_ntstatus_tuple(ntstatus)); + goto done; + } + + result = new_samr_connect_hnd_object(cli, mem_ctx, &hnd); + +done: + return result; +} + +/* + * Module initialisation + */ + static PyMethodDef samr_methods[] = { /* Open/close samr connect handles */ -#if 0 - { "connect", lsa_open_policy, METH_VARARGS | METH_KEYWORDS, + { "connect", samr_connect, METH_VARARGS | METH_KEYWORDS, "Open a connect handle" }, - { "close", lsa_close, METH_VARARGS, "Close a policy handle" }, -#endif - { NULL } }; -/* - * Module initialisation -*/ - void initsamr(void) { PyObject *module, *dict; -- cgit From e75e4ad7d3af5beee48b3001fd904eede8df033f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Apr 2002 23:48:39 +0000 Subject: make sure that we leave the tree unused after disconnecting --- source/smbd/service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/smbd/service.c b/source/smbd/service.c index 9ca44b65c38..467bab4a0ac 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -750,5 +750,9 @@ void close_cnum(connection_struct *conn, uint16 vuid) standard_sub_conn(conn,cmd); smbrun(cmd,NULL); } + + /* make sure we leave the directory available for unmount */ + vfs_ChDir(conn, "/"); + conn_free(conn); } -- cgit From b5fbf4776038b0402fc64cfea0472ae859a0d526 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 15 Apr 2002 23:56:20 +0000 Subject: make sure that we leave the tree unused after disconnecting (tridge) from HEAD. Jeremy. --- source/smbd/service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/smbd/service.c b/source/smbd/service.c index e89fd085339..2868c949fff 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -713,6 +713,10 @@ void close_cnum(connection_struct *conn, uint16 vuid) standard_sub_conn(conn,cmd); smbrun(cmd,NULL); } + + /* make sure we leave the directory available for unmount */ + vfs_ChDir(conn, "/"); + conn_free(conn); } -- cgit From f69a4f0c98773660b2f63b098ee064a2261b25a4 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 16 Apr 2002 04:35:43 +0000 Subject: Created separate daemon control files for Winbindd. --- packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl | 4 +- packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl | 2 + packaging/Caldera/OpenLinux/samba2.spec-team.tmpl | 2 + packaging/Caldera/OpenLinux/winbind.daemon | 5 + packaging/Caldera/OpenLinux/winbind.init | 132 ++++++++++++++++++++++ 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 packaging/Caldera/OpenLinux/winbind.daemon create mode 100755 packaging/Caldera/OpenLinux/winbind.init diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl index 737f91aefcd..b3dd07325ef 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl @@ -350,6 +350,7 @@ cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser cp -p $VVS/findsmb $DESTDIR/usr/bin cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/samba.winbind $DESTDIR/etc/sysconfig/daemons/winbind cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt @@ -358,7 +359,8 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt #lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba -install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name} +install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/samba +install -m 755 $VVS/winbind.init $DESTDIR/%{SVIdir}/winbind ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin for f in testparm testprns; do diff --git a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl index 756633e9310..9be6412dfca 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl @@ -348,6 +348,7 @@ cp -p $VVS/smbusers $DESTDIR%{EtcSamba} cp -p $VVS/smbprint $DESTDIR/usr/bin cp -p $VVS/findsmb $DESTDIR/usr/bin cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt @@ -357,6 +358,7 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name} #lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba +#lsb: cp -p $VVS/winbind.init $DESTDIR/etc/rc.d/init.d/winbind ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin diff --git a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl index ef9564ceef2..35f976050b8 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl @@ -349,6 +349,7 @@ cp -p $VVS/smbusers $DESTDIR%{EtcSamba} cp -p $VVS/smbprint $DESTDIR/usr/bin cp -p $VVS/findsmb $DESTDIR/usr/bin cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt @@ -357,6 +358,7 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name} +install -m 755 $VVS/winbind.init $DESTDIR/%{SVIdir}/winbind #lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin diff --git a/packaging/Caldera/OpenLinux/winbind.daemon b/packaging/Caldera/OpenLinux/winbind.daemon new file mode 100644 index 00000000000..a09914e6051 --- /dev/null +++ b/packaging/Caldera/OpenLinux/winbind.daemon @@ -0,0 +1,5 @@ +IDENT=winbind +DESCRIPTIVE="Winbind server processes (samba)" +CONFIGURED="no" +ONBOOT="no" +OPTIONS_WINBD="" diff --git a/packaging/Caldera/OpenLinux/winbind.init b/packaging/Caldera/OpenLinux/winbind.init new file mode 100755 index 00000000000..96a3026d836 --- /dev/null +++ b/packaging/Caldera/OpenLinux/winbind.init @@ -0,0 +1,132 @@ +#!/bin/bash +# +# +### BEGIN INIT INFO +# Provides: $winbind +# Required-Start: $network $samba +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: samba +# Starts and stops the Samba smbd and nmbd daemons +# used to provide SMB network services. +### END INIT INFO +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for OpenLinux by Raymund Will +# Adapted for samba by Klaus Singvogel + +NAME_W=winbindd +DAEMON_W=/usr/sbin/$NAME_W + +config_file=/etc/samba.d/smb.conf + +# Source function library (and set vital variables). +. @SVIdir@/functions + +status() { + [ -e $1 ] || return 3; # lock / pid file doesn't exist, seems to be stopped + + i=`cat "$1"` + state=`egrep '^State' /proc/$i/status 2>/dev/null| sed 's#.* \(.\).*#\1#'` + if [ x$state = x -o x$state = xZ ]; then + return 2 # no such process (or zombie) --> dead + fi + return 0 # seems to be up and running +} + +# this function is dedicated to Jan Terpstra. -- Klaus Singvogel, Sep. 2001. +WinbdConfig() { + # returns 0 if winbindd is not configured, + # and 1 if winbindd is configured. + + local config_file=$1; shift # file to check + + # check if "winbind uid" is set in samba config file + egrep -q '[^#]*winbind uid' $config_file || return 0 + + found=0; + # We also need to check if least one PAM module control file does + # NOT have pam_winbind.so commented out + for i in /etc/pam.d/*; do + if [ ! -f $i ]; then next; fi + egrep -q '[^#]*pam_winbind.so' $i && found=1 && break; + done + + if [ $found != 0 ]; then + # if so, ensure that in /etc/nsswitch.conf we have for + # "passwd", "shadow", "group" an entry for "winbind" + egrep -q '^passwd:.*winbind' /etc/nsswitch.conf && return 1 + egrep -q '^shadow:.*winbind' /etc/nsswitch.conf && return 1 + egrep -q '^group:.*winbind' /etc/nsswitch.conf && return 1 + fi + + return 0 +} + +case "$1" in + start) + [ ! -e $SVIlock ] || exit 0 + [ -x $DAEMON_W ] || exit 5 + SVIemptyConfig $config_file && exit 6 + + echo -n "Starting $SVIsubsys services: " + WinbdConfig $config_file || ssd -S -n $NAME_W -x $DAEMON_W -- $OPTIONS_WINBD + ret=$? + + echo "." + touch $SVIlock + ;; + + stop) + [ -e $SVIlock ] || exit 0 + + echo -n "Stopping $SVIsubsys services: " + ssd -K -p /var/lock/samba.d/$NAME_W.pid -n $NAME_W #-x $DAEMON_W + + ret=$? + + echo "." + rm -f $SVIlock + ;; + + force-reload) + [ -e $SVIlock ] || exit 0 + $0 restart + ret=$? + ;; + + reload) + echo -n "Reloading $SVIsubsys service configuration: " + # nmbd has no config file to reload + ssd -K --signal 1 -p /var/lock/samba.d/$NAME_W.pid -n $NAME_W #-x $DAEMON_W + ret=$? + echo "." + ;; + + restart) + $0 stop + $0 start + ret=$? + ;; + + status) + echo -n "Checking status of $SVIsubsys service: " + status /var/lock/samba.d/$NAME_W.pid + ret=$? + if [ $ret -eq 0 ]; then + echo -n "$NAME_W " + fi + echo "." + ;; + + *) + echo "Usage: $SVIscript {start|stop|restart|force-reload|reload|status}" + ret=2 + ;; + +esac + +exit $ret + -- cgit From d81f3e52227c353db77a41a114479f6746fe9f78 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 16 Apr 2002 04:38:53 +0000 Subject: Fix typo just introduced. Argh! --- packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl index b3dd07325ef..fe7add28b94 100644 --- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl +++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl @@ -350,7 +350,7 @@ cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser cp -p $VVS/findsmb $DESTDIR/usr/bin cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba -cp -p $VVS/samba.winbind $DESTDIR/etc/sysconfig/daemons/winbind +cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt -- cgit From 236b7b27d147fed8aff049c15c764183f34411ab Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 16 Apr 2002 04:49:07 +0000 Subject: Updating the way the winbindd is handled in samba init script. Do NOT start a second instance of winbindd if it is running. --- packaging/Caldera/OpenLinux/samba.init-lsb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packaging/Caldera/OpenLinux/samba.init-lsb b/packaging/Caldera/OpenLinux/samba.init-lsb index 615e17b21fc..80913c3340e 100755 --- a/packaging/Caldera/OpenLinux/samba.init-lsb +++ b/packaging/Caldera/OpenLinux/samba.init-lsb @@ -40,7 +40,6 @@ status() { return 0 # seems to be up and running } -# this function is dedicated to Jan Terpstra. -- Klaus Singvogel, Sep. 2001. WinbdConfig() { # returns 0 if winbindd is not configured, # and 1 if winbindd is configured. @@ -77,7 +76,7 @@ case "$1" in echo -n "Starting $SVIsubsys services: " ssd -S -n $NAME_S -x $DAEMON_S -- $OPTIONS_SMB - WinbdConfig $config_file || ssd -S -n $NAME_W -x $DAEMON_W -- $OPTIONS_WINBD + WinbdConfig $config_file || SVIstatus winbindd || ssd -S -n $NAME_W -x $DAEMON_W -- $OPTIONS_WINBD ssd -S -n $NAME_N -x $DAEMON_N -- $OPTIONS_NMB ret=$? -- cgit From 238fed854b252edfb9749eb9afbf34773a889e51 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 16 Apr 2002 05:52:22 +0000 Subject: An attempt at a safer smbprint script. It puts things into environment variables, There is still a race here, but at least the info is not on the command line for a long time. --- examples/printing/smbprint.safer | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100755 examples/printing/smbprint.safer diff --git a/examples/printing/smbprint.safer b/examples/printing/smbprint.safer new file mode 100755 index 00000000000..79a879badc5 --- /dev/null +++ b/examples/printing/smbprint.safer @@ -0,0 +1,147 @@ +#!/bin/sh + +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /usr/var/spool/lpd/PRINTNAME/.config file. +# +# Script further modified by Richard Sharpe to fix some things. +# Get rid of the -x on the first line, and add parameters +# +# -t now causes translate to be used when sending files +# +# Further modifications by Alfred Perlstein to fix some problems and +# improve the quality of the code (3-Dec-2001). +# +# More hacking by Richard Sharpe to improve portability. 9-Dec-2001. +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# server=PC_SERVER +# service=PR_SHARENAME +# password="password" +# +# E.g. +# server=PAULS_PC +# service=CJET_371 +# password="" + +#smbclient=/usr/pkg/bin/smbclient +# Assume that smbclient will be in the same place as smbprint + +smbclient="`dirname $0`/smbclient" + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +TRANS=0 +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# server +# service +# password +# username (optional) +# IP (optional) +# debug (optional) +# debugsmb (optional) +# debugfile (optional) +. $config_file + +password_flag="" +if [ "x$password" = "x" ] ; then + password_flag="-N" +else + export PASSWD=$password +fi + +if [ "x$username" == "x" ] ; then + username="$server"; +fi + +while test $# -gt 0; do + case "$1" in + -t) + TRANS=1 + ;; + + *) # Bad Parameters, ignore them ... + ;; + esac + shift +done + +command="print - ;" +if [ $TRANS -eq 1 ]; then + command="translate;$command"; +fi + +debugfile="/tmp/smb-print.log" +if [ "x$debug" = "x" ] ; then + debugfile=/dev/null debugargs= +else + if [ $debug -eq 0 ] ; then + debugfile=/dev/null debugargs= + else + set -x; exec >>$debugfile 2>&1 + debugargs="$debugfile." + #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb" + fi +fi + +if [ "x$smbconf" != "x" ]; then + + smbconf="-s $smbconf" + +fi + +if [ "x$IP" != "x" ]; then + + IP="-I $IP" + +fi + +if [ "x$debugargs" != "x" ]; then + + debugargs="-l $debugargs" + +fi +export USER=$username +$smbclient \ + "\\\\$server\\$service" \ + $password_flag \ + $smbconf \ + $IP \ + $debugargs \ + -P \ + -c "$command" +# -- cgit From a877eae24becad9e0cd5b33ffe0916a20d5ba227 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 06:15:28 +0000 Subject: make sure we don't walk past the end of the current SMB buffer when pulling a string this might explain a serious filename corruption bug that Quantum QA spotted --- source/smbd/ipc.c | 2 +- source/smbd/message.c | 8 ++++---- source/smbd/nttrans.c | 17 ++++++++--------- source/smbd/pipes.c | 2 +- source/smbd/reply.c | 42 +++++++++++++++++++++--------------------- source/smbd/sesssetup.c | 14 +++++--------- source/smbd/srvstr.c | 9 +++++++++ 7 files changed, 49 insertions(+), 45 deletions(-) diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index c2f3b7b2f0b..91b221968f2 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -375,7 +375,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int START_PROFILE(SMBtrans); memset(name, '\0',sizeof(name)); - srvstr_pull(inbuf, name, smb_buf(inbuf), sizeof(name), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, name, smb_buf(inbuf), sizeof(name), STR_TERMINATE); if (dscnt > tdscnt || pscnt > tpscnt) { exit_server("invalid trans parameters"); diff --git a/source/smbd/message.c b/source/smbd/message.c index 971834c012c..c2eb16c99e2 100644 --- a/source/smbd/message.c +++ b/source/smbd/message.c @@ -118,8 +118,8 @@ int reply_sends(connection_struct *conn, outsize = set_message(outbuf,0,0,True); p = smb_buf(inbuf)+1; - p += srvstr_pull(inbuf, msgfrom, p, sizeof(msgfrom), -1, STR_TERMINATE) + 1; - p += srvstr_pull(inbuf, msgto, p, sizeof(msgto), -1, STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, msgfrom, p, sizeof(msgfrom), STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, msgto, p, sizeof(msgto), STR_TERMINATE) + 1; msg = p; @@ -160,8 +160,8 @@ int reply_sendstrt(connection_struct *conn, msgpos = 0; p = smb_buf(inbuf)+1; - p += srvstr_pull(inbuf, msgfrom, p, sizeof(msgfrom), -1, STR_TERMINATE) + 1; - p += srvstr_pull(inbuf, msgto, p, sizeof(msgto), -1, STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, msgfrom, p, sizeof(msgfrom), STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, msgto, p, sizeof(msgto), STR_TERMINATE) + 1; DEBUG( 3, ( "SMBsendstrt (from %s to %s)\n", msgfrom, msgto ) ); diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index edee14513c8..4dec0069f85 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -502,7 +502,7 @@ static int do_ntcreate_pipe_open(connection_struct *conn, int pnum = -1; char *p = NULL; - srvstr_pull(inbuf, fname, smb_buf(inbuf), sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0) return ret; @@ -609,7 +609,7 @@ int reply_ntcreate_and_X(connection_struct *conn, * Check to see if this is a mac fork of some kind. */ - srvstr_pull(inbuf, fname, smb_buf(inbuf), sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); if( strchr_m(fname, ':')) { END_PROFILE(SMBntcreateX); @@ -635,10 +635,9 @@ int reply_ntcreate_and_X(connection_struct *conn, dir_name_len++; } - srvstr_pull(inbuf, &fname[dir_name_len], smb_buf(inbuf), sizeof(fname)-dir_name_len, - -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, &fname[dir_name_len], smb_buf(inbuf), sizeof(fname)-dir_name_len, STR_TERMINATE); } else { - srvstr_pull(inbuf, fname, smb_buf(inbuf), sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); } /* @@ -880,7 +879,7 @@ static int do_nt_transact_create_pipe( connection_struct *conn, return ERROR_DOS(ERRDOS,ERRbadaccess); } - srvstr_pull(inbuf, fname, params+53, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0) return ret; @@ -1096,7 +1095,7 @@ static int call_nt_transact_create(connection_struct *conn, * Check to see if this is a mac fork of some kind. */ - srvstr_pull(inbuf, fname, params+53, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); if( strchr_m(fname, ':')) { return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); @@ -1122,9 +1121,9 @@ static int call_nt_transact_create(connection_struct *conn, } srvstr_pull(inbuf, &fname[dir_name_len], params+53, sizeof(fname)-dir_name_len, - -1, STR_TERMINATE); + total_parameter_count-53, STR_TERMINATE); } else { - srvstr_pull(inbuf, fname, params+53, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); } /* diff --git a/source/smbd/pipes.c b/source/smbd/pipes.c index 6c1e6efa735..f7e9c595c13 100644 --- a/source/smbd/pipes.c +++ b/source/smbd/pipes.c @@ -50,7 +50,7 @@ int reply_open_pipe_and_X(connection_struct *conn, int i; /* XXXX we need to handle passed times, sattr and flags */ - srvstr_pull(inbuf, pipe_name, smb_buf(inbuf), sizeof(pipe_name), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, pipe_name, smb_buf(inbuf), sizeof(pipe_name), STR_TERMINATE); /* If the name doesn't start \PIPE\ then this is directed */ /* at a mailslot or something we really, really don't understand, */ diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 60b1d13417c..0ccdf7c241b 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -163,10 +163,10 @@ int reply_tcon(connection_struct *conn, *service = *password = *dev = 0; p = smb_buf(inbuf)+1; - p += srvstr_pull(inbuf, service, p, sizeof(service), -1, STR_TERMINATE) + 1; - pwlen = srvstr_pull(inbuf, password, p, sizeof(password), -1, STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, service, p, sizeof(service), STR_TERMINATE) + 1; + pwlen = srvstr_pull_buf(inbuf, password, p, sizeof(password), STR_TERMINATE) + 1; p += pwlen; - p += srvstr_pull(inbuf, dev, p, sizeof(dev), -1, STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, dev, p, sizeof(dev), STR_TERMINATE) + 1; p = strrchr_m(service,'\\'); if (p) { @@ -233,7 +233,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt } p = smb_buf(inbuf) + passlen; - p += srvstr_pull(inbuf, path, p, sizeof(path), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE); /* * the service name can be either: \\server\share @@ -377,7 +377,7 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size SMB_STRUCT_STAT sbuf; START_PROFILE(SMBchkpth); - srvstr_pull(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), STR_TERMINATE); RESOLVE_DFSPATH(name, conn, inbuf, outbuf); @@ -429,7 +429,7 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size START_PROFILE(SMBgetatr); p = smb_buf(inbuf) + 1; - p += srvstr_pull(inbuf, fname, p, sizeof(fname), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, fname, p, sizeof(fname), STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -505,7 +505,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size START_PROFILE(SMBsetatr); p = smb_buf(inbuf) + 1; - p += srvstr_pull(inbuf, fname, p, sizeof(fname), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, fname, p, sizeof(fname), STR_TERMINATE); unix_convert(fname,conn,0,&bad_path,&sbuf); mode = SVAL(inbuf,smb_vwv0); @@ -625,7 +625,7 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size maxentries = SVAL(inbuf,smb_vwv0); dirtype = SVAL(inbuf,smb_vwv1); p = smb_buf(inbuf) + 1; - p += srvstr_pull(inbuf, path, p, sizeof(path), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE); p++; status_len = SVAL(p, 0); p += 2; @@ -806,7 +806,7 @@ int reply_fclose(connection_struct *conn, char *inbuf,char *outbuf, int dum_size outsize = set_message(outbuf,1,0,True); p = smb_buf(inbuf) + 1; - p += srvstr_pull(inbuf, path, p, sizeof(path), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE); p++; status_len = SVAL(p,0); p += 2; @@ -854,7 +854,7 @@ int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, share_mode = SVAL(inbuf,smb_vwv0); - srvstr_pull(inbuf, fname, smb_buf(inbuf)+1, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf)+1, sizeof(fname), STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -944,7 +944,7 @@ int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt } /* XXXX we need to handle passed times, sattr and flags */ - srvstr_pull(inbuf, fname, smb_buf(inbuf), sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -1063,7 +1063,7 @@ int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, com = SVAL(inbuf,smb_com); createmode = SVAL(inbuf,smb_vwv0); - srvstr_pull(inbuf, fname, smb_buf(inbuf) + 1, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf) + 1, sizeof(fname), STR_TERMINATE); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -1135,7 +1135,7 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, START_PROFILE(SMBctemp); createmode = SVAL(inbuf,smb_vwv0); - srvstr_pull(inbuf, fname, smb_buf(inbuf)+1, sizeof(fname), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf)+1, sizeof(fname), STR_TERMINATE); pstrcat(fname,"\\TMXXXXXX"); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -1393,7 +1393,7 @@ int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size dirtype = SVAL(inbuf,smb_vwv0); - srvstr_pull(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), STR_TERMINATE); RESOLVE_DFSPATH(name, conn, inbuf, outbuf); @@ -2742,7 +2742,7 @@ int reply_mkdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, NTSTATUS status; START_PROFILE(SMBmkdir); - srvstr_pull(inbuf, directory, smb_buf(inbuf) + 1, sizeof(directory), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, directory, smb_buf(inbuf) + 1, sizeof(directory), STR_TERMINATE); status = mkdir_internal(conn, directory); if (!NT_STATUS_IS_OK(status)) @@ -2903,7 +2903,7 @@ int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, SMB_STRUCT_STAT sbuf; START_PROFILE(SMBrmdir); - srvstr_pull(inbuf, directory, smb_buf(inbuf) + 1, sizeof(directory), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, directory, smb_buf(inbuf) + 1, sizeof(directory), STR_TERMINATE); RESOLVE_DFSPATH(directory, conn, inbuf, outbuf) @@ -3264,9 +3264,9 @@ int reply_mv(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, START_PROFILE(SMBmv); p = smb_buf(inbuf) + 1; - p += srvstr_pull(inbuf, name, p, sizeof(name), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, name, p, sizeof(name), STR_TERMINATE); p++; - p += srvstr_pull(inbuf, newname, p, sizeof(newname), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, newname, p, sizeof(newname), STR_TERMINATE); RESOLVE_DFSPATH(name, conn, inbuf, outbuf); RESOLVE_DFSPATH(newname, conn, inbuf, outbuf); @@ -3396,8 +3396,8 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, *directory = *mask = 0; p = smb_buf(inbuf); - p += srvstr_pull(inbuf, name, p, sizeof(name), -1, STR_TERMINATE); - p += srvstr_pull(inbuf, newname, p, sizeof(newname), -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, name, p, sizeof(name), STR_TERMINATE); + p += srvstr_pull_buf(inbuf, newname, p, sizeof(newname), STR_TERMINATE); DEBUG(3,("reply_copy : %s -> %s\n",name,newname)); @@ -3549,7 +3549,7 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size return ERROR_DOS(ERRDOS,ERRnoaccess); } - srvstr_pull(inbuf, newdir, smb_buf(inbuf) + 1, sizeof(newdir), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, newdir, smb_buf(inbuf) + 1, sizeof(newdir), STR_TERMINATE); if (strlen(newdir) == 0) { ok = True; diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 270a69d96ad..8b9d826067f 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -611,7 +611,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, plaintext_password.data[passlen1] = 0; } - srvstr_pull(inbuf, user, smb_buf(inbuf)+passlen1, sizeof(user), -1, STR_TERMINATE); + srvstr_pull_buf(inbuf, user, smb_buf(inbuf)+passlen1, sizeof(user), STR_TERMINATE); *domain = 0; } else { @@ -674,14 +674,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, } p += passlen1 + passlen2; - p += srvstr_pull(inbuf, user, p, sizeof(user), -1, - STR_TERMINATE); - p += srvstr_pull(inbuf, domain, p, sizeof(domain), - -1, STR_TERMINATE); - p += srvstr_pull(inbuf, native_os, p, sizeof(native_os), - -1, STR_TERMINATE); - p += srvstr_pull(inbuf, native_lanman, p, sizeof(native_lanman), - -1, STR_TERMINATE); + p += srvstr_pull_buf(inbuf, user, p, sizeof(user), STR_TERMINATE); + p += srvstr_pull_buf(inbuf, domain, p, sizeof(domain), STR_TERMINATE); + p += srvstr_pull_buf(inbuf, native_os, p, sizeof(native_os), STR_TERMINATE); + p += srvstr_pull_buf(inbuf, native_lanman, p, sizeof(native_lanman), STR_TERMINATE); DEBUG(3,("Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n", domain,native_os,native_lanman)); } diff --git a/source/smbd/srvstr.c b/source/smbd/srvstr.c index 90da422f133..36fecf5bd2e 100644 --- a/source/smbd/srvstr.c +++ b/source/smbd/srvstr.c @@ -30,3 +30,12 @@ int srvstr_pull(void *base_ptr, char *dest, const void *src, int dest_len, int s { return pull_string(base_ptr, dest, src, dest_len, src_len, flags); } + +/* pull a string from the smb_buf part of a packet. In this case the + string can either be null terminated or it can be terminated by the + end of the smbbuf area +*/ +int srvstr_pull_buf(void *inbuf, char *dest, const void *src, int dest_len, int flags) +{ + return pull_string(inbuf, dest, src, dest_len, smb_bufrem(inbuf, src), flags); +} -- cgit From bac0093a9713416b1679d1bc167b70f02b06ef78 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 10:40:23 +0000 Subject: i forgot to commit these parts of the string handling patch earlier. Sorry. --- source/include/smb_macros.h | 5 ++++- source/lib/charcnv.c | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index c19be784a18..27a59616512 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -169,9 +169,12 @@ #define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 ) /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ -#define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2) +#define smb_buf(buf) ((buf) + smb_size + CVAL(buf,smb_wct)*2) #define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2)) +/* the remaining number of bytes in smb buffer 'buf' from pointer 'p'. */ +#define smb_bufrem(buf, p) (smb_buflen(buf)-PTR_DIFF(p, smb_buf(buf))) + /* Note that chain_size must be available as an extern int to this macro. */ #define smb_offset(p,buf) (PTR_DIFF(p,buf+4) + chain_size) diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index cdfca8eb97d..be7701237e3 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -354,7 +354,7 @@ int pull_ascii(char *dest, const void *src, int dest_len, int src_len, int flags dest_len = sizeof(pstring); } - if (flags & STR_TERMINATE) src_len = strlen(src)+1; + if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen(src)+1; ret = convert_string(CH_DOS, CH_UNIX, src, src_len, dest, dest_len); @@ -525,7 +525,7 @@ copy a string from a ucs2 source to a unix char* destination flags can have: STR_TERMINATE means the string in src is null terminated STR_NOALIGN means don't try to align -if STR_TERMINATE is set then src_len is ignored +if STR_TERMINATE is set then src_len is ignored if it is -1 src_len is the length of the source area in bytes return the number of bytes occupied by the string in src the resulting string in "dest" is always null terminated @@ -543,7 +543,7 @@ int pull_ucs2(const void *base_ptr, char *dest, const void *src, int dest_len, i if (src_len > 0) src_len--; } - if (flags & STR_TERMINATE) src_len = strlen_w(src)*2+2; + if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen_w(src)*2+2; /* ucs2 is always a multiple of 2 bytes */ src_len &= ~1; @@ -609,7 +609,7 @@ int pull_utf8(char *dest, const void *src, int dest_len, int src_len, int flags) dest_len = sizeof(pstring); } - if (flags & STR_TERMINATE) src_len = strlen(src)+1; + if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen(src)+1; ret = convert_string(CH_UTF8, CH_UNIX, src, src_len, dest, dest_len); if (dest_len) dest[MIN(ret, dest_len-1)] = 0; @@ -687,7 +687,7 @@ flags can have: STR_UNICODE means to force as unicode STR_ASCII use ascii even with unicode packet STR_NOALIGN means don't do alignment -if STR_TERMINATE is set then src_len is ignored +if STR_TERMINATE is set then src_len is ignored is it is -1 src_len is the length of the source area in bytes return the number of bytes occupied by the string in src the resulting string in "dest" is always null terminated -- cgit From dbc6b137a83cf9fe0558625dd32f92f15296fba6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 12:07:12 +0000 Subject: fixed the handling of STR_TERMINATE --- source/configure.in | 2 +- source/lib/charcnv.c | 24 +++++++++++++++++++++--- source/lib/util_str.c | 12 ++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/source/configure.in b/source/configure.in index bbfdc2e382a..91ea0ff99e2 100644 --- a/source/configure.in +++ b/source/configure.in @@ -601,7 +601,7 @@ else RUNPROG="" fi -AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64) +AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64) AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid) AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index be7701237e3..803cda36c83 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -354,7 +354,13 @@ int pull_ascii(char *dest, const void *src, int dest_len, int src_len, int flags dest_len = sizeof(pstring); } - if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen(src)+1; + if (flags & STR_TERMINATE) { + if (src_len == -1) { + src_len = strlen(src)+1; + } else { + src_len = strnlen(src, src_len) + 1; + } + } ret = convert_string(CH_DOS, CH_UNIX, src, src_len, dest, dest_len); @@ -543,7 +549,13 @@ int pull_ucs2(const void *base_ptr, char *dest, const void *src, int dest_len, i if (src_len > 0) src_len--; } - if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen_w(src)*2+2; + if (flags & STR_TERMINATE) { + if (src_len == -1) { + src_len = strlen_w(src)*2+2; + } else { + src_len = strnlen_w(src, src_len/2)*2+2; + } + } /* ucs2 is always a multiple of 2 bytes */ src_len &= ~1; @@ -609,7 +621,13 @@ int pull_utf8(char *dest, const void *src, int dest_len, int src_len, int flags) dest_len = sizeof(pstring); } - if (src_len == -1 && (flags & STR_TERMINATE)) src_len = strlen(src)+1; + if (flags & STR_TERMINATE) { + if (src_len == -1) { + src_len = strlen(src)+1; + } else { + src_len = strnlen(src, src_len) + 1; + } + } ret = convert_string(CH_UTF8, CH_UNIX, src, src_len, dest, dest_len); if (dest_len) dest[MIN(ret, dest_len-1)] = 0; diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 6fdca658cd5..9a841a36b3e 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1001,3 +1001,15 @@ some platforms don't have strndup return ret; } #endif + +#ifndef HAVE_STRNLEN +/******************************************************************* +some platforms don't have strndup +********************************************************************/ + size_t strnlen(const char *s, size_t n) +{ + int i; + for (i=0; s[i] && i Date: Tue, 16 Apr 2002 12:24:42 +0000 Subject: reran configure after adding a test for strnlen() --- source/configure | 2 +- source/include/config.h.in | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/configure b/source/configure index 5e2416abe75..3e13dc1b226 100755 --- a/source/configure +++ b/source/configure @@ -5257,7 +5257,7 @@ else RUNPROG="" fi -for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 +for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:5264: checking for $ac_func" >&5 diff --git a/source/include/config.h.in b/source/include/config.h.in index 7328d022c1a..afe49d419cb 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -809,6 +809,9 @@ /* Define if you have the strndup function. */ #undef HAVE_STRNDUP +/* Define if you have the strnlen function. */ +#undef HAVE_STRNLEN + /* Define if you have the strpbrk function. */ #undef HAVE_STRPBRK -- cgit From 1c92fab4050f21b4c5cc962e0b80b5c551b24745 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 12:27:54 +0000 Subject: ignore a few more files --- source/.cvsignore | 10 +++++++++- source/bin/.cvsignore | 2 ++ source/tdb/.cvsignore | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/.cvsignore b/source/.cvsignore index 77e82c57010..b68cf42338b 100644 --- a/source/.cvsignore +++ b/source/.cvsignore @@ -1,8 +1,10 @@ *.po *.po32 .headers.stamp -.proto.stamp +.inslog2 +.ix* .proto.check +.proto.stamp ID ID Makefile @@ -10,10 +12,16 @@ bin config.cache config.log config.status +configure.tridge cvs.log +diffs +dmalloc.log dmallog.log dox libtool so_locations +tca.log testdir testtmp +trace.out +typescript* diff --git a/source/bin/.cvsignore b/source/bin/.cvsignore index c152d8918ab..c87d15fdb40 100644 --- a/source/bin/.cvsignore +++ b/source/bin/.cvsignore @@ -10,6 +10,7 @@ msgtest net nmbd nmblookup +nsstest pdbedit rpcclient samsync @@ -18,6 +19,7 @@ smbcacls smbclient smbcontrol smbd +smbfilter smbgroupedit smbmnt smbmount diff --git a/source/tdb/.cvsignore b/source/tdb/.cvsignore index 15ff2846c7a..66445fe2690 100644 --- a/source/tdb/.cvsignore +++ b/source/tdb/.cvsignore @@ -1,5 +1,6 @@ *.po *.po32 +tdbbackup tdbdump tdbtest tdbtool -- cgit From 66d6d4810ab7b0a1bf2039c387938aad69e01569 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 13:10:54 +0000 Subject: fixed a problem with the smb_buf() macro on some compilers --- source/include/smb_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 27a59616512..a2351c705ea 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -169,7 +169,7 @@ #define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 ) /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ -#define smb_buf(buf) ((buf) + smb_size + CVAL(buf,smb_wct)*2) +#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2) #define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2)) /* the remaining number of bytes in smb buffer 'buf' from pointer 'p'. */ -- cgit From 9961881f894e3db569ee010aa32aff5bb27ba093 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Apr 2002 14:56:31 +0000 Subject: dlerror should be sys_dlerror. Jeremy. --- source/smbd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 0a0451146a4..fd25d995634 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -139,7 +139,7 @@ static BOOL vfs_init_custom(connection_struct *conn) /* Open object file */ if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) { - DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), dlerror())); + DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), sys_dlerror())); return False; } -- cgit From 69ca7eb290997f117bfd4ce7d5787d698bc3019b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Apr 2002 15:06:01 +0000 Subject: Merge from HEAD for buffer macro fix. Jeremy. --- source/include/smb_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 2e116ad2fa1..79bca5d7029 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -165,7 +165,7 @@ #define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 ) /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ -#define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2) +#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2) #define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2)) /* Note that chain_size must be available as an extern int to this macro. */ -- cgit From bfc3a25b776a5a66e1bd0e2c60c101cea87ef4d5 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Tue, 16 Apr 2002 15:49:24 +0000 Subject: we did not initialise global_myname and global_myworkgroup which lead to duplicate entries in secrets.tdb and false SID generated. took me *hours* to understand. J.F. --- source/utils/smbgroupedit.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/utils/smbgroupedit.c b/source/utils/smbgroupedit.c index cfa0dd8af98..04d46f45595 100644 --- a/source/utils/smbgroupedit.c +++ b/source/utils/smbgroupedit.c @@ -22,6 +22,7 @@ #include "includes.h" extern pstring global_myname; +extern pstring global_myworkgroup; extern DOM_SID global_sam_sid; /* @@ -287,6 +288,18 @@ int main (int argc, char **argv) dyn_CONFIGFILE); exit(1); } + + if (!*global_myname) { + char *p; + pstrcpy( global_myname, myhostname() ); + p = strchr_m(global_myname, '.' ); + if (p) + *p = 0; + } + + strupper(global_myname); + + fstrcpy(global_myworkgroup, lp_workgroup()); if(!initialize_password_db(True)) { fprintf(stderr, "Can't setup password database vectors.\n"); @@ -294,7 +307,7 @@ int main (int argc, char **argv) } if(pdb_generate_sam_sid()==False) { - printf("Can not read machine SID\n"); + fprintf(stderr, "Can not read machine SID\n"); return 0; } -- cgit From cea38baaac569b0a9e387afa8049fbe11fe8f9ae Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 16 Apr 2002 16:23:17 +0000 Subject: command line arg parsing fix from Michael Sweet --- source/rpcclient/rpcclient.c | 123 ++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 53 deletions(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 96ff2581c18..9b957e4a395 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -584,7 +584,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) /* Print usage information */ static void usage(void) { - printf("Usage: rpcclient server [options]\n"); + printf("Usage: rpcclient [options] server\n"); printf("\t-A authfile file containing user credentials\n"); printf("\t-c \"command string\" execute semicolon separated cmds\n"); @@ -633,69 +633,86 @@ int main(int argc, char *argv[]) usage(); return 0; } - - if (strncmp("//", argv[1], 2) == 0 || strncmp("\\\\", argv[1], 2) == 0) - argv[1] += 2; - - pstrcpy(server, argv[1]); - argv++; - argc--; + /* + * M. Sweet: getopt() behaves slightly differently on various + * platforms. The following loop ensures that the System V, + * BSD, and Linux (glibc) implementations work similarly to + * allow the server name anywhere on the command-line. + */ - while ((opt = getopt(argc, argv, "A:s:Nd:U:W:c:l:h")) != EOF) { - switch (opt) { - case 'A': - /* only get the username, password, and domain from the file */ - read_authfile (optarg, username, password, domain); - if (strlen (password)) + pstrcpy(server, ""); + + while (argc > optind) { + while ((opt = getopt(argc, argv, "A:s:Nd:U:W:c:l:h")) != EOF) { + switch (opt) { + case 'A': + /* only get the username, password, and domain from the file */ + read_authfile (optarg, username, password, domain); + if (strlen (password)) + got_pass = True; + break; + + case 'c': + pstrcpy(cmdstr, optarg); + break; + + case 'd': + DEBUGLEVEL = atoi(optarg); + break; + + case 'l': + slprintf(logfile, sizeof(logfile) - 1, "%s.client", optarg); + lp_set_logfile(logfile); + interactive = False; + break; + + case 'N': got_pass = True; - break; + break; + + case 's': + pstrcpy(servicesf, optarg); + break; + + case 'U': { + char *lp; + pstrcpy(username,optarg); + if ((lp=strchr(username,'%'))) { + *lp = 0; + pstrcpy(password,lp+1); + got_pass = True; + memset(strchr(optarg,'%')+1,'X',strlen(password)); + } + break; + } - case 'c': - pstrcpy(cmdstr, optarg); - break; + case 'W': + pstrcpy(domain, optarg); + break; - case 'd': - DEBUGLEVEL = atoi(optarg); - break; + case 'h': + default: + usage(); + return 1; + } + } - case 'l': - slprintf(logfile, sizeof(logfile) - 1, "%s.client", optarg); - lp_set_logfile(logfile); - interactive = False; - break; + if (argc > optind) { + if (strncmp("//", argv[optind], 2) == 0 || + strncmp("\\\\", argv[optind], 2) == 0) + argv[optind] += 2; - case 'N': - got_pass = True; - break; - - case 's': - pstrcpy(servicesf, optarg); - break; + pstrcpy(server, argv[optind]); - case 'U': { - char *lp; - pstrcpy(username,optarg); - if ((lp=strchr(username,'%'))) { - *lp = 0; - pstrcpy(password,lp+1); - got_pass = True; - memset(strchr(optarg,'%')+1,'X',strlen(password)); - } - break; - } - - case 'W': - pstrcpy(domain, optarg); - break; - - case 'h': - default: - usage(); - exit(1); + optind ++; } } + if (!server[0]) { + usage(); + return 1; + } /* the following functions are part of the Samba debugging facilities. See lib/debug.c */ -- cgit From ccd683a71a95fb0f5eaa1d86b0c59072645b264b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 16 Apr 2002 16:36:29 +0000 Subject: formatting fixes --- source/rpcclient/rpcclient.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 9b957e4a395..3067d8f437d 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -701,10 +701,11 @@ int main(int argc, char *argv[]) if (argc > optind) { if (strncmp("//", argv[optind], 2) == 0 || strncmp("\\\\", argv[optind], 2) == 0) + { argv[optind] += 2; + } pstrcpy(server, argv[optind]); - optind ++; } } -- cgit From 91929afbb0cad422cc6d05f9a10ba5c3d797d779 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 16 Apr 2002 16:49:08 +0000 Subject: merges from SAMBA_2_2 --- source/rpcclient/rpcclient.c | 105 +++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 44 deletions(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 688dd740046..7d49e7a9cb3 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -576,7 +576,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) /* Print usage information */ static void usage(void) { - printf("Usage: rpcclient server [options]\n"); + printf("Usage: rpcclient [options] server\n"); printf("\t-A or --authfile authfile file containing user credentials\n"); printf("\t-c or --command \"command string\" execute semicolon separated cmds\n"); @@ -660,52 +660,69 @@ static void usage(void) pc = poptGetContext(NULL, argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); - while((opt = poptGetNextOpt(pc)) != -1) { - switch (opt) { - case 'A': - /* only get the username, password, and domain from the file */ - read_authfile (opt_authfile, username, - password, domain); - if (strlen (password)) - got_pass = 1; - break; - - case 'l': - slprintf(logfile, sizeof(logfile) - 1, "%s.client", - opt_logfile); - lp_set_logfile(logfile); - interactive = False; - break; - - case 's': - pstrcpy(dyn_CONFIGFILE, opt_configfile); - break; - - case 'd': - DEBUGLEVEL = opt_debuglevel; - break; - - case 'U': { - char *lp; - pstrcpy(username,opt_username); - if ((lp=strchr_m(username,'%'))) { - *lp = 0; - pstrcpy(password,lp+1); - got_pass = 1; - memset(strchr_m(opt_username,'%')+1,'X',strlen(password)); + while (argc > optind) { + while((opt = poptGetNextOpt(pc)) != -1) { + switch (opt) { + case 'A': + /* only get the username, password, and domain from the file */ + read_authfile (opt_authfile, username, password, domain); + if (strlen (password)) + got_pass = 1; + break; + + case 'l': + slprintf(logfile, sizeof(logfile) - 1, "%s.client", + opt_logfile); + lp_set_logfile(logfile); + interactive = False; + break; + + case 's': + pstrcpy(dyn_CONFIGFILE, opt_configfile); + break; + + case 'd': + DEBUGLEVEL = opt_debuglevel; + break; + + case 'U': { + char *lp; + pstrcpy(username,opt_username); + if ((lp=strchr_m(username,'%'))) { + *lp = 0; + pstrcpy(password,lp+1); + got_pass = 1; + memset(strchr_m(opt_username,'%')+1,'X',strlen(password)); + } + break; } - break; - } - case 'W': - pstrcpy(domain, opt_domain); - break; - - case 'h': - default: - usage(); - exit(1); + case 'W': + pstrcpy(domain, opt_domain); + break; + + case 'h': + default: + usage(); + exit(1); + } } + + if (argc > optind) { + if (strncmp("//", argv[optind], 2) == 0 || + strncmp("\\\\", argv[optind], 2) == 0) + { + argv[optind] += 2; + } + + pstrcpy(server, argv[optind]); + optind ++; + } + } + + if (!server[0]) { + usage(); + return 1; } poptFreeContext(pc); -- cgit From 0ffda9ffad2073a5995ce34fde5c3b5fc4859b90 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 16 Apr 2002 16:52:20 +0000 Subject: few fixes and regenerate --- docs/docbook/manpages/rpcclient.1.sgml | 2 +- docs/htmldocs/rpcclient.1.html | 22 +++--- docs/htmldocs/smb.conf.5.html | 82 +++++++++++++++++---- docs/manpages/rpcclient.1 | 126 +++++++++++++++++---------------- docs/manpages/smb.conf.5 | 47 +++++++++--- 5 files changed, 184 insertions(+), 95 deletions(-) diff --git a/docs/docbook/manpages/rpcclient.1.sgml b/docs/docbook/manpages/rpcclient.1.sgml index f2a44d69d90..9205439b013 100644 --- a/docs/docbook/manpages/rpcclient.1.sgml +++ b/docs/docbook/manpages/rpcclient.1.sgml @@ -16,7 +16,6 @@ rpcclient - server -A authfile -c <command string> -d debuglevel @@ -27,6 +26,7 @@ -U username[%password] -W workgroup -N + server diff --git a/docs/htmldocs/rpcclient.1.html b/docs/htmldocs/rpcclient.1.html index 98a19c6ea2d..eaa864f1099 100644 --- a/docs/htmldocs/rpcclient.1.html +++ b/docs/htmldocs/rpcclient.1.html @@ -37,7 +37,7 @@ NAME="AEN8" >rpcclient {server} [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N]

    [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] {server}

    .

    -A filename
    -A|--authfile=filename

    This option allows @@ -125,14 +125,14 @@ CLASS="PROGRAMLISTING" access from unwanted users.

    -c 'command string'
    -c|--command='command string'

    execute semicolon separated commands (listed below))

    -d debuglevel
    -d|--debug=debuglevel

    set the debuglevel. Debug level 0 is the lowest @@ -144,14 +144,14 @@ CLASS="FILENAME"

    -h
    -h|--help

    Print a summary of command line options.

    -l logbasename
    -l|--logfile=logbasename

    File name for log/debug files. The extension @@ -163,7 +163,7 @@ CLASS="CONSTANT"

    -N
    -N|--nopass

    instruct option.

    -s smb.conf
    -s|--conf=smb.conf

    Specifies the location of the all important @@ -192,7 +192,7 @@ CLASS="FILENAME" > file.

    -U username[%password]
    -U|--user=username[%password]

    Sets the SMB username or username and password.

    -W domain
    -W|--workgroup=domain

    Set the SMB domain of the username. This @@ -693,7 +693,7 @@ NAME="AEN222" >

    VERSION

    This man page is correct for version 2.2 of the Samba +>This man page is correct for version 3.0 of the Samba suite.

  • algorithmic rid base

  • COMPLETE LIST OF SERVICE PARAMETERS

    EXPLANATION OF EACH PARAMETER

    algorithmic rid base (G)

    This determines how Samba will use its + algorithmic mapping from uids/gid to the RIDs needed to construct + NT Security Identifiers.

    Setting this option to a larger value could be useful to sites + transitioning from WinNT and Win2k, as existing user and + group rids would otherwise clash with sytem users etc. +

    All UIDs and GIDs must be able to be resolved into SIDs for + the correct operation of ACLs on the server. As such the algorithmic + mapping can't be 'turned off', but pushing it 'out of the way' should + resolve the issues. Users and groups can then be assigned 'low' RIDs + in arbitary-rid supporting backends.

    Default: algorithmic rid base = 1000

    Example: algorithmic rid base = 100000

    allow trusted domains (G)
    passdb backend (G)

    This option allows the administrator to chose what - backend in which to store passwords. This allows (for example) both - smbpasswd and tdbsam to be used without a recompile. Only one can - be used at a time however, and experimental backends must still be selected +>This option allows the administrator to chose which backends to retrieve and store passwords with. This allows (for example) both + smbpasswd and tdbsam to be used without a recompile. + Multiple backends can be specified, seperated by spaces. The backends will be searched in the order they are specified. New users are always added to the first backend specified. + Experimental backends must still be selected (eg --with-tdbsam) at configure time.

    Example: passdb backend = tdbsam:/etc/samba/private/passdb.tdbpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd

    Example:

    Example: passdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_argspassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb

    section above for reasons why you might want to do this.

    To use the CUPS printing interface set printcap name = cups + .

    On System V systems that use lpstat modules for UNIX services.

    Please note that setting this parameter to + causes problems + with group membership at least on glibc systems, as the character + + is used as a special character for NIS in /etc/group.

    Example: winbind separator = \winbind separator = \\

    Example: winbind separator = +winbind separator = /

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    +.\" This manpage has been automatically generated by docbook2man-spec +.\" from a DocBook document. docbook2man-spec can be found at: +.\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "RPCCLIENT" "1" "28 March 2002" "" "" +.TH "RPCCLIENT" "1" "16 April 2002" "" "" .SH NAME rpcclient \- tool for executing client side MS-RPC functions .SH SYNOPSIS - -\fBrpcclient\fR \fBserver\fR [ \fB-A authfile\fR] [ \fB-c \fR] [ \fB-d debuglevel\fR] [ \fB-h\fR] [ \fB-l logfile\fR] [ \fB-N\fR] [ \fB-s \fR] [ \fB-U username[%password]\fR] [ \fB-W workgroup\fR] [ \fB-N\fR] - +.sp +\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c \fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s \fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] \fBserver\fR .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. .PP \fBrpcclient\fR is a utility initially developed -to test MS-RPC functionality in Samba itself. It has undergone -several stages of development and stability. Many system administrators +to test MS-RPC functionality in Samba itself. It has undergone +several stages of development and stability. Many system administrators have now written scripts around it to manage Windows NT clients from their UNIX workstation. .SH "OPTIONS" .TP \fBserver\fR NetBIOS name of Server to which to connect. -The server can be any SMB/CIFS server. The name is -resolved using the \fIname resolve order\fRline from +The server can be any SMB/CIFS server. The name is +resolved using the \fIname resolve order\fRline from \fIsmb.conf(5)\fR. .TP \fB-A|--authfile=filename\fR This option allows you to specify a file from which to read the username and -password used in the connection. The format of the file is - +password used in the connection. The format of the file is +.sp .nf username = password = domain = +.sp .fi Make certain that the permissions on the file restrict @@ -57,13 +57,13 @@ Print a summary of command line options. .TP \fB-l|--logfile=logbasename\fR File name for log/debug files. The extension -\&'.client' will be appended. The log file is never removed +\&'.client' will be appended. The log file is never removed by the client. .TP \fB-N|--nopass\fR instruct \fBrpcclient\fR not to ask -for a password. By default, \fBrpcclient\fR will prompt -for a password. See also the \fI-U\fR option. +for a password. By default, \fBrpcclient\fR will prompt +for a password. See also the \fI-U\fR option. .TP \fB-s|--conf=smb.conf\fR Specifies the location of the all important @@ -79,24 +79,24 @@ string is uppercased. If these environmental variables are not found, the username GUEST is used. A third option is to use a credentials file which -contains the plaintext of the username and password. This +contains the plaintext of the username and password. This option is mainly provided for scripts where the admin doesn't desire to pass the credentials on the command line or via environment variables. If this method is used, make certain that the permissions -on the file restrict access from unwanted users. See the +on the file restrict access from unwanted users. See the \fI-A\fR for more details. Be cautious about including passwords in scripts. Also, on many systems the command line of a running process may be seen -via the \fBps\fR command. To be safe always allow +via the \fBps\fR command. To be safe always allow \fBrpcclient\fR to prompt for a password and type it in directly. .TP \fB-W|--workgroup=domain\fR -Set the SMB domain of the username. This +Set the SMB domain of the username. This overrides the default domain which is the domain defined in -smb.conf. If the domain specified is the same as the server's NetBIOS name, -it causes the client to log on using the server's local SAM (as +smb.conf. If the domain specified is the same as the server's NetBIOS name, +it causes the client to log on using the server's local SAM (as opposed to the Domain SAM). .SH "COMMANDS" .PP @@ -117,7 +117,9 @@ of usernames to SIDs. \fBenumtrusts\fR .PP .PP +.PP \fBSAMR\fR +.PP .TP 0.2i \(bu \fBqueryuser\fR @@ -144,20 +146,22 @@ of usernames to SIDs. \fBenumdomgroups\fR .PP .PP +.PP \fBSPOOLSS\fR +.PP .TP 0.2i \(bu \fBadddriver \fR - Execute an AddPrinterDriver() RPC to install the printer driver -information on the server. Note that the driver files should -already exist in the directory returned by -\fBgetdriverdir\fR. Possible values for +information on the server. Note that the driver files should +already exist in the directory returned by +\fBgetdriverdir\fR. Possible values for \fIarch\fR are the same as those for the \fBgetdriverdir\fR command. The \fIconfig\fR parameter is defined as follows: - +.sp .nf Long Printer Name:\\ Driver File Name:\\ @@ -168,43 +172,44 @@ follows: Default Data Type:\\ Comma Separated list of Files +.sp .fi Any empty fields should be enter as the string "NULL". Samba does not need to support the concept of Print Monitors since these only apply to local printers whose driver can make -use of a bi-directional link for communication. This field should -be "NULL". On a remote NT print server, the Print Monitor for a +use of a bi-directional link for communication. This field should +be "NULL". On a remote NT print server, the Print Monitor for a driver must already be installed prior to adding the driver or else the RPC will fail. .TP 0.2i \(bu \fBaddprinter \fR -- Add a printer on the remote server. This printer -will be automatically shared. Be aware that the printer driver +- Add a printer on the remote server. This printer +will be automatically shared. Be aware that the printer driver must already be installed on the server (see \fBadddriver\fR) and the \fIport\fRmust be a valid port name (see \fBenumports\fR. .TP 0.2i \(bu \fBdeldriver\fR - Delete the -specified printer driver for all architectures. This +specified printer driver for all architectures. This does not delete the actual driver files from the server, only the entry from the server's list of drivers. .TP 0.2i \(bu \fBenumdata\fR - Enumerate all -printer setting data stored on the server. On Windows NT clients, -these values are stored in the registry, while Samba servers -store them in the printers TDB. This command corresponds +printer setting data stored on the server. On Windows NT clients, +these values are stored in the registry, while Samba servers +store them in the printers TDB. This command corresponds to the MS Platform SDK GetPrinterData() function (* This command is currently unimplemented). .TP 0.2i \(bu \fBenumjobs \fR -- List the jobs and status of a given printer. +- List the jobs and status of a given printer. This command corresponds to the MS Platform SDK EnumJobs() function (* This command is currently unimplemented). .TP 0.2i @@ -215,22 +220,22 @@ info level. Currently only info levels 1 and 2 are supported. .TP 0.2i \(bu \fBenumdrivers [level]\fR -- Execute an EnumPrinterDrivers() call. This lists the various installed -printer drivers for all architectures. Refer to the MS Platform SDK +- Execute an EnumPrinterDrivers() call. This lists the various installed +printer drivers for all architectures. Refer to the MS Platform SDK documentation for more details of the various flags and calling options. Currently supported info levels are 1, 2, and 3. .TP 0.2i \(bu \fBenumprinters [level]\fR -- Execute an EnumPrinters() call. This lists the various installed -and share printers. Refer to the MS Platform SDK documentation for +- Execute an EnumPrinters() call. This lists the various installed +and share printers. Refer to the MS Platform SDK documentation for more details of the various flags and calling options. Currently supported info levels are 0, 1, and 2. .TP 0.2i \(bu \fBgetdata \fR -- Retrieve the data for a given printer setting. See -the \fBenumdata\fR command for more information. +- Retrieve the data for a given printer setting. See +the \fBenumdata\fR command for more information. This command corresponds to the GetPrinterData() MS Platform SDK function (* This command is currently unimplemented). .TP 0.2i @@ -239,20 +244,20 @@ SDK function (* This command is currently unimplemented). - Retrieve the printer driver information (such as driver file, config file, dependent files, etc...) for the given printer. This command corresponds to the GetPrinterDriver() -MS Platform SDK function. Currently info level 1, 2, and 3 are supported. +MS Platform SDK function. Currently info level 1, 2, and 3 are supported. .TP 0.2i \(bu \fBgetdriverdir \fR - Execute a GetPrinterDriverDirectory() RPC to retreive the SMB share name and subdirectory for -storing printer driver files for a given architecture. Possible +storing printer driver files for a given architecture. Possible values for \fIarch\fR are "Windows 4.0" (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows Alpha_AXP", and "Windows NT R4000". .TP 0.2i \(bu \fBgetprinter \fR -- Retrieve the current printer information. This command +- Retrieve the current printer information. This command corresponds to the GetPrinter() MS Platform SDK function. .TP 0.2i \(bu @@ -263,14 +268,15 @@ against a given printer. \(bu \fBsetdriver \fR - Execute a SetPrinter() command to update the printer driver associated -with an installed printer. The printer driver must already be correctly -installed on the print server. +with an installed printer. The printer driver must already be correctly +installed on the print server. See also the \fBenumprinters\fR and \fBenumdrivers\fR commands for obtaining a list of of installed printers and drivers. .PP \fBGENERAL OPTIONS\fR +.PP .TP 0.2i \(bu \fBdebuglevel\fR - Set the current debug level @@ -278,33 +284,33 @@ used to log information. .TP 0.2i \(bu \fBhelp (?)\fR - Print a listing of all -known commands or extended help on a particular command. +known commands or extended help on a particular command. .TP 0.2i \(bu \fBquit (exit)\fR - Exit \fBrpcclient -\fR. +\fR\&. .SH "BUGS" .PP \fBrpcclient\fR is designed as a developer testing tool -and may not be robust in certain areas (such as command line parsing). -It has been known to generate a core dump upon failures when invalid +and may not be robust in certain areas (such as command line parsing). +It has been known to generate a core dump upon failures when invalid parameters where passed to the interpreter. .PP From Luke Leighton's original rpcclient man page: .PP \fB"WARNING!\fR The MSRPC over SMB code has -been developed from examining Network traces. No documentation is -available from the original creators (Microsoft) on how MSRPC over -SMB works, or how the individual MSRPC services work. Microsoft's -implementation of these services has been demonstrated (and reported) +been developed from examining Network traces. No documentation is +available from the original creators (Microsoft) on how MSRPC over +SMB works, or how the individual MSRPC services work. Microsoft's +implementation of these services has been demonstrated (and reported) to be... a bit flaky in places. .PP The development of Samba's implementation is also a bit rough, -and as more of the services are understood, it can even result in -versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR -that are incompatible for some commands or services. Additionally, -the developers are sending reports to Microsoft, and problems found -or reported to Microsoft are fixed in Service Packs, which may +and as more of the services are understood, it can even result in +versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR +that are incompatible for some commands or services. Additionally, +the developers are sending reports to Microsoft, and problems found +or reported to Microsoft are fixed in Service Packs, which may result in incompatibilities." .SH "VERSION" .PP @@ -318,6 +324,6 @@ by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. .PP The original rpcclient man page was written by Matthew -Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter. +Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5 index 32a40d26091..09a86a273a3 100644 --- a/docs/manpages/smb.conf.5 +++ b/docs/manpages/smb.conf.5 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "01 April 2002" "" "" +.TH "SMB.CONF" "5" "16 April 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -521,6 +521,9 @@ each parameter for details. Note that some are synonyms. \fIadd machine script\fR .TP 0.2i \(bu +\fIalgorithmic rid base\fR +.TP 0.2i +\(bu \fIallow trusted domains\fR .TP 0.2i \(bu @@ -1597,6 +1600,25 @@ Example: \fBadmin users = jason\fR \fBallow hosts (S)\fR Synonym for \fIhosts allow\fR. .TP +\fBalgorithmic rid base (G)\fR +This determines how Samba will use its +algorithmic mapping from uids/gid to the RIDs needed to construct +NT Security Identifiers. + +Setting this option to a larger value could be useful to sites +transitioning from WinNT and Win2k, as existing user and +group rids would otherwise clash with sytem users etc. + +All UIDs and GIDs must be able to be resolved into SIDs for +the correct operation of ACLs on the server. As such the algorithmic +mapping can't be 'turned off', but pushing it 'out of the way' should +resolve the issues. Users and groups can then be assigned 'low' RIDs +in arbitary-rid supporting backends. + +Default: \fBalgorithmic rid base = 1000\fR + +Example: \fBalgorithmic rid base = 100000\fR +.TP \fBallow trusted domains (G)\fR This option only takes effect when the \fIsecurity\fR option is set to server or domain. @@ -4629,10 +4651,10 @@ Default: \fBpanic action = \fR Example: \fBpanic action = "/bin/sleep 90000"\fR .TP \fBpassdb backend (G)\fR -This option allows the administrator to chose what -backend in which to store passwords. This allows (for example) both -smbpasswd and tdbsam to be used without a recompile. Only one can -be used at a time however, and experimental backends must still be selected +This option allows the administrator to chose which backends to retrieve and store passwords with. This allows (for example) both +smbpasswd and tdbsam to be used without a recompile. +Multiple backends can be specified, seperated by spaces. The backends will be searched in the order they are specified. New users are always added to the first backend specified. +Experimental backends must still be selected (eg --with-tdbsam) at configure time. This paramater is in two parts, the backend's name, and a 'location' @@ -4688,11 +4710,11 @@ for its own processing Default: \fBpassdb backend = smbpasswd\fR -Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb\fR +Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd\fR Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com\fR -Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args\fR +Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb\fR .TP \fBpasswd chat (G)\fR This string controls the \fB"chat"\fR @@ -5156,6 +5178,9 @@ This parameter may be used to override the compiled-in default printcap name used by the server (usually \fI /etc/printcap\fR). See the discussion of the [printers] section above for reasons why you might want to do this. +To use the CUPS printing interface set \fBprintcap name = cups +\fR\&. + On System V systems that use \fBlpstat\fR to list available printers you can use \fBprintcap name = lpstat \fRto automatically obtain lists of available printers. This @@ -7016,9 +7041,13 @@ used when listing a username of the form of \fIDOMAIN is only applicable when using the \fIpam_winbind.so\fR and \fInss_winbind.so\fR modules for UNIX services. -Example: \fBwinbind separator = \\\fR +Please note that setting this parameter to + causes problems +with group membership at least on glibc systems, as the character + +is used as a special character for NIS in /etc/group. + +Example: \fBwinbind separator = \\\\\fR -Example: \fBwinbind separator = +\fR +Example: \fBwinbind separator = /\fR .TP \fBwinbind uid\fR The winbind gid parameter specifies the range of group -- cgit From 3b2ed947279ac637ce02467c8f918c9dc770e835 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 16 Apr 2002 16:52:37 +0000 Subject: fixup order listing of args for rpcclient --- docs/docbook/manpages/rpcclient.1.sgml | 2 +- docs/htmldocs/rpcclient.1.html | 2 +- docs/manpages/rpcclient.1 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docbook/manpages/rpcclient.1.sgml b/docs/docbook/manpages/rpcclient.1.sgml index f32e2f9ece6..773455fb2bf 100644 --- a/docs/docbook/manpages/rpcclient.1.sgml +++ b/docs/docbook/manpages/rpcclient.1.sgml @@ -16,7 +16,6 @@ rpcclient - server -A authfile -c <command string> -d debuglevel @@ -27,6 +26,7 @@ -U username[%password] -W workgroup -N + server diff --git a/docs/htmldocs/rpcclient.1.html b/docs/htmldocs/rpcclient.1.html index 98a19c6ea2d..d18966fa238 100644 --- a/docs/htmldocs/rpcclient.1.html +++ b/docs/htmldocs/rpcclient.1.html @@ -37,7 +37,7 @@ NAME="AEN8" >rpcclient {server} [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N]

    [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] {server}

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "RPCCLIENT" "1" "06 December 2001" "" "" +.TH "RPCCLIENT" "1" "16 April 2002" "" "" .SH NAME rpcclient \- tool for executing client side MS-RPC functions .SH SYNOPSIS .sp -\fBrpcclient\fR \fBserver\fR [ \fB-A authfile\fR ] [ \fB-c \fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s \fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] +\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c \fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s \fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] \fBserver\fR .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. -- cgit From 020fccce592afec6565f9f6b6cb470c5584a1956 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 16 Apr 2002 20:10:12 +0000 Subject: Updating UnixWare/OpenUNIX packaging. --- packaging/Caldera/UnixWare/Compile | 44 ++- packaging/Caldera/UnixWare/Configure | 30 +- packaging/Caldera/UnixWare/Install | 5 +- packaging/Caldera/UnixWare/pkg/pkginfo | 7 +- packaging/Caldera/UnixWare/pkg/postinstall | 6 +- packaging/Caldera/UnixWare/pkg/prototype | 593 ++++++++++++++--------------- packaging/Caldera/UnixWare/smb.init | 2 - 7 files changed, 356 insertions(+), 331 deletions(-) diff --git a/packaging/Caldera/UnixWare/Compile b/packaging/Caldera/UnixWare/Compile index 2867e4d5ad5..c4870163053 100755 --- a/packaging/Caldera/UnixWare/Compile +++ b/packaging/Caldera/UnixWare/Compile @@ -7,14 +7,32 @@ V= [ "$1" = "-n" ] && V=echo -CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib" +#CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib" +CC="cc -Kthread -Kalloca" CPP="$CC -E" CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3" -LDFLAGS="-L/usr/local/lib" -CXX="CC -I/usr/local/include" -CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib" +#LDFLAGS="-L/usr/local/lib" +LDFLAGS= +#CXX="CC -I/usr/local/include" +CXX="CC" +#CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib" +CXXFLAGS="-O3" RANLIB=true -MAKE=/usr/local/bin/make + +if [ -x /usr/gnu/bin/make ] +then + MAKE=/usr/gnu/bin/make +elif [ -x /usr/local/bin/make ] +then + MAKE=/usr/local/bin/make +elif [ -x /usr/bin/make ] +then + MAKE=/usr/bin/make +else + echo "Can't find make - exiting" + exit 1 +fi + if [ "$V" = "echo" ] then echo "exporting the following shell variables:" @@ -34,17 +52,17 @@ if [ "$V" = "echo" ] then echo "cd ../../../source" echo "rm -f mout-1 mout-2 mout-3 mout-4" - echo "make all 2>&1 | tee mout-1" - echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2" - echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3" - echo "make masktest locktest locktest2 2>&1 | tee mout-3" + echo "$MAKE all 2>&1 | tee mout-1" + echo "$MAKE smbfilter smbtorture debug2html 2>&1 | tee mout-2" + echo "$MAKE bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3" + echo "$MAKE masktest locktest locktest2 2>&1 | tee mout-3" else cd ../../../source rm -f mout-1 mout-2 mout-3 mout-4 - make all 2>&1 | tee mout-1 - make smbfilter smbtorture debug2html 2>&1 | tee mout-2 - make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3 - make masktest locktest locktest2 2>&1 | tee mout-3 + $MAKE all 2>&1 | tee mout-1 + $MAKE smbfilter smbtorture debug2html 2>&1 | tee mout-2 + $MAKE bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3 + $MAKE masktest locktest locktest2 2>&1 | tee mout-3 fi # # Not building : diff --git a/packaging/Caldera/UnixWare/Configure b/packaging/Caldera/UnixWare/Configure index 3914195606f..e899742ce90 100755 --- a/packaging/Caldera/UnixWare/Configure +++ b/packaging/Caldera/UnixWare/Configure @@ -7,15 +7,33 @@ V= [ "$1" = "-n" ] && V=echo -CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib" +#CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib" +CC="cc -Kthread -Kalloca" CPP="$CC -E" CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3" -LDFLAGS="-L/usr/local/lib" -CXX="CC -I/usr/local/include" -CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib" +#LDFLAGS="-L/usr/local/lib" +LDFLAGS= +#CXX="CC -I/usr/local/include" +CXX="CC" +#CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib" +CXXFLAGS="-O3" RANLIB=true -MAKE=/usr/local/bin/make -PREFIX=/usr/local/samba +PREFIX=/usr/lib/samba + +if [ -x /usr/gnu/bin/make ] +then + MAKE=/usr/gnu/bin/make +elif [ -x /usr/local/bin/make ] +then + MAKE=/usr/local/bin/make +elif [ -x /usr/bin/make ] +then + MAKE=/usr/bin/make +else + echo "Can't find make - exiting" + exit 1 +fi + if [ "$V" = "echo" ] then echo "exporting the following shell variables:" diff --git a/packaging/Caldera/UnixWare/Install b/packaging/Caldera/UnixWare/Install index 3fffc37d25a..a2d8da12eaa 100755 --- a/packaging/Caldera/UnixWare/Install +++ b/packaging/Caldera/UnixWare/Install @@ -7,7 +7,7 @@ V= [ "$1" = "-n" ] && V=echo -PREFIX=/usr/local/samba +PREFIX=/usr/lib/samba HERE=`pwd` PKGDIR=packaging/Caldera/UnixWare @@ -39,8 +39,7 @@ cd ../../.. # Install standard binary files for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ - make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \ - smbsh smbwrapper.so + make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool do $V install -m755 -s source/bin/$i ${BLDFIX}/bin done diff --git a/packaging/Caldera/UnixWare/pkg/pkginfo b/packaging/Caldera/UnixWare/pkg/pkginfo index c4d8bff0bb9..c35373d3523 100644 --- a/packaging/Caldera/UnixWare/pkg/pkginfo +++ b/packaging/Caldera/UnixWare/pkg/pkginfo @@ -1,9 +1,8 @@ PKG="samba" NAME="Samba - A Windows SMB/CIFS fileserver for UNIX" -VERSION="2.2" -VENDOR="SCO" -HOTLINE="1-800-SCO-UNIX" -EMAIL="rr@sco.com" +VERSION="2.2.4" +VENDOR="Caldera" +EMAIL="rr@caldera.com" CATEGORY="skunkware" CLASSES="samba" ARCH="i386" diff --git a/packaging/Caldera/UnixWare/pkg/postinstall b/packaging/Caldera/UnixWare/pkg/postinstall index 4e202ae3543..0cbdfad238e 100755 --- a/packaging/Caldera/UnixWare/pkg/postinstall +++ b/packaging/Caldera/UnixWare/pkg/postinstall @@ -3,13 +3,13 @@ # Create /var/spool/samba, setup swat to be run out of inetd on port 901, # initialize the lmhosts file and create the codepage load files # -# Written 10-Aug-1999 by Ronald Joe Record (rr@sco.com) +# Written 10-Aug-1999 by Ronald Joe Record (rr@caldera.com) # SPOOL=/var/spool/samba SVCS=/etc/services INET=/etc/inetd.conf -PREFIX=/usr/local/samba +PREFIX=/usr/lib/samba LMHOST=/etc/lmhosts [ -d $SPOOL ] || { @@ -22,7 +22,7 @@ grep swat $SVCS > /dev/null || { } grep swat $INET > /dev/null || { - echo "swat stream tcp nowait root /usr/local/samba/bin/swat swat " >> $INET + echo "swat stream tcp nowait root /usr/lib/samba/sbin/swat swat " >> $INET } if [ -f $LMHOST ] diff --git a/packaging/Caldera/UnixWare/pkg/prototype b/packaging/Caldera/UnixWare/pkg/prototype index 13a64b6feb1..5424e2cfc9e 100644 --- a/packaging/Caldera/UnixWare/pkg/prototype +++ b/packaging/Caldera/UnixWare/pkg/prototype @@ -8,303 +8,296 @@ d samba etc/init.d 0755 root sys f samba etc/init.d/samba 0755 root sys f samba etc/smbusers 0644 root sys d samba usr 0755 root sys -d samba usr/local 0755 root sys -d samba usr/local/samba 0755 root sys -d samba usr/local/samba/bin 0755 root sys -f samba usr/local/samba/bin/nmblookup 0755 root sys -f samba usr/local/samba/bin/smbclient 0755 root sys -f samba usr/local/samba/bin/smbpasswd 0755 root sys -f samba usr/local/samba/bin/smbstatus 0755 root sys -f samba usr/local/samba/bin/testparm 0755 root sys -f samba usr/local/samba/bin/testprns 0755 root sys -f samba usr/local/samba/bin/make_smbcodepage 0755 root sys -f samba usr/local/samba/bin/make_unicodemap 0755 root sys -f samba usr/local/samba/bin/make_printerdef 0755 root sys -f samba usr/local/samba/bin/rpcclient 0755 root sys -f samba usr/local/samba/bin/smbspool 0755 root sys -f samba usr/local/samba/bin/smbsh 0755 root sys -f samba usr/local/samba/bin/smbwrapper.so 0755 root sys -f samba usr/local/samba/bin/mksmbpasswd.sh 0755 root sys -f samba usr/local/samba/bin/smbtar 0755 root sys -f samba usr/local/samba/bin/smbprint 0755 root sys -f samba usr/local/samba/bin/findsmb 0755 root sys -f samba usr/local/samba/bin/smbadduser 0755 root sys -d samba usr/local/samba/sbin 0755 root sys -f samba usr/local/samba/sbin/smbd 0755 root sys -f samba usr/local/samba/sbin/nmbd 0755 root sys -f samba usr/local/samba/sbin/swat 0755 root sys -f samba usr/local/samba/sbin/debug2html 0755 root sys -f samba usr/local/samba/sbin/smbtorture 0755 root sys -f samba usr/local/samba/sbin/smbfilter 0755 root sys -f samba usr/local/samba/sbin/locktest2 0755 root sys -f samba usr/local/samba/sbin/masktest 0755 root sys -d samba usr/local/samba/swat 0755 root sys -d samba usr/local/samba/swat/using_samba 0755 root sys -d samba usr/local/samba/swat/using_samba/gifs 0755 root sys -f samba usr/local/samba/swat/using_samba/gifs/index.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/gifs/samba.s.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/gifs/txthome.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/gifs/txtnexta.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/gifs/txtpreva.gif 0644 root sys -d samba usr/local/samba/swat/using_samba/figs 0755 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0101.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0102.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0103.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0104.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0105.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0106.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0107.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0108.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0109.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0110.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0111.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0112.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0113.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0114.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0201.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0202.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0203.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0204.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0301.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0302.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0303.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0304.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0305.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0306.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0307.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0308.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0309.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0310.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0311.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0312.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0313.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0314.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0315.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0316.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0317.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0318.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0319.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0320.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0321.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0322.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0323.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0324.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0325.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0326.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0327.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0328.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0401.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0402.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0403.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0404.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0405.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0406.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0407.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0501.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0502.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0503.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0504.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0505.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0506.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0507.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0508.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0601.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0602.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0603.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0604.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0605.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0606.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0701.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0702.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0703.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0704.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0705.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0706.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0707.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0708.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0709.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0801.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0802.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0803.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0804.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0805.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0901.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0902.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0903.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0904.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.0905.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.aa01.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.ab01.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/figs/sam.ab02.gif 0644 root sys -f samba usr/local/samba/swat/using_samba/appa_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appa_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appa_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appa_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appa_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appb_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appb_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appb_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appc_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appd_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appe_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/appf_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_06.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_07.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch01_08.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch02_06.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch03_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch03_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch03_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_06.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_07.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch04_08.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch05_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch05_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch05_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch05_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch05_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch06_06.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch07_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch07_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch07_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_04.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_05.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_06.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch08_07.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch09_01.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch09_02.html 0644 root sys -f samba usr/local/samba/swat/using_samba/ch09_03.html 0644 root sys -f samba usr/local/samba/swat/using_samba/index.html 0644 root sys -f samba usr/local/samba/swat/using_samba/inx.html 0644 root sys -f samba usr/local/samba/swat/using_samba/licenseinfo.html 0644 root sys -f samba usr/local/samba/swat/using_samba/this_edition.html 0644 root sys -d samba usr/local/samba/swat/images 0755 root sys -f samba usr/local/samba/swat/images/globals.gif 0644 root sys -f samba usr/local/samba/swat/images/home.gif 0644 root sys -f samba usr/local/samba/swat/images/passwd.gif 0644 root sys -f samba usr/local/samba/swat/images/printers.gif 0644 root sys -f samba usr/local/samba/swat/images/samba.gif 0644 root sys -f samba usr/local/samba/swat/images/shares.gif 0644 root sys -f samba usr/local/samba/swat/images/status.gif 0644 root sys -f samba usr/local/samba/swat/images/viewconfig.gif 0644 root sys -d samba usr/local/samba/swat/help 0755 root sys -f samba usr/local/samba/swat/help/welcome.html 0644 root sys -f samba usr/local/samba/swat/help/DOMAIN_MEMBER.html 0644 root sys -f samba usr/local/samba/swat/help/NT_Security.html 0644 root sys -f samba usr/local/samba/swat/help/findsmb.1.html 0644 root sys -f samba usr/local/samba/swat/help/lmhosts.5.html 0644 root sys -f samba usr/local/samba/swat/help/make_smbcodepage.1.html 0644 root sys -f samba usr/local/samba/swat/help/nmbd.8.html 0644 root sys -f samba usr/local/samba/swat/help/nmblookup.1.html 0644 root sys -f samba usr/local/samba/swat/help/rpcclient.1.html 0644 root sys -f samba usr/local/samba/swat/help/samba-pdc-faq.html 0644 root sys -f samba usr/local/samba/swat/help/samba-pdc-howto.html 0644 root sys -f samba usr/local/samba/swat/help/samba.7.html 0644 root sys -f samba usr/local/samba/swat/help/smb.conf.5.html 0644 root sys -f samba usr/local/samba/swat/help/smbclient.1.html 0644 root sys -f samba usr/local/samba/swat/help/smbcontrol.1.html 0644 root sys -f samba usr/local/samba/swat/help/smbd.8.html 0644 root sys -f samba usr/local/samba/swat/help/smbpasswd.5.html 0644 root sys -f samba usr/local/samba/swat/help/smbpasswd.8.html 0644 root sys -f samba usr/local/samba/swat/help/smbrun.1.html 0644 root sys -f samba usr/local/samba/swat/help/smbsh.1.html 0644 root sys -f samba usr/local/samba/swat/help/smbspool.8.html 0644 root sys -f samba usr/local/samba/swat/help/smbstatus.1.html 0644 root sys -f samba usr/local/samba/swat/help/smbtar.1.html 0644 root sys -f samba usr/local/samba/swat/help/swat.8.html 0644 root sys -f samba usr/local/samba/swat/help/testparm.1.html 0644 root sys -f samba usr/local/samba/swat/help/testprns.1.html 0644 root sys -f samba usr/local/samba/swat/help/wbinfo.1.html 0644 root sys -f samba usr/local/samba/swat/help/winbindd.8.html 0644 root sys -d samba usr/local/samba/swat/include 0755 root sys -f samba usr/local/samba/swat/include/footer.html 0644 root sys -f samba usr/local/samba/swat/include/header.html 0644 root sys -f samba usr/local/samba/swat/README 0644 root sys -d samba usr/local/samba/man 0755 root sys -d samba usr/local/samba/man/man1 0755 root sys -f samba usr/local/samba/man/man1/findsmb.1 0644 root sys -f samba usr/local/samba/man/man1/make_smbcodepage.1 0644 root sys -f samba usr/local/samba/man/man1/make_unicodemap.1 0644 root sys -f samba usr/local/samba/man/man1/nmblookup.1 0644 root sys -f samba usr/local/samba/man/man1/smbclient.1 0644 root sys -f samba usr/local/samba/man/man1/smbcontrol.1 0644 root sys -f samba usr/local/samba/man/man1/smbrun.1 0644 root sys -f samba usr/local/samba/man/man1/smbsh.1 0644 root sys -f samba usr/local/samba/man/man1/smbstatus.1 0644 root sys -f samba usr/local/samba/man/man1/smbtar.1 0644 root sys -f samba usr/local/samba/man/man1/testparm.1 0644 root sys -f samba usr/local/samba/man/man1/testprns.1 0644 root sys -f samba usr/local/samba/man/man1/wbinfo.1 0644 root sys -d samba usr/local/samba/man/man5 0755 root sys -f samba usr/local/samba/man/man5/smb.conf.5 0644 root sys -f samba usr/local/samba/man/man5/lmhosts.5 0644 root sys -f samba usr/local/samba/man/man5/smbpasswd.5 0644 root sys -d samba usr/local/samba/man/man7 0755 root sys -f samba usr/local/samba/man/man7/samba.7 0644 root sys -d samba usr/local/samba/man/man8 0755 root sys -f samba usr/local/samba/man/man8/smbd.8 0644 root sys -f samba usr/local/samba/man/man8/nmbd.8 0644 root sys -f samba usr/local/samba/man/man8/smbpasswd.8 0644 root sys -f samba usr/local/samba/man/man8/swat.8 0644 root sys -f samba usr/local/samba/man/man8/smbmount.8 0644 root sys -f samba usr/local/samba/man/man8/smbmnt.8 0644 root sys -f samba usr/local/samba/man/man8/smbumount.8 0644 root sys -d samba usr/local/samba/var 0755 root sys -d samba usr/local/samba/var/locks 0755 root sys -d samba usr/local/samba/lib 0755 root sys -d samba usr/local/samba/lib/codepages 0755 root sys -d samba usr/local/samba/lib/codepages/src 0755 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.437 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.737 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.775 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.850 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.852 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.861 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.866 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.932 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.936 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.949 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.950 0644 root sys -f samba usr/local/samba/lib/codepages/src/codepage_def.1251 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP437.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP737.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP850.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP852.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP861.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP866.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP932.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP936.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP949.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CP950.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CPISO8859-1.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CPISO8859-2.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CPISO8859-5.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CPISO8859-7.TXT 0644 root sys -f samba usr/local/samba/lib/codepages/src/CPKOI8-R.TXT 0644 root sys -f samba usr/local/samba/lib/smb.conf 0644 root sys -d samba usr/local/man 0755 root sys -d samba usr/local/man/html 0755 root sys -s samba usr/local/man/html/samba=/usr/local/samba/swat/using_samba +d samba usr/lib 0755 root sys +d samba usr/lib/samba 0755 root sys +d samba usr/lib/samba/bin 0755 root sys +f samba usr/lib/samba/bin/nmblookup 0755 root sys +f samba usr/lib/samba/bin/smbclient 0755 root sys +f samba usr/lib/samba/bin/smbpasswd 0755 root sys +f samba usr/lib/samba/bin/smbstatus 0755 root sys +f samba usr/lib/samba/bin/testparm 0755 root sys +f samba usr/lib/samba/bin/testprns 0755 root sys +f samba usr/lib/samba/bin/make_smbcodepage 0755 root sys +f samba usr/lib/samba/bin/make_unicodemap 0755 root sys +f samba usr/lib/samba/bin/make_printerdef 0755 root sys +f samba usr/lib/samba/bin/rpcclient 0755 root sys +f samba usr/lib/samba/bin/smbspool 0755 root sys +f samba usr/lib/samba/bin/mksmbpasswd.sh 0755 root sys +f samba usr/lib/samba/bin/smbtar 0755 root sys +f samba usr/lib/samba/bin/smbprint 0755 root sys +f samba usr/lib/samba/bin/findsmb 0755 root sys +f samba usr/lib/samba/bin/smbadduser 0755 root sys +d samba usr/lib/samba/sbin 0755 root sys +f samba usr/lib/samba/sbin/smbd 0755 root sys +f samba usr/lib/samba/sbin/nmbd 0755 root sys +f samba usr/lib/samba/sbin/swat 0755 root sys +f samba usr/lib/samba/sbin/debug2html 0755 root sys +f samba usr/lib/samba/sbin/smbtorture 0755 root sys +f samba usr/lib/samba/sbin/smbfilter 0755 root sys +f samba usr/lib/samba/sbin/locktest2 0755 root sys +f samba usr/lib/samba/sbin/masktest 0755 root sys +d samba usr/lib/samba/swat 0755 root sys +d samba usr/lib/samba/swat/using_samba 0755 root sys +d samba usr/lib/samba/swat/using_samba/gifs 0755 root sys +f samba usr/lib/samba/swat/using_samba/gifs/index.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/gifs/samba.s.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/gifs/txthome.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/gifs/txtnexta.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/gifs/txtpreva.gif 0644 root sys +d samba usr/lib/samba/swat/using_samba/figs 0755 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0101.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0102.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0103.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0104.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0105.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0106.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0107.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0108.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0109.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0110.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0111.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0112.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0113.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0114.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0201.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0202.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0203.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0204.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0301.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0302.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0303.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0304.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0305.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0306.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0307.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0308.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0309.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0310.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0311.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0312.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0313.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0314.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0315.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0316.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0317.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0318.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0319.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0320.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0321.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0322.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0323.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0324.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0325.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0326.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0327.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0328.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0401.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0402.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0403.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0404.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0405.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0406.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0407.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0501.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0502.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0503.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0504.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0505.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0506.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0507.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0508.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0601.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0602.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0603.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0604.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0605.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0606.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0701.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0702.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0703.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0704.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0705.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0706.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0707.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0708.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0709.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0801.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0802.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0803.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0804.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0805.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0901.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0902.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0903.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0904.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.0905.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.aa01.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.ab01.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/figs/sam.ab02.gif 0644 root sys +f samba usr/lib/samba/swat/using_samba/appa_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appa_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appa_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appa_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appa_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appb_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appb_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appb_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appc_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appd_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appe_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/appf_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_06.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_07.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch01_08.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch02_06.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch03_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch03_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch03_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_06.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_07.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch04_08.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch05_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch05_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch05_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch05_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch05_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch06_06.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch07_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch07_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch07_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_04.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_05.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_06.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch08_07.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch09_01.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch09_02.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/ch09_03.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/index.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/inx.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/licenseinfo.html 0644 root sys +f samba usr/lib/samba/swat/using_samba/this_edition.html 0644 root sys +d samba usr/lib/samba/swat/images 0755 root sys +f samba usr/lib/samba/swat/images/globals.gif 0644 root sys +f samba usr/lib/samba/swat/images/home.gif 0644 root sys +f samba usr/lib/samba/swat/images/passwd.gif 0644 root sys +f samba usr/lib/samba/swat/images/printers.gif 0644 root sys +f samba usr/lib/samba/swat/images/samba.gif 0644 root sys +f samba usr/lib/samba/swat/images/shares.gif 0644 root sys +f samba usr/lib/samba/swat/images/status.gif 0644 root sys +f samba usr/lib/samba/swat/images/viewconfig.gif 0644 root sys +d samba usr/lib/samba/swat/help 0755 root sys +f samba usr/lib/samba/swat/help/welcome.html 0644 root sys +f samba usr/lib/samba/swat/help/DOMAIN_MEMBER.html 0644 root sys +f samba usr/lib/samba/swat/help/NT_Security.html 0644 root sys +f samba usr/lib/samba/swat/help/findsmb.1.html 0644 root sys +f samba usr/lib/samba/swat/help/lmhosts.5.html 0644 root sys +f samba usr/lib/samba/swat/help/make_smbcodepage.1.html 0644 root sys +f samba usr/lib/samba/swat/help/nmbd.8.html 0644 root sys +f samba usr/lib/samba/swat/help/nmblookup.1.html 0644 root sys +f samba usr/lib/samba/swat/help/rpcclient.1.html 0644 root sys +f samba usr/lib/samba/swat/help/samba.7.html 0644 root sys +f samba usr/lib/samba/swat/help/smb.conf.5.html 0644 root sys +f samba usr/lib/samba/swat/help/smbclient.1.html 0644 root sys +f samba usr/lib/samba/swat/help/smbcontrol.1.html 0644 root sys +f samba usr/lib/samba/swat/help/smbd.8.html 0644 root sys +f samba usr/lib/samba/swat/help/smbpasswd.5.html 0644 root sys +f samba usr/lib/samba/swat/help/smbpasswd.8.html 0644 root sys +f samba usr/lib/samba/swat/help/smbsh.1.html 0644 root sys +f samba usr/lib/samba/swat/help/smbspool.8.html 0644 root sys +f samba usr/lib/samba/swat/help/smbstatus.1.html 0644 root sys +f samba usr/lib/samba/swat/help/smbtar.1.html 0644 root sys +f samba usr/lib/samba/swat/help/swat.8.html 0644 root sys +f samba usr/lib/samba/swat/help/testparm.1.html 0644 root sys +f samba usr/lib/samba/swat/help/testprns.1.html 0644 root sys +f samba usr/lib/samba/swat/help/wbinfo.1.html 0644 root sys +f samba usr/lib/samba/swat/help/winbindd.8.html 0644 root sys +d samba usr/lib/samba/swat/include 0755 root sys +f samba usr/lib/samba/swat/include/footer.html 0644 root sys +f samba usr/lib/samba/swat/include/header.html 0644 root sys +f samba usr/lib/samba/swat/README 0644 root sys +d samba usr/lib/samba/man 0755 root sys +d samba usr/lib/samba/man/man1 0755 root sys +f samba usr/lib/samba/man/man1/findsmb.1 0644 root sys +f samba usr/lib/samba/man/man1/make_smbcodepage.1 0644 root sys +f samba usr/lib/samba/man/man1/make_unicodemap.1 0644 root sys +f samba usr/lib/samba/man/man1/nmblookup.1 0644 root sys +f samba usr/lib/samba/man/man1/smbclient.1 0644 root sys +f samba usr/lib/samba/man/man1/smbcontrol.1 0644 root sys +f samba usr/lib/samba/man/man1/smbsh.1 0644 root sys +f samba usr/lib/samba/man/man1/smbstatus.1 0644 root sys +f samba usr/lib/samba/man/man1/smbtar.1 0644 root sys +f samba usr/lib/samba/man/man1/testparm.1 0644 root sys +f samba usr/lib/samba/man/man1/testprns.1 0644 root sys +f samba usr/lib/samba/man/man1/wbinfo.1 0644 root sys +d samba usr/lib/samba/man/man5 0755 root sys +f samba usr/lib/samba/man/man5/smb.conf.5 0644 root sys +f samba usr/lib/samba/man/man5/lmhosts.5 0644 root sys +f samba usr/lib/samba/man/man5/smbpasswd.5 0644 root sys +d samba usr/lib/samba/man/man7 0755 root sys +f samba usr/lib/samba/man/man7/samba.7 0644 root sys +d samba usr/lib/samba/man/man8 0755 root sys +f samba usr/lib/samba/man/man8/smbd.8 0644 root sys +f samba usr/lib/samba/man/man8/nmbd.8 0644 root sys +f samba usr/lib/samba/man/man8/smbpasswd.8 0644 root sys +f samba usr/lib/samba/man/man8/swat.8 0644 root sys +f samba usr/lib/samba/man/man8/smbmount.8 0644 root sys +f samba usr/lib/samba/man/man8/smbmnt.8 0644 root sys +f samba usr/lib/samba/man/man8/smbumount.8 0644 root sys +d samba usr/lib/samba/var 0755 root sys +d samba usr/lib/samba/var/locks 0755 root sys +d samba usr/lib/samba/lib 0755 root sys +d samba usr/lib/samba/lib/codepages 0755 root sys +d samba usr/lib/samba/lib/codepages/src 0755 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.437 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.737 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.775 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.850 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.852 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.861 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.866 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.932 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.936 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.949 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.950 0644 root sys +f samba usr/lib/samba/lib/codepages/src/codepage_def.1251 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP437.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP737.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP850.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP852.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP861.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP866.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP932.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP936.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP949.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CP950.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CPISO8859-1.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CPISO8859-2.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CPISO8859-5.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CPISO8859-7.TXT 0644 root sys +f samba usr/lib/samba/lib/codepages/src/CPKOI8-R.TXT 0644 root sys +f samba usr/lib/samba/lib/smb.conf 0644 root sys +d samba usr/man 0755 root sys +s samba usr/man/html.1samba=/usr/lib/samba/swat/using_samba diff --git a/packaging/Caldera/UnixWare/smb.init b/packaging/Caldera/UnixWare/smb.init index 535179a25a9..ce6c6fa4b38 100755 --- a/packaging/Caldera/UnixWare/smb.init +++ b/packaging/Caldera/UnixWare/smb.init @@ -34,13 +34,11 @@ start() { # $SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf $SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf - $SAMBADIR/sbin/winbindd } stop() { killproc nmbd killproc smbd - killproc winbindd } # Start/stop processes required for samba server -- cgit From 415f9d92bc0a37d38b81a653a4b4c5f0fefa2fe8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 16 Apr 2002 22:38:04 +0000 Subject: Fix incorrect zpadlen handling in fmtfp. Thanks to Ollie Oldham for spotting it. few mods to make it easier to compile the tests. addedd the "Ollie" test to the floating point ones. --- source/lib/snprintf.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c index 9a9dcdbae1e..3034dfaaf68 100644 --- a/source/lib/snprintf.c +++ b/source/lib/snprintf.c @@ -57,6 +57,12 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" +#else +#define NULL 0 +#endif + +#ifdef TEST_SNPRINTF /* need math library headers for testing */ +#include #endif #ifdef HAVE_STRING_H @@ -656,9 +662,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, /* Convert integer part */ do { - temp = intpart; - my_modf(intpart*0.1, &intpart); - temp = temp*0.1; + temp = intpart*0.1; + my_modf(temp, &intpart); index = (int) ((temp -intpart +0.05)* 10.0); /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ /* printf ("%llf, %f, %x\n", temp, intpart, index); */ @@ -672,9 +677,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (fracpart) { do { - temp = fracpart; - my_modf(fracpart*0.1, &fracpart); - temp = temp*0.1; + temp = fracpart*0.1; + my_modf(temp, &fracpart); index = (int) ((temp -fracpart +0.05)* 10.0); /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ @@ -726,14 +730,14 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } - - while (zpadlen > 0) { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); @@ -853,7 +857,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) NULL }; double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 0}; + 0.9996, 1.996, 4.136, 5.030201, 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", @@ -948,8 +952,10 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { - snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x)); - sprintf(buf2, "%1.1f", v0*pow(10, x)); + double p = pow(10, x); + double r = v0*p; + snprintf(buf1, sizeof(buf1), "%1.1f", r); + sprintf(buf2, "%1.1f", r); if (strcmp(buf1, buf2)) { printf("we seem to support %d digits\n", x-1); break; -- cgit From a538efe7d00e7a61df194ca1c22e0583dcbb7a4a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Apr 2002 22:55:39 +0000 Subject: stricter conditions on termination in strings this was a very nasty bug with filename corruption and NT4 clients. The exact termination conditions are quite critical ... --- source/lib/charcnv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 803cda36c83..cd327795949 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -356,9 +356,9 @@ int pull_ascii(char *dest, const void *src, int dest_len, int src_len, int flags if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen(src)+1; + src_len = strlen(src); } else { - src_len = strnlen(src, src_len) + 1; + src_len = strnlen(src, src_len); } } @@ -551,9 +551,9 @@ int pull_ucs2(const void *base_ptr, char *dest, const void *src, int dest_len, i if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen_w(src)*2+2; + src_len = strlen_w(src)*2; } else { - src_len = strnlen_w(src, src_len/2)*2+2; + src_len = strnlen_w(src, src_len/2)*2; } } @@ -623,9 +623,9 @@ int pull_utf8(char *dest, const void *src, int dest_len, int src_len, int flags) if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen(src)+1; + src_len = strlen(src); } else { - src_len = strnlen(src, src_len) + 1; + src_len = strnlen(src, src_len); } } -- cgit From 18d5ffd835165d2570443c979d9157e2388b37d8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 16 Apr 2002 22:56:08 +0000 Subject: sync with 2.2 --- source/lib/snprintf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c index 3034dfaaf68..27336261086 100644 --- a/source/lib/snprintf.c +++ b/source/lib/snprintf.c @@ -100,6 +100,11 @@ #define LLONG long #endif +/* free memory if the pointer is valid and zero the pointer */ +#ifndef SAFE_FREE +#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) +#endif + static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, @@ -822,10 +827,10 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { char *msg = NULL; vasprintf(&msg, format, arglist); - if (!msg) - return; - syslog(facility_priority, "%s", msg); - free(msg); + if (!msg) + return; + syslog(facility_priority, "%s", msg); + SAFE_FREE(msg); } #endif /* HAVE_SYSLOG */ #endif /* HAVE_VSYSLOG */ -- cgit From 2c9774352ce278c533930f59ffd571d0753a814c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 16 Apr 2002 22:57:34 +0000 Subject: sync with HEAD --- source/lib/snprintf.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c index 0b0bdb0b335..27336261086 100644 --- a/source/lib/snprintf.c +++ b/source/lib/snprintf.c @@ -57,6 +57,12 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" +#else +#define NULL 0 +#endif + +#ifdef TEST_SNPRINTF /* need math library headers for testing */ +#include #endif #ifdef HAVE_STRING_H @@ -661,9 +667,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, /* Convert integer part */ do { - temp = intpart; - my_modf(intpart*0.1, &intpart); - temp = temp*0.1; + temp = intpart*0.1; + my_modf(temp, &intpart); index = (int) ((temp -intpart +0.05)* 10.0); /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ /* printf ("%llf, %f, %x\n", temp, intpart, index); */ @@ -677,9 +682,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (fracpart) { do { - temp = fracpart; - my_modf(fracpart*0.1, &fracpart); - temp = temp*0.1; + temp = fracpart*0.1; + my_modf(temp, &fracpart); index = (int) ((temp -fracpart +0.05)* 10.0); /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ @@ -731,14 +735,14 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } - - while (zpadlen > 0) { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); @@ -858,7 +862,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) NULL }; double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 0}; + 0.9996, 1.996, 4.136, 5.030201, 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", @@ -953,8 +957,10 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { - snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x)); - sprintf(buf2, "%1.1f", v0*pow(10, x)); + double p = pow(10, x); + double r = v0*p; + snprintf(buf1, sizeof(buf1), "%1.1f", r); + sprintf(buf2, "%1.1f", r); if (strcmp(buf1, buf2)) { printf("we seem to support %d digits\n", x-1); break; -- cgit From e8fbf853e0eed61bb7405be731f18fb2426f8dc4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Apr 2002 02:37:46 +0000 Subject: make suure we get the return value from the pull_*() functions right for both null terminated and buffer length terminated strings --- source/lib/charcnv.c | 18 ++++++++++++------ source/lib/util_str.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index cd327795949..a6db2861344 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -356,9 +356,11 @@ int pull_ascii(char *dest, const void *src, int dest_len, int src_len, int flags if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen(src); + src_len = strlen(src) + 1; } else { - src_len = strnlen(src, src_len); + int len = strnlen(src, src_len); + if (len < src_len) len++; + src_len = len; } } @@ -551,9 +553,11 @@ int pull_ucs2(const void *base_ptr, char *dest, const void *src, int dest_len, i if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen_w(src)*2; + src_len = strlen_w(src)*2 + 2; } else { - src_len = strnlen_w(src, src_len/2)*2; + int len = strnlen_w(src, src_len/2); + if (len < src_len/2) len++; + src_len = len*2; } } @@ -623,9 +627,11 @@ int pull_utf8(char *dest, const void *src, int dest_len, int src_len, int flags) if (flags & STR_TERMINATE) { if (src_len == -1) { - src_len = strlen(src); + src_len = strlen(src) + 1; } else { - src_len = strnlen(src, src_len); + int len = strnlen(src, src_len); + if (len < src_len) len++; + src_len = len; } } diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 9a841a36b3e..f6e579ddba1 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1004,7 +1004,7 @@ some platforms don't have strndup #ifndef HAVE_STRNLEN /******************************************************************* -some platforms don't have strndup +some platforms don't have strnlen ********************************************************************/ size_t strnlen(const char *s, size_t n) { -- cgit From 3714e4ec43fbdf79221624349334fc9d63a313f0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Apr 2002 05:42:19 +0000 Subject: disabled the traversal of the brlock database at startup and shutdown. I have just helped debug a very large Solaris server where the traversal was taking so long that the clients timed out, created a new process which in turn did a traversal! we will need to find some other way of doing a brlock.tdb cleanup (if its even needed at all) --- source/locking/brlock.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/locking/brlock.c b/source/locking/brlock.c index e7fa4022f62..26cdc6a6195 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -233,9 +233,12 @@ void brl_init(int read_only) return; } +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ /* delete any dead locks */ if (!read_only) tdb_traverse(tdb, delete_fn, &check_self); +#endif } /**************************************************************************** @@ -249,9 +252,12 @@ void brl_shutdown(int read_only) if (!tdb) return; +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ /* delete any dead locks */ if (!read_only) tdb_traverse(tdb, delete_fn, &check_self); +#endif tdb_close(tdb); } -- cgit From 2728d131356313db0d6341b0a01d6625d13367c3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Apr 2002 05:43:05 +0000 Subject: disabled the traversal of the brlock database at startup and shutdown. I have just helped debug a very large Solaris server where the traversal was taking so long that the clients timed out, created a new process which in turn did a traversal! we will need to find some other way of doing a brlock.tdb cleanup (if its even needed at all) --- source/locking/brlock.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/locking/brlock.c b/source/locking/brlock.c index e7fa4022f62..abc20c8f0f7 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -232,10 +232,6 @@ void brl_init(int read_only) DEBUG(0,("Failed to open byte range locking database\n")); return; } - - /* delete any dead locks */ - if (!read_only) - tdb_traverse(tdb, delete_fn, &check_self); } /**************************************************************************** @@ -249,10 +245,6 @@ void brl_shutdown(int read_only) if (!tdb) return; - /* delete any dead locks */ - if (!read_only) - tdb_traverse(tdb, delete_fn, &check_self); - tdb_close(tdb); } -- cgit From 28c1fae4d89399ec4d15bfb3ccd17d8b5b0495fc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 17 Apr 2002 06:43:47 +0000 Subject: Fixed command line argument parsing. --- source/rpcclient/rpcclient.c | 124 +++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 70 deletions(-) diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 7d49e7a9cb3..1b3d0a756df 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -594,19 +594,16 @@ static void usage(void) int main(int argc, char *argv[]) { - extern char *optarg; - extern int optind; extern pstring global_myname; static int got_pass = 0; BOOL interactive = True; int opt; int olddebug; - static char *cmdstr = ""; + static char *cmdstr = "", *server; struct cli_state *cli; fstring password="", username="", - domain="", - server=""; + domain=""; static char *opt_authfile=NULL, *opt_username=NULL, *opt_domain=NULL, @@ -649,78 +646,65 @@ static void usage(void) return 0; } - if (strncmp("//", argv[1], 2) == 0 || strncmp("\\\\", argv[1], 2) == 0) - argv[1] += 2; - - pstrcpy(server, argv[1]); + pc = poptGetContext("rpcclient", argc, (const char **) argv, + long_options, 0); + + while((opt = poptGetNextOpt(pc)) != -1) { + switch (opt) { + case 'A': + /* only get the username, password, and domain from the file */ + read_authfile (opt_authfile, username, password, domain); + if (strlen (password)) + got_pass = 1; + break; + + case 'l': + slprintf(logfile, sizeof(logfile) - 1, "%s.client", + opt_logfile); + lp_set_logfile(logfile); + interactive = False; + break; + + case 's': + pstrcpy(dyn_CONFIGFILE, opt_configfile); + break; + + case 'd': + DEBUGLEVEL = opt_debuglevel; + break; + + case 'U': { + char *lp; - argv++; - argc--; + pstrcpy(username,opt_username); - pc = poptGetContext(NULL, argc, (const char **) argv, long_options, - POPT_CONTEXT_KEEP_FIRST); - - while (argc > optind) { - while((opt = poptGetNextOpt(pc)) != -1) { - switch (opt) { - case 'A': - /* only get the username, password, and domain from the file */ - read_authfile (opt_authfile, username, password, domain); - if (strlen (password)) - got_pass = 1; - break; - - case 'l': - slprintf(logfile, sizeof(logfile) - 1, "%s.client", - opt_logfile); - lp_set_logfile(logfile); - interactive = False; - break; - - case 's': - pstrcpy(dyn_CONFIGFILE, opt_configfile); - break; - - case 'd': - DEBUGLEVEL = opt_debuglevel; - break; - - case 'U': { - char *lp; - pstrcpy(username,opt_username); - if ((lp=strchr_m(username,'%'))) { - *lp = 0; - pstrcpy(password,lp+1); - got_pass = 1; - memset(strchr_m(opt_username,'%')+1,'X',strlen(password)); - } - break; - } - - case 'W': - pstrcpy(domain, opt_domain); - break; - - case 'h': - default: - usage(); - exit(1); + if ((lp=strchr_m(username,'%'))) { + *lp = 0; + pstrcpy(password,lp+1); + got_pass = 1; + memset(strchr_m(opt_username,'%') + 1, 'X', + strlen(password)); } + break; } - - if (argc > optind) { - if (strncmp("//", argv[optind], 2) == 0 || - strncmp("\\\\", argv[optind], 2) == 0) - { - argv[optind] += 2; - } - - pstrcpy(server, argv[optind]); - optind ++; + + case 'W': + pstrcpy(domain, opt_domain); + break; + + case 'h': + default: + usage(); + exit(1); } } - if (!server[0]) { + /* Get server as remaining unparsed argument. Print usage if more + than one unparsed argument is present. */ + + server = poptGetArg(pc); + + if (!server || poptGetArg(pc)) { usage(); return 1; } -- cgit From 3447395f1737ef1170455c8aa0d365449120cfd8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 16:58:09 +0000 Subject: Fix unused warnings with deleted code. Jeremy. --- source/locking/brlock.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/locking/brlock.c b/source/locking/brlock.c index 26cdc6a6195..8c22f7d7ab2 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -162,6 +162,10 @@ static BOOL brl_conflict_other(struct lock_struct *lck1, struct lock_struct *lck } +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ + /* delete any dead locks */ + /**************************************************************************** Delete a record if it is for a dead process, if check_self is true, then delete any records belonging to this pid also (there shouldn't be any). @@ -215,6 +219,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat tdb_chainunlock(tdb, kbuf); return 0; } +#endif /**************************************************************************** Open up the brlock.tdb database. @@ -222,8 +227,6 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat void brl_init(int read_only) { - BOOL check_self = False; - if (tdb) return; tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST), @@ -236,8 +239,10 @@ void brl_init(int read_only) #if DONT_DO_THIS /* doing this traversal could kill solaris machines under high load (tridge) */ /* delete any dead locks */ - if (!read_only) + if (!read_only) { + BOOL check_self = False; tdb_traverse(tdb, delete_fn, &check_self); + } #endif } @@ -247,16 +252,16 @@ void brl_init(int read_only) void brl_shutdown(int read_only) { - BOOL check_self = True; - if (!tdb) return; #if DONT_DO_THIS /* doing this traversal could kill solaris machines under high load (tridge) */ /* delete any dead locks */ - if (!read_only) + if (!read_only) { + BOOL check_self = True; tdb_traverse(tdb, delete_fn, &check_self); + } #endif tdb_close(tdb); -- cgit From 255c68856eeccf75b152e15be66130175907188c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 16:58:12 +0000 Subject: Fix unused warnings with deleted code. Jeremy. --- source/locking/brlock.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/source/locking/brlock.c b/source/locking/brlock.c index abc20c8f0f7..8c22f7d7ab2 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -162,6 +162,10 @@ static BOOL brl_conflict_other(struct lock_struct *lck1, struct lock_struct *lck } +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ + /* delete any dead locks */ + /**************************************************************************** Delete a record if it is for a dead process, if check_self is true, then delete any records belonging to this pid also (there shouldn't be any). @@ -215,6 +219,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat tdb_chainunlock(tdb, kbuf); return 0; } +#endif /**************************************************************************** Open up the brlock.tdb database. @@ -222,8 +227,6 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat void brl_init(int read_only) { - BOOL check_self = False; - if (tdb) return; tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST), @@ -232,6 +235,15 @@ void brl_init(int read_only) DEBUG(0,("Failed to open byte range locking database\n")); return; } + +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ + /* delete any dead locks */ + if (!read_only) { + BOOL check_self = False; + tdb_traverse(tdb, delete_fn, &check_self); + } +#endif } /**************************************************************************** @@ -240,11 +252,18 @@ void brl_init(int read_only) void brl_shutdown(int read_only) { - BOOL check_self = True; - if (!tdb) return; +#if DONT_DO_THIS + /* doing this traversal could kill solaris machines under high load (tridge) */ + /* delete any dead locks */ + if (!read_only) { + BOOL check_self = True; + tdb_traverse(tdb, delete_fn, &check_self); + } +#endif + tdb_close(tdb); } -- cgit From 6e9572379784c77f3c4e6a95e18a9641880a8ffc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 17:34:38 +0000 Subject: libsmb/cli_netlogon.c: Fixed confusing debug messages. param/loadparm.c: Added missing debugs that would have helped me find a misconfiguration I lost a day on.... Jeremy. --- source/libsmb/cli_netlogon.c | 8 ++++---- source/param/loadparm.c | 27 +++++++++++++-------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/source/libsmb/cli_netlogon.c b/source/libsmb/cli_netlogon.c index 125590b6d3f..12651966d7d 100644 --- a/source/libsmb/cli_netlogon.c +++ b/source/libsmb/cli_netlogon.c @@ -51,7 +51,7 @@ NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, /* create and send a MSRPC command with api NET_REQCHAL */ - DEBUG(4,("cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", + DEBUG(4,("new_cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", cli->desthost, global_myname, credstr(clnt_chal->data))); /* store the parameters */ @@ -108,7 +108,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* create and send a MSRPC command with api NET_AUTH2 */ - DEBUG(4,("cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", + DEBUG(4,("new_cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", cli->srv_name_slash, cli->mach_acct, sec_chan, global_myname, credstr(cli->clnt_cred.challenge.data), neg_flags)); @@ -147,7 +147,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* * Server replied with bad credential. Fail. */ - DEBUG(0,("cli_net_auth2: server %s replied with bad credential (bad machine \ + DEBUG(0,("new_cli_net_auth2: server %s replied with bad credential (bad machine \ password ?).\n", cli->desthost )); result = NT_STATUS_ACCESS_DENIED; goto done; @@ -180,7 +180,7 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, result = new_cli_net_req_chal(cli, &clnt_chal, &srv_chal); if (!NT_STATUS_IS_OK(result)) { - DEBUG(0,("cli_nt_setup_creds: request challenge failed\n")); + DEBUG(0,("new_cli_nt_setup_creds: request challenge failed\n")); return result; } diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 17b9f022f0a..0d8df080bd3 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1505,6 +1505,8 @@ static char *lp_string(const char *s) #define FN_LOCAL_STRING(fn_name,val) \ char *fn_name(int i) {return(lp_string((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val));} +#define FN_LOCAL_CONST_STRING(fn_name,val) \ + const char *fn_name(int i) {return (const char *)((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_LIST(fn_name,val) \ char **fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_BOOL(fn_name,val) \ @@ -1701,6 +1703,7 @@ FN_LOCAL_STRING(lp_postexec, szPostExec) FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec) FN_LOCAL_STRING(lp_rootpostexec, szRootPostExec) FN_LOCAL_STRING(lp_servicename, szService) +FN_LOCAL_CONST_STRING(lp_const_servicename, szService) FN_LOCAL_STRING(lp_pathname, szPath) FN_LOCAL_STRING(lp_dontdescend, szDontdescend) FN_LOCAL_STRING(lp_username, szUsername) @@ -3550,37 +3553,33 @@ static void set_server_role(void) switch (lp_security()) { case SEC_SHARE: - { - if (lp_domain_logons()) { - DEBUG(0, - ("Server's Role (logon server) conflicts with share-level security\n")); - } + if (lp_domain_logons()) + DEBUG(0, ("Server's Role (logon server) conflicts with share-level security\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } case SEC_SERVER: case SEC_DOMAIN: case SEC_ADS: - { if (lp_domain_logons()) { server_role = ROLE_DOMAIN_BDC; + DEBUG(10,("set_server_role:ROLE_DOMAIN_BDC\n")); break; } server_role = ROLE_DOMAIN_MEMBER; + DEBUG(10,("set_server_role: ROLE_DOMAIN_MEMBER\n")); break; - } case SEC_USER: - { if (lp_domain_logons()) { server_role = ROLE_DOMAIN_PDC; + DEBUG(10,("set_server_role: ROLE_DOMAIN_PDC\n")); break; } + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } default: - { - DEBUG(0, - ("Server's Role undefined due to unknown security mode\n")); - } + DEBUG(0, ("Server's Role undefined due to unknown security mode\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); + break; } } -- cgit From 34c61485160356e1deca01475096323f0fe51fe3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 17:34:40 +0000 Subject: libsmb/cli_netlogon.c: Fixed confusing debug messages. param/loadparm.c: Added missing debugs that would have helped me find a misconfiguration I lost a day on.... Jeremy. --- source/libsmb/cli_netlogon.c | 10 +++++----- source/param/loadparm.c | 35 +++++++++++++++-------------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/source/libsmb/cli_netlogon.c b/source/libsmb/cli_netlogon.c index 3065955cdf6..cb438de9873 100644 --- a/source/libsmb/cli_netlogon.c +++ b/source/libsmb/cli_netlogon.c @@ -51,7 +51,7 @@ NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, /* create and send a MSRPC command with api NET_REQCHAL */ - DEBUG(4,("cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", + DEBUG(4,("new_cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", cli->desthost, global_myname, credstr(clnt_chal->data))); /* store the parameters */ @@ -108,7 +108,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* create and send a MSRPC command with api NET_AUTH2 */ - DEBUG(4,("cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", + DEBUG(4,("new_cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", cli->srv_name_slash, cli->mach_acct, sec_chan, global_myname, credstr(cli->clnt_cred.challenge.data), neg_flags)); @@ -147,7 +147,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* * Server replied with bad credential. Fail. */ - DEBUG(0,("cli_net_auth2: server %s replied with bad credential (bad machine \ + DEBUG(0,("new_cli_net_auth2: server %s replied with bad credential (bad machine \ password ?).\n", cli->desthost )); result = NT_STATUS_ACCESS_DENIED; goto done; @@ -180,7 +180,7 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, result = new_cli_net_req_chal(cli, &clnt_chal, &srv_chal); if (!NT_STATUS_IS_OK(result)) { - DEBUG(0,("cli_nt_setup_creds: request challenge failed\n")); + DEBUG(0,("new_cli_nt_setup_creds: request challenge failed\n")); return result; } @@ -206,7 +206,7 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, result = new_cli_net_auth2(cli, sec_chan, 0x000001ff, &srv_chal); if (!NT_STATUS_IS_OK(result)) { - DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n", + DEBUG(0,("new_cli_nt_setup_creds: auth2 challenge failed %s\n", get_nt_error_msg(result))); } diff --git a/source/param/loadparm.c b/source/param/loadparm.c index d4f0a1a66a8..0f87277d339 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -1498,6 +1498,8 @@ static char *lp_string(const char *s) #define FN_LOCAL_STRING(fn_name,val) \ char *fn_name(int i) {return(lp_string((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val));} +#define FN_LOCAL_CONST_STRING(fn_name,val) \ + const char *fn_name(int i) {return(const char *)((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_BOOL(fn_name,val) \ BOOL fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);} #define FN_LOCAL_CHAR(fn_name,val) \ @@ -1679,6 +1681,7 @@ FN_LOCAL_STRING(lp_postexec, szPostExec) FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec) FN_LOCAL_STRING(lp_rootpostexec, szRootPostExec) FN_LOCAL_STRING(lp_servicename, szService) +FN_LOCAL_CONST_STRING(lp_const_servicename, szService) FN_LOCAL_STRING(lp_pathname, szPath) FN_LOCAL_STRING(lp_dontdescend, szDontdescend) FN_LOCAL_STRING(lp_username, szUsername) @@ -3376,42 +3379,34 @@ static void set_server_role(void) { server_role = ROLE_STANDALONE; - switch (lp_security()) - { + switch (lp_security()) { case SEC_SHARE: - { if (lp_domain_logons()) - { - DEBUG(0, - ("Server's Role (logon server) conflicts with share-level security\n")); - } + DEBUG(0, ("Server's Role (logon server) conflicts with share-level security\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } case SEC_SERVER: case SEC_DOMAIN: - { - if (lp_domain_logons()) - { + if (lp_domain_logons()) { server_role = ROLE_DOMAIN_BDC; + DEBUG(10,("set_server_role: ROLE_DOMAIN_BDC\n")); break; } server_role = ROLE_DOMAIN_MEMBER; + DEBUG(10,("set_server_role: ROLE_DOMAIN_MEMBER\n")); break; - } case SEC_USER: - { - if (lp_domain_logons()) - { + if (lp_domain_logons()) { server_role = ROLE_DOMAIN_PDC; + DEBUG(10,("set_server_role: ROLE_DOMAIN_PDC\n")); break; } + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; - } default: - { - DEBUG(0, - ("Server's Role undefined due to unknown security mode\n")); - } + DEBUG(0, ("Server's Role undefined due to unknown security mode\n")); + DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); + break; } } -- cgit From 672227623084edec451fae1f065644339a6c2bae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 21:53:35 +0000 Subject: Fixed the AFP_Resource:$DATA filename creation bug. Jeremy. --- source/smbd/nttrans.c | 516 ++++++++++++++++++++++++++------------------------ 1 file changed, 265 insertions(+), 251 deletions(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 89b199f67db..c05be55e39e 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -686,13 +686,14 @@ int reply_ntcreate_and_X(connection_struct *conn, } if(!dir_fsp->is_directory) { + + get_filename(&fname[0], inbuf, smb_buf(inbuf)-inbuf, + smb_buflen(inbuf),fname_len); + /* * Check to see if this is a mac fork of some kind. */ - get_filename(&fname[0], inbuf, smb_buf(inbuf)-inbuf, - smb_buflen(inbuf),fname_len); - if( strchr(fname, ':')) { END_PROFILE(SMBntcreateX); return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); @@ -734,6 +735,15 @@ int reply_ntcreate_and_X(connection_struct *conn, get_filename(fname, inbuf, smb_buf(inbuf)-inbuf, smb_buflen(inbuf),fname_len); + + /* + * Check to see if this is a mac fork of some kind. + */ + + if( strchr(fname, ':')) { + END_PROFILE(SMBntcreateX); + return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); + } } /* @@ -1105,317 +1115,321 @@ static int call_nt_transact_create(connection_struct *conn, int bufsize, char **ppsetup, char **ppparams, char **ppdata) { - pstring fname; - char *params = *ppparams; - char *data = *ppdata; - int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount); - /* Breakout the oplock request bits so we can set the - reply bits separately. */ - int oplock_request = 0; - mode_t unixmode; - int fmode=0,rmode=0; - SMB_OFF_T file_len = 0; - SMB_STRUCT_STAT sbuf; - int smb_action = 0; - BOOL bad_path = False; - files_struct *fsp = NULL; - char *p = NULL; - uint32 flags; - uint32 desired_access; - uint32 file_attributes; - uint32 share_access; - uint32 create_disposition; - uint32 create_options; - uint32 fname_len; - uint32 sd_len; - uint16 root_dir_fid; - int smb_ofun; - int smb_open_mode; - int smb_attr; - int error_class; - uint32 error_code; - time_t c_time; - - DEBUG(5,("call_nt_transact_create\n")); + pstring fname; + char *params = *ppparams; + char *data = *ppdata; + int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount); + /* Breakout the oplock request bits so we can set the reply bits separately. */ + int oplock_request = 0; + mode_t unixmode; + int fmode=0,rmode=0; + SMB_OFF_T file_len = 0; + SMB_STRUCT_STAT sbuf; + int smb_action = 0; + BOOL bad_path = False; + files_struct *fsp = NULL; + char *p = NULL; + uint32 flags; + uint32 desired_access; + uint32 file_attributes; + uint32 share_access; + uint32 create_disposition; + uint32 create_options; + uint32 fname_len; + uint32 sd_len; + uint16 root_dir_fid; + int smb_ofun; + int smb_open_mode; + int smb_attr; + int error_class; + uint32 error_code; + time_t c_time; - /* - * If it's an IPC, use the pipe handler. - */ + DEBUG(5,("call_nt_transact_create\n")); - if (IS_IPC(conn)) { + /* + * If it's an IPC, use the pipe handler. + */ + + if (IS_IPC(conn)) { if (lp_nt_pipe_support()) return do_nt_transact_create_pipe(conn, inbuf, outbuf, length, bufsize, ppsetup, ppparams, ppdata); else return ERROR_DOS(ERRDOS,ERRbadaccess); - } + } - /* - * Ensure minimum number of parameters sent. - */ + /* + * Ensure minimum number of parameters sent. + */ - if(total_parameter_count < 54) { - DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count)); - return ERROR_DOS(ERRDOS,ERRbadaccess); - } + if(total_parameter_count < 54) { + DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count)); + return ERROR_DOS(ERRDOS,ERRbadaccess); + } - flags = IVAL(params,0); - desired_access = IVAL(params,8); - file_attributes = IVAL(params,20); - share_access = IVAL(params,24); - create_disposition = IVAL(params,28); - create_options = IVAL(params,32); - sd_len = IVAL(params,36); - fname_len = MIN(((uint32)IVAL(params,44)),((uint32)sizeof(fname)-1)); - root_dir_fid = (uint16)IVAL(params,4); - smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK); + flags = IVAL(params,0); + desired_access = IVAL(params,8); + file_attributes = IVAL(params,20); + share_access = IVAL(params,24); + create_disposition = IVAL(params,28); + create_options = IVAL(params,32); + sd_len = IVAL(params,36); + fname_len = MIN(((uint32)IVAL(params,44)),((uint32)sizeof(fname)-1)); + root_dir_fid = (uint16)IVAL(params,4); + smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK); - /* - * We need to construct the open_and_X ofun value from the - * NT values, as that's what our code is structured to accept. - */ + /* + * We need to construct the open_and_X ofun value from the + * NT values, as that's what our code is structured to accept. + */ - if((smb_ofun = map_create_disposition( create_disposition )) == -1) - return ERROR_DOS(ERRDOS,ERRbadmem); + if((smb_ofun = map_create_disposition( create_disposition )) == -1) + return ERROR_DOS(ERRDOS,ERRbadmem); - /* - * Get the file name. - */ + /* + * Get the file name. + */ - if(root_dir_fid != 0) { - /* - * This filename is relative to a directory fid. - */ + if(root_dir_fid != 0) { + /* + * This filename is relative to a directory fid. + */ - files_struct *dir_fsp = file_fsp(params,4); - size_t dir_name_len; + files_struct *dir_fsp = file_fsp(params,4); + size_t dir_name_len; - if(!dir_fsp) - return ERROR_DOS(ERRDOS,ERRbadfid); + if(!dir_fsp) + return ERROR_DOS(ERRDOS,ERRbadfid); - if(!dir_fsp->is_directory) { - /* - * Check to see if this is a mac fork of some kind. - */ + if(!dir_fsp->is_directory) { + get_filename_transact(&fname[0], params, 53, + total_parameter_count - 53 - fname_len, fname_len); - get_filename_transact(&fname[0], params, 53, - total_parameter_count - 53 - fname_len, fname_len); + /* + * Check to see if this is a mac fork of some kind. + */ - if( strchr(fname, ':')) { - return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath)); - } + if( strchr(fname, ':')) + return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath)); - return(ERROR_DOS(ERRDOS,ERRbadfid)); - } + return(ERROR_DOS(ERRDOS,ERRbadfid)); + } - /* - * Copy in the base directory name. - */ + /* + * Copy in the base directory name. + */ - pstrcpy( fname, dir_fsp->fsp_name ); - dir_name_len = strlen(fname); + pstrcpy( fname, dir_fsp->fsp_name ); + dir_name_len = strlen(fname); - /* - * Ensure it ends in a '\'. - */ + /* + * Ensure it ends in a '\'. + */ - if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) { - pstrcat(fname, "\\"); - dir_name_len++; - } + if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) { + pstrcat(fname, "\\"); + dir_name_len++; + } - /* - * This next calculation can refuse a correct filename if we're dealing - * with the Win2k unicode bug, but that would be rare. JRA. - */ + /* + * This next calculation can refuse a correct filename if we're dealing + * with the Win2k unicode bug, but that would be rare. JRA. + */ - if(fname_len + dir_name_len >= sizeof(pstring)) - return(ERROR_DOS(ERRSRV,ERRfilespecs)); + if(fname_len + dir_name_len >= sizeof(pstring)) + return(ERROR_DOS(ERRSRV,ERRfilespecs)); - get_filename_transact(&fname[dir_name_len], params, 53, - total_parameter_count - 53 - fname_len, fname_len); + get_filename_transact(&fname[dir_name_len], params, 53, + total_parameter_count - 53 - fname_len, fname_len); - } else { - get_filename_transact(&fname[0], params, 53, - total_parameter_count - 53 - fname_len, fname_len); - } + } else { + get_filename_transact(&fname[0], params, 53, + total_parameter_count - 53 - fname_len, fname_len); - /* - * Now contruct the smb_open_mode value from the desired access - * and the share access. - */ + /* + * Check to see if this is a mac fork of some kind. + */ - if((smb_open_mode = map_share_mode( fname, create_options, &desired_access, - share_access, file_attributes)) == -1) - return ERROR_DOS(ERRDOS,ERRbadaccess); + if( strchr(fname, ':')) + return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath)); + } - oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; - oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + /* + * Now contruct the smb_open_mode value from the desired access + * and the share access. + */ - /* - * Check if POSIX semantics are wanted. - */ + if((smb_open_mode = map_share_mode( fname, create_options, &desired_access, + share_access, file_attributes)) == -1) + return ERROR_DOS(ERRDOS,ERRbadaccess); - set_posix_case_semantics(file_attributes); + oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; + oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + + /* + * Check if POSIX semantics are wanted. + */ + + set_posix_case_semantics(file_attributes); - RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); + RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); - unix_convert(fname,conn,0,&bad_path,&sbuf); + unix_convert(fname,conn,0,&bad_path,&sbuf); - unixmode = unix_mode(conn,smb_attr | aARCH, fname); + unixmode = unix_mode(conn,smb_attr | aARCH, fname); - /* - * If it's a request for a directory open, deal with it separately. - */ + /* + * If it's a request for a directory open, deal with it separately. + */ - if(create_options & FILE_DIRECTORY_FILE) { + if(create_options & FILE_DIRECTORY_FILE) { - oplock_request = 0; + oplock_request = 0; - /* - * We will get a create directory here if the Win32 - * app specified a security descriptor in the - * CreateDirectory() call. - */ + /* + * We will get a create directory here if the Win32 + * app specified a security descriptor in the + * CreateDirectory() call. + */ - fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); - if(!fsp) { - restore_case_semantics(file_attributes); - set_bad_path_error(errno, bad_path); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } + if(!fsp) { + restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } - } else { + } else { - /* - * Ordinary file case. - */ + /* + * Ordinary file case. + */ - fsp = open_file_shared1(conn,fname,&sbuf,desired_access,smb_open_mode,smb_ofun,unixmode, - oplock_request,&rmode,&smb_action); + fsp = open_file_shared1(conn,fname,&sbuf,desired_access,smb_open_mode,smb_ofun,unixmode, + oplock_request,&rmode,&smb_action); - if (!fsp) { + if (!fsp) { - if(errno == EISDIR) { + if(errno == EISDIR) { - /* - * Fail the open if it was explicitly a non-directory file. - */ + /* + * Fail the open if it was explicitly a non-directory file. + */ - if (create_options & FILE_NON_DIRECTORY_FILE) { - restore_case_semantics(file_attributes); - SSVAL(outbuf, smb_flg2, - SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); - return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY); - } + if (create_options & FILE_NON_DIRECTORY_FILE) { + restore_case_semantics(file_attributes); + SSVAL(outbuf, smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); + return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY); + } - oplock_request = 0; - fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); - - if(!fsp) { + oplock_request = 0; + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); + + if(!fsp) { + restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } + } else { + restore_case_semantics(file_attributes); set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRnoaccess)); } - } else { - - restore_case_semantics(file_attributes); - set_bad_path_error(errno, bad_path); - - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } - } + } - file_len = sbuf.st_size; - fmode = dos_mode(conn,fname,&sbuf); - if(fmode == 0) - fmode = FILE_ATTRIBUTE_NORMAL; + file_len = sbuf.st_size; + fmode = dos_mode(conn,fname,&sbuf); + if(fmode == 0) + fmode = FILE_ATTRIBUTE_NORMAL; - if (fmode & aDIR) { - close_file(fsp,False); - restore_case_semantics(file_attributes); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + if (fmode & aDIR) { + close_file(fsp,False); + restore_case_semantics(file_attributes); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } - /* - * If the caller set the extended oplock request bit - * and we granted one (by whatever means) - set the - * correct bit for extended oplock reply. - */ + /* + * If the caller set the extended oplock request bit + * and we granted one (by whatever means) - set the + * correct bit for extended oplock reply. + */ - if (oplock_request && lp_fake_oplocks(SNUM(conn))) - smb_action |= EXTENDED_OPLOCK_GRANTED; + if (oplock_request && lp_fake_oplocks(SNUM(conn))) + smb_action |= EXTENDED_OPLOCK_GRANTED; - if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) - smb_action |= EXTENDED_OPLOCK_GRANTED; - } + if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) + smb_action |= EXTENDED_OPLOCK_GRANTED; + } - /* - * Now try and apply the desired SD. - */ + /* + * Now try and apply the desired SD. + */ - if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) { - close_file(fsp,False); - restore_case_semantics(file_attributes); - return ERROR_DOS(error_class, error_code); - } + if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) { + close_file(fsp,False); + restore_case_semantics(file_attributes); + return ERROR_DOS(error_class, error_code); + } - restore_case_semantics(file_attributes); + restore_case_semantics(file_attributes); - /* Realloc the size of parameters and data we will return */ - params = Realloc(*ppparams, 69); - if(params == NULL) - return ERROR_DOS(ERRDOS,ERRnomem); + /* Realloc the size of parameters and data we will return */ + params = Realloc(*ppparams, 69); + if(params == NULL) + return ERROR_DOS(ERRDOS,ERRnomem); - *ppparams = params; + *ppparams = params; - memset((char *)params,'\0',69); + memset((char *)params,'\0',69); - p = params; - if (smb_action & EXTENDED_OPLOCK_GRANTED) - SCVAL(p,0, BATCH_OPLOCK_RETURN); - else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) - SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); - else - SCVAL(p,0,NO_OPLOCK_RETURN); + p = params; + if (smb_action & EXTENDED_OPLOCK_GRANTED) + SCVAL(p,0, BATCH_OPLOCK_RETURN); + else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) + SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); + else + SCVAL(p,0,NO_OPLOCK_RETURN); - p += 2; - SSVAL(p,0,fsp->fnum); - p += 2; - SIVAL(p,0,smb_action); - p += 8; - - /* Create time. */ - c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); - - if (lp_dos_filetime_resolution(SNUM(conn))) { - c_time &= ~1; - sbuf.st_atime &= ~1; - sbuf.st_mtime &= ~1; - sbuf.st_mtime &= ~1; - } + p += 2; + SSVAL(p,0,fsp->fnum); + p += 2; + SIVAL(p,0,smb_action); + p += 8; - put_long_date(p,c_time); - p += 8; - put_long_date(p,sbuf.st_atime); /* access time */ - p += 8; - put_long_date(p,sbuf.st_mtime); /* write time */ - p += 8; - put_long_date(p,sbuf.st_mtime); /* change time */ - p += 8; - SIVAL(p,0,fmode); /* File Attributes. */ - p += 4; - SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); - p += 8; - SOFF_T(p,0,file_len); - - DEBUG(5,("call_nt_transact_create: open name = %s\n", fname)); - - /* Send the required number of replies */ - send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0); + /* Create time. */ + c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); - return -1; + if (lp_dos_filetime_resolution(SNUM(conn))) { + c_time &= ~1; + sbuf.st_atime &= ~1; + sbuf.st_mtime &= ~1; + sbuf.st_mtime &= ~1; + } + + put_long_date(p,c_time); + p += 8; + put_long_date(p,sbuf.st_atime); /* access time */ + p += 8; + put_long_date(p,sbuf.st_mtime); /* write time */ + p += 8; + put_long_date(p,sbuf.st_mtime); /* change time */ + p += 8; + SIVAL(p,0,fmode); /* File Attributes. */ + p += 4; + SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); + p += 8; + SOFF_T(p,0,file_len); + + DEBUG(5,("call_nt_transact_create: open name = %s\n", fname)); + + /* Send the required number of replies */ + send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0); + + return -1; } /**************************************************************************** @@ -1710,13 +1724,13 @@ static int call_nt_transact_ioctl(connection_struct *conn, int bufsize, char **ppsetup, char **ppparams, char **ppdata) { - static BOOL logged_message = False; + static BOOL logged_message = False; - if(!logged_message) { - DEBUG(2,("call_nt_transact_ioctl: Currently not implemented.\n")); - logged_message = True; /* Only print this once... */ - } - return ERROR_DOS(ERRSRV,ERRnosupport); + if(!logged_message) { + DEBUG(2,("call_nt_transact_ioctl: Currently not implemented.\n")); + logged_message = True; /* Only print this once... */ + } + return ERROR_DOS(ERRSRV,ERRnosupport); } /**************************************************************************** -- cgit From b6c466e8800c03d154381c02a3893f338430b82d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Apr 2002 21:59:55 +0000 Subject: Fixed the AFP_Resource:$DATA filename creation bug. Jeremy. --- source/smbd/nttrans.c | 494 ++++++++++++++++++++++++++------------------------ 1 file changed, 255 insertions(+), 239 deletions(-) diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 4dec0069f85..06d2b6d24e6 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -454,6 +454,7 @@ to open_mode 0x%x\n", (unsigned long)*desired_access, (unsigned long)share_acces /**************************************************************************** Reply to an NT create and X call on a pipe. ****************************************************************************/ + static int nt_open_pipe(char *fname, connection_struct *conn, char *inbuf, char *outbuf, int *ppnum) { @@ -605,12 +606,13 @@ int reply_ntcreate_and_X(connection_struct *conn, } if(!dir_fsp->is_directory) { + + srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); + /* * Check to see if this is a mac fork of some kind. */ - srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); - if( strchr_m(fname, ':')) { END_PROFILE(SMBntcreateX); return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); @@ -638,6 +640,15 @@ int reply_ntcreate_and_X(connection_struct *conn, srvstr_pull_buf(inbuf, &fname[dir_name_len], smb_buf(inbuf), sizeof(fname)-dir_name_len, STR_TERMINATE); } else { srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE); + + /* + * Check to see if this is a mac fork of some kind. + */ + + if( strchr_m(fname, ':')) { + END_PROFILE(SMBntcreateX); + return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); + } } /* @@ -1004,304 +1015,308 @@ static int call_nt_transact_create(connection_struct *conn, int bufsize, char **ppsetup, char **ppparams, char **ppdata) { - pstring fname; - char *params = *ppparams; - char *data = *ppdata; - int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount); - /* Breakout the oplock request bits so we can set the - reply bits separately. */ - int oplock_request = 0; - mode_t unixmode; - int fmode=0,rmode=0; - SMB_OFF_T file_len = 0; - SMB_STRUCT_STAT sbuf; - int smb_action = 0; - BOOL bad_path = False; - files_struct *fsp = NULL; - char *p = NULL; - uint32 flags; - uint32 desired_access; - uint32 file_attributes; - uint32 share_access; - uint32 create_disposition; - uint32 create_options; - uint32 sd_len; - uint16 root_dir_fid; - int smb_ofun; - int smb_open_mode; - int smb_attr; - int error_class; - uint32 error_code; - time_t c_time; - - DEBUG(5,("call_nt_transact_create\n")); + pstring fname; + char *params = *ppparams; + char *data = *ppdata; + int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount); + /* Breakout the oplock request bits so we can set the reply bits separately. */ + int oplock_request = 0; + mode_t unixmode; + int fmode=0,rmode=0; + SMB_OFF_T file_len = 0; + SMB_STRUCT_STAT sbuf; + int smb_action = 0; + BOOL bad_path = False; + files_struct *fsp = NULL; + char *p = NULL; + uint32 flags; + uint32 desired_access; + uint32 file_attributes; + uint32 share_access; + uint32 create_disposition; + uint32 create_options; + uint32 sd_len; + uint16 root_dir_fid; + int smb_ofun; + int smb_open_mode; + int smb_attr; + int error_class; + uint32 error_code; + time_t c_time; - /* - * If it's an IPC, use the pipe handler. - */ + DEBUG(5,("call_nt_transact_create\n")); - if (IS_IPC(conn)) { + /* + * If it's an IPC, use the pipe handler. + */ + + if (IS_IPC(conn)) { if (lp_nt_pipe_support()) return do_nt_transact_create_pipe(conn, inbuf, outbuf, length, bufsize, ppsetup, ppparams, ppdata); else return ERROR_DOS(ERRDOS,ERRbadaccess); - } + } - /* - * Ensure minimum number of parameters sent. - */ + /* + * Ensure minimum number of parameters sent. + */ - if(total_parameter_count < 54) { - DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count)); - return ERROR_DOS(ERRDOS,ERRbadaccess); - } + if(total_parameter_count < 54) { + DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count)); + return ERROR_DOS(ERRDOS,ERRbadaccess); + } - flags = IVAL(params,0); - desired_access = IVAL(params,8); - file_attributes = IVAL(params,20); - share_access = IVAL(params,24); - create_disposition = IVAL(params,28); - create_options = IVAL(params,32); - sd_len = IVAL(params,36); - root_dir_fid = (uint16)IVAL(params,4); - smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK); + flags = IVAL(params,0); + desired_access = IVAL(params,8); + file_attributes = IVAL(params,20); + share_access = IVAL(params,24); + create_disposition = IVAL(params,28); + create_options = IVAL(params,32); + sd_len = IVAL(params,36); + root_dir_fid = (uint16)IVAL(params,4); + smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK); - /* - * We need to construct the open_and_X ofun value from the - * NT values, as that's what our code is structured to accept. - */ + /* + * We need to construct the open_and_X ofun value from the + * NT values, as that's what our code is structured to accept. + */ - if((smb_ofun = map_create_disposition( create_disposition )) == -1) - return ERROR_DOS(ERRDOS,ERRbadmem); + if((smb_ofun = map_create_disposition( create_disposition )) == -1) + return ERROR_DOS(ERRDOS,ERRbadmem); - /* - * Get the file name. - */ + /* + * Get the file name. + */ - if(root_dir_fid != 0) { - /* - * This filename is relative to a directory fid. - */ + if(root_dir_fid != 0) { + /* + * This filename is relative to a directory fid. + */ - files_struct *dir_fsp = file_fsp(params,4); - size_t dir_name_len; + files_struct *dir_fsp = file_fsp(params,4); + size_t dir_name_len; - if(!dir_fsp) - return ERROR_DOS(ERRDOS,ERRbadfid); + if(!dir_fsp) + return ERROR_DOS(ERRDOS,ERRbadfid); - if(!dir_fsp->is_directory) { - /* - * Check to see if this is a mac fork of some kind. - */ + if(!dir_fsp->is_directory) { - srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); + srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); - if( strchr_m(fname, ':')) { - return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); - } + /* + * Check to see if this is a mac fork of some kind. + */ - return ERROR_DOS(ERRDOS,ERRbadfid); - } + if( strchr_m(fname, ':')) + return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); - /* - * Copy in the base directory name. - */ + return ERROR_DOS(ERRDOS,ERRbadfid); + } - pstrcpy( fname, dir_fsp->fsp_name ); - dir_name_len = strlen(fname); + /* + * Copy in the base directory name. + */ - /* - * Ensure it ends in a '\'. - */ + pstrcpy( fname, dir_fsp->fsp_name ); + dir_name_len = strlen(fname); - if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) { - pstrcat(fname, "\\"); - dir_name_len++; - } + /* + * Ensure it ends in a '\'. + */ - srvstr_pull(inbuf, &fname[dir_name_len], params+53, sizeof(fname)-dir_name_len, - total_parameter_count-53, STR_TERMINATE); - } else { - srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); - } + if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) { + pstrcat(fname, "\\"); + dir_name_len++; + } - /* - * Now contruct the smb_open_mode value from the desired access - * and the share access. - */ + srvstr_pull(inbuf, &fname[dir_name_len], params+53, sizeof(fname)-dir_name_len, + total_parameter_count-53, STR_TERMINATE); + } else { + srvstr_pull(inbuf, fname, params+53, sizeof(fname), total_parameter_count-53, STR_TERMINATE); - if((smb_open_mode = map_share_mode( fname, create_options, &desired_access, - share_access, file_attributes)) == -1) - return ERROR_DOS(ERRDOS,ERRbadaccess); + /* + * Check to see if this is a mac fork of some kind. + */ - oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; - oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + if( strchr_m(fname, ':')) + return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); + } - /* - * Check if POSIX semantics are wanted. - */ + /* + * Now contruct the smb_open_mode value from the desired access + * and the share access. + */ - set_posix_case_semantics(file_attributes); + if((smb_open_mode = map_share_mode( fname, create_options, &desired_access, + share_access, file_attributes)) == -1) + return ERROR_DOS(ERRDOS,ERRbadaccess); + + oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; + oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + + /* + * Check if POSIX semantics are wanted. + */ + + set_posix_case_semantics(file_attributes); - RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); + RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); - unix_convert(fname,conn,0,&bad_path,&sbuf); + unix_convert(fname,conn,0,&bad_path,&sbuf); - unixmode = unix_mode(conn,smb_attr | aARCH, fname); + unixmode = unix_mode(conn,smb_attr | aARCH, fname); - /* - * If it's a request for a directory open, deal with it separately. - */ + /* + * If it's a request for a directory open, deal with it separately. + */ - if(create_options & FILE_DIRECTORY_FILE) { + if(create_options & FILE_DIRECTORY_FILE) { - oplock_request = 0; + oplock_request = 0; - /* - * We will get a create directory here if the Win32 - * app specified a security descriptor in the - * CreateDirectory() call. - */ + /* + * We will get a create directory here if the Win32 + * app specified a security descriptor in the + * CreateDirectory() call. + */ - fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); - if(!fsp) { - restore_case_semantics(file_attributes); - set_bad_path_error(errno, bad_path); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } + if(!fsp) { + restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } - } else { + } else { - /* - * Ordinary file case. - */ + /* + * Ordinary file case. + */ - fsp = open_file_shared1(conn,fname,&sbuf,desired_access, - smb_open_mode,smb_ofun,unixmode, - oplock_request,&rmode,&smb_action); + fsp = open_file_shared1(conn,fname,&sbuf,desired_access, + smb_open_mode,smb_ofun,unixmode, + oplock_request,&rmode,&smb_action); - if (!fsp) { + if (!fsp) { - if(errno == EISDIR) { + if(errno == EISDIR) { - /* - * Fail the open if it was explicitly a non-directory file. - */ + /* + * Fail the open if it was explicitly a non-directory file. + */ - if (create_options & FILE_NON_DIRECTORY_FILE) { - restore_case_semantics(file_attributes); - SSVAL(outbuf, smb_flg2, - SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); - return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY); - } + if (create_options & FILE_NON_DIRECTORY_FILE) { + restore_case_semantics(file_attributes); + SSVAL(outbuf, smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); + return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY); + } - oplock_request = 0; - fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); + oplock_request = 0; + fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action); - if(!fsp) { + if(!fsp) { + restore_case_semantics(file_attributes); + set_bad_path_error(errno, bad_path); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } + } else { restore_case_semantics(file_attributes); set_bad_path_error(errno, bad_path); return(UNIXERROR(ERRDOS,ERRnoaccess)); } - } else { - - restore_case_semantics(file_attributes); - set_bad_path_error(errno, bad_path); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } - } + } - file_len = sbuf.st_size; - fmode = dos_mode(conn,fname,&sbuf); - if(fmode == 0) - fmode = FILE_ATTRIBUTE_NORMAL; + file_len = sbuf.st_size; + fmode = dos_mode(conn,fname,&sbuf); + if(fmode == 0) + fmode = FILE_ATTRIBUTE_NORMAL; - if (fmode & aDIR) { - close_file(fsp,False); - restore_case_semantics(file_attributes); - return ERROR_DOS(ERRDOS,ERRnoaccess); - } + if (fmode & aDIR) { + close_file(fsp,False); + restore_case_semantics(file_attributes); + return ERROR_DOS(ERRDOS,ERRnoaccess); + } - /* - * If the caller set the extended oplock request bit - * and we granted one (by whatever means) - set the - * correct bit for extended oplock reply. - */ + /* + * If the caller set the extended oplock request bit + * and we granted one (by whatever means) - set the + * correct bit for extended oplock reply. + */ - if (oplock_request && lp_fake_oplocks(SNUM(conn))) - smb_action |= EXTENDED_OPLOCK_GRANTED; + if (oplock_request && lp_fake_oplocks(SNUM(conn))) + smb_action |= EXTENDED_OPLOCK_GRANTED; - if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) - smb_action |= EXTENDED_OPLOCK_GRANTED; - } + if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) + smb_action |= EXTENDED_OPLOCK_GRANTED; + } - /* - * Now try and apply the desired SD. - */ + /* + * Now try and apply the desired SD. + */ - if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) { - close_file(fsp,False); - restore_case_semantics(file_attributes); - return ERROR_DOS(error_class, error_code); - } + if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) { + close_file(fsp,False); + restore_case_semantics(file_attributes); + return ERROR_DOS(error_class, error_code); + } - restore_case_semantics(file_attributes); + restore_case_semantics(file_attributes); - /* Realloc the size of parameters and data we will return */ - params = Realloc(*ppparams, 69); - if(params == NULL) - return ERROR_DOS(ERRDOS,ERRnomem); + /* Realloc the size of parameters and data we will return */ + params = Realloc(*ppparams, 69); + if(params == NULL) + return ERROR_DOS(ERRDOS,ERRnomem); - *ppparams = params; + *ppparams = params; - memset((char *)params,'\0',69); + memset((char *)params,'\0',69); - p = params; - if (smb_action & EXTENDED_OPLOCK_GRANTED) - SCVAL(p,0, BATCH_OPLOCK_RETURN); - else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) - SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); - else - SCVAL(p,0,NO_OPLOCK_RETURN); + p = params; + if (smb_action & EXTENDED_OPLOCK_GRANTED) + SCVAL(p,0, BATCH_OPLOCK_RETURN); + else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) + SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); + else + SCVAL(p,0,NO_OPLOCK_RETURN); - p += 2; - SSVAL(p,0,fsp->fnum); - p += 2; - SIVAL(p,0,smb_action); - p += 8; - - /* Create time. */ - c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); - - if (lp_dos_filetime_resolution(SNUM(conn))) { - c_time &= ~1; - sbuf.st_atime &= ~1; - sbuf.st_mtime &= ~1; - sbuf.st_mtime &= ~1; - } + p += 2; + SSVAL(p,0,fsp->fnum); + p += 2; + SIVAL(p,0,smb_action); + p += 8; - put_long_date(p,c_time); - p += 8; - put_long_date(p,sbuf.st_atime); /* access time */ - p += 8; - put_long_date(p,sbuf.st_mtime); /* write time */ - p += 8; - put_long_date(p,sbuf.st_mtime); /* change time */ - p += 8; - SIVAL(p,0,fmode); /* File Attributes. */ - p += 4; - SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); - p += 8; - SOFF_T(p,0,file_len); - - DEBUG(5,("call_nt_transact_create: open name = %s\n", fname)); - - /* Send the required number of replies */ - send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0); + /* Create time. */ + c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); - return -1; + if (lp_dos_filetime_resolution(SNUM(conn))) { + c_time &= ~1; + sbuf.st_atime &= ~1; + sbuf.st_mtime &= ~1; + sbuf.st_mtime &= ~1; + } + + put_long_date(p,c_time); + p += 8; + put_long_date(p,sbuf.st_atime); /* access time */ + p += 8; + put_long_date(p,sbuf.st_mtime); /* write time */ + p += 8; + put_long_date(p,sbuf.st_mtime); /* change time */ + p += 8; + SIVAL(p,0,fmode); /* File Attributes. */ + p += 4; + SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); + p += 8; + SOFF_T(p,0,file_len); + + DEBUG(5,("call_nt_transact_create: open name = %s\n", fname)); + + /* Send the required number of replies */ + send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0); + + return -1; } /**************************************************************************** @@ -1588,18 +1603,19 @@ static int call_nt_transact_set_security_desc(connection_struct *conn, /**************************************************************************** Reply to IOCTL - not implemented - no plans. ****************************************************************************/ + static int call_nt_transact_ioctl(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, char **ppsetup, char **ppparams, char **ppdata) { - static BOOL logged_message = False; + static BOOL logged_message = False; - if(!logged_message) { - DEBUG(0,("call_nt_transact_ioctl: Currently not implemented.\n")); - logged_message = True; /* Only print this once... */ - } - return ERROR_DOS(ERRSRV,ERRnosupport); + if(!logged_message) { + DEBUG(0,("call_nt_transact_ioctl: Currently not implemented.\n")); + logged_message = True; /* Only print this once... */ + } + return ERROR_DOS(ERRSRV,ERRnosupport); } /**************************************************************************** -- cgit From a9dd251d9da7e61e9594bd64e1ef0d91f5b1c878 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Wed, 17 Apr 2002 22:30:56 +0000 Subject: Updating SCO/Caldera OpenServer config files. --- packaging/Caldera/OpenServer/Compile | 10 +-- packaging/Caldera/OpenServer/Configure | 7 +- packaging/Caldera/OpenServer/Install | 5 ++ packaging/Caldera/OpenServer/README | 11 ++- packaging/Caldera/OpenServer/docview.html | 21 +++-- packaging/Caldera/OpenServer/findsmb | 17 +--- packaging/Caldera/OpenServer/initconfig | 4 +- packaging/Caldera/OpenServer/pkg/cdmt.config | 2 +- packaging/Caldera/OpenServer/pkg/cntl/ccs | 91 ---------------------- packaging/Caldera/OpenServer/pkg/cntl/cqs | 53 ++++--------- .../OpenServer/pkg/cntl/packages/SambaDOC/ccs | 12 +-- packaging/Caldera/OpenServer/pkg/input/Samba.pkg | 43 +++++++++- .../Caldera/OpenServer/pkg/input/SambaDOC.pkg | 28 +++++-- .../Caldera/OpenServer/pkg/input/SambaSWAT.pkg | 40 ++++------ packaging/Caldera/OpenServer/smb.conf | 2 +- packaging/Caldera/OpenServer/smb.init | 23 ++---- packaging/Caldera/OpenServer/smb.mkdev | 6 +- packaging/Caldera/OpenServer/smbadduser | 4 +- packaging/Caldera/OpenServer/smbprint | 4 +- 19 files changed, 159 insertions(+), 224 deletions(-) diff --git a/packaging/Caldera/OpenServer/Compile b/packaging/Caldera/OpenServer/Compile index cba414ec743..48cd3683b68 100755 --- a/packaging/Caldera/OpenServer/Compile +++ b/packaging/Caldera/OpenServer/Compile @@ -12,7 +12,7 @@ CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib" CXX="g++" CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib" RANLIB=true -MAKE=/usr/local/bin/make +MAKE=/usr/gnu/bin/make if [ "$V" = "echo" ] then echo "exporting the following shell variables:" @@ -32,15 +32,15 @@ then echo "rm -f mout-1 mout-2 mout-3 mout-4" echo "make all 2>&1 | tee mout-1" echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2" - echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3" - echo "make masktest locktest locktest2 2>&1 | tee mout-3" + echo "make bin/smbspool smbwrapper bin/smbsh bin/wbinfo 2>&1 | tee mout-3" + echo "make masktest locktest locktest2 2>&1 | tee mout-4" else cd ../../../source rm -f mout-1 mout-2 mout-3 mout-4 make all 2>&1 | tee mout-1 make smbfilter smbtorture debug2html 2>&1 | tee mout-2 - make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3 - make masktest locktest locktest2 2>&1 | tee mout-3 + make bin/smbspool smbwrapper bin/smbsh bin/wbinfo 2>&1 | tee mout-3 + make masktest locktest locktest2 2>&1 | tee mout-4 fi # # Not building : diff --git a/packaging/Caldera/OpenServer/Configure b/packaging/Caldera/OpenServer/Configure index 11826339d73..9e303c1dd2e 100755 --- a/packaging/Caldera/OpenServer/Configure +++ b/packaging/Caldera/OpenServer/Configure @@ -17,6 +17,7 @@ PREFIX=/usr/lib/samba LIBDIR=/etc/samba.d PRIVATEDIR=/etc/samba.d LOCKDIR=/var/locks/samba.d +LOGDIR=/var/log/samba.d if [ "$V" = "echo" ] then echo "exporting the following shell variables:" @@ -46,7 +47,8 @@ then --prefix=${PREFIX} \ --libdir=${LIBDIR} \ --with-privatedir=${PRIVATEDIR} \ - --with-lockdir={$LOCKDIR} \ + --with-lockdir=${LOCKDIR} \ + --with-logfilebase=${LOGDIR} \ --with-profile \ --with-syslog \ --with-utmp \ @@ -59,7 +61,8 @@ else --prefix=${PREFIX} \ --libdir=${LIBDIR} \ --with-privatedir=${PRIVATEDIR} \ - --with-lockdir={$LOCKDIR} \ + --with-lockdir=${LOCKDIR} \ + --with-logfilebase=${LOGDIR} \ --with-profile \ --with-syslog \ --with-utmp \ diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install index 0df78034c7b..c3206023707 100755 --- a/packaging/Caldera/OpenServer/Install +++ b/packaging/Caldera/OpenServer/Install @@ -20,6 +20,7 @@ BUILD_ROOT=${HERE}/dist BLDFIX=${BUILD_ROOT}/${PREFIX} $V rm -rf $BUILD_ROOT $V mkdir -p $BUILD_ROOT/etc/init.d +$V mkdir -p $BUILD_ROOT/etc/samba.d $V mkdir -p $BUILD_ROOT/usr/lib/mkdev $V mkdir -p $BUILD_ROOT/doc $V mkdir -p ${BLDFIX}/bin @@ -126,6 +127,7 @@ $V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man.8 $V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man.8 $V install -m644 ${PKGDIR}/smb.conf $BUILD_ROOT/etc/samba.d/smb.conf.default $V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/samba.d/smbusers +$V install -m644 ${PKGDIR}/lmhosts $BUILD_ROOT/etc/samba.d/lmhosts $V install -m755 ${PKGDIR}/smbprint ${BLDFIX}/bin $V install -m755 ${PKGDIR}/findsmb ${BLDFIX}/bin $V install -m755 ${PKGDIR}/smbadduser ${BLDFIX}/bin @@ -133,6 +135,9 @@ $V install -m755 ${PKGDIR}/initconfig ${BLDFIX}/bin $V install -m755 ${PKGDIR}/smb.init $BUILD_ROOT/etc/init.d/samba $V install -m755 ${PKGDIR}/smb.mkdev $BUILD_ROOT/usr/lib/mkdev/samba $V install -m644 ${PKGDIR}/docview.html $BUILD_ROOT/doc/index.html +$V install -m644 ${PKGDIR}/osr5config.html $BUILD_ROOT/doc +$V install -m644 ${PKGDIR}/callogo.gif $BUILD_ROOT/doc +$V install -m644 ${PKGDIR}/samba.desktop $BUILD_ROOT/doc $V install -m644 ${PKGDIR}/swat.readme ${BLDFIX}/swat/README # The following is now done in the postinstall script diff --git a/packaging/Caldera/OpenServer/README b/packaging/Caldera/OpenServer/README index 6e8915161c1..2399c0ccd77 100644 --- a/packaging/Caldera/OpenServer/README +++ b/packaging/Caldera/OpenServer/README @@ -1,5 +1,5 @@ -Preparation Date: April 13, 2001 -Preparer: Ronald Joe Record +Preparation Date: January 24, 2002 +Preparer: Evan Hunt Instructions: Preparing Samba Packages for SCO OpenServer =============================================================== @@ -10,16 +10,15 @@ The file samba-2.2.3-osr5.patch is a patch file suitable for use with the patch command as follows: # cd ../../../source - # patch -p 0 -i ../packaging/Caldera/OpenServer/samba-2.2-osr5.patch + # patch -p 0 -i ../packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch The files modified by this patch are: utils/torture.c utils/locktest.c - utils/locktest2.c This patch should only be necessary until these changes are accepted -back into the 2.2 source tree. Until then, this patch must be applied -prior to building Samba 2.2 on SCO OpenServer 5. +back into the 2.2.3 source tree. Until then, this patch must be applied +prior to building Samba 2.2.3 on SCO OpenServer 5. To produce the custom installable media images simply type (in this directory): # ./Makevol diff --git a/packaging/Caldera/OpenServer/docview.html b/packaging/Caldera/OpenServer/docview.html index bf25f412308..585e0161533 100644 --- a/packaging/Caldera/OpenServer/docview.html +++ b/packaging/Caldera/OpenServer/docview.html @@ -11,18 +11,28 @@ Samba is a suite of networking products that implement the Windows SMB and CIFS protocols on UNIX and Linux operating systems. Samba enables your SCO OpenServer from Caldera system -as a file and print server for Windows and OS/2 systems. +as a file and print server for Windows and OS/2 clients.

    -We recommend that you use the O'Reilly & Associates publication +To order to activate Samba software, you must first configure it +according to the instructions in +"Configuring Samba on SCO OpenServer +systems". +We recommend that you consult the O'Reilly & Associates publication "Using Samba" -to configure and administer your Samba server. Links to Samba -HOWTO documents and manual pages are also provided below. +for further information on configuring and administering your Samba +server. Links to Samba HOWTO documents and manual pages are also +provided below.

    Samba Documentation

      +
    • Initial Configuration Instructions +
    • Books
    • Daemons diff --git a/packaging/Caldera/OpenServer/findsmb b/packaging/Caldera/OpenServer/findsmb index 5d399123952..2e831c5f11a 100755 --- a/packaging/Caldera/OpenServer/findsmb +++ b/packaging/Caldera/OpenServer/findsmb @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # Prints info on all smb responding machines on a subnet. # This script needs to be run on a machine without nmbd running and be @@ -15,7 +15,7 @@ # that workgroup. # -$SAMBABIN = "/usr/local/samba/bin"; +$SAMBABIN = "/usr/lib/samba/bin"; for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address $_ = shift; @@ -65,15 +65,6 @@ foreach $ip (@ipaddrs) # loop through each IP address found @name = grep(/<00>/,@nmblookup); $_ = @name[0]; - if (not $_) { -# try without the -r option - open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") || - die("Can't get nmb name list.\n"); - @nmblookup = ; - close NMBLOOKUP; - @name = grep(/<00> - /,@nmblookup); - $_ = @name[0]; - } if ($_) { # we have a netbios name if (/GROUP/) { # is it a group name ($name, $aliases, $type, $length, @addresses) = @@ -88,7 +79,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found # do an smbclient command on the netbios name. - open(SMB,"$SAMBABIN/smbclient -N -L '$name' -I $ip -U% |") || + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || die("Can't do smbclient command.\n"); @smb = ; close SMB; @@ -104,7 +95,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found @info = grep(/OS=/,@smb); $_ = @info[0]; if ($_) { # we found response - s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter } else { # no OS= string in response (WIN95 client) diff --git a/packaging/Caldera/OpenServer/initconfig b/packaging/Caldera/OpenServer/initconfig index b391cf9444d..518d5962c43 100755 --- a/packaging/Caldera/OpenServer/initconfig +++ b/packaging/Caldera/OpenServer/initconfig @@ -8,8 +8,8 @@ # do the initial configuration as well, and this script will become # unnecessary. -CONF_SRC=/usr/lib/samba/lib/smb.conf.default -CONF=/usr/lib/samba/lib/smb.conf +CONF_SRC=/etc/samba.d/smb.conf.default +CONF=/etc/samba.d/smb.conf # getyn: ask a question, return value indicates response diff --git a/packaging/Caldera/OpenServer/pkg/cdmt.config b/packaging/Caldera/OpenServer/pkg/cdmt.config index 8ea7e8c1ab6..9bf3f203f93 100644 --- a/packaging/Caldera/OpenServer/pkg/cdmt.config +++ b/packaging/Caldera/OpenServer/pkg/cdmt.config @@ -1,7 +1,7 @@ MACROS: Samba_NAME = Samba File and Print Server -Samba_VER = 2.2.2a +Samba_VER = 2.2.4a DEFAULT_EXEC_MODE = 0755 diff --git a/packaging/Caldera/OpenServer/pkg/cntl/ccs b/packaging/Caldera/OpenServer/pkg/cntl/ccs index a01690712ac..c5e69e1b167 100755 --- a/packaging/Caldera/OpenServer/pkg/cntl/ccs +++ b/packaging/Caldera/OpenServer/pkg/cntl/ccs @@ -11,93 +11,8 @@ pkglist="$3" # Source in the standard functions library, ccsSetup.sh . ccsSetup.sh -SPOOL=/var/spool/samba -SVCS=/etc/services -INET=/etc/inetd.conf -LMHOST=/etc/lmhosts -PREFIX=/usr/lib/samba - PKG_DIR=${SSO_SHARED_ROOT}/cntl/packages -# -# Create /var/spool/samba, create an initial /etc/lmhosts, build the -# codepages and setup swat to be run out of inetd on port 901 -# -PostExport() -{ - [ -d $SPOOL ] || { - mkdir -p $SPOOL - chmod 1777 $SPOOL - } - if [ -f $LMHOST ] - then - grep localhost $LMHOST > /dev/null || { - echo 127.0.0.1 localhost >> $LMHOST - } - else - echo 127.0.0.1 localhost > $LMHOST - fi - - cd ${PREFIX}/lib/codepages - for i in 437 737 775 850 852 861 866 932 936 949 950 1251 - do - ${PREFIX}/bin/make_smbcodepage c $i \ - ${PREFIX}/lib/codepages/src/codepage_def.$i \ - ${PREFIX}/lib/codepages/codepage.$i - done - for i in 437 737 850 852 861 866 932 936 949 950 \ - ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R - do - ${PREFIX}/bin/make_unicodemap $i \ - ${PREFIX}/lib/codepages/src/CP$i.TXT \ - ${PREFIX}/lib/codepages/unicode_map.$i - done - - grep swat $SVCS > /dev/null || { - echo "swat 901/tcp # Samba Web Administration Tool " >> $SVCS - } - - grep swat $INET > /dev/null || { - echo "swat stream tcp nowait root /usr/lib/samba/bin/swat swat " >> $INET - } - - kill -1 `ps -e | grep inetd | awk ' { print $1 } '` -} - -DisableStop() -{ - /etc/init.d/samba disable > /dev/null 2>&1 - /etc/init.d/samba stop > /dev/null 2>&1 -} - -# -# Remove /var/spool/samba and delete inetd entries for swat -# -PostUnexport() -{ - [ -d $SPOOL ] && { - rm -rf $SPOOL - } - - grep swat $SVCS > /dev/null && { - B=`basename $SVCS` - T=$B$$ - grep -v swat $SVCS > /tmp/$T - cp /tmp/$T $SVCS - rm -f /tmp/$T - } - - grep swat $INET > /dev/null || { - B=`basename $INET` - T=$B$$ - grep -v swat $INET > /tmp/$T - cp /tmp/$T $INET - rm -f /tmp/$T - } - - kill -1 `ps -e | grep inetd | awk ' { print $1 } '` -} - # call ccs in subsidiary packages with same arguments we were called with pkgCodes=`getPackageCode $pkglist` returnCode=$OK @@ -114,11 +29,5 @@ for pkg in $pkgCodes; do fi done -case "$step" in - POST_EXPORT) PostExport ;; - PRE_UNEXPORT) DisableStop ;; - POST_UNEXPORT) PostUnexport ;; -esac - exit $returnCode diff --git a/packaging/Caldera/OpenServer/pkg/cntl/cqs b/packaging/Caldera/OpenServer/pkg/cntl/cqs index 2edcae6f2c7..fec327a298d 100755 --- a/packaging/Caldera/OpenServer/pkg/cntl/cqs +++ b/packaging/Caldera/OpenServer/pkg/cntl/cqs @@ -49,56 +49,31 @@ cleanup() # Save_SSO_Upgrade_Config() { - if [ -f /etc/smbusers ]; then - ex_cmd cp -f /etc/smbusers $CCS_PERSISTENT_STORAGE/smbusers + if [ -f /etc/samba.d/smbusers ]; then + ex_cmd cp -f /etc/samba.d/smbusers $CCS_PERSISTENT_STORAGE/smbusers fi - if [ -f /usr/lib/samba/lib/smb.conf ]; then - ex_cmd cp -f /usr/lib/samba/lib/smb.conf $CCS_PERSISTENT_STORAGE/smb.conf + if [ -f /etc/samba.d/smbpasswd ]; then + ex_cmd cp -f /etc/samba.d/smbpasswd ${CCS_PERSISTENT_STORAGE}/smbpasswd + fi + if [ -f /etc/samba.d/smb.conf ]; then + ex_cmd cp -f /etc/samba.d/smb.conf ${CCS_PERSISTENT_STORAGE}/smb.conf + fi + if [ -f /etc/samba.d/lmhosts ]; then + ex_cmd cp -f /etc/samba.d/lmhosts ${CCS_PERSISTENT_STORAGE}/lmhosts + fi + if [ -f /etc/samba.d/printers.def ]; then + ex_cmd cp -f /etc/samba.d/printers.def \ + ${CCS_PERSISTENT_STORAGE}/printers.def fi return 0 } -#****************************************************************************** -# check_libsocket -# -# Check to see if libsocket.so.2 is installed on this system. If not, print -# a warning message and ask if the user wants to continue installation anyway. -#****************************************************************************** - -MSG_missLibrary="WARNING: Samba requires the library /usr/lib/libsocket.so.2 - to install and run correctly. That library does not exist - on this system. It is provided in OpenServer releases - 5.0.6a and higher." - -check_libsocket() { - if [ -f "/usr/lib/libsocket.so.2" ]; then - return $OK - else - echo "${MSG_missLibrary}" - - while echo "\n\tContinue installation? \c" - do read yn rest - case $yn in - +x|-x) set $yn ;; - [yY]*) return $OK ;; - [nN]*) cleanup $FAIL ;; - *) echo "\tPlease answer y or n" ;; - esac - done - fi -} - - ################################################################################ # main Main MAIN # trap "cleanup $FAIL" 1 2 3 15 -[ "$customMode" = "LAYERED" ] && { - check_libsocket -} - # Parse keyword list to determine how custom was invoked, the installation type, # whether we running on the target CPU, and finally if we have access to # the target's root filesystem. diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs index 4b4ef6de517..ea86e009025 100755 --- a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs +++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs @@ -12,16 +12,16 @@ ccs_return_value=0 PostExport() { - if [ -x /usr/bin/doctool ]; then - /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop - fi + if [ -x /usr/bin/doctool ]; then + /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop >&- 2>&- + fi } PreUnexport() { - if [ -x /usr/bin/doctool ]; then - /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop - fi + if [ -x /usr/bin/doctool ]; then + /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop >&- 2>&- + fi } case "$step" in diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg index f4a72dac36c..1c9fa360c57 100644 --- a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg @@ -29,6 +29,30 @@ owner = root group = sys flags = +DIR:Control:SHARED:cntl/packages/Samba: +mode = 0755 +owner = root +group = sys +flags = + +FILE:Control:SHARED:cntl/packages/Samba/ccs: +mode = 0755 +owner = root +group = sys +flags = + +DIR:Control:SHARED:cntl/packages/SambaSWAT: +mode = 0755 +owner = root +group = sys +flags = + +FILE:Control:SHARED:cntl/packages/SambaSWAT/ccs: +mode = 0755 +owner = root +group = sys +flags = + DIR:Control:SHARED:cntl/packages/SambaDOC: mode = 0755 owner = root @@ -505,6 +529,13 @@ group = sys flags = exportPath = /etc/samba.d/smbusers +FILE:Samba:CLIENT:etc/samba.d/lmhosts: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /etc/samba.d/lmhosts + DIR:Samba:CLIENT:usr/lib/samba/var: mode = 0755 owner = root @@ -517,10 +548,20 @@ owner = root group = sys flags = exportPath = /var/log/samba.d +exportPath = /usr/lib/samba/var/log DIR:Samba:CLIENT:usr/lib/samba/var/locks: +mode = 1777 +owner = root +group = sys +flags = +exportPath = /var/locks/samba.d +exportPath = /usr/lib/samba/var/locks + +DIR:Samba:CLIENT:usr/lib/samba/var/spool: mode = 0755 owner = root group = sys flags = -exportPath = /var/locks/samba +exportPath = /var/spool/samba +exportPath = /usr/lib/samba/var/spool diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg index df96635bccd..70f5f1d55d8 100644 --- a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg @@ -11,6 +11,13 @@ owner = root group = sys flags = +FILE:SambaDOC:SHARED:doc/samba.desktop: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/meta/doc/NetworkDoc/WinConnect/samba.desktop + FILE:SambaDOC:SHARED:doc/index.html: mode = 0644 owner = root @@ -18,6 +25,20 @@ group = sys flags = exportPath = /usr/share/doc/samba/help/index.html +FILE:SambaDOC:SHARED:doc/osr5config.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/help/osr5config.html + +FILE:SambaDOC:SHARED:doc/callogo.gif: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/share/doc/samba/help/callogo.gif + DIR:SambaDOC:SHARED:usr/lib: mode = 0755 owner = root @@ -98,13 +119,6 @@ group = sys flags = exportPath = /usr/man/man.1/smbcontrol.1 -FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbrun.1: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/man/man.1/smbrun.1 - FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbsh.1: mode = 0644 owner = root diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg index e50c6f20a2d..69d8a2de7a0 100644 --- a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg @@ -125,6 +125,14 @@ flags = exportPath = /usr/lib/samba/swat/help/Samba-HOWTO-Collection.html exportPath = /usr/share/doc/samba/help/Samba-HOWTO-Collection.html +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/Samba-LDAP-HOWTO.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/Samba-LDAP-HOWTO.html +exportPath = /usr/share/doc/samba/help/Samba-LDAP-HOWTO.html + FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/UNIX_INSTALL.html: mode = 0644 owner = root @@ -181,6 +189,14 @@ flags = exportPath = /usr/lib/samba/swat/help/nmblookup.1.html exportPath = /usr/share/doc/samba/help/nmblookup.1.html +FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/pdbedit.8.html: +mode = 0644 +owner = root +group = sys +flags = +exportPath = /usr/lib/samba/swat/help/pdbedit.1.html +exportPath = /usr/share/doc/samba/help/pdbedit.1.html + FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/printer_driver2.html: mode = 0644 owner = root @@ -197,22 +213,6 @@ flags = exportPath = /usr/lib/samba/swat/help/rpcclient.1.html exportPath = /usr/share/doc/samba/help/rpcclient.1.html -FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-faq.html: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/swat/help/samba-pdc-faq.html -exportPath = /usr/share/doc/samba/help/samba-pdc-faq.html - -FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-howto.html: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/swat/help/samba-pdc-howto.html -exportPath = /usr/share/doc/samba/help/samba-pdc-howto.html - FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba.7.html: mode = 0644 owner = root @@ -293,14 +293,6 @@ flags = exportPath = /usr/lib/samba/swat/help/smbpasswd.8.html exportPath = /usr/share/doc/samba/help/smbpasswd.8.html -FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbrun.1.html: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/swat/help/smbrun.1.html -exportPath = /usr/share/doc/samba/help/smbrun.1.html - FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbsh.1.html: mode = 0644 owner = root diff --git a/packaging/Caldera/OpenServer/smb.conf b/packaging/Caldera/OpenServer/smb.conf index 1dab1e54dfb..973fac4539e 100644 --- a/packaging/Caldera/OpenServer/smb.conf +++ b/packaging/Caldera/OpenServer/smb.conf @@ -46,7 +46,7 @@ # this tells Samba to use a separate log file for each machine # that connects - log file = /usr/lib/samba/var/log.%m + log file = /var/log/samba.d/log.%m # Put a capping on the size of the log files (in Kb). max log size = 50 diff --git a/packaging/Caldera/OpenServer/smb.init b/packaging/Caldera/OpenServer/smb.init index 535179a25a9..194b8a2bb29 100755 --- a/packaging/Caldera/OpenServer/smb.init +++ b/packaging/Caldera/OpenServer/smb.init @@ -8,22 +8,17 @@ # Modified 17-Jul-99 by Ron Record (rr@sco.com) for use in SCO Skunkware # -SAMBADIR=/usr/local/samba +SAMBADIR=/usr/lib/samba RCSCRIPT=/etc/rc2.d/S99samba -if [ ! -d /usr/bin ] -then # /usr not mounted - exit -fi - killproc() { # kill the named process(es) - if [ -f $SAMBADIR/var/locks/$1.pid ] + if [ -f /var/locks/samba.d/$1.pid ] then - kill `cat $SAMBADIR/var/locks/$1.pid` + kill `cat /var/locks/samba.d/$1.pid` else - pid=`/usr/bin/ps -e | - /usr/bin/grep $1 | - /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` + pid=`/bin/ps -e | + /bin/grep $1 | + /bin/sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill $pid fi } @@ -32,15 +27,13 @@ start() { # # Edit these lines to suit your installation (paths, workgroup, host) # - $SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf - $SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf - $SAMBADIR/sbin/winbindd + $SAMBADIR/sbin/smbd -D -s /etc/samba.d/smb.conf + $SAMBADIR/sbin/nmbd -D -s /etc/samba.d/smb.conf } stop() { killproc nmbd killproc smbd - killproc winbindd } # Start/stop processes required for samba server diff --git a/packaging/Caldera/OpenServer/smb.mkdev b/packaging/Caldera/OpenServer/smb.mkdev index f474e9f8b76..df7e0adcc81 100755 --- a/packaging/Caldera/OpenServer/smb.mkdev +++ b/packaging/Caldera/OpenServer/smb.mkdev @@ -36,10 +36,12 @@ while true ; do prompt || exit 1 case $cmd in 1) /usr/lib/samba/bin/initconfig - cp -f /etc/init.d/samba /etc/rc2.d/S92samba + /etc/init.d/samba enable + /etc/init.d/samba start exit 0 ;; - 2) rm -f /etc/rc2.d/S92samba + 2) /etc/init.d/samba disable + /etc/init.d/samba stop exit 0 ;; esac diff --git a/packaging/Caldera/OpenServer/smbadduser b/packaging/Caldera/OpenServer/smbadduser index 2f38bf28f1a..d7a19626369 100755 --- a/packaging/Caldera/OpenServer/smbadduser +++ b/packaging/Caldera/OpenServer/smbadduser @@ -5,8 +5,8 @@ unalias * set path = ($path) -set smbpasswd = /etc/smbpasswd -set user_map = /etc/smbusers +set smbpasswd = /etc/samba.d/smbpasswd +set user_map = /etc/samba.d/smbusers # # Set to site specific passwd command # diff --git a/packaging/Caldera/OpenServer/smbprint b/packaging/Caldera/OpenServer/smbprint index ec083eede62..7f50aadb46e 100755 --- a/packaging/Caldera/OpenServer/smbprint +++ b/packaging/Caldera/OpenServer/smbprint @@ -5,7 +5,7 @@ # server and service. # For example you could have a printcap entry like this # -# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/lib/samba/smbprint # # which would create a unix printer called "smb" that will print via this # script. You will need to create the spool directory /usr/spool/smb with @@ -27,7 +27,7 @@ # :cm=CD IBM Colorjet on 6th:\ # :sd=/var/spool/lpd/cdcolour:\ # :af=/var/spool/lpd/cdcolour/acct:\ -# :if=/usr/local/etc/smbprint:\ +# :if=/usr/lib/samba/smbprint:\ # :mx=0:\ # :lp=/dev/null: # -- cgit From 3b331b438078370d472277b7aca761ab9996cfb4 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Wed, 17 Apr 2002 22:33:05 +0000 Subject: Adding new packaging control files for SCO/Caldera OpenServer. --- packaging/Caldera/OpenServer/lmhosts | 1 + packaging/Caldera/OpenServer/osr5config.html | 59 +++++++++++++++ .../Caldera/OpenServer/pkg/cntl/packages/Samba/ccs | 85 ++++++++++++++++++++++ packaging/Caldera/OpenServer/samba.desktop | 7 ++ 4 files changed, 152 insertions(+) create mode 100644 packaging/Caldera/OpenServer/lmhosts create mode 100644 packaging/Caldera/OpenServer/osr5config.html create mode 100644 packaging/Caldera/OpenServer/pkg/cntl/packages/Samba/ccs create mode 100644 packaging/Caldera/OpenServer/samba.desktop diff --git a/packaging/Caldera/OpenServer/lmhosts b/packaging/Caldera/OpenServer/lmhosts new file mode 100644 index 00000000000..75721cd5afd --- /dev/null +++ b/packaging/Caldera/OpenServer/lmhosts @@ -0,0 +1 @@ +127.0.0.1 localhost diff --git a/packaging/Caldera/OpenServer/osr5config.html b/packaging/Caldera/OpenServer/osr5config.html new file mode 100644 index 00000000000..cfaa27155c4 --- /dev/null +++ b/packaging/Caldera/OpenServer/osr5config.html @@ -0,0 +1,59 @@ + + + +Configuring Samba on SCO OpenServer systems + + +
      +
      +

      +Configuring Samba on SCO OpenServer systems

      +
      +
      +

      After installing Samba, you must configure and activate it. To +do so, run the command mkdev samba. When prompted, enter the appropriate information in these categories:

      +
      +
      Workgroup Name/NT-Domain
      +

      Default: MYGROUP +

      +
      Machine name
      +

      Default: your system's name as reported by the uname -n command, + capitalized. For example, MYSYSTEM.

      +
      Windows Internet Naming Service (WINS) usage
      +
      +

      Whether your network uses the Windows Internet Naming Service (WINS). The use of WINS is recommended; failure to do so may significantly + increase your network traffic. However, some sites are unable to use it + because, for example, of security policies.

      +

      If you are using WINS, you will be asked whether your machine is intended +to be the WINS server for your network. If some other machine will be the +WINS server, you will be asked for its IP address.

      +
      +

      Note

      +

      A network may +not have more than one WINS server. If any other machine will be acting as +the WINS server, your machine cannot do so.

      +
      +
      +
      Network interface(s)
      +

      The network interface(s) over which will Samba run. For example, net0.

      +
      Microsoft + Security Domain or Active Directory usage
      +
      +

      Whether your system is being installed into an already-existing Microsoft + Security Domain or Active Directory.

      +
        +
      • If Yes, you will be asked for the name of the Primary + Domain Controller.

      • +
      • + If No, you will be asked whether your system will be + the Primary Domain Controller.

      • +
      +
      +
      +

      From the answers to these questions, an initial smb.conf file will be +created that should work in most circumstances. Additional configuration +should be completed using the swat utility.

      +

      Once this initial configuration is complete, Samba will automatically be +launched at boot time.

      +
      + diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/Samba/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/Samba/ccs new file mode 100644 index 00000000000..b1286da037c --- /dev/null +++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/Samba/ccs @@ -0,0 +1,85 @@ +#!/bin/sh + +scriptname="$0" +step="$1" +keywords="$2" +pkglist="$3" + +# Source in the standard functions library, ccsSetup.sh +. ccsSetup.sh + +ccs_return_value=0 + +SPOOL=/var/spool/samba +PREFIX=/usr/lib/samba + +# +# Build the codepages +# +PostExport() +{ + # restore preserved configuration files + if [ "${upgrade}" ]; then + for file in smb.conf smbusers smbpasswd lmhosts printers.def; do + ex_cmd cp -f ${CCS_PERSISTENT_STORAGE}/$file /etc/samba.d/$file + done + fi + + if [ ! -d /etc/samba.d/codepages ]; then + mkdir /etc/samba.d/codepages + fi + + for i in 437 737 775 850 852 861 866 932 936 949 950 1251 + do + ${PREFIX}/bin/make_smbcodepage c $i \ + ${PREFIX}/lib/codepages/src/codepage_def.$i \ + /etc/samba.d/codepages/codepage.$i + done + for i in 437 737 850 852 861 866 932 936 949 950 \ + ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R + do + ${PREFIX}/bin/make_unicodemap $i \ + ${PREFIX}/lib/codepages/src/CP$i.TXT \ + /etc/samba.d/codepages/unicode_map.$i + done +} + +DisableStop() +{ + /etc/init.d/samba disable > /dev/null 2>&1 + /etc/init.d/samba stop > /dev/null 2>&1 +} + +# +# Remove the spool directory and codepages +# +PostUnexport() +{ + if [ -n "$SPOOL" -a -d "$SPOOL" ]; then + rm -rf ${SPOOL}/* + fi + + rm -rf /etc/samba.d/codepages +} + +# +# Is this an upgrade? +# +upgrade= +for word in $keywords +do + case "$word" in + OLD_CUSTOM_UPGRADE) upgrade=nonSSOupgrade + ;; + UPGRADE) upgrade=SSOupgrade + ;; + esac +done + +case "$step" in + POST_EXPORT) PostExport ;; + PRE_UNEXPORT) DisableStop ;; + POST_UNEXPORT) PostUnexport ;; +esac + +exit $ccs_return_value diff --git a/packaging/Caldera/OpenServer/samba.desktop b/packaging/Caldera/OpenServer/samba.desktop new file mode 100644 index 00000000000..cd34e08ac5c --- /dev/null +++ b/packaging/Caldera/OpenServer/samba.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Samba +DocPath=/usr/share/doc/samba/help/index.html +X-COL-Weight=2.0 +# listed in DocView under: +# Networking group (NetworkDoc) +# Windows Connectivity category (WinConnect) -- cgit From 91c4b0a0a3145953efb326f91d50d961208ce4f6 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Wed, 17 Apr 2002 22:34:45 +0000 Subject: Added log file needed for build process on OpenServer. --- packaging/Caldera/OpenServer/callogo.gif | Bin 0 -> 1945 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packaging/Caldera/OpenServer/callogo.gif diff --git a/packaging/Caldera/OpenServer/callogo.gif b/packaging/Caldera/OpenServer/callogo.gif new file mode 100644 index 00000000000..0f7a266b775 Binary files /dev/null and b/packaging/Caldera/OpenServer/callogo.gif differ -- cgit From ba4d6c76aabd3d1fd8dc1e2335baf50c58d636a7 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Wed, 17 Apr 2002 22:50:02 +0000 Subject: Fix smbtorture so it can handle collisions etc ... --- source/torture/nbio.c | 23 +++++++++++++++++++---- source/torture/torture.c | 4 ++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/source/torture/nbio.c b/source/torture/nbio.c index 0d6955c879a..bf9305f8e89 100644 --- a/source/torture/nbio.c +++ b/source/torture/nbio.c @@ -79,6 +79,16 @@ void nbio_shmem(int n) } } +static int ne_find_handle(int handle) +{ + int i; + children[nbio_id].line = line_count; + for (i=0;i Date: Thu, 18 Apr 2002 00:59:40 +0000 Subject: Found that with XP, clients have started using infolevel 1005 (0x3ED) of NetShareGetInfo to determine offline caching policy for a share. This infolevel used to return only dfs rootness before. Added code to return the policy value as expected by XP. If this is absent, roaming profiles give warnings on XP. --- source/include/rpc_srvsvc.h | 2 +- source/rpc_parse/parse_srv.c | 2 +- source/rpc_server/srv_srvsvc_nt.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h index 8dc5842fc14..8458074619f 100644 --- a/source/include/rpc_srvsvc.h +++ b/source/include/rpc_srvsvc.h @@ -412,7 +412,7 @@ typedef struct share_info_502_info /* SRV_SHARE_INFO_1005 */ typedef struct share_info_1005_info { - uint32 dfs_root_flag; + uint32 misc_flags; } SRV_SHARE_INFO_1005; /* SRV_SHARE_INFO_1501 */ diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c index a367643aa41..3a1c13c7ea0 100644 --- a/source/rpc_parse/parse_srv.c +++ b/source/rpc_parse/parse_srv.c @@ -454,7 +454,7 @@ static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, if(!prs_align(ps)) return False; - if(!prs_uint32("dfs_root_flag", ps, depth, &sh1005->dfs_root_flag)) + if(!prs_uint32("misc_flags", ps, depth, &sh1005->misc_flags)) return False; return True; diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c index 10edf3fa0ab..7680a212978 100644 --- a/source/rpc_server/srv_srvsvc_nt.c +++ b/source/rpc_server/srv_srvsvc_nt.c @@ -433,12 +433,14 @@ static void init_srv_share_info_502(pipes_struct *p, SRV_SHARE_INFO_502 *sh502, static void init_srv_share_info_1005(SRV_SHARE_INFO_1005* sh1005, int snum) { - sh1005->dfs_root_flag = 0; + sh1005->misc_flags = 0; #ifdef WITH_MSDFS if(lp_host_msdfs() && lp_msdfs_root(snum)) - sh1005->dfs_root_flag = 3; + sh1005->misc_flags = 3; #endif + + sh1005->misc_flags |= (lp_csc_policy(snum) << 4); } -- cgit From 4415958f283a42996fea4729bf49a801728b069c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 01:46:47 +0000 Subject: Fix for CR#569 found by Li - XP clients don't bother to set the devmode_ptr in the SetPrinter() call - they send it in the devmode_ctr instead. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 6b9604fafdf..08256211075 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -5096,7 +5096,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, goto done; } - if (info->info_2->devmode_ptr != 0) { + if (devmode) { /* we have a valid devmode convert it and link it*/ -- cgit From f988a1af034b4cea2412171a257a752192afaece Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 01:48:45 +0000 Subject: Fix found by Li Shao @ HP - XP clients don't bother to set the devmode_ptr in the SetPrinter() call - they send it in the devmode_ctr instead. Jeremy. --- source/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index a8552cd14dd..5fa45b0b446 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -5084,7 +5084,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, goto done; } - if (info->info_2->devmode_ptr != 0) { + if (devmode) { /* we have a valid devmode convert it and link it*/ -- cgit From 64a2ae5cee4ffc5ae3c902705b6e1050f649e3a5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Apr 2002 02:13:55 +0000 Subject: - fixed the is_mangled() interface to handle multiple components - fixed the no-extension case of reverse mangling --- source/smbd/mangle_hash2.c | 47 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/source/smbd/mangle_hash2.c b/source/smbd/mangle_hash2.c index 959a93e07b1..5b3c63ec559 100644 --- a/source/smbd/mangle_hash2.c +++ b/source/smbd/mangle_hash2.c @@ -184,12 +184,12 @@ static const char *cache_lookup(u32 hash) In this algorithm, mangled names use only pure ascii characters (no multi-byte) so we can avoid doing a UCS2 conversion -*/ -static BOOL is_mangled(const char *name) + */ +static BOOL is_mangled_component(const char *name) { int len, i; - M_DEBUG(0,("is_mangled %s ?\n", name)); + M_DEBUG(0,("is_mangled_component %s ?\n", name)); /* the best distinguishing characteristic is the ~ */ if (name[6] != '~') return False; @@ -229,6 +229,39 @@ static BOOL is_mangled(const char *name) } + +/* + determine if a string is possibly in a mangled format, ignoring + case + + In this algorithm, mangled names use only pure ascii characters (no + multi-byte) so we can avoid doing a UCS2 conversion + + NOTE! This interface must be able to handle a path with unix + directory separators. It should return true if any component is + mangled + */ +static BOOL is_mangled(const char *name) +{ + char *p; + char *s; + + M_DEBUG(0,("is_mangled %s ?\n", name)); + + for (s=name; (p=strchr(s, '/')); s=p+1) { + char *component = strndup(s, PTR_DIFF(p, s)); + if (is_mangled_component(component)) { + free(component); + return True; + } + free(component); + } + + /* and the last part ... */ + return is_mangled_component(s); +} + + /* see if a filename is an allowable 8.3 name. @@ -343,8 +376,12 @@ static BOOL check_cache(char *name) } /* we found it - construct the full name */ - strncpy(extension, name+9, 3); - extension[3] = 0; + if (name[8] == '.') { + strncpy(extension, name+9, 3); + extension[3] = 0; + } else { + extension[0] = 0; + } if (extension[0]) { M_DEBUG(0,("check_cache: %s -> %s.%s\n", name, prefix, extension)); -- cgit From a721843197d39c0edc6c464214123be3300d0b91 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 18 Apr 2002 03:24:02 +0000 Subject: make proto --- source/python/py_lsa_proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/python/py_lsa_proto.h b/source/python/py_lsa_proto.h index 066a0aad539..1c6f6ab1d16 100644 --- a/source/python/py_lsa_proto.h +++ b/source/python/py_lsa_proto.h @@ -6,8 +6,8 @@ /* The following definitions come from python/py_lsa.c */ -PyObject *new_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); +PyObject *new_lsa_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); void initlsa(void); #endif /* _PY_LSA_PROTO_H */ -- cgit From 38d2b1794a0942ac4c2787f06bc5e546508c2515 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 18 Apr 2002 03:35:05 +0000 Subject: Started working on setprinter code. --- source/python/py_common_proto.h | 6 +- source/python/py_ntsec.c | 151 +++++++++++++++++++++++++++++-- source/python/py_spoolss_printers.c | 42 +++------ source/python/py_spoolss_printers_conv.c | 27 +++++- source/python/py_spoolss_proto.h | 15 +-- source/python/samba-head.patch | 15 ++- 6 files changed, 197 insertions(+), 59 deletions(-) diff --git a/source/python/py_common_proto.h b/source/python/py_common_proto.h index 0c227ffef89..bca59689a45 100644 --- a/source/python/py_common_proto.h +++ b/source/python/py_common_proto.h @@ -19,12 +19,12 @@ struct cli_state *open_pipe_creds(char *system_name, PyObject *creds, /* The following definitions come from python/py_ntsec.c */ BOOL py_from_SID(PyObject **obj, DOM_SID *sid); -BOOL py_to_SID(DOM_SID *sid, PyObject *dict); +BOOL py_to_SID(DOM_SID *sid, PyObject *obj); BOOL py_from_ACE(PyObject **dict, SEC_ACE *ace); BOOL py_to_ACE(SEC_ACE *ace, PyObject *dict); BOOL py_from_ACL(PyObject **dict, SEC_ACL *acl); -BOOL py_to_ACL(SEC_ACL *acl, PyObject *dict); +BOOL py_to_ACL(SEC_ACL *acl, PyObject *dict, TALLOC_CTX *mem_ctx); BOOL py_from_SECDESC(PyObject **dict, SEC_DESC *sd); -BOOL py_to_SECDESC(SEC_DESC *sd, PyObject *dict); +BOOL py_to_SECDESC(SEC_DESC **sd, PyObject *dict, TALLOC_CTX *mem_ctx); #endif /* _PY_COMMON_PROTO_H */ diff --git a/source/python/py_ntsec.c b/source/python/py_ntsec.c index d97bbb6f8c8..d8ed50379f9 100644 --- a/source/python/py_ntsec.c +++ b/source/python/py_ntsec.c @@ -43,9 +43,19 @@ BOOL py_from_SID(PyObject **obj, DOM_SID *sid) return True; } -BOOL py_to_SID(DOM_SID *sid, PyObject *dict) +BOOL py_to_SID(DOM_SID *sid, PyObject *obj) { - return False; + BOOL result; + + if (!PyString_Check(obj)) + return False; + + result = string_to_sid(sid, PyString_AsString(obj)); + + if (result) + DEBUG(0, ("py: got sid %s\n", PyString_AsString(obj))); + + return result; } BOOL py_from_ACE(PyObject **dict, SEC_ACE *ace) @@ -72,7 +82,50 @@ BOOL py_from_ACE(PyObject **dict, SEC_ACE *ace) BOOL py_to_ACE(SEC_ACE *ace, PyObject *dict) { - return False; + PyObject *obj; + uint8 ace_type, ace_flags; + DOM_SID trustee; + SEC_ACCESS sec_access; + + if (!PyDict_Check(dict)) + return False; + + if (!(obj = PyDict_GetItemString(dict, "type")) || + !PyInt_Check(obj)) + return False; + + ace_type = PyInt_AsLong(obj); + + DEBUG(0, ("py: got ace_type %d\n", ace_type)); + + if (!(obj = PyDict_GetItemString(dict, "flags")) || + !PyInt_Check(obj)) + return False; + + ace_flags = PyInt_AsLong(obj); + + DEBUG(0, ("py: got ace_flags %d\n", ace_flags)); + + if (!(obj = PyDict_GetItemString(dict, "trustee")) || + !PyString_Check(obj)) + return False; + + if (!py_to_SID(&trustee, obj)) + return False; + + DEBUG(0, ("py: got trustee\n")); + + if (!(obj = PyDict_GetItemString(dict, "mask")) || + !PyInt_Check(obj)) + return False; + + sec_access.mask = PyInt_AsLong(obj); + + DEBUG(0, ("py: got mask 0x%08x\n", sec_access.mask)); + + init_sec_ace(ace, &trustee, ace_type, sec_access, ace_flags); + + return True; } BOOL py_from_ACL(PyObject **dict, SEC_ACL *acl) @@ -104,9 +157,39 @@ BOOL py_from_ACL(PyObject **dict, SEC_ACL *acl) return True; } -BOOL py_to_ACL(SEC_ACL *acl, PyObject *dict) +BOOL py_to_ACL(SEC_ACL *acl, PyObject *dict, TALLOC_CTX *mem_ctx) { - return False; + PyObject *obj; + uint32 i; + + if (!(obj = PyDict_GetItemString(dict, "revision")) || + !PyInt_Check(obj)) + return False; + + acl->revision = PyInt_AsLong(obj); + + DEBUG(0, ("py: got revision %d\n", acl->revision)); + + if (!(obj = PyDict_GetItemString(dict, "ace_list")) || + !PyList_Check(obj)) + return False; + + acl->num_aces = PyList_Size(obj); + + DEBUG(0, ("py: got num_aces %d\n", acl->num_aces)); + + acl->ace = talloc(mem_ctx, acl->num_aces * sizeof(SEC_ACE)); + + for (i = 0; i < acl->num_aces; i++) { + PyObject *py_ace = PyList_GetItem(obj, i); + + if (!py_to_ACE(acl->ace, py_ace)) + return False; + + DEBUG(0, ("py: got ace %d\n", i)); + } + + return True; } BOOL py_from_SECDESC(PyObject **dict, SEC_DESC *sd) @@ -116,7 +199,6 @@ BOOL py_from_SECDESC(PyObject **dict, SEC_DESC *sd) *dict = PyDict_New(); PyDict_SetItemString(*dict, "revision", PyInt_FromLong(sd->revision)); - PyDict_SetItemString(*dict, "type", PyInt_FromLong(sd->type)); if (py_from_SID(&obj, sd->owner_sid)) PyDict_SetItemString(*dict, "owner_sid", obj); @@ -133,7 +215,60 @@ BOOL py_from_SECDESC(PyObject **dict, SEC_DESC *sd) return True; } -BOOL py_to_SECDESC(SEC_DESC *sd, PyObject *dict) +BOOL py_to_SECDESC(SEC_DESC **sd, PyObject *dict, TALLOC_CTX *mem_ctx) { - return False; + PyObject *obj; + uint16 revision; + DOM_SID owner_sid, group_sid; + SEC_ACL sacl, dacl; + size_t sd_size; + BOOL got_dacl = False, got_sacl = False; + + ZERO_STRUCT(dacl); ZERO_STRUCT(sacl); + ZERO_STRUCT(owner_sid); ZERO_STRUCT(group_sid); + + if (!(obj = PyDict_GetItemString(dict, "revision"))) + return False; + + revision = PyInt_AsLong(obj); + + if (!(obj = PyDict_GetItemString(dict, "owner_sid"))) + return False; + + if (!py_to_SID(&owner_sid, obj)) + return False; + + if (!(obj = PyDict_GetItemString(dict, "group_sid"))) + return False; + + if (!py_to_SID(&group_sid, obj)) + return False; + + if ((obj = PyDict_GetItemString(dict, "dacl"))) { + + if (!py_to_ACL(&dacl, obj, mem_ctx)) + return False; + + got_dacl = True; + } + + DEBUG(0, ("py: got dacl\n")); + + if ((obj = PyDict_GetItemString(dict, "sacl"))) { + if (obj != Py_None) { + + if (!py_to_ACL(&sacl, obj, mem_ctx)) + return False; + + got_sacl = True; + } + } + + DEBUG(0, ("py: got sacl\n")); + + *sd = make_sec_desc(mem_ctx, revision, &owner_sid, &group_sid, + got_sacl ? &sacl : NULL, + got_dacl ? &dacl : NULL, &sd_size); + + return True; } diff --git a/source/python/py_spoolss_printers.c b/source/python/py_spoolss_printers.c index 69b2733cfbe..48321500e7d 100644 --- a/source/python/py_spoolss_printers.c +++ b/source/python/py_spoolss_printers.c @@ -181,12 +181,8 @@ PyObject *spoolss_setprinter(PyObject *self, PyObject *args, PyObject *kw) uint32 level; static char *kwlist[] = {"dict", NULL}; union { - PRINTER_INFO_0 printers_0; - PRINTER_INFO_1 printers_1; PRINTER_INFO_2 printers_2; PRINTER_INFO_3 printers_3; - PRINTER_INFO_4 printers_4; - PRINTER_INFO_5 printers_5; } pinfo; /* Parse parameters */ @@ -199,12 +195,22 @@ PyObject *spoolss_setprinter(PyObject *self, PyObject *args, PyObject *kw) if ((level_obj = PyDict_GetItemString(info, "level"))) { - if (!PyInt_Check(level_obj)) + if (!PyInt_Check(level_obj)) { + DEBUG(0, ("** level not an integer\n")); goto error; + } level = PyInt_AsLong(level_obj); + /* Only level 2, 3 supported by NT */ + + if (level != 2 && level != 3) { + DEBUG(0, ("** unsupported info level\n")); + goto error; + } + } else { + DEBUG(0, ("** no level info\n")); error: PyErr_SetString(spoolss_error, "invalid info"); return NULL; @@ -215,34 +221,14 @@ PyObject *spoolss_setprinter(PyObject *self, PyObject *args, PyObject *kw) ZERO_STRUCT(ctr); switch (level) { - case 2: { - PyObject *devmode_obj; - + case 2: ctr.printers_2 = &pinfo.printers_2; - if (!py_to_PRINTER_INFO_2(&pinfo.printers_2, info)) + if (!py_to_PRINTER_INFO_2(&pinfo.printers_2, info, + hnd->mem_ctx)) goto error; -#if 0 - devmode_obj = PyDict_GetItemString(info, "device_mode"); - - pinfo.printers_2.devmode = talloc( - hnd->mem_ctx, sizeof(DEVICEMODE)); - - PyDEVICEMODE_AsDEVICEMODE(pinfo.printers_2.devmode, - devmode_obj); - -#else - - /* FIXME: can we actually set the security descriptor using - a setprinter level 2? */ - - pinfo.printers_2.secdesc = NULL; - pinfo.printers_2.secdesc = NULL; - -#endif break; - } default: PyErr_SetString(spoolss_error, "unsupported info level"); return NULL; diff --git a/source/python/py_spoolss_printers_conv.c b/source/python/py_spoolss_printers_conv.c index 84b36ddbb27..4b78f087e6d 100644 --- a/source/python/py_spoolss_printers_conv.c +++ b/source/python/py_spoolss_printers_conv.c @@ -165,9 +165,7 @@ BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict) to_struct(devmode, dict, py_DEVICEMODE); - obj = PyDict_GetItemString(dict, "private"); - - if (!obj) + if (!(obj = PyDict_GetItemString(dict, "private"))) return False; devmode->private = PyString_AsString(obj); @@ -225,9 +223,28 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info) return True; } -BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict) +BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict, + TALLOC_CTX *mem_ctx) { - return False; + PyObject *obj; + + to_struct(info, dict, py_PRINTER_INFO_2); + + if (!(obj = PyDict_GetItemString(dict, "security_descriptor"))) + return False; + + if (!py_to_SECDESC(&info->secdesc, obj, mem_ctx)) + return False; + + if (!(obj = PyDict_GetItemString(dict, "device_mode"))) + return False; + + info->devmode = talloc(mem_ctx, sizeof(DEVICEMODE)); + + if (!py_to_DEVICEMODE(info->devmode, obj)) + return False; + + return True; } /* diff --git a/source/python/py_spoolss_proto.h b/source/python/py_spoolss_proto.h index 3e3e5ef6eed..47602d175db 100644 --- a/source/python/py_spoolss_proto.h +++ b/source/python/py_spoolss_proto.h @@ -6,8 +6,8 @@ /* The following definitions come from python/py_spoolss.c */ -PyObject *new_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); +PyObject *new_spoolss_policy_hnd_object(struct cli_state *cli, + TALLOC_CTX *mem_ctx, POLICY_HND *pol); void initspoolss(void); /* The following definitions come from python/py_spoolss_drivers.c */ @@ -66,14 +66,6 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw); /* The following definitions come from python/py_spoolss_printers_conv.c */ -BOOL py_from_SID(PyObject **obj, DOM_SID *sid); -BOOL py_to_SID(DOM_SID *sid, PyObject *dict); -BOOL py_from_ACE(PyObject **dict, SEC_ACE *ace); -BOOL py_to_ACE(SEC_ACE *ace, PyObject *dict); -BOOL py_from_ACL(PyObject **dict, SEC_ACL *acl); -BOOL py_to_ACL(SEC_ACL *acl, PyObject *dict); -BOOL py_from_SECDESC(PyObject **dict, SEC_DESC *sd); -BOOL py_to_SECDESC(SEC_DESC *sd, PyObject *dict); BOOL py_from_DEVICEMODE(PyObject **dict, DEVICEMODE *devmode); BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict); BOOL py_from_PRINTER_INFO_0(PyObject **dict, PRINTER_INFO_0 *info); @@ -81,7 +73,8 @@ BOOL py_to_PRINTER_INFO_0(PRINTER_INFO_0 *info, PyObject *dict); BOOL py_from_PRINTER_INFO_1(PyObject **dict, PRINTER_INFO_1 *info); BOOL py_to_PRINTER_INFO_1(PRINTER_INFO_1 *info, PyObject *dict); BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info); -BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict); +BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict, + TALLOC_CTX *mem_ctx); BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info); BOOL py_to_PRINTER_INFO_3(PRINTER_INFO_3 *info, PyObject *dict); diff --git a/source/python/samba-head.patch b/source/python/samba-head.patch index 223e0179fb7..c8089934b86 100644 --- a/source/python/samba-head.patch +++ b/source/python/samba-head.patch @@ -4,8 +4,8 @@ RCS file: /data/cvs/samba/source/Makefile.in,v retrieving revision 1.470 diff -u -r1.470 Makefile.in --- Makefile.in 2002/04/13 11:45:33 1.470 -+++ Makefile.in 2002/04/14 01:01:05 -@@ -787,6 +787,36 @@ ++++ Makefile.in 2002/04/18 03:34:05 +@@ -787,6 +787,43 @@ -$(INSTALLCMD) -d ${prefix}/include -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include @@ -22,7 +22,9 @@ diff -u -r1.470 Makefile.in + +PY_LSA_PROTO_OBJ = python/py_lsa.o + -+python_proto: python_spoolss_proto python_lsa_proto ++PY_COMMON_PROTO_OBJ = python/py_common.c python/py_ntsec.c ++ ++python_proto: python_spoolss_proto python_lsa_proto python_common_proto + +python_spoolss_proto: + @cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \ @@ -34,6 +36,11 @@ diff -u -r1.470 Makefile.in + -h _PY_LSA_PROTO_H python/py_lsa_proto.h \ + $(PY_LSA_PROTO_OBJ) + ++python_common_proto: ++ @cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \ ++ -h _PY_COMMON_PROTO_H python/py_common_proto.h \ ++ $(PY_COMMON_PROTO_OBJ) ++ +python_ext: $(PYTHON_OBJS) + @echo python python/setup.py build + @PYTHON_OBJS="$(PYTHON_OBJS)" PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ @@ -48,7 +55,7 @@ RCS file: /data/cvs/samba/source/configure.in,v retrieving revision 1.300 diff -u -r1.300 configure.in --- configure.in 2002/04/11 15:26:58 1.300 -+++ configure.in 2002/04/14 01:01:08 ++++ configure.in 2002/04/18 03:34:05 @@ -2716,7 +2716,7 @@ builddir=`pwd` AC_SUBST(builddir) -- cgit From 546764f3cbbefaad312386280dd2ebbbe5b4446d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Apr 2002 03:59:02 +0000 Subject: nicer strndup() function --- source/lib/util_str.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/lib/util_str.c b/source/lib/util_str.c index f6e579ddba1..ff3559ce148 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -991,13 +991,13 @@ some platforms don't have strndup char *strndup(const char *s, size_t n) { char *ret; - int i; - for (i=0;s[i] && i Date: Thu, 18 Apr 2002 06:56:44 +0000 Subject: fixed the fallback to a BDC for ADS connections --- source/include/ads.h | 1 + source/libads/ads_struct.c | 19 ++++++++++++++++++- source/libads/ldap.c | 24 ++++++++++++++++++++++++ source/nsswitch/winbindd_ads.c | 4 +++- source/smbd/negprot.c | 2 +- source/smbd/sesssetup.c | 2 +- source/utils/net_ads.c | 9 ++++----- 7 files changed, 52 insertions(+), 9 deletions(-) diff --git a/source/include/ads.h b/source/include/ads.h index 8658e72f6ac..b3e18f18b8d 100644 --- a/source/include/ads.h +++ b/source/include/ads.h @@ -7,6 +7,7 @@ typedef struct { void *ld; char *realm; + char *workgroup; char *ldap_server; char *ldap_server_name; char *kdc_server; diff --git a/source/libads/ads_struct.c b/source/libads/ads_struct.c index 489f301ae2e..816b6160973 100644 --- a/source/libads/ads_struct.c +++ b/source/libads/ads_struct.c @@ -90,7 +90,12 @@ static char *find_ldap_server(ADS_STRUCT *ads) } /* get desperate, find the domain controller IP */ - if (resolve_name(lp_workgroup(), &ip, 0x1B)) { + if (resolve_name(ads->workgroup, &ip, 0x1B)) { + return strdup(inet_ntoa(ip)); + } + + /* or a BDC ... */ + if (resolve_name(ads->workgroup, &ip, 0x1C)) { return strdup(inet_ntoa(ip)); } @@ -115,6 +120,7 @@ static char *find_ldap_server(ADS_STRUCT *ads) initialise a ADS_STRUCT, ready for some ads_ ops */ ADS_STRUCT *ads_init(const char *realm, + const char *workgroup, const char *ldap_server, const char *bind_path, const char *password) @@ -124,7 +130,12 @@ ADS_STRUCT *ads_init(const char *realm, ads = (ADS_STRUCT *)smb_xmalloc(sizeof(*ads)); ZERO_STRUCTP(ads); + if (!workgroup) { + workgroup = lp_workgroup(); + } + ads->realm = realm? strdup(realm) : NULL; + ads->workgroup = strdup(workgroup); ads->ldap_server = ldap_server? strdup(ldap_server) : NULL; ads->bind_path = bind_path? strdup(bind_path) : NULL; ads->ldap_port = LDAP_PORT; @@ -153,6 +164,12 @@ ADS_STRUCT *ads_init(const char *realm, return ads; } +/* a simpler ads_init() interface using all defaults */ +ADS_STRUCT *ads_init_simple(void) +{ + return ads_init(NULL, NULL, NULL, NULL, NULL); +} + /* free the memory used by the ADS structure initialized with 'ads_init(...)' */ diff --git a/source/libads/ldap.c b/source/libads/ldap.c index e2e351bd4b3..3b787c6a8fb 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -46,9 +46,33 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) ads->last_attempt = time(NULL); ads->ld = ldap_open(ads->ldap_server, ads->ldap_port); + + /* if that failed then try each of the BDC's in turn */ + if (!ads->ld) { + struct in_addr *ip_list; + int count; + + if (get_dc_list(False, ads->workgroup, &ip_list, &count)) { + int i; + for (i=0;ild = ldap_open(inet_ntoa(ip_list[i]), + ads->ldap_port); + if (ads->ld) break; + } + if (ads->ld) { + free(ads->ldap_server); + ads->ldap_server = strdup(inet_ntoa(ip_list[i])); + } + free(ip_list); + } + } + if (!ads->ld) { return ADS_ERROR_SYSTEM(errno); } + + DEBUG(3,("Connected to LDAP server %s\n", ads->ldap_server)); + status = ads_server_info(ads); if (!ADS_ERR_OK(status)) { DEBUG(1,("Failed to get ldap server info\n")); diff --git a/source/nsswitch/winbindd_ads.c b/source/nsswitch/winbindd_ads.c index af0933716b8..6c00ddb95fa 100644 --- a/source/nsswitch/winbindd_ads.c +++ b/source/nsswitch/winbindd_ads.c @@ -119,6 +119,8 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) if (resolve_name(domain->name, &server_ip, 0x1b)) { sname = inet_ntoa(server_ip); + } else if (resolve_name(domain->name, &server_ip, 0x1c)) { + sname = inet_ntoa(server_ip); } else { if (strcasecmp(domain->name, lp_workgroup()) != 0) { DEBUG(1,("can't find domain controller for %s\n", domain->name)); @@ -127,7 +129,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) sname = NULL; } - ads = ads_init(primary_realm, sname, NULL, NULL); + ads = ads_init(primary_realm, domain->name, NULL, NULL, NULL); if (!ads) { DEBUG(1,("ads_init for domain %s failed\n", domain->name)); return NULL; diff --git a/source/smbd/negprot.c b/source/smbd/negprot.c index 18682e6c9ff..c548ee61967 100644 --- a/source/smbd/negprot.c +++ b/source/smbd/negprot.c @@ -197,7 +197,7 @@ static int negprot_spnego(char *p) blob = spnego_gen_negTokenInit(guid, OIDs_plain, "NONE"); } else { ADS_STRUCT *ads; - ads = ads_init(NULL, NULL, NULL, NULL); + ads = ads_init_simple(); /* win2000 uses host$@REALM, which we will probably use eventually, but for now this works */ asprintf(&principal, "HOST/%s@%s", guid, ads->realm); diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 8b9d826067f..66eb6a2d92b 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -120,7 +120,7 @@ static int reply_spnego_kerberos(connection_struct *conn, return ERROR_NT(NT_STATUS_LOGON_FAILURE); } - ads = ads_init(NULL, NULL, NULL, NULL); + ads = ads_init_simple(); ret = ads_verify_ticket(ads, &ticket, &client, &auth_data); if (!NT_STATUS_IS_OK(ret)) { diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index 68fa89ea35d..ea261187ce4 100644 --- a/source/utils/net_ads.c +++ b/source/utils/net_ads.c @@ -56,7 +56,7 @@ static int net_ads_info(int argc, const char **argv) { ADS_STRUCT *ads; - ads = ads_init(NULL, opt_host, NULL, NULL); + ads = ads_init(NULL, NULL, opt_host, NULL, NULL); ads_connect(ads); if (!ads) { @@ -81,7 +81,7 @@ static ADS_STRUCT *ads_startup(void) BOOL need_password = False; BOOL second_time = False; - ads = ads_init(NULL, opt_host, NULL, NULL); + ads = ads_init(NULL, NULL, opt_host, NULL, NULL); if (!opt_user_name) { opt_user_name = "administrator"; @@ -650,7 +650,7 @@ static int net_ads_password(int argc, const char **argv) /* use the realm so we can eventually change passwords for users in realms other than default */ - if (!(ads = ads_init(realm, NULL, NULL, NULL))) return -1; + if (!(ads = ads_init(realm, NULL, NULL, NULL, NULL))) return -1; asprintf(&prompt, "Enter new password for %s:", argv[0]); @@ -681,8 +681,7 @@ static int net_ads_change_localhost_pass(int argc, const char **argv) char *hostname; ADS_STATUS ret; - - if (!(ads = ads_init(NULL, NULL, NULL, NULL))) return -1; + if (!(ads = ads_init_simple())) return -1; hostname = strdup(global_myname); strlower(hostname); -- cgit From 6d52aa1fc892b48d72a790800ee00d6d7bdc4844 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 18 Apr 2002 18:36:17 +0000 Subject: Back out the wrong changes I made yesterday ... --- source/torture/nbio.c | 13 ++++--------- source/torture/torture.c | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/source/torture/nbio.c b/source/torture/nbio.c index bf9305f8e89..2d519b40bac 100644 --- a/source/torture/nbio.c +++ b/source/torture/nbio.c @@ -137,7 +137,7 @@ void nb_unlink(char *fname) void nb_createx(char *fname, - unsigned create_options, unsigned create_disposition, int handle, int no_err) + unsigned create_options, unsigned create_disposition, int handle) { int fd, i; uint32 desired_access; @@ -157,7 +157,7 @@ void nb_createx(char *fname, if (fd == -1 && handle != -1) { printf("ERROR: cli_nt_create_full failed for %s - %s\n", fname, cli_errstr(c)); - if (!no_err) exit(1); + exit(1); } if (fd != -1 && handle == -1) { printf("ERROR: cli_nt_create_full succeeded for %s\n", fname); @@ -206,15 +206,10 @@ void nb_readx(int handle, int offset, int size, int ret_size) children[nbio_id].bytes_in += ret_size; } -void nb_close(int handle, int no_err) +void nb_close(int handle) { int i; - if (no_err) { - i = ne_find_handle(handle); - if (i < 0) return; - } - else - i = find_handle(handle); + i = find_handle(handle); if (!cli_close(c, ftable[i].fd)) { printf("(%d) close failed on handle %d\n", line_count, handle); exit(1); diff --git a/source/torture/torture.c b/source/torture/torture.c index cce39d21129..23624d07333 100644 --- a/source/torture/torture.c +++ b/source/torture/torture.c @@ -707,9 +707,9 @@ static BOOL run_netbench(int client) if (!strcmp(params[0],"NTCreateX")) { nb_createx(params[1], ival(params[2]), ival(params[3]), - ival(params[4]),ival(params[5])); + ival(params[4])); } else if (!strcmp(params[0],"Close")) { - nb_close(ival(params[1]),ival(params[2])); + nb_close(ival(params[1])); } else if (!strcmp(params[0],"Rename")) { nb_rename(params[1], params[2]); } else if (!strcmp(params[0],"Unlink")) { -- cgit From ab56c3bb047e21304ef9beefd506691fb3be0e41 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 19:41:48 +0000 Subject: Fix for HPUX compile from Don. Jeremy. --- source/nsswitch/winbind_nss_solaris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c index 9db10aa5ec2..b54dec33cb9 100644 --- a/source/nsswitch/winbind_nss_solaris.c +++ b/source/nsswitch/winbind_nss_solaris.c @@ -19,7 +19,7 @@ #endif #include "winbind_nss_config.h" -#ifdef HAVE_NSS_COMMON_H +#if defined(HAVE_NSS_COMMON_H) || defined(HPUX) #undef NSS_DEBUG -- cgit From 898665838a1a44b5658eb900d23d615a6da6f179 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 20:46:52 +0000 Subject: Fixes for HPUX from Don. Jeremy. --- source/nsswitch/pam_winbind.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c index 42cc29f3207..4d696d7de73 100644 --- a/source/nsswitch/pam_winbind.c +++ b/source/nsswitch/pam_winbind.c @@ -483,6 +483,25 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, return PAM_IGNORE; } +PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, + int argc, const char **argv) +{ + /* parse arguments */ + int ctrl = _pam_parse(argc, argv); + if (ctrl & WINBIND_DEBUG_ARG) + _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_open_session handler"); + return PAM_SUCCESS; +} + +PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, + int argc, const char **argv) +{ + /* parse arguments */ + int ctrl = _pam_parse(argc, argv); + if (ctrl & WINBIND_DEBUG_ARG) + _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_close_session handler"); + return PAM_SUCCESS; +} PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags, int argc, const char **argv) -- cgit From 022788c81460e7f3bac690869eccf24405759e0c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 23:01:16 +0000 Subject: Tracked down a very fiddly bug :-). If no PDC available, cli_shutdown was closing fd 0 due to the cli_struct never being initialised.... This was upsetting a tdb that happened to be using fd 0 at the time :-). Jeremy. --- source/smbd/password.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index 39733611bd0..379331f6f41 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1456,7 +1456,7 @@ BOOL domain_client_validate( char *user, char *domain, char *p, *pserver; NET_ID_INFO_CTR ctr; NET_USER_INFO_3 info3; - struct cli_state cli; + struct cli_state *pcli = NULL; uint32 smb_uid_low; BOOL connected_ok = False; time_t last_change_time; @@ -1532,8 +1532,6 @@ BOOL domain_client_validate( char *user, char *domain, * see if they were valid. */ - ZERO_STRUCT(cli); - /* * Treat each name in the 'password server =' line as a potential * PDC/BDC. Contact each in turn and try and authenticate. @@ -1547,15 +1545,16 @@ BOOL domain_client_validate( char *user, char *domain, while (!connected_ok && next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) { if(strequal(remote_machine, "*")) { - connected_ok = find_connect_pdc(&cli, trust_passwd, last_change_time); + connected_ok = find_connect_pdc(pcli, trust_passwd, last_change_time); } else { - connected_ok = connect_to_domain_password_server(&cli, remote_machine, trust_passwd); + connected_ok = connect_to_domain_password_server(pcli, remote_machine, trust_passwd); } } if (!connected_ok) { DEBUG(0,("domain_client_validate: Domain password server not available.\n")); - cli_shutdown(&cli); + if (pcli) + cli_shutdown(pcli); return False; } @@ -1564,7 +1563,7 @@ BOOL domain_client_validate( char *user, char *domain, ZERO_STRUCT(info3); - status = cli_nt_login_network(&cli, domain, user, smb_uid_low, (char *)local_challenge, + status = cli_nt_login_network(pcli, domain, user, smb_uid_low, (char *)local_challenge, ((smb_apasslen != 0) ? smb_apasswd : NULL), ((smb_ntpasslen != 0) ? smb_ntpasswd : NULL), &ctr, &info3); @@ -1573,9 +1572,9 @@ BOOL domain_client_validate( char *user, char *domain, DEBUG(0,("domain_client_validate: unable to validate password for user %s in domain \ %s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, get_nt_error_msg(status) )); - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); + cli_nt_session_close(pcli); + cli_ulogoff(pcli); + cli_shutdown(pcli); if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL)) *user_exists = False; @@ -1624,12 +1623,12 @@ BOOL domain_client_validate( char *user, char *domain, * send here. JRA. */ - if(cli_nt_logoff(&cli, &ctr) == False) { + if(cli_nt_logoff(pcli, &ctr) == False) { DEBUG(0,("domain_client_validate: unable to log off user %s in domain \ -%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(&cli))); - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); +%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(pcli))); + cli_nt_session_close(pcli); + cli_ulogoff(pcli); + cli_shutdown(pcli); return False; } #endif /* 0 */ @@ -1638,8 +1637,8 @@ BOOL domain_client_validate( char *user, char *domain, to allocate the other_sids and gids structures has been deleted - so these pointers are no longer valid..... */ - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); + cli_nt_session_close(pcli); + cli_ulogoff(pcli); + cli_shutdown(pcli); return True; } -- cgit From 146649bb3b437bf5ffef77d927f9d6bc296ea4e7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Apr 2002 23:40:15 +0000 Subject: Fixed up NULL ptr derefs. Jeremy --- source/smbd/password.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index 379331f6f41..df54e94aea5 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1191,13 +1191,16 @@ use this machine as the password server.\n")); given a name or IP address. ************************************************************************/ -static BOOL connect_to_domain_password_server(struct cli_state *pcli, +static BOOL connect_to_domain_password_server(struct cli_state **ppcli, char *server, unsigned char *trust_passwd) { struct in_addr dest_ip; fstring remote_machine; + struct cli_state *pcli = NULL; + + *ppcli = NULL; - if(!cli_initialise(pcli)) { + if(!(pcli = cli_initialise(NULL))) { DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n")); return False; } @@ -1338,6 +1341,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); return(False); } + *ppcli = pcli; + return True; } @@ -1345,7 +1350,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); Utility function to attempt a connection to an IP address of a DC. ************************************************************************/ -static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, unsigned char *trust_passwd) +static BOOL attempt_connect_to_dc(struct cli_state **ppcli, struct in_addr *ip, unsigned char *trust_passwd) { fstring dc_name; @@ -1359,7 +1364,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, un if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name)) return False; - return connect_to_domain_password_server(pcli, dc_name, trust_passwd); + return connect_to_domain_password_server(ppcli, dc_name, trust_passwd); } /*********************************************************************** @@ -1367,7 +1372,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, un the PDC and BDC's for this DOMAIN, and query them in turn. ************************************************************************/ -static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd, time_t last_change_time) +static BOOL find_connect_pdc(struct cli_state **ppcli, unsigned char *trust_passwd, time_t last_change_time) { struct in_addr *ip_list = NULL; int count = 0; @@ -1398,7 +1403,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd if(!is_local_net(ip_list[i])) continue; - if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) + if((connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd))) break; zero_ip(&ip_list[i]); /* Tried and failed. */ @@ -1411,7 +1416,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd i = (sys_random() % count); if (!is_zero_ip(ip_list[i])) { - if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) + if (!(connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd))) zero_ip(&ip_list[i]); /* Tried and failed. */ } } @@ -1429,7 +1434,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd if (is_zero_ip(ip_list[i])) continue; - if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd))) + if((connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd))) break; } } @@ -1545,9 +1550,9 @@ BOOL domain_client_validate( char *user, char *domain, while (!connected_ok && next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) { if(strequal(remote_machine, "*")) { - connected_ok = find_connect_pdc(pcli, trust_passwd, last_change_time); + connected_ok = find_connect_pdc(&pcli, trust_passwd, last_change_time); } else { - connected_ok = connect_to_domain_password_server(pcli, remote_machine, trust_passwd); + connected_ok = connect_to_domain_password_server(&pcli, remote_machine, trust_passwd); } } -- cgit From b2329039d255928faf53474ee7ab06b6353b9fbe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Apr 2002 00:16:18 +0000 Subject: fixed a namequery bug caused by my recent string length patches --- source/libsmb/namequery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 7928d446525..c578df66217 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -191,7 +191,7 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t if (i == count) goto done; - pull_ascii(name, status[i].name, 15, 0, STR_TERMINATE); + pull_ascii(name, status[i].name, 15, -1, STR_TERMINATE); result = True; done: -- cgit From 531cfc89d51b69aa7d8e96ec6b387467a82899b3 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Fri, 19 Apr 2002 00:35:44 +0000 Subject: More packaging updates from the kitchen. --- packaging/Caldera/OpenServer/Compile | 12 ++++---- packaging/Caldera/OpenServer/Install | 5 ++-- packaging/Caldera/OpenServer/README | 14 --------- packaging/Caldera/OpenServer/pkg/input/Samba.pkg | 28 ------------------ .../Caldera/OpenServer/pkg/input/SambaDOC.pkg | 7 ----- .../Caldera/OpenServer/pkg/input/SambaSWAT.pkg | 8 ------ .../Caldera/OpenServer/samba-2.2.3-osr5.patch | 33 ---------------------- 7 files changed, 8 insertions(+), 99 deletions(-) delete mode 100644 packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch diff --git a/packaging/Caldera/OpenServer/Compile b/packaging/Caldera/OpenServer/Compile index 48cd3683b68..7628704f0d3 100755 --- a/packaging/Caldera/OpenServer/Compile +++ b/packaging/Caldera/OpenServer/Compile @@ -31,18 +31,18 @@ then echo "cd ../../../source" echo "rm -f mout-1 mout-2 mout-3 mout-4" echo "make all 2>&1 | tee mout-1" - echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2" - echo "make bin/smbspool smbwrapper bin/smbsh bin/wbinfo 2>&1 | tee mout-3" - echo "make masktest locktest locktest2 2>&1 | tee mout-4" + echo "make smbfilter debug2html 2>&1 | tee mout-2" + echo "make bin/smbspool bin/wbinfo 2>&1 | tee mout-3" else cd ../../../source rm -f mout-1 mout-2 mout-3 mout-4 make all 2>&1 | tee mout-1 - make smbfilter smbtorture debug2html 2>&1 | tee mout-2 - make bin/smbspool smbwrapper bin/smbsh bin/wbinfo 2>&1 | tee mout-3 - make masktest locktest locktest2 2>&1 | tee mout-4 + make smbfilter debug2html 2>&1 | tee mout-2 + make bin/smbspool bin/wbinfo 2>&1 | tee mout-3 fi # # Not building : # nsswitch - no # rpctorture - improper use of client_info struct, dunno +# smbtorture, locktest, locktest2, masktest - used for dev. only +# smbwrapper, smbsh - untested and unlikely to work on osr5 diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install index c3206023707..8fc79bcac5c 100755 --- a/packaging/Caldera/OpenServer/Install +++ b/packaging/Caldera/OpenServer/Install @@ -52,8 +52,7 @@ cd ../../.. # Install standard binary files for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ - make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \ - smbsh + make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool do $V install -m755 -s source/bin/$i ${BLDFIX}/bin done @@ -63,7 +62,7 @@ $V install -m755 source/script/$i ${BLDFIX}/bin done # Install secure binary files -for i in smbd nmbd swat debug2html smbtorture smbfilter locktest2 masktest +for i in smbd nmbd swat debug2html smbfilter do $V install -m755 -s source/bin/$i ${BLDFIX}/sbin done diff --git a/packaging/Caldera/OpenServer/README b/packaging/Caldera/OpenServer/README index 2399c0ccd77..678e45a90cf 100644 --- a/packaging/Caldera/OpenServer/README +++ b/packaging/Caldera/OpenServer/README @@ -6,20 +6,6 @@ Instructions: Preparing Samba Packages for SCO OpenServer We provide support only for current versions of SCO OpenServer -The file samba-2.2.3-osr5.patch is a patch file suitable for use -with the patch command as follows: - - # cd ../../../source - # patch -p 0 -i ../packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch - -The files modified by this patch are: - utils/torture.c - utils/locktest.c - -This patch should only be necessary until these changes are accepted -back into the 2.2.3 source tree. Until then, this patch must be applied -prior to building Samba 2.2.3 on SCO OpenServer 5. - To produce the custom installable media images simply type (in this directory): # ./Makevol diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg index 1c9fa360c57..eabf026eb4d 100644 --- a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg @@ -211,13 +211,6 @@ group = sys flags = exportPath = /usr/lib/samba/bin/smbspool -FILE:Samba:SHARED:usr/lib/samba/bin/smbsh: -mode = 0755 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/bin/smbsh - FILE:Samba:SHARED:usr/lib/samba/bin/mksmbpasswd.sh: mode = 0755 owner = root @@ -280,13 +273,6 @@ group = sys flags = exportPath = /usr/lib/samba/sbin/debug2html -FILE:Samba:SHARED:usr/lib/samba/sbin/smbtorture: -mode = 0755 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/sbin/smbtorture - FILE:Samba:SHARED:usr/lib/samba/sbin/smbfilter: mode = 0755 owner = root @@ -294,20 +280,6 @@ group = sys flags = exportPath = /usr/lib/samba/sbin/smbfilter -FILE:Samba:SHARED:usr/lib/samba/sbin/locktest2: -mode = 0755 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/sbin/locktest2 - -FILE:Samba:SHARED:usr/lib/samba/sbin/masktest: -mode = 0755 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/sbin/masktest - DIR:Samba:SHARED:usr/lib/samba/lib: mode = 0755 owner = root diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg index 70f5f1d55d8..0ed9bdb72b8 100644 --- a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg @@ -119,13 +119,6 @@ group = sys flags = exportPath = /usr/man/man.1/smbcontrol.1 -FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbsh.1: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/man/man.1/smbsh.1 - FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbstatus.1: mode = 0644 owner = root diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg index 69d8a2de7a0..46dcc23c244 100644 --- a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg +++ b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg @@ -293,14 +293,6 @@ flags = exportPath = /usr/lib/samba/swat/help/smbpasswd.8.html exportPath = /usr/share/doc/samba/help/smbpasswd.8.html -FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbsh.1.html: -mode = 0644 -owner = root -group = sys -flags = -exportPath = /usr/lib/samba/swat/help/smbsh.1.html -exportPath = /usr/share/doc/samba/help/smbsh.1.html - FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbspool.8.html: mode = 0644 owner = root diff --git a/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch b/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch deleted file mode 100644 index 45770f226e7..00000000000 --- a/packaging/Caldera/OpenServer/samba-2.2.3-osr5.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- utils/torture.c.00 Thu Jan 24 17:54:13 2002 -+++ utils/torture.c Thu Jan 24 16:58:52 2002 -@@ -4801,8 +4801,13 @@ - dbf = stdout; - - #ifdef HAVE_SETBUFFER -- setbuffer(stdout, NULL, 0); -+ setbuffer(stdout, NULL, 0); -+#else -+#if defined(_SCO_DS) /* SCO OpenServer */ -+ setvbuf(stdout, NULL, _IONBF, 0); - #endif -+#endif -+ - charset_initialise(); - - codepage_initialise(lp_client_code_page()); - ---- utils/locktest.c.00 Fri Sep 29 13:18:14 2000 -+++ utils/locktest.c Fri Apr 13 17:54:11 2001 -@@ -384,8 +384,12 @@ - recorded[n].conn = random() % NCONNECTIONS; - recorded[n].f = random() % NFILES; - recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1)); -+#if defined(_SCO_DS) /* OpenServer */ -+ recorded[n].len = 1; -+#else - recorded[n].len = 1 + - random() % (LOCKRANGE-(recorded[n].start-LOCKBASE)); -+#endif - recorded[n].start *= RANGE_MULTIPLE; - recorded[n].len *= RANGE_MULTIPLE; - recorded[n].r1 = random() % 100; -- cgit From a1555288253d5d39db0a920ddeb7da9fc2ba0928 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:07:37 +0000 Subject: First cut at fixing the EINTR problem...... Still a little more to be done. Jeremy. --- source/include/proto.h | 1979 ++++++++++++++++++++++++------------------------ source/lib/system.c | 45 ++ source/lib/util.c | 9 +- source/lib/util_sock.c | 189 +++-- source/tdb/tdb.c | 8 +- 5 files changed, 1140 insertions(+), 1090 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 2d18474f41d..fea2211061a 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,640 +181,134 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from lib/snprintf.c */ - - -/* The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/* The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/* The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); - -/* The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); - -/* The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/* The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/* The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/* The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/* The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/* The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/* The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/* The following definitions come from lib/util_sec.c */ +/* The following definitions come from libsmb/cliconnect.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from lib/util_sid.c */ +/* The following definitions come from libsmb/cli_dfs.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); -/* The following definitions come from lib/util_sock.c */ +/* The following definitions come from libsmb/clidgram.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/util_str.c */ +/* The following definitions come from libsmb/clientgen.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/clierror.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/clifile.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from libsmb/clilist.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); /* The following definitions come from libsmb/cli_lsarpc.c */ @@ -861,6 +355,13 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/* The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -894,6 +395,12 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); +/* The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -901,6 +408,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/* The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/* The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/* The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -989,6 +546,12 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint16 switch_value, TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -1069,357 +632,797 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/cliconnect.c */ +/* The following definitions come from libsmb/clistr.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from libsmb/clitrans.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/* The following definitions come from libsmb/credentials.c */ + +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/* The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/* The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/* The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/* The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ -/* The following definitions come from libsmb/clientgen.c */ +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +/* The following definitions come from lib/smbrun.c */ -/* The following definitions come from libsmb/clierror.c */ +int smbrun(char *cmd, int *outfd); -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +/* The following definitions come from libsmb/smbdes.c */ -/* The following definitions come from libsmb/clifile.c */ +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +/* The following definitions come from libsmb/smbencrypt.c */ -/* The following definitions come from libsmb/clilist.c */ +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +/* The following definitions come from libsmb/smberr.c */ -/* The following definitions come from libsmb/climessage.c */ +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +/* The following definitions come from libsmb/unexpected.c */ -/* The following definitions come from libsmb/clioplock.c */ +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); +/* The following definitions come from lib/snprintf.c */ -/* The following definitions come from libsmb/cliprint.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +/* The following definitions come from lib/substitute.c */ -/* The following definitions come from libsmb/clirap.c */ +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +/* The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +ssize_t sys_read(int fd, void *buf, size_t count); +ssize_t sys_write(int fd, const void *buf, size_t count); +int sys_send(int s, const void *msg, size_t len, int flags); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); -/* The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); -/* The following definitions come from libsmb/clistr.c */ +/* The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/* The following definitions come from libsmb/clitrans.c */ +/* The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/* The following definitions come from libsmb/credentials.c */ +/* The following definitions come from lib/username.c */ -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/* The following definitions come from libsmb/errormap.c */ +/* The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/* The following definitions come from libsmb/namequery.c */ +/* The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/* The following definitions come from libsmb/nmblib.c */ +/* The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/* The following definitions come from libsmb/nterr.c */ +/* The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/* The following definitions come from libsmb/passchange.c */ +/* The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/* The following definitions come from libsmb/pwd_cache.c */ +/* The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); -/* The following definitions come from libsmb/smbdes.c */ +/* The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); -/* The following definitions come from libsmb/smbencrypt.c */ +/* The following definitions come from lib/util_str.c */ -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /* The following definitions come from locking/brlock.c */ @@ -1508,9 +1511,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1541,6 +1541,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2423,19 +2426,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ -/* The following definitions come from printing/print_generic.c */ - - -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/* The following definitions come from printing/print_generic.c */ + + /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2461,6 +2459,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2519,6 +2522,42 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4224,42 +4263,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4727,6 +4730,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4792,24 +4813,6 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/lib/system.c b/source/lib/system.c index 3bb11f11b81..244f4e8a6f9 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -73,6 +73,51 @@ int sys_usleep(long usecs) #endif /* HAVE_USLEEP */ } +/******************************************************************* +A read wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_read(int fd, void *buf, size_t count) +{ + ssize_t ret; + + do { + errno = 0; + ret = read(fd, buf, count); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A write wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_write(int fd, const void *buf, size_t count) +{ + ssize_t ret; + + do { + errno = 0; + ret = write(fd, buf, count); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A send wrapper that will deal with EINTR. +********************************************************************/ + +int sys_send(int s, const void *msg, size_t len, int flags) +{ + ssize_t ret; + + do { + errno = 0; + ret = send(s, msg, len, flags); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util.c b/source/lib/util.c index 28bd700f360..d24f6749a04 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1307,11 +1307,12 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - errno = 0; + do { + errno = 0; + ret = fcntl(fd,op,&lock); + } while (ret == -1 && errno == EINTR); - ret = fcntl(fd,op,&lock); - - if (errno != 0) + if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); /* a lock query */ diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 94388c88a37..40d6c858e56 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -223,10 +223,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); #endif /* WITH_SSL */ if (readret == 0) { @@ -280,10 +280,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf+nread, maxcnt-nread); + readret = sys_read(fd, buf+nread, maxcnt-nread); #endif /* WITH_SSL */ if (readret == 0) { @@ -335,10 +335,10 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); #endif /* WITH_SSL */ if (readret <= 0) @@ -372,10 +372,10 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf+nread, maxcnt-nread); + readret = sys_read(fd, buf+nread, maxcnt-nread); #endif /* WITH_SSL */ if (readret <= 0) @@ -394,12 +394,12 @@ send a keepalive packet (rfc1002) BOOL send_keepalive(int client) { - unsigned char buf[4]; + unsigned char buf[4]; - buf[0] = 0x85; - buf[1] = buf[2] = buf[3] = 0; + buf[0] = 0x85; + buf[1] = buf[2] = buf[3] = 0; - return(write_socket_data(client,(char *)buf,4) == 4); + return(write_socket_data(client,(char *)buf,4) == 4); } /**************************************************************************** @@ -408,38 +408,36 @@ BOOL send_keepalive(int client) ssize_t read_data(int fd,char *buffer,size_t N) { - ssize_t ret; - size_t total=0; + ssize_t ret; + size_t total=0; - smb_read_error = 0; + smb_read_error = 0; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_read(ssl, buffer + total, N - total); - }else{ - ret = read(fd,buffer + total,N - total); - } + if(fd == sslFd){ + ret = SSL_read(ssl, buffer + total, N - total); + }else{ + ret = sys_read(fd,buffer + total,N - total); + } #else /* WITH_SSL */ - ret = read(fd,buffer + total,N - total); + ret = sys_read(fd,buffer + total,N - total); #endif /* WITH_SSL */ - if (ret == 0) - { - DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_EOF; - return 0; - } - if (ret == -1) - { - DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_ERROR; - return -1; - } - total += ret; - } - return (ssize_t)total; + if (ret == 0) { + DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_EOF; + return 0; + } + + if (ret == -1) { + DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_ERROR; + return -1; + } + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -456,10 +454,10 @@ ssize_t write_data(int fd,char *buffer,size_t N) if(fd == sslFd){ ret = SSL_write(ssl,buffer + total,N - total); } else { - ret = write(fd,buffer + total,N - total); + ret = sys_write(fd,buffer + total,N - total); } #else /* WITH_SSL */ - ret = write(fd,buffer + total,N - total); + ret = sys_write(fd,buffer + total,N - total); #endif /* WITH_SSL */ if (ret == -1) { @@ -481,30 +479,30 @@ ssize_t write_data(int fd,char *buffer,size_t N) ssize_t write_socket_data(int fd,char *buffer,size_t N) { - size_t total=0; - ssize_t ret; + size_t total=0; + ssize_t ret; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_write(ssl,buffer + total,N - total); - }else{ - ret = send(fd,buffer + total,N - total, 0); - } + if(fd == sslFd){ + ret = SSL_write(ssl,buffer + total,N - total); + }else{ + ret = sys_send(fd,buffer + total,N - total, 0); + } #else /* WITH_SSL */ - ret = send(fd,buffer + total,N - total,0); + ret = sys_send(fd,buffer + total,N - total,0); #endif /* WITH_SSL */ - if (ret == -1) { - DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) )); - return -1; - } - if (ret == 0) return total; + if (ret == -1) { + DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) )); + return -1; + } + if (ret == 0) + return (ssize_t)total; - total += ret; - } - return (ssize_t)total; + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -513,17 +511,17 @@ write to a socket ssize_t write_socket(int fd,char *buf,size_t len) { - ssize_t ret=0; + ssize_t ret=0; - DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len)); - ret = write_socket_data(fd,buf,len); + DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len)); + ret = write_socket_data(fd,buf,len); - DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret)); - if(ret <= 0) - DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n", - (int)len, fd, strerror(errno) )); + DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret)); + if(ret <= 0) + DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n", + (int)len, fd, strerror(errno) )); - return(ret); + return(ret); } /**************************************************************************** @@ -536,30 +534,29 @@ timeout is in milliseconds. static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int timeout) { - ssize_t len=0; - int msg_type; - BOOL ok = False; + ssize_t len=0; + int msg_type; + BOOL ok = False; - while (!ok) - { - if (timeout > 0) - ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4); - else - ok = (read_data(fd,inbuf,4) == 4); + while (!ok) { + if (timeout > 0) + ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4); + else + ok = (read_data(fd,inbuf,4) == 4); - if (!ok) - return(-1); + if (!ok) + return(-1); - len = smb_len(inbuf); - msg_type = CVAL(inbuf,0); + len = smb_len(inbuf); + msg_type = CVAL(inbuf,0); - if (msg_type == 0x85) - DEBUG(5,("Got keepalive packet\n")); - } + if (msg_type == 0x85) + DEBUG(5,("Got keepalive packet\n")); + } - DEBUG(10,("got smb length of %d\n",len)); + DEBUG(10,("got smb length of %d\n",len)); - return(len); + return(len); } /**************************************************************************** @@ -571,23 +568,22 @@ timeout is in milliseconds. ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout) { - ssize_t len; + ssize_t len; - for(;;) - { - len = read_smb_length_return_keepalive(fd, inbuf, timeout); + for(;;) { + len = read_smb_length_return_keepalive(fd, inbuf, timeout); - if(len < 0) - return len; + if(len < 0) + return len; - /* Ignore session keepalives. */ - if(CVAL(inbuf,0) != 0x85) - break; - } + /* Ignore session keepalives. */ + if(CVAL(inbuf,0) != 0x85) + break; + } - DEBUG(10,("read_smb_length: got smb length of %d\n",len)); + DEBUG(10,("read_smb_length: got smb length of %d\n",len)); - return len; + return len; } /**************************************************************************** @@ -1213,4 +1209,3 @@ int sock_exec(const char *prog) close(fd[1]); return fd[0]; } - diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 98caca82a10..e3ba1db0d2a 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -169,6 +169,7 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, int rw_type, int lck_type, int probe) { struct flock fl; + int ret; if (tdb->flags & TDB_NOLOCK) return 0; @@ -183,7 +184,12 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, fl.l_len = 1; fl.l_pid = 0; - if (fcntl(tdb->fd,lck_type,&fl) == -1) { + do { + errno = 0; + ret = fcntl(tdb->fd,lck_type,&fl); + } while (ret == -1 && errno == EINTR); + + if (ret == -1) { if (!probe) { TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", tdb->fd, offset, rw_type, lck_type)); -- cgit From 48475a7a697242b9fd7b1aec24389afb112569c4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:08:52 +0000 Subject: First cut at fix for the EINTR problem... More needs to be done I think. Jeremy. --- source/lib/system.c | 45 +++++++++ source/lib/util.c | 9 +- source/lib/util_sock.c | 266 ++++++++++++++++++++++++------------------------- source/tdb/tdb.c | 8 +- 4 files changed, 187 insertions(+), 141 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index 8c7eec939ea..d97751eb4b8 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -72,6 +72,51 @@ int sys_usleep(long usecs) #endif /* HAVE_USLEEP */ } +/******************************************************************* +A read wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_read(int fd, void *buf, size_t count) +{ + ssize_t ret; + + do { + errno = 0; + ret = read(fd, buf, count); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A write wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_write(int fd, const void *buf, size_t count) +{ + ssize_t ret; + + do { + errno = 0; + ret = write(fd, buf, count); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A send wrapper that will deal with EINTR. +********************************************************************/ + +int sys_send(int s, const void *msg, size_t len, int flags) +{ + ssize_t ret; + + do { + errno = 0; + ret = send(s, msg, len, flags); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util.c b/source/lib/util.c index 7e2ad496395..c524adaa7af 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1353,11 +1353,12 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - errno = 0; + do { + errno = 0; + ret = fcntl(fd,op,&lock); + } while (ret == -1 && errno == EINTR); - ret = fcntl(fd,op,&lock); - - if (errno != 0) + if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); /* a lock query */ diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index af3182264d5..1c7f9ce1152 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -247,10 +247,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma if (fd == sslFd) { readret = SSL_read(ssl, buf + nread, maxcnt - nread); } else { - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); #endif /* WITH_SSL */ if (readret == 0) { @@ -304,10 +304,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma if (fd == sslFd) { readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf+nread, maxcnt-nread); + readret = sys_read(fd, buf+nread, maxcnt-nread); #endif /* WITH_SSL */ if (readret == 0) { @@ -357,10 +357,10 @@ ssize_t read_with_timeout(int fd, char *buf, size_t mincnt, size_t maxcnt, if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); #endif /* WITH_SSL */ if (readret <= 0) @@ -387,10 +387,10 @@ ssize_t read_with_timeout(int fd, char *buf, size_t mincnt, size_t maxcnt, if(fd == sslFd){ readret = SSL_read(ssl, buf + nread, maxcnt - nread); }else{ - readret = read(fd, buf + nread, maxcnt - nread); + readret = sys_read(fd, buf + nread, maxcnt - nread); } #else /* WITH_SSL */ - readret = read(fd, buf+nread, maxcnt-nread); + readret = sys_read(fd, buf+nread, maxcnt-nread); #endif /* WITH_SSL */ if (readret <= 0) @@ -409,12 +409,12 @@ send a keepalive packet (rfc1002) BOOL send_keepalive(int client) { - unsigned char buf[4]; + unsigned char buf[4]; - buf[0] = SMBkeepalive; - buf[1] = buf[2] = buf[3] = 0; + buf[0] = SMBkeepalive; + buf[1] = buf[2] = buf[3] = 0; - return(write_socket_data(client,(char *)buf,4) == 4); + return(write_socket_data(client,(char *)buf,4) == 4); } /**************************************************************************** @@ -423,38 +423,36 @@ BOOL send_keepalive(int client) ssize_t read_data(int fd,char *buffer,size_t N) { - ssize_t ret; - size_t total=0; + ssize_t ret; + size_t total=0; - smb_read_error = 0; + smb_read_error = 0; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_read(ssl, buffer + total, N - total); - }else{ - ret = read(fd,buffer + total,N - total); - } + if(fd == sslFd){ + ret = SSL_read(ssl, buffer + total, N - total); + }else{ + ret = sys_read(fd,buffer + total,N - total); + } #else /* WITH_SSL */ - ret = read(fd,buffer + total,N - total); + ret = sys_read(fd,buffer + total,N - total); #endif /* WITH_SSL */ - if (ret == 0) - { - DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_EOF; - return 0; - } - if (ret == -1) - { - DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_ERROR; - return -1; - } - total += ret; - } - return (ssize_t)total; + if (ret == 0) { + DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_EOF; + return 0; + } + + if (ret == -1) { + DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_ERROR; + return -1; + } + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -463,38 +461,36 @@ ssize_t read_data(int fd,char *buffer,size_t N) static ssize_t read_socket_data(int fd,char *buffer,size_t N) { - ssize_t ret; - size_t total=0; + ssize_t ret; + size_t total=0; - smb_read_error = 0; + smb_read_error = 0; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_read(ssl, buffer + total, N - total); - }else{ - ret = read(fd,buffer + total,N - total); + if(fd == sslFd){ + ret = SSL_read(ssl, buffer + total, N - total); + }else{ + ret = sys_read(fd,buffer + total,N - total); } #else /* WITH_SSL */ - ret = read(fd,buffer + total,N - total); + ret = sys_read(fd,buffer + total,N - total); #endif /* WITH_SSL */ - if (ret == 0) - { - DEBUG(10,("read_socket_data: recv of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_EOF; - return 0; - } - if (ret == -1) - { - DEBUG(0,("read_socket_data: recv failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); - smb_read_error = READ_ERROR; - return -1; - } - total += ret; - } - return (ssize_t)total; + if (ret == 0) { + DEBUG(10,("read_socket_data: recv of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_EOF; + return 0; + } + + if (ret == -1) { + DEBUG(0,("read_socket_data: recv failure for %d. Error = %s\n", (int)(N - total), strerror(errno) )); + smb_read_error = READ_ERROR; + return -1; + } + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -503,30 +499,30 @@ static ssize_t read_socket_data(int fd,char *buffer,size_t N) ssize_t write_data(int fd,char *buffer,size_t N) { - size_t total=0; - ssize_t ret; + size_t total=0; + ssize_t ret; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_write(ssl,buffer + total,N - total); - }else{ - ret = write(fd,buffer + total,N - total); - } + if(fd == sslFd){ + ret = SSL_write(ssl,buffer + total,N - total); + }else{ + ret = sys_write(fd,buffer + total,N - total); + } #else /* WITH_SSL */ - ret = write(fd,buffer + total,N - total); + ret = sys_write(fd,buffer + total,N - total); #endif /* WITH_SSL */ - if (ret == -1) { - DEBUG(0,("write_data: write failure. Error = %s\n", strerror(errno) )); - return -1; - } - if (ret == 0) return total; + if (ret == -1) { + DEBUG(0,("write_data: write failure. Error = %s\n", strerror(errno) )); + return -1; + } + if (ret == 0) + return total; - total += ret; - } - return (ssize_t)total; + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -535,30 +531,30 @@ ssize_t write_data(int fd,char *buffer,size_t N) ssize_t write_socket_data(int fd,char *buffer,size_t N) { - size_t total=0; - ssize_t ret; + size_t total=0; + ssize_t ret; - while (total < N) - { + while (total < N) { #ifdef WITH_SSL - if(fd == sslFd){ - ret = SSL_write(ssl,buffer + total,N - total); - }else{ - ret = send(fd,buffer + total,N - total, 0); + if(fd == sslFd){ + ret = SSL_write(ssl,buffer + total,N - total); + }else{ + ret = sys_send(fd,buffer + total,N - total, 0); } #else /* WITH_SSL */ - ret = send(fd,buffer + total,N - total,0); + ret = sys_send(fd,buffer + total,N - total,0); #endif /* WITH_SSL */ - if (ret == -1) { - DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) )); - return -1; - } - if (ret == 0) return total; + if (ret == -1) { + DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) )); + return -1; + } + if (ret == 0) + return total; - total += ret; - } - return (ssize_t)total; + total += ret; + } + return (ssize_t)total; } /**************************************************************************** @@ -567,17 +563,17 @@ write to a socket ssize_t write_socket(int fd,char *buf,size_t len) { - ssize_t ret=0; + ssize_t ret=0; - DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len)); - ret = write_socket_data(fd,buf,len); + DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len)); + ret = write_socket_data(fd,buf,len); - DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret)); - if(ret <= 0) - DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n", - (int)len, fd, strerror(errno) )); + DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret)); + if(ret <= 0) + DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n", + (int)len, fd, strerror(errno) )); - return(ret); + return(ret); } /**************************************************************************** @@ -590,30 +586,29 @@ timeout is in milliseconds. static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int timeout) { - ssize_t len=0; - int msg_type; - BOOL ok = False; + ssize_t len=0; + int msg_type; + BOOL ok = False; - while (!ok) - { - if (timeout > 0) - ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4); - else - ok = (read_socket_data(fd,inbuf,4) == 4); + while (!ok) { + if (timeout > 0) + ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4); + else + ok = (read_socket_data(fd,inbuf,4) == 4); - if (!ok) - return(-1); + if (!ok) + return(-1); - len = smb_len(inbuf); - msg_type = CVAL(inbuf,0); + len = smb_len(inbuf); + msg_type = CVAL(inbuf,0); - if (msg_type == SMBkeepalive) - DEBUG(5,("Got keepalive packet\n")); - } + if (msg_type == SMBkeepalive) + DEBUG(5,("Got keepalive packet\n")); + } - DEBUG(10,("got smb length of %d\n",len)); + DEBUG(10,("got smb length of %d\n",len)); - return(len); + return(len); } /**************************************************************************** @@ -625,23 +620,22 @@ timeout is in milliseconds. ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout) { - ssize_t len; + ssize_t len; - for(;;) - { - len = read_smb_length_return_keepalive(fd, inbuf, timeout); + for(;;) { + len = read_smb_length_return_keepalive(fd, inbuf, timeout); - if(len < 0) - return len; + if(len < 0) + return len; - /* Ignore session keepalives. */ - if(CVAL(inbuf,0) != SMBkeepalive) - break; - } + /* Ignore session keepalives. */ + if(CVAL(inbuf,0) != SMBkeepalive) + break; + } - DEBUG(10,("read_smb_length: got smb length of %d\n",len)); + DEBUG(10,("read_smb_length: got smb length of %d\n",len)); - return len; + return len; } /**************************************************************************** diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index 98caca82a10..e3ba1db0d2a 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -169,6 +169,7 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, int rw_type, int lck_type, int probe) { struct flock fl; + int ret; if (tdb->flags & TDB_NOLOCK) return 0; @@ -183,7 +184,12 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, fl.l_len = 1; fl.l_pid = 0; - if (fcntl(tdb->fd,lck_type,&fl) == -1) { + do { + errno = 0; + ret = fcntl(tdb->fd,lck_type,&fl); + } while (ret == -1 && errno == EINTR); + + if (ret == -1) { if (!probe) { TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", tdb->fd, offset, rw_type, lck_type)); -- cgit From 8cbc24c3bd0e2d2349625c3b5d2e12ac092ec5a8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:15:10 +0000 Subject: Fix send and recvfrom. Jeremy. --- source/lib/system.c | 17 ++++++++++++++++- source/lib/util_sock.c | 22 +++++++++++----------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index d97751eb4b8..61f93dd6a5b 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -106,7 +106,7 @@ ssize_t sys_write(int fd, const void *buf, size_t count) A send wrapper that will deal with EINTR. ********************************************************************/ -int sys_send(int s, const void *msg, size_t len, int flags) +ssize_t sys_send(int s, const void *msg, size_t len, int flags) { ssize_t ret; @@ -117,6 +117,21 @@ int sys_send(int s, const void *msg, size_t len, int flags) return ret; } +/******************************************************************* +A recvfrom wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) +{ + ssize_t ret; + + do { + errno = 0; + ret = recvfrom(s, buf, len, flags, from, fromlen); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 1c7f9ce1152..27336cefa22 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -42,20 +42,19 @@ int smb_read_error = 0; BOOL is_a_socket(int fd) { - int v,l; - l = sizeof(int); - return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); + int v,l; + l = sizeof(int); + return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON}; -typedef struct smb_socket_option -{ - char *name; - int level; - int option; - int value; - int opttype; +typedef struct smb_socket_option { + char *name; + int level; + int option; + int value; + int opttype; } smb_socket_option; smb_socket_option socket_options[] = { @@ -97,6 +96,7 @@ smb_socket_option socket_options[] = { /**************************************************************************** Print socket options. ****************************************************************************/ + static void print_socket_options(int s) { int value, vlen = 4; @@ -178,7 +178,7 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len) memset((char *)&sock,'\0',socklen); memset((char *)&lastip,'\0',sizeof(lastip)); - ret = (ssize_t)recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen); + ret = (ssize_t)sys_recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen); if (ret <= 0) { DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno))); return(0); -- cgit From 17ea08626e8cd14cda64a3c67fdcb6fb700a8380 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:15:12 +0000 Subject: Fix send and recvfrom. Jeremy. --- source/lib/system.c | 17 ++++++++++++++++- source/lib/util_sock.c | 22 +++++++++++----------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index 244f4e8a6f9..d7c266f05a6 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -107,7 +107,7 @@ ssize_t sys_write(int fd, const void *buf, size_t count) A send wrapper that will deal with EINTR. ********************************************************************/ -int sys_send(int s, const void *msg, size_t len, int flags) +ssize_t sys_send(int s, const void *msg, size_t len, int flags) { ssize_t ret; @@ -118,6 +118,21 @@ int sys_send(int s, const void *msg, size_t len, int flags) return ret; } +/******************************************************************* +A recvfrom wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) +{ + ssize_t ret; + + do { + errno = 0; + ret = recvfrom(s, buf, len, flags, from, fromlen); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 40d6c858e56..0ef583b50ac 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -42,20 +42,19 @@ int smb_read_error = 0; BOOL is_a_socket(int fd) { - int v,l; - l = sizeof(int); - return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); + int v,l; + l = sizeof(int); + return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON}; -typedef struct smb_socket_option -{ - char *name; - int level; - int option; - int value; - int opttype; +typedef struct smb_socket_option { + char *name; + int level; + int option; + int value; + int opttype; } smb_socket_option; smb_socket_option socket_options[] = { @@ -97,6 +96,7 @@ smb_socket_option socket_options[] = { /**************************************************************************** Print socket options. ****************************************************************************/ + static void print_socket_options(int s) { int value, vlen = 4; @@ -178,7 +178,7 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len) memset((char *)&sock,'\0',socklen); memset((char *)&lastip,'\0',sizeof(lastip)); - ret = (ssize_t)recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen); + ret = (ssize_t)sys_recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen); if (ret <= 0) { DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno))); return(0); -- cgit From 9ab65676c2cd7e61dde04a94cd60730065c885ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:16:36 +0000 Subject: Fix oplock recvfrom. Jeremy. --- source/smbd/oplock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 1355ee558ce..87249aff2a4 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -132,7 +132,7 @@ BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeou /* * Read a loopback udp message. */ - msg_len = recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN], + msg_len = sys_recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN], buffer_len - OPBRK_CMD_HEADER_LEN, 0, (struct sockaddr *)&from, &fromlen); if(msg_len < 0) { -- cgit From 68c0eb5ca7bc96cfdc8df07bd84f3e49de024b81 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:16:54 +0000 Subject: Fix oplock recvfrom. Jeremy. --- source/smbd/oplock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 23606f1d147..2f74c4cd8c9 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -131,7 +131,7 @@ BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeou /* * Read a loopback udp message. */ - msg_len = recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN], + msg_len = sys_recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN], buffer_len - OPBRK_CMD_HEADER_LEN, 0, (struct sockaddr *)&from, &fromlen); if(msg_len < 0) { -- cgit From 64974fa334fd757ff5cfd1bd32d7300bf8a6208c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:20:04 +0000 Subject: Fixed sendto in oplock code. Jeremy. --- source/lib/system.c | 15 +++++++++++++++ source/smbd/oplock.c | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index 61f93dd6a5b..7734328795c 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -117,6 +117,21 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags) return ret; } +/******************************************************************* +A sendto wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) +{ + ssize_t ret; + + do { + errno = 0; + ret = sendto(s, msg, len, flags, to, tolen); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A recvfrom wrapper that will deal with EINTR. ********************************************************************/ diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 2f74c4cd8c9..9469c05ec66 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -417,7 +417,7 @@ oplocks. Returning success.\n")); toaddr.sin_port = htons(from_port); toaddr.sin_family = AF_INET; - if(sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0, + if(sys_sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0, (struct sockaddr *)&toaddr, sizeof(toaddr)) < 0) { DEBUG(0,("process_local_message: sendto process %d failed. Errno was %s\n", (int)remotepid, strerror(errno))); @@ -930,7 +930,7 @@ dev = %x, inode = %.0f, file_id = %lu and no fsp found !\n", (unsigned int)dev, (double)inode, file_id ); } - if(sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0, + if(sys_sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0, (struct sockaddr *)&addr_out,sizeof(addr_out)) < 0) { if( DEBUGLVL( 0 ) ) { dbgtext( "request_oplock_break: failed when sending a oplock " ); -- cgit From ae5cfc34caa328a8eddbd2048333f55a7d9c69df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 02:20:23 +0000 Subject: Fixed sendto in oplock code. Jeremy. --- source/include/proto.h | 4 +++- source/lib/system.c | 15 +++++++++++++++ source/smbd/oplock.c | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index fea2211061a..96badd9fcf0 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -982,7 +982,9 @@ int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); int sys_usleep(long usecs); ssize_t sys_read(int fd, void *buf, size_t count); ssize_t sys_write(int fd, const void *buf, size_t count); -int sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); diff --git a/source/lib/system.c b/source/lib/system.c index d7c266f05a6..251823b1bce 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -118,6 +118,21 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags) return ret; } +/******************************************************************* +A sendto wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) +{ + ssize_t ret; + + do { + errno = 0; + ret = sendto(s, msg, len, flags, to, tolen); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A recvfrom wrapper that will deal with EINTR. ********************************************************************/ diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 87249aff2a4..dbd7b63d060 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -418,7 +418,7 @@ oplocks. Returning success.\n")); toaddr.sin_port = htons(from_port); toaddr.sin_family = AF_INET; - if(sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0, + if(sys_sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0, (struct sockaddr *)&toaddr, sizeof(toaddr)) < 0) { DEBUG(0,("process_local_message: sendto process %d failed. Errno was %s\n", (int)remotepid, strerror(errno))); @@ -929,7 +929,7 @@ dev = %x, inode = %.0f, file_id = %lu and no fsp found !\n", (unsigned int)dev, (double)inode, file_id ); } - if(sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0, + if(sys_sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0, (struct sockaddr *)&addr_out,sizeof(addr_out)) < 0) { if( DEBUGLVL( 0 ) ) { dbgtext( "request_oplock_break: failed when sending a oplock " ); -- cgit From 8096032663690eafb6bb8b4f405d6231389d4f80 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Apr 2002 03:00:29 +0000 Subject: fixed trust relationships in ADS winbindd after breaking them with my BDC changes ... --- source/libads/ads_struct.c | 9 ++++++--- source/libads/ldap.c | 8 ++++++-- source/nsswitch/winbindd_ads.c | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/source/libads/ads_struct.c b/source/libads/ads_struct.c index 816b6160973..638dc0b22e5 100644 --- a/source/libads/ads_struct.c +++ b/source/libads/ads_struct.c @@ -81,7 +81,8 @@ static char *find_ldap_server(ADS_STRUCT *ads) char *list = NULL; struct in_addr ip; - if (ads->realm && + if (ads->realm && + strcasecmp(ads->workgroup, lp_workgroup()) == 0 && ldap_domain2hostlist(ads->realm, &list) == LDAP_SUCCESS) { char *p; p = strchr(list, ':'); @@ -151,8 +152,10 @@ ADS_STRUCT *ads_init(const char *realm, ads->bind_path = ads_build_dn(ads->realm); } if (!ads->ldap_server) { - ads->ldap_server = strdup(lp_ads_server()); - if (!ads->ldap_server[0]) { + if (strcasecmp(ads->workgroup, lp_workgroup()) == 0) { + ads->ldap_server = strdup(lp_ads_server()); + } + if (!ads->ldap_server || !ads->ldap_server[0]) { ads->ldap_server = find_ldap_server(ads); } } diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 3b787c6a8fb..543e53bcf8e 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -45,7 +45,11 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) ads->last_attempt = time(NULL); - ads->ld = ldap_open(ads->ldap_server, ads->ldap_port); + ads->ld = NULL; + + if (ads->ldap_server) { + ads->ld = ldap_open(ads->ldap_server, ads->ldap_port); + } /* if that failed then try each of the BDC's in turn */ if (!ads->ld) { @@ -60,7 +64,7 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) if (ads->ld) break; } if (ads->ld) { - free(ads->ldap_server); + SAFE_FREE(ads->ldap_server); ads->ldap_server = strdup(inet_ntoa(ip_list[i])); } free(ip_list); diff --git a/source/nsswitch/winbindd_ads.c b/source/nsswitch/winbindd_ads.c index 6c00ddb95fa..c16231b25d7 100644 --- a/source/nsswitch/winbindd_ads.c +++ b/source/nsswitch/winbindd_ads.c @@ -58,7 +58,7 @@ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope if (*res) ads_msgfree(ads, *res); *res = NULL; - DEBUG(1,("Reopening ads connection to %s after error %s\n", + DEBUG(3,("Reopening ads connection to %s after error %s\n", ads->ldap_server, ads_errstr(status))); if (ads->ld) { ldap_unbind(ads->ld); -- cgit From 7aa7177588761e4760e98d885fc49fed8f168633 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 03:04:06 +0000 Subject: Added sys_fcntl (not to be used everywhere). Added sys_read/sys_write for transfer_file. Jeremy. --- source/include/proto.h | 2369 ++++++++++++++++++++++--------------------- source/lib/system.c | 15 + source/lib/util.c | 11 +- source/lib/util_file.c | 1 + source/smbd/notify_kernel.c | 6 +- source/smbd/oplock_irix.c | 12 +- source/smbd/vfs-wrap.c | 4 +- 7 files changed, 1216 insertions(+), 1202 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 96badd9fcf0..cc76ae17969 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,400 +181,843 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from libsmb/cliconnect.c */ - -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); - -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from lib/smbrun.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int smbrun(char *cmd, int *outfd); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from lib/snprintf.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from lib/substitute.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/* The following definitions come from libsmb/clierror.c */ +/* The following definitions come from lib/sysacls.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clifile.c */ +/* The following definitions come from lib/system.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); - -/* The following definitions come from libsmb/clilist.c */ - -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); - -/* The following definitions come from libsmb/cli_lsarpc.c */ - -struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol); -NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); -NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***domains, char ***names, uint32 **types); -NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, - const char **names, DOM_SID **sids, - uint32 **types); -NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint16 info_class, - fstring domain_name, DOM_SID *domain_sid); -NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, - uint32 *num_domains, char ***domain_names, - DOM_SID **domain_sids); -NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, - uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); -NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, - fstring description, uint16 *lang_id_desc); -NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, - uint32 *num_sids, DOM_SID **sids); -NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, - POLICY_HND *user_pol); -NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *count, LUID_ATTR **set); -NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, LUID *luid); -NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 sec_info, - SEC_DESC_BUF **psdb); -BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); - -/* The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +int sys_usleep(long usecs); +ssize_t sys_read(int fd, void *buf, size_t count); +ssize_t sys_write(int fd, const void *buf, size_t count); +ssize_t sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); +int sys_fcntl(int fd, int cmd, void *arg); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); -/* The following definitions come from libsmb/cli_netlogon.c */ +/* The following definitions come from lib/talloc.c */ -struct cli_state *cli_netlogon_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, - DOM_CHAL *srv_chal); -NTSTATUS new_cli_net_auth2(struct cli_state *cli, - uint16 sec_chan, - uint32 neg_flags, DOM_CHAL *srv_chal); -NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - uint16 sec_chan, - const unsigned char mach_pwd[16]); -NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 query_level); -NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, - uint32 database_id, uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 database_id, UINT64_S seqnum, - uint32 *num_deltas, - SAM_DELTA_HDR **hdr_deltas, - SAM_DELTA_CTR **deltas); -NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *username, char *password, - int logon_type); -NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - const char *username, const char *domain, const char *workstation, - const uint8 chal[8], - DATA_BLOB lm_response, DATA_BLOB nt_response, - NET_USER_INFO_3 *info3); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); -/* The following definitions come from libsmb/clioplock.c */ +/* The following definitions come from lib/time.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/* The following definitions come from libsmb/cli_pipe_util.c */ +/* The following definitions come from lib/ufc.c */ -struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, - char *pipe_name, - struct ntuser_creds *creds); -void cli_pipe_shutdown(struct cli_state *cli); +char *ufc_crypt(const char *key,const char *salt); -/* The following definitions come from libsmb/cliprint.c */ +/* The following definitions come from lib/username.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/* The following definitions come from libsmb/clirap.c */ +/* The following definitions come from lib/util.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/* The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from lib/util_file.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/* The following definitions come from libsmb/cli_reg.c */ +/* The following definitions come from lib/util_getent.c */ -struct cli_state *cli_winreg_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *msg, uint32 timeout, uint16 flags); -NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/* The following definitions come from libsmb/cli_samr.c */ +/* The following definitions come from lib/util_seaccess.c */ -struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 access_mask, POLICY_HND *connect_pol); -NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol); -NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol, uint32 access_mask, - DOM_SID *domain_sid, POLICY_HND *domain_pol); -NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 user_rid, POLICY_HND *user_pol); -NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 group_rid, POLICY_HND *group_pol); -NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - SAM_USERINFO_CTR **ctr); -NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 info_level, - GROUP_INFO_CTR *ctr); -NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 *num_groups, - DOM_GID **gid); -NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, - uint32 *num_aliases, uint32 **als_rids); -NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 *num_mem, - uint32 **rid, uint32 **attr); -NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups); -NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups); -NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *alias_pol, uint32 *num_mem, - DOM_SID **sids); -NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 alias_rid, POLICY_HND *alias_pol); -NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint16 switch_value, - SAM_UNK_CTR *ctr); -NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 *start_idx, - uint16 switch_value, uint32 *num_entries, - uint32 max_entries, SAM_DISPINFO_CTR *ctr); -NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_rids, uint32 *rids, - uint32 *num_names, char ***names, - uint32 **name_types); -NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_names, char **names, - uint32 *num_rids, uint32 **rids, - uint32 **rid_types); -NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, char *acct_name, - uint32 acb_info, uint32 unknown, - POLICY_HND *user_pol, uint32 *rid); -NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr); -NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr); -NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol); -NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/* The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from lib/util_sec.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/* The following definitions come from libsmb/cli_spoolss.c */ +/* The following definitions come from lib/util_sid.c */ -struct cli_state *cli_spoolss_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds); -WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *printername, char *datatype, uint32 access_required, - char *station, char *username, POLICY_HND *pol); -WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); -WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 flags, uint32 level, - uint32 *num_printers, PRINTER_INFO_CTR *ctr); -WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 level, int *num_ports, PORT_INFO_CTR *ctr); -WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr); -WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/* The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); + +/* The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/* The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/* The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); + +/* The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); + +/* The following definitions come from libsmb/cli_lsarpc.c */ + +struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_sids, DOM_SID *sids, + char ***domains, char ***names, uint32 **types); +NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_names, + const char **names, DOM_SID **sids, + uint32 **types); +NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, DOM_SID *domain_sid); +NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, + uint32 *num_domains, char ***domain_names, + DOM_SID **domain_sids); +NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, + uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); +NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, + fstring description, uint16 *lang_id_desc); +NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, + uint32 *num_sids, DOM_SID **sids); +NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, + POLICY_HND *user_pol); +NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *count, LUID_ATTR **set); +NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, LUID *luid); +NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 sec_info, + SEC_DESC_BUF **psdb); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); + +/* The following definitions come from libsmb/cli_netlogon.c */ + +struct cli_state *cli_netlogon_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, + DOM_CHAL *srv_chal); +NTSTATUS new_cli_net_auth2(struct cli_state *cli, + uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal); +NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, + uint16 sec_chan, + const unsigned char mach_pwd[16]); +NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 query_level); +NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, + uint32 database_id, uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 database_id, UINT64_S seqnum, + uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *username, char *password, + int logon_type); +NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *username, const char *domain, const char *workstation, + const uint8 chal[8], + DATA_BLOB lm_response, DATA_BLOB nt_response, + NET_USER_INFO_3 *info3); + +/* The following definitions come from libsmb/cli_pipe_util.c */ + +struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, + char *pipe_name, + struct ntuser_creds *creds); +void cli_pipe_shutdown(struct cli_state *cli); + +/* The following definitions come from libsmb/cli_reg.c */ + +struct cli_state *cli_winreg_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *msg, uint32 timeout, uint16 flags); +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); + +/* The following definitions come from libsmb/cli_samr.c */ + +struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol); +NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol); +NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol, uint32 access_mask, + DOM_SID *domain_sid, POLICY_HND *domain_pol); +NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 user_rid, POLICY_HND *user_pol); +NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 group_rid, POLICY_HND *group_pol); +NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + SAM_USERINFO_CTR **ctr); +NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 info_level, + GROUP_INFO_CTR *ctr); +NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 *num_groups, + DOM_GID **gid); +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids); +NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 *num_mem, + uint32 **rid, uint32 **attr); +NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint32 *num_mem, + DOM_SID **sids); +NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 alias_rid, POLICY_HND *alias_pol); +NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint16 switch_value, + SAM_UNK_CTR *ctr); +NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 *start_idx, + uint16 switch_value, uint32 *num_entries, + uint32 max_entries, SAM_DISPINFO_CTR *ctr); +NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_rids, uint32 *rids, + uint32 *num_names, char ***names, + uint32 **name_types); +NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_names, char **names, + uint32 *num_rids, uint32 **rids, + uint32 **rid_types); +NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, char *acct_name, + uint32 acb_info, uint32 unknown, + POLICY_HND *user_pol, uint32 *rid); +NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol); +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); + +/* The following definitions come from libsmb/cli_spoolss.c */ + +struct cli_state *cli_spoolss_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol); +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr); +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr, uint32 command); WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, @@ -632,799 +1075,357 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/* The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/* The following definitions come from libsmb/credentials.c */ - -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/* The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/* The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/* The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/* The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); - -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from libsmb/cliconnect.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from libsmb/clidgram.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/snprintf.c */ +/* The following definitions come from libsmb/clientgen.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/substitute.c */ +/* The following definitions come from libsmb/clierror.c */ -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/sysacls.c */ +/* The following definitions come from libsmb/clifile.c */ -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from lib/system.c */ +/* The following definitions come from libsmb/clilist.c */ -int sys_usleep(long usecs); -ssize_t sys_read(int fd, void *buf, size_t count); -ssize_t sys_write(int fd, const void *buf, size_t count); -ssize_t sys_send(int s, const void *msg, size_t len, int flags); -ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); -ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -/* The following definitions come from lib/talloc.c */ +/* The following definitions come from libsmb/climessage.c */ -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -/* The following definitions come from lib/time.c */ +/* The following definitions come from libsmb/clioplock.c */ -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -/* The following definitions come from lib/ufc.c */ +/* The following definitions come from libsmb/cliprint.c */ -char *ufc_crypt(const char *key,const char *salt); +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -/* The following definitions come from lib/username.c */ +/* The following definitions come from libsmb/clirap.c */ -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -/* The following definitions come from lib/util.c */ +/* The following definitions come from libsmb/clireadwrite.c */ -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + +/* The following definitions come from libsmb/clistr.c */ -/* The following definitions come from lib/util_file.c */ +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +/* The following definitions come from libsmb/clitrans.c */ -/* The following definitions come from lib/util_getent.c */ +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +/* The following definitions come from libsmb/credentials.c */ -/* The following definitions come from lib/util_seaccess.c */ +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +/* The following definitions come from libsmb/errormap.c */ -/* The following definitions come from lib/util_sec.c */ +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +/* The following definitions come from libsmb/namequery.c */ -/* The following definitions come from lib/util_sid.c */ +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +/* The following definitions come from libsmb/nmblib.c */ -/* The following definitions come from lib/util_sock.c */ +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +/* The following definitions come from libsmb/nterr.c */ -/* The following definitions come from lib/util_str.c */ +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); + +/* The following definitions come from libsmb/smbdes.c */ + +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/smbencrypt.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/smberr.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/* The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /* The following definitions come from locking/brlock.c */ @@ -1513,6 +1514,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1543,9 +1547,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2428,14 +2429,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ +/* The following definitions come from printing/print_generic.c */ + + +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/* The following definitions come from printing/print_generic.c */ - - /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2461,11 +2467,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2524,42 +2525,6 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4265,6 +4230,42 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4732,24 +4733,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4815,6 +4798,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/lib/system.c b/source/lib/system.c index 251823b1bce..de8bc975b05 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -148,6 +148,21 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f return ret; } +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl(int fd, int cmd, void *arg) +{ + int ret; + + do { + errno = 0; + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util.c b/source/lib/util.c index d24f6749a04..e718721b67b 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -495,13 +495,13 @@ int set_blocking(int fd, BOOL set) #endif #endif - if((val = fcntl(fd, F_GETFL, 0)) == -1) + if((val = sys_fcntl(fd, F_GETFL, 0)) == -1) return -1; if(set) /* Turn blocking on - ie. clear nonblock flag */ val &= ~FLAG_TO_SET; else val |= FLAG_TO_SET; - return fcntl( fd, F_SETFL, val); + return sys_fcntl( fd, F_SETFL, val); #undef FLAG_TO_SET } @@ -563,7 +563,7 @@ ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn) SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n) { - return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, read, write); + return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, sys_read, sys_write); } /******************************************************************* @@ -1307,10 +1307,7 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - do { - errno = 0; - ret = fcntl(fd,op,&lock); - } while (ret == -1 && errno == EINTR); + ret = sys_fcntl(fd,op,&lock); if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); diff --git a/source/lib/util_file.c b/source/lib/util_file.c index 96b18ba5875..7ea9825ad1d 100644 --- a/source/lib/util_file.c +++ b/source/lib/util_file.c @@ -50,6 +50,7 @@ BOOL do_file_lock(int fd, int waitsecs, int type) lock.l_pid = 0; alarm(waitsecs); + /* Note we must *NOT* use sys_fcntl here ! JRA */ ret = fcntl(fd, SMB_F_SETLKW, &lock); alarm(0); CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c index 29168186310..32d3eba598d 100644 --- a/source/smbd/notify_kernel.c +++ b/source/smbd/notify_kernel.c @@ -131,7 +131,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - if (fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { + if (sys_fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { DEBUG(3,("Failed to set signal handler for change notify\n")); return NULL; } @@ -148,7 +148,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB; if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE; - if (fcntl(fd, F_NOTIFY, kernel_flags) == -1) { + if (sys_fcntl(fd, F_NOTIFY, kernel_flags) == -1) { DEBUG(3,("Failed to set async flag for change notify\n")); return NULL; } @@ -169,7 +169,7 @@ static BOOL kernel_notify_available(void) int fd, ret; fd = open("/tmp", O_RDONLY); if (fd == -1) return False; /* uggh! */ - ret = fcntl(fd, F_NOTIFY, 0); + ret = sys_fcntl(fd, F_NOTIFY, 0); close(fd); return ret == 0; } diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c index 10520461753..520528ee139 100644 --- a/source/smbd/oplock_irix.c +++ b/source/smbd/oplock_irix.c @@ -57,7 +57,7 @@ static BOOL irix_oplocks_available(void) unlink(tmpname); - if(fcntl(fd, F_OPLKREG, pfd[1]) == -1) { + if(sys_fcntl(fd, F_OPLKREG, pfd[1]) == -1) { DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \ Disabling kernel oplock support.\n" )); close(pfd[0]); @@ -66,7 +66,7 @@ Disabling kernel oplock support.\n" )); return False; } - if(fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { + if(sys_fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \ Disabling kernel oplock support.\n", strerror(errno) )); close(pfd[0]); @@ -112,7 +112,7 @@ Error was %s.\n", strerror(errno) )); * request outstanding. */ - if(fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { + if(sys_fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { DEBUG(0,("receive_local_message: fcntl of kernel notification failed. \ Error was %s.\n", strerror(errno) )); if(errno == EAGAIN) { @@ -165,7 +165,7 @@ dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->i static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type) { - if (fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { + if (sys_fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { if(errno != EAGAIN) { DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \ inode = %.0f, file_id = %ul. Error was %s\n", @@ -196,7 +196,7 @@ static void irix_release_kernel_oplock(files_struct *fsp) * Check and print out the current kernel * oplock state of this file. */ - int state = fcntl(fsp->fd, F_OPLKACK, -1); + int state = sys_fcntl(fsp->fd, F_OPLKACK, -1); dbgtext("release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id, state ); @@ -205,7 +205,7 @@ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, /* * Remove the kernel oplock on this file. */ - if(fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { + if(sys_fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { if( DEBUGLVL( 0 )) { dbgtext("release_kernel_oplock: Error when removing kernel oplock on file " ); dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n", diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index fb9015356b4..4545671de94 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -152,7 +152,7 @@ ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n) START_PROFILE_BYTES(syscall_read, n); - result = read(fd, data, n); + result = sys_read(fd, data, n); END_PROFILE(syscall_read); return result; } @@ -163,7 +163,7 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n) START_PROFILE_BYTES(syscall_write, n); - result = write(fd, data, n); + result = sys_write(fd, data, n); END_PROFILE(syscall_write); return result; } -- cgit From c7ff521bab838c070931f2b0ece4be3371fbcdbf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 03:05:38 +0000 Subject: Added sys_fcntl (not to be used everywhere). Added sys_read/sys_write for transfer_file. Jeremy. --- source/lib/system.c | 15 +++++++++++++++ source/lib/util.c | 11 ++++------- source/lib/util_file.c | 1 + source/smbd/notify_kernel.c | 6 +++--- source/smbd/oplock_irix.c | 12 ++++++------ source/smbd/vfs-wrap.c | 4 ++-- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index 7734328795c..eaaa76743af 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -147,6 +147,21 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f return ret; } +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl(int fd, int cmd, void *arg) +{ + int ret; + + do { + errno = 0; + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + /******************************************************************* A stat() wrapper that will deal with 64 bit filesizes. ********************************************************************/ diff --git a/source/lib/util.c b/source/lib/util.c index c524adaa7af..1ee1a9c06a5 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -552,13 +552,13 @@ int set_blocking(int fd, BOOL set) #endif #endif - if((val = fcntl(fd, F_GETFL, 0)) == -1) + if((val = sys_fcntl(fd, F_GETFL, 0)) == -1) return -1; if(set) /* Turn blocking on - ie. clear nonblock flag */ val &= ~FLAG_TO_SET; else val |= FLAG_TO_SET; - return fcntl( fd, F_SETFL, val); + return sys_fcntl( fd, F_SETFL, val); #undef FLAG_TO_SET } @@ -620,7 +620,7 @@ ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn) SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n) { - return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, read, write); + return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, sys_read, sys_write); } /******************************************************************* @@ -1353,10 +1353,7 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - do { - errno = 0; - ret = fcntl(fd,op,&lock); - } while (ret == -1 && errno == EINTR); + ret = sys_fcntl(fd,op,&lock); if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); diff --git a/source/lib/util_file.c b/source/lib/util_file.c index e80267f84b5..fd3aeb99d9e 100644 --- a/source/lib/util_file.c +++ b/source/lib/util_file.c @@ -51,6 +51,7 @@ BOOL do_file_lock(int fd, int waitsecs, int type) lock.l_pid = 0; alarm(waitsecs); + /* Note we must *NOT* use sys_fcntl here ! JRA */ ret = fcntl(fd, SMB_F_SETLKW, &lock); alarm(0); CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN); diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c index 19ea41e1956..e40b91443eb 100644 --- a/source/smbd/notify_kernel.c +++ b/source/smbd/notify_kernel.c @@ -130,7 +130,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - if (fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { + if (sys_fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { DEBUG(3,("Failed to set signal handler for change notify\n")); return NULL; } @@ -147,7 +147,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB; if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE; - if (fcntl(fd, F_NOTIFY, kernel_flags) == -1) { + if (sys_fcntl(fd, F_NOTIFY, kernel_flags) == -1) { DEBUG(3,("Failed to set async flag for change notify\n")); return NULL; } @@ -168,7 +168,7 @@ static BOOL kernel_notify_available(void) int fd, ret; fd = open("/tmp", O_RDONLY); if (fd == -1) return False; /* uggh! */ - ret = fcntl(fd, F_NOTIFY, 0); + ret = sys_fcntl(fd, F_NOTIFY, 0); close(fd); return ret == 0; } diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c index 14f6de27c44..65ede6ef732 100644 --- a/source/smbd/oplock_irix.c +++ b/source/smbd/oplock_irix.c @@ -56,7 +56,7 @@ static BOOL irix_oplocks_available(void) unlink(tmpname); - if(fcntl(fd, F_OPLKREG, pfd[1]) == -1) { + if(sys_fcntl(fd, F_OPLKREG, pfd[1]) == -1) { DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \ Disabling kernel oplock support.\n" )); close(pfd[0]); @@ -65,7 +65,7 @@ Disabling kernel oplock support.\n" )); return False; } - if(fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { + if(sys_fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \ Disabling kernel oplock support.\n", strerror(errno) )); close(pfd[0]); @@ -111,7 +111,7 @@ Error was %s.\n", strerror(errno) )); * request outstanding. */ - if(fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { + if(sys_fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { DEBUG(0,("receive_local_message: fcntl of kernel notification failed. \ Error was %s.\n", strerror(errno) )); if(errno == EAGAIN) { @@ -164,7 +164,7 @@ dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->i static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type) { - if (fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { + if (sys_fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { if(errno != EAGAIN) { DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \ inode = %.0f, file_id = %ul. Error was %s\n", @@ -195,7 +195,7 @@ static void irix_release_kernel_oplock(files_struct *fsp) * Check and print out the current kernel * oplock state of this file. */ - int state = fcntl(fsp->fd, F_OPLKACK, -1); + int state = sys_fcntl(fsp->fd, F_OPLKACK, -1); dbgtext("release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id, state ); @@ -204,7 +204,7 @@ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, /* * Remove the kernel oplock on this file. */ - if(fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { + if(sys_fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { if( DEBUGLVL( 0 )) { dbgtext("release_kernel_oplock: Error when removing kernel oplock on file " ); dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n", diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index fadc435a2fa..394086dc075 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -147,7 +147,7 @@ ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n) ssize_t result; START_PROFILE_BYTES(syscall_read, n); - result = read(fd, data, n); + result = sys_read(fd, data, n); END_PROFILE(syscall_read); return result; } @@ -157,7 +157,7 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n) ssize_t result; START_PROFILE_BYTES(syscall_write, n); - result = write(fd, data, n); + result = sys_write(fd, data, n); END_PROFILE(syscall_write); return result; } -- cgit From d953a5e7d2454673aba0c62515bd5225aa1bdf1f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 19 Apr 2002 05:17:31 +0000 Subject: updating information a links in README --- swat/README | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/swat/README b/swat/README index 588ecef769a..657a5937d71 100644 --- a/swat/README +++ b/swat/README @@ -4,9 +4,9 @@ Administration Tool on your machine. Installation ------------ -After you compile SWAT you need to run "make install" to install the -swat binary and the various help files and images. A default install -would put these in: +After compiling Samba (via a "make"), running "make install" will +install the swat binary and the various help files and images for +you. A default install would put these in: /usr/local/samba/bin/swat /usr/local/samba/swat/images/* @@ -67,11 +67,16 @@ SWAT will rewrite your smb.conf file. It will rearrange the entries and delete all comments, include= and copy= options. If you have a carefully crafted smb.conf then back it up or don't use SWAT! +There is also a short HOWTO for configuring secure, remote access +to SWAT (swat does not natively support HTTPS) at your favorite +samba.org mirror (see http://samba.org for a list) at +/samba/docs/swat_ssl.html + Development ----------- -Please join the samba-technical mailing list if you want to discuss -the development of SWAT. Note that this list is for technical developer -discussions and is not a general help list. +Please join the samba-technical@samba.org (http://lists.samba.org/listinfo/samba-technical) +mailing list if you want to discuss the development of SWAT. Note that this list +is for technical developer discussions and is not a general help list. -- cgit From 1ece80a6b70ab26eb1a8484134b536efa007f6f9 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Fri, 19 Apr 2002 13:39:52 +0000 Subject: DEBUG cleanup. J.F. --- source/groupdb/mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c index 99ccffb4644..060937fee2a 100644 --- a/source/groupdb/mapping.c +++ b/source/groupdb/mapping.c @@ -637,7 +637,7 @@ BOOL get_group_map_from_ntname(char *name, GROUP_MAP *map, BOOL with_priv) PRIVILEGE_SET *set; if(!init_group_mapping()) { - DEBUG(0,("failed to initialize group mapping")); + DEBUG(0,("get_group_map_from_ntname:failed to initialize group mapping")); return(False); } -- cgit From d0ce52230b456108ad91361b51e30d9a9cb25dff Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Fri, 19 Apr 2002 13:41:43 +0000 Subject: add NetUserEnum and NetGroupEnum lanmap API calls, untested. I don't have anymore a SNAP/DELL NAS to test. from Kevin Stefanik. J.F. --- source/smbd/lanman.c | 246 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 152 insertions(+), 94 deletions(-) diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index 666bbb5f618..f8875c5c0f2 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -1754,82 +1754,104 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid, char *param,c char **rdata,char **rparam, int *rdata_len,int *rparam_len) { + int i; + int errflags=0; + int resume_context, cli_buf_size; char *str1 = param+2; char *str2 = skip_string(str1,1); char *p = skip_string(str2,1); - int uLevel = SVAL(p,0); - char *p2; - int count=0; - if (!prefix_ok(str1,"WrLeh")) return False; - - /* check it's a supported variant */ - switch( uLevel ) - { - case 0: - p2 = "B21"; - break; - default: - return False; + GROUP_MAP *group_list; + int num_entries; + + if (strcmp(str1,"WrLeh") != 0) + return False; + + /* parameters + * W-> resume context (number of users to skip) + * r -> return parameter pointer to receive buffer + * L -> length of receive buffer + * e -> return parameter number of entries + * h -> return parameter total number of users + */ + if (strcmp("B21",str2) != 0) + return False; + + /* get list of domain groups SID_DOMAIN_GRP=2 */ + if(!enum_group_mapping(2 , &group_list, &num_entries, False, False)) { + DEBUG(3,("api_RNetGroupEnum:failed to get group list")); + return False; } - if (strcmp(p2,str2) != 0) return False; + resume_context = SVAL(p,0); + cli_buf_size=SVAL(p+2,0); + DEBUG(10,("api_RNetGroupEnum:resume context: %d, client buffer size: %d\n", resume_context, cli_buf_size)); - *rdata_len = mdrcnt + 1024; + *rdata_len = cli_buf_size; *rdata = REALLOC(*rdata,*rdata_len); - SSVAL(*rparam,0,NERR_Success); - SSVAL(*rparam,2,0); /* converter word */ - p = *rdata; - /* XXXX we need a real SAM database some day */ - pstrcpy(p,"Users"); p += 21; count++; - pstrcpy(p,"Domain Users"); p += 21; count++; - pstrcpy(p,"Guests"); p += 21; count++; - pstrcpy(p,"Domain Guests"); p += 21; count++; + for(i=resume_context; i resume context (number of users to skip) + * r -> return parameter pointer to receive buffer + * L -> length of receive buffer + * e -> return parameter number of entries + * h -> return parameter total number of users + */ + + resume_context = SVAL(p,0); + cli_buf_size=SVAL(p+2,0); + DEBUG(10,("api_RNetUserEnum:resume context: %d, client buffer size: %d\n", resume_context, cli_buf_size)); + *rparam_len = 8; *rparam = REALLOC(*rparam,*rparam_len); - SSVAL(*rparam,4,count); /* is this right?? */ - SSVAL(*rparam,6,count); /* is this right?? */ + /* check it's a supported varient */ + if (strcmp("B21",str2) != 0) + return False; - DEBUG(3,("api_RNetUserEnum gave %d entries\n", count)); + *rdata_len = cli_buf_size; + *rdata = REALLOC(*rdata,*rdata_len); - return(True); + p = *rdata; + + /* to get user list enumerations for NetUserEnum in B21 format */ + pdb_init_sam(&pwd); + + /* Open the passgrp file - not for update. */ + become_root(); + if(!pdb_setsampwent(False)) { + DEBUG(0, ("api_RNetUserEnum:unable to open sam database.\n")); + unbecome_root(); + return False; + } + errflags=NERR_Success; + + while ( pdb_getsampwent(pwd) ) { + const char *name=pdb_get_username(pwd); + if( *(name+strlen(name)-1)!='$' ) { + count_total++; + if(count_total>=resume_context) { + if( ((PTR_DIFF(p,*rdata)+21)<=*rdata_len)&&(strlen(name)<=21) ) { + pstrcpy(p,name); + DEBUG(10,("api_RNetUserEnum:adding entry %d username %s\n",count_sent,p)); + p += 21; + count_sent++; + } else { + /* set overflow error */ + DEBUG(10,("api_RNetUserEnum:overflow on entry %d username %s\n",count_sent,name)); + errflags=234; + break; + } + } + } + } ; + + pdb_endsampwent(); + unbecome_root(); + + pdb_free_sam(&pwd); + + *rdata_len = PTR_DIFF(p,*rdata); + + SSVAL(*rparam,0,errflags); + SSVAL(*rparam,2,0); /* converter word */ + SSVAL(*rparam,4,count_sent); /* is this right?? */ + SSVAL(*rparam,6,count_total); /* is this right?? */ + + return True; } @@ -2769,56 +2877,6 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param return(True); } -/******************************************************************* - get groups that a user is a member of - ******************************************************************/ -static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *param,char *data, - int mdrcnt,int mprcnt, - char **rdata,char **rparam, - int *rdata_len,int *rparam_len) -{ - char *str1 = param+2; - char *str2 = skip_string(str1,1); - char *UserName = skip_string(str2,1); - char *p = skip_string(UserName,1); - int uLevel = SVAL(p,0); - char *p2; - int count=0; - - *rparam_len = 8; - *rparam = REALLOC(*rparam,*rparam_len); - - /* check it's a supported varient */ - if (strcmp(str1,"zWrLeh") != 0) return False; - switch( uLevel ) { - case 0: p2 = "B21"; break; - default: return False; - } - if (strcmp(p2,str2) != 0) return False; - - *rdata_len = mdrcnt + 1024; - *rdata = REALLOC(*rdata,*rdata_len); - - SSVAL(*rparam,0,NERR_Success); - SSVAL(*rparam,2,0); /* converter word */ - - p = *rdata; - - /* XXXX we need a real SAM database some day */ - pstrcpy(p,"Users"); p += 21; count++; - pstrcpy(p,"Domain Users"); p += 21; count++; - pstrcpy(p,"Guests"); p += 21; count++; - pstrcpy(p,"Domain Guests"); p += 21; count++; - - *rdata_len = PTR_DIFF(p,*rdata); - - SSVAL(*rparam,4,count); /* is this right?? */ - SSVAL(*rparam,6,count); /* is this right?? */ - - return(True); -} - - static BOOL api_WWkstaUserLogon(connection_struct *conn,uint16 vuid, char *param,char *data, int mdrcnt,int mprcnt, char **rdata,char **rparam, -- cgit From 9209d8e718e860e6a58937376cbb437b6b7adbbb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:10:56 +0000 Subject: When opening a tdb fails - don't expect to be able to do tdb_errstr ! (Doh!). Jeremy. --- source/printing/printing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/printing/printing.c b/source/printing/printing.c index a28d95fcc8e..d7ac1f49c77 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -55,8 +55,8 @@ BOOL print_backend_init(void) if (tdb && local_pid == sys_getpid()) return True; tdb = tdb_open_log(lock_path("printing.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!tdb) { - DEBUG(0,("print_backend_init: Failed to open printing backend database. Error = [%s]\n", - tdb_errorstr(tdb))); + DEBUG(0,("print_backend_init: Failed to open printing backend database %s\n", + lock_path("printing.tdb") )); return False; } local_pid = sys_getpid(); -- cgit From 4889606127aede106747a48a42c8e09bda2483b5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:11:07 +0000 Subject: When opening a tdb fails - don't expect to be able to do tdb_errstr ! (Doh!). Jeremy. --- source/printing/printing.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/printing/printing.c b/source/printing/printing.c index 95e6be27cbf..374aca16ea9 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -53,11 +53,12 @@ BOOL print_backend_init(void) { char *sversion = "INFO/version"; - if (tdb && local_pid == sys_getpid()) return True; + if (tdb && local_pid == sys_getpid()) + return True; tdb = tdb_open_log(lock_path("printing.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!tdb) { - DEBUG(0,("print_backend_init: Failed to open printing backend database. Error = [%s]\n", - tdb_errorstr(tdb))); + DEBUG(0,("print_backend_init: Failed to open printing backend database %s.\n", + lock_path("printing.tdb") )); return False; } local_pid = sys_getpid(); -- cgit From 00777923e89cc919afe2e522234b1be41727fd2d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:22:01 +0000 Subject: Fixed one more sendto. Jeremy. --- source/lib/util_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 0ef583b50ac..4b5abbb5724 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -737,7 +737,7 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type) len,inet_ntoa(ip),port,type==SOCK_DGRAM?"DGRAM":"STREAM")); /* send it */ - ret = (sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0); + ret = (sys_sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0); if (!ret) DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n", -- cgit From 7adcc930ca56bf879b5e73b74bca19ac2353f1c0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:22:32 +0000 Subject: Fixed one more sendto. Jeremy. --- source/lib/util_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 27336cefa22..5bdfb24be40 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -789,7 +789,7 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type) len,inet_ntoa(ip),port,type==SOCK_DGRAM?"DGRAM":"STREAM")); /* send it */ - ret = (sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0); + ret = (sys_sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0); if (!ret) DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n", -- cgit From 65742067e07195048edcee46dae95a58a4a50950 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:30:27 +0000 Subject: Fix different args to sys_fcntl without going varargs.... Jeremy. --- source/lib/system.c | 17 ++++++++++++++++- source/lib/util.c | 6 +++--- source/smbd/notify_kernel.c | 6 +++--- source/smbd/oplock_irix.c | 12 ++++++------ 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index eaaa76743af..d9a4bbd83bb 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -151,7 +151,22 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f A fcntl wrapper that will deal with EINTR. ********************************************************************/ -int sys_fcntl(int fd, int cmd, void *arg) +int sys_fcntl_ptr(int fd, int cmd, void *arg) +{ + int ret; + + do { + errno = 0; + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl_long(int fd, int cmd, long arg) { int ret; diff --git a/source/lib/util.c b/source/lib/util.c index 1ee1a9c06a5..ea1670ea276 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -552,13 +552,13 @@ int set_blocking(int fd, BOOL set) #endif #endif - if((val = sys_fcntl(fd, F_GETFL, 0)) == -1) + if((val = sys_fcntl_long(fd, F_GETFL, 0)) == -1) return -1; if(set) /* Turn blocking on - ie. clear nonblock flag */ val &= ~FLAG_TO_SET; else val |= FLAG_TO_SET; - return sys_fcntl( fd, F_SETFL, val); + return sys_fcntl_long( fd, F_SETFL, val); #undef FLAG_TO_SET } @@ -1353,7 +1353,7 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - ret = sys_fcntl(fd,op,&lock); + ret = sys_fcntl_ptr(fd,op,&lock); if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c index e40b91443eb..f4eac38a1b4 100644 --- a/source/smbd/notify_kernel.c +++ b/source/smbd/notify_kernel.c @@ -130,7 +130,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - if (sys_fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { + if (sys_fcntl_long(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { DEBUG(3,("Failed to set signal handler for change notify\n")); return NULL; } @@ -147,7 +147,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB; if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE; - if (sys_fcntl(fd, F_NOTIFY, kernel_flags) == -1) { + if (sys_fcntl_long(fd, F_NOTIFY, kernel_flags) == -1) { DEBUG(3,("Failed to set async flag for change notify\n")); return NULL; } @@ -168,7 +168,7 @@ static BOOL kernel_notify_available(void) int fd, ret; fd = open("/tmp", O_RDONLY); if (fd == -1) return False; /* uggh! */ - ret = sys_fcntl(fd, F_NOTIFY, 0); + ret = sys_fcntl_long(fd, F_NOTIFY, 0); close(fd); return ret == 0; } diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c index 65ede6ef732..c712e7d3ec4 100644 --- a/source/smbd/oplock_irix.c +++ b/source/smbd/oplock_irix.c @@ -56,7 +56,7 @@ static BOOL irix_oplocks_available(void) unlink(tmpname); - if(sys_fcntl(fd, F_OPLKREG, pfd[1]) == -1) { + if(sys_fcntl_long(fd, F_OPLKREG, pfd[1]) == -1) { DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \ Disabling kernel oplock support.\n" )); close(pfd[0]); @@ -65,7 +65,7 @@ Disabling kernel oplock support.\n" )); return False; } - if(sys_fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { + if(sys_fcntl_long(fd, F_OPLKACK, OP_REVOKE) < 0 ) { DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \ Disabling kernel oplock support.\n", strerror(errno) )); close(pfd[0]); @@ -111,7 +111,7 @@ Error was %s.\n", strerror(errno) )); * request outstanding. */ - if(sys_fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { + if(sys_fcntl_ptr(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { DEBUG(0,("receive_local_message: fcntl of kernel notification failed. \ Error was %s.\n", strerror(errno) )); if(errno == EAGAIN) { @@ -164,7 +164,7 @@ dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->i static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type) { - if (sys_fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { + if (sys_fcntl_long(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { if(errno != EAGAIN) { DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \ inode = %.0f, file_id = %ul. Error was %s\n", @@ -195,7 +195,7 @@ static void irix_release_kernel_oplock(files_struct *fsp) * Check and print out the current kernel * oplock state of this file. */ - int state = sys_fcntl(fsp->fd, F_OPLKACK, -1); + int state = sys_fcntl_long(fsp->fd, F_OPLKACK, -1); dbgtext("release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id, state ); @@ -204,7 +204,7 @@ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, /* * Remove the kernel oplock on this file. */ - if(sys_fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { + if(sys_fcntl_long(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { if( DEBUGLVL( 0 )) { dbgtext("release_kernel_oplock: Error when removing kernel oplock on file " ); dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n", -- cgit From 27707b72da6ff8a27f8f5f3289e333f576fe4ceb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:30:36 +0000 Subject: Fix different args to sys_fcntl without going varargs.... Jeremy. --- source/include/proto.h | 1989 ++++++++++++++++++++++--------------------- source/lib/system.c | 17 +- source/lib/util.c | 6 +- source/smbd/notify_kernel.c | 6 +- source/smbd/oplock_irix.c | 12 +- 5 files changed, 1023 insertions(+), 1007 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index cc76ae17969..392cdb14d88 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,646 +181,134 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from lib/snprintf.c */ - - -/* The following definitions come from lib/substitute.c */ - -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); - -/* The following definitions come from lib/sysacls.c */ - -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); - -/* The following definitions come from lib/system.c */ - -int sys_usleep(long usecs); -ssize_t sys_read(int fd, void *buf, size_t count); -ssize_t sys_write(int fd, const void *buf, size_t count); -ssize_t sys_send(int s, const void *msg, size_t len, int flags); -ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); -ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); -int sys_fcntl(int fd, int cmd, void *arg); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); - -/* The following definitions come from lib/talloc.c */ - -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); - -/* The following definitions come from lib/time.c */ - -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); - -/* The following definitions come from lib/ufc.c */ - -char *ufc_crypt(const char *key,const char *salt); - -/* The following definitions come from lib/username.c */ - -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); - -/* The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); - -/* The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); - -/* The following definitions come from lib/util_getent.c */ - -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); - -/* The following definitions come from lib/util_seaccess.c */ - -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); - -/* The following definitions come from lib/util_sec.c */ +/* The following definitions come from libsmb/cliconnect.c */ -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -/* The following definitions come from lib/util_sid.c */ +/* The following definitions come from libsmb/cli_dfs.c */ -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); -/* The following definitions come from lib/util_sock.c */ +/* The following definitions come from libsmb/clidgram.c */ -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -/* The following definitions come from lib/util_str.c */ +/* The following definitions come from libsmb/clientgen.c */ -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/clierror.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/clifile.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from libsmb/clilist.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); /* The following definitions come from libsmb/cli_lsarpc.c */ @@ -867,6 +355,13 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); +/* The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + /* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -900,6 +395,12 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); +/* The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -907,6 +408,56 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); +/* The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/* The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/* The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + /* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -995,6 +546,12 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint16 switch_value, TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + /* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -1075,357 +632,801 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/cliconnect.c */ +/* The following definitions come from libsmb/clistr.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from libsmb/clitrans.c */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); + +/* The following definitions come from libsmb/credentials.c */ + +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/* The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/* The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/* The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/* The following definitions come from libsmb/nterr.c */ + +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); + +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); -/* The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from lib/smbrun.c */ -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +int smbrun(char *cmd, int *outfd); -/* The following definitions come from libsmb/clierror.c */ +/* The following definitions come from libsmb/smbdes.c */ -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/* The following definitions come from libsmb/clifile.c */ +/* The following definitions come from libsmb/smbencrypt.c */ -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/* The following definitions come from libsmb/clilist.c */ +/* The following definitions come from libsmb/smberr.c */ -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); -/* The following definitions come from libsmb/climessage.c */ +/* The following definitions come from libsmb/unexpected.c */ -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); -/* The following definitions come from libsmb/clioplock.c */ +/* The following definitions come from lib/snprintf.c */ -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); -/* The following definitions come from libsmb/cliprint.c */ +/* The following definitions come from lib/substitute.c */ -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); -/* The following definitions come from libsmb/clirap.c */ +/* The following definitions come from lib/sysacls.c */ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -/* The following definitions come from libsmb/clireadwrite.c */ +/* The following definitions come from lib/system.c */ -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); +int sys_usleep(long usecs); +ssize_t sys_read(int fd, void *buf, size_t count); +ssize_t sys_write(int fd, const void *buf, size_t count); +ssize_t sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); +int sys_fcntl_ptr(int fd, int cmd, void *arg); +int sys_fcntl_long(int fd, int cmd, long arg); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); -/* The following definitions come from libsmb/clisecdesc.c */ +/* The following definitions come from lib/talloc.c */ -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); -/* The following definitions come from libsmb/clistr.c */ +/* The following definitions come from lib/time.c */ -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); -/* The following definitions come from libsmb/clitrans.c */ +/* The following definitions come from lib/ufc.c */ -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); +char *ufc_crypt(const char *key,const char *salt); -/* The following definitions come from libsmb/credentials.c */ +/* The following definitions come from lib/username.c */ -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); -/* The following definitions come from libsmb/errormap.c */ +/* The following definitions come from lib/util.c */ -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); -/* The following definitions come from libsmb/namequery.c */ +/* The following definitions come from lib/util_file.c */ -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); -/* The following definitions come from libsmb/nmblib.c */ +/* The following definitions come from lib/util_getent.c */ -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); -/* The following definitions come from libsmb/nterr.c */ +/* The following definitions come from lib/util_seaccess.c */ -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); -/* The following definitions come from libsmb/passchange.c */ +/* The following definitions come from lib/util_sec.c */ -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; -/* The following definitions come from libsmb/pwd_cache.c */ +/* The following definitions come from lib/util_sid.c */ -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); -/* The following definitions come from libsmb/smbdes.c */ +/* The following definitions come from lib/util_sock.c */ -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); -/* The following definitions come from libsmb/smbencrypt.c */ +/* The following definitions come from lib/util_str.c */ -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -/* The following definitions come from libsmb/smberr.c */ +/* The following definitions come from lib/util_unistr.c */ -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -/* The following definitions come from libsmb/unexpected.c */ +/* The following definitions come from lib/wins_srv.c */ -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); /* The following definitions come from locking/brlock.c */ @@ -1514,9 +1515,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1547,6 +1545,9 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2429,19 +2430,14 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ -/* The following definitions come from printing/print_generic.c */ - - -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); +/* The following definitions come from printing/print_generic.c */ + + /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2467,6 +2463,11 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2525,6 +2526,42 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4230,42 +4267,6 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4733,6 +4734,24 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4798,24 +4817,6 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/lib/system.c b/source/lib/system.c index de8bc975b05..b0a257b5c2f 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -152,7 +152,22 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f A fcntl wrapper that will deal with EINTR. ********************************************************************/ -int sys_fcntl(int fd, int cmd, void *arg) +int sys_fcntl_ptr(int fd, int cmd, void *arg) +{ + int ret; + + do { + errno = 0; + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl_long(int fd, int cmd, long arg) { int ret; diff --git a/source/lib/util.c b/source/lib/util.c index e718721b67b..921d683f4fb 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -495,13 +495,13 @@ int set_blocking(int fd, BOOL set) #endif #endif - if((val = sys_fcntl(fd, F_GETFL, 0)) == -1) + if((val = sys_fcntl_long(fd, F_GETFL, 0)) == -1) return -1; if(set) /* Turn blocking on - ie. clear nonblock flag */ val &= ~FLAG_TO_SET; else val |= FLAG_TO_SET; - return sys_fcntl( fd, F_SETFL, val); + return sys_fcntl_long( fd, F_SETFL, val); #undef FLAG_TO_SET } @@ -1307,7 +1307,7 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) lock.l_len = count; lock.l_pid = 0; - ret = sys_fcntl(fd,op,&lock); + ret = sys_fcntl_ptr(fd,op,&lock); if (ret == -1 && errno != 0) DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno))); diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c index 32d3eba598d..beaa66b1ba3 100644 --- a/source/smbd/notify_kernel.c +++ b/source/smbd/notify_kernel.c @@ -131,7 +131,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - if (sys_fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { + if (sys_fcntl_long(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) { DEBUG(3,("Failed to set signal handler for change notify\n")); return NULL; } @@ -148,7 +148,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB; if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE; - if (sys_fcntl(fd, F_NOTIFY, kernel_flags) == -1) { + if (sys_fcntl_long(fd, F_NOTIFY, kernel_flags) == -1) { DEBUG(3,("Failed to set async flag for change notify\n")); return NULL; } @@ -169,7 +169,7 @@ static BOOL kernel_notify_available(void) int fd, ret; fd = open("/tmp", O_RDONLY); if (fd == -1) return False; /* uggh! */ - ret = sys_fcntl(fd, F_NOTIFY, 0); + ret = sys_fcntl_long(fd, F_NOTIFY, 0); close(fd); return ret == 0; } diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c index 520528ee139..9ca3ecc2609 100644 --- a/source/smbd/oplock_irix.c +++ b/source/smbd/oplock_irix.c @@ -57,7 +57,7 @@ static BOOL irix_oplocks_available(void) unlink(tmpname); - if(sys_fcntl(fd, F_OPLKREG, pfd[1]) == -1) { + if(sys_fcntl_long(fd, F_OPLKREG, pfd[1]) == -1) { DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \ Disabling kernel oplock support.\n" )); close(pfd[0]); @@ -66,7 +66,7 @@ Disabling kernel oplock support.\n" )); return False; } - if(sys_fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) { + if(sys_fcntl_long(fd, F_OPLKACK, OP_REVOKE) < 0 ) { DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \ Disabling kernel oplock support.\n", strerror(errno) )); close(pfd[0]); @@ -112,7 +112,7 @@ Error was %s.\n", strerror(errno) )); * request outstanding. */ - if(sys_fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { + if(sys_fcntl_ptr(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { DEBUG(0,("receive_local_message: fcntl of kernel notification failed. \ Error was %s.\n", strerror(errno) )); if(errno == EAGAIN) { @@ -165,7 +165,7 @@ dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->i static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type) { - if (sys_fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { + if (sys_fcntl_long(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) { if(errno != EAGAIN) { DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \ inode = %.0f, file_id = %ul. Error was %s\n", @@ -196,7 +196,7 @@ static void irix_release_kernel_oplock(files_struct *fsp) * Check and print out the current kernel * oplock state of this file. */ - int state = sys_fcntl(fsp->fd, F_OPLKACK, -1); + int state = sys_fcntl_long(fsp->fd, F_OPLKACK, -1); dbgtext("release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id, state ); @@ -205,7 +205,7 @@ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, /* * Remove the kernel oplock on this file. */ - if(sys_fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { + if(sys_fcntl_long(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) { if( DEBUGLVL( 0 )) { dbgtext("release_kernel_oplock: Error when removing kernel oplock on file " ); dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n", -- cgit From 3853234c2649c501e9876f940f802be86cb6383d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 17:59:13 +0000 Subject: Added Martin's lpq parse fixes from 2.2. Jeremy. --- source/include/safe_string.h | 3 +++ source/printing/lpq_parse.c | 32 ++++++++++++-------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/source/include/safe_string.h b/source/include/safe_string.h index 1ee97833c5d..118c2302bd0 100644 --- a/source/include/safe_string.h +++ b/source/include/safe_string.h @@ -53,6 +53,9 @@ #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1) +#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0') +#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0') + #define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring)) #define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring)) #define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring)) diff --git a/source/printing/lpq_parse.c b/source/printing/lpq_parse.c index 13b87045cd5..9d8b1cc2aa3 100644 --- a/source/printing/lpq_parse.c +++ b/source/printing/lpq_parse.c @@ -149,21 +149,17 @@ static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first) StrnCpy(buf->fs_file,tok[FILETOK],sizeof(buf->fs_file)-1); if ((FILETOK + 1) != TOTALTOK) { - int bufsize; int i; - bufsize = sizeof(buf->fs_file) - strlen(buf->fs_file) - 1; - for (i = (FILETOK + 1); i < TOTALTOK; i++) { - safe_strcat(buf->fs_file," ",bufsize); - safe_strcat(buf->fs_file,tok[i],bufsize - 1); - bufsize = sizeof(buf->fs_file) - strlen(buf->fs_file) - 1; - if (bufsize <= 0) { - break; - } + /* FIXME: Using fstrcat rather than other means is a bit + * inefficient; this might be a problem for enormous queues with + * many fields. */ + fstrcat(buf->fs_file, " "); + fstrcat(buf->fs_file, tok[i]); } /* Ensure null termination. */ - buf->fs_file[sizeof(buf->fs_file)-1] = '\0'; + fstrterminate(buf->fs_file); } #ifdef PRIOTOK @@ -282,21 +278,17 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first) StrnCpy(buf->fs_file,tokarr[LPRNG_FILETOK],sizeof(buf->fs_file)-1); if ((LPRNG_FILETOK + 1) != LPRNG_TOTALTOK) { - int bufsize; int i; - bufsize = sizeof(buf->fs_file) - strlen(buf->fs_file) - 1; - for (i = (LPRNG_FILETOK + 1); i < LPRNG_TOTALTOK; i++) { - safe_strcat(buf->fs_file," ",bufsize); - safe_strcat(buf->fs_file,tokarr[i],bufsize - 1); - bufsize = sizeof(buf->fs_file) - strlen(buf->fs_file) - 1; - if (bufsize <= 0) { - break; - } + /* FIXME: Using fstrcat rather than other means is a bit + * inefficient; this might be a problem for enormous queues with + * many fields. */ + fstrcat(buf->fs_file, " "); + fstrcat(buf->fs_file, tokarr[i]); } /* Ensure null termination. */ - buf->fs_file[sizeof(buf->fs_file)-1] = '\0'; + fstrterminate(buf->fs_file); } return(True); -- cgit From 142b35d65c683688eefc0693cd2d707663ff7ead Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 21:45:00 +0000 Subject: We cannot set errno=0 in any of the wrapper calls as this breaks UNIX error returns to the client. Jeremy. --- source/lib/system.c | 7 ------- source/tdb/tdb.c | 1 - 2 files changed, 8 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index b0a257b5c2f..8fad98b178c 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -82,7 +82,6 @@ ssize_t sys_read(int fd, void *buf, size_t count) ssize_t ret; do { - errno = 0; ret = read(fd, buf, count); } while (ret == -1 && errno == EINTR); return ret; @@ -97,7 +96,6 @@ ssize_t sys_write(int fd, const void *buf, size_t count) ssize_t ret; do { - errno = 0; ret = write(fd, buf, count); } while (ret == -1 && errno == EINTR); return ret; @@ -112,7 +110,6 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags) ssize_t ret; do { - errno = 0; ret = send(s, msg, len, flags); } while (ret == -1 && errno == EINTR); return ret; @@ -127,7 +124,6 @@ ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct ssize_t ret; do { - errno = 0; ret = sendto(s, msg, len, flags, to, tolen); } while (ret == -1 && errno == EINTR); return ret; @@ -142,7 +138,6 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f ssize_t ret; do { - errno = 0; ret = recvfrom(s, buf, len, flags, from, fromlen); } while (ret == -1 && errno == EINTR); return ret; @@ -157,7 +152,6 @@ int sys_fcntl_ptr(int fd, int cmd, void *arg) int ret; do { - errno = 0; ret = fcntl(fd, cmd, arg); } while (ret == -1 && errno == EINTR); return ret; @@ -172,7 +166,6 @@ int sys_fcntl_long(int fd, int cmd, long arg) int ret; do { - errno = 0; ret = fcntl(fd, cmd, arg); } while (ret == -1 && errno == EINTR); return ret; diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index e3ba1db0d2a..5c0fd436e3a 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -185,7 +185,6 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, fl.l_pid = 0; do { - errno = 0; ret = fcntl(tdb->fd,lck_type,&fl); } while (ret == -1 && errno == EINTR); -- cgit From 1d66e53a64ec2878293e6d74a852b736ddab8f21 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Apr 2002 21:45:02 +0000 Subject: We cannot set errno=0 in any of the wrapper calls as this breaks UNIX error returns to the client. Jeremy. --- source/lib/system.c | 7 ------- source/tdb/tdb.c | 1 - 2 files changed, 8 deletions(-) diff --git a/source/lib/system.c b/source/lib/system.c index d9a4bbd83bb..dfd206027e1 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -81,7 +81,6 @@ ssize_t sys_read(int fd, void *buf, size_t count) ssize_t ret; do { - errno = 0; ret = read(fd, buf, count); } while (ret == -1 && errno == EINTR); return ret; @@ -96,7 +95,6 @@ ssize_t sys_write(int fd, const void *buf, size_t count) ssize_t ret; do { - errno = 0; ret = write(fd, buf, count); } while (ret == -1 && errno == EINTR); return ret; @@ -111,7 +109,6 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags) ssize_t ret; do { - errno = 0; ret = send(s, msg, len, flags); } while (ret == -1 && errno == EINTR); return ret; @@ -126,7 +123,6 @@ ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct ssize_t ret; do { - errno = 0; ret = sendto(s, msg, len, flags, to, tolen); } while (ret == -1 && errno == EINTR); return ret; @@ -141,7 +137,6 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f ssize_t ret; do { - errno = 0; ret = recvfrom(s, buf, len, flags, from, fromlen); } while (ret == -1 && errno == EINTR); return ret; @@ -156,7 +151,6 @@ int sys_fcntl_ptr(int fd, int cmd, void *arg) int ret; do { - errno = 0; ret = fcntl(fd, cmd, arg); } while (ret == -1 && errno == EINTR); return ret; @@ -171,7 +165,6 @@ int sys_fcntl_long(int fd, int cmd, long arg) int ret; do { - errno = 0; ret = fcntl(fd, cmd, arg); } while (ret == -1 && errno == EINTR); return ret; diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index e3ba1db0d2a..5c0fd436e3a 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -185,7 +185,6 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, fl.l_pid = 0; do { - errno = 0; ret = fcntl(tdb->fd,lck_type,&fl); } while (ret == -1 && errno == EINTR); -- cgit From 596bfb580038ebe0f8f6afe4a1903f31f52b07ef Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 20 Apr 2002 03:03:39 +0000 Subject: specversion / device mode fix from APP_HEAD --- source/rpc_parse/parse_spoolss.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 95a2615f634..aac1624b713 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -629,7 +629,6 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo break; /* See the comments on the DEVMODE in the msdn GDI documentation */ - /* (WINVER >= 0x0400) */ case 0x0400: case 0x0401: if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod)) @@ -644,14 +643,10 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo return False; if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2)) return False; - - /* (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) */ - if (devmode->specversion == 0x401) { - if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth)) - return False; - if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight)) - return False; - } + if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth)) + return False; + if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight)) + return False; break; /* log an error if we see something else */ -- cgit From c02a7a71d6ddae711c84094e410d1117efc031f0 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 20 Apr 2002 07:17:36 +0000 Subject: Return exception text if getprinter level not [0..3] --- source/python/py_spoolss_printers.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/python/py_spoolss_printers.c b/source/python/py_spoolss_printers.c index 48321500e7d..623e693124c 100644 --- a/source/python/py_spoolss_printers.c +++ b/source/python/py_spoolss_printers.c @@ -119,12 +119,19 @@ PyObject *spoolss_getprinter(PyObject *self, PyObject *args, PyObject *kw) int level = 1; uint32 needed; static char *kwlist[] = {"level", NULL}; - + /* Parse parameters */ if (!PyArg_ParseTupleAndKeywords(args, kw, "|i", kwlist, &level)) return NULL; + if (level < 0 || level > 3) { + PyErr_SetString(spoolss_error, "Invalid info level"); + return NULL; + } + + ZERO_STRUCT(ctr); + /* Call rpc function */ werror = cli_spoolss_getprinter( -- cgit From b6c2ef4f54e7b42125f8c89ee5a62b0ba6b52f59 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Apr 2002 07:28:46 +0000 Subject: try to cope better with the take ownership operation for foreign SIDs what we do is map to the authenticated user when the sid is unmappable and dos filemodes are enabled --- source/smbd/open.c | 6 +++-- source/smbd/posix_acls.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/source/smbd/open.c b/source/smbd/open.c index 29a854a3974..f8ba1ca8d8b 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -1046,7 +1046,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", Open a file for for write to ensure that we can fchmod it. ****************************************************************************/ -files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf) +files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf) { files_struct *fsp = NULL; BOOL fsp_open; @@ -1058,7 +1058,9 @@ files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_ if(!fsp) return NULL; - fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,0); + /* note! we must use a non-zero desired access or we don't get + a real file descriptor. Oh what a twisted web we weave. */ + fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,FILE_WRITE_DATA); /* * This is not a user visible file open. diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 9c8835214fb..713210f693c 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -439,9 +439,15 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & OWNER_SECURITY_INFORMATION) { sid_copy(&owner_sid, psd->owner_sid); if (!sid_to_uid( &owner_sid, puser, &sid_type)) { +#if ACL_FORCE_UNMAPPABLE + /* this allows take ownership to work reasonably */ + extern struct current_user current_user; + *puser = current_user.uid; +#else DEBUG(3,("unpack_nt_owners: unable to validate owner sid for %s\n", sid_string_static(&owner_sid))); return False; +#endif } } @@ -453,8 +459,14 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & GROUP_SECURITY_INFORMATION) { sid_copy(&grp_sid, psd->grp_sid); if (!sid_to_gid( &grp_sid, pgrp, &sid_type)) { +#if ACL_FORCE_UNMAPPABLE + /* this allows take group ownership to work reasonably */ + extern struct current_user current_user; + *pgrp = current_user.gid; +#else DEBUG(3,("unpack_nt_owners: unable to validate group sid.\n")); return False; +#endif } } @@ -1996,6 +2008,52 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) return sd_size; } +/* + try to chown a file. We will be able to chown it under the following conditions + + 1) if we have root privileges, then it will just work + 2) if we have write permission to the file and dos_filemodes is set + then allow chown to the currently authenticated user. + + */ +static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid) +{ + int ret; + extern struct current_user current_user; + files_struct *fsp; + SMB_STRUCT_STAT st; + + /* try the direct way first */ + ret = vfs_chown(conn, fname, uid, gid); + if (ret == 0) return 0; + + if(!CAN_WRITE(conn) || !lp_dos_filemode(SNUM(conn))) + return -1; + + if (vfs_stat(conn,fname,&st)) { + return -1; + } + + fsp = open_file_fchmod(conn,fname,&st); + if (!fsp) { + return -1; + } + + /* only allow chown to the current user. This is more secure, + and also copes with the case where the SID in a take ownership ACL is + a local SID on the users workstation + */ + uid = current_user.uid; + + become_root(); + ret = vfswrap_fchown(fsp, fsp->fd, uid, gid); + unbecome_root(); + + close_file_fchmod(fsp); + + return ret; +} + /**************************************************************************** Reply to set a security descriptor on an fsp. security_info_sent is the description of the following NT ACL. @@ -2052,7 +2110,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) DEBUG(3,("set_nt_acl: chown %s. uid = %u, gid = %u.\n", fsp->fsp_name, (unsigned int)user, (unsigned int)grp )); - if(vfs_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) { + if(try_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) { DEBUG(3,("set_nt_acl: chown %s, %u, %u failed. Error = %s.\n", fsp->fsp_name, (unsigned int)user, (unsigned int)grp, strerror(errno) )); return False; -- cgit From 4e712f817330eca1bbc3eae126271afec93dfc84 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 21 Apr 2002 20:44:30 +0000 Subject: Merge chown/ghgrp fix from HEAD. Jeremy. --- source/include/proto.h | 2010 +++++++++++++++++++++++----------------------- source/smbd/open.c | 8 +- source/smbd/posix_acls.c | 60 +- 3 files changed, 1069 insertions(+), 1009 deletions(-) diff --git a/source/include/proto.h b/source/include/proto.h index 392cdb14d88..1f9a7601e0b 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -181,134 +181,647 @@ void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); void CatchChildLeaveStatus(void); -/* The following definitions come from libsmb/cliconnect.c */ +/* The following definitions come from lib/smbrun.c */ -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, - char *ntpass, int ntpasslen, - char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -void cli_negprot_send(struct cli_state *cli); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -NTSTATUS cli_full_connection(struct cli_state **output_cli, - const char *my_name, const char *dest_host, - struct in_addr *dest_ip, int port, - char *service, char *service_type, - char *user, char *domain, - char *password, int pass_len) ; -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); +int smbrun(char *cmd, int *outfd); -/* The following definitions come from libsmb/cli_dfs.c */ +/* The following definitions come from lib/snprintf.c */ -struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, - struct ntuser_creds *creds); -NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists); -NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags); -NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename); -NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr); -NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr); -/* The following definitions come from libsmb/clidgram.c */ +/* The following definitions come from lib/substitute.c */ + +void standard_sub_basic(char *str); +void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); +void standard_sub_conn(connection_struct *conn, char *str); +void standard_sub_home(int snum, char *user, char *str); +void standard_sub_snum(int snum, char *str); +void standard_sub_vuser(char *str, user_struct *vuser); +void standard_sub_vsnum(char *str, user_struct *vuser, int snum); + +/* The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/* The following definitions come from lib/system.c */ + +int sys_usleep(long usecs); +ssize_t sys_read(int fd, void *buf, size_t count); +ssize_t sys_write(int fd, const void *buf, size_t count); +ssize_t sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); +int sys_fcntl_ptr(int fd, int cmd, void *arg); +int sys_fcntl_long(int fd, int cmd, long arg); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); + +/* The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); + +/* The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/* The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/* The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/* The following definitions come from lib/util.c */ + +char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +char *Atoic(char *p, int *n, char *c); +char *get_numlist(char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(char *why); +char *readdirname(DIR *p); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/* The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(char *fname, size_t *size); +char **file_lines_load(char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/* The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/* The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/* The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/* The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, DOM_SID *sid); +const char *sid_string_static(DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, - char *buf, int len, - const char *srcname, int src_type, - const char *dstname, int dest_type, - struct in_addr dest_ip, struct in_addr src_ip, - int dest_port, int src_port); -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); -int cli_get_backup_list(const char *myname, const char *send_to_name); -int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); +/* The following definitions come from lib/util_sock.c */ -/* The following definitions come from libsmb/clientgen.c */ +BOOL is_a_socket(int fd); +void set_socket_options(int fd, char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); -int cli_set_port(struct cli_state *cli, int port); -BOOL cli_receive_smb(struct cli_state *cli); -BOOL cli_send_smb(struct cli_state *cli); -void cli_setup_packet(struct cli_state *cli); -void cli_setup_bcc(struct cli_state *cli, void *p); -void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); +/* The following definitions come from lib/util_str.c */ -/* The following definitions come from libsmb/clierror.c */ +void set_first_token(char *ptr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +char **toktocliplist(int *ctok, char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(char *psz1, char *psz2); +void strlower(char *s); +void strupper(char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); -char *cli_errstr(struct cli_state *cli); -NTSTATUS cli_nt_error(struct cli_state *cli); -void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); -int cli_errno_from_dos(uint8 eclass, uint32 num); -int cli_errno_from_nt(NTSTATUS status); -int cli_errno(struct cli_state *cli); -BOOL cli_is_error(struct cli_state *cli); -BOOL cli_is_nt_error(struct cli_state *cli); -BOOL cli_is_dos_error(struct cli_state *cli); +/* The following definitions come from lib/util_unistr.c */ -/* The following definitions come from libsmb/clifile.c */ +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); +char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -uint32 unix_perms_to_wire(mode_t perms); -BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); -BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); -BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, const char *fname); -BOOL cli_mkdir(struct cli_state *cli, const char *dname); -BOOL cli_rmdir(struct cli_state *cli, const char *dname); -int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); -int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, - uint32 FileAttributes, uint32 ShareAccess, - uint32 CreateDisposition, uint32 CreateOptions); -int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); -int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -NTSTATUS cli_locktype(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, unsigned char locktype); -BOOL cli_lock(struct cli_state *cli, int fnum, - uint32 offset, uint32 len, int timeout, enum brl_type lock_type); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -BOOL cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, const char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); -BOOL cli_chkpath(struct cli_state *cli, const char *path); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); +/* The following definitions come from lib/wins_srv.c */ -/* The following definitions come from libsmb/clilist.c */ +BOOL wins_srv_load_list( char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); -int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *, void *), void *state); +/* The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); /* The following definitions come from libsmb/cli_lsarpc.c */ @@ -355,13 +868,6 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, SEC_DESC_BUF **psdb); BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); -/* The following definitions come from libsmb/climessage.c */ - -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); - /* The following definitions come from libsmb/cli_netlogon.c */ struct cli_state *cli_netlogon_initialise(struct cli_state *cli, @@ -395,12 +901,6 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c DATA_BLOB lm_response, DATA_BLOB nt_response, NET_USER_INFO_3 *info3); -/* The following definitions come from libsmb/clioplock.c */ - -BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); -void cli_oplock_handler(struct cli_state *cli, - BOOL (*handler)(struct cli_state *, int, unsigned char)); - /* The following definitions come from libsmb/cli_pipe_util.c */ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, @@ -408,56 +908,6 @@ struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, struct ntuser_creds *creds); void cli_pipe_shutdown(struct cli_state *cli); -/* The following definitions come from libsmb/cliprint.c */ - -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -int cli_printjob_del(struct cli_state *cli, int job); - -/* The following definitions come from libsmb/clirap.c */ - -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), - void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time, - time_t *w_time, SMB_INO_T *ino); -BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); -NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); - -/* The following definitions come from libsmb/clireadwrite.c */ - -ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); - /* The following definitions come from libsmb/cli_reg.c */ struct cli_state *cli_winreg_initialise(struct cli_state *cli, @@ -546,12 +996,6 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *user_pol, uint16 switch_value, TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); -/* The following definitions come from libsmb/clisecdesc.c */ - -SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, - TALLOC_CTX *mem_ctx); -BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); - /* The following definitions come from libsmb/cli_spoolss.c */ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, @@ -632,801 +1076,357 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 switch_value, SRV_INFO_CTR *ctr); -/* The following definitions come from libsmb/clistr.c */ - -int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); -int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); -int clistr_align_out(struct cli_state *cli, const void *p, int flags); -int clistr_align_in(struct cli_state *cli, const void *p, int flags); - -/* The following definitions come from libsmb/clitrans.c */ - -BOOL cli_send_trans(struct cli_state *cli, int trans, - const char *pipe_name, - int fid, int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_trans(struct cli_state *cli,int trans, - char **param, int *param_len, - char **data, int *data_len); -BOOL cli_send_nt_trans(struct cli_state *cli, - int function, - int flags, - uint16 *setup, int lsetup, int msetup, - char *param, int lparam, int mparam, - char *data, int ldata, int mdata); -BOOL cli_receive_nt_trans(struct cli_state *cli, - char **param, int *param_len, - char **data, int *data_len); - -/* The following definitions come from libsmb/credentials.c */ - -char *credstr(const uchar *cred); -void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, - uchar session_key[8]); -void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, - DOM_CHAL *cred); -int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, - UTIME timestamp); -BOOL clnt_deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); -BOOL deal_with_creds(uchar sess_key[8], - DOM_CRED *sto_clnt_cred, - DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); - -/* The following definitions come from libsmb/errormap.c */ - -NTSTATUS dos_to_ntstatus(int eclass, int ecode); -void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); -NTSTATUS werror_to_ntstatus(WERROR error); -WERROR ntstatus_to_werror(NTSTATUS error); - -/* The following definitions come from libsmb/namequery.c */ - -struct node_status *node_status_query(int fd,struct nmb_name *name, - struct in_addr to_ip, int *num_names); -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); -BOOL name_register(int fd, const char *name, int name_type, - struct in_addr name_ip, int opcode, - BOOL bcast, - struct in_addr to_ip, int *count); -struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, - struct in_addr to_ip, int *count); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL name_register_wins(const char *name, int name_type); -BOOL name_resolve_bcast(const char *name, int name_type, - struct in_addr **return_ip_list, int *return_count); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL resolve_srv_name(const char* srv_name, fstring dest_host, - struct in_addr *ip); -BOOL find_master_ip(char *group, struct in_addr *master_ip); -BOOL lookup_dc_name(const char *srcname, const char *domain, - struct in_addr *dc_ip, char *ret_name); -BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); -BOOL get_lmb_list(struct in_addr **ip_list, int *count); - -/* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *parse_packet(char *buf,int length, - enum packet_type packet_type); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -int build_packet(char *buf, struct packet_struct *p); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); -void sort_query_replies(char *data, int n, struct in_addr ip); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); - -/* The following definitions come from libsmb/nterr.c */ - -char *get_nt_error_msg(NTSTATUS nt_code); -char *nt_errstr(NTSTATUS nt_code); -char *get_nt_error_c_code(NTSTATUS nt_code); - -/* The following definitions come from libsmb/passchange.c */ - -BOOL remote_password_change(const char *remote_machine, const char *user_name, - const char *old_passwd, const char *new_passwd, - char *err_str, size_t err_str_len); - -/* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -BOOL pwd_is_nullpwd(const struct pwd_info *pwd); -BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/* The following definitions come from lib/smbrun.c */ - -int smbrun(char *cmd, int *outfd); - -/* The following definitions come from libsmb/smbdes.c */ - -void E_P16(const unsigned char *p14,unsigned char *p16); -void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); -void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); -void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, const unsigned char *key, int val); -void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); - -/* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(const uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); -BOOL encode_pw_buffer(char buffer[516], const char *new_pass, - int new_pw_len, BOOL nt_pass_set); -BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, - int new_pwrd_size, uint32 *new_pw_len, - uchar nt_p16[16], uchar p16[16]); -void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); +/* The following definitions come from libsmb/cliconnect.c */ -/* The following definitions come from libsmb/smberr.c */ +BOOL cli_session_setup(struct cli_state *cli, + char *user, + char *pass, int passlen, + char *ntpass, int ntpasslen, + char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + char *service, char *service_type, + char *user, char *domain, + char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); -char *smb_dos_err_name(uint8 class, uint16 num); -char *get_dos_error_msg(WERROR result); -char *smb_dos_err_class(uint8 class); -char *smb_dos_errstr(char *inbuf); -char *werror_str(WERROR status); -WERROR map_werror_from_unix(int error); +/* The following definitions come from libsmb/clidgram.c */ -/* The following definitions come from libsmb/unexpected.c */ +int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); -void unexpected_packet(struct packet_struct *p); -void clear_unexpected(time_t t); -struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name); +/* The following definitions come from libsmb/clientgen.c */ -/* The following definitions come from lib/snprintf.c */ +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); +/* The following definitions come from libsmb/clierror.c */ -/* The following definitions come from lib/substitute.c */ +char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); -void standard_sub_basic(char *str); -void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str); -void standard_sub_conn(connection_struct *conn, char *str); -void standard_sub_home(int snum, char *user, char *str); -void standard_sub_snum(int snum, char *str); -void standard_sub_vuser(char *str, user_struct *vuser); -void standard_sub_vsnum(char *str, user_struct *vuser, int snum); +/* The following definitions come from libsmb/clifile.c */ -/* The following definitions come from lib/sysacls.c */ +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *path); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); -int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); -int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); -char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); -SMB_ACL_T sys_acl_init(int count); -int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); -int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); -int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); -int sys_acl_valid(SMB_ACL_T acl_d); -int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); -int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T acl_d) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_free_text(char *text); -int sys_acl_free_acl(SMB_ACL_T posix_acl); -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); -int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); -int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); -int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); -void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); -SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); -SMB_ACL_T sys_acl_get_fd(int fd); -int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); -int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); -char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); -int sys_acl_free_text(char *text); -SMB_ACL_T sys_acl_init( int count); -int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); -int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); -int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); -int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); -int sys_acl_valid( SMB_ACL_T theacl ); -int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); -int sys_acl_set_fd( int fd, SMB_ACL_T theacl); -int sys_acl_delete_def_file(const char *name); -int sys_acl_free_acl(SMB_ACL_T the_acl) ; -int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +/* The following definitions come from libsmb/clilist.c */ -/* The following definitions come from lib/system.c */ +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); -int sys_usleep(long usecs); -ssize_t sys_read(int fd, void *buf, size_t count); -ssize_t sys_write(int fd, const void *buf, size_t count); -ssize_t sys_send(int s, const void *msg, size_t len, int flags); -ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); -ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); -int sys_fcntl_ptr(int fd, int cmd, void *arg); -int sys_fcntl_long(int fd, int cmd, long arg); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_ftruncate(int fd, SMB_OFF_T offset); -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_creat(const char *path, mode_t mode); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); -char *sys_realpath(const char *path, char *resolved_path); -int sys_waitpid(pid_t pid,int *status,int options); -char *sys_getwd(char *s); -int sys_symlink(const char *oldpath, const char *newpath); -int sys_readlink(const char *path, char *buf, size_t bufsiz); -int sys_link(const char *oldpath, const char *newpath); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -int sys_chroot(const char *dname); -struct hostent *sys_gethostbyname(const char *name); -void oplock_set_capability(BOOL this_process, BOOL inherit); -long sys_random(void); -void sys_srandom(unsigned int seed); -int groups_max(void); -int sys_getgroups(int setlen, gid_t *gidset); -int sys_setgroups(int setlen, gid_t *gidset); -void sys_setpwent(void); -struct passwd *sys_getpwent(void); -void sys_endpwent(void); -struct passwd *sys_getpwnam(const char *name); -struct passwd *sys_getpwuid(uid_t uid); -int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); -int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); -int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); -FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); -DIR *wsys_opendir(const smb_ucs2_t *wfname); -smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); -int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); -int wsys_chroot(const smb_ucs2_t *wfname); -pid_t sys_fork(void); -pid_t sys_getpid(void); -int sys_popen(const char *command); -int sys_pclose(int fd); -void *sys_dlopen(const char *name, int flags); -void *sys_dlsym(void *handle, char *symbol); -int sys_dlclose (void *handle); -const char *sys_dlerror(void); -void sys_adminlog(int priority, const char *format_str, ...); +/* The following definitions come from libsmb/climessage.c */ -/* The following definitions come from lib/talloc.c */ +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); -TALLOC_CTX *talloc_init(void); -void *talloc(TALLOC_CTX *t, size_t size); -void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); -void talloc_destroy_pool(TALLOC_CTX *t); -void talloc_destroy(TALLOC_CTX *t); -size_t talloc_pool_size(TALLOC_CTX *t); -const char * talloc_pool_name(TALLOC_CTX const *t); -void *talloc_zero(TALLOC_CTX *t, size_t size); -void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); -char *talloc_strdup(TALLOC_CTX *t, const char *p); -char *talloc_describe_all(TALLOC_CTX *rt); -void talloc_get_allocation(TALLOC_CTX *t, - size_t *total_bytes, - int *n_chunks); +/* The following definitions come from libsmb/clioplock.c */ -/* The following definitions come from lib/time.c */ +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); -time_t get_time_t_min(void); -time_t get_time_t_max(void); -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -void get_process_uptime(struct timeval *ret_time); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t nt_time_to_unix_abs(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void unix_to_nt_time_abs(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(BOOL hires); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); -void init_nt_time(NTTIME *nt); +/* The following definitions come from libsmb/cliprint.c */ -/* The following definitions come from lib/ufc.c */ +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); -char *ufc_crypt(const char *key,const char *salt); +/* The following definitions come from libsmb/clirap.c */ -/* The following definitions come from lib/username.c */ +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); -BOOL name_is_local(const char *name); -char *get_user_home_dir(char *user); -char *get_user_service_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_group_list(char *user,char *gname); -BOOL user_in_list(char *user,char *list); -struct passwd *smb_getpwnam(char *user, BOOL allow_change); +/* The following definitions come from libsmb/clireadwrite.c */ -/* The following definitions come from lib/util.c */ +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T get_file_size(char *file_name); -char *attrib_string(uint16 mode); -void show_msg(char *buf); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int set_message_bcc(char *buf,int num_bytes); -int set_message_end(void *outbuf,void *end_ptr); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), - ssize_t (*write_fn)(int, const void *, size_t)); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); -void msleep(unsigned int t); -void become_daemon(void); -BOOL yesno(char *p); -void *Realloc(void *p,size_t size); -void safe_free(void *p); -BOOL get_myname(char *my_name); -int interpret_protocol(char *str,int def); -BOOL is_ipaddress(const char *str); -uint32 interpret_addr(const char *str); -struct in_addr *interpret_addr2(const char *str); -BOOL is_zero_ip(struct in_addr ip); -void zero_ip(struct in_addr *ip); -char *automount_lookup(char *user_name); -char *automount_lookup(char *user_name); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -BOOL process_exists(pid_t pid); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(char *name); -gid_t nametogid(char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -const char* get_my_primary_ip (void); -BOOL is_myname_or_ipaddr(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); -int smb_mkstemp(char *template); -void *smb_xmalloc(size_t size); -void *smb_xmemdup(const void *p, size_t size); -char *smb_xstrdup(const char *s); -int smb_xvasprintf(char **ptr, const char *format, va_list ap); -void *memdup(void *p, size_t size); -char *myhostname(void); -char *lock_path(char *name); -char *parent_dirname(const char *path); -BOOL ms_has_wild(char *s); -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive); -BOOL unix_wild_match(char *pattern, char *string); -DATA_BLOB data_blob(const void *p, size_t length); -DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); -void data_blob_free(DATA_BLOB *d); -void data_blob_clear(DATA_BLOB *d); -int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + +/* The following definitions come from libsmb/clistr.c */ -/* The following definitions come from lib/util_file.c */ +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, - int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); -char *file_pload(char *syscmd, size_t *size); -char *fd_load(int fd, size_t *size); -char *file_load(char *fname, size_t *size); -char **file_lines_load(char *fname, int *numlines, BOOL convert); -char **fd_lines_load(int fd, int *numlines, BOOL convert); -char **file_lines_pload(char *syscmd, int *numlines, BOOL convert); -void file_lines_free(char **lines); -void file_lines_slashcont(char **lines); +/* The following definitions come from libsmb/clitrans.c */ -/* The following definitions come from lib/util_getent.c */ +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, int *param_len, + char **data, int *data_len); -struct sys_grent * getgrent_list(void); -void grent_free (struct sys_grent *glist); -struct sys_pwent * getpwent_list(void); -void pwent_free (struct sys_pwent *plist); -struct sys_userlist *get_users_in_group(const char *gname); -void free_userlist(struct sys_userlist *list_head); +/* The following definitions come from libsmb/credentials.c */ -/* The following definitions come from lib/util_seaccess.c */ +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); -void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); -void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); -BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, - uint32 acc_desired, uint32 *acc_granted, - NTSTATUS *status); -SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, - BOOL child_container); +/* The following definitions come from libsmb/errormap.c */ -/* The following definitions come from lib/util_sec.c */ +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); -void sec_init(void); -uid_t sec_initial_uid(void); -gid_t sec_initial_gid(void); -BOOL non_root_mode(void); -void gain_root_privilege(void); -void gain_root_group_privilege(void); -void set_effective_uid(uid_t uid); -void set_effective_gid(gid_t gid); -void save_re_uid(void); -void restore_re_uid(void); -int set_re_uid(void); -void become_user_permanently(uid_t uid, gid_t gid); -BOOL is_setuid_root(void) ; +/* The following definitions come from libsmb/namequery.c */ -/* The following definitions come from lib/util_sid.c */ +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count); +FILE *startlmhosts(char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); -void generate_wellknown_sids(void); -BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); -BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); -BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); -void split_domain_name(const char *fullname, char *domain, char *name); -char *sid_to_string(fstring sidstr_out, DOM_SID *sid); -const char *sid_string_static(DOM_SID *sid); -BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); -BOOL sid_append_rid(DOM_SID *sid, uint32 rid); -BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); -BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); -void sid_copy(DOM_SID *dst, const DOM_SID *src); -DOM_SID *sid_dup(DOM_SID *src); -BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); -BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); -int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); -int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); -BOOL sid_check_is_domain(const DOM_SID *sid); -BOOL sid_check_is_builtin(const DOM_SID *sid); -BOOL sid_check_is_in_our_domain(const DOM_SID *sid); -BOOL sid_check_is_in_builtin(const DOM_SID *sid); -size_t sid_size(DOM_SID *sid); -BOOL non_mappable_sid(DOM_SID *sid); -char *sid_binstring(DOM_SID *sid); +/* The following definitions come from libsmb/nmblib.c */ -/* The following definitions come from lib/util_sock.c */ +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t write_socket_data(int fd,char *buffer,size_t N); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void client_setfd(int fd); -char *client_name(void); -char *client_addr(void); -char *get_socket_name(int fd); -char *get_socket_addr(int fd); -int create_pipe_sock(const char *socket_dir, - const char *socket_name, - mode_t dir_perms); -int sock_exec(const char *prog); +/* The following definitions come from libsmb/nterr.c */ -/* The following definitions come from lib/util_str.c */ +char *get_nt_error_msg(NTSTATUS nt_code); +char *nt_errstr(NTSTATUS nt_code); +char *get_nt_error_c_code(NTSTATUS nt_code); -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -int strwicmp(char *psz1, char *psz2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -BOOL str_is_all(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert, size_t len); -void fstring_sub(char *s,const char *pattern,const char *insert); -void pstring_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -void split_at_last_component(char *path, char *front, char sep, char *back); -char *octal_string(int i); -char *string_truncate(char *s, int length); -char *binary_string(char *buf, int len); +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); + +/* The following definitions come from libsmb/smbdes.c */ + +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); -/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/smbencrypt.c */ -size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); -void unistr_to_dos(char *dest, const char *src, size_t len); -char *skip_unibuf(char *src, size_t len); -char *dos_unistrn2(uint16 *src, int len); -char *dos_unistr2(uint16 *src); -char *dos_unistr2_to_str(UNISTR2 *str); -void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); -void unistr_to_ascii(char *dest, const uint16 *src, int len); -void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen); -char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str); -uint32 buffer2_to_uint32(BUFFER2 *str); -char *dos_buffer2_to_str(BUFFER2 *str); -char *dos_buffer2_to_multistr(BUFFER2 *str); -size_t dos_struni2(char *dst, const char *src, size_t max_len); -char *dos_unistr(char *buf); -int unistrlen(uint16 *s); -int unistrcpy(uint16 *dst, uint16 *src); -void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); -BOOL load_dos_unicode_map(int codepage); -BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); -smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, - size_t dst_len, smb_ucs2_t *cp_to_ucs2); -char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); -smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); -char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); -size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); -smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); -size_t strlen_w(const smb_ucs2_t *src); -smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); -smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); -int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); -smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); -smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); -smb_ucs2_t *strdup_w(const smb_ucs2_t *s); -int isupper_w( smb_ucs2_t val); -int islower_w( smb_ucs2_t val); -int isdigit_w( smb_ucs2_t val); -int isxdigit_w( smb_ucs2_t val); -int isspace_w( smb_ucs2_t val); -smb_ucs2_t toupper_w( smb_ucs2_t val ); -smb_ucs2_t tolower_w( smb_ucs2_t val ); -void set_first_token_w(smb_ucs2_t *ptr); -BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); -smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); -int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); -int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); -BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); -BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); -BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); -void strlower_w(smb_ucs2_t *s); -void strupper_w(smb_ucs2_t *s); -void strnorm_w(smb_ucs2_t *s); -BOOL strisnormal_w(smb_ucs2_t *s); -void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); -smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); -size_t str_charnum_w(const smb_ucs2_t *s); -BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); -BOOL strhasupper_w(const smb_ucs2_t *s); -BOOL strhaslower_w(const smb_ucs2_t *s); -size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); -BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); -smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); -smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); -smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); -size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); -BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); -BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_free_w(smb_ucs2_t **s); -BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); -void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); -void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); -void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); -void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); -smb_ucs2_t *octal_string_w(int i); -smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -smb_ucs2_t doscp2ucs2(int w); -int ucs2doscp(smb_ucs2_t w); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); -/* The following definitions come from lib/wins_srv.c */ +/* The following definitions come from libsmb/smberr.c */ -BOOL wins_srv_load_list( char *src ); -struct in_addr wins_srv_ip( void ); -void wins_srv_died( struct in_addr boothill_ip ); -unsigned long wins_srv_count( void ); +char *smb_dos_err_name(uint8 class, uint16 num); +char *get_dos_error_msg(WERROR result); +char *smb_dos_err_class(uint8 class); +char *smb_dos_errstr(char *inbuf); +char *werror_str(WERROR status); +WERROR map_werror_from_unix(int error); + +/* The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + char *mailslot_name); /* The following definitions come from locking/brlock.c */ @@ -1515,6 +1515,9 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, struct name_record **n); void kill_async_dns_child(void); +/* The following definitions come from nmbd/nmbd.c */ + + /* The following definitions come from nmbd/nmbd_become_dmb.c */ void add_domain_names(time_t t); @@ -1545,9 +1548,6 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, void collect_all_workgroup_names_from_wins_server(time_t t); void sync_all_dmbs(time_t t); -/* The following definitions come from nmbd/nmbd.c */ - - /* The following definitions come from nmbd/nmbd_elections.c */ void check_master_browser_exists(time_t t); @@ -2430,14 +2430,19 @@ void pcap_printer_fn(void (*fn)(char *, char *)); /* The following definitions come from printing/print_cups.c */ +/* The following definitions come from printing/print_generic.c */ + + +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + /* The following definitions come from printing/printfsp.c */ files_struct *print_fsp_open(connection_struct *conn, char *fname); void print_fsp_end(files_struct *fsp, BOOL normal_close); -/* The following definitions come from printing/print_generic.c */ - - /* The following definitions come from printing/printing.c */ BOOL print_backend_init(void); @@ -2463,11 +2468,6 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); -/* The following definitions come from printing/print_svid.c */ - -void sysv_printer_fn(void (*fn)(char *, char *)); -int sysv_printername_ok(char *name); - /* The following definitions come from profile/profile.c */ void profile_message(int msg_type, pid_t src, void *buf, size_t len); @@ -2526,42 +2526,6 @@ WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, BOOL change_trust_account_password( char *domain, char *remote_machine_list); -/* The following definitions come from rpcclient/cmd_dfs.c */ - - -/* The following definitions come from rpcclient/cmd_lsarpc.c */ - - -/* The following definitions come from rpcclient/cmd_netlogon.c */ - - -/* The following definitions come from rpcclient/cmd_reg.c */ - - -/* The following definitions come from rpcclient/cmd_samr.c */ - - -/* The following definitions come from rpcclient/cmd_spoolss.c */ - -BOOL get_short_archi(char *short_archi, char *long_archi); -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); - -/* The following definitions come from rpcclient/cmd_srvsvc.c */ - - -/* The following definitions come from rpcclient/display_sec.c */ - -char *get_sec_mask_str(uint32 type); -void display_sec_access(SEC_ACCESS *info); -void display_sec_ace(SEC_ACE *ace); -void display_sec_acl(SEC_ACL *sec_acl); -void display_sec_desc(SEC_DESC *sec); - -/* The following definitions come from rpcclient/rpcclient.c */ - -void fetch_machine_sid(struct cli_state *cli); -int main(int argc, char *argv[]); - /* The following definitions come from rpc_parse/parse_dfs.c */ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); @@ -4267,6 +4231,42 @@ BOOL api_wkssvc_rpc(pipes_struct *p); NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + /* The following definitions come from smbd/blocking.c */ BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num); @@ -4485,7 +4485,7 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ uint32 desired_access, int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); -files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf); +files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf); int close_file_fchmod(files_struct *fsp); files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf, uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action); @@ -4734,24 +4734,6 @@ void sys_utmp_yield(const char *username, const char *hostname, void sys_utmp_claim(const char *username, const char *hostname, const char *id_str, int id_num); -/* The following definitions come from smbd/vfs.c */ - -BOOL smbd_vfs_init(connection_struct *conn); -BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); -int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); -char *vfs_getwd(connection_struct *conn, char *unix_path); -BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); -ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); -ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); -int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); -int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); -SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); -char *vfs_readdirname(connection_struct *conn, void *p); -int vfs_ChDir(connection_struct *conn, const char *path); -char *vfs_GetWd(connection_struct *conn, char *path); -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); - /* The following definitions come from smbd/vfs-wrap.c */ int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); @@ -4817,6 +4799,24 @@ int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + /* The following definitions come from smbwrapper/realcalls.c */ int real_utime(const char *name, struct utimbuf *buf); diff --git a/source/smbd/open.c b/source/smbd/open.c index 5c8783d18b6..d4fbab63212 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -89,7 +89,7 @@ static void check_for_pipe(char *fname) ****************************************************************************/ static BOOL open_file(files_struct *fsp,connection_struct *conn, - char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode, uint32 desired_access) + const char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode, uint32 desired_access) { extern struct current_user current_user; pstring fname; @@ -1054,7 +1054,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", Open a file for for write to ensure that we can fchmod it. ****************************************************************************/ -files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf) +files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf) { files_struct *fsp = NULL; BOOL fsp_open; @@ -1066,7 +1066,9 @@ files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_ if(!fsp) return NULL; - fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,0); + /* note! we must use a non-zero desired access or we don't get + a real file descriptor. Oh what a twisted web we weave. */ + fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,FILE_WRITE_DATA); /* * This is not a user visible file open. diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 3a2bbff099d..6a0aa982b42 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -440,9 +440,15 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & OWNER_SECURITY_INFORMATION) { sid_copy(&owner_sid, psd->owner_sid); if (!sid_to_uid( &owner_sid, puser, &sid_type)) { +#if ACL_FORCE_UNMAPPABLE + /* this allows take ownership to work reasonably */ + extern struct current_user current_user; + *puser = current_user.uid; +#else DEBUG(3,("unpack_nt_owners: unable to validate owner sid for %s.\n", sid_string_static(&owner_sid))); return False; +#endif } } @@ -454,8 +460,14 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & GROUP_SECURITY_INFORMATION) { sid_copy(&grp_sid, psd->grp_sid); if (!sid_to_gid( &grp_sid, pgrp, &sid_type)) { +#if ACL_FORCE_UNMAPPABLE + /* this allows take group ownership to work reasonably */ + extern struct current_user current_user; + *pgrp = current_user.gid; +#else DEBUG(3,("unpack_nt_owners: unable to validate group sid.\n")); return False; +#endif } } @@ -1997,6 +2009,52 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) return sd_size; } +/* + try to chown a file. We will be able to chown it under the following conditions + + 1) if we have root privileges, then it will just work + 2) if we have write permission to the file and dos_filemodes is set + then allow chown to the currently authenticated user. + + */ +static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid) +{ + int ret; + extern struct current_user current_user; + files_struct *fsp; + SMB_STRUCT_STAT st; + + /* try the direct way first */ + ret = vfs_chown(conn, fname, uid, gid); + if (ret == 0) return 0; + + if(!CAN_WRITE(conn) || !lp_dos_filemode(SNUM(conn))) + return -1; + + if (vfs_stat(conn,fname,&st)) { + return -1; + } + + fsp = open_file_fchmod(conn,fname,&st); + if (!fsp) { + return -1; + } + + /* only allow chown to the current user. This is more secure, + and also copes with the case where the SID in a take ownership ACL is + a local SID on the users workstation + */ + uid = current_user.uid; + + become_root(); + ret = vfswrap_fchown(fsp, fsp->fd, uid, gid); + unbecome_root(); + + close_file_fchmod(fsp); + + return ret; +} + /**************************************************************************** Reply to set a security descriptor on an fsp. security_info_sent is the description of the following NT ACL. @@ -2053,7 +2111,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) DEBUG(3,("set_nt_acl: chown %s. uid = %u, gid = %u.\n", fsp->fsp_name, (unsigned int)user, (unsigned int)grp )); - if(vfs_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) { + if(try_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) { DEBUG(3,("set_nt_acl: chown %s, %u, %u failed. Error = %s.\n", fsp->fsp_name, (unsigned int)user, (unsigned int)grp, strerror(errno) )); return False; -- cgit From 3156c020e5b6f12a448d58669977ad4449789460 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Mon, 22 Apr 2002 03:08:33 +0000 Subject: My seven-year-old daughter calls me 'Captain Pedantic'. I don't know which is freakier... the name or the fact that a seven-year-old knows what it means. Small change to correct the value we place in the DGM_LENGTH field of NBT Datagram messages. We have been counting the full datagram, but it's fairly clear in the RFCs that we should only count the source name, destination name, and payload. We've been overcharging by 14 bytes (the size of the NBT DGM header). This fix brings us in line with what Windows does, and what the RFCs say should be done. I'm a little surprised that this didn't cause any bugs or error messages. I guess no one actually checks this field. --- source/libsmb/nmblib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index c78946fa09c..9a37b4252a4 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -766,6 +766,14 @@ static BOOL send_udp(int fd,char *buf,int len,struct in_addr ip,int port) XXXX This currently doesn't handle packets too big for one datagram. It should split them and use the packet_offset, more and first flags to handle the fragmentation. Yuck. + + [...but it isn't clear that we would ever need to send a + a fragmented NBT Datagram. The IP layer does its own + fragmentation to ensure that messages can fit into the path + MTU. It *is* important to be able to receive and rebuild + fragmented NBT datagrams, just in case someone out there + really has implemented this 'feature'. crh -)------ ] + ******************************************************************/ static int build_dgram(char *buf,struct packet_struct *p) { @@ -795,8 +803,11 @@ static int build_dgram(char *buf,struct packet_struct *p) memcpy(ubuf+offset,dgram->data,dgram->datasize); offset += dgram->datasize; - /* automatically set the dgm_length */ - dgram->header.dgm_length = offset; + /* automatically set the dgm_length + * NOTE: RFC1002 says the dgm_length does *not* + * include the fourteen-byte header. crh + */ + dgram->header.dgm_length = (offset - 14); RSSVAL(ubuf,10,dgram->header.dgm_length); return(offset); -- cgit From 8d6941ac733637c0865d6b87a718dbb0fda2431f Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Mon, 22 Apr 2002 03:11:01 +0000 Subject: Yes, I think this should be fixed in 2.2.4 as well. Minor bug, minor fix. Small change to correct the value we place in the DGM_LENGTH field of NBT Datagram messages. We have been counting the full datagram, but it's fairly clear in the RFCs that we should only count the source name, destination name, and payload. We've been overcharging by 14 bytes (the size of the NBT DGM header). This fix brings us in line with what Windows does, and what the RFCs say should be done. I'm a little surprised that this didn't cause any bugs or error messages. I guess no one actually checks this field. --- source/libsmb/nmblib.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index 28347576842..54f34cc233a 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -767,6 +767,14 @@ static BOOL send_udp(int fd,char *buf,int len,struct in_addr ip,int port) XXXX This currently doesn't handle packets too big for one datagram. It should split them and use the packet_offset, more and first flags to handle the fragmentation. Yuck. + + [...but it isn't clear that we would ever need to send a + a fragmented NBT Datagram. The IP layer does its own + fragmentation to ensure that messages can fit into the path + MTU. It *is* important to be able to receive and rebuild + fragmented NBT datagrams, just in case someone out there + really has implemented this 'feature'. crh -)------ ] + ******************************************************************/ static int build_dgram(char *buf,struct packet_struct *p) { @@ -777,8 +785,10 @@ static int build_dgram(char *buf,struct packet_struct *p) /* put in the header */ ubuf[0] = dgram->header.msg_type; ubuf[1] = (((int)dgram->header.flags.node_type)<<2); - if (dgram->header.flags.more) ubuf[1] |= 1; - if (dgram->header.flags.first) ubuf[1] |= 2; + if (dgram->header.flags.more) + ubuf[1] |= 1; + if (dgram->header.flags.first) + ubuf[1] |= 2; RSSVAL(ubuf,2,dgram->header.dgm_id); putip(ubuf+4,(char *)&dgram->header.source_ip); RSSVAL(ubuf,8,dgram->header.source_port); @@ -788,7 +798,7 @@ static int build_dgram(char *buf,struct packet_struct *p) if (dgram->header.msg_type == 0x10 || dgram->header.msg_type == 0x11 || - dgram->header.msg_type == 0x12) { + dgram->header.msg_type == 0x12) { offset += put_nmb_name((char *)ubuf,offset,&dgram->source_name); offset += put_nmb_name((char *)ubuf,offset,&dgram->dest_name); } @@ -796,8 +806,11 @@ static int build_dgram(char *buf,struct packet_struct *p) memcpy(ubuf+offset,dgram->data,dgram->datasize); offset += dgram->datasize; - /* automatically set the dgm_length */ - dgram->header.dgm_length = offset; + /* automatically set the dgm_length + * NOTE: RFC1002 says the dgm_length does *not* + * include the fourteen-byte header. crh + */ + dgram->header.dgm_length = (offset - 14); RSSVAL(ubuf,10,dgram->header.dgm_length); return(offset); -- cgit From 8e57e0835446af848548a35d9d431357d7b8b420 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 16:33:15 +0000 Subject: * removed unnecessary prs_align() from relative unicode strings. * removed spoolss_smb_io_unistr() since it is no longer needed * few formatting fixes --- source/rpc_parse/parse_misc.c | 2 -- source/rpc_parse/parse_spoolss.c | 60 ++++++++++++++-------------------------- 2 files changed, 20 insertions(+), 42 deletions(-) diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c index 34f20accf51..466653af52c 100644 --- a/source/rpc_parse/parse_misc.c +++ b/source/rpc_parse/parse_misc.c @@ -554,8 +554,6 @@ BOOL smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth) prs_debug(ps, depth, desc, "smb_io_unistr"); depth++; - if(!prs_align(ps)) - return False; if(!prs_unistr("unistr", ps, depth, uni)) return False; diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index aac1624b713..f4b2287ba7e 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -426,9 +426,7 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, } } #if 0 /* JERRY */ - /* Win2k does not seem to put this parse align here */ - if(!prs_align(ps)) return False; #endif @@ -1723,12 +1721,19 @@ static uint32 size_of_relative_string(UNISTR *string) uint32 size=0; size=str_len_uni(string); /* the string length */ - size=size+1; /* add the leading zero */ + size=size+1; /* add the trailing zero */ size=size*2; /* convert in char */ - /* Ensure size is 4 byte multiple (prs_align is being called...). */ - size += ((4 - (size & 3)) & 3); size=size+4; /* add the size of the ptr */ +#if 0 /* JERRY */ + /* + * Do not include alignment as Win2k does not align relative + * strings within a buffer --jerry + */ + /* Ensure size is 4 byte multiple (prs_align is being called...). */ + /* size += ((4 - (size & 3)) & 3); */ +#endif + return size; } @@ -1756,32 +1761,6 @@ static uint32 size_of_systemtime(SYSTEMTIME *systime) return (sizeof(SYSTEMTIME) +4); } -/******************************************************************* - * write a UNICODE string. - * used by all the RPC structs passing a buffer - ********************************************************************/ - -static BOOL spoolss_smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth) -{ - if (uni == NULL) - return False; - - prs_debug(ps, depth, desc, "spoolss_smb_io_unistr"); - depth++; - - /* there should be no align here as it can mess up - parsing a NEW_BUFFER->prs */ -#if 0 /* JERRY */ - if (!prs_align(ps)) - return False; -#endif - - if (!prs_unistr("unistr", ps, depth, uni)) - return False; - - return True; -} - /******************************************************************* * write a UNICODE string and its relative pointer. * used by all the RPC structs passing a buffer @@ -1813,8 +1792,14 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str buffer->string_at_end -= (size_of_relative_string(string) - 4); if(!prs_set_offset(ps, buffer->string_at_end)) return False; +#if 0 /* JERRY */ + /* + * Win2k does not align strings in a buffer + * Tested against WinNT 4.0 SP 6a & 2k SP2 --jerry + */ if (!prs_align(ps)) return False; +#endif buffer->string_at_end = prs_offset(ps); /* write the string */ @@ -1841,7 +1826,7 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str return False; /* read the string */ - if (!spoolss_smb_io_unistr(desc, string, ps, depth)) + if (!smb_io_unistr(desc, string, ps, depth)) return False; if(!prs_set_offset(ps, old_offset)) @@ -1898,7 +1883,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 } /* write the string */ - if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) { + if (!smb_io_unistr(desc, &chaine, ps, depth)) { SAFE_FREE(chaine.buffer); return False; } @@ -1937,7 +1922,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 return False; do { - if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) + if (!smb_io_unistr(desc, &chaine, ps, depth)) return False; l_chaine=str_len_uni(&chaine); @@ -5028,12 +5013,7 @@ BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, case 3 : make_spoolss_driver_info_3(mem_ctx, &q_u->info.info_3, info->info3); break; - - /* info level 6 is supported by WinME and Win2k */ - case 6: - /* WRITEME!! will add later --jerry */ - break; - + default: DEBUG(0,("make_spoolss_q_addprinterdriver: Unknown info level [%d]\n", level)); break; -- cgit From f1bebbb690778162cb0db96dc0dd5352340a210e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 16:57:28 +0000 Subject: Apparently we have to return "C:\WINNT\System32\spool\PRTPROCS\W32X86" for the PrintProcessorDirectory. Really bogus I know, but if we return a UNC path, the driver install can fail. --- source/rpc_server/srv_spoolss_nt.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 08256211075..12c87376e29 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2944,7 +2944,7 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) printer->global_counter = global_counter; printer->total_pages = 0; -#if 0 /* JERRY */ +#if 1 /* JERRY */ printer->major_version = 0x0004; /* NT 4 */ printer->build_version = 0x0565; /* build 1381 */ #else @@ -7820,13 +7820,7 @@ static WERROR getprintprocessordirectory_level_1(UNISTR2 *name, if((info=(PRINTPROCESSOR_DIRECTORY_1 *)malloc(sizeof(PRINTPROCESSOR_DIRECTORY_1))) == NULL) return WERR_NOMEM; - /* Not sure what to return here - are UNC names valid here?. - Windows returns the string: C:\WINNT\System32\spool\PRTPROCS\W32X86 - which is pretty bogus for a RPC. */ - - slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi); - - DEBUG(4,("print processor directory: [%s]\n", path)); + pstrcpy(path, "C:\\WINNT\\System32\\spool\\PRTPROCS\\W32X86"); fill_printprocessordirectory_1(info, path); -- cgit From 0794d0616c4a60f170ca9214a5f5461a5ea14ec8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 16:57:53 +0000 Subject: enable SPOOLSS_GETPRINTPROCESSORDIRECTORY --- source/rpc_server/srv_spoolss.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index 1bab95ad34f..226345b22d1 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -1452,11 +1452,7 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex }, {"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey }, {"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex }, -#if 0 - /* Disabled because it doesn't fix the bug I am looking at but it would be - a shame to throw away the code. -tpot */ {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory}, -#endif { NULL, 0, NULL } }; -- cgit From 832081b35cb1ade66aba9e4e3992d9b5e6c32821 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Mon, 22 Apr 2002 17:13:59 +0000 Subject: Fixing an intermittent issue seen with DFS and Explorer: Sometimes DFS trees appear with duplicate intermediate folders without this fix. Apparently clients don't use the PathConsumed count to figure out how much of the requested path is covered on the DFS server. We get around this by terminating the requested path at PathConsumed. --- source/msdfs/msdfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index e1c54e437e9..7427230f5ee 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: msdfs.c,v 1.10.4.24 2002/04/11 18:27:27 kalele Exp $ */ #include "includes.h" @@ -603,7 +602,8 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) /* Trim pathname sent by client so it begins with only one backslash. Two backslashes confuse some dfs clients */ - while (strlen(pathnamep) > 1 && pathnamep[1] == '\\') + while (strlen(pathnamep) > 1 && pathnamep[0] == '\\' + && pathnamep[1] == '\\') pathnamep++; safe_strcpy(buf, pathnamep, sizeof(buf)); @@ -620,6 +620,8 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) dbgtext(" %s",junction.referral_list[i].alternate_path); dbgtext(".\n"); } + + /* pathnamep[consumedcnt] = '\0'; */ } /* create the referral depeding on version */ -- cgit From ebf0f72ea7bfb0db137219c25e725bdfb4cc6b40 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 18:06:24 +0000 Subject: reenabled the CHECK_PATH_ON_TCONX code path since removing the chdir() breaks move_driver_to_download_area() currently. This is only a temporary measure, until I code up a proper solution which incorporates Tridge's observations. --- source/smbd/service.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/smbd/service.c b/source/smbd/service.c index 2868c949fff..22aecdb4929 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -21,6 +21,8 @@ #include "includes.h" +#define CHECK_PATH_ON_TCONX 1 + extern struct timeval smb_last_time; extern int case_default; extern BOOL case_preserve; @@ -595,6 +597,12 @@ connection_struct *make_connection(char *service,char *user,char *password, int } } + /* + * FIXME!!!! Reenabled this code since it current;y breaks + * move_driver_to_download_area() by keeping the root path + * of the connection at /tmp. I'll work on a real fix, but this + * will keep people happy for a temporary meaure. --jerry + */ #if CHECK_PATH_ON_TCONX /* win2000 does not check the permissions on the directory during the tree connect, instead relying on permission -- cgit From 5e381abbbfaa15f3ebd89cba3cd9bb6de8e4ff4e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 18:47:36 +0000 Subject: merge from SAMBA_2_2 --- source/rpc_parse/parse_spoolss.c | 61 ++++++++++++-------------------------- source/rpc_server/srv_spoolss.c | 4 --- source/rpc_server/srv_spoolss_nt.c | 8 +---- 3 files changed, 20 insertions(+), 53 deletions(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index b74ee3c5c58..e9f0ca858a9 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -628,7 +628,6 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo break; /* See the comments on the DEVMODE in the msdn GDI documentation */ - /* (WINVER >= 0x0400) */ case 0x0400: case 0x0401: if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod)) @@ -643,14 +642,10 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo return False; if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2)) return False; - - /* (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) */ - if (devmode->specversion == 0x401) { if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth)) return False; if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight)) return False; - } break; /* log an error if we see something else */ @@ -1726,12 +1721,19 @@ static uint32 size_of_relative_string(UNISTR *string) uint32 size=0; size=str_len_uni(string); /* the string length */ - size=size+1; /* add the leading zero */ + size=size+1; /* add the trailing zero */ size=size*2; /* convert in char */ - /* Ensure size is 4 byte multiple (prs_align is being called...). */ - size += ((4 - (size & 3)) & 3); size=size+4; /* add the size of the ptr */ +#if 0 /* JERRY */ + /* + * Do not include alignment as Win2k does not align relative + * strings within a buffer --jerry + */ + /* Ensure size is 4 byte multiple (prs_align is being called...). */ + /* size += ((4 - (size & 3)) & 3); */ +#endif + return size; } @@ -1759,32 +1761,6 @@ static uint32 size_of_systemtime(SYSTEMTIME *systime) return (sizeof(SYSTEMTIME) +4); } -/******************************************************************* - * write a UNICODE string. - * used by all the RPC structs passing a buffer - ********************************************************************/ - -static BOOL spoolss_smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth) -{ - if (uni == NULL) - return False; - - prs_debug(ps, depth, desc, "spoolss_smb_io_unistr"); - depth++; - - /* there should be no align here as it can mess up - parsing a NEW_BUFFER->prs */ -#if 0 /* JERRY */ - if (!prs_align(ps)) - return False; -#endif - - if (!prs_unistr("unistr", ps, depth, uni)) - return False; - - return True; -} - /******************************************************************* * write a UNICODE string and its relative pointer. * used by all the RPC structs passing a buffer @@ -1816,8 +1792,14 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str buffer->string_at_end -= (size_of_relative_string(string) - 4); if(!prs_set_offset(ps, buffer->string_at_end)) return False; +#if 0 /* JERRY */ + /* + * Win2k does not align strings in a buffer + * Tested against WinNT 4.0 SP 6a & 2k SP2 --jerry + */ if (!prs_align(ps)) return False; +#endif buffer->string_at_end = prs_offset(ps); /* write the string */ @@ -1844,7 +1826,7 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str return False; /* read the string */ - if (!spoolss_smb_io_unistr(desc, string, ps, depth)) + if (!smb_io_unistr(desc, string, ps, depth)) return False; if(!prs_set_offset(ps, old_offset)) @@ -1901,7 +1883,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 } /* write the string */ - if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) { + if (!smb_io_unistr(desc, &chaine, ps, depth)) { SAFE_FREE(chaine.buffer); return False; } @@ -1940,7 +1922,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 return False; do { - if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) + if (!smb_io_unistr(desc, &chaine, ps, depth)) return False; l_chaine=str_len_uni(&chaine); @@ -5032,11 +5014,6 @@ BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, make_spoolss_driver_info_3(mem_ctx, &q_u->info.info_3, info->info3); break; - /* info level 6 is supported by WinME and Win2k */ - case 6: - /* WRITEME!! will add later --jerry */ - break; - default: DEBUG(0,("make_spoolss_q_addprinterdriver: Unknown info level [%d]\n", level)); break; diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index e6c152c6689..c7dc5d27ffb 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -1451,11 +1451,7 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex }, {"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey }, {"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex }, -#if 0 - /* Disabled because it doesn't fix the bug I am looking at but it would be - a shame to throw away the code. -tpot */ {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory}, -#endif { NULL, 0, NULL } }; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 5fa45b0b446..d6ce0655484 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -7807,13 +7807,7 @@ static WERROR getprintprocessordirectory_level_1(UNISTR2 *name, if((info=(PRINTPROCESSOR_DIRECTORY_1 *)malloc(sizeof(PRINTPROCESSOR_DIRECTORY_1))) == NULL) return WERR_NOMEM; - /* Not sure what to return here - are UNC names valid here?. - Windows returns the string: C:\WINNT\System32\spool\PRTPROCS\W32X86 - which is pretty bogus for a RPC. */ - - slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi); - - DEBUG(4,("print processor directory: [%s]\n", path)); + pstrcpy(path, "C:\\WINNT\\System32\\spool\\PRTPROCS\\W32X86"); fill_printprocessordirectory_1(info, path); -- cgit From e13a93bd221802edc7fe6eed866ec38ee19dde97 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Apr 2002 19:01:06 +0000 Subject: backout minor type in srv_spoolss_nt.c and merge a few changes from HEAD to keep things in sync. --- source/rpc_parse/parse_spoolss.c | 3 +-- source/rpc_server/srv_spoolss_nt.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index f4b2287ba7e..9189018f5cf 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -1,6 +1,5 @@ /* - * Unix SMB/Netbios implementation. - * Version 1.9. + * Unix SMB/CIFS implementation. * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 12c87376e29..7324aa6f2f5 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -571,7 +571,7 @@ static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags) --jerry **************************************************************************/ -static WERROR srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX *mem_ctx, +static WERROR srv_spoolss_routerreplyprinter (struct cli_state *reply_cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, PRINTER_MESSAGE_INFO *info, NT_PRINTER_INFO_LEVEL *printer) { @@ -581,7 +581,7 @@ static WERROR srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX if (info->flags & PRINTER_MESSAGE_DRIVER) condition = PRINTER_CHANGE_SET_PRINTER_DRIVER; - result = cli_spoolss_routerreplyprinter(pcli, mem_ctx, pol, condition, + result = cli_spoolss_routerreplyprinter(reply_cli, mem_ctx, pol, condition, printer->info_2->changeid); return result; @@ -593,7 +593,7 @@ static WERROR srv_spoolss_routerreplyprinter (struct cli_state *pcli, TALLOC_CTX **********************************************************************/ static WERROR srv_spoolss_send_event_to_client(Printer_entry* Printer, - struct cli_state *pcli, PRINTER_MESSAGE_INFO *msg, + struct cli_state *send_cli, PRINTER_MESSAGE_INFO *msg, NT_PRINTER_INFO_LEVEL *info) { WERROR result; @@ -602,12 +602,13 @@ static WERROR srv_spoolss_send_event_to_client(Printer_entry* Printer, /* This is a single call that can send information about multiple changes */ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) msg->flags |= PRINTER_MESSAGE_ATTRIBUTES; - result = cli_spoolss_reply_rrpcn(pcli, pcli->mem_ctx, &Printer->notify.client_hnd, + + result = cli_spoolss_reply_rrpcn(send_cli, send_cli->mem_ctx, &Printer->notify.client_hnd, msg, info); } else { /* This requires that the server send an individual event notification for each change */ - result = srv_spoolss_routerreplyprinter(pcli, pcli->mem_ctx, &Printer->notify.client_hnd, + result = srv_spoolss_routerreplyprinter(send_cli, send_cli->mem_ctx, &Printer->notify.client_hnd, msg, info); } @@ -631,7 +632,7 @@ static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg) return; } - for (find_printer = printers_list; find_printer; find_printer = find_printer->next) { + for(find_printer = printers_list; find_printer; find_printer = find_printer->next) { /* * If the entry has a connected client we send the message. There should @@ -919,7 +920,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { DEBUG(0,(" _spoolss_open_printer_ex: logic error. \ -Can't find printer handle we created for priunter %s\n", name )); +Can't find printer handle we created for printer %s\n", name )); close_printer_handle(p,handle); return WERR_INVALID_PRINTER_NAME; } @@ -1004,7 +1005,9 @@ Can't find printer handle we created for priunter %s\n", name )); /* We fall through to return WERR_OK */ - } else { + } + else + { /* NT doesn't let us connect to a printer if the connecting user doesn't have print permission. */ @@ -1622,7 +1625,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */ dos_to_unix(unix_printer); - if (!spoolss_connect_to_client(&cli, unix_printer)) + if(!spoolss_connect_to_client(&cli, unix_printer)) return False; message_register(MSG_PRINTER_NOTIFY, srv_spoolss_receive_message); @@ -2944,7 +2947,7 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum) printer->global_counter = global_counter; printer->total_pages = 0; -#if 1 /* JERRY */ +#if 0 /* JERRY */ printer->major_version = 0x0004; /* NT 4 */ printer->build_version = 0x0565; /* build 1381 */ #else -- cgit From bad0ec86a493c291623f7b597684161216eea289 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Apr 2002 21:27:57 +0000 Subject: With an NT4.x DC we must have a mutex over the entire login process. Jeremy. --- source/smbd/password.c | 55 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index df54e94aea5..b861bfbea5d 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -1186,6 +1186,32 @@ use this machine as the password server.\n")); return(True); } +static char *mutex_server_name; + +static BOOL grab_server_mutex(const char *name) +{ + mutex_server_name = strdup(name); + if (!mutex_server_name) { + DEBUG(0,("grab_server_mutex: malloc failed for %s\n", name)); + return False; + } + if (!message_named_mutex(name, 20)) { + DEBUG(10,("grab_server_mutex: failed for %s\n", name)); + SAFE_FREE(mutex_server_name); + return False; + } + + return True; +} + +static void release_server_mutex(void) +{ + if (mutex_server_name) { + message_named_mutex_release(mutex_server_name); + SAFE_FREE(mutex_server_name); + } +} + /*********************************************************************** Connect to a remote machine for domain security authentication given a name or IP address. @@ -1242,23 +1268,21 @@ static BOOL connect_to_domain_password_server(struct cli_state **ppcli, two connections where one hasn't completed a negprot yet it will send a TCP reset to the first connection (tridge) */ - if (!message_named_mutex(server, 20)) { - DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); + if (!grab_server_mutex(server)) return False; - } if (!cli_connect(pcli, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) { DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \ session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); - message_named_mutex_release(server); + release_server_mutex(); return False; } @@ -1268,7 +1292,7 @@ session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } @@ -1276,7 +1300,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n", remote_machine)); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } @@ -1288,7 +1312,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } @@ -1296,7 +1320,7 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n", remote_machine)); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } @@ -1304,12 +1328,10 @@ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \ Error was : %s.\n", remote_machine, cli_errstr(pcli) )); cli_shutdown(pcli); - message_named_mutex_release(server); + release_server_mutex(); return False; } - message_named_mutex_release(server); - /* * We now have an anonymous connection to IPC$ on the domain password server. */ @@ -1329,6 +1351,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); cli_nt_session_close(pcli); cli_ulogoff(pcli); cli_shutdown(pcli); + release_server_mutex(); return False; } @@ -1338,11 +1361,13 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli))); cli_nt_session_close(pcli); cli_ulogoff(pcli); cli_shutdown(pcli); + release_server_mutex(); return(False); } *ppcli = pcli; + /* We exit here with the mutex *locked*. JRA */ return True; } @@ -1560,6 +1585,7 @@ BOOL domain_client_validate( char *user, char *domain, DEBUG(0,("domain_client_validate: Domain password server not available.\n")); if (pcli) cli_shutdown(pcli); + release_server_mutex(); return False; } @@ -1580,6 +1606,7 @@ BOOL domain_client_validate( char *user, char *domain, cli_nt_session_close(pcli); cli_ulogoff(pcli); cli_shutdown(pcli); + release_server_mutex(); if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL)) *user_exists = False; @@ -1604,6 +1631,7 @@ BOOL domain_client_validate( char *user, char *domain, if ((ptok = (NT_USER_TOKEN *)malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) { DEBUG(0, ("domain_client_validate: Out of memory allocating NT_USER_TOKEN\n")); + release_server_mutex(); return False; } @@ -1611,6 +1639,7 @@ BOOL domain_client_validate( char *user, char *domain, if ((ptok->user_sids = (DOM_SID *)malloc( sizeof(DOM_SID) * ptok->num_sids )) == NULL) { DEBUG(0, ("domain_client_validate: Out of memory allocating group SIDS\n")); SAFE_FREE(ptok); + release_server_mutex(); return False; } @@ -1634,6 +1663,7 @@ BOOL domain_client_validate( char *user, char *domain, cli_nt_session_close(pcli); cli_ulogoff(pcli); cli_shutdown(pcli); + release_server_mutex(); return False; } #endif /* 0 */ @@ -1645,5 +1675,6 @@ BOOL domain_client_validate( char *user, char *domain, cli_nt_session_close(pcli); cli_ulogoff(pcli); cli_shutdown(pcli); + release_server_mutex(); return True; } -- cgit From d162b6285d549370a24a926ab1c46cef7e7f630a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Apr 2002 22:44:44 +0000 Subject: Ensure auth requests from the same machine are completely serialized. NT4.x DC's require this. Jeremy. --- source/auth/auth_domain.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/source/auth/auth_domain.c b/source/auth/auth_domain.c index a77bbeade34..32949a575ef 100644 --- a/source/auth/auth_domain.c +++ b/source/auth/auth_domain.c @@ -26,6 +26,32 @@ BOOL global_machine_password_needs_changing = False; extern pstring global_myname; extern userdom_struct current_user_info; +static char *mutex_server_name; + +static BOOL grab_server_mutex(const char *name) +{ + mutex_server_name = strdup(name); + if (!mutex_server_name) { + DEBUG(0,("grab_server_mutex: malloc failed for %s\n", name)); + return False; + } + if (!message_named_mutex(name, 20)) { + DEBUG(10,("grab_server_mutex: failed for %s\n", name)); + SAFE_FREE(mutex_server_name); + return False; + } + + return True; +} + +static void release_server_mutex(void) +{ + if (mutex_server_name) { + message_named_mutex_release(mutex_server_name); + SAFE_FREE(mutex_server_name); + } +} + /** * Connect to a remote server for domain security authenticaion. * @@ -87,18 +113,21 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, /* we use a mutex to prevent two connections at once - when a NT PDC gets two connections where one hasn't completed a negprot yet it will send a TCP reset to the first connection (tridge) */ - if (!message_named_mutex(server, 20)) { - DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); + + /* + * With NT4.x DC's *all* authentication must be serialized to avoid + * ACCESS_DENIED errors if 2 auths are done from the same machine. JRA. + */ + + if (!grab_server_mutex(server)) return NT_STATUS_UNSUCCESSFUL; - } /* Attempt connection */ result = cli_full_connection(cli, global_myname, server, &dest_ip, 0, "IPC$", "IPC", "", "", "", 0); - message_named_mutex_release(server); - if (!NT_STATUS_IS_OK(result)) { + release_server_mutex(); return result; } @@ -121,12 +150,14 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli))); cli_nt_session_close(*cli); cli_ulogoff(*cli); cli_shutdown(*cli); + release_server_mutex(); return NT_STATUS_UNSUCCESSFUL; } snprintf((*cli)->mach_acct, sizeof((*cli)->mach_acct) - 1, "%s$", setup_creds_as); if (!(*cli)->mach_acct) { + release_server_mutex(); return NT_STATUS_NO_MEMORY; } @@ -138,9 +169,12 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli))); cli_nt_session_close(*cli); cli_ulogoff(*cli); cli_shutdown(*cli); + release_server_mutex(); return result; } + /* We exit here with the mutex *locked*. JRA */ + return NT_STATUS_OK; } @@ -406,6 +440,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, cli_nt_session_close(cli); cli_ulogoff(cli); cli_shutdown(cli); + release_server_mutex(); return nt_status; } -- cgit From 443f4e928f4ca184f3e1625d9708f9069aa0e52a Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Tue, 23 Apr 2002 00:54:46 +0000 Subject: Really fix the Dfs Explorer problem. The previous checkin had the fix commented out! --- source/msdfs/msdfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 7427230f5ee..97f3a7b2092 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -613,6 +613,8 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) if (!self_referral) { + pathnamep[consumedcnt] = '\0'; + if( DEBUGLVL( 3 ) ) { int i=0; dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathnamep); @@ -620,8 +622,6 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) dbgtext(" %s",junction.referral_list[i].alternate_path); dbgtext(".\n"); } - - /* pathnamep[consumedcnt] = '\0'; */ } /* create the referral depeding on version */ -- cgit From 3a93c5daeca3edd4f319199c8a6068d25cb6750e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 02:16:48 +0000 Subject: Fix for a bug Jerry found with printing where a smbd connection may be idled even with an open pipe. Jeremy. --- source/rpc_server/srv_pipe_hnd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 44dd5fac656..4b20ee5558b 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -240,6 +240,9 @@ smb_np_struct *open_rpc_pipe_p(char *pipe_name, for (p_it = Pipes; p_it; p_it = p_it->next) DEBUG(5,("open pipes: name %s pnum=%x\n", p_it->name, p_it->pnum)); + /* Ensure the connection isn't idled whilst this pipe is open. */ + conn->num_files_open++; + return chain_p; } @@ -1055,7 +1058,9 @@ BOOL close_rpc_pipe_hnd(smb_np_struct *p) ZERO_STRUCTP(p); SAFE_FREE(p); - + + conn->num_files_open--; + return True; } -- cgit From ab95cb23be1251b98f6f64deef7c8d3564613f6a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 02:16:59 +0000 Subject: Fix for a bug Jerry found with printing where a smbd connection may be idled even with an open pipe. Jeremy. --- source/rpc_server/srv_pipe_hnd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index f3c6fcd9b52..c314f07dda5 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -267,6 +267,9 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, if (is_spoolss_pipe) current_spoolss_pipes_open++; + /* Ensure the connection isn't idled whilst this pipe is open. */ + conn->num_files_open++; + return chain_p; } @@ -957,7 +960,9 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn) ZERO_STRUCTP(p); SAFE_FREE(p); - + + conn->num_files_open--; + return True; } -- cgit From 70c6f5fc6d3ec3121b29d1e46e7fd3933fbcce6b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 23 Apr 2002 04:43:44 +0000 Subject: Spelling fixes from vance --- source/passdb/pdb_ldap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index c4f95dcdee6..797cc28ee60 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -237,7 +237,7 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l return False; } - DEBUG(2, ("ldap_connect_system: succesful connection to the LDAP server\n")); + DEBUG(2, ("ldap_connect_system: successful connection to the LDAP server\n")); return True; } @@ -521,7 +521,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, pw = getpwnam_alloc(username); if (pw == NULL) { - DEBUG (2,("init_sam_from_ldap: User [%s] does not ave a uid!\n", username)); + DEBUG (2,("init_sam_from_ldap: User [%s] does not have a uid!\n", username)); return False; } uid = pw->pw_uid; @@ -740,7 +740,7 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, } else if (ldap_state->permit_non_unix_accounts) { rid = ldapsam_get_next_available_nua_rid(ldap_state); if (rid == 0) { - DEBUG(0, ("NO user RID specified on account %s, and findining next available NUA RID failed, cannot store!\n", pdb_get_username(sampass))); + DEBUG(0, ("NO user RID specified on account %s, and finding next available NUA RID failed, cannot store!\n", pdb_get_username(sampass))); return False; } } else { @@ -1097,7 +1097,7 @@ static BOOL ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (ldap_count_entries(ldap_struct, result) < 1) { DEBUG(4, - ("We don't find this user [%s] count=%d\n", sname, + ("We didn't find the user [%s] count=%d\n", sname, ldap_count_entries(ldap_struct, result))); ldap_unbind(ldap_struct); return False; @@ -1151,7 +1151,7 @@ static BOOL ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (ldap_count_entries(ldap_struct, result) < 1) { DEBUG(0, - ("We don't find this rid [%i] count=%d\n", rid, + ("We didn't find the rid [%i] count=%d\n", rid, ldap_count_entries(ldap_struct, result))); ldap_unbind(ldap_struct); return False; @@ -1205,7 +1205,7 @@ static BOOL ldapsam_delete_sam_account(struct pdb_methods *my_methods, const SAM if (!ldapsam_connect_system(ldap_state, ldap_struct)) { ldap_unbind (ldap_struct); - DEBUG(0, ("Failed to delete user %s from LDAP.\n", sname)); + DEBUG(0, ("failed to delete user %s from the LDAP database.\n", sname)); return False; } -- cgit From 7c02db7c4f0d04b7c45a9c580f3e85f52fa505d5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 18:34:52 +0000 Subject: Fix my stupid compile bug in num_files_open. Jeremy. --- source/rpc_server/srv_pipe_hnd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 4b20ee5558b..a4a9e85ae46 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -240,9 +240,6 @@ smb_np_struct *open_rpc_pipe_p(char *pipe_name, for (p_it = Pipes; p_it; p_it = p_it->next) DEBUG(5,("open pipes: name %s pnum=%x\n", p_it->name, p_it->pnum)); - /* Ensure the connection isn't idled whilst this pipe is open. */ - conn->num_files_open++; - return chain_p; } @@ -301,6 +298,10 @@ static void *make_internal_rpc_pipe_p(char *pipe_name, DLIST_ADD(InternalPipes, p); p->conn = conn; + + /* Ensure the connection isn't idled whilst this pipe is open. */ + p->conn->num_files_open++; + p->vuid = vuid; p->ntlmssp_chal_flags = 0; @@ -1059,8 +1060,6 @@ BOOL close_rpc_pipe_hnd(smb_np_struct *p) SAFE_FREE(p); - conn->num_files_open--; - return True; } @@ -1090,6 +1089,8 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn) DLIST_REMOVE(InternalPipes, p); + p->conn->num_files_open--; + ZERO_STRUCTP(p); SAFE_FREE(p); -- cgit From 033a0340a81bf90bd355899bd3b59a78ac973fc5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 18:48:35 +0000 Subject: When doing a non-io open the stat failing is no cause for a debug zero to be printed, it just means file not found. Jeremy. --- source/smbd/open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/smbd/open.c b/source/smbd/open.c index d4fbab63212..9f57cb294ca 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -172,11 +172,15 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, if (fsp->fd == -1) ret = vfs_stat(conn, fname, psbuf); - else + else { ret = vfs_fstat(fsp,fsp->fd,psbuf); + /* If we have an fd, this stat should succeed. */ + if (ret == -1) + DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); + } + /* For a non-io open, this stat failing means file not found. JRA */ if (ret == -1) { - DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); fd_close(conn, fsp); return False; } -- cgit From 25dea499b82da5e84412bf10781adbd240aa46f0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 18:50:10 +0000 Subject: When doing a non-io open the stat failing is no cause for a debug zero to be printed, it just means file not found. Jeremy. --- source/smbd/open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/smbd/open.c b/source/smbd/open.c index f8ba1ca8d8b..4d49b2cb591 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -169,11 +169,15 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, if (fsp->fd == -1) ret = vfs_stat(conn, fname, psbuf); - else + else { ret = vfs_fstat(fsp,fsp->fd,psbuf); + /* If we have an fd, this stat should succeed. */ + if (ret == -1) + DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); + } + /* For a non-io open, this stat failing means file not found. JRA */ if (ret == -1) { - DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); fd_close(conn, fsp); return False; } -- cgit From b22cf6379d3e634a898832ae87853e96e2ede92f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 24 Apr 2002 00:51:39 +0000 Subject: Spelling fix. --- source/nsswitch/winbindd_pam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index 68fce67da32..5adbf98789f 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -56,7 +56,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) if (!parse_domain_user(state->request.data.auth.user, name_domain, name_user)) { - DEBUG(5,("no domain seperator (%s) in username (%s) - failing auth\n", lp_winbind_separator(), state->request.data.auth.user)); + DEBUG(5,("no domain separator (%s) in username (%s) - failing auth\n", lp_winbind_separator(), state->request.data.auth.user)); result = NT_STATUS_INVALID_PARAMETER; goto done; } -- cgit From 2dde9f711979c04cd02107447395a55307f7a30a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Apr 2002 04:09:37 +0000 Subject: prototypes for some systems that don't have them --- source/include/includes.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/include/includes.h b/source/include/includes.h index 1dfebcea780..becf7e5e393 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -943,6 +943,14 @@ size_t strlcat(char *d, const char *s, size_t bufsize); int ftruncate(int f,long l); #endif +#ifndef HAVE_STRNDUP +char *strndup(const char *s, size_t n); +#endif + +#ifndef HAVE_STRNLEN +size_t strnlen(const char *s, size_t n); +#endif + #ifndef HAVE_STRTOUL unsigned long strtoul(const char *nptr, char **endptr, int base); #endif -- cgit From c0feff97eefdf5a70e5973e247b395dbdf5d2ef2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Apr 2002 04:11:27 +0000 Subject: a new "dual daemon" operating mode for winbindd this mode improves the response time of winbindd by having a background process update the cache while the forground process responds to queries from cache. You can enable this mode using the -B command line option. It is quite experimental, which is why it is not the default. --- source/Makefile.in | 3 +- source/nsswitch/winbindd.c | 135 +++++++++++++++++++++++++-------------- source/nsswitch/winbindd_cache.c | 16 ++++- source/nsswitch/winbindd_proto.h | 10 +++ 4 files changed, 114 insertions(+), 50 deletions(-) diff --git a/source/Makefile.in b/source/Makefile.in index ae897782885..dee2daa6b94 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -442,7 +442,8 @@ WINBINDD_OBJ1 = \ nsswitch/winbindd_cm.o \ nsswitch/winbindd_wins.o \ nsswitch/winbindd_rpc.o \ - nsswitch/winbindd_ads.o + nsswitch/winbindd_ads.o \ + nsswitch/winbindd_dual.o WINBINDD_OBJ = \ $(WINBINDD_OBJ1) $(NOPROTO_OBJ) $(PASSDB_OBJ) \ diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 479be795744..b198b4a1632 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -4,6 +4,7 @@ Winbind daemon for ntdom nss module Copyright (C) by Tim Potter 2000, 2001 + Copyright (C) Andrew Tridgell 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +27,8 @@ struct winbindd_cli_state *client_list; static int num_clients; -BOOL opt_nocache; +BOOL opt_nocache = False; +BOOL opt_dual_daemon = False; /* Reload configuration */ @@ -365,9 +367,10 @@ static void remove_client(struct winbindd_cli_state *state) } } + /* Process a complete received packet from a client */ -static void process_packet(struct winbindd_cli_state *state) +void winbind_process_packet(struct winbindd_cli_state *state) { /* Process request */ @@ -379,11 +382,16 @@ static void process_packet(struct winbindd_cli_state *state) state->read_buf_len = 0; state->write_buf_len = sizeof(struct winbindd_response); + + /* we might need to send it to the dual daemon */ + if (opt_dual_daemon) { + dual_send_request(state); + } } /* Read some data from a client connection */ -static void client_read(struct winbindd_cli_state *state) +void winbind_client_read(struct winbindd_cli_state *state) { int n; @@ -397,8 +405,11 @@ static void client_read(struct winbindd_cli_state *state) } while (n == -1 && errno == EINTR); + DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); + + /* Read failed, kill client */ + if (n == -1 || n == 0) { - /* Read failed, kill client */ DEBUG(5,("read failed on sock %d, pid %d: %s\n", state->sock, state->pid, (n == -1) ? strerror(errno) : "EOF")); @@ -407,8 +418,6 @@ static void client_read(struct winbindd_cli_state *state) return; } - DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len )); - /* Update client state */ state->read_buf_len += n; @@ -528,6 +537,10 @@ static void process_loop(int accept_sock) timeout.tv_sec = WINBINDD_ESTABLISH_LOOP; timeout.tv_usec = 0; + if (opt_dual_daemon) { + maxfd = dual_select_setup(&w_fds, maxfd); + } + /* Set up client readers and writers */ state = client_list; @@ -582,6 +595,10 @@ static void process_loop(int accept_sock) if (selret > 0) { + if (opt_dual_daemon) { + dual_select(&w_fds); + } + if (FD_ISSET(accept_sock, &r_fds)) new_connection(accept_sock); @@ -595,7 +612,7 @@ static void process_loop(int accept_sock) /* Read data */ - client_read(state); + winbind_client_read(state); /* * If we have the start of a @@ -619,7 +636,7 @@ static void process_loop(int accept_sock) if (state->read_buf_len == sizeof(state->request)) { - process_packet(state); + winbind_process_packet(state); } } @@ -655,6 +672,57 @@ static void process_loop(int accept_sock) } } + +/* + these are split out from the main winbindd for use by the background daemon + */ +int winbind_setup_common(void) +{ + load_interfaces(); + + secrets_init(); + + /* Get list of domains we look up requests for. This includes the + domain which we are a member of as well as any trusted + domains. */ + + init_domain_list(); + + ZERO_STRUCT(server_state); + + /* Winbind daemon initialisation */ + + if (!winbindd_param_init()) + return 1; + + if (!winbindd_idmap_init()) + return 1; + + /* Unblock all signals we are interested in as they may have been + blocked by the parent process. */ + + BlockSignals(False, SIGINT); + BlockSignals(False, SIGQUIT); + BlockSignals(False, SIGTERM); + BlockSignals(False, SIGUSR1); + BlockSignals(False, SIGUSR2); + BlockSignals(False, SIGHUP); + + /* Setup signal handlers */ + + CatchSignal(SIGINT, termination_handler); /* Exit on these sigs */ + CatchSignal(SIGQUIT, termination_handler); + CatchSignal(SIGTERM, termination_handler); + + CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */ + + CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */ + CatchSignal(SIGHUP, sighup_handler); + + return 0; +} + + /* Main function */ struct winbindd_state server_state; /* Server state information */ @@ -664,6 +732,7 @@ static void usage(void) { printf("Usage: winbindd [options]\n"); printf("\t-i interactive mode\n"); + printf("\t-B dual daemon mode\n"); printf("\t-n disable cacheing\n"); printf("\t-d level set debug level\n"); printf("\t-s configfile choose smb.conf location\n"); @@ -708,7 +777,7 @@ int main(int argc, char **argv) /* Initialise samba/rpc client stuff */ - while ((opt = getopt(argc, argv, "id:s:nh")) != EOF) { + while ((opt = getopt(argc, argv, "id:s:nhB")) != EOF) { switch (opt) { /* Don't become a daemon */ @@ -716,6 +785,11 @@ int main(int argc, char **argv) interactive = True; break; + /* dual daemon system */ + case 'B': + opt_dual_daemon = True; + break; + /* disable cacheing */ case 'n': opt_nocache = True; @@ -782,46 +856,13 @@ int main(int argc, char **argv) setpgid( (pid_t)0, (pid_t)0); #endif - load_interfaces(); - - secrets_init(); - - /* Get list of domains we look up requests for. This includes the - domain which we are a member of as well as any trusted - domains. */ - - init_domain_list(); - - ZERO_STRUCT(server_state); - - /* Winbind daemon initialisation */ - - if (!winbindd_param_init()) - return 1; + if (opt_dual_daemon) { + do_dual_daemon(); + } - if (!winbindd_idmap_init()) + if (winbind_setup_common() != 0) { return 1; - - /* Unblock all signals we are interested in as they may have been - blocked by the parent process. */ - - BlockSignals(False, SIGINT); - BlockSignals(False, SIGQUIT); - BlockSignals(False, SIGTERM); - BlockSignals(False, SIGUSR1); - BlockSignals(False, SIGUSR2); - BlockSignals(False, SIGHUP); - - /* Setup signal handlers */ - - CatchSignal(SIGINT, termination_handler); /* Exit on these sigs */ - CatchSignal(SIGQUIT, termination_handler); - CatchSignal(SIGTERM, termination_handler); - - CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */ - - CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */ - CatchSignal(SIGHUP, sighup_handler); + } /* Initialise messaging system */ diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 9bd95fdd861..f65705e0fb0 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -51,7 +51,7 @@ void wcache_flush_cache(void) if (opt_nocache) return; wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, - TDB_DEFAULT, O_RDWR | O_CREAT | O_TRUNC, 0600); + TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0600); if (!wcache->tdb) { DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); @@ -205,11 +205,17 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force) { NTSTATUS status; unsigned time_diff; + unsigned cache_time = lp_winbind_cache_time(); + + /* trying to reconnect is expensive, don't do it too often */ + if (domain->sequence_number == DOM_SEQUENCE_NONE) { + cache_time *= 8; + } time_diff = time(NULL) - domain->last_seq_check; /* see if we have to refetch the domain sequence number */ - if (!force && (time_diff < lp_winbind_cache_time())) { + if (!force && (time_diff < cache_time)) { return; } @@ -289,9 +295,15 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache, centry->sequence_number = centry_uint32(centry); if (centry_expired(domain, centry)) { + extern BOOL opt_dual_daemon; + if (opt_dual_daemon) { + extern BOOL backgroud_process; + backgroud_process = True; + } else { centry_free(centry); return NULL; } + } return centry; } diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h index f3830cd63c6..8cac542b88b 100644 --- a/source/nsswitch/winbindd_proto.h +++ b/source/nsswitch/winbindd_proto.h @@ -6,6 +6,9 @@ /* The following definitions come from nsswitch/winbindd.c */ +void winbind_process_packet(struct winbindd_cli_state *state); +void winbind_client_read(struct winbindd_cli_state *state); +int winbind_setup_common(void); int main(int argc, char **argv); /* The following definitions come from nsswitch/winbindd_ads.c */ @@ -39,6 +42,13 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, struct cli_state **cli); void winbindd_cm_status(void); +/* The following definitions come from nsswitch/winbindd_dual.c */ + +int dual_select_setup(fd_set *fds, int maxfd); +void dual_select(fd_set *fds); +void dual_send_request(struct winbindd_cli_state *state); +void do_dual_daemon(void); + /* The following definitions come from nsswitch/winbindd_group.c */ enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state); -- cgit From 0827bd4184256a87d6cf6c58bc314309503da7be Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 24 Apr 2002 05:36:40 +0000 Subject: Added constant and message for invalid security descriptor dos error. --- source/include/doserr.h | 1 + source/libsmb/doserr.c | 1 + 2 files changed, 2 insertions(+) diff --git a/source/include/doserr.h b/source/include/doserr.h index 4945bc69d72..9750dd74898 100644 --- a/source/include/doserr.h +++ b/source/include/doserr.h @@ -164,6 +164,7 @@ #define WERR_OBJECT_PATH_INVALID W_ERROR(161) #define WERR_NO_MORE_ITEMS W_ERROR(259) #define WERR_MORE_DATA W_ERROR(234) +#define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338) #define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797) #define WERR_INVALID_PRINTER_NAME W_ERROR(1801) #define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802) diff --git a/source/libsmb/doserr.c b/source/libsmb/doserr.c index adc001bf29a..116a54e76fd 100644 --- a/source/libsmb/doserr.c +++ b/source/libsmb/doserr.c @@ -65,6 +65,7 @@ werror_code_struct dos_errs[] = { "WERR_DFS_NO_SUCH_SERVER", WERR_DFS_NO_SUCH_SERVER }, { "WERR_DFS_INTERNAL_ERROR", WERR_DFS_INTERNAL_ERROR }, { "WERR_DFS_CANT_CREATE_JUNCT", WERR_DFS_CANT_CREATE_JUNCT }, + { "WERR_INVALID_SECURITY_DESCRIPTOR", WERR_INVALID_SECURITY_DESCRIPTOR }, { NULL, W_ERROR(0) } }; -- cgit