From 3a8232644e04a4cfdcbe2061f0556b78b4045191 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Oct 1998 14:02:50 +0000 Subject: started basic support for solaris 2.5 in smbwrapper. (This used to be commit e5c7cabae4826bde819b94a48bc4674dcd69da21) --- source3/Makefile.in | 10 +- source3/configure | 530 +++++++++++++++++++++++++++++++---------- source3/configure.in | 8 +- source3/include/config.h.in | 81 +++++++ source3/lib/.cvsignore | 2 +- source3/libsmb/.cvsignore | 2 +- source3/param/.cvsignore | 2 +- source3/smbwrapper/.cvsignore | 2 +- source3/smbwrapper/realcalls.h | 101 ++++++-- source3/smbwrapper/smbsh | 14 +- source3/smbwrapper/smbw_dir.c | 40 ++-- source3/smbwrapper/wrapped.c | 41 +++- source3/smbwrapper/wrapper.h | 7 + 13 files changed, 661 insertions(+), 179 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 466b73e6c4..811a699673 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -219,7 +219,7 @@ SMBTORTURE_OBJ = utils/torture.o $(LIBSMB_OBJ) $(PARAM_OBJ) \ PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \ $(RPCCLIENT_OBJ) $(SMBWRAPPER_OBJ) -PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.p) +PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.po) ###################################################################### # now the rules... @@ -228,7 +228,7 @@ PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.p) all : CHECK $(SPROGS) $(PROGS) .SUFFIXES: -.SUFFIXES: .c .o .h .p +.SUFFIXES: .c .o .h .po CHECK: @echo "Using FLAGS = $(FLAGS)" @@ -253,7 +253,7 @@ CHECK: # it will only work with GNU make, gcc and --enable-maintainer-mode -.c.p: @MAINT@ .deps/.dummy obj-dirs +.c.po: @MAINT@ .deps/.dummy obj-dirs @echo Compiling $*.c with -fpic @dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` && \ if test ! -d "$$dir"; then \ @@ -351,7 +351,7 @@ bin/smbtorture: $(SMBTORTURE_OBJ) smbwrapper/smbwrapper.so: $(PICOBJS) @echo Linking $@ - @$(LD) -shared -o $@ $(PICOBJS) + $(LD) -G -o $@ $(PICOBJS) install: installbin installman installscripts installcp installswat @@ -396,7 +396,7 @@ uninstallcp: @$(SHELL) $(srcdir)/script/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST) clean: - -rm -f core */*~ *~ */*.o */*.p + -rm -f core */*~ *~ */*.o */*.po proto: @echo rebuilding include/proto.h diff --git a/source3/configure b/source3/configure index e4b5faa6a1..4f4127a29a 100755 --- a/source3/configure +++ b/source3/configure @@ -1880,7 +1880,7 @@ else fi done -for ac_hdr in readline/history.h sys/capability.h +for ac_hdr in readline/history.h sys/capability.h sysacll.h sys/syscall.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3841,8 +3841,284 @@ fi 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:3848: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +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:3903: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in __getcwd _getcwd +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3958: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in __xstat __fxstat __lxstat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4013: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +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:4068: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:3846: checking for long long" >&5 +echo "configure:4122: 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 @@ -3851,12 +4127,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:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -3879,7 +4155,7 @@ EOF fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:3883: checking for 64 bit off_t" >&5 +echo "configure:4159: 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 @@ -3888,13 +4164,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:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -3917,7 +4193,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:3921: checking for off64_t" >&5 +echo "configure:4197: 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 @@ -3926,13 +4202,13 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < #include 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:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -3955,7 +4231,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:3959: checking for 64 bit ino_t" >&5 +echo "configure:4235: 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 @@ -3964,13 +4240,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:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -3993,7 +4269,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:3997: checking for ino64_t" >&5 +echo "configure:4273: 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 @@ -4002,13 +4278,13 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < #include 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:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -4031,7 +4307,7 @@ EOF fi echo $ac_n "checking for union semun""... $ac_c" 1>&6 -echo "configure:4035: checking for union semun" >&5 +echo "configure:4311: checking for union semun" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4040,7 +4316,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNION_SEMUN=cross else cat > conftest.$ac_ext < @@ -4048,7 +4324,7 @@ else #include main() { union semun ss; exit(0); } EOF -if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNION_SEMUN=yes else @@ -4071,7 +4347,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:4075: checking for unsigned char" >&5 +echo "configure:4351: 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 @@ -4080,12 +4356,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:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -4108,13 +4384,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:4112: checking for sin_len in sock" >&5 +echo "configure:4388: 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 @@ -4123,7 +4399,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -4144,20 +4420,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:4148: checking for __FILE__ macro" >&5 +echo "configure:4424: 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:4161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -4178,20 +4454,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:4182: checking for __FUNCTION__ macro" >&5 +echo "configure:4458: 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:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -4212,7 +4488,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:4216: checking if gettimeofday takes tz argument" >&5 +echo "configure:4492: 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 @@ -4221,14 +4497,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:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -4252,7 +4528,7 @@ fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:4256: checking for broken readdir" >&5 +echo "configure:4532: 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 @@ -4261,7 +4537,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -4269,7 +4545,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:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -4292,13 +4568,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:4296: checking for utimbuf" >&5 +echo "configure:4572: 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 @@ -4306,7 +4582,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:4310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -4327,13 +4603,13 @@ EOF fi echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:4331: checking for kernel oplock type definitions" >&5 +echo "configure:4607: checking for kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4341,7 +4617,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:4345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS=yes else @@ -4362,7 +4638,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:4366: checking for irix specific capabilities" >&5 +echo "configure:4642: 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 @@ -4371,7 +4647,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -4386,7 +4662,7 @@ main() { } EOF -if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -4409,16 +4685,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:4413: checking for test routines" >&5 +echo "configure:4689: 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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -4432,7 +4708,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:4436: checking for ftruncate extend" >&5 +echo "configure:4712: 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 @@ -4441,11 +4717,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -4468,7 +4744,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:4472: checking for broken getgroups" >&5 +echo "configure:4748: 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 @@ -4477,11 +4753,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -4504,7 +4780,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:4508: checking whether getpass should be replaced" >&5 +echo "configure:4784: 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 @@ -4512,7 +4788,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -4548,7 +4824,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:4552: checking for broken inet_ntoa" >&5 +echo "configure:4828: 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 @@ -4557,7 +4833,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -4569,7 +4845,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:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -4592,7 +4868,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:4596: checking for root" >&5 +echo "configure:4872: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4601,11 +4877,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -4631,7 +4907,7 @@ fi netmask=no; echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6 -echo "configure:4635: checking for netmask ifconf" >&5 +echo "configure:4911: checking for netmask ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4640,14 +4916,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_IFCONF=yes else @@ -4671,7 +4947,7 @@ fi if test $netmask = no; then echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6 -echo "configure:4675: checking for netmask ifreq" >&5 +echo "configure:4951: checking for netmask ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4680,14 +4956,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_IFREQ=yes else @@ -4712,7 +4988,7 @@ fi if test $netmask = no; then echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6 -echo "configure:4716: checking for netmask AIX" >&5 +echo "configure:4992: checking for netmask AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4721,14 +4997,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_AIX=yes else @@ -4752,7 +5028,7 @@ fi fi echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6 -echo "configure:4756: checking for trapdoor seteuid" >&5 +echo "configure:5032: checking for trapdoor seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4761,11 +5037,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRAPDOOR_UID=no else @@ -4788,7 +5064,7 @@ EOF fi echo $ac_n "checking for shared mmap""... $ac_c" 1>&6 -echo "configure:4792: checking for shared mmap" >&5 +echo "configure:5068: checking for shared mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4797,11 +5073,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SHARED_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SHARED_MMAP=yes else @@ -4824,7 +5100,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:4828: checking for fcntl locking" >&5 +echo "configure:5104: 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 @@ -4833,11 +5109,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 && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -4860,7 +5136,7 @@ EOF fi echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:4864: checking for 64 bit fcntl locking" >&5 +echo "configure:5140: 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 @@ -4869,7 +5145,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext < @@ -4890,7 +5166,7 @@ exit(1); #endif } EOF -if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -4913,7 +5189,7 @@ EOF fi echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6 -echo "configure:4917: checking for sysv ipc" >&5 +echo "configure:5193: checking for sysv ipc" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4922,11 +5198,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SYSV_IPC=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SYSV_IPC=yes else @@ -4951,7 +5227,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:4955: checking whether to use AFS" >&5 +echo "configure:5231: 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" @@ -4977,7 +5253,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6 -echo "configure:4981: checking whether to use DFS auth" >&5 +echo "configure:5257: checking whether to use DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -5002,7 +5278,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:5006: checking whether to use Kerberos IV" >&5 +echo "configure:5282: 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" @@ -5012,7 +5288,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:5016: checking for dn_expand in -lresolv" >&5 +echo "configure:5292: 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 @@ -5020,7 +5296,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5070,7 +5346,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:5074: checking whether to use AUTOMOUNT" >&5 +echo "configure:5350: 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" @@ -5095,7 +5371,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:5099: checking whether to use SMBMOUNT" >&5 +echo "configure:5375: 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" @@ -5123,7 +5399,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6 -echo "configure:5127: checking whether to use LDAP password database" >&5 +echo "configure:5403: checking whether to use LDAP password database" >&5 # Check whether --with-ldap or --without-ldap was given. if test "${with_ldap+set}" = set; then withval="$with_ldap" @@ -5148,7 +5424,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6 -echo "configure:5152: checking whether to use NISPLUS password database" >&5 +echo "configure:5428: checking whether to use NISPLUS password database" >&5 # Check whether --with-nisplus or --without-nisplus was given. if test "${with_nisplus+set}" = set; then withval="$with_nisplus" @@ -5173,7 +5449,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:5177: checking whether to use NISPLUS_HOME" >&5 +echo "configure:5453: 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" @@ -5198,7 +5474,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:5202: checking whether to use SSL" >&5 +echo "configure:5478: 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" @@ -5223,7 +5499,7 @@ fi ################################################# # check for experimental mmap support echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6 -echo "configure:5227: checking whether to use MMAP" >&5 +echo "configure:5503: checking whether to use MMAP" >&5 # Check whether --with-mmap or --without-mmap was given. if test "${with_mmap+set}" = set; then withval="$with_mmap" @@ -5248,7 +5524,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:5252: checking whether to use syslog logging" >&5 +echo "configure:5528: 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" @@ -5273,7 +5549,7 @@ fi ################################################# # check for experimental netatalk resource fork support echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6 -echo "configure:5277: checking whether to support netatalk" >&5 +echo "configure:5553: checking whether to support netatalk" >&5 # Check whether --with-netatalk or --without-netatalk was given. if test "${with_netatalk+set}" = set; then withval="$with_netatalk" @@ -5299,14 +5575,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:5303: checking how to get filesystem space usage" >&5 +echo "configure:5579: 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:5310: checking statvfs64 function (SVR4)" >&5 +echo "configure:5586: 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 @@ -5314,7 +5590,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext < @@ -5325,7 +5601,7 @@ else exit (statfs64 (".", &fsd)); } EOF -if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -5358,12 +5634,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:5362: checking statvfs function (SVR4)" >&5 +echo "configure:5638: 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 @@ -5371,7 +5647,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -5396,7 +5672,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:5400: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:5676: 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 @@ -5404,7 +5680,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -5417,7 +5693,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -5444,7 +5720,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:5448: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:5724: 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 @@ -5452,7 +5728,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -5498,7 +5774,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:5502: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:5778: 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 @@ -5506,7 +5782,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -5516,7 +5792,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -5543,7 +5819,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:5547: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:5823: 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 @@ -5551,7 +5827,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -5567,7 +5843,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -5594,7 +5870,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:5598: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:5874: 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 @@ -5602,7 +5878,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -5622,7 +5898,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -5651,11 +5927,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then echo "configure OK"; else diff --git a/source3/configure.in b/source3/configure.in index 30eb5d14d9..1e014ec41b 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -41,7 +41,7 @@ AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h) AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) AC_CHECK_HEADERS(shadow.h netinet/tcp.h sys/security.h security/pam_appl.h) AC_CHECK_HEADERS(stropts.h poll.h readline.h history.h readline/readline.h) -AC_CHECK_HEADERS(readline/history.h sys/capability.h) +AC_CHECK_HEADERS(readline/history.h sys/capability.h sysacll.h sys/syscall.h) AC_CHECK_SIZEOF(int,cross) AC_CHECK_SIZEOF(long,cross) @@ -164,6 +164,12 @@ AC_CHECK_FUNCS(set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncat AC_CHECK_FUNCS(fseek64 ftell64 bigcrypt getprpwnam setluid yp_get_default_domain getpwanam) AC_CHECK_FUNCS(srandom random srand rand) +AC_CHECK_FUNCS(_dup _dup2 _opendir _readdir _seekdir _telldir _closedir) +AC_CHECK_FUNCS(__dup __dup2 __opendir __readdir __seekdir __telldir __closedir) +AC_CHECK_FUNCS(__getcwd _getcwd) +AC_CHECK_FUNCS(__xstat __fxstat __lxstat) +AC_CHECK_FUNCS(_stat _lstat _fstat __stat __lstat __fstat) + AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ AC_TRY_RUN([#include main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 1f1cb04e0b..ffcc6a2ef0 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -136,6 +136,81 @@ /* The number of bytes in a short. */ #undef SIZEOF_SHORT +/* Define if you have the __closedir function. */ +#undef HAVE___CLOSEDIR + +/* Define if you have the __dup function. */ +#undef HAVE___DUP + +/* Define if you have the __dup2 function. */ +#undef HAVE___DUP2 + +/* Define if you have the __fstat function. */ +#undef HAVE___FSTAT + +/* Define if you have the __fxstat function. */ +#undef HAVE___FXSTAT + +/* Define if you have the __getcwd function. */ +#undef HAVE___GETCWD + +/* Define if you have the __lstat function. */ +#undef HAVE___LSTAT + +/* Define if you have the __lxstat function. */ +#undef HAVE___LXSTAT + +/* Define if you have the __opendir function. */ +#undef HAVE___OPENDIR + +/* Define if you have the __readdir function. */ +#undef HAVE___READDIR + +/* Define if you have the __seekdir function. */ +#undef HAVE___SEEKDIR + +/* Define if you have the __stat function. */ +#undef HAVE___STAT + +/* Define if you have the __telldir function. */ +#undef HAVE___TELLDIR + +/* Define if you have the __xstat function. */ +#undef HAVE___XSTAT + +/* Define if you have the _closedir function. */ +#undef HAVE__CLOSEDIR + +/* Define if you have the _dup function. */ +#undef HAVE__DUP + +/* Define if you have the _dup2 function. */ +#undef HAVE__DUP2 + +/* Define if you have the _fstat function. */ +#undef HAVE__FSTAT + +/* Define if you have the _getcwd function. */ +#undef HAVE__GETCWD + +/* Define if you have the _lstat function. */ +#undef HAVE__LSTAT + +/* Define if you have the _opendir function. */ +#undef HAVE__OPENDIR + +/* Define if you have the _readdir function. */ +#undef HAVE__READDIR + +/* Define if you have the _seekdir function. */ +#undef HAVE__SEEKDIR + +/* Define if you have the _stat function. */ +#undef HAVE__STAT + +/* Define if you have the _telldir function. */ +#undef HAVE__TELLDIR + /* Define if you have the atexit function. */ #undef HAVE_ATEXIT @@ -472,6 +547,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_STATVFS_H +/* Define if you have the header file. */ +#undef HAVE_SYS_SYSCALL_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -484,6 +562,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H +/* Define if you have the header file. */ +#undef HAVE_SYSACLL_H + /* Define if you have the header file. */ #undef HAVE_TERMIOS_H diff --git a/source3/lib/.cvsignore b/source3/lib/.cvsignore index f20330ba4d..6d609cec52 100644 --- a/source3/lib/.cvsignore +++ b/source3/lib/.cvsignore @@ -1 +1 @@ -*.p +*.po diff --git a/source3/libsmb/.cvsignore b/source3/libsmb/.cvsignore index f20330ba4d..6d609cec52 100644 --- a/source3/libsmb/.cvsignore +++ b/source3/libsmb/.cvsignore @@ -1 +1 @@ -*.p +*.po diff --git a/source3/param/.cvsignore b/source3/param/.cvsignore index f20330ba4d..6d609cec52 100644 --- a/source3/param/.cvsignore +++ b/source3/param/.cvsignore @@ -1 +1 @@ -*.p +*.po diff --git a/source3/smbwrapper/.cvsignore b/source3/smbwrapper/.cvsignore index f20330ba4d..6d609cec52 100644 --- a/source3/smbwrapper/.cvsignore +++ b/source3/smbwrapper/.cvsignore @@ -1 +1 @@ -*.p +*.po diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h index 4678426869..74cff66d00 100644 --- a/source3/smbwrapper/realcalls.h +++ b/source3/smbwrapper/realcalls.h @@ -28,38 +28,107 @@ #define real_chown(fn, owner, group) (syscall(SYS_chown,(fn),(owner),(group))) #define real_getdents(fd, dirp, count) (syscall(SYS_getdents, (fd), (dirp), (count))) -/* if needed define SYS_getdents so that getdents gets compiled */ - #define real_link(fn1, fn2) (syscall(SYS_link, (fn1), (fn2))) -#define real_lstat(fn, buf ) (syscall(SYS_lstat, (fn), (buf))) #define real_open(fn,flags,mode) (syscall(SYS_open, (fn), (flags), (mode))) -#define real_prev_lstat(fn, buf ) (syscall(SYS_prev_lstat, (fn), (buf))) -#define real_prev_stat(fn, buf ) (syscall(SYS_prev_stat, (fn), (buf))) -#ifdef linux -#define real_readdir(dir) (__readdir(dir)) + +#ifdef HAVE__OPENDIR +#define real_opendir(fn) (_opendir(fn)) +#elif HAVE___OPENDIR #define real_opendir(fn) (__opendir(fn)) -#define real_telldir(dir) (__telldir(dir)) -#define real_closedir(dir) (__closedir(dir)) -#define real_seekdir(dir, ofs) (__seekdir(dir, ofs)) #else -#define real_readdir(dirp) ((struct dirent *)syscall(SYS_readdir,(dirp))) #define real_opendir(fn) ((DIR *)syscall(SYS_opendir,(fn))) -/* if needed define SYS_readdir so that readdir gets compiled */ #endif +#ifdef HAVE__READDIR +#define real_readdir(d) (_readdir(d)) +#elif HAVE___READDIR +#define real_readdir(d) (__readdir(d)) +#else +#define real_readdir(d) (syscall(SYS_readdir,(d))) +#endif + +#ifdef HAVE__TELLDIR +#define real_telldir(d) (_telldir(d)) +#elif HAVE___TELLDIR +#define real_telldir(d) (__telldir(d)) +#else +#define real_telldir(d) (syscall(SYS_telldir,(d))) +#endif + +#ifdef HAVE__CLOSEDIR +#define real_closedir(d) (_closedir(d)) +#elif HAVE___CLOSEDIR +#define real_closedir(d) (__closedir(d)) +#else +#define real_closedir(d) (syscall(SYS_closedir,(d))) +#endif + +#ifdef HAVE__SEEKDIR +#define real_seekdir(d,l) (_seekdir(d,l)) +#elif HAVE___SEEKDIR +#define real_seekdir(d) (__seekdir(d,l)) +#else +#define real_seekdir(d,l) (syscall(SYS_seekdir,(d),(l))) +#endif + +#ifdef HAVE__DUP +#define real_dup(d) (_dup(d)) +#elif HAVE___DUP +#define real_dup(d) (__dup(d)) +#else +#define real_dup(d) (syscall(SYS_dup,(d))) +#endif + +#ifdef HAVE__DUP2 +#define real_dup2(d1,d2) (_dup2(d1,d2)) +#elif HAVE___DUP2 +#define real_dup2(d1,d2) (__dup2(d1,d2)) +#else +#define real_dup2(d1,d2) (syscall(SYS_dup2,(d1),(d2))) +#endif + +#ifdef HAVE__GETCWD +#define real_getcwd(b,s) (_getcwd(b,s)) +#elif HAVE___GETCWD +#define real_getcwd(b,s) (__getcwd(b,s)) +#else +#define real_getcwd(b,s) (syscall(SYS_getcwd,(b),(s))) +#endif + +#ifdef HAVE__STAT +#define real_stat(fn,st) (_stat(fn,st)) +#elif HAVE___STAT +#define real_stat(fn,st) (__stat(fn,st)) +#else +#define real_stat(fn,st) (syscall(SYS_stat,(fn),(st))) +#endif + +#ifdef HAVE__LSTAT +#define real_lstat(fn,st) (_lstat(fn,st)) +#elif HAVE___LSTAT +#define real_lstat(fn,st) (__lstat(fn,st)) +#else +#define real_lstat(fn,st) (syscall(SYS_lstat,(fn),(st))) +#endif + +#ifdef HAVE__FSTAT +#define real_fstat(fd,st) (_fstat(fd,st)) +#elif HAVE___FSTAT +#define real_fstat(fd,st) (__fstat(fd,st)) +#else +#define real_fstat(fd,st) (syscall(SYS_fstat,(fd),(st))) +#endif + + #define real_readlink(fn,buf,len) (syscall(SYS_readlink, (fn), (buf), (len))) #define real_rename(fn1, fn2) (syscall(SYS_rename, (fn1), (fn2))) #define real_symlink(fn1, fn2) (syscall(SYS_symlink, (fn1), (fn2))) -#define real_stat(fn, buf ) (syscall(SYS_stat, (fn), (buf))) -#define real_fstat(fd, buf ) (syscall(SYS_fstat, (fd), (buf))) #define real_read(fd, buf, count ) (syscall(SYS_read, (fd), (buf), (count))) #define real_lseek(fd, offset, whence) (syscall(SYS_lseek, (fd), (offset), (whence))) #define real_write(fd, buf, count ) (syscall(SYS_write, (fd), (buf), (count))) #define real_close(fd) (syscall(SYS_close, (fd))) -#define real_dup(fd) (syscall(SYS_dup, (fd))) -#define real_dup2(fd1, fd2) (syscall(SYS_dup2, (fd1), (fd2))) #define real_fchdir(fd) (syscall(SYS_fchdir, (fd))) #define real_fcntl(fd,cmd,arg) (syscall(SYS_fcntl, (fd), (cmd), (arg))) #define real_symlink(fn1, fn2) (syscall(SYS_symlink, (fn1), (fn2))) diff --git a/source3/smbwrapper/smbsh b/source3/smbwrapper/smbsh index c03e4f2baf..015db52d95 100755 --- a/source3/smbwrapper/smbsh +++ b/source3/smbwrapper/smbsh @@ -1,24 +1,28 @@ #!/bin/sh -LIBDIR=/samba/cvs/source/smbwrapper +LIBDIR=/home/tridge/samba/source/smbwrapper # a simple launcher for the smbwrapper.so preloadde library if [ x$SMBW_USER = x ]; then echo username? read user - export SMBW_USER=$user + SMBW_USER=$user + export SMBW_USER fi # this doesn't hide the password - we need a proper launch app for that if [ x$SMBW_PASSWORD = x ]; then echo password? read pass - export SMBW_PASSWORD=$pass + SMBW_PASSWORD=$pass + export fi -export LD_PRELOAD=$LIBDIR/smbwrapper.so +LD_PRELOAD=$LIBDIR/smbwrapper.so +export LD_PRELOAD export PWD -export PS1='smbsh$ ' +PS1='smbsh$ ' +export PS1 bash diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c index d794944b1a..5a45c11175 100644 --- a/source3/smbwrapper/smbw_dir.c +++ b/source3/smbwrapper/smbw_dir.c @@ -31,6 +31,9 @@ extern int DEBUGLEVEL; extern int smbw_busy; +#define DIRP_SIZE (sizeof(fstring) + 12) + + /***************************************************** map a fd to a smbw_dir structure *******************************************************/ @@ -274,7 +277,7 @@ int smbw_dir_fstat(int fd, struct stat *st) ZERO_STRUCTP(st); - smbw_setup_stat(st, "", dir->count*sizeof(struct dirent), aDIR); + smbw_setup_stat(st, "", dir->count*DIRP_SIZE, aDIR); st->st_dev = dir->srv->dev; @@ -307,7 +310,6 @@ int smbw_dir_close(int fd) return 0; } - /***************************************************** a wrapper for getdents() *******************************************************/ @@ -326,24 +328,25 @@ int smbw_getdents(unsigned int fd, struct dirent *dirp, int count) smbw_busy--; return -1; } + + DEBUG(4,("sizeof(*dirp)=%d\n", sizeof(*dirp))); - while (count>=sizeof(*dirp) && (dir->offset < dir->count)) { - dirp->d_off = (dir->offset+1)*sizeof(*dirp); - dirp->d_reclen = sizeof(*dirp); - safe_strcpy(&dirp->d_name[0], dir->list[dir->offset].name, - sizeof(dirp->d_name)-1); + while (count>=DIRP_SIZE && (dir->offset < dir->count)) { + dirp->d_off = (dir->offset+1)*DIRP_SIZE; + dirp->d_reclen = DIRP_SIZE; + fstrcpy(&dirp->d_name[0], dir->list[dir->offset].name); dirp->d_ino = smbw_inode(dir->list[dir->offset].name); dir->offset++; count -= dirp->d_reclen; if (dir->offset == dir->count) { dirp->d_off = -1; } - dirp++; + dirp = (struct dirent *)(((char *)dirp) + DIRP_SIZE); n++; } smbw_busy--; - return n*sizeof(*dirp); + return n*DIRP_SIZE; } @@ -445,18 +448,18 @@ off_t smbw_dir_lseek(int fd, off_t offset, int whence) switch (whence) { case SEEK_SET: - dir->offset = offset/sizeof(struct dirent); + dir->offset = offset/DIRP_SIZE; break; case SEEK_CUR: - dir->offset += offset/sizeof(struct dirent); + dir->offset += offset/DIRP_SIZE; break; case SEEK_END: - dir->offset = (dir->count * sizeof(struct dirent)) + offset; - dir->offset /= sizeof(struct dirent); + dir->offset = (dir->count * DIRP_SIZE) + offset; + dir->offset /= DIRP_SIZE; break; } - ret = dir->offset * sizeof(struct dirent); + ret = dir->offset * DIRP_SIZE; DEBUG(4,(" -> %d\n", (int)ret)); @@ -559,7 +562,7 @@ char *smbw_getcwd(char *buf, size_t size) smbw_init(); if (smbw_busy) { - return __getcwd(buf, size); + return real_getcwd(buf, size); } smbw_busy++; @@ -636,10 +639,11 @@ read one entry from a directory struct dirent *smbw_readdir(DIR *dirp) { struct smbw_dir *d = (struct smbw_dir *)dirp; - static struct dirent de; + static char buf[DIRP_SIZE]; + struct dirent *de = (struct dirent *)buf; - if (smbw_getdents(d->fd, &de, sizeof(struct dirent)) > 0) - return &de; + if (smbw_getdents(d->fd, de, DIRP_SIZE) > 0) + return de; return NULL; } diff --git a/source3/smbwrapper/wrapped.c b/source3/smbwrapper/wrapped.c index 0ee7341e3b..885fd4d481 100644 --- a/source3/smbwrapper/wrapped.c +++ b/source3/smbwrapper/wrapped.c @@ -94,7 +94,7 @@ __asm__(".globl __fcntl; __fcntl = fcntl"); __asm__(".globl __getdents; __getdents = getdents"); #endif - int getdents(unsigned int fd, struct dirent *dirp, unsigned int count) + int getdents(int fd, struct dirent *dirp, unsigned int count) { if (smbw_fd(fd)) { return smbw_getdents(fd, dirp, count); @@ -188,6 +188,7 @@ __asm__(".globl __write; __write = write"); } +#ifdef LINUX int __fxstat(int vers, int fd, struct stat *st) { struct kernel_stat kbuf; @@ -249,6 +250,7 @@ __asm__(".globl __write; __write = write"); return -1; } } +#endif char *getcwd(char *buf, size_t size) @@ -257,7 +259,7 @@ __asm__(".globl __write; __write = write"); } - +#ifdef LINUX int __lxstat(int vers, const char *name, struct stat *st) { struct kernel_stat kbuf; @@ -319,7 +321,7 @@ __asm__(".globl __write; __write = write"); return -1; } } - +#endif int mkdir(const char *name, mode_t mode) @@ -343,6 +345,7 @@ __asm__(".globl __write; __write = write"); } +#ifdef LINUX int __xstat(int vers, const char *name, struct stat *st) { struct kernel_stat kbuf; @@ -404,10 +407,42 @@ __asm__(".globl __write; __write = write"); return -1; } } +#endif int stat(const char *name, struct stat *st) { +#if HAVE___XSTAT return __xstat(_STAT_VER, name, st); +#else + if (smbw_path(name)) { + return smbw_stat(name, st); + } + return real_stat(name, st); +#endif +} + + int lstat(const char *name, struct stat *st) +{ +#if HAVE___LXSTAT + return __lxstat(_STAT_VER, name, st); +#else + if (smbw_path(name)) { + return smbw_stat(name, st); + } + return real_lstat(name, st); +#endif +} + + int fstat(int fd, struct stat *st) +{ +#if HAVE___LXSTAT + return __fxstat(_STAT_VER, fd, st); +#else + if (smbw_fd(fd)) { + return smbw_fstat(fd, st); + } + return real_fstat(fd, st); +#endif } diff --git a/source3/smbwrapper/wrapper.h b/source3/smbwrapper/wrapper.h index 5339f652f8..b80a029dff 100644 --- a/source3/smbwrapper/wrapper.h +++ b/source3/smbwrapper/wrapper.h @@ -21,14 +21,21 @@ #include "config.h" +#ifdef HAVE_SYSCALL_H #include +#elif HAVE_SYS_SYSCALL_H +#include +#endif + #include #include #include #include #include #include +#ifdef LINUX #include "kernel_stat.h" +#endif #include "realcalls.h" int smbw_dirp(DIR *dirp); -- cgit